From 7fcf4199faec2c419ba9818bf5446bc226000786 Mon Sep 17 00:00:00 2001 From: zju_wyx <22125041@zju.edu.cn> Date: Tue, 15 Jul 2025 11:53:40 +0800 Subject: [PATCH] support overload Signed-off-by: zju_wyx <22125041@zju.edu.cn> Change-Id: I61c5cf94022919283d14925859f218f1ea5e64d1 --- lib/tsc.js | 9787 +++++------ lib/tsserver.js | 13676 ++++++++-------- lib/tsserverlibrary.d.ts | 464 +- lib/tsserverlibrary.js | 13676 ++++++++-------- lib/typescript.d.ts | 464 +- lib/typescript.js | 13671 +++++++-------- lib/typingsInstaller.js | 4289 ++--- src/compiler/binder.ts | 30 +- src/compiler/checker.ts | 14 +- src/compiler/emitter.ts | 36 +- src/compiler/factory/nodeFactory.ts | 88 +- src/compiler/factory/nodeTests.ts | 10 +- src/compiler/parser.ts | 108 +- src/compiler/scanner.ts | 1 + src/compiler/transformers/classFields.ts | 4 + src/compiler/transformers/declarations.ts | 38 +- .../transformers/declarations/diagnostics.ts | 7 +- src/compiler/transformers/ts.ts | 4 + src/compiler/types.ts | 48 +- src/compiler/utilities.ts | 1 + src/compiler/utilitiesPublic.ts | 9 +- src/compiler/visitorPublic.ts | 17 +- 22 files changed, 29064 insertions(+), 27378 deletions(-) diff --git a/lib/tsc.js b/lib/tsc.js index 2644e8a702..bfcfb7b891 100644 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -3854,208 +3854,211 @@ var SyntaxKind2 = /* @__PURE__ */ ((SyntaxKind4) => { SyntaxKind4[SyntaxKind4["GlobalKeyword"] = 161] = "GlobalKeyword"; SyntaxKind4[SyntaxKind4["BigIntKeyword"] = 162] = "BigIntKeyword"; SyntaxKind4[SyntaxKind4["OverrideKeyword"] = 163] = "OverrideKeyword"; - SyntaxKind4[SyntaxKind4["OfKeyword"] = 164] = "OfKeyword"; - SyntaxKind4[SyntaxKind4["QualifiedName"] = 165] = "QualifiedName"; - SyntaxKind4[SyntaxKind4["ComputedPropertyName"] = 166] = "ComputedPropertyName"; - SyntaxKind4[SyntaxKind4["TypeParameter"] = 167] = "TypeParameter"; - SyntaxKind4[SyntaxKind4["Parameter"] = 168] = "Parameter"; - SyntaxKind4[SyntaxKind4["Decorator"] = 169] = "Decorator"; - SyntaxKind4[SyntaxKind4["PropertySignature"] = 170] = "PropertySignature"; - SyntaxKind4[SyntaxKind4["PropertyDeclaration"] = 171] = "PropertyDeclaration"; - SyntaxKind4[SyntaxKind4["AnnotationPropertyDeclaration"] = 172] = "AnnotationPropertyDeclaration"; - SyntaxKind4[SyntaxKind4["MethodSignature"] = 173] = "MethodSignature"; - SyntaxKind4[SyntaxKind4["MethodDeclaration"] = 174] = "MethodDeclaration"; - SyntaxKind4[SyntaxKind4["ClassStaticBlockDeclaration"] = 175] = "ClassStaticBlockDeclaration"; - SyntaxKind4[SyntaxKind4["Constructor"] = 176] = "Constructor"; - SyntaxKind4[SyntaxKind4["GetAccessor"] = 177] = "GetAccessor"; - SyntaxKind4[SyntaxKind4["SetAccessor"] = 178] = "SetAccessor"; - SyntaxKind4[SyntaxKind4["CallSignature"] = 179] = "CallSignature"; - SyntaxKind4[SyntaxKind4["ConstructSignature"] = 180] = "ConstructSignature"; - SyntaxKind4[SyntaxKind4["IndexSignature"] = 181] = "IndexSignature"; - SyntaxKind4[SyntaxKind4["TypePredicate"] = 182] = "TypePredicate"; - SyntaxKind4[SyntaxKind4["TypeReference"] = 183] = "TypeReference"; - SyntaxKind4[SyntaxKind4["FunctionType"] = 184] = "FunctionType"; - SyntaxKind4[SyntaxKind4["ConstructorType"] = 185] = "ConstructorType"; - SyntaxKind4[SyntaxKind4["TypeQuery"] = 186] = "TypeQuery"; - SyntaxKind4[SyntaxKind4["TypeLiteral"] = 187] = "TypeLiteral"; - SyntaxKind4[SyntaxKind4["ArrayType"] = 188] = "ArrayType"; - SyntaxKind4[SyntaxKind4["TupleType"] = 189] = "TupleType"; - SyntaxKind4[SyntaxKind4["OptionalType"] = 190] = "OptionalType"; - SyntaxKind4[SyntaxKind4["RestType"] = 191] = "RestType"; - SyntaxKind4[SyntaxKind4["UnionType"] = 192] = "UnionType"; - SyntaxKind4[SyntaxKind4["IntersectionType"] = 193] = "IntersectionType"; - SyntaxKind4[SyntaxKind4["ConditionalType"] = 194] = "ConditionalType"; - SyntaxKind4[SyntaxKind4["InferType"] = 195] = "InferType"; - SyntaxKind4[SyntaxKind4["ParenthesizedType"] = 196] = "ParenthesizedType"; - SyntaxKind4[SyntaxKind4["ThisType"] = 197] = "ThisType"; - SyntaxKind4[SyntaxKind4["TypeOperator"] = 198] = "TypeOperator"; - SyntaxKind4[SyntaxKind4["IndexedAccessType"] = 199] = "IndexedAccessType"; - SyntaxKind4[SyntaxKind4["MappedType"] = 200] = "MappedType"; - SyntaxKind4[SyntaxKind4["LiteralType"] = 201] = "LiteralType"; - SyntaxKind4[SyntaxKind4["NamedTupleMember"] = 202] = "NamedTupleMember"; - SyntaxKind4[SyntaxKind4["TemplateLiteralType"] = 203] = "TemplateLiteralType"; - SyntaxKind4[SyntaxKind4["TemplateLiteralTypeSpan"] = 204] = "TemplateLiteralTypeSpan"; - SyntaxKind4[SyntaxKind4["ImportType"] = 205] = "ImportType"; - SyntaxKind4[SyntaxKind4["ObjectBindingPattern"] = 206] = "ObjectBindingPattern"; - SyntaxKind4[SyntaxKind4["ArrayBindingPattern"] = 207] = "ArrayBindingPattern"; - SyntaxKind4[SyntaxKind4["BindingElement"] = 208] = "BindingElement"; - SyntaxKind4[SyntaxKind4["ArrayLiteralExpression"] = 209] = "ArrayLiteralExpression"; - SyntaxKind4[SyntaxKind4["ObjectLiteralExpression"] = 210] = "ObjectLiteralExpression"; - SyntaxKind4[SyntaxKind4["PropertyAccessExpression"] = 211] = "PropertyAccessExpression"; - SyntaxKind4[SyntaxKind4["ElementAccessExpression"] = 212] = "ElementAccessExpression"; - SyntaxKind4[SyntaxKind4["CallExpression"] = 213] = "CallExpression"; - SyntaxKind4[SyntaxKind4["NewExpression"] = 214] = "NewExpression"; - SyntaxKind4[SyntaxKind4["TaggedTemplateExpression"] = 215] = "TaggedTemplateExpression"; - SyntaxKind4[SyntaxKind4["TypeAssertionExpression"] = 216] = "TypeAssertionExpression"; - SyntaxKind4[SyntaxKind4["ParenthesizedExpression"] = 217] = "ParenthesizedExpression"; - SyntaxKind4[SyntaxKind4["FunctionExpression"] = 218] = "FunctionExpression"; - SyntaxKind4[SyntaxKind4["ArrowFunction"] = 219] = "ArrowFunction"; - SyntaxKind4[SyntaxKind4["EtsComponentExpression"] = 220] = "EtsComponentExpression"; - SyntaxKind4[SyntaxKind4["DeleteExpression"] = 221] = "DeleteExpression"; - SyntaxKind4[SyntaxKind4["TypeOfExpression"] = 222] = "TypeOfExpression"; - SyntaxKind4[SyntaxKind4["VoidExpression"] = 223] = "VoidExpression"; - SyntaxKind4[SyntaxKind4["AwaitExpression"] = 224] = "AwaitExpression"; - SyntaxKind4[SyntaxKind4["PrefixUnaryExpression"] = 225] = "PrefixUnaryExpression"; - SyntaxKind4[SyntaxKind4["PostfixUnaryExpression"] = 226] = "PostfixUnaryExpression"; - SyntaxKind4[SyntaxKind4["BinaryExpression"] = 227] = "BinaryExpression"; - SyntaxKind4[SyntaxKind4["ConditionalExpression"] = 228] = "ConditionalExpression"; - SyntaxKind4[SyntaxKind4["TemplateExpression"] = 229] = "TemplateExpression"; - SyntaxKind4[SyntaxKind4["YieldExpression"] = 230] = "YieldExpression"; - SyntaxKind4[SyntaxKind4["SpreadElement"] = 231] = "SpreadElement"; - SyntaxKind4[SyntaxKind4["ClassExpression"] = 232] = "ClassExpression"; - SyntaxKind4[SyntaxKind4["OmittedExpression"] = 233] = "OmittedExpression"; - SyntaxKind4[SyntaxKind4["ExpressionWithTypeArguments"] = 234] = "ExpressionWithTypeArguments"; - SyntaxKind4[SyntaxKind4["AsExpression"] = 235] = "AsExpression"; - SyntaxKind4[SyntaxKind4["NonNullExpression"] = 236] = "NonNullExpression"; - SyntaxKind4[SyntaxKind4["MetaProperty"] = 237] = "MetaProperty"; - SyntaxKind4[SyntaxKind4["SyntheticExpression"] = 238] = "SyntheticExpression"; - SyntaxKind4[SyntaxKind4["SatisfiesExpression"] = 239] = "SatisfiesExpression"; - SyntaxKind4[SyntaxKind4["TemplateSpan"] = 240] = "TemplateSpan"; - SyntaxKind4[SyntaxKind4["SemicolonClassElement"] = 241] = "SemicolonClassElement"; - SyntaxKind4[SyntaxKind4["Block"] = 242] = "Block"; - SyntaxKind4[SyntaxKind4["EmptyStatement"] = 243] = "EmptyStatement"; - SyntaxKind4[SyntaxKind4["VariableStatement"] = 244] = "VariableStatement"; - SyntaxKind4[SyntaxKind4["ExpressionStatement"] = 245] = "ExpressionStatement"; - SyntaxKind4[SyntaxKind4["IfStatement"] = 246] = "IfStatement"; - SyntaxKind4[SyntaxKind4["DoStatement"] = 247] = "DoStatement"; - SyntaxKind4[SyntaxKind4["WhileStatement"] = 248] = "WhileStatement"; - SyntaxKind4[SyntaxKind4["ForStatement"] = 249] = "ForStatement"; - SyntaxKind4[SyntaxKind4["ForInStatement"] = 250] = "ForInStatement"; - SyntaxKind4[SyntaxKind4["ForOfStatement"] = 251] = "ForOfStatement"; - SyntaxKind4[SyntaxKind4["ContinueStatement"] = 252] = "ContinueStatement"; - SyntaxKind4[SyntaxKind4["BreakStatement"] = 253] = "BreakStatement"; - SyntaxKind4[SyntaxKind4["ReturnStatement"] = 254] = "ReturnStatement"; - SyntaxKind4[SyntaxKind4["WithStatement"] = 255] = "WithStatement"; - SyntaxKind4[SyntaxKind4["SwitchStatement"] = 256] = "SwitchStatement"; - SyntaxKind4[SyntaxKind4["LabeledStatement"] = 257] = "LabeledStatement"; - SyntaxKind4[SyntaxKind4["ThrowStatement"] = 258] = "ThrowStatement"; - SyntaxKind4[SyntaxKind4["TryStatement"] = 259] = "TryStatement"; - SyntaxKind4[SyntaxKind4["DebuggerStatement"] = 260] = "DebuggerStatement"; - SyntaxKind4[SyntaxKind4["VariableDeclaration"] = 261] = "VariableDeclaration"; - SyntaxKind4[SyntaxKind4["VariableDeclarationList"] = 262] = "VariableDeclarationList"; - SyntaxKind4[SyntaxKind4["FunctionDeclaration"] = 263] = "FunctionDeclaration"; - SyntaxKind4[SyntaxKind4["ClassDeclaration"] = 264] = "ClassDeclaration"; - SyntaxKind4[SyntaxKind4["StructDeclaration"] = 265] = "StructDeclaration"; - SyntaxKind4[SyntaxKind4["AnnotationDeclaration"] = 266] = "AnnotationDeclaration"; - SyntaxKind4[SyntaxKind4["InterfaceDeclaration"] = 267] = "InterfaceDeclaration"; - SyntaxKind4[SyntaxKind4["TypeAliasDeclaration"] = 268] = "TypeAliasDeclaration"; - SyntaxKind4[SyntaxKind4["EnumDeclaration"] = 269] = "EnumDeclaration"; - SyntaxKind4[SyntaxKind4["ModuleDeclaration"] = 270] = "ModuleDeclaration"; - SyntaxKind4[SyntaxKind4["ModuleBlock"] = 271] = "ModuleBlock"; - SyntaxKind4[SyntaxKind4["CaseBlock"] = 272] = "CaseBlock"; - SyntaxKind4[SyntaxKind4["NamespaceExportDeclaration"] = 273] = "NamespaceExportDeclaration"; - SyntaxKind4[SyntaxKind4["ImportEqualsDeclaration"] = 274] = "ImportEqualsDeclaration"; - SyntaxKind4[SyntaxKind4["ImportDeclaration"] = 275] = "ImportDeclaration"; - SyntaxKind4[SyntaxKind4["ImportClause"] = 276] = "ImportClause"; - SyntaxKind4[SyntaxKind4["NamespaceImport"] = 277] = "NamespaceImport"; - SyntaxKind4[SyntaxKind4["NamedImports"] = 278] = "NamedImports"; - SyntaxKind4[SyntaxKind4["ImportSpecifier"] = 279] = "ImportSpecifier"; - SyntaxKind4[SyntaxKind4["ExportAssignment"] = 280] = "ExportAssignment"; - SyntaxKind4[SyntaxKind4["ExportDeclaration"] = 281] = "ExportDeclaration"; - SyntaxKind4[SyntaxKind4["NamedExports"] = 282] = "NamedExports"; - SyntaxKind4[SyntaxKind4["NamespaceExport"] = 283] = "NamespaceExport"; - SyntaxKind4[SyntaxKind4["ExportSpecifier"] = 284] = "ExportSpecifier"; - SyntaxKind4[SyntaxKind4["MissingDeclaration"] = 285] = "MissingDeclaration"; - SyntaxKind4[SyntaxKind4["ExternalModuleReference"] = 286] = "ExternalModuleReference"; - SyntaxKind4[SyntaxKind4["JsxElement"] = 287] = "JsxElement"; - SyntaxKind4[SyntaxKind4["JsxSelfClosingElement"] = 288] = "JsxSelfClosingElement"; - SyntaxKind4[SyntaxKind4["JsxOpeningElement"] = 289] = "JsxOpeningElement"; - SyntaxKind4[SyntaxKind4["JsxClosingElement"] = 290] = "JsxClosingElement"; - SyntaxKind4[SyntaxKind4["JsxFragment"] = 291] = "JsxFragment"; - SyntaxKind4[SyntaxKind4["JsxOpeningFragment"] = 292] = "JsxOpeningFragment"; - SyntaxKind4[SyntaxKind4["JsxClosingFragment"] = 293] = "JsxClosingFragment"; - SyntaxKind4[SyntaxKind4["JsxAttribute"] = 294] = "JsxAttribute"; - SyntaxKind4[SyntaxKind4["JsxAttributes"] = 295] = "JsxAttributes"; - SyntaxKind4[SyntaxKind4["JsxSpreadAttribute"] = 296] = "JsxSpreadAttribute"; - SyntaxKind4[SyntaxKind4["JsxExpression"] = 297] = "JsxExpression"; - SyntaxKind4[SyntaxKind4["CaseClause"] = 298] = "CaseClause"; - SyntaxKind4[SyntaxKind4["DefaultClause"] = 299] = "DefaultClause"; - SyntaxKind4[SyntaxKind4["HeritageClause"] = 300] = "HeritageClause"; - SyntaxKind4[SyntaxKind4["CatchClause"] = 301] = "CatchClause"; - SyntaxKind4[SyntaxKind4["AssertClause"] = 302] = "AssertClause"; - SyntaxKind4[SyntaxKind4["AssertEntry"] = 303] = "AssertEntry"; - SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 304] = "ImportTypeAssertionContainer"; - SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 305] = "PropertyAssignment"; - SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 306] = "ShorthandPropertyAssignment"; - SyntaxKind4[SyntaxKind4["SpreadAssignment"] = 307] = "SpreadAssignment"; - SyntaxKind4[SyntaxKind4["EnumMember"] = 308] = "EnumMember"; - SyntaxKind4[SyntaxKind4["UnparsedPrologue"] = 309] = "UnparsedPrologue"; - SyntaxKind4[SyntaxKind4["UnparsedPrepend"] = 310] = "UnparsedPrepend"; - SyntaxKind4[SyntaxKind4["UnparsedText"] = 311] = "UnparsedText"; - SyntaxKind4[SyntaxKind4["UnparsedInternalText"] = 312] = "UnparsedInternalText"; - SyntaxKind4[SyntaxKind4["UnparsedSyntheticReference"] = 313] = "UnparsedSyntheticReference"; - SyntaxKind4[SyntaxKind4["SourceFile"] = 314] = "SourceFile"; - SyntaxKind4[SyntaxKind4["Bundle"] = 315] = "Bundle"; - SyntaxKind4[SyntaxKind4["UnparsedSource"] = 316] = "UnparsedSource"; - SyntaxKind4[SyntaxKind4["InputFiles"] = 317] = "InputFiles"; - SyntaxKind4[SyntaxKind4["JSDocTypeExpression"] = 318] = "JSDocTypeExpression"; - SyntaxKind4[SyntaxKind4["JSDocNameReference"] = 319] = "JSDocNameReference"; - SyntaxKind4[SyntaxKind4["JSDocMemberName"] = 320] = "JSDocMemberName"; - SyntaxKind4[SyntaxKind4["JSDocAllType"] = 321] = "JSDocAllType"; - SyntaxKind4[SyntaxKind4["JSDocUnknownType"] = 322] = "JSDocUnknownType"; - SyntaxKind4[SyntaxKind4["JSDocNullableType"] = 323] = "JSDocNullableType"; - SyntaxKind4[SyntaxKind4["JSDocNonNullableType"] = 324] = "JSDocNonNullableType"; - SyntaxKind4[SyntaxKind4["JSDocOptionalType"] = 325] = "JSDocOptionalType"; - SyntaxKind4[SyntaxKind4["JSDocFunctionType"] = 326] = "JSDocFunctionType"; - SyntaxKind4[SyntaxKind4["JSDocVariadicType"] = 327] = "JSDocVariadicType"; - SyntaxKind4[SyntaxKind4["JSDocNamepathType"] = 328] = "JSDocNamepathType"; - SyntaxKind4[SyntaxKind4["JSDoc"] = 329] = "JSDoc"; - SyntaxKind4[SyntaxKind4["JSDocComment"] = 329 /* JSDoc */] = "JSDocComment"; - SyntaxKind4[SyntaxKind4["JSDocText"] = 330] = "JSDocText"; - SyntaxKind4[SyntaxKind4["JSDocTypeLiteral"] = 331] = "JSDocTypeLiteral"; - SyntaxKind4[SyntaxKind4["JSDocSignature"] = 332] = "JSDocSignature"; - SyntaxKind4[SyntaxKind4["JSDocLink"] = 333] = "JSDocLink"; - SyntaxKind4[SyntaxKind4["JSDocLinkCode"] = 334] = "JSDocLinkCode"; - SyntaxKind4[SyntaxKind4["JSDocLinkPlain"] = 335] = "JSDocLinkPlain"; - SyntaxKind4[SyntaxKind4["JSDocTag"] = 336] = "JSDocTag"; - SyntaxKind4[SyntaxKind4["JSDocAugmentsTag"] = 337] = "JSDocAugmentsTag"; - SyntaxKind4[SyntaxKind4["JSDocImplementsTag"] = 338] = "JSDocImplementsTag"; - SyntaxKind4[SyntaxKind4["JSDocAuthorTag"] = 339] = "JSDocAuthorTag"; - SyntaxKind4[SyntaxKind4["JSDocDeprecatedTag"] = 340] = "JSDocDeprecatedTag"; - SyntaxKind4[SyntaxKind4["JSDocClassTag"] = 341] = "JSDocClassTag"; - SyntaxKind4[SyntaxKind4["JSDocPublicTag"] = 342] = "JSDocPublicTag"; - SyntaxKind4[SyntaxKind4["JSDocPrivateTag"] = 343] = "JSDocPrivateTag"; - SyntaxKind4[SyntaxKind4["JSDocProtectedTag"] = 344] = "JSDocProtectedTag"; - SyntaxKind4[SyntaxKind4["JSDocReadonlyTag"] = 345] = "JSDocReadonlyTag"; - SyntaxKind4[SyntaxKind4["JSDocOverrideTag"] = 346] = "JSDocOverrideTag"; - SyntaxKind4[SyntaxKind4["JSDocCallbackTag"] = 347] = "JSDocCallbackTag"; - SyntaxKind4[SyntaxKind4["JSDocEnumTag"] = 348] = "JSDocEnumTag"; - SyntaxKind4[SyntaxKind4["JSDocParameterTag"] = 349] = "JSDocParameterTag"; - SyntaxKind4[SyntaxKind4["JSDocReturnTag"] = 350] = "JSDocReturnTag"; - SyntaxKind4[SyntaxKind4["JSDocThisTag"] = 351] = "JSDocThisTag"; - SyntaxKind4[SyntaxKind4["JSDocTypeTag"] = 352] = "JSDocTypeTag"; - SyntaxKind4[SyntaxKind4["JSDocTemplateTag"] = 353] = "JSDocTemplateTag"; - SyntaxKind4[SyntaxKind4["JSDocTypedefTag"] = 354] = "JSDocTypedefTag"; - SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 355] = "JSDocSeeTag"; - SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 356] = "JSDocPropertyTag"; - SyntaxKind4[SyntaxKind4["SyntaxList"] = 357] = "SyntaxList"; - SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 358] = "NotEmittedStatement"; - SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 359] = "PartiallyEmittedExpression"; - SyntaxKind4[SyntaxKind4["CommaListExpression"] = 360] = "CommaListExpression"; - SyntaxKind4[SyntaxKind4["MergeDeclarationMarker"] = 361] = "MergeDeclarationMarker"; - SyntaxKind4[SyntaxKind4["EndOfDeclarationMarker"] = 362] = "EndOfDeclarationMarker"; - SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 363] = "SyntheticReferenceExpression"; - SyntaxKind4[SyntaxKind4["Count"] = 364] = "Count"; + SyntaxKind4[SyntaxKind4["OverloadKeyword"] = 164] = "OverloadKeyword"; + SyntaxKind4[SyntaxKind4["OfKeyword"] = 165] = "OfKeyword"; + SyntaxKind4[SyntaxKind4["QualifiedName"] = 166] = "QualifiedName"; + SyntaxKind4[SyntaxKind4["ComputedPropertyName"] = 167] = "ComputedPropertyName"; + SyntaxKind4[SyntaxKind4["TypeParameter"] = 168] = "TypeParameter"; + SyntaxKind4[SyntaxKind4["Parameter"] = 169] = "Parameter"; + SyntaxKind4[SyntaxKind4["Decorator"] = 170] = "Decorator"; + SyntaxKind4[SyntaxKind4["PropertySignature"] = 171] = "PropertySignature"; + SyntaxKind4[SyntaxKind4["PropertyDeclaration"] = 172] = "PropertyDeclaration"; + SyntaxKind4[SyntaxKind4["AnnotationPropertyDeclaration"] = 173] = "AnnotationPropertyDeclaration"; + SyntaxKind4[SyntaxKind4["OverloadPropertyDeclaration"] = 174] = "OverloadPropertyDeclaration"; + SyntaxKind4[SyntaxKind4["MethodSignature"] = 175] = "MethodSignature"; + SyntaxKind4[SyntaxKind4["MethodDeclaration"] = 176] = "MethodDeclaration"; + SyntaxKind4[SyntaxKind4["ClassStaticBlockDeclaration"] = 177] = "ClassStaticBlockDeclaration"; + SyntaxKind4[SyntaxKind4["Constructor"] = 178] = "Constructor"; + SyntaxKind4[SyntaxKind4["GetAccessor"] = 179] = "GetAccessor"; + SyntaxKind4[SyntaxKind4["SetAccessor"] = 180] = "SetAccessor"; + SyntaxKind4[SyntaxKind4["CallSignature"] = 181] = "CallSignature"; + SyntaxKind4[SyntaxKind4["ConstructSignature"] = 182] = "ConstructSignature"; + SyntaxKind4[SyntaxKind4["IndexSignature"] = 183] = "IndexSignature"; + SyntaxKind4[SyntaxKind4["TypePredicate"] = 184] = "TypePredicate"; + SyntaxKind4[SyntaxKind4["TypeReference"] = 185] = "TypeReference"; + SyntaxKind4[SyntaxKind4["FunctionType"] = 186] = "FunctionType"; + SyntaxKind4[SyntaxKind4["ConstructorType"] = 187] = "ConstructorType"; + SyntaxKind4[SyntaxKind4["TypeQuery"] = 188] = "TypeQuery"; + SyntaxKind4[SyntaxKind4["TypeLiteral"] = 189] = "TypeLiteral"; + SyntaxKind4[SyntaxKind4["ArrayType"] = 190] = "ArrayType"; + SyntaxKind4[SyntaxKind4["TupleType"] = 191] = "TupleType"; + SyntaxKind4[SyntaxKind4["OptionalType"] = 192] = "OptionalType"; + SyntaxKind4[SyntaxKind4["RestType"] = 193] = "RestType"; + SyntaxKind4[SyntaxKind4["UnionType"] = 194] = "UnionType"; + SyntaxKind4[SyntaxKind4["IntersectionType"] = 195] = "IntersectionType"; + SyntaxKind4[SyntaxKind4["ConditionalType"] = 196] = "ConditionalType"; + SyntaxKind4[SyntaxKind4["InferType"] = 197] = "InferType"; + SyntaxKind4[SyntaxKind4["ParenthesizedType"] = 198] = "ParenthesizedType"; + SyntaxKind4[SyntaxKind4["ThisType"] = 199] = "ThisType"; + SyntaxKind4[SyntaxKind4["TypeOperator"] = 200] = "TypeOperator"; + SyntaxKind4[SyntaxKind4["IndexedAccessType"] = 201] = "IndexedAccessType"; + SyntaxKind4[SyntaxKind4["MappedType"] = 202] = "MappedType"; + SyntaxKind4[SyntaxKind4["LiteralType"] = 203] = "LiteralType"; + SyntaxKind4[SyntaxKind4["NamedTupleMember"] = 204] = "NamedTupleMember"; + SyntaxKind4[SyntaxKind4["TemplateLiteralType"] = 205] = "TemplateLiteralType"; + SyntaxKind4[SyntaxKind4["TemplateLiteralTypeSpan"] = 206] = "TemplateLiteralTypeSpan"; + SyntaxKind4[SyntaxKind4["ImportType"] = 207] = "ImportType"; + SyntaxKind4[SyntaxKind4["ObjectBindingPattern"] = 208] = "ObjectBindingPattern"; + SyntaxKind4[SyntaxKind4["ArrayBindingPattern"] = 209] = "ArrayBindingPattern"; + SyntaxKind4[SyntaxKind4["BindingElement"] = 210] = "BindingElement"; + SyntaxKind4[SyntaxKind4["ArrayLiteralExpression"] = 211] = "ArrayLiteralExpression"; + SyntaxKind4[SyntaxKind4["ObjectLiteralExpression"] = 212] = "ObjectLiteralExpression"; + SyntaxKind4[SyntaxKind4["PropertyAccessExpression"] = 213] = "PropertyAccessExpression"; + SyntaxKind4[SyntaxKind4["ElementAccessExpression"] = 214] = "ElementAccessExpression"; + SyntaxKind4[SyntaxKind4["CallExpression"] = 215] = "CallExpression"; + SyntaxKind4[SyntaxKind4["NewExpression"] = 216] = "NewExpression"; + SyntaxKind4[SyntaxKind4["TaggedTemplateExpression"] = 217] = "TaggedTemplateExpression"; + SyntaxKind4[SyntaxKind4["TypeAssertionExpression"] = 218] = "TypeAssertionExpression"; + SyntaxKind4[SyntaxKind4["ParenthesizedExpression"] = 219] = "ParenthesizedExpression"; + SyntaxKind4[SyntaxKind4["FunctionExpression"] = 220] = "FunctionExpression"; + SyntaxKind4[SyntaxKind4["ArrowFunction"] = 221] = "ArrowFunction"; + SyntaxKind4[SyntaxKind4["EtsComponentExpression"] = 222] = "EtsComponentExpression"; + SyntaxKind4[SyntaxKind4["DeleteExpression"] = 223] = "DeleteExpression"; + SyntaxKind4[SyntaxKind4["TypeOfExpression"] = 224] = "TypeOfExpression"; + SyntaxKind4[SyntaxKind4["VoidExpression"] = 225] = "VoidExpression"; + SyntaxKind4[SyntaxKind4["AwaitExpression"] = 226] = "AwaitExpression"; + SyntaxKind4[SyntaxKind4["PrefixUnaryExpression"] = 227] = "PrefixUnaryExpression"; + SyntaxKind4[SyntaxKind4["PostfixUnaryExpression"] = 228] = "PostfixUnaryExpression"; + SyntaxKind4[SyntaxKind4["BinaryExpression"] = 229] = "BinaryExpression"; + SyntaxKind4[SyntaxKind4["ConditionalExpression"] = 230] = "ConditionalExpression"; + SyntaxKind4[SyntaxKind4["TemplateExpression"] = 231] = "TemplateExpression"; + SyntaxKind4[SyntaxKind4["YieldExpression"] = 232] = "YieldExpression"; + SyntaxKind4[SyntaxKind4["SpreadElement"] = 233] = "SpreadElement"; + SyntaxKind4[SyntaxKind4["ClassExpression"] = 234] = "ClassExpression"; + SyntaxKind4[SyntaxKind4["OmittedExpression"] = 235] = "OmittedExpression"; + SyntaxKind4[SyntaxKind4["ExpressionWithTypeArguments"] = 236] = "ExpressionWithTypeArguments"; + SyntaxKind4[SyntaxKind4["AsExpression"] = 237] = "AsExpression"; + SyntaxKind4[SyntaxKind4["NonNullExpression"] = 238] = "NonNullExpression"; + SyntaxKind4[SyntaxKind4["MetaProperty"] = 239] = "MetaProperty"; + SyntaxKind4[SyntaxKind4["SyntheticExpression"] = 240] = "SyntheticExpression"; + SyntaxKind4[SyntaxKind4["SatisfiesExpression"] = 241] = "SatisfiesExpression"; + SyntaxKind4[SyntaxKind4["TemplateSpan"] = 242] = "TemplateSpan"; + SyntaxKind4[SyntaxKind4["SemicolonClassElement"] = 243] = "SemicolonClassElement"; + SyntaxKind4[SyntaxKind4["Block"] = 244] = "Block"; + SyntaxKind4[SyntaxKind4["EmptyStatement"] = 245] = "EmptyStatement"; + SyntaxKind4[SyntaxKind4["VariableStatement"] = 246] = "VariableStatement"; + SyntaxKind4[SyntaxKind4["ExpressionStatement"] = 247] = "ExpressionStatement"; + SyntaxKind4[SyntaxKind4["IfStatement"] = 248] = "IfStatement"; + SyntaxKind4[SyntaxKind4["DoStatement"] = 249] = "DoStatement"; + SyntaxKind4[SyntaxKind4["WhileStatement"] = 250] = "WhileStatement"; + SyntaxKind4[SyntaxKind4["ForStatement"] = 251] = "ForStatement"; + SyntaxKind4[SyntaxKind4["ForInStatement"] = 252] = "ForInStatement"; + SyntaxKind4[SyntaxKind4["ForOfStatement"] = 253] = "ForOfStatement"; + SyntaxKind4[SyntaxKind4["ContinueStatement"] = 254] = "ContinueStatement"; + SyntaxKind4[SyntaxKind4["BreakStatement"] = 255] = "BreakStatement"; + SyntaxKind4[SyntaxKind4["ReturnStatement"] = 256] = "ReturnStatement"; + SyntaxKind4[SyntaxKind4["WithStatement"] = 257] = "WithStatement"; + SyntaxKind4[SyntaxKind4["SwitchStatement"] = 258] = "SwitchStatement"; + SyntaxKind4[SyntaxKind4["LabeledStatement"] = 259] = "LabeledStatement"; + SyntaxKind4[SyntaxKind4["ThrowStatement"] = 260] = "ThrowStatement"; + SyntaxKind4[SyntaxKind4["TryStatement"] = 261] = "TryStatement"; + SyntaxKind4[SyntaxKind4["DebuggerStatement"] = 262] = "DebuggerStatement"; + SyntaxKind4[SyntaxKind4["VariableDeclaration"] = 263] = "VariableDeclaration"; + SyntaxKind4[SyntaxKind4["VariableDeclarationList"] = 264] = "VariableDeclarationList"; + SyntaxKind4[SyntaxKind4["FunctionDeclaration"] = 265] = "FunctionDeclaration"; + SyntaxKind4[SyntaxKind4["ClassDeclaration"] = 266] = "ClassDeclaration"; + SyntaxKind4[SyntaxKind4["StructDeclaration"] = 267] = "StructDeclaration"; + SyntaxKind4[SyntaxKind4["AnnotationDeclaration"] = 268] = "AnnotationDeclaration"; + SyntaxKind4[SyntaxKind4["OverloadDeclaration"] = 269] = "OverloadDeclaration"; + SyntaxKind4[SyntaxKind4["InterfaceDeclaration"] = 270] = "InterfaceDeclaration"; + SyntaxKind4[SyntaxKind4["TypeAliasDeclaration"] = 271] = "TypeAliasDeclaration"; + SyntaxKind4[SyntaxKind4["EnumDeclaration"] = 272] = "EnumDeclaration"; + SyntaxKind4[SyntaxKind4["ModuleDeclaration"] = 273] = "ModuleDeclaration"; + SyntaxKind4[SyntaxKind4["ModuleBlock"] = 274] = "ModuleBlock"; + SyntaxKind4[SyntaxKind4["CaseBlock"] = 275] = "CaseBlock"; + SyntaxKind4[SyntaxKind4["NamespaceExportDeclaration"] = 276] = "NamespaceExportDeclaration"; + SyntaxKind4[SyntaxKind4["ImportEqualsDeclaration"] = 277] = "ImportEqualsDeclaration"; + SyntaxKind4[SyntaxKind4["ImportDeclaration"] = 278] = "ImportDeclaration"; + SyntaxKind4[SyntaxKind4["ImportClause"] = 279] = "ImportClause"; + SyntaxKind4[SyntaxKind4["NamespaceImport"] = 280] = "NamespaceImport"; + SyntaxKind4[SyntaxKind4["NamedImports"] = 281] = "NamedImports"; + SyntaxKind4[SyntaxKind4["ImportSpecifier"] = 282] = "ImportSpecifier"; + SyntaxKind4[SyntaxKind4["ExportAssignment"] = 283] = "ExportAssignment"; + SyntaxKind4[SyntaxKind4["ExportDeclaration"] = 284] = "ExportDeclaration"; + SyntaxKind4[SyntaxKind4["NamedExports"] = 285] = "NamedExports"; + SyntaxKind4[SyntaxKind4["NamespaceExport"] = 286] = "NamespaceExport"; + SyntaxKind4[SyntaxKind4["ExportSpecifier"] = 287] = "ExportSpecifier"; + SyntaxKind4[SyntaxKind4["MissingDeclaration"] = 288] = "MissingDeclaration"; + SyntaxKind4[SyntaxKind4["ExternalModuleReference"] = 289] = "ExternalModuleReference"; + SyntaxKind4[SyntaxKind4["JsxElement"] = 290] = "JsxElement"; + SyntaxKind4[SyntaxKind4["JsxSelfClosingElement"] = 291] = "JsxSelfClosingElement"; + SyntaxKind4[SyntaxKind4["JsxOpeningElement"] = 292] = "JsxOpeningElement"; + SyntaxKind4[SyntaxKind4["JsxClosingElement"] = 293] = "JsxClosingElement"; + SyntaxKind4[SyntaxKind4["JsxFragment"] = 294] = "JsxFragment"; + SyntaxKind4[SyntaxKind4["JsxOpeningFragment"] = 295] = "JsxOpeningFragment"; + SyntaxKind4[SyntaxKind4["JsxClosingFragment"] = 296] = "JsxClosingFragment"; + SyntaxKind4[SyntaxKind4["JsxAttribute"] = 297] = "JsxAttribute"; + SyntaxKind4[SyntaxKind4["JsxAttributes"] = 298] = "JsxAttributes"; + SyntaxKind4[SyntaxKind4["JsxSpreadAttribute"] = 299] = "JsxSpreadAttribute"; + SyntaxKind4[SyntaxKind4["JsxExpression"] = 300] = "JsxExpression"; + SyntaxKind4[SyntaxKind4["CaseClause"] = 301] = "CaseClause"; + SyntaxKind4[SyntaxKind4["DefaultClause"] = 302] = "DefaultClause"; + SyntaxKind4[SyntaxKind4["HeritageClause"] = 303] = "HeritageClause"; + SyntaxKind4[SyntaxKind4["CatchClause"] = 304] = "CatchClause"; + SyntaxKind4[SyntaxKind4["AssertClause"] = 305] = "AssertClause"; + SyntaxKind4[SyntaxKind4["AssertEntry"] = 306] = "AssertEntry"; + SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 307] = "ImportTypeAssertionContainer"; + SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 308] = "PropertyAssignment"; + SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 309] = "ShorthandPropertyAssignment"; + SyntaxKind4[SyntaxKind4["SpreadAssignment"] = 310] = "SpreadAssignment"; + SyntaxKind4[SyntaxKind4["EnumMember"] = 311] = "EnumMember"; + SyntaxKind4[SyntaxKind4["UnparsedPrologue"] = 312] = "UnparsedPrologue"; + SyntaxKind4[SyntaxKind4["UnparsedPrepend"] = 313] = "UnparsedPrepend"; + SyntaxKind4[SyntaxKind4["UnparsedText"] = 314] = "UnparsedText"; + SyntaxKind4[SyntaxKind4["UnparsedInternalText"] = 315] = "UnparsedInternalText"; + SyntaxKind4[SyntaxKind4["UnparsedSyntheticReference"] = 316] = "UnparsedSyntheticReference"; + SyntaxKind4[SyntaxKind4["SourceFile"] = 317] = "SourceFile"; + SyntaxKind4[SyntaxKind4["Bundle"] = 318] = "Bundle"; + SyntaxKind4[SyntaxKind4["UnparsedSource"] = 319] = "UnparsedSource"; + SyntaxKind4[SyntaxKind4["InputFiles"] = 320] = "InputFiles"; + SyntaxKind4[SyntaxKind4["JSDocTypeExpression"] = 321] = "JSDocTypeExpression"; + SyntaxKind4[SyntaxKind4["JSDocNameReference"] = 322] = "JSDocNameReference"; + SyntaxKind4[SyntaxKind4["JSDocMemberName"] = 323] = "JSDocMemberName"; + SyntaxKind4[SyntaxKind4["JSDocAllType"] = 324] = "JSDocAllType"; + SyntaxKind4[SyntaxKind4["JSDocUnknownType"] = 325] = "JSDocUnknownType"; + SyntaxKind4[SyntaxKind4["JSDocNullableType"] = 326] = "JSDocNullableType"; + SyntaxKind4[SyntaxKind4["JSDocNonNullableType"] = 327] = "JSDocNonNullableType"; + SyntaxKind4[SyntaxKind4["JSDocOptionalType"] = 328] = "JSDocOptionalType"; + SyntaxKind4[SyntaxKind4["JSDocFunctionType"] = 329] = "JSDocFunctionType"; + SyntaxKind4[SyntaxKind4["JSDocVariadicType"] = 330] = "JSDocVariadicType"; + SyntaxKind4[SyntaxKind4["JSDocNamepathType"] = 331] = "JSDocNamepathType"; + SyntaxKind4[SyntaxKind4["JSDoc"] = 332] = "JSDoc"; + SyntaxKind4[SyntaxKind4["JSDocComment"] = 332 /* JSDoc */] = "JSDocComment"; + SyntaxKind4[SyntaxKind4["JSDocText"] = 333] = "JSDocText"; + SyntaxKind4[SyntaxKind4["JSDocTypeLiteral"] = 334] = "JSDocTypeLiteral"; + SyntaxKind4[SyntaxKind4["JSDocSignature"] = 335] = "JSDocSignature"; + SyntaxKind4[SyntaxKind4["JSDocLink"] = 336] = "JSDocLink"; + SyntaxKind4[SyntaxKind4["JSDocLinkCode"] = 337] = "JSDocLinkCode"; + SyntaxKind4[SyntaxKind4["JSDocLinkPlain"] = 338] = "JSDocLinkPlain"; + SyntaxKind4[SyntaxKind4["JSDocTag"] = 339] = "JSDocTag"; + SyntaxKind4[SyntaxKind4["JSDocAugmentsTag"] = 340] = "JSDocAugmentsTag"; + SyntaxKind4[SyntaxKind4["JSDocImplementsTag"] = 341] = "JSDocImplementsTag"; + SyntaxKind4[SyntaxKind4["JSDocAuthorTag"] = 342] = "JSDocAuthorTag"; + SyntaxKind4[SyntaxKind4["JSDocDeprecatedTag"] = 343] = "JSDocDeprecatedTag"; + SyntaxKind4[SyntaxKind4["JSDocClassTag"] = 344] = "JSDocClassTag"; + SyntaxKind4[SyntaxKind4["JSDocPublicTag"] = 345] = "JSDocPublicTag"; + SyntaxKind4[SyntaxKind4["JSDocPrivateTag"] = 346] = "JSDocPrivateTag"; + SyntaxKind4[SyntaxKind4["JSDocProtectedTag"] = 347] = "JSDocProtectedTag"; + SyntaxKind4[SyntaxKind4["JSDocReadonlyTag"] = 348] = "JSDocReadonlyTag"; + SyntaxKind4[SyntaxKind4["JSDocOverrideTag"] = 349] = "JSDocOverrideTag"; + SyntaxKind4[SyntaxKind4["JSDocCallbackTag"] = 350] = "JSDocCallbackTag"; + SyntaxKind4[SyntaxKind4["JSDocEnumTag"] = 351] = "JSDocEnumTag"; + SyntaxKind4[SyntaxKind4["JSDocParameterTag"] = 352] = "JSDocParameterTag"; + SyntaxKind4[SyntaxKind4["JSDocReturnTag"] = 353] = "JSDocReturnTag"; + SyntaxKind4[SyntaxKind4["JSDocThisTag"] = 354] = "JSDocThisTag"; + SyntaxKind4[SyntaxKind4["JSDocTypeTag"] = 355] = "JSDocTypeTag"; + SyntaxKind4[SyntaxKind4["JSDocTemplateTag"] = 356] = "JSDocTemplateTag"; + SyntaxKind4[SyntaxKind4["JSDocTypedefTag"] = 357] = "JSDocTypedefTag"; + SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 358] = "JSDocSeeTag"; + SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 359] = "JSDocPropertyTag"; + SyntaxKind4[SyntaxKind4["SyntaxList"] = 360] = "SyntaxList"; + SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 361] = "NotEmittedStatement"; + SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 362] = "PartiallyEmittedExpression"; + SyntaxKind4[SyntaxKind4["CommaListExpression"] = 363] = "CommaListExpression"; + SyntaxKind4[SyntaxKind4["MergeDeclarationMarker"] = 364] = "MergeDeclarationMarker"; + SyntaxKind4[SyntaxKind4["EndOfDeclarationMarker"] = 365] = "EndOfDeclarationMarker"; + SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 366] = "SyntheticReferenceExpression"; + SyntaxKind4[SyntaxKind4["Count"] = 367] = "Count"; SyntaxKind4[SyntaxKind4["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment"; SyntaxKind4[SyntaxKind4["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment"; SyntaxKind4[SyntaxKind4["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment"; @@ -4063,15 +4066,15 @@ var SyntaxKind2 = /* @__PURE__ */ ((SyntaxKind4) => { SyntaxKind4[SyntaxKind4["FirstReservedWord"] = 81 /* BreakKeyword */] = "FirstReservedWord"; SyntaxKind4[SyntaxKind4["LastReservedWord"] = 117 /* WithKeyword */] = "LastReservedWord"; SyntaxKind4[SyntaxKind4["FirstKeyword"] = 81 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind4[SyntaxKind4["LastKeyword"] = 164 /* OfKeyword */] = "LastKeyword"; + SyntaxKind4[SyntaxKind4["LastKeyword"] = 165 /* OfKeyword */] = "LastKeyword"; SyntaxKind4[SyntaxKind4["FirstFutureReservedWord"] = 118 /* ImplementsKeyword */] = "FirstFutureReservedWord"; SyntaxKind4[SyntaxKind4["LastFutureReservedWord"] = 126 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind4[SyntaxKind4["FirstTypeNode"] = 182 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind4[SyntaxKind4["LastTypeNode"] = 205 /* ImportType */] = "LastTypeNode"; + SyntaxKind4[SyntaxKind4["FirstTypeNode"] = 184 /* TypePredicate */] = "FirstTypeNode"; + SyntaxKind4[SyntaxKind4["LastTypeNode"] = 207 /* ImportType */] = "LastTypeNode"; SyntaxKind4[SyntaxKind4["FirstPunctuation"] = 18 /* OpenBraceToken */] = "FirstPunctuation"; SyntaxKind4[SyntaxKind4["LastPunctuation"] = 78 /* CaretEqualsToken */] = "LastPunctuation"; SyntaxKind4[SyntaxKind4["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind4[SyntaxKind4["LastToken"] = 164 /* LastKeyword */] = "LastToken"; + SyntaxKind4[SyntaxKind4["LastToken"] = 165 /* LastKeyword */] = "LastToken"; SyntaxKind4[SyntaxKind4["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; SyntaxKind4[SyntaxKind4["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; SyntaxKind4[SyntaxKind4["FirstLiteralToken"] = 8 /* NumericLiteral */] = "FirstLiteralToken"; @@ -4080,15 +4083,15 @@ var SyntaxKind2 = /* @__PURE__ */ ((SyntaxKind4) => { SyntaxKind4[SyntaxKind4["LastTemplateToken"] = 17 /* TemplateTail */] = "LastTemplateToken"; SyntaxKind4[SyntaxKind4["FirstBinaryOperator"] = 29 /* LessThanToken */] = "FirstBinaryOperator"; SyntaxKind4[SyntaxKind4["LastBinaryOperator"] = 78 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind4[SyntaxKind4["FirstStatement"] = 244 /* VariableStatement */] = "FirstStatement"; - SyntaxKind4[SyntaxKind4["LastStatement"] = 260 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind4[SyntaxKind4["FirstNode"] = 165 /* QualifiedName */] = "FirstNode"; - SyntaxKind4[SyntaxKind4["FirstJSDocNode"] = 318 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind4[SyntaxKind4["LastJSDocNode"] = 356 /* JSDocPropertyTag */] = "LastJSDocNode"; - SyntaxKind4[SyntaxKind4["FirstJSDocTagNode"] = 336 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] = 356 /* JSDocPropertyTag */] = "LastJSDocTagNode"; + SyntaxKind4[SyntaxKind4["FirstStatement"] = 246 /* VariableStatement */] = "FirstStatement"; + SyntaxKind4[SyntaxKind4["LastStatement"] = 262 /* DebuggerStatement */] = "LastStatement"; + SyntaxKind4[SyntaxKind4["FirstNode"] = 166 /* QualifiedName */] = "FirstNode"; + SyntaxKind4[SyntaxKind4["FirstJSDocNode"] = 321 /* JSDocTypeExpression */] = "FirstJSDocNode"; + SyntaxKind4[SyntaxKind4["LastJSDocNode"] = 359 /* JSDocPropertyTag */] = "LastJSDocNode"; + SyntaxKind4[SyntaxKind4["FirstJSDocTagNode"] = 339 /* JSDocTag */] = "FirstJSDocTagNode"; + SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] = 359 /* JSDocPropertyTag */] = "LastJSDocTagNode"; SyntaxKind4[SyntaxKind4["FirstContextualKeyword"] = 127 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind4[SyntaxKind4["LastContextualKeyword"] = 164 /* OfKeyword */] = "LastContextualKeyword"; + SyntaxKind4[SyntaxKind4["LastContextualKeyword"] = 165 /* OfKeyword */] = "LastContextualKeyword"; return SyntaxKind4; })(SyntaxKind2 || {}); var NodeFlags2 = /* @__PURE__ */ ((NodeFlags3) => { @@ -9106,6 +9109,7 @@ var textToKeywordObj = { protected: 123 /* ProtectedKeyword */, public: 124 /* PublicKeyword */, override: 163 /* OverrideKeyword */, + overload: 164 /* OverloadKeyword */, out: 146 /* OutKeyword */, readonly: 147 /* ReadonlyKeyword */, require: 148 /* RequireKeyword */, @@ -9136,7 +9140,7 @@ var textToKeywordObj = { yield: 126 /* YieldKeyword */, async: 133 /* AsyncKeyword */, await: 134 /* AwaitKeyword */, - of: 164 /* OfKeyword */ + of: 165 /* OfKeyword */ }; var textToKeyword = new Map2(getEntries(textToKeywordObj)); var textToToken = new Map2(getEntries({ @@ -11211,16 +11215,16 @@ function collapseTextChangeRangesAcrossMultipleVersions(changes) { return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN); } function getTypeParameterOwner(d) { - if (d && d.kind === 167 /* TypeParameter */) { + if (d && d.kind === 168 /* TypeParameter */) { for (let current = d; current; current = current.parent) { - if (isFunctionLike(current) || isClassLike(current) || current.kind === 267 /* InterfaceDeclaration */) { + if (isFunctionLike(current) || isClassLike(current) || current.kind === 270 /* InterfaceDeclaration */) { return current; } } } } function isParameterPropertyDeclaration(node, parent) { - return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent.kind === 176 /* Constructor */; + return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent.kind === 178 /* Constructor */; } function isEmptyBindingPattern(node) { if (isBindingPattern(node)) { @@ -11246,14 +11250,14 @@ function getCombinedFlags(node, getFlags) { node = walkUpBindingElementsAndPatterns(node); } let flags = getFlags(node); - if (node.kind === 261 /* VariableDeclaration */) { + if (node.kind === 263 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 262 /* VariableDeclarationList */) { + if (node && node.kind === 264 /* VariableDeclarationList */) { flags |= getFlags(node); node = node.parent; } - if (node && node.kind === 244 /* VariableStatement */) { + if (node && node.kind === 246 /* VariableStatement */) { flags |= getFlags(node); } return flags; @@ -11374,30 +11378,30 @@ function nameForNamelessJSDocTypedef(declaration) { return getDeclarationIdentifier(hostNode); } switch (hostNode.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); } break; - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: let expr = hostNode.expression; - if (expr.kind === 227 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { + if (expr.kind === 229 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { expr = expr.left; } switch (expr.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return expr.name; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: const arg = expr.argumentExpression; if (isIdentifier(arg)) { return arg; } } break; - case 217 /* ParenthesizedExpression */: { + case 219 /* ParenthesizedExpression */: { return getDeclarationIdentifier(hostNode.expression); } - case 257 /* LabeledStatement */: { + case 259 /* LabeledStatement */: { if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { return getDeclarationIdentifier(hostNode.statement); } @@ -11428,16 +11432,16 @@ function getNonAssignedNameOfDeclaration(declaration) { switch (declaration.kind) { case 79 /* Identifier */: return declaration; - case 356 /* JSDocPropertyTag */: - case 349 /* JSDocParameterTag */: { + case 359 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: { const { name } = declaration; - if (name.kind === 165 /* QualifiedName */) { + if (name.kind === 166 /* QualifiedName */) { return name.right; } break; } - case 213 /* CallExpression */: - case 227 /* BinaryExpression */: { + case 215 /* CallExpression */: + case 229 /* BinaryExpression */: { const expr2 = declaration; switch (getAssignmentDeclarationKind(expr2)) { case 1 /* ExportsProperty */: @@ -11453,15 +11457,15 @@ function getNonAssignedNameOfDeclaration(declaration) { return void 0; } } - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 348 /* JSDocEnumTag */: + case 351 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); - case 280 /* ExportAssignment */: { + case 283 /* ExportAssignment */: { const { expression } = declaration; return isIdentifier(expression) ? expression : void 0; } - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: const expr = declaration; if (isBindableStaticElementAccessExpression(expr)) { return expr.argumentExpression; @@ -11675,10 +11679,10 @@ function getAllJSDocTagsOfKind(node, kind) { 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 === 330 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); + return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 333 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); } function formatJSDocLink(link) { - const kind = link.kind === 333 /* JSDocLink */ ? "link" : link.kind === 334 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; + const kind = link.kind === 336 /* JSDocLink */ ? "link" : link.kind === 337 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; const name = link.name ? entityNameToString(link.name) : ""; const space = link.name && link.text.startsWith("://") ? "" : " "; return `{@${kind} ${name}${space}${link.text}}`; @@ -11688,7 +11692,7 @@ function getEffectiveTypeParameterDeclarations(node) { return emptyArray; } if (isJSDocTypeAlias(node)) { - Debug.assert(node.parent.kind === 329 /* JSDoc */); + Debug.assert(node.parent.kind === 332 /* JSDoc */); return flatMap(node.parent.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0); } if (node.typeParameters) { @@ -11716,7 +11720,7 @@ function isMemberName(node) { return node.kind === 79 /* Identifier */ || node.kind === 80 /* PrivateIdentifier */; } function isGetOrSetAccessorDeclaration(node) { - return node.kind === 178 /* SetAccessor */ || node.kind === 177 /* GetAccessor */; + return node.kind === 180 /* SetAccessor */ || node.kind === 179 /* GetAccessor */; } function isPropertyAccessChain(node) { return isPropertyAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); @@ -11729,7 +11733,7 @@ function isCallChain(node) { } function isOptionalChain(node) { const kind = node.kind; - return !!(node.flags & 32 /* OptionalChain */) && (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */ || kind === 213 /* CallExpression */ || kind === 236 /* NonNullExpression */); + return !!(node.flags & 32 /* OptionalChain */) && (kind === 213 /* PropertyAccessExpression */ || kind === 214 /* ElementAccessExpression */ || kind === 215 /* CallExpression */ || kind === 238 /* NonNullExpression */); } function isOptionalChainRoot(node) { return isOptionalChain(node) && !isNonNullExpression(node) && !!node.questionDotToken; @@ -11741,7 +11745,7 @@ function isOutermostOptionalChain(node) { return !isOptionalChain(node.parent) || isOptionalChainRoot(node.parent) || node !== node.parent.expression; } function isNullishCoalesce(node) { - return node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; + return node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; } function isConstTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "const" && !node.typeArguments; @@ -11753,34 +11757,34 @@ function isNonNullChain(node) { return isNonNullExpression(node) && !!(node.flags & 32 /* OptionalChain */); } function isBreakOrContinueStatement(node) { - return node.kind === 253 /* BreakStatement */ || node.kind === 252 /* ContinueStatement */; + return node.kind === 255 /* BreakStatement */ || node.kind === 254 /* ContinueStatement */; } function isNamedExportBindings(node) { - return node.kind === 283 /* NamespaceExport */ || node.kind === 282 /* NamedExports */; + return node.kind === 286 /* NamespaceExport */ || node.kind === 285 /* NamedExports */; } function isUnparsedTextLike(node) { switch (node.kind) { - case 311 /* UnparsedText */: - case 312 /* UnparsedInternalText */: + case 314 /* UnparsedText */: + case 315 /* UnparsedInternalText */: return true; default: return false; } } function isUnparsedNode(node) { - return isUnparsedTextLike(node) || node.kind === 309 /* UnparsedPrologue */ || node.kind === 313 /* UnparsedSyntheticReference */; + return isUnparsedTextLike(node) || node.kind === 312 /* UnparsedPrologue */ || node.kind === 316 /* UnparsedSyntheticReference */; } function isJSDocPropertyLikeTag(node) { - return node.kind === 356 /* JSDocPropertyTag */ || node.kind === 349 /* JSDocParameterTag */; + return node.kind === 359 /* JSDocPropertyTag */ || node.kind === 352 /* JSDocParameterTag */; } function isNode(node) { return isNodeKind(node.kind); } function isNodeKind(kind) { - return kind >= 165 /* FirstNode */; + return kind >= 166 /* FirstNode */; } function isTokenKind(kind) { - return kind >= 0 /* FirstToken */ && kind <= 164 /* LastToken */; + return kind >= 0 /* FirstToken */ && kind <= 165 /* LastToken */; } function isToken(n) { return isTokenKind(n.kind); @@ -11796,11 +11800,11 @@ function isLiteralExpression(node) { } function isLiteralExpressionOfObject(node) { switch (node.kind) { - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 211 /* ArrayLiteralExpression */: case 13 /* RegularExpressionLiteral */: - case 218 /* FunctionExpression */: - case 232 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 234 /* ClassExpression */: return true; } return false; @@ -11820,13 +11824,13 @@ function isImportOrExportSpecifier(node) { } function isTypeOnlyImportOrExportDeclaration(node) { switch (node.kind) { - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return node.parent.isTypeOnly; - case 276 /* ImportClause */: - case 274 /* ImportEqualsDeclaration */: + case 279 /* ImportClause */: + case 277 /* ImportEqualsDeclaration */: return node.isTypeOnly; default: return false; @@ -11882,15 +11886,15 @@ function isModifier(node) { } function isEntityName(node) { const kind = node.kind; - return kind === 165 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 166 /* 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 === 166 /* ComputedPropertyName */; + return kind === 79 /* Identifier */ || kind === 80 /* PrivateIdentifier */ || kind === 10 /* StringLiteral */ || kind === 8 /* NumericLiteral */ || kind === 167 /* ComputedPropertyName */; } function isBindingName(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 206 /* ObjectBindingPattern */ || kind === 207 /* ArrayBindingPattern */; + return kind === 79 /* Identifier */ || kind === 208 /* ObjectBindingPattern */ || kind === 209 /* ArrayBindingPattern */; } function isFunctionLike(node) { return !!node && isFunctionLikeKind(node.kind); @@ -11906,13 +11910,13 @@ function isBooleanLiteral(node) { } function isFunctionLikeDeclarationKind(kind) { switch (kind) { - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return true; default: return false; @@ -11920,14 +11924,14 @@ function isFunctionLikeDeclarationKind(kind) { } function isFunctionLikeKind(kind) { switch (kind) { - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 332 /* JSDocSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 184 /* FunctionType */: - case 326 /* JSDocFunctionType */: - case 185 /* ConstructorType */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 335 /* JSDocSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: + case 186 /* FunctionType */: + case 329 /* JSDocFunctionType */: + case 187 /* ConstructorType */: return true; default: return isFunctionLikeDeclarationKind(kind); @@ -11938,29 +11942,33 @@ function isFunctionOrModuleBlock(node) { } function isAnnotationElement(node) { const kind = node.kind; - return kind === 172 /* AnnotationPropertyDeclaration */; + return kind === 173 /* AnnotationPropertyDeclaration */; +} +function isOverloadElement(node) { + const kind = node.kind; + return kind === 174 /* OverloadPropertyDeclaration */; } function isClassElement(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 171 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 241 /* SemicolonClassElement */; + return kind === 178 /* Constructor */ || kind === 172 /* PropertyDeclaration */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 183 /* IndexSignature */ || kind === 177 /* ClassStaticBlockDeclaration */ || kind === 243 /* SemicolonClassElement */; } function isClassLike(node) { - return node && (node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */ || node.kind === 265 /* StructDeclaration */); + return node && (node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */ || node.kind === 267 /* StructDeclaration */); } function isStruct(node) { - return node && node.kind === 265 /* StructDeclaration */; + return node && node.kind === 267 /* StructDeclaration */; } function isAccessor(node) { - return node && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */); + return node && (node.kind === 179 /* GetAccessor */ || node.kind === 180 /* SetAccessor */); } function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); } function isMethodOrAccessor(node) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return true; default: return false; @@ -11968,10 +11976,10 @@ function isMethodOrAccessor(node) { } function isNamedClassElement(node) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 171 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 172 /* PropertyDeclaration */: return true; default: return false; @@ -11982,22 +11990,22 @@ function isModifierLike(node) { } function isTypeElement(node) { const kind = node.kind; - return kind === 180 /* ConstructSignature */ || kind === 179 /* CallSignature */ || kind === 170 /* PropertySignature */ || kind === 173 /* MethodSignature */ || kind === 181 /* IndexSignature */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 182 /* ConstructSignature */ || kind === 181 /* CallSignature */ || kind === 171 /* PropertySignature */ || kind === 175 /* MethodSignature */ || kind === 183 /* IndexSignature */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function isClassOrTypeElement(node) { return isTypeElement(node) || isClassElement(node); } function isObjectLiteralElementLike(node) { const kind = node.kind; - return kind === 305 /* PropertyAssignment */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 307 /* SpreadAssignment */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 308 /* PropertyAssignment */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 310 /* SpreadAssignment */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } function isFunctionOrConstructorTypeNode(node) { switch (node.kind) { - case 184 /* FunctionType */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: return true; } return false; @@ -12005,23 +12013,23 @@ function isFunctionOrConstructorTypeNode(node) { function isBindingPattern(node) { if (node) { const kind = node.kind; - return kind === 207 /* ArrayBindingPattern */ || kind === 206 /* ObjectBindingPattern */; + return kind === 209 /* ArrayBindingPattern */ || kind === 208 /* ObjectBindingPattern */; } return false; } function isAssignmentPattern(node) { const kind = node.kind; - return kind === 209 /* ArrayLiteralExpression */ || kind === 210 /* ObjectLiteralExpression */; + return kind === 211 /* ArrayLiteralExpression */ || kind === 212 /* ObjectLiteralExpression */; } function isArrayBindingElement(node) { const kind = node.kind; - return kind === 208 /* BindingElement */ || kind === 233 /* OmittedExpression */; + return kind === 210 /* BindingElement */ || kind === 235 /* OmittedExpression */; } function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: return true; } return false; @@ -12031,78 +12039,78 @@ function isBindingOrAssignmentPattern(node) { } function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 206 /* ObjectBindingPattern */: - case 210 /* ObjectLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 212 /* ObjectLiteralExpression */: return true; } return false; } function isObjectBindingOrAssignmentElement(node) { switch (node.kind) { - case 208 /* BindingElement */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 307 /* SpreadAssignment */: + case 210 /* BindingElement */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 310 /* SpreadAssignment */: return true; } return false; } function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 209 /* ArrayBindingPattern */: + case 211 /* ArrayLiteralExpression */: return true; } return false; } function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) { const kind = node.kind; - return kind === 211 /* PropertyAccessExpression */ || kind === 165 /* QualifiedName */ || kind === 205 /* ImportType */; + return kind === 213 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */ || kind === 207 /* ImportType */; } function isPropertyAccessOrQualifiedName(node) { const kind = node.kind; - return kind === 211 /* PropertyAccessExpression */ || kind === 165 /* QualifiedName */; + return kind === 213 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */; } function isCallLikeExpression(node) { switch (node.kind) { - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 169 /* Decorator */: - case 220 /* EtsComponentExpression */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 217 /* TaggedTemplateExpression */: + case 170 /* Decorator */: + case 222 /* EtsComponentExpression */: return true; default: return false; } } function isCallOrNewExpression(node) { - return node.kind === 213 /* CallExpression */ || node.kind === 214 /* NewExpression */; + return node.kind === 215 /* CallExpression */ || node.kind === 216 /* NewExpression */; } function isTemplateLiteral(node) { const kind = node.kind; - return kind === 229 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; + return kind === 231 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); } function isLeftHandSideExpressionKind(kind) { switch (kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 214 /* NewExpression */: - case 213 /* CallExpression */: - case 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: - case 215 /* TaggedTemplateExpression */: - case 209 /* ArrayLiteralExpression */: - case 217 /* ParenthesizedExpression */: - case 210 /* ObjectLiteralExpression */: - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 220 /* EtsComponentExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 216 /* NewExpression */: + case 215 /* CallExpression */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: + case 217 /* TaggedTemplateExpression */: + case 211 /* ArrayLiteralExpression */: + case 219 /* ParenthesizedExpression */: + case 212 /* ObjectLiteralExpression */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 222 /* EtsComponentExpression */: case 79 /* Identifier */: case 80 /* PrivateIdentifier */: case 13 /* RegularExpressionLiteral */: @@ -12110,15 +12118,15 @@ function isLeftHandSideExpressionKind(kind) { case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: case 96 /* FalseKeyword */: case 105 /* NullKeyword */: case 109 /* ThisKeyword */: case 111 /* TrueKeyword */: case 107 /* SuperKeyword */: - case 236 /* NonNullExpression */: - case 234 /* ExpressionWithTypeArguments */: - case 237 /* MetaProperty */: + case 238 /* NonNullExpression */: + case 236 /* ExpressionWithTypeArguments */: + case 239 /* MetaProperty */: case 101 /* ImportKeyword */: return true; default: @@ -12130,13 +12138,13 @@ function isUnaryExpression(node) { } function isUnaryExpressionKind(kind) { switch (kind) { - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: - case 221 /* DeleteExpression */: - case 222 /* TypeOfExpression */: - case 223 /* VoidExpression */: - case 224 /* AwaitExpression */: - case 216 /* TypeAssertionExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: + case 223 /* DeleteExpression */: + case 224 /* TypeOfExpression */: + case 225 /* VoidExpression */: + case 226 /* AwaitExpression */: + case 218 /* TypeAssertionExpression */: return true; default: return isLeftHandSideExpressionKind(kind); @@ -12144,9 +12152,9 @@ function isUnaryExpressionKind(kind) { } function isUnaryExpressionWithWrite(expr) { switch (expr.kind) { - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return true; - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return expr.operator === 45 /* PlusPlusToken */ || expr.operator === 46 /* MinusMinusToken */; default: return false; @@ -12157,16 +12165,16 @@ function isExpression(node) { } function isExpressionKind(kind) { switch (kind) { - case 228 /* ConditionalExpression */: - case 230 /* YieldExpression */: - case 219 /* ArrowFunction */: - case 227 /* BinaryExpression */: - case 231 /* SpreadElement */: - case 235 /* AsExpression */: - case 233 /* OmittedExpression */: - case 360 /* CommaListExpression */: - case 359 /* PartiallyEmittedExpression */: - case 239 /* SatisfiesExpression */: + case 230 /* ConditionalExpression */: + case 232 /* YieldExpression */: + case 221 /* ArrowFunction */: + case 229 /* BinaryExpression */: + case 233 /* SpreadElement */: + case 237 /* AsExpression */: + case 235 /* OmittedExpression */: + case 363 /* CommaListExpression */: + case 362 /* PartiallyEmittedExpression */: + case 241 /* SatisfiesExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -12174,20 +12182,20 @@ function isExpressionKind(kind) { } function isAssertionExpression(node) { const kind = node.kind; - return kind === 216 /* TypeAssertionExpression */ || kind === 235 /* AsExpression */; + return kind === 218 /* TypeAssertionExpression */ || kind === 237 /* AsExpression */; } function isNotEmittedOrPartiallyEmittedNode(node) { return isNotEmittedStatement(node) || isPartiallyEmittedExpression(node); } function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return true; - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -12246,7 +12254,7 @@ function allImportsAreAnnotations(imports, resolver) { }); } function isForInOrOfStatement(node) { - return node.kind === 250 /* ForInStatement */ || node.kind === 251 /* ForOfStatement */; + return node.kind === 252 /* ForInStatement */ || node.kind === 253 /* ForOfStatement */; } function isConciseBody(node) { return isBlock(node) || isExpression(node); @@ -12259,35 +12267,35 @@ function isForInitializer(node) { } function isModuleBody(node) { const kind = node.kind; - return kind === 271 /* ModuleBlock */ || kind === 270 /* ModuleDeclaration */ || kind === 79 /* Identifier */; + return kind === 274 /* ModuleBlock */ || kind === 273 /* ModuleDeclaration */ || kind === 79 /* Identifier */; } function isNamespaceBody(node) { const kind = node.kind; - return kind === 271 /* ModuleBlock */ || kind === 270 /* ModuleDeclaration */; + return kind === 274 /* ModuleBlock */ || kind === 273 /* ModuleDeclaration */; } function isJSDocNamespaceBody(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 270 /* ModuleDeclaration */; + return kind === 79 /* Identifier */ || kind === 273 /* ModuleDeclaration */; } function isNamedImportBindings(node) { const kind = node.kind; - return kind === 278 /* NamedImports */ || kind === 277 /* NamespaceImport */; + return kind === 281 /* NamedImports */ || kind === 280 /* NamespaceImport */; } function isModuleOrEnumDeclaration(node) { - return node.kind === 270 /* ModuleDeclaration */ || node.kind === 269 /* EnumDeclaration */; + return node.kind === 273 /* ModuleDeclaration */ || node.kind === 272 /* EnumDeclaration */; } function isDeclarationKind(kind) { - return kind === 219 /* ArrowFunction */ || kind === 208 /* BindingElement */ || kind === 264 /* ClassDeclaration */ || kind === 232 /* ClassExpression */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 265 /* StructDeclaration */ || kind === 266 /* AnnotationDeclaration */ || kind === 176 /* Constructor */ || kind === 269 /* EnumDeclaration */ || kind === 308 /* EnumMember */ || kind === 284 /* ExportSpecifier */ || kind === 263 /* FunctionDeclaration */ || kind === 218 /* FunctionExpression */ || kind === 177 /* GetAccessor */ || kind === 276 /* ImportClause */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 279 /* ImportSpecifier */ || kind === 267 /* InterfaceDeclaration */ || kind === 294 /* JsxAttribute */ || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 270 /* ModuleDeclaration */ || kind === 273 /* NamespaceExportDeclaration */ || kind === 277 /* NamespaceImport */ || kind === 283 /* NamespaceExport */ || kind === 168 /* Parameter */ || kind === 305 /* PropertyAssignment */ || kind === 171 /* PropertyDeclaration */ || kind === 172 /* AnnotationPropertyDeclaration */ || kind === 170 /* PropertySignature */ || kind === 178 /* SetAccessor */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 268 /* TypeAliasDeclaration */ || kind === 167 /* TypeParameter */ || kind === 261 /* VariableDeclaration */ || kind === 354 /* JSDocTypedefTag */ || kind === 347 /* JSDocCallbackTag */ || kind === 356 /* JSDocPropertyTag */; + return kind === 221 /* ArrowFunction */ || kind === 210 /* BindingElement */ || kind === 266 /* ClassDeclaration */ || kind === 234 /* ClassExpression */ || kind === 177 /* ClassStaticBlockDeclaration */ || kind === 267 /* StructDeclaration */ || kind === 268 /* AnnotationDeclaration */ || kind === 174 /* OverloadPropertyDeclaration */ || kind === 178 /* Constructor */ || kind === 272 /* EnumDeclaration */ || kind === 311 /* EnumMember */ || kind === 287 /* ExportSpecifier */ || kind === 265 /* FunctionDeclaration */ || kind === 220 /* FunctionExpression */ || kind === 179 /* GetAccessor */ || kind === 279 /* ImportClause */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 282 /* ImportSpecifier */ || kind === 270 /* InterfaceDeclaration */ || kind === 297 /* JsxAttribute */ || kind === 176 /* MethodDeclaration */ || kind === 175 /* MethodSignature */ || kind === 273 /* ModuleDeclaration */ || kind === 276 /* NamespaceExportDeclaration */ || kind === 280 /* NamespaceImport */ || kind === 286 /* NamespaceExport */ || kind === 169 /* Parameter */ || kind === 308 /* PropertyAssignment */ || kind === 172 /* PropertyDeclaration */ || kind === 173 /* AnnotationPropertyDeclaration */ || kind === 171 /* PropertySignature */ || kind === 180 /* SetAccessor */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 271 /* TypeAliasDeclaration */ || kind === 168 /* TypeParameter */ || kind === 263 /* VariableDeclaration */ || kind === 357 /* JSDocTypedefTag */ || kind === 350 /* JSDocCallbackTag */ || kind === 359 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { - return kind === 263 /* FunctionDeclaration */ || kind === 285 /* MissingDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 265 /* StructDeclaration */ || kind === 266 /* AnnotationDeclaration */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 269 /* EnumDeclaration */ || kind === 270 /* ModuleDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 281 /* ExportDeclaration */ || kind === 280 /* ExportAssignment */ || kind === 273 /* NamespaceExportDeclaration */; + return kind === 265 /* FunctionDeclaration */ || kind === 288 /* MissingDeclaration */ || kind === 266 /* ClassDeclaration */ || kind === 267 /* StructDeclaration */ || kind === 268 /* AnnotationDeclaration */ || kind === 269 /* OverloadDeclaration */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 272 /* EnumDeclaration */ || kind === 273 /* ModuleDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 284 /* ExportDeclaration */ || kind === 283 /* ExportAssignment */ || kind === 276 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 253 /* BreakStatement */ || kind === 252 /* ContinueStatement */ || kind === 260 /* DebuggerStatement */ || kind === 247 /* DoStatement */ || kind === 245 /* ExpressionStatement */ || kind === 243 /* EmptyStatement */ || kind === 250 /* ForInStatement */ || kind === 251 /* ForOfStatement */ || kind === 249 /* ForStatement */ || kind === 246 /* IfStatement */ || kind === 257 /* LabeledStatement */ || kind === 254 /* ReturnStatement */ || kind === 256 /* SwitchStatement */ || kind === 258 /* ThrowStatement */ || kind === 259 /* TryStatement */ || kind === 244 /* VariableStatement */ || kind === 248 /* WhileStatement */ || kind === 255 /* WithStatement */ || kind === 358 /* NotEmittedStatement */ || kind === 362 /* EndOfDeclarationMarker */ || kind === 361 /* MergeDeclarationMarker */; + return kind === 255 /* BreakStatement */ || kind === 254 /* ContinueStatement */ || kind === 262 /* DebuggerStatement */ || kind === 249 /* DoStatement */ || kind === 247 /* ExpressionStatement */ || kind === 245 /* EmptyStatement */ || kind === 252 /* ForInStatement */ || kind === 253 /* ForOfStatement */ || kind === 251 /* ForStatement */ || kind === 248 /* IfStatement */ || kind === 259 /* LabeledStatement */ || kind === 256 /* ReturnStatement */ || kind === 258 /* SwitchStatement */ || kind === 260 /* ThrowStatement */ || kind === 261 /* TryStatement */ || kind === 246 /* VariableStatement */ || kind === 250 /* WhileStatement */ || kind === 257 /* WithStatement */ || kind === 361 /* NotEmittedStatement */ || kind === 365 /* EndOfDeclarationMarker */ || kind === 364 /* MergeDeclarationMarker */; } function isDeclaration(node) { - if (node.kind === 167 /* TypeParameter */) { - return node.parent && node.parent.kind !== 353 /* JSDocTemplateTag */ || isInJSFile(node); + if (node.kind === 168 /* TypeParameter */) { + return node.parent && node.parent.kind !== 356 /* JSDocTemplateTag */ || isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -12302,10 +12310,10 @@ function isStatement(node) { return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); } function isBlockStatement(node) { - if (node.kind !== 242 /* Block */) + if (node.kind !== 244 /* Block */) return false; if (node.parent !== void 0) { - if (node.parent.kind === 259 /* TryStatement */ || node.parent.kind === 301 /* CatchClause */) { + if (node.parent.kind === 261 /* TryStatement */ || node.parent.kind === 304 /* CatchClause */) { return false; } } @@ -12313,50 +12321,50 @@ function isBlockStatement(node) { } function isStatementOrBlock(node) { const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 242 /* Block */; + return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 244 /* Block */; } function isModuleReference(node) { const kind = node.kind; - return kind === 286 /* ExternalModuleReference */ || kind === 165 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 289 /* ExternalModuleReference */ || kind === 166 /* QualifiedName */ || kind === 79 /* Identifier */; } function isJsxTagNameExpression(node) { const kind = node.kind; - return kind === 109 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 211 /* PropertyAccessExpression */; + return kind === 109 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 213 /* PropertyAccessExpression */; } function isJsxChild(node) { const kind = node.kind; - return kind === 287 /* JsxElement */ || kind === 297 /* JsxExpression */ || kind === 288 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 291 /* JsxFragment */; + return kind === 290 /* JsxElement */ || kind === 300 /* JsxExpression */ || kind === 291 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 294 /* JsxFragment */; } function isJsxAttributeLike(node) { const kind = node.kind; - return kind === 294 /* JsxAttribute */ || kind === 296 /* JsxSpreadAttribute */; + return kind === 297 /* JsxAttribute */ || kind === 299 /* JsxSpreadAttribute */; } function isStringLiteralOrJsxExpression(node) { const kind = node.kind; - return kind === 10 /* StringLiteral */ || kind === 297 /* JsxExpression */; + return kind === 10 /* StringLiteral */ || kind === 300 /* JsxExpression */; } function isJsxOpeningLikeElement(node) { const kind = node.kind; - return kind === 289 /* JsxOpeningElement */ || kind === 288 /* JsxSelfClosingElement */; + return kind === 292 /* JsxOpeningElement */ || kind === 291 /* JsxSelfClosingElement */; } function isCaseOrDefaultClause(node) { const kind = node.kind; - return kind === 298 /* CaseClause */ || kind === 299 /* DefaultClause */; + return kind === 301 /* CaseClause */ || kind === 302 /* DefaultClause */; } function isJSDocNode(node) { - return node.kind >= 318 /* FirstJSDocNode */ && node.kind <= 356 /* LastJSDocNode */; + return node.kind >= 321 /* FirstJSDocNode */ && node.kind <= 359 /* LastJSDocNode */; } function isJSDocCommentContainingNode(node) { - return node.kind === 329 /* JSDoc */ || node.kind === 328 /* JSDocNamepathType */ || node.kind === 330 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 332 /* JSDoc */ || node.kind === 331 /* JSDocNamepathType */ || node.kind === 333 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } function isJSDocTag(node) { - return node.kind >= 336 /* FirstJSDocTagNode */ && node.kind <= 356 /* LastJSDocTagNode */; + return node.kind >= 339 /* FirstJSDocTagNode */ && node.kind <= 359 /* LastJSDocTagNode */; } function isSetAccessor(node) { - return node.kind === 178 /* SetAccessor */; + return node.kind === 180 /* SetAccessor */; } function isGetAccessor(node) { - return node.kind === 177 /* GetAccessor */; + return node.kind === 179 /* GetAccessor */; } function hasJSDocNodes(node) { const { jsDoc } = node; @@ -12370,23 +12378,23 @@ function hasInitializer(node) { } function hasOnlyExpressionInitializer(node) { switch (node.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 305 /* PropertyAssignment */: - case 308 /* EnumMember */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 308 /* PropertyAssignment */: + case 311 /* EnumMember */: return true; default: return false; } } function isObjectLiteralElement(node) { - return node.kind === 294 /* JsxAttribute */ || node.kind === 296 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); + return node.kind === 297 /* JsxAttribute */ || node.kind === 299 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); } function isTypeReferenceType(node) { - return node.kind === 183 /* TypeReference */ || node.kind === 234 /* ExpressionWithTypeArguments */; + return node.kind === 185 /* TypeReference */ || node.kind === 236 /* ExpressionWithTypeArguments */; } var MAX_SMI_X86 = 1073741823; function guessIndentation(lines) { @@ -12414,7 +12422,7 @@ function isStringLiteralLike(node) { return node.kind === 10 /* StringLiteral */ || node.kind === 14 /* NoSubstitutionTemplateLiteral */; } function isJSDocLinkLike(node) { - return node.kind === 333 /* JSDocLink */ || node.kind === 334 /* JSDocLinkCode */ || node.kind === 335 /* JSDocLinkPlain */; + return node.kind === 336 /* JSDocLink */ || node.kind === 337 /* JSDocLinkCode */ || node.kind === 338 /* JSDocLinkPlain */; } function hasRestParameter(s) { const last2 = lastOrUndefined(s.parameters); @@ -12422,7 +12430,7 @@ function hasRestParameter(s) { } function isRestParameter(node) { const type = isJSDocParameterTag(node) ? node.typeExpression && node.typeExpression.type : node.type; - return node.dotDotDotToken !== void 0 || !!type && type.kind === 327 /* JSDocVariadicType */; + return node.dotDotDotToken !== void 0 || !!type && type.kind === 330 /* JSDocVariadicType */; } var _MemoryUtils = class { static tryGC() { @@ -12646,7 +12654,7 @@ function aggregateChildData(node) { } } function getSourceFileOfNode(node) { - while (node && node.kind !== 314 /* SourceFile */) { + while (node && node.kind !== 317 /* SourceFile */) { node = node.parent; } return node; @@ -12659,11 +12667,11 @@ function isPlainJsFile(file, checkJs) { } function isStatementWithLocals(node) { switch (node.kind) { - case 242 /* Block */: - case 272 /* CaseBlock */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 244 /* Block */: + case 275 /* CaseBlock */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: return true; } return false; @@ -12820,7 +12828,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) { if (includeJsDoc && hasJSDocNodes(node)) { return getTokenPosOfNode(node.jsDoc[0], sourceFile); } - if (node.kind === 357 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 360 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return node.virtual ? node.pos : skipTrivia( @@ -13023,7 +13031,7 @@ function isBlockOrCatchScoped(declaration) { } function isCatchClauseVariableDeclarationOrBindingElement(declaration) { const node = getRootDeclaration(declaration); - return node.kind === 261 /* VariableDeclaration */ && node.parent.kind === 301 /* CatchClause */; + return node.kind === 263 /* VariableDeclaration */ && node.parent.kind === 304 /* CatchClause */; } function isAmbientModule(node) { return isModuleDeclaration(node) && (node.name.kind === 10 /* StringLiteral */ || isGlobalScopeAugmentation(node)); @@ -13041,10 +13049,10 @@ function isShorthandAmbientModuleSymbol(moduleSymbol) { return isShorthandAmbientModule(moduleSymbol.valueDeclaration); } function isShorthandAmbientModule(node) { - return !!node && node.kind === 270 /* ModuleDeclaration */ && !node.body; + return !!node && node.kind === 273 /* ModuleDeclaration */ && !node.body; } function isBlockScopedContainerTopLevel(node) { - return node.kind === 314 /* SourceFile */ || node.kind === 270 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); + return node.kind === 317 /* SourceFile */ || node.kind === 273 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); } function isGlobalScopeAugmentation(module2) { return !!(module2.flags & 1024 /* GlobalAugmentation */); @@ -13054,9 +13062,9 @@ function isExternalModuleAugmentation(node) { } function isModuleAugmentationExternal(node) { switch (node.parent.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: return isExternalModule(node.parent); - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); } return false; @@ -13104,34 +13112,34 @@ function isAmbientPropertyDeclaration(node) { } function isBlockScope(node, parentNode) { switch (node.kind) { - case 314 /* SourceFile */: - case 272 /* CaseBlock */: - case 301 /* CatchClause */: - case 270 /* ModuleDeclaration */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 175 /* ClassStaticBlockDeclaration */: + case 317 /* SourceFile */: + case 275 /* CaseBlock */: + case 304 /* CatchClause */: + case 273 /* ModuleDeclaration */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return true; - case 242 /* Block */: + case 244 /* Block */: return !isFunctionLikeOrClassStaticBlockDeclaration(parentNode); } return false; } function isDeclarationWithTypeParameters(node) { switch (node.kind) { - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: - case 332 /* JSDocSignature */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: + case 335 /* JSDocSignature */: return true; default: assertType(node); @@ -13140,26 +13148,26 @@ function isDeclarationWithTypeParameters(node) { } function isDeclarationWithTypeParameterChildren(node) { switch (node.kind) { - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 326 /* JSDocFunctionType */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 353 /* JSDocTemplateTag */: - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 175 /* MethodSignature */: + case 183 /* IndexSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 329 /* JSDocFunctionType */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 356 /* JSDocTemplateTag */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return true; default: assertType(node); @@ -13168,8 +13176,8 @@ function isDeclarationWithTypeParameterChildren(node) { } function isAnyImportSyntax(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: return true; default: return false; @@ -13180,17 +13188,18 @@ function isAnyImportOrBareOrAccessedRequire(node) { } function isLateVisibilityPaintedStatement(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 244 /* VariableStatement */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 263 /* FunctionDeclaration */: - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 246 /* VariableStatement */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 265 /* FunctionDeclaration */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: return true; default: return false; @@ -13223,7 +13232,7 @@ function getNameFromIndexInfo(info) { return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : void 0; } function isComputedNonLiteralName(name) { - return name.kind === 166 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); + return name.kind === 167 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); } function tryGetTextOfPropertyName(name) { switch (name.kind) { @@ -13234,7 +13243,7 @@ function tryGetTextOfPropertyName(name) { case 8 /* NumericLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return void 0; @@ -13252,15 +13261,15 @@ function entityNameToString(name) { case 80 /* PrivateIdentifier */: case 79 /* Identifier */: return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { return Debug.assertNever(name.name); } - case 320 /* JSDocMemberName */: + case 323 /* JSDocMemberName */: return entityNameToString(name.left) + entityNameToString(name.right); default: return Debug.assertNever(name); @@ -13340,7 +13349,7 @@ function getSpanOfTokenAtPosition(sourceFile, pos) { } function getErrorSpanForArrowFunction(sourceFile, node) { const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 242 /* Block */) { + if (node.body && node.body.kind === 244 /* Block */) { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { @@ -13352,37 +13361,37 @@ function getErrorSpanForArrowFunction(sourceFile, node) { function getErrorSpanForNode(sourceFile, node) { let errorNode = node; switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: const pos2 = skipTrivia(sourceFile.text, 0, false); if (pos2 === sourceFile.text.length) { return createTextSpan(0, 0); } return getSpanOfTokenAtPosition(sourceFile, pos2); - case 261 /* VariableDeclaration */: - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 268 /* TypeAliasDeclaration */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: - case 277 /* NamespaceImport */: + case 263 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 271 /* TypeAliasDeclaration */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 171 /* PropertySignature */: + case 280 /* NamespaceImport */: errorNode = node.name; break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: const start = skipTrivia(sourceFile.text, node.pos); const end = node.statements.length > 0 ? node.statements[0].pos : node.end; return createTextSpanFromBounds(start, end); @@ -13424,10 +13433,10 @@ function isLet(node) { return !!(getCombinedNodeFlags(node) & 1 /* Let */); } function isSuperCall(n) { - return n.kind === 213 /* CallExpression */ && n.expression.kind === 107 /* SuperKeyword */; + return n.kind === 215 /* CallExpression */ && n.expression.kind === 107 /* SuperKeyword */; } function isImportCall(n) { - return n.kind === 213 /* CallExpression */ && n.expression.kind === 101 /* ImportKeyword */; + return n.kind === 215 /* CallExpression */ && n.expression.kind === 101 /* ImportKeyword */; } function isImportMeta(n) { return isMetaProperty(n) && n.keywordToken === 101 /* ImportKeyword */ && n.name.escapedText === "meta"; @@ -13436,7 +13445,7 @@ function isLiteralImportTypeNode(n) { return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); } function isPrologueDirective(node) { - return node.kind === 245 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; + return node.kind === 247 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; } function isCustomPrologue(node) { return !!(getEmitFlags(node) & 1048576 /* CustomPrologue */); @@ -13451,7 +13460,7 @@ function isHoistedVariableStatement(node) { return isCustomPrologue(node) && isVariableStatement(node) && every(node.declarationList.declarations, isHoistedVariable); } function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 168 /* Parameter */ || node.kind === 167 /* TypeParameter */ || node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */ || node.kind === 217 /* ParenthesizedExpression */ || node.kind === 261 /* VariableDeclaration */ || node.kind === 284 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); + const commentRanges = node.kind === 169 /* Parameter */ || node.kind === 168 /* TypeParameter */ || node.kind === 220 /* FunctionExpression */ || node.kind === 221 /* ArrowFunction */ || node.kind === 219 /* ParenthesizedExpression */ || node.kind === 263 /* VariableDeclaration */ || node.kind === 287 /* 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*/; @@ -13459,7 +13468,7 @@ var fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*/; var defaultLibReferenceRegEx = /^(\/\/\/\s*/; function isPartOfTypeNode(node) { - if (182 /* FirstTypeNode */ <= node.kind && node.kind <= 205 /* LastTypeNode */) { + if (184 /* FirstTypeNode */ <= node.kind && node.kind <= 207 /* LastTypeNode */) { return true; } switch (node.kind) { @@ -13475,65 +13484,65 @@ function isPartOfTypeNode(node) { case 145 /* NeverKeyword */: return true; case 115 /* VoidKeyword */: - return node.parent.kind !== 223 /* VoidExpression */; - case 234 /* ExpressionWithTypeArguments */: + return node.parent.kind !== 225 /* VoidExpression */; + case 236 /* ExpressionWithTypeArguments */: return isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 167 /* TypeParameter */: - return node.parent.kind === 200 /* MappedType */ || node.parent.kind === 195 /* InferType */; + case 168 /* TypeParameter */: + return node.parent.kind === 202 /* MappedType */ || node.parent.kind === 197 /* InferType */; case 79 /* Identifier */: - if (node.parent.kind === 165 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node) { node = node.parent; - } else if (node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node) { + } else if (node.parent.kind === 213 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } Debug.assert( - node.kind === 79 /* Identifier */ || node.kind === 165 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, + node.kind === 79 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 213 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'." ); - case 165 /* QualifiedName */: - case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: case 109 /* ThisKeyword */: { const { parent } = node; - if (parent.kind === 186 /* TypeQuery */) { + if (parent.kind === 188 /* TypeQuery */) { return false; } - if (parent.kind === 205 /* ImportType */) { + if (parent.kind === 207 /* ImportType */) { return !parent.isTypeOf; } - if (182 /* FirstTypeNode */ <= parent.kind && parent.kind <= 205 /* LastTypeNode */) { + if (184 /* FirstTypeNode */ <= parent.kind && parent.kind <= 207 /* LastTypeNode */) { return true; } switch (parent.kind) { - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return isHeritageClause(parent.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return node === parent.constraint; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return node === parent.constraint; - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 168 /* Parameter */: - case 261 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 169 /* Parameter */: + case 263 /* VariableDeclaration */: return node === parent.type; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return node === parent.type; - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: return node === parent.type; - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: return node === parent.type; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: return contains(parent.typeArguments, node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return false; } } @@ -13553,23 +13562,23 @@ function forEachReturnStatement(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return visitor(node); - case 272 /* CaseBlock */: - case 242 /* Block */: - case 246 /* IfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 255 /* WithStatement */: - case 256 /* SwitchStatement */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 257 /* LabeledStatement */: - case 259 /* TryStatement */: - case 301 /* CatchClause */: + case 275 /* CaseBlock */: + case 244 /* Block */: + case 248 /* IfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 257 /* WithStatement */: + case 258 /* SwitchStatement */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 259 /* LabeledStatement */: + case 261 /* TryStatement */: + case 304 /* CatchClause */: return forEachChild(node, traverse); } } @@ -13578,21 +13587,21 @@ function forEachYieldExpression(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: visitor(node); const operand = node.expression; if (operand) { traverse(operand); } return; - case 269 /* EnumDeclaration */: - case 267 /* InterfaceDeclaration */: - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 270 /* InterfaceDeclaration */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: return; default: if (isFunctionLike(node)) { - if (node.name && node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { traverse(node.name.expression); return; } @@ -13603,9 +13612,9 @@ function forEachYieldExpression(body, visitor) { } } function getRestParameterElementType(node) { - if (node && node.kind === 188 /* ArrayType */) { + if (node && node.kind === 190 /* ArrayType */) { return node.elementType; - } else if (node && node.kind === 183 /* TypeReference */) { + } else if (node && node.kind === 185 /* TypeReference */) { return singleOrUndefined(node.typeArguments); } else { return void 0; @@ -13613,27 +13622,27 @@ function getRestParameterElementType(node) { } function getMembersOfDeclaration(node) { switch (node.kind) { - case 267 /* InterfaceDeclaration */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 187 /* TypeLiteral */: + case 270 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 189 /* TypeLiteral */: return node.members; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return node.properties; } } function isVariableLike(node) { if (node) { switch (node.kind) { - case 208 /* BindingElement */: - case 308 /* EnumMember */: - case 168 /* Parameter */: - case 305 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 306 /* ShorthandPropertyAssignment */: - case 261 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 311 /* EnumMember */: + case 169 /* Parameter */: + case 308 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 309 /* ShorthandPropertyAssignment */: + case 263 /* VariableDeclaration */: return true; } } @@ -13643,7 +13652,7 @@ function isVariableLikeOrAccessor(node) { return isVariableLike(node) || isAccessor(node); } function isVariableDeclarationInVariableStatement(node) { - return node.parent.kind === 262 /* VariableDeclarationList */ && node.parent.parent.kind === 244 /* VariableStatement */; + return node.parent.kind === 264 /* VariableDeclarationList */ && node.parent.parent.kind === 246 /* VariableStatement */; } function isCommonJsExportedExpression(node) { if (!isInJSFile(node)) @@ -13660,13 +13669,13 @@ function isValidESSymbolDeclaration(node) { } function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return true; } return false; @@ -13676,20 +13685,20 @@ function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) { if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 257 /* LabeledStatement */) { + if (node.statement.kind !== 259 /* LabeledStatement */) { return node.statement; } node = node.statement; } } function isFunctionBlock(node) { - return node && node.kind === 242 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 244 /* Block */ && isFunctionLike(node.parent); } function isObjectLiteralMethod(node) { - return node && node.kind === 174 /* MethodDeclaration */ && node.parent.kind === 210 /* ObjectLiteralExpression */; + return node && node.kind === 176 /* MethodDeclaration */ && node.parent.kind === 212 /* ObjectLiteralExpression */; } function isObjectLiteralOrClassExpressionMethodOrAccessor(node) { - return (node.kind === 174 /* MethodDeclaration */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */) && (node.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.kind === 232 /* ClassExpression */); + return (node.kind === 176 /* MethodDeclaration */ || node.kind === 179 /* GetAccessor */ || node.kind === 180 /* SetAccessor */) && (node.parent.kind === 212 /* ObjectLiteralExpression */ || node.parent.kind === 234 /* ClassExpression */); } function isIdentifierTypePredicate(predicate) { return predicate && predicate.kind === 1 /* Identifier */; @@ -13699,7 +13708,7 @@ function isThisTypePredicate(predicate) { } function getPropertyAssignment(objectLiteral, key, key2) { return objectLiteral.properties.filter((property) => { - if (property.kind === 305 /* PropertyAssignment */) { + if (property.kind === 308 /* PropertyAssignment */) { const propName = tryGetTextOfPropertyName(property.name); return key === propName || !!key2 && key2 === propName; } @@ -13749,63 +13758,63 @@ function getContainingStruct(node) { return findAncestor(node.parent, isStruct); } function getThisContainer(node, includeArrowFunctions) { - Debug.assert(node.kind !== 314 /* SourceFile */); + Debug.assert(node.kind !== 317 /* SourceFile */); while (true) { node = node.parent; if (!node) { return Debug.fail(); } switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (isClassLike(node.parent.parent)) { return node; } node = node.parent; break; - case 169 /* Decorator */: - if (node.parent.kind === 168 /* Parameter */ && isClassElement(node.parent.parent)) { + case 170 /* Decorator */: + if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 270 /* ModuleDeclaration */: - case 175 /* ClassStaticBlockDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 269 /* EnumDeclaration */: - case 314 /* SourceFile */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 273 /* ModuleDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: + case 272 /* EnumDeclaration */: + case 317 /* SourceFile */: return node; } } } function isThisContainerOrFunctionBlock(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 171 /* PropertyDeclaration */: + case 221 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 172 /* PropertyDeclaration */: return true; - case 242 /* Block */: + case 244 /* Block */: switch (node.parent.kind) { - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return true; default: return false; @@ -13825,9 +13834,9 @@ function getNewTargetContainer(node) { const container = getThisContainer(node, false); if (container) { switch (container.kind) { - case 176 /* Constructor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 178 /* Constructor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return container; } } @@ -13840,26 +13849,26 @@ function getSuperContainer(node, stopOnFunctions) { return node; } switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: node = node.parent; break; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: if (!stopOnFunctions) { continue; } - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 177 /* ClassStaticBlockDeclaration */: return node; - case 169 /* Decorator */: - if (node.parent.kind === 168 /* Parameter */ && isClassElement(node.parent.parent)) { + case 170 /* Decorator */: + if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; @@ -13869,14 +13878,14 @@ function getSuperContainer(node, stopOnFunctions) { } } function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 218 /* FunctionExpression */ || func.kind === 219 /* ArrowFunction */) { + if (func.kind === 220 /* FunctionExpression */ || func.kind === 221 /* ArrowFunction */) { let prev = func; let parent = func.parent; - while (parent.kind === 217 /* ParenthesizedExpression */) { + while (parent.kind === 219 /* ParenthesizedExpression */) { prev = parent; parent = parent.parent; } - if (parent.kind === 213 /* CallExpression */ && parent.expression === prev) { + if (parent.kind === 215 /* CallExpression */ && parent.expression === prev) { return parent; } } @@ -13886,11 +13895,11 @@ function isSuperOrSuperProperty(node) { } function isSuperProperty(node) { const kind = node.kind; - return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 107 /* SuperKeyword */; + return (kind === 213 /* PropertyAccessExpression */ || kind === 214 /* ElementAccessExpression */) && node.expression.kind === 107 /* SuperKeyword */; } function isThisProperty(node) { const kind = node.kind; - return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 109 /* ThisKeyword */; + return (kind === 213 /* PropertyAccessExpression */ || kind === 214 /* ElementAccessExpression */) && node.expression.kind === 109 /* ThisKeyword */; } function isThisInitializedDeclaration(node) { var _a2; @@ -13901,22 +13910,22 @@ function isThisInitializedObjectBindingExpression(node) { } function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return node.typeName; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return isEntityNameExpression(node.expression) ? node.expression : void 0; case 79 /* Identifier */: - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return node; } return void 0; } function getInvokedExpression(node) { switch (node.kind) { - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return node.tag; - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return node.tagName; default: return node.expression; @@ -13927,20 +13936,20 @@ function nodeCanBeDecorated(node, parent, grandparent, compilerOptions) { return false; } switch (node.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: return true; - case 171 /* PropertyDeclaration */: - return parent.kind === 264 /* ClassDeclaration */ || parent.kind === 265 /* StructDeclaration */; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - return node.body !== void 0 && (parent.kind === 264 /* ClassDeclaration */ || parent.kind === 265 /* StructDeclaration */); - case 168 /* Parameter */: - return parent.body !== void 0 && (parent.kind === 176 /* Constructor */ || parent.kind === 174 /* MethodDeclaration */ || parent.kind === 178 /* SetAccessor */) && (grandparent.kind === 264 /* ClassDeclaration */ || grandparent.kind === 265 /* StructDeclaration */); - case 263 /* FunctionDeclaration */: + case 172 /* PropertyDeclaration */: + return parent.kind === 266 /* ClassDeclaration */ || parent.kind === 267 /* StructDeclaration */; + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: + return node.body !== void 0 && (parent.kind === 266 /* ClassDeclaration */ || parent.kind === 267 /* StructDeclaration */); + case 169 /* Parameter */: + return parent.body !== void 0 && (parent.kind === 178 /* Constructor */ || parent.kind === 176 /* MethodDeclaration */ || parent.kind === 180 /* SetAccessor */) && (grandparent.kind === 266 /* ClassDeclaration */ || grandparent.kind === 267 /* StructDeclaration */); + case 265 /* FunctionDeclaration */: return isArkTsDecorator(node, compilerOptions) || isSendableFunctionOrType(node); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return isSendableFunctionOrType(node); } return false; @@ -13953,13 +13962,13 @@ function nodeOrChildIsDecorated(node, parent, grandparent) { } function childIsDecorated(node, parent) { switch (node.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(m, node, parent)); - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(m, node, parent)); - case 174 /* MethodDeclaration */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: + case 176 /* MethodDeclaration */: + case 180 /* SetAccessor */: + case 178 /* Constructor */: return some(node.parameters, (p) => nodeIsDecorated(p, node, parent)); default: return false; @@ -13973,7 +13982,7 @@ function classOrConstructorParameterIsDecorated(node) { } function isJSXTagName(node) { const { parent } = node; - if (parent.kind === 289 /* JsxOpeningElement */ || parent.kind === 288 /* JsxSelfClosingElement */ || parent.kind === 290 /* JsxClosingElement */) { + if (parent.kind === 292 /* JsxOpeningElement */ || parent.kind === 291 /* JsxSelfClosingElement */ || parent.kind === 293 /* JsxClosingElement */) { return parent.tagName === node; } return false; @@ -13985,55 +13994,55 @@ function isExpressionNode(node) { case 111 /* TrueKeyword */: case 96 /* FalseKeyword */: case 13 /* RegularExpressionLiteral */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 211 /* PropertyAccessExpression */: - case 220 /* EtsComponentExpression */: - case 212 /* ElementAccessExpression */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 235 /* AsExpression */: - case 216 /* TypeAssertionExpression */: - case 239 /* SatisfiesExpression */: - case 236 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: - case 218 /* FunctionExpression */: - case 232 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 223 /* VoidExpression */: - case 221 /* DeleteExpression */: - case 222 /* TypeOfExpression */: - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: - case 227 /* BinaryExpression */: - case 228 /* ConditionalExpression */: - case 231 /* SpreadElement */: - case 229 /* TemplateExpression */: - case 233 /* OmittedExpression */: - case 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: - case 230 /* YieldExpression */: - case 224 /* AwaitExpression */: - case 237 /* MetaProperty */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 213 /* PropertyAccessExpression */: + case 222 /* EtsComponentExpression */: + case 214 /* ElementAccessExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 217 /* TaggedTemplateExpression */: + case 237 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 241 /* SatisfiesExpression */: + case 238 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 220 /* FunctionExpression */: + case 234 /* ClassExpression */: + case 221 /* ArrowFunction */: + case 225 /* VoidExpression */: + case 223 /* DeleteExpression */: + case 224 /* TypeOfExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: + case 229 /* BinaryExpression */: + case 230 /* ConditionalExpression */: + case 233 /* SpreadElement */: + case 231 /* TemplateExpression */: + case 235 /* OmittedExpression */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: + case 232 /* YieldExpression */: + case 226 /* AwaitExpression */: + case 239 /* MetaProperty */: return true; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return !isHeritageClause(node.parent); - case 165 /* QualifiedName */: - while (node.parent.kind === 165 /* QualifiedName */) { + case 166 /* QualifiedName */: + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); - case 320 /* JSDocMemberName */: + return node.parent.kind === 188 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + case 323 /* JSDocMemberName */: while (isJSDocMemberName(node.parent)) { node = node.parent; } - return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + return node.parent.kind === 188 /* 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 === 102 /* InKeyword */; case 79 /* Identifier */: - if (node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { + if (node.parent.kind === 188 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { return true; } case 8 /* NumericLiteral */: @@ -14049,64 +14058,64 @@ function isExpressionNode(node) { function isInExpressionContext(node) { const { parent } = node; switch (parent.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 308 /* EnumMember */: - case 305 /* PropertyAssignment */: - case 208 /* BindingElement */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 311 /* EnumMember */: + case 308 /* PropertyAssignment */: + case 210 /* BindingElement */: return parent.initializer === node; - case 245 /* ExpressionStatement */: - case 246 /* IfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 254 /* ReturnStatement */: - case 255 /* WithStatement */: - case 256 /* SwitchStatement */: - case 298 /* CaseClause */: - case 258 /* ThrowStatement */: + case 247 /* ExpressionStatement */: + case 248 /* IfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 256 /* ReturnStatement */: + case 257 /* WithStatement */: + case 258 /* SwitchStatement */: + case 301 /* CaseClause */: + case 260 /* ThrowStatement */: return parent.expression === node; - case 249 /* ForStatement */: + case 251 /* ForStatement */: const forStatement = parent; - return forStatement.initializer === node && forStatement.initializer.kind !== 262 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + return forStatement.initializer === node && forStatement.initializer.kind !== 264 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: const forInStatement = parent; - return forInStatement.initializer === node && forInStatement.initializer.kind !== 262 /* VariableDeclarationList */ || forInStatement.expression === node; - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + return forInStatement.initializer === node && forInStatement.initializer.kind !== 264 /* VariableDeclarationList */ || forInStatement.expression === node; + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: return node === parent.expression; - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return node === parent.expression; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return node === parent.expression; - case 169 /* Decorator */: - case 297 /* JsxExpression */: - case 296 /* JsxSpreadAttribute */: - case 307 /* SpreadAssignment */: + case 170 /* Decorator */: + case 300 /* JsxExpression */: + case 299 /* JsxSpreadAttribute */: + case 310 /* SpreadAssignment */: return true; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return parent.expression === node && !isPartOfTypeNode(parent); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return parent.objectAssignmentInitializer === node; - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return node === parent.expression; default: return isExpressionNode(parent); } } function isPartOfTypeQuery(node) { - while (node.kind === 165 /* QualifiedName */ || node.kind === 79 /* Identifier */) { + while (node.kind === 166 /* QualifiedName */ || node.kind === 79 /* Identifier */) { node = node.parent; } - return node.kind === 186 /* TypeQuery */; + return node.kind === 188 /* TypeQuery */; } function isNamespaceReexportDeclaration(node) { return isNamespaceExport(node) && !!node.parent.moduleSpecifier; } function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 274 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 286 /* ExternalModuleReference */; + return node.kind === 277 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 289 /* ExternalModuleReference */; } function getExternalModuleImportEqualsDeclarationExpression(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node)); @@ -14116,7 +14125,7 @@ function getExternalModuleRequireArgument(node) { return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0]; } function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 274 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 286 /* ExternalModuleReference */; + return node.kind === 277 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 289 /* ExternalModuleReference */; } function isSourceFileJS(file) { return isInJSFile(file); @@ -14175,7 +14184,7 @@ function isInStruct(node) { return !!container && isStruct(container); } function isRequireCall(callExpression, requireStringLiteralLikeArgument) { - if (callExpression.kind !== 213 /* CallExpression */) { + if (callExpression.kind !== 215 /* CallExpression */) { return false; } const { expression, arguments: args } = callExpression; @@ -14237,9 +14246,9 @@ function getAssignedExpandoInitializer(node) { function getExpandoInitializer(initializer, isPrototypeAssignment) { if (isCallExpression(initializer)) { const e = skipParentheses(initializer.expression); - return e.kind === 218 /* FunctionExpression */ || e.kind === 219 /* ArrowFunction */ ? initializer : void 0; + return e.kind === 220 /* FunctionExpression */ || e.kind === 221 /* ArrowFunction */ ? initializer : void 0; } - if (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 232 /* ClassExpression */ || initializer.kind === 219 /* ArrowFunction */) { + if (initializer.kind === 220 /* FunctionExpression */ || initializer.kind === 234 /* ClassExpression */ || initializer.kind === 221 /* ArrowFunction */) { return initializer; } if (isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAssignment)) { @@ -14401,7 +14410,7 @@ function isPrototypePropertyAssignment(node) { return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 3 /* PrototypeProperty */; } function isSpecialPropertyDeclaration(expr) { - return isInJSFile(expr) && expr.parent && expr.parent.kind === 245 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); + return isInJSFile(expr) && expr.parent && expr.parent.kind === 247 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); } function setValueDeclaration(symbol, node) { const { valueDeclaration } = symbol; @@ -14414,16 +14423,16 @@ function isFunctionSymbol(symbol) { return false; } const decl = symbol.valueDeclaration; - return decl.kind === 263 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); + return decl.kind === 265 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); } function tryGetModuleSpecifierFromDeclaration(node) { var _a2, _b; switch (node.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return (_a2 = findAncestor(node.initializer, (node2) => isRequireCall(node2, true))) == null ? void 0 : _a2.arguments[0]; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return tryCast(node.moduleSpecifier, isStringLiteralLike); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); default: Debug.assertNever(node); @@ -14434,14 +14443,14 @@ function importFromModuleSpecifier(node) { } function tryGetImportFromModuleSpecifier(node) { switch (node.parent.kind) { - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: return node.parent; - case 286 /* ExternalModuleReference */: + case 289 /* ExternalModuleReference */: return node.parent.parent; - case 213 /* CallExpression */: + case 215 /* CallExpression */: return isImportCall(node.parent) || isRequireCall(node.parent, false) ? node.parent : void 0; - case 201 /* LiteralType */: + case 203 /* LiteralType */: Debug.assert(isStringLiteral(node)); return tryCast(node.parent.parent, isImportTypeNode); default: @@ -14450,16 +14459,16 @@ function tryGetImportFromModuleSpecifier(node) { } function getExternalModuleName(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: return node.moduleSpecifier; - case 274 /* ImportEqualsDeclaration */: - return node.moduleReference.kind === 286 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; - case 205 /* ImportType */: + case 277 /* ImportEqualsDeclaration */: + return node.moduleReference.kind === 289 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; + case 207 /* ImportType */: return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; - case 213 /* CallExpression */: + case 215 /* CallExpression */: return node.arguments[0]; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return node.name.kind === 10 /* StringLiteral */ ? node.name : void 0; default: return Debug.assertNever(node); @@ -14467,18 +14476,18 @@ function getExternalModuleName(node) { } function getNamespaceDeclarationNode(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return node; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return node.exportClause && tryCast(node.exportClause, isNamespaceExport); default: return Debug.assertNever(node); } } function isDefaultImport(node) { - return node.kind === 275 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; + return node.kind === 278 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } function forEachImportClauseDeclaration(node, action) { if (node.name) { @@ -14495,13 +14504,13 @@ function forEachImportClauseDeclaration(node, action) { function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 168 /* Parameter */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 306 /* ShorthandPropertyAssignment */: - case 305 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 169 /* Parameter */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 309 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return node.questionToken !== void 0; } } @@ -14513,7 +14522,7 @@ function isJSDocConstructSignature(node) { return !!name && name.escapedText === "new"; } function isJSDocTypeAlias(node) { - return node.kind === 354 /* JSDocTypedefTag */ || node.kind === 347 /* JSDocCallbackTag */ || node.kind === 348 /* JSDocEnumTag */; + return node.kind === 357 /* JSDocTypedefTag */ || node.kind === 350 /* JSDocCallbackTag */ || node.kind === 351 /* JSDocEnumTag */; } function isTypeAlias(node) { return isJSDocTypeAlias(node) || isTypeAliasDeclaration(node); @@ -14526,14 +14535,14 @@ function getSourceOfDefaultedAssignment(node) { } function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: const v = getSingleVariableOfVariableStatement(node); return v && v.initializer; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer; - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return node.initializer; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return node.initializer; } } @@ -14541,7 +14550,7 @@ function getSingleVariableOfVariableStatement(node) { return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; } function getNestedModuleDeclaration(node) { - return isModuleDeclaration(node) && node.body && node.body.kind === 270 /* ModuleDeclaration */ ? node.body : void 0; + return isModuleDeclaration(node) && node.body && node.body.kind === 273 /* ModuleDeclaration */ ? node.body : void 0; } function getJSDocCommentsAndTags(hostNode, noCache) { let result; @@ -14553,11 +14562,11 @@ function getJSDocCommentsAndTags(hostNode, noCache) { if (hasJSDocNodes(node)) { result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc))); } - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node)); break; } - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node)); break; } @@ -14577,7 +14586,7 @@ function ownsJSDocTag(hostNode, tag) { } function getNextJSDocCommentLocation(node) { const parent = node.parent; - if (parent.kind === 305 /* PropertyAssignment */ || parent.kind === 280 /* ExportAssignment */ || parent.kind === 171 /* PropertyDeclaration */ || parent.kind === 245 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent.kind === 254 /* ReturnStatement */ || getNestedModuleDeclaration(parent) || isBinaryExpression(node) && node.operatorToken.kind === 63 /* EqualsToken */) { + if (parent.kind === 308 /* PropertyAssignment */ || parent.kind === 283 /* ExportAssignment */ || parent.kind === 172 /* PropertyDeclaration */ || parent.kind === 247 /* ExpressionStatement */ && node.kind === 213 /* PropertyAccessExpression */ || parent.kind === 256 /* 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; @@ -14653,32 +14662,32 @@ function getAssignmentTargetKind(node) { let parent = node.parent; while (true) { switch (parent.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const binaryOperator = parent.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent.left === node ? binaryOperator === 63 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: const unaryOperator = parent.operator; return unaryOperator === 45 /* PlusPlusToken */ || unaryOperator === 46 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: return parent.initializer === node ? 1 /* Definite */ : 0 /* None */; - case 217 /* ParenthesizedExpression */: - case 209 /* ArrayLiteralExpression */: - case 231 /* SpreadElement */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 211 /* ArrayLiteralExpression */: + case 233 /* SpreadElement */: + case 238 /* NonNullExpression */: node = parent; break; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: node = parent.parent; break; - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: if (parent.name !== node) { return 0 /* None */; } node = parent.parent; break; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (parent.name === node) { return 0 /* None */; } @@ -14695,22 +14704,22 @@ function isAssignmentTarget(node) { } function isNodeWithPossibleHoistedDeclaration(node) { switch (node.kind) { - case 242 /* Block */: - case 244 /* VariableStatement */: - case 255 /* WithStatement */: - case 246 /* IfStatement */: - case 256 /* SwitchStatement */: - case 272 /* CaseBlock */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 257 /* LabeledStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 259 /* TryStatement */: - case 301 /* CatchClause */: + case 244 /* Block */: + case 246 /* VariableStatement */: + case 257 /* WithStatement */: + case 248 /* IfStatement */: + case 258 /* SwitchStatement */: + case 275 /* CaseBlock */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 259 /* LabeledStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 261 /* TryStatement */: + case 304 /* CatchClause */: return true; } return false; @@ -14725,14 +14734,14 @@ function walkUp(node, kind) { return node; } function walkUpParenthesizedTypes(node) { - return walkUp(node, 196 /* ParenthesizedType */); + return walkUp(node, 198 /* ParenthesizedType */); } function walkUpParenthesizedExpressions(node) { - return walkUp(node, 217 /* ParenthesizedExpression */); + return walkUp(node, 219 /* ParenthesizedExpression */); } function walkUpParenthesizedTypesAndGetParentAndChild(node) { let child; - while (node && node.kind === 196 /* ParenthesizedType */) { + while (node && node.kind === 198 /* ParenthesizedType */) { child = node; node = node.parent; } @@ -14748,11 +14757,11 @@ function skipParentheses(node, excludeJSDocTypeAssertions) { return skipOuterExpressions(node, flags); } function isDeleteTarget(node) { - if (node.kind !== 211 /* PropertyAccessExpression */ && node.kind !== 212 /* ElementAccessExpression */) { + if (node.kind !== 213 /* PropertyAccessExpression */ && node.kind !== 214 /* ElementAccessExpression */) { return false; } node = walkUpParenthesizedExpressions(node.parent); - return node && node.kind === 221 /* DeleteExpression */; + return node && node.kind === 223 /* DeleteExpression */; } function isNodeDescendantOf(node, ancestor) { while (node) { @@ -14790,56 +14799,56 @@ function getDeclarationFromName(name) { } } function isLiteralComputedPropertyDeclarationName(node) { - return isStringOrNumericLiteralLike(node) && node.parent.kind === 166 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); + return isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); } function isIdentifierName(node) { const parent = node.parent; switch (parent.kind) { - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 308 /* EnumMember */: - case 305 /* PropertyAssignment */: - case 211 /* PropertyAccessExpression */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 311 /* EnumMember */: + case 308 /* PropertyAssignment */: + case 213 /* PropertyAccessExpression */: return parent.name === node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return parent.right === node; - case 208 /* BindingElement */: - case 279 /* ImportSpecifier */: + case 210 /* BindingElement */: + case 282 /* ImportSpecifier */: return parent.propertyName === node; - case 284 /* ExportSpecifier */: - case 294 /* JsxAttribute */: - case 288 /* JsxSelfClosingElement */: - case 289 /* JsxOpeningElement */: - case 290 /* JsxClosingElement */: + case 287 /* ExportSpecifier */: + case 297 /* JsxAttribute */: + case 291 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 293 /* JsxClosingElement */: return true; } return false; } function isAliasSymbolDeclaration(node) { - if (node.kind === 274 /* ImportEqualsDeclaration */ || node.kind === 273 /* NamespaceExportDeclaration */ || node.kind === 276 /* ImportClause */ && !!node.name || node.kind === 277 /* NamespaceImport */ || node.kind === 283 /* NamespaceExport */ || node.kind === 279 /* ImportSpecifier */ || node.kind === 284 /* ExportSpecifier */ || node.kind === 280 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { + if (node.kind === 277 /* ImportEqualsDeclaration */ || node.kind === 276 /* NamespaceExportDeclaration */ || node.kind === 279 /* ImportClause */ && !!node.name || node.kind === 280 /* NamespaceImport */ || node.kind === 286 /* NamespaceExport */ || node.kind === 282 /* ImportSpecifier */ || node.kind === 287 /* ExportSpecifier */ || node.kind === 283 /* 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 276 /* ImportClause */: - case 279 /* ImportSpecifier */: - case 277 /* NamespaceImport */: - case 284 /* ExportSpecifier */: - case 280 /* ExportAssignment */: - case 274 /* ImportEqualsDeclaration */: - case 283 /* NamespaceExport */: + case 279 /* ImportClause */: + case 282 /* ImportSpecifier */: + case 280 /* NamespaceImport */: + case 287 /* ExportSpecifier */: + case 283 /* ExportAssignment */: + case 277 /* ImportEqualsDeclaration */: + case 286 /* NamespaceExport */: return node.parent; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.parent; - } while (node.parent.kind === 165 /* QualifiedName */); + } while (node.parent.kind === 166 /* QualifiedName */); return getAliasDeclarationFromName(node); } } @@ -14854,7 +14863,7 @@ function getExportAssignmentExpression(node) { return isExportAssignment(node) ? node.expression : node.right; } function getPropertyAssignmentAliasLikeExpression(node) { - return node.kind === 306 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 305 /* PropertyAssignment */ ? node.initializer : node.parent.right; + return node.kind === 309 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 308 /* PropertyAssignment */ ? node.initializer : node.parent.right; } function getEffectiveBaseTypeNode(node) { const baseType = getClassExtendsHeritageElement(node); @@ -14939,10 +14948,10 @@ function getVirtualEtsComponent(node) { return void 0; } function isKeyword(token) { - return 81 /* FirstKeyword */ <= token && token <= 164 /* LastKeyword */; + return 81 /* FirstKeyword */ <= token && token <= 165 /* LastKeyword */; } function isContextualKeyword(token) { - return 127 /* FirstContextualKeyword */ <= token && token <= 164 /* LastContextualKeyword */; + return 127 /* FirstContextualKeyword */ <= token && token <= 165 /* LastContextualKeyword */; } function isNonContextualKeyword(token) { return isKeyword(token) && !isContextualKeyword(token); @@ -14978,13 +14987,13 @@ function getFunctionFlags(node) { } let flags = 0 /* Normal */; switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: if (node.asteriskToken) { flags |= 1 /* Generator */; } - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: if (hasSyntacticModifier(node, 512 /* Async */)) { flags |= 2 /* Async */; } @@ -14997,10 +15006,10 @@ function getFunctionFlags(node) { } function isAsyncFunction(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */); } return false; @@ -15016,7 +15025,7 @@ function hasDynamicName(declaration) { return !!name && isDynamicName(name); } function isDynamicName(name) { - if (!(name.kind === 166 /* ComputedPropertyName */ || name.kind === 212 /* ElementAccessExpression */)) { + if (!(name.kind === 167 /* ComputedPropertyName */ || name.kind === 214 /* ElementAccessExpression */)) { return false; } const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; @@ -15030,7 +15039,7 @@ function getPropertyNameForPropertyNameNode(name) { case 10 /* StringLiteral */: case 8 /* NumericLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -15082,17 +15091,17 @@ function isPushOrUnshiftIdentifier(node) { } function isParameterDeclaration(node) { const root = getRootDeclaration(node); - return root.kind === 168 /* Parameter */; + return root.kind === 169 /* Parameter */; } function getRootDeclaration(node) { - while (node.kind === 208 /* BindingElement */) { + while (node.kind === 210 /* BindingElement */) { node = node.parent.parent; } return node; } function nodeStartsNewLexicalEnvironment(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 218 /* FunctionExpression */ || kind === 263 /* FunctionDeclaration */ || kind === 219 /* ArrowFunction */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 270 /* ModuleDeclaration */ || kind === 314 /* SourceFile */; + return kind === 178 /* Constructor */ || kind === 220 /* FunctionExpression */ || kind === 265 /* FunctionDeclaration */ || kind === 221 /* ArrowFunction */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 273 /* ModuleDeclaration */ || kind === 317 /* SourceFile */; } function nodeIsSynthesized(range) { return positionIsSynthesized(range.pos) || positionIsSynthesized(range.end); @@ -15107,22 +15116,22 @@ var Associativity = /* @__PURE__ */ ((Associativity2) => { })(Associativity || {}); function getExpressionAssociativity(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 216 /* NewExpression */ && expression.arguments !== void 0; return getOperatorAssociativity(expression.kind, operator, hasArguments); } function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 214 /* NewExpression */: + case 216 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 225 /* PrefixUnaryExpression */: - case 222 /* TypeOfExpression */: - case 223 /* VoidExpression */: - case 221 /* DeleteExpression */: - case 224 /* AwaitExpression */: - case 228 /* ConditionalExpression */: - case 230 /* YieldExpression */: + case 227 /* PrefixUnaryExpression */: + case 224 /* TypeOfExpression */: + case 225 /* VoidExpression */: + case 223 /* DeleteExpression */: + case 226 /* AwaitExpression */: + case 230 /* ConditionalExpression */: + case 232 /* YieldExpression */: return 1 /* Right */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (operator) { case 42 /* AsteriskAsteriskToken */: case 63 /* EqualsToken */: @@ -15148,13 +15157,13 @@ function getOperatorAssociativity(kind, operator, hasArguments) { } function getExpressionPrecedence(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 216 /* NewExpression */ && expression.arguments !== void 0; return getOperatorPrecedence(expression.kind, operator, hasArguments); } function getOperator(expression) { - if (expression.kind === 227 /* BinaryExpression */) { + if (expression.kind === 229 /* BinaryExpression */) { return expression.operatorToken.kind; - } else if (expression.kind === 225 /* PrefixUnaryExpression */ || expression.kind === 226 /* PostfixUnaryExpression */) { + } else if (expression.kind === 227 /* PrefixUnaryExpression */ || expression.kind === 228 /* PostfixUnaryExpression */) { return expression.operator; } else { return expression.kind; @@ -15190,15 +15199,15 @@ var OperatorPrecedence = /* @__PURE__ */ ((OperatorPrecedence2) => { })(OperatorPrecedence || {}); function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return 0 /* Comma */; - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return 1 /* Spread */; - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return 2 /* Yield */; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return 4 /* Conditional */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (operatorKind) { case 27 /* CommaToken */: return 0 /* Comma */; @@ -15222,27 +15231,27 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { default: return getBinaryOperatorPrecedence(operatorKind); } - case 216 /* TypeAssertionExpression */: - case 236 /* NonNullExpression */: - case 225 /* PrefixUnaryExpression */: - case 222 /* TypeOfExpression */: - case 223 /* VoidExpression */: - case 221 /* DeleteExpression */: - case 224 /* AwaitExpression */: + case 218 /* TypeAssertionExpression */: + case 238 /* NonNullExpression */: + case 227 /* PrefixUnaryExpression */: + case 224 /* TypeOfExpression */: + case 225 /* VoidExpression */: + case 223 /* DeleteExpression */: + case 226 /* AwaitExpression */: return 16 /* Unary */; - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return 17 /* Update */; - case 213 /* CallExpression */: + case 215 /* CallExpression */: return 18 /* LeftHandSide */; - case 214 /* NewExpression */: + case 216 /* NewExpression */: return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */; - case 215 /* TaggedTemplateExpression */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 237 /* MetaProperty */: + case 217 /* TaggedTemplateExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 239 /* MetaProperty */: return 19 /* Member */; - case 235 /* AsExpression */: - case 239 /* SatisfiesExpression */: + case 237 /* AsExpression */: + case 241 /* SatisfiesExpression */: return 11 /* Relational */; case 109 /* ThisKeyword */: case 107 /* SuperKeyword */: @@ -15254,19 +15263,19 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 232 /* ClassExpression */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 234 /* ClassExpression */: case 13 /* RegularExpressionLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 229 /* TemplateExpression */: - case 217 /* ParenthesizedExpression */: - case 233 /* OmittedExpression */: - case 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: + case 231 /* TemplateExpression */: + case 219 /* ParenthesizedExpression */: + case 235 /* OmittedExpression */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: return 20 /* Primary */; default: return -1 /* Invalid */; @@ -15319,7 +15328,7 @@ function getBinaryOperatorPrecedence(kind) { function getSemanticJsxChildren(children) { return filter(children, (i) => { switch (i.kind) { - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return !!i.expression; case 11 /* JsxText */: return !i.containsOnlyTriviaWhiteSpaces; @@ -15710,7 +15719,7 @@ function isThisInTypeQuery(node) { while (isQualifiedName(node.parent) && node.parent.left === node) { node = node.parent; } - return node.parent.kind === 186 /* TypeQuery */; + return node.parent.kind === 188 /* TypeQuery */; } function identifierIsThisKeyword(id) { return id.originalKeywordKind === 109 /* ThisKeyword */; @@ -15722,9 +15731,9 @@ function getAllAccessorDeclarations(declarations, accessor) { let setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 177 /* GetAccessor */) { + if (accessor.kind === 179 /* GetAccessor */) { getAccessor = accessor; - } else if (accessor.kind === 178 /* SetAccessor */) { + } else if (accessor.kind === 180 /* SetAccessor */) { setAccessor = accessor; } else { Debug.fail("Accessor has wrong kind"); @@ -15740,10 +15749,10 @@ function getAllAccessorDeclarations(declarations, accessor) { } else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 177 /* GetAccessor */ && !getAccessor) { + if (member.kind === 179 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 178 /* SetAccessor */ && !setAccessor) { + if (member.kind === 180 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -15775,7 +15784,7 @@ function getJSDocTypeParameterDeclarations(node) { return flatMap(getJSDocTags(node), (tag) => isNonTypeAliasTemplate(tag) ? tag.typeParameters : void 0); } function isNonTypeAliasTemplate(tag) { - return isJSDocTemplateTag(tag) && !(tag.parent.kind === 329 /* JSDoc */ && tag.parent.tags.some(isJSDocTypeAlias)); + return isJSDocTemplateTag(tag) && !(tag.parent.kind === 332 /* JSDoc */ && tag.parent.tags.some(isJSDocTypeAlias)); } function getEffectiveSetAccessorTypeAnnotationNode(node) { const parameter = getSetAccessorValueParameter(node); @@ -15960,7 +15969,7 @@ function getSelectedSyntacticModifierFlags(node, flags) { return getSyntacticModifierFlags(node) & flags; } function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { - if (node.kind >= 0 /* FirstToken */ && node.kind <= 164 /* LastToken */) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 165 /* LastToken */) { return 0 /* None */; } if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { @@ -16051,7 +16060,7 @@ function modifierToFlag(token) { return 32768 /* In */; case 146 /* OutKeyword */: return 65536 /* Out */; - case 169 /* Decorator */: + case 170 /* Decorator */: return 131072 /* Decorator */; } return 0 /* None */; @@ -16084,7 +16093,7 @@ function isLeftHandSideOfAssignment(node) { function isDestructuringAssignment(node) { if (isAssignmentExpression(node, true)) { const kind = node.left.kind; - return kind === 210 /* ObjectLiteralExpression */ || kind === 209 /* ArrayLiteralExpression */; + return kind === 212 /* ObjectLiteralExpression */ || kind === 211 /* ArrayLiteralExpression */; } return false; } @@ -16098,12 +16107,12 @@ function getFirstIdentifier(node) { switch (node.kind) { case 79 /* Identifier */: return node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.left; } while (node.kind !== 79 /* Identifier */); return node; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: do { node = node.expression; } while (node.kind !== 79 /* Identifier */); @@ -16111,7 +16120,7 @@ function getFirstIdentifier(node) { } } function isDottedName(node) { - return node.kind === 79 /* Identifier */ || node.kind === 109 /* ThisKeyword */ || node.kind === 107 /* SuperKeyword */ || node.kind === 237 /* MetaProperty */ || node.kind === 211 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 217 /* ParenthesizedExpression */ && isDottedName(node.expression); + return node.kind === 79 /* Identifier */ || node.kind === 109 /* ThisKeyword */ || node.kind === 107 /* SuperKeyword */ || node.kind === 239 /* MetaProperty */ || node.kind === 213 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 219 /* ParenthesizedExpression */ && isDottedName(node.expression); } function isPropertyAccessEntityNameExpression(node) { return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); @@ -16136,7 +16145,7 @@ function isPrototypeAccess(node) { return isBindableStaticAccessExpression(node) && getElementOrPropertyAccessName(node) === "prototype"; } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return node.parent.kind === 165 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node; + return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 213 /* PropertyAccessExpression */ && node.parent.name === node; } function isRightSideOfAccessExpression(node) { return isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node; @@ -16145,10 +16154,10 @@ 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 === 210 /* ObjectLiteralExpression */ && expression.properties.length === 0; + return expression.kind === 212 /* ObjectLiteralExpression */ && expression.properties.length === 0; } function isEmptyArrayLiteral(expression) { - return expression.kind === 209 /* ArrayLiteralExpression */ && expression.elements.length === 0; + return expression.kind === 211 /* ArrayLiteralExpression */ && expression.elements.length === 0; } function getLocalSymbolForExportDefault(symbol) { if (!isExportDefaultSymbol(symbol) || !symbol.declarations) @@ -16376,8 +16385,8 @@ function isDeclarationNameOfEnumOrNamespace(node) { const parseNode = getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 269 /* EnumDeclaration */: - case 270 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 273 /* ModuleDeclaration */: return parseNode === parseNode.parent.name; } } @@ -16438,30 +16447,30 @@ function accessKind(node) { if (!parent) return 0 /* Read */; switch (parent.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return accessKind(parent); - case 226 /* PostfixUnaryExpression */: - case 225 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: const { operator } = parent; return operator === 45 /* PlusPlusToken */ || operator === 46 /* MinusMinusToken */ ? writeOrReadWrite() : 0 /* Read */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const { left, operatorToken } = parent; return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 63 /* EqualsToken */ ? 1 /* Write */ : writeOrReadWrite() : 0 /* Read */; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return parent.name !== node ? 0 /* Read */ : accessKind(parent); - case 305 /* PropertyAssignment */: { + case 308 /* PropertyAssignment */: { const parentAccess = accessKind(parent.parent); return node === parent.name ? reverseAccessKind(parentAccess) : parentAccess; } - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return node === parent.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent.parent); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return accessKind(parent); default: return 0 /* Read */; } function writeOrReadWrite() { - return parent.parent && walkUpParenthesizedExpressions(parent.parent).kind === 245 /* ExpressionStatement */ ? 1 /* Write */ : 2 /* ReadWrite */; + return parent.parent && walkUpParenthesizedExpressions(parent.parent).kind === 247 /* ExpressionStatement */ ? 1 /* Write */ : 2 /* ReadWrite */; } } function reverseAccessKind(a) { @@ -16574,16 +16583,16 @@ function isObjectTypeDeclaration(node) { return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node); } function isTypeNodeKind(kind) { - return kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */ || kind === 132 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 149 /* NumberKeyword */ || kind === 162 /* BigIntKeyword */ || kind === 150 /* ObjectKeyword */ || kind === 135 /* BooleanKeyword */ || kind === 153 /* StringKeyword */ || kind === 154 /* SymbolKeyword */ || kind === 115 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 145 /* NeverKeyword */ || kind === 234 /* ExpressionWithTypeArguments */ || kind === 321 /* JSDocAllType */ || kind === 322 /* JSDocUnknownType */ || kind === 323 /* JSDocNullableType */ || kind === 324 /* JSDocNonNullableType */ || kind === 325 /* JSDocOptionalType */ || kind === 326 /* JSDocFunctionType */ || kind === 327 /* JSDocVariadicType */; + return kind >= 184 /* FirstTypeNode */ && kind <= 207 /* LastTypeNode */ || kind === 132 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 149 /* NumberKeyword */ || kind === 162 /* BigIntKeyword */ || kind === 150 /* ObjectKeyword */ || kind === 135 /* BooleanKeyword */ || kind === 153 /* StringKeyword */ || kind === 154 /* SymbolKeyword */ || kind === 115 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 145 /* NeverKeyword */ || kind === 236 /* ExpressionWithTypeArguments */ || kind === 324 /* JSDocAllType */ || kind === 325 /* JSDocUnknownType */ || kind === 326 /* JSDocNullableType */ || kind === 327 /* JSDocNonNullableType */ || kind === 328 /* JSDocOptionalType */ || kind === 329 /* JSDocFunctionType */ || kind === 330 /* JSDocVariadicType */; } function isAccessExpression(node) { - return node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */; + return node.kind === 213 /* PropertyAccessExpression */ || node.kind === 214 /* ElementAccessExpression */; } function getNameOfAccessExpression(node) { - if (node.kind === 211 /* PropertyAccessExpression */) { + if (node.kind === 213 /* PropertyAccessExpression */) { return node.name; } - Debug.assert(node.kind === 212 /* ElementAccessExpression */); + Debug.assert(node.kind === 214 /* ElementAccessExpression */); return node.argumentExpression; } function isBundleFileTextLike(section) { @@ -16596,7 +16605,7 @@ function isBundleFileTextLike(section) { } } function isNamedImportsOrExports(node) { - return node.kind === 278 /* NamedImports */ || node.kind === 282 /* NamedExports */; + return node.kind === 281 /* NamedImports */ || node.kind === 285 /* NamedExports */; } function getLeftmostAccessExpression(expr) { while (isAccessExpression(expr)) { @@ -16609,12 +16618,12 @@ function forEachNameInAccessChainWalkingLeft(name, action) { return walkAccessExpression(name.parent); } function walkAccessExpression(access) { - if (access.kind === 211 /* PropertyAccessExpression */) { + if (access.kind === 213 /* PropertyAccessExpression */) { const res = action(access.name); if (res !== void 0) { return res; } - } else if (access.kind === 212 /* ElementAccessExpression */) { + } else if (access.kind === 214 /* ElementAccessExpression */) { if (isIdentifier(access.argumentExpression) || isStringLiteralLike(access.argumentExpression)) { const res = action(access.argumentExpression); if (res !== void 0) { @@ -16636,28 +16645,28 @@ function forEachNameInAccessChainWalkingLeft(name, action) { function getLeftmostExpression(node, stopAtCallExpressions) { while (true) { switch (node.kind) { - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: node = node.operand; continue; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: node = node.left; continue; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: node = node.condition; continue; - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: node = node.tag; continue; - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (stopAtCallExpressions) { return node; } - case 235 /* AsExpression */: - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: - case 236 /* NonNullExpression */: - case 359 /* PartiallyEmittedExpression */: - case 239 /* SatisfiesExpression */: + case 237 /* AsExpression */: + case 214 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 238 /* NonNullExpression */: + case 362 /* PartiallyEmittedExpression */: + case 241 /* SatisfiesExpression */: node = node.expression; continue; } @@ -17621,33 +17630,33 @@ function isShorthandPropertyNameUseSite(useSite) { return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite; } function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { - while (node.kind === 79 /* Identifier */ || node.kind === 211 /* PropertyAccessExpression */) { + while (node.kind === 79 /* Identifier */ || node.kind === 213 /* PropertyAccessExpression */) { node = node.parent; } - if (node.kind !== 166 /* ComputedPropertyName */) { + if (node.kind !== 167 /* ComputedPropertyName */) { return false; } if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) { return true; } const containerKind = node.parent.parent.kind; - return containerKind === 267 /* InterfaceDeclaration */ || containerKind === 187 /* TypeLiteral */; + return containerKind === 270 /* InterfaceDeclaration */ || containerKind === 189 /* TypeLiteral */; } function isIdentifierInNonEmittingHeritageClause(node) { if (node.kind !== 79 /* Identifier */) return false; const heritageClause = findAncestor(node.parent, (parent) => { switch (parent.kind) { - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return true; - case 211 /* PropertyAccessExpression */: - case 234 /* ExpressionWithTypeArguments */: + case 213 /* PropertyAccessExpression */: + case 236 /* ExpressionWithTypeArguments */: return false; default: return "quit"; } }); - return (heritageClause == null ? void 0 : heritageClause.token) === 118 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 267 /* InterfaceDeclaration */; + return (heritageClause == null ? void 0 : heritageClause.token) === 118 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 270 /* InterfaceDeclaration */; } function isIdentifierTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName); @@ -17736,20 +17745,20 @@ function getContainingNodeArray(node) { if (!node.parent) return void 0; switch (node.kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: const { parent: parent2 } = node; - return parent2.kind === 195 /* InferType */ ? void 0 : parent2.typeParameters; - case 168 /* Parameter */: + return parent2.kind === 197 /* InferType */ ? void 0 : parent2.typeParameters; + case 169 /* Parameter */: return node.parent.parameters; - case 204 /* TemplateLiteralTypeSpan */: + case 206 /* TemplateLiteralTypeSpan */: return node.parent.templateSpans; - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return node.parent.templateSpans; - case 169 /* Decorator */: { + case 170 /* Decorator */: { const { parent: parent3 } = node; return canHaveDecorators(parent3) ? parent3.modifiers : canHaveIllegalDecorators(parent3) ? parent3.illegalDecorators : void 0; } - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return node.parent.heritageClauses; } const { parent } = node; @@ -17757,43 +17766,43 @@ function getContainingNodeArray(node) { return isJSDocTypeLiteral(node.parent) ? void 0 : node.parent.tags; } switch (parent.kind) { - case 187 /* TypeLiteral */: - case 267 /* InterfaceDeclaration */: + case 189 /* TypeLiteral */: + case 270 /* InterfaceDeclaration */: return isTypeElement(node) ? parent.members : void 0; - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return parent.types; - case 189 /* TupleType */: - case 209 /* ArrayLiteralExpression */: - case 360 /* CommaListExpression */: - case 278 /* NamedImports */: - case 282 /* NamedExports */: + case 191 /* TupleType */: + case 211 /* ArrayLiteralExpression */: + case 363 /* CommaListExpression */: + case 281 /* NamedImports */: + case 285 /* NamedExports */: return parent.elements; - case 210 /* ObjectLiteralExpression */: - case 295 /* JsxAttributes */: + case 212 /* ObjectLiteralExpression */: + case 298 /* JsxAttributes */: return parent.properties; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: return isTypeNode(node) ? parent.typeArguments : parent.expression === node ? void 0 : parent.arguments; - case 287 /* JsxElement */: - case 291 /* JsxFragment */: + case 290 /* JsxElement */: + case 294 /* JsxFragment */: return isJsxChild(node) ? parent.children : void 0; - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return isTypeNode(node) ? parent.typeArguments : void 0; - case 242 /* Block */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 274 /* ModuleBlock */: return parent.statements; - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return parent.clauses; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return isClassElement(node) ? parent.members : void 0; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return isEnumMember(node) ? parent.members : void 0; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return parent.statements; } } @@ -17802,7 +17811,7 @@ function hasContextSensitiveParameters(node) { if (some(node.parameters, (p) => !getEffectiveTypeAnnotationNode(p))) { return true; } - if (node.kind !== 219 /* ArrowFunction */) { + if (node.kind !== 221 /* ArrowFunction */) { const parameter = firstOrUndefined(node.parameters); if (!(parameter && parameterIsThisKeyword(parameter))) { return true; @@ -17815,14 +17824,14 @@ function isInfinityOrNaNString(name) { return name === "Infinity" || name === "-Infinity" || name === "NaN"; } function isCatchClauseVariableDeclaration(node) { - return node.kind === 261 /* VariableDeclaration */ && node.parent.kind === 301 /* CatchClause */; + return node.kind === 263 /* VariableDeclaration */ && node.parent.kind === 304 /* CatchClause */; } function isParameterOrCatchClauseVariable(symbol) { const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration); return !!declaration && (isParameter(declaration) || isCatchClauseVariableDeclaration(declaration)); } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */; + return node.kind === 220 /* FunctionExpression */ || node.kind === 221 /* ArrowFunction */; } function escapeSnippetText(text) { return text.replace(/\$/gm, () => "\\$"); @@ -17885,23 +17894,23 @@ function getNodeModulePathParts(fullPath, modulePathPart) { } function getParameterTypeNode(parameter) { var _a2; - return parameter.kind === 349 /* JSDocParameterTag */ ? (_a2 = parameter.typeExpression) == null ? void 0 : _a2.type : parameter.type; + return parameter.kind === 352 /* JSDocParameterTag */ ? (_a2 = parameter.typeExpression) == null ? void 0 : _a2.type : parameter.type; } function isTypeDeclaration(node) { switch (node.kind) { - case 167 /* TypeParameter */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 168 /* TypeParameter */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return true; - case 276 /* ImportClause */: + case 279 /* ImportClause */: return node.isTypeOnly; - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return node.parent.parent.isTypeOnly; default: return false; @@ -17914,7 +17923,7 @@ function isCalledStructDeclaration(declarations) { if (!declarations) { return false; } - return declarations.some((declaration) => declaration.kind === 265 /* StructDeclaration */); + return declarations.some((declaration) => declaration.kind === 267 /* StructDeclaration */); } function getNameOfDecorator(node) { const expression = node.expression; @@ -18146,16 +18155,16 @@ function createParenthesizerRules(factory2) { return parenthesizerRule; } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(227 /* BinaryExpression */, binaryOperator); + const binaryOperatorPrecedence = getOperatorPrecedence(229 /* BinaryExpression */, binaryOperator); + const binaryOperatorAssociativity = getOperatorAssociativity(229 /* BinaryExpression */, binaryOperator); const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 219 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { + if (!isLeftSideOfBinary && operand.kind === 221 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { return true; } const operandPrecedence = getExpressionPrecedence(emittedOperand); switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 230 /* YieldExpression */) { + if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 232 /* YieldExpression */) { return false; } return true; @@ -18189,7 +18198,7 @@ function createParenthesizerRules(factory2) { if (isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { + if (node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { if (node.cachedLiteralKind !== void 0) { return node.cachedLiteralKind; } @@ -18202,7 +18211,7 @@ function createParenthesizerRules(factory2) { } function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 217 /* ParenthesizedExpression */) { + if (skipped.kind === 219 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; @@ -18217,7 +18226,7 @@ function createParenthesizerRules(factory2) { return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; } function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(228 /* ConditionalExpression */, 57 /* QuestionToken */); + const conditionalPrecedence = getOperatorPrecedence(230 /* ConditionalExpression */, 57 /* QuestionToken */); const emittedCondition = skipPartiallyEmittedExpressions(condition); const conditionPrecedence = getExpressionPrecedence(emittedCondition); if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { @@ -18234,8 +18243,8 @@ function createParenthesizerRules(factory2) { let needsParens = isCommaSequence(check); if (!needsParens) { switch (getLeftmostExpression(check, false).kind) { - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: needsParens = true; } } @@ -18244,16 +18253,16 @@ function createParenthesizerRules(factory2) { function parenthesizeExpressionOfNew(expression) { const leftmostExpr = getLeftmostExpression(expression, true); switch (leftmostExpr.kind) { - case 213 /* CallExpression */: + case 215 /* CallExpression */: return factory2.createParenthesizedExpression(expression); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; } return parenthesizeLeftSideOfAccess(expression); } function parenthesizeLeftSideOfAccess(expression, optionalChain) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 214 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { + if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 216 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { return expression; } return setTextRange(factory2.createParenthesizedExpression(expression), expression); @@ -18271,7 +18280,7 @@ function createParenthesizerRules(factory2) { function parenthesizeExpressionForDisallowedComma(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, 27 /* CommaToken */); + const commaPrecedence = getOperatorPrecedence(229 /* BinaryExpression */, 27 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); } function parenthesizeExpressionOfExpressionStatement(expression) { @@ -18279,7 +18288,7 @@ function createParenthesizerRules(factory2) { if (isCallExpression(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */) { + if (kind === 220 /* FunctionExpression */ || kind === 221 /* ArrowFunction */) { const updated = factory2.updateCallExpression( emittedExpression, setTextRange(factory2.createParenthesizedExpression(callee), callee), @@ -18290,37 +18299,37 @@ function createParenthesizerRules(factory2) { } } const leftmostExpressionKind = getLeftmostExpression(emittedExpression, false).kind; - if (leftmostExpressionKind === 210 /* ObjectLiteralExpression */ || leftmostExpressionKind === 218 /* FunctionExpression */) { + if (leftmostExpressionKind === 212 /* ObjectLiteralExpression */ || leftmostExpressionKind === 220 /* FunctionExpression */) { return setTextRange(factory2.createParenthesizedExpression(expression), expression); } return expression; } function parenthesizeConciseBodyOfArrowFunction(body) { - if (!isBlock(body) && (isCommaSequence(body) || getLeftmostExpression(body, false).kind === 210 /* ObjectLiteralExpression */)) { + if (!isBlock(body) && (isCommaSequence(body) || getLeftmostExpression(body, false).kind === 212 /* ObjectLiteralExpression */)) { return setTextRange(factory2.createParenthesizedExpression(body), body); } return body; } function parenthesizeCheckTypeOfConditionalType(checkType) { switch (checkType.kind) { - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 194 /* ConditionalType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 196 /* ConditionalType */: return factory2.createParenthesizedType(checkType); } return checkType; } function parenthesizeExtendsTypeOfConditionalType(extendsType) { switch (extendsType.kind) { - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return factory2.createParenthesizedType(extendsType); } return extendsType; } function parenthesizeConstituentTypeOfUnionType(type) { switch (type.kind) { - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeCheckTypeOfConditionalType(type); @@ -18330,8 +18339,8 @@ function createParenthesizerRules(factory2) { } function parenthesizeConstituentTypeOfIntersectionType(type) { switch (type.kind) { - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfUnionType(type); @@ -18341,23 +18350,23 @@ function createParenthesizerRules(factory2) { } function parenthesizeOperandOfTypeOperator(type) { switch (type.kind) { - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } function parenthesizeOperandOfReadonlyTypeOperator(type) { switch (type.kind) { - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } function parenthesizeNonArrayTypeOfPostfixType(type) { switch (type.kind) { - case 195 /* InferType */: - case 198 /* TypeOperator */: - case 186 /* TypeQuery */: + case 197 /* InferType */: + case 200 /* TypeOperator */: + case 188 /* TypeQuery */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); @@ -18511,11 +18520,11 @@ function createNodeConverters(factory2) { } function convertToAssignmentPattern(node) { switch (node.kind) { - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 209 /* ArrayBindingPattern */: + case 211 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 206 /* ObjectBindingPattern */: - case 210 /* ObjectLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 212 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -18640,6 +18649,8 @@ function createNodeFactory(flags, baseFactory2) { updatePropertyDeclaration, createAnnotationPropertyDeclaration, updateAnnotationPropertyDeclaration, + createOverloadPropertyDeclaration, + updateOverloadPropertyDeclaration, createMethodSignature, updateMethodSignature, createMethodDeclaration, @@ -18835,6 +18846,8 @@ function createNodeFactory(flags, baseFactory2) { updateStructDeclaration, createAnnotationDeclaration, updateAnnotationDeclaration, + createOverloadDeclaration, + updateOverloadDeclaration, createInterfaceDeclaration, updateInterfaceDeclaration, createTypeAliasDeclaration, @@ -18881,40 +18894,40 @@ function createNodeFactory(flags, baseFactory2) { createExternalModuleReference, updateExternalModuleReference, get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(321 /* JSDocAllType */); + return getJSDocPrimaryTypeCreateFunction(324 /* JSDocAllType */); }, get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(322 /* JSDocUnknownType */); + return getJSDocPrimaryTypeCreateFunction(325 /* JSDocUnknownType */); }, get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(324 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(327 /* JSDocNonNullableType */); }, get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(324 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(327 /* JSDocNonNullableType */); }, get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(323 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(326 /* JSDocNullableType */); }, get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(323 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(326 /* JSDocNullableType */); }, get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(325 /* JSDocOptionalType */); + return getJSDocUnaryTypeCreateFunction(328 /* JSDocOptionalType */); }, get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(325 /* JSDocOptionalType */); + return getJSDocUnaryTypeUpdateFunction(328 /* JSDocOptionalType */); }, get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(327 /* JSDocVariadicType */); + return getJSDocUnaryTypeCreateFunction(330 /* JSDocVariadicType */); }, get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(327 /* JSDocVariadicType */); + return getJSDocUnaryTypeUpdateFunction(330 /* JSDocVariadicType */); }, get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(328 /* JSDocNamepathType */); + return getJSDocUnaryTypeCreateFunction(331 /* JSDocNamepathType */); }, get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(328 /* JSDocNamepathType */); + return getJSDocUnaryTypeUpdateFunction(331 /* JSDocNamepathType */); }, createJSDocFunctionType, updateJSDocFunctionType, @@ -18951,76 +18964,76 @@ function createNodeFactory(flags, baseFactory2) { createJSDocLinkPlain, updateJSDocLinkPlain, get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(352 /* JSDocTypeTag */); + return getJSDocTypeLikeTagCreateFunction(355 /* JSDocTypeTag */); }, get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocTypeTag */); + return getJSDocTypeLikeTagUpdateFunction(355 /* JSDocTypeTag */); }, get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(350 /* JSDocReturnTag */); + return getJSDocTypeLikeTagCreateFunction(353 /* JSDocReturnTag */); }, get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocReturnTag */); + return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocReturnTag */); }, get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(351 /* JSDocThisTag */); + return getJSDocTypeLikeTagCreateFunction(354 /* JSDocThisTag */); }, get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocThisTag */); + return getJSDocTypeLikeTagUpdateFunction(354 /* JSDocThisTag */); }, get createJSDocEnumTag() { - return getJSDocTypeLikeTagCreateFunction(348 /* JSDocEnumTag */); + return getJSDocTypeLikeTagCreateFunction(351 /* JSDocEnumTag */); }, get updateJSDocEnumTag() { - return getJSDocTypeLikeTagUpdateFunction(348 /* JSDocEnumTag */); + return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocEnumTag */); }, get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(339 /* JSDocAuthorTag */); + return getJSDocSimpleTagCreateFunction(342 /* JSDocAuthorTag */); }, get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(339 /* JSDocAuthorTag */); + return getJSDocSimpleTagUpdateFunction(342 /* JSDocAuthorTag */); }, get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(341 /* JSDocClassTag */); + return getJSDocSimpleTagCreateFunction(344 /* JSDocClassTag */); }, get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(341 /* JSDocClassTag */); + return getJSDocSimpleTagUpdateFunction(344 /* JSDocClassTag */); }, get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(342 /* JSDocPublicTag */); + return getJSDocSimpleTagCreateFunction(345 /* JSDocPublicTag */); }, get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(342 /* JSDocPublicTag */); + return getJSDocSimpleTagUpdateFunction(345 /* JSDocPublicTag */); }, get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(343 /* JSDocPrivateTag */); + return getJSDocSimpleTagCreateFunction(346 /* JSDocPrivateTag */); }, get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(343 /* JSDocPrivateTag */); + return getJSDocSimpleTagUpdateFunction(346 /* JSDocPrivateTag */); }, get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(344 /* JSDocProtectedTag */); + return getJSDocSimpleTagCreateFunction(347 /* JSDocProtectedTag */); }, get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(344 /* JSDocProtectedTag */); + return getJSDocSimpleTagUpdateFunction(347 /* JSDocProtectedTag */); }, get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(345 /* JSDocReadonlyTag */); + return getJSDocSimpleTagCreateFunction(348 /* JSDocReadonlyTag */); }, get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(345 /* JSDocReadonlyTag */); + return getJSDocSimpleTagUpdateFunction(348 /* JSDocReadonlyTag */); }, get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(346 /* JSDocOverrideTag */); + return getJSDocSimpleTagCreateFunction(349 /* JSDocOverrideTag */); }, get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(346 /* JSDocOverrideTag */); + return getJSDocSimpleTagUpdateFunction(349 /* JSDocOverrideTag */); }, get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(340 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagCreateFunction(343 /* JSDocDeprecatedTag */); }, get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(340 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagUpdateFunction(343 /* JSDocDeprecatedTag */); }, createJSDocUnknownTag, updateJSDocUnknownTag, @@ -19271,12 +19284,13 @@ function createNodeFactory(flags, baseFactory2) { } if (name) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 305 /* PropertyAssignment */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 308 /* PropertyAssignment */: if (isIdentifier(name)) { node.transformFlags |= propagateIdentifierNameFlags(name); break; @@ -19543,7 +19557,7 @@ function createNodeFactory(flags, baseFactory2) { return baseFactory2.createBaseTokenNode(kind); } function createToken(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 164 /* LastToken */, "Invalid token"); + Debug.assert(token >= 0 /* FirstToken */ && token <= 165 /* 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"); @@ -19647,7 +19661,7 @@ function createNodeFactory(flags, baseFactory2) { return result.length ? result : void 0; } function createQualifiedName(left, right) { - const node = createBaseNode(165 /* QualifiedName */); + const node = createBaseNode(166 /* QualifiedName */); node.left = left; node.right = asName(right); node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); @@ -19657,7 +19671,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createQualifiedName(left, right), node) : node; } function createComputedPropertyName(expression) { - const node = createBaseNode(166 /* ComputedPropertyName */); + const node = createBaseNode(167 /* ComputedPropertyName */); node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; return node; @@ -19667,7 +19681,7 @@ function createNodeFactory(flags, baseFactory2) { } function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) { const node = createBaseNamedDeclaration( - 167 /* TypeParameter */, + 168 /* TypeParameter */, modifiers, name ); @@ -19681,7 +19695,7 @@ function createNodeFactory(flags, baseFactory2) { } function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { const node = createBaseVariableLikeDeclaration( - 168 /* Parameter */, + 169 /* Parameter */, modifiers, name, type, @@ -19706,7 +19720,7 @@ function createNodeFactory(flags, baseFactory2) { 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, annotationDeclaration) { - const node = createBaseNode(169 /* Decorator */); + const node = createBaseNode(170 /* Decorator */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.annotationDeclaration = annotationDeclaration; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */ | 8192 /* ContainsTypeScriptClassSyntax */ | 33554432 /* ContainsDecorators */; @@ -19717,7 +19731,7 @@ function createNodeFactory(flags, baseFactory2) { } function createPropertySignature(modifiers, name, questionToken, type) { const node = createBaseNamedDeclaration( - 170 /* PropertySignature */, + 171 /* PropertySignature */, modifiers, name ); @@ -19730,6 +19744,21 @@ function createNodeFactory(flags, baseFactory2) { function updatePropertySignature(node, modifiers, name, questionToken, type) { return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.type !== type ? finishUpdatePropertySignature(createPropertySignature(modifiers, name, questionToken, type), node) : node; } + function createOverloadPropertyDeclaration(modifiers, name, questionToken, type) { + const node = createBaseNamedDeclaration( + 174 /* OverloadPropertyDeclaration */, + modifiers, + name + ); + node.type = type; + node.questionToken = questionToken; + node.transformFlags = 1 /* ContainsTypeScript */; + node.initializer = void 0; + return node; + } + function updateOverloadPropertyDeclaration(node, modifiers, name, questionToken, type) { + return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createOverloadPropertyDeclaration(modifiers, name, questionToken, type), node) : node; + } function finishUpdatePropertySignature(updated, original) { if (updated !== original) { updated.initializer = original.initializer; @@ -19738,7 +19767,7 @@ function createNodeFactory(flags, baseFactory2) { } function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { const node = createBaseVariableLikeDeclaration( - 171 /* PropertyDeclaration */, + 172 /* PropertyDeclaration */, modifiers, name, type, @@ -19760,7 +19789,7 @@ function createNodeFactory(flags, baseFactory2) { } function createAnnotationPropertyDeclaration(name, type, initializer) { const node = createBaseVariableLikeDeclaration( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, void 0, name, type, @@ -19774,7 +19803,7 @@ function createNodeFactory(flags, baseFactory2) { } function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 173 /* MethodSignature */, + 175 /* MethodSignature */, modifiers, name, typeParameters, @@ -19790,7 +19819,7 @@ function createNodeFactory(flags, baseFactory2) { } function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 174 /* MethodDeclaration */, + 176 /* MethodDeclaration */, modifiers, name, typeParameters, @@ -19827,7 +19856,7 @@ function createNodeFactory(flags, baseFactory2) { } function createClassStaticBlockDeclaration(body) { const node = createBaseGenericNamedDeclaration( - 175 /* ClassStaticBlockDeclaration */, + 177 /* ClassStaticBlockDeclaration */, void 0, void 0, void 0 @@ -19850,7 +19879,7 @@ function createNodeFactory(flags, baseFactory2) { } function createConstructorDeclaration(modifiers, parameters, body) { const node = createBaseFunctionLikeDeclaration( - 176 /* Constructor */, + 178 /* Constructor */, modifiers, void 0, void 0, @@ -19877,7 +19906,7 @@ function createNodeFactory(flags, baseFactory2) { } function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 177 /* GetAccessor */, + 179 /* GetAccessor */, modifiers, name, void 0, @@ -19899,7 +19928,7 @@ function createNodeFactory(flags, baseFactory2) { } function createSetAccessorDeclaration(modifiers, name, parameters, body) { const node = createBaseFunctionLikeDeclaration( - 178 /* SetAccessor */, + 180 /* SetAccessor */, modifiers, name, void 0, @@ -19923,7 +19952,7 @@ function createNodeFactory(flags, baseFactory2) { } function createCallSignature(typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 179 /* CallSignature */, + 181 /* CallSignature */, void 0, void 0, typeParameters, @@ -19938,7 +19967,7 @@ function createNodeFactory(flags, baseFactory2) { } function createConstructSignature(typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 180 /* ConstructSignature */, + 182 /* ConstructSignature */, void 0, void 0, typeParameters, @@ -19953,7 +19982,7 @@ function createNodeFactory(flags, baseFactory2) { } function createIndexSignature(modifiers, parameters, type) { const node = createBaseSignatureDeclaration( - 181 /* IndexSignature */, + 183 /* IndexSignature */, modifiers, void 0, void 0, @@ -19967,7 +19996,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node) : node; } function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(204 /* TemplateLiteralTypeSpan */); + const node = createBaseNode(206 /* TemplateLiteralTypeSpan */); node.type = type; node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; @@ -19980,7 +20009,7 @@ function createNodeFactory(flags, baseFactory2) { return createToken(kind); } function createTypePredicateNode(assertsModifier, parameterName, type) { - const node = createBaseNode(182 /* TypePredicate */); + const node = createBaseNode(184 /* TypePredicate */); node.assertsModifier = assertsModifier; node.parameterName = asName(parameterName); node.type = type; @@ -19991,7 +20020,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode(assertsModifier, parameterName, type), node) : node; } function createTypeReferenceNode(typeName, typeArguments) { - const node = createBaseNode(183 /* TypeReference */); + const node = createBaseNode(185 /* TypeReference */); node.typeName = asName(typeName); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray(typeArguments)); node.transformFlags = 1 /* ContainsTypeScript */; @@ -20002,7 +20031,7 @@ function createNodeFactory(flags, baseFactory2) { } function createFunctionTypeNode(typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 184 /* FunctionType */, + 186 /* FunctionType */, void 0, void 0, typeParameters, @@ -20027,7 +20056,7 @@ function createNodeFactory(flags, baseFactory2) { } function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 185 /* ConstructorType */, + 187 /* ConstructorType */, modifiers, void 0, typeParameters, @@ -20050,7 +20079,7 @@ function createNodeFactory(flags, baseFactory2) { return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); } function createTypeQueryNode(exprName, typeArguments) { - const node = createBaseNode(186 /* TypeQuery */); + const node = createBaseNode(188 /* TypeQuery */); node.exprName = exprName; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags = 1 /* ContainsTypeScript */; @@ -20060,7 +20089,7 @@ function createNodeFactory(flags, baseFactory2) { return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node; } function createTypeLiteralNode(members) { - const node = createBaseNode(187 /* TypeLiteral */); + const node = createBaseNode(189 /* TypeLiteral */); node.members = createNodeArray(members); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -20069,7 +20098,7 @@ function createNodeFactory(flags, baseFactory2) { return node.members !== members ? update(createTypeLiteralNode(members), node) : node; } function createArrayTypeNode(elementType) { - const node = createBaseNode(188 /* ArrayType */); + const node = createBaseNode(190 /* ArrayType */); node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -20078,7 +20107,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elementType !== elementType ? update(createArrayTypeNode(elementType), node) : node; } function createTupleTypeNode(elements) { - const node = createBaseNode(189 /* TupleType */); + const node = createBaseNode(191 /* TupleType */); node.elements = createNodeArray(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -20087,7 +20116,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node; } function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseNode(202 /* NamedTupleMember */); + const node = createBaseNode(204 /* NamedTupleMember */); node.dotDotDotToken = dotDotDotToken; node.name = name; node.questionToken = questionToken; @@ -20099,7 +20128,7 @@ function createNodeFactory(flags, baseFactory2) { 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(190 /* OptionalType */); + const node = createBaseNode(192 /* OptionalType */); node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -20108,7 +20137,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createOptionalTypeNode(type), node) : node; } function createRestTypeNode(type) { - const node = createBaseNode(191 /* RestType */); + const node = createBaseNode(193 /* RestType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -20126,19 +20155,19 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; } function createUnionTypeNode(types) { - return createUnionOrIntersectionTypeNode(192 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); + return createUnionOrIntersectionTypeNode(194 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function updateUnionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function createIntersectionTypeNode(types) { - return createUnionOrIntersectionTypeNode(193 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); + return createUnionOrIntersectionTypeNode(195 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function updateIntersectionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function createConditionalTypeNode(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(194 /* ConditionalType */); + const node = createBaseNode(196 /* ConditionalType */); node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); node.trueType = trueType; @@ -20150,7 +20179,7 @@ function createNodeFactory(flags, baseFactory2) { 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(195 /* InferType */); + const node = createBaseNode(197 /* InferType */); node.typeParameter = typeParameter; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -20159,7 +20188,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameter !== typeParameter ? update(createInferTypeNode(typeParameter), node) : node; } function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(203 /* TemplateLiteralType */); + const node = createBaseNode(205 /* TemplateLiteralType */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags = 1 /* ContainsTypeScript */; @@ -20169,7 +20198,7 @@ function createNodeFactory(flags, baseFactory2) { return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(205 /* ImportType */); + const node = createBaseNode(207 /* ImportType */); node.argument = argument; node.assertions = assertions; node.qualifier = qualifier; @@ -20182,7 +20211,7 @@ function createNodeFactory(flags, baseFactory2) { 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(196 /* ParenthesizedType */); + const node = createBaseNode(198 /* ParenthesizedType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -20191,12 +20220,12 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createParenthesizedType(type), node) : node; } function createThisTypeNode() { - const node = createBaseNode(197 /* ThisType */); + const node = createBaseNode(199 /* ThisType */); node.transformFlags = 1 /* ContainsTypeScript */; return node; } function createTypeOperatorNode(operator, type) { - const node = createBaseNode(198 /* TypeOperator */); + const node = createBaseNode(200 /* TypeOperator */); node.operator = operator; node.type = operator === 147 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); node.transformFlags = 1 /* ContainsTypeScript */; @@ -20206,7 +20235,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createTypeOperatorNode(node.operator, type), node) : node; } function createIndexedAccessTypeNode(objectType, indexType) { - const node = createBaseNode(199 /* IndexedAccessType */); + const node = createBaseNode(201 /* IndexedAccessType */); node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); node.indexType = indexType; node.transformFlags = 1 /* ContainsTypeScript */; @@ -20216,7 +20245,7 @@ function createNodeFactory(flags, baseFactory2) { return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node; } function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseNode(200 /* MappedType */); + const node = createBaseNode(202 /* MappedType */); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; node.nameType = nameType; @@ -20230,7 +20259,7 @@ function createNodeFactory(flags, baseFactory2) { 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(201 /* LiteralType */); + const node = createBaseNode(203 /* LiteralType */); node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -20239,7 +20268,7 @@ function createNodeFactory(flags, baseFactory2) { return node.literal !== literal ? update(createLiteralTypeNode(literal), node) : node; } function createObjectBindingPattern(elements) { - const node = createBaseNode(206 /* ObjectBindingPattern */); + const node = createBaseNode(208 /* ObjectBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { @@ -20251,7 +20280,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createObjectBindingPattern(elements), node) : node; } function createArrayBindingPattern(elements) { - const node = createBaseNode(207 /* ArrayBindingPattern */); + const node = createBaseNode(209 /* ArrayBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; return node; @@ -20261,7 +20290,7 @@ function createNodeFactory(flags, baseFactory2) { } function createBindingElement(dotDotDotToken, propertyName, name, initializer) { const node = createBaseBindingLikeDeclaration( - 208 /* BindingElement */, + 210 /* BindingElement */, void 0, name, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer) @@ -20284,7 +20313,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseExpression(209 /* ArrayLiteralExpression */); + const node = createBaseExpression(211 /* ArrayLiteralExpression */); const lastElement = elements && lastOrUndefined(elements); const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); @@ -20296,7 +20325,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; } function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseExpression(210 /* ObjectLiteralExpression */); + const node = createBaseExpression(212 /* ObjectLiteralExpression */); node.properties = createNodeArray(properties); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.properties); @@ -20306,7 +20335,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; } function createPropertyAccessExpression(expression, name) { - const node = createBaseExpression(211 /* PropertyAccessExpression */); + const node = createBaseExpression(213 /* PropertyAccessExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.name = asName(name); node.transformFlags = propagateChildFlags(node.expression) | (isIdentifier(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912 /* ContainsPrivateIdentifierInExpression */); @@ -20322,7 +20351,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.name !== name ? update(createPropertyAccessExpression(expression, name), node) : node; } function createPropertyAccessChain(expression, questionDotToken, name) { - const node = createBaseExpression(211 /* PropertyAccessExpression */); + const node = createBaseExpression(213 /* PropertyAccessExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.questionDotToken = questionDotToken; @@ -20335,7 +20364,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node; } function createElementAccessExpression(expression, index) { - const node = createBaseExpression(212 /* ElementAccessExpression */); + const node = createBaseExpression(214 /* ElementAccessExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.argumentExpression = asExpression(index); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.argumentExpression); @@ -20351,7 +20380,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.argumentExpression !== argumentExpression ? update(createElementAccessExpression(expression, argumentExpression), node) : node; } function createElementAccessChain(expression, questionDotToken, index) { - const node = createBaseExpression(212 /* ElementAccessExpression */); + const node = createBaseExpression(214 /* ElementAccessExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.questionDotToken = questionDotToken; @@ -20364,7 +20393,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node; } function createCallExpression(expression, typeArguments, argumentsArray) { - const node = createBaseExpression(213 /* CallExpression */); + const node = createBaseExpression(215 /* CallExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.typeArguments = asNodeArray(typeArguments); node.arguments = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray)); @@ -20386,7 +20415,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallExpression(expression, typeArguments, argumentsArray), node) : node; } function createCallChain(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseExpression(213 /* CallExpression */); + const node = createBaseExpression(215 /* CallExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.questionDotToken = questionDotToken; @@ -20406,7 +20435,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseExpression(214 /* NewExpression */); + const node = createBaseExpression(216 /* NewExpression */); node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; @@ -20420,7 +20449,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; } function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseExpression(215 /* TaggedTemplateExpression */); + const node = createBaseExpression(217 /* TaggedTemplateExpression */); node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess(tag, false); node.typeArguments = asNodeArray(typeArguments); node.template = template; @@ -20437,7 +20466,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; } function createTypeAssertion(type, expression) { - const node = createBaseExpression(216 /* TypeAssertionExpression */); + const node = createBaseExpression(218 /* TypeAssertionExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -20447,7 +20476,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node; } function createParenthesizedExpression(expression) { - const node = createBaseExpression(217 /* ParenthesizedExpression */); + const node = createBaseExpression(219 /* ParenthesizedExpression */); node.expression = expression; node.transformFlags = propagateChildFlags(node.expression); return node; @@ -20457,7 +20486,7 @@ function createNodeFactory(flags, baseFactory2) { } function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 218 /* FunctionExpression */, + 220 /* FunctionExpression */, modifiers, name, typeParameters, @@ -20485,7 +20514,7 @@ function createNodeFactory(flags, baseFactory2) { 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 createEtsComponentExpression(name, argumentsArray, body) { - const node = createBaseExpression(220 /* EtsComponentExpression */); + const node = createBaseExpression(222 /* EtsComponentExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(name); node.arguments = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray)); node.body = body; @@ -20496,7 +20525,7 @@ function createNodeFactory(flags, baseFactory2) { } function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { const node = createBaseFunctionLikeDeclaration( - 219 /* ArrowFunction */, + 221 /* ArrowFunction */, modifiers, void 0, typeParameters, @@ -20515,7 +20544,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseExpression(221 /* DeleteExpression */); + const node = createBaseExpression(223 /* DeleteExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -20524,7 +20553,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; } function createTypeOfExpression(expression) { - const node = createBaseExpression(222 /* TypeOfExpression */); + const node = createBaseExpression(224 /* TypeOfExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -20533,7 +20562,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; } function createVoidExpression(expression) { - const node = createBaseExpression(223 /* VoidExpression */); + const node = createBaseExpression(225 /* VoidExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -20542,7 +20571,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createVoidExpression(expression), node) : node; } function createAwaitExpression(expression) { - const node = createBaseExpression(224 /* AwaitExpression */); + const node = createBaseExpression(226 /* AwaitExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; return node; @@ -20551,7 +20580,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; } function createPrefixUnaryExpression(operator, operand) { - const node = createBaseExpression(225 /* PrefixUnaryExpression */); + const node = createBaseExpression(227 /* PrefixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -20564,7 +20593,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; } function createPostfixUnaryExpression(operand, operator) { - const node = createBaseExpression(226 /* PostfixUnaryExpression */); + const node = createBaseExpression(228 /* PostfixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -20577,7 +20606,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; } function createBinaryExpression(left, operator, right) { - const node = createBaseExpression(227 /* BinaryExpression */); + const node = createBaseExpression(229 /* BinaryExpression */); const operatorToken = asToken(operator); const operatorKind = operatorToken.kind; node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); @@ -20626,7 +20655,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseExpression(228 /* ConditionalExpression */); + const node = createBaseExpression(230 /* ConditionalExpression */); node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); node.questionToken = questionToken != null ? questionToken : createToken(57 /* QuestionToken */); node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); @@ -20639,7 +20668,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseExpression(229 /* TemplateExpression */); + const node = createBaseExpression(231 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; @@ -20692,7 +20721,7 @@ function createNodeFactory(flags, baseFactory2) { } function createYieldExpression(asteriskToken, expression) { Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseExpression(230 /* YieldExpression */); + const node = createBaseExpression(232 /* YieldExpression */); node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.asteriskToken = asteriskToken; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; @@ -20702,7 +20731,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; } function createSpreadElement(expression) { - const node = createBaseExpression(231 /* SpreadElement */); + const node = createBaseExpression(233 /* SpreadElement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; return node; @@ -20712,7 +20741,7 @@ function createNodeFactory(flags, baseFactory2) { } function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseClassLikeDeclaration( - 232 /* ClassExpression */, + 234 /* ClassExpression */, modifiers, name, typeParameters, @@ -20726,10 +20755,10 @@ function createNodeFactory(flags, baseFactory2) { 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 createBaseExpression(233 /* OmittedExpression */); + return createBaseExpression(235 /* OmittedExpression */); } function createExpressionWithTypeArguments(expression, typeArguments) { - const node = createBaseNode(234 /* ExpressionWithTypeArguments */); + const node = createBaseNode(236 /* ExpressionWithTypeArguments */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.typeArguments) | 1024 /* ContainsES2015 */; @@ -20739,7 +20768,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node; } function createAsExpression(expression, type) { - const node = createBaseExpression(235 /* AsExpression */); + const node = createBaseExpression(237 /* AsExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -20749,7 +20778,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node; } function createNonNullExpression(expression) { - const node = createBaseExpression(236 /* NonNullExpression */); + const node = createBaseExpression(238 /* NonNullExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; return node; @@ -20761,7 +20790,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createNonNullExpression(expression), node) : node; } function createSatisfiesExpression(expression, type) { - const node = createBaseExpression(239 /* SatisfiesExpression */); + const node = createBaseExpression(241 /* SatisfiesExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -20771,7 +20800,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; } function createNonNullChain(expression) { - const node = createBaseExpression(236 /* NonNullExpression */); + const node = createBaseExpression(238 /* NonNullExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -20782,7 +20811,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createNonNullChain(expression), node) : node; } function createMetaProperty(keywordToken, name) { - const node = createBaseExpression(237 /* MetaProperty */); + const node = createBaseExpression(239 /* MetaProperty */); node.keywordToken = keywordToken; node.name = name; node.transformFlags |= propagateChildFlags(node.name); @@ -20802,7 +20831,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createMetaProperty(node.keywordToken, name), node) : node; } function createTemplateSpan(expression, literal) { - const node = createBaseNode(240 /* TemplateSpan */); + const node = createBaseNode(242 /* TemplateSpan */); node.expression = expression; node.literal = literal; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; @@ -20812,12 +20841,12 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan(expression, literal), node) : node; } function createSemicolonClassElement() { - const node = createBaseNode(241 /* SemicolonClassElement */); + const node = createBaseNode(243 /* SemicolonClassElement */); node.transformFlags |= 1024 /* ContainsES2015 */; return node; } function createBlock(statements, multiLine) { - const node = createBaseNode(242 /* Block */); + const node = createBaseNode(244 /* Block */); node.statements = createNodeArray(statements); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.statements); @@ -20827,7 +20856,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node; } function createVariableStatement(modifiers, declarationList) { - const node = createBaseDeclaration(244 /* VariableStatement */); + const node = createBaseDeclaration(246 /* VariableStatement */); node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); @@ -20840,10 +20869,10 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node; } function createEmptyStatement() { - return createBaseNode(243 /* EmptyStatement */); + return createBaseNode(245 /* EmptyStatement */); } function createExpressionStatement(expression) { - const node = createBaseNode(245 /* ExpressionStatement */); + const node = createBaseNode(247 /* ExpressionStatement */); node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -20852,7 +20881,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createExpressionStatement(expression), node) : node; } function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(246 /* IfStatement */); + const node = createBaseNode(248 /* IfStatement */); node.expression = expression; node.thenStatement = asEmbeddedStatement(thenStatement); node.elseStatement = asEmbeddedStatement(elseStatement); @@ -20863,7 +20892,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; } function createDoStatement(statement, expression) { - const node = createBaseNode(247 /* DoStatement */); + const node = createBaseNode(249 /* DoStatement */); node.statement = asEmbeddedStatement(statement); node.expression = expression; node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); @@ -20873,7 +20902,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; } function createWhileStatement(expression, statement) { - const node = createBaseNode(248 /* WhileStatement */); + const node = createBaseNode(250 /* WhileStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -20883,7 +20912,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; } function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(249 /* ForStatement */); + const node = createBaseNode(251 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -20895,7 +20924,7 @@ function createNodeFactory(flags, baseFactory2) { 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(250 /* ForInStatement */); + const node = createBaseNode(252 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = asEmbeddedStatement(statement); @@ -20906,7 +20935,7 @@ function createNodeFactory(flags, baseFactory2) { 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(251 /* ForOfStatement */); + const node = createBaseNode(253 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); @@ -20920,7 +20949,7 @@ function createNodeFactory(flags, baseFactory2) { 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(252 /* ContinueStatement */); + const node = createBaseNode(254 /* ContinueStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; return node; @@ -20929,7 +20958,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createContinueStatement(label), node) : node; } function createBreakStatement(label) { - const node = createBaseNode(253 /* BreakStatement */); + const node = createBaseNode(255 /* BreakStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; return node; @@ -20938,7 +20967,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createBreakStatement(label), node) : node; } function createReturnStatement(expression) { - const node = createBaseNode(254 /* ReturnStatement */); + const node = createBaseNode(256 /* ReturnStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; return node; @@ -20947,7 +20976,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createReturnStatement(expression), node) : node; } function createWithStatement(expression, statement) { - const node = createBaseNode(255 /* WithStatement */); + const node = createBaseNode(257 /* WithStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -20957,7 +20986,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; } function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(256 /* SwitchStatement */); + const node = createBaseNode(258 /* SwitchStatement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.caseBlock = caseBlock; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); @@ -20967,7 +20996,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; } function createLabeledStatement(label, statement) { - const node = createBaseNode(257 /* LabeledStatement */); + const node = createBaseNode(259 /* LabeledStatement */); node.label = asName(label); node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); @@ -20977,7 +21006,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; } function createThrowStatement(expression) { - const node = createBaseNode(258 /* ThrowStatement */); + const node = createBaseNode(260 /* ThrowStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -20986,7 +21015,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createThrowStatement(expression), node) : node; } function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(259 /* TryStatement */); + const node = createBaseNode(261 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -20997,11 +21026,11 @@ function createNodeFactory(flags, baseFactory2) { return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; } function createDebuggerStatement() { - return createBaseNode(260 /* DebuggerStatement */); + return createBaseNode(262 /* DebuggerStatement */); } function createVariableDeclaration(name, exclamationToken, type, initializer) { const node = createBaseVariableLikeDeclaration( - 261 /* VariableDeclaration */, + 263 /* VariableDeclaration */, void 0, name, type, @@ -21018,7 +21047,7 @@ function createNodeFactory(flags, baseFactory2) { 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(262 /* VariableDeclarationList */); + const node = createBaseNode(264 /* VariableDeclarationList */); node.flags |= flags2 & 3 /* BlockScoped */; node.declarations = createNodeArray(declarations); node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -21032,7 +21061,7 @@ function createNodeFactory(flags, baseFactory2) { } function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 263 /* FunctionDeclaration */, + 265 /* FunctionDeclaration */, modifiers, name, typeParameters, @@ -21069,7 +21098,7 @@ function createNodeFactory(flags, baseFactory2) { } function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseClassLikeDeclaration( - 264 /* ClassDeclaration */, + 266 /* ClassDeclaration */, modifiers, name, typeParameters, @@ -21091,7 +21120,7 @@ function createNodeFactory(flags, baseFactory2) { } function createStructDeclaration(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseClassLikeDeclaration( - 265 /* StructDeclaration */, + 267 /* StructDeclaration */, modifiers, name, typeParameters, @@ -21113,7 +21142,7 @@ function createNodeFactory(flags, baseFactory2) { } function createAnnotationDeclaration(modifiers, name, members) { const node = createBaseNamedDeclaration( - 266 /* AnnotationDeclaration */, + 268 /* AnnotationDeclaration */, modifiers, name ); @@ -21130,9 +21159,28 @@ function createNodeFactory(flags, baseFactory2) { function updateAnnotationDeclaration(node, modifiers, name, members) { return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createAnnotationDeclaration(modifiers, name, members), node) : node; } + function createOverloadDeclaration(modifiers, name, members) { + const node = createBaseNamedDeclaration( + 269 /* OverloadDeclaration */, + modifiers, + name + ); + node.members = createNodeArray(members); + node.transformFlags |= propagateChildrenFlags(node.members); + if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + node.transformFlags = 1 /* ContainsTypeScript */; + } else { + node.transformFlags |= 1024 /* ContainsES2015 */; + node.transformFlags |= 1 /* ContainsTypeScript */; + } + return node; + } + function updateOverloadDeclaration(node, modifiers, name, members) { + return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createOverloadDeclaration(modifiers, name, members), node) : node; + } function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseInterfaceOrClassLikeDeclaration( - 267 /* InterfaceDeclaration */, + 270 /* InterfaceDeclaration */, modifiers, name, typeParameters, @@ -21154,7 +21202,7 @@ function createNodeFactory(flags, baseFactory2) { } function createTypeAliasDeclaration(modifiers, name, typeParameters, type) { const node = createBaseGenericNamedDeclaration( - 268 /* TypeAliasDeclaration */, + 271 /* TypeAliasDeclaration */, modifiers, name, typeParameters @@ -21175,7 +21223,7 @@ function createNodeFactory(flags, baseFactory2) { } function createEnumDeclaration(modifiers, name, members) { const node = createBaseNamedDeclaration( - 269 /* EnumDeclaration */, + 272 /* EnumDeclaration */, modifiers, name ); @@ -21195,7 +21243,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(270 /* ModuleDeclaration */); + const node = createBaseDeclaration(273 /* ModuleDeclaration */); node.modifiers = asNodeArray(modifiers); node.flags |= flags2 & (16 /* Namespace */ | 4 /* NestedNamespace */ | 1024 /* GlobalAugmentation */); node.name = name; @@ -21219,7 +21267,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createModuleBlock(statements) { - const node = createBaseNode(271 /* ModuleBlock */); + const node = createBaseNode(274 /* ModuleBlock */); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildrenFlags(node.statements); return node; @@ -21228,7 +21276,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createModuleBlock(statements), node) : node; } function createCaseBlock(clauses) { - const node = createBaseNode(272 /* CaseBlock */); + const node = createBaseNode(275 /* CaseBlock */); node.clauses = createNodeArray(clauses); node.transformFlags |= propagateChildrenFlags(node.clauses); return node; @@ -21238,7 +21286,7 @@ function createNodeFactory(flags, baseFactory2) { } function createNamespaceExportDeclaration(name) { const node = createBaseNamedDeclaration( - 273 /* NamespaceExportDeclaration */, + 276 /* NamespaceExportDeclaration */, void 0, name ); @@ -21259,7 +21307,7 @@ function createNodeFactory(flags, baseFactory2) { } function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) { const node = createBaseNamedDeclaration( - 274 /* ImportEqualsDeclaration */, + 277 /* ImportEqualsDeclaration */, modifiers, name ); @@ -21282,7 +21330,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(275 /* ImportDeclaration */); + const node = createBaseDeclaration(278 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; @@ -21302,7 +21350,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createImportClause(isTypeOnly, name, namedBindings) { - const node = createBaseNode(276 /* ImportClause */); + const node = createBaseNode(279 /* ImportClause */); node.isTypeOnly = isTypeOnly; node.name = name; node.namedBindings = namedBindings; @@ -21324,7 +21372,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createAssertClause(elements, multiLine) { - const node = createBaseNode(302 /* AssertClause */); + const node = createBaseNode(305 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; node.transformFlags |= 4 /* ContainsESNext */; @@ -21334,7 +21382,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; } function createAssertEntry(name, value) { - const node = createBaseNode(303 /* AssertEntry */); + const node = createBaseNode(306 /* AssertEntry */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -21344,7 +21392,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; } function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(304 /* ImportTypeAssertionContainer */); + const node = createBaseNode(307 /* ImportTypeAssertionContainer */); node.assertClause = clause; node.multiLine = multiLine; return node; @@ -21353,7 +21401,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } function createNamespaceImport(name) { - const node = createBaseNode(277 /* NamespaceImport */); + const node = createBaseNode(280 /* NamespaceImport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -21363,7 +21411,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceImport(name), node) : node; } function createNamespaceExport(name) { - const node = createBaseNode(283 /* NamespaceExport */); + const node = createBaseNode(286 /* NamespaceExport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name) | 4 /* ContainsESNext */; node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -21373,7 +21421,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceExport(name), node) : node; } function createNamedImports(elements) { - const node = createBaseNode(278 /* NamedImports */); + const node = createBaseNode(281 /* NamedImports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -21383,7 +21431,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedImports(elements), node) : node; } function createImportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseNode(279 /* ImportSpecifier */); + const node = createBaseNode(282 /* ImportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = propertyName; node.name = name; @@ -21395,7 +21443,7 @@ function createNodeFactory(flags, baseFactory2) { 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(280 /* ExportAssignment */); + const node = createBaseDeclaration(283 /* ExportAssignment */); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary(63 /* EqualsToken */, void 0, expression) : parenthesizerRules().parenthesizeExpressionOfExportDefault(expression); @@ -21414,7 +21462,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(281 /* ExportDeclaration */); + const node = createBaseDeclaration(284 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; @@ -21435,7 +21483,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createNamedExports(elements) { - const node = createBaseNode(282 /* NamedExports */); + const node = createBaseNode(285 /* NamedExports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -21445,7 +21493,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedExports(elements), node) : node; } function createExportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseNode(284 /* ExportSpecifier */); + const node = createBaseNode(287 /* ExportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = asName(propertyName); node.name = asName(name); @@ -21457,11 +21505,11 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createMissingDeclaration() { - const node = createBaseDeclaration(285 /* MissingDeclaration */); + const node = createBaseDeclaration(288 /* MissingDeclaration */); return node; } function createExternalModuleReference(expression) { - const node = createBaseNode(286 /* ExternalModuleReference */); + const node = createBaseNode(289 /* ExternalModuleReference */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -21494,7 +21542,7 @@ function createNodeFactory(flags, baseFactory2) { } function createJSDocFunctionType(parameters, type) { const node = createBaseSignatureDeclaration( - 326 /* JSDocFunctionType */, + 329 /* JSDocFunctionType */, void 0, void 0, void 0, @@ -21507,7 +21555,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; } function createJSDocTypeLiteral(propertyTags, isArrayType = false) { - const node = createBaseNode(331 /* JSDocTypeLiteral */); + const node = createBaseNode(334 /* JSDocTypeLiteral */); node.jsDocPropertyTags = asNodeArray(propertyTags); node.isArrayType = isArrayType; return node; @@ -21516,7 +21564,7 @@ function createNodeFactory(flags, baseFactory2) { return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral(propertyTags, isArrayType), node) : node; } function createJSDocTypeExpression(type) { - const node = createBaseNode(318 /* JSDocTypeExpression */); + const node = createBaseNode(321 /* JSDocTypeExpression */); node.type = type; return node; } @@ -21524,7 +21572,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createJSDocTypeExpression(type), node) : node; } function createJSDocSignature(typeParameters, parameters, type) { - const node = createBaseNode(332 /* JSDocSignature */); + const node = createBaseNode(335 /* JSDocSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; @@ -21544,7 +21592,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(353 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier("template"), comment); + const node = createBaseJSDocTag(356 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier("template"), comment); node.constraint = constraint; node.typeParameters = createNodeArray(typeParameters); return node; @@ -21553,7 +21601,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseJSDocTag(354 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier("typedef"), comment); + const node = createBaseJSDocTag(357 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier("typedef"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -21563,7 +21611,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseJSDocTag(349 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier("param"), comment); + const node = createBaseJSDocTag(352 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier("param"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -21574,7 +21622,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseJSDocTag(356 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier("prop"), comment); + const node = createBaseJSDocTag(359 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier("prop"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -21585,7 +21633,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseJSDocTag(347 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier("callback"), comment); + const node = createBaseJSDocTag(350 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier("callback"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -21595,7 +21643,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocAugmentsTag(tagName, className, comment) { - const node = createBaseJSDocTag(337 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier("augments"), comment); + const node = createBaseJSDocTag(340 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier("augments"), comment); node.class = className; return node; } @@ -21603,12 +21651,12 @@ function createNodeFactory(flags, baseFactory2) { 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(338 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier("implements"), comment); + const node = createBaseJSDocTag(341 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier("implements"), comment); node.class = className; return node; } function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(355 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier("see"), comment); + const node = createBaseJSDocTag(358 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier("see"), comment); node.name = name; return node; } @@ -21616,7 +21664,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; } function createJSDocNameReference(name) { - const node = createBaseNode(319 /* JSDocNameReference */); + const node = createBaseNode(322 /* JSDocNameReference */); node.name = name; return node; } @@ -21624,7 +21672,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocNameReference(name), node) : node; } function createJSDocMemberName(left, right) { - const node = createBaseNode(320 /* JSDocMemberName */); + const node = createBaseNode(323 /* JSDocMemberName */); node.left = left; node.right = right; node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); @@ -21634,7 +21682,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; } function createJSDocLink(name, text) { - const node = createBaseNode(333 /* JSDocLink */); + const node = createBaseNode(336 /* JSDocLink */); node.name = name; node.text = text; return node; @@ -21643,7 +21691,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLink(name, text), node) : node; } function createJSDocLinkCode(name, text) { - const node = createBaseNode(334 /* JSDocLinkCode */); + const node = createBaseNode(337 /* JSDocLinkCode */); node.name = name; node.text = text; return node; @@ -21652,7 +21700,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; } function createJSDocLinkPlain(name, text) { - const node = createBaseNode(335 /* JSDocLinkPlain */); + const node = createBaseNode(338 /* JSDocLinkPlain */); node.name = name; node.text = text; return node; @@ -21679,14 +21727,14 @@ function createNodeFactory(flags, baseFactory2) { 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(336 /* JSDocTag */, tagName, comment); + const node = createBaseJSDocTag(339 /* JSDocTag */, tagName, comment); return node; } function updateJSDocUnknownTag(node, tagName, comment) { return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; } function createJSDocText(text) { - const node = createBaseNode(330 /* JSDocText */); + const node = createBaseNode(333 /* JSDocText */); node.text = text; return node; } @@ -21694,7 +21742,7 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text ? update(createJSDocText(text), node) : node; } function createJSDocComment(comment, tags) { - const node = createBaseNode(329 /* JSDoc */); + const node = createBaseNode(332 /* JSDoc */); node.comment = comment; node.tags = asNodeArray(tags); return node; @@ -21703,7 +21751,7 @@ function createNodeFactory(flags, baseFactory2) { return node.comment !== comment || node.tags !== tags ? update(createJSDocComment(comment, tags), node) : node; } function createJsxElement(openingElement, children, closingElement) { - const node = createBaseNode(287 /* JsxElement */); + const node = createBaseNode(290 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -21714,7 +21762,7 @@ function createNodeFactory(flags, baseFactory2) { 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(288 /* JsxSelfClosingElement */); + const node = createBaseNode(291 /* JsxSelfClosingElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -21728,7 +21776,7 @@ function createNodeFactory(flags, baseFactory2) { 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(289 /* JsxOpeningElement */); + const node = createBaseNode(292 /* JsxOpeningElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -21742,7 +21790,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement(tagName, typeArguments, attributes), node) : node; } function createJsxClosingElement(tagName) { - const node = createBaseNode(290 /* JsxClosingElement */); + const node = createBaseNode(293 /* JsxClosingElement */); node.tagName = tagName; node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; return node; @@ -21751,7 +21799,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName ? update(createJsxClosingElement(tagName), node) : node; } function createJsxFragment(openingFragment, children, closingFragment) { - const node = createBaseNode(291 /* JsxFragment */); + const node = createBaseNode(294 /* JsxFragment */); node.openingFragment = openingFragment; node.children = createNodeArray(children); node.closingFragment = closingFragment; @@ -21772,17 +21820,17 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText(text, containsOnlyTriviaWhiteSpaces), node) : node; } function createJsxOpeningFragment() { - const node = createBaseNode(292 /* JsxOpeningFragment */); + const node = createBaseNode(295 /* JsxOpeningFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxJsxClosingFragment() { - const node = createBaseNode(293 /* JsxClosingFragment */); + const node = createBaseNode(296 /* JsxClosingFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxAttribute(name, initializer) { - const node = createBaseNode(294 /* JsxAttribute */); + const node = createBaseNode(297 /* JsxAttribute */); node.name = name; node.initializer = initializer; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; @@ -21792,7 +21840,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node; } function createJsxAttributes(properties) { - const node = createBaseNode(295 /* JsxAttributes */); + const node = createBaseNode(298 /* JsxAttributes */); node.properties = createNodeArray(properties); node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; return node; @@ -21801,7 +21849,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createJsxAttributes(properties), node) : node; } function createJsxSpreadAttribute(expression) { - const node = createBaseNode(296 /* JsxSpreadAttribute */); + const node = createBaseNode(299 /* JsxSpreadAttribute */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; return node; @@ -21810,7 +21858,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxSpreadAttribute(expression), node) : node; } function createJsxExpression(dotDotDotToken, expression) { - const node = createBaseNode(297 /* JsxExpression */); + const node = createBaseNode(300 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; @@ -21820,7 +21868,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxExpression(node.dotDotDotToken, expression), node) : node; } function createCaseClause(expression, statements) { - const node = createBaseNode(298 /* CaseClause */); + const node = createBaseNode(301 /* CaseClause */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); @@ -21830,7 +21878,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statements !== statements ? update(createCaseClause(expression, statements), node) : node; } function createDefaultClause(statements) { - const node = createBaseNode(299 /* DefaultClause */); + const node = createBaseNode(302 /* DefaultClause */); node.statements = createNodeArray(statements); node.transformFlags = propagateChildrenFlags(node.statements); return node; @@ -21839,7 +21887,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createDefaultClause(statements), node) : node; } function createHeritageClause(token, types) { - const node = createBaseNode(300 /* HeritageClause */); + const node = createBaseNode(303 /* HeritageClause */); node.token = token; node.types = createNodeArray(types); node.transformFlags |= propagateChildrenFlags(node.types); @@ -21859,7 +21907,7 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createHeritageClause(node.token, types), node) : node; } function createCatchClause(variableDeclaration, block) { - const node = createBaseNode(301 /* CatchClause */); + const node = createBaseNode(304 /* CatchClause */); if (typeof variableDeclaration === "string" || variableDeclaration && !isVariableDeclaration(variableDeclaration)) { variableDeclaration = createVariableDeclaration( variableDeclaration, @@ -21880,7 +21928,7 @@ function createNodeFactory(flags, baseFactory2) { } function createPropertyAssignment(name, initializer) { const node = createBaseNamedDeclaration( - 305 /* PropertyAssignment */, + 308 /* PropertyAssignment */, void 0, name ); @@ -21906,7 +21954,7 @@ function createNodeFactory(flags, baseFactory2) { } function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { const node = createBaseNamedDeclaration( - 306 /* ShorthandPropertyAssignment */, + 309 /* ShorthandPropertyAssignment */, void 0, name ); @@ -21933,7 +21981,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createSpreadAssignment(expression) { - const node = createBaseNode(307 /* SpreadAssignment */); + const node = createBaseNode(310 /* SpreadAssignment */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; return node; @@ -21942,7 +21990,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node; } function createEnumMember(name, initializer) { - const node = createBaseNode(308 /* EnumMember */); + const node = createBaseNode(311 /* EnumMember */); node.name = asName(name); node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; @@ -21952,7 +22000,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createEnumMember(name, initializer), node) : node; } function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(314 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(317 /* SourceFile */); node.statements = createNodeArray(statements); node.endOfFileToken = endOfFileToken; node.flags |= flags2; @@ -21967,7 +22015,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) { - const node = source.redirectInfo ? Object.create(source.redirectInfo.redirectTarget) : baseFactory2.createBaseSourceFileNode(314 /* SourceFile */); + const node = source.redirectInfo ? Object.create(source.redirectInfo.redirectTarget) : baseFactory2.createBaseSourceFileNode(317 /* SourceFile */); for (const p in source) { if (p === "emitNode" || hasProperty(node, p) || !hasProperty(source, p)) continue; @@ -21989,7 +22037,7 @@ function createNodeFactory(flags, baseFactory2) { 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(315 /* Bundle */); + const node = createBaseNode(318 /* Bundle */); node.prepends = prepends; node.sourceFiles = sourceFiles; return node; @@ -21998,7 +22046,7 @@ function createNodeFactory(flags, baseFactory2) { return node.sourceFiles !== sourceFiles || node.prepends !== prepends ? update(createBundle(sourceFiles, prepends), node) : node; } function createUnparsedSource(prologues, syntheticReferences, texts) { - const node = createBaseNode(316 /* UnparsedSource */); + const node = createBaseNode(319 /* UnparsedSource */); node.prologues = prologues; node.syntheticReferences = syntheticReferences; node.texts = texts; @@ -22015,48 +22063,48 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createUnparsedPrologue(data) { - return createBaseUnparsedNode(309 /* UnparsedPrologue */, data); + return createBaseUnparsedNode(312 /* UnparsedPrologue */, data); } function createUnparsedPrepend(data, texts) { - const node = createBaseUnparsedNode(310 /* UnparsedPrepend */, data); + const node = createBaseUnparsedNode(313 /* UnparsedPrepend */, data); node.texts = texts; return node; } function createUnparsedTextLike(data, internal) { - return createBaseUnparsedNode(internal ? 312 /* UnparsedInternalText */ : 311 /* UnparsedText */, data); + return createBaseUnparsedNode(internal ? 315 /* UnparsedInternalText */ : 314 /* UnparsedText */, data); } function createUnparsedSyntheticReference(section) { - const node = createBaseNode(313 /* UnparsedSyntheticReference */); + const node = createBaseNode(316 /* UnparsedSyntheticReference */); node.data = section.data; node.section = section; return node; } function createInputFiles2() { - const node = createBaseNode(317 /* InputFiles */); + const node = createBaseNode(320 /* InputFiles */); node.javascriptText = ""; node.declarationText = ""; return node; } function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(238 /* SyntheticExpression */); + const node = createBaseNode(240 /* SyntheticExpression */); node.type = type; node.isSpread = isSpread; node.tupleNameSource = tupleNameSource; return node; } function createSyntaxList(children) { - const node = createBaseNode(357 /* SyntaxList */); + const node = createBaseNode(360 /* SyntaxList */); node._children = children; return node; } function createNotEmittedStatement(original) { - const node = createBaseNode(358 /* NotEmittedStatement */); + const node = createBaseNode(361 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; } function createPartiallyEmittedExpression(expression, original) { - const node = createBaseNode(359 /* PartiallyEmittedExpression */); + const node = createBaseNode(362 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -22078,7 +22126,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createCommaListExpression(elements) { - const node = createBaseNode(360 /* CommaListExpression */); + const node = createBaseNode(363 /* CommaListExpression */); node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements)); node.transformFlags |= propagateChildrenFlags(node.elements); return node; @@ -22087,19 +22135,19 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; } function createEndOfDeclarationMarker(original) { - const node = createBaseNode(362 /* EndOfDeclarationMarker */); + const node = createBaseNode(365 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createMergeDeclarationMarker(original) { - const node = createBaseNode(361 /* MergeDeclarationMarker */); + const node = createBaseNode(364 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(363 /* SyntheticReferenceExpression */); + const node = createBaseNode(366 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); @@ -22112,7 +22160,7 @@ function createNodeFactory(flags, baseFactory2) { if (node === void 0) { return node; } - const clone2 = isSourceFile(node) ? baseFactory2.createBaseSourceFileNode(314 /* SourceFile */) : isIdentifier(node) ? baseFactory2.createBaseIdentifierNode(79 /* Identifier */) : isPrivateIdentifier(node) ? baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */) : !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind); + const clone2 = isSourceFile(node) ? baseFactory2.createBaseSourceFileNode(317 /* SourceFile */) : isIdentifier(node) ? baseFactory2.createBaseIdentifierNode(79 /* Identifier */) : isPrivateIdentifier(node) ? baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */) : !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind); clone2.flags |= node.flags & ~8 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); @@ -22237,17 +22285,17 @@ function createNodeFactory(flags, baseFactory2) { } function updateOuterExpression(outerExpression, expression) { switch (outerExpression.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return updateParenthesizedExpression(outerExpression, expression); - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: return updateTypeAssertion(outerExpression, outerExpression.type, expression); - case 235 /* AsExpression */: + case 237 /* AsExpression */: return updateAsExpression(outerExpression, expression, outerExpression.type); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return updateNonNullExpression(outerExpression, expression); - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression(outerExpression, expression); } } @@ -22287,13 +22335,13 @@ function createNodeFactory(flags, baseFactory2) { case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: return false; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: const elements = target.elements; if (elements.length === 0) { return false; } return true; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -22540,7 +22588,7 @@ function createNodeFactory(flags, baseFactory2) { } else { modifierArray = modifiers; } - return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, (_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isStructDeclaration(node) ? updateStructDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isAnnotationDeclaration(node) ? updateAnnotationDeclaration(node, modifierArray, node.name, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); + return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isOverloadPropertyDeclaration(node) ? updateOverloadPropertyDeclaration(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, (_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isStructDeclaration(node) ? updateStructDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isAnnotationDeclaration(node) ? updateAnnotationDeclaration(node, modifierArray, node.name, node.members) : isOverloadDeclaration(node) ? updateOverloadDeclaration(node, modifierArray, node.name, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); } function asNodeArray(array) { return array ? createNodeArray(array) : void 0; @@ -22573,41 +22621,41 @@ function updateWithOriginal(updated, original) { } function getDefaultTagNameForKind(kind) { switch (kind) { - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: return "type"; - case 350 /* JSDocReturnTag */: + case 353 /* JSDocReturnTag */: return "returns"; - case 351 /* JSDocThisTag */: + case 354 /* JSDocThisTag */: return "this"; - case 348 /* JSDocEnumTag */: + case 351 /* JSDocEnumTag */: return "enum"; - case 339 /* JSDocAuthorTag */: + case 342 /* JSDocAuthorTag */: return "author"; - case 341 /* JSDocClassTag */: + case 344 /* JSDocClassTag */: return "class"; - case 342 /* JSDocPublicTag */: + case 345 /* JSDocPublicTag */: return "public"; - case 343 /* JSDocPrivateTag */: + case 346 /* JSDocPrivateTag */: return "private"; - case 344 /* JSDocProtectedTag */: + case 347 /* JSDocProtectedTag */: return "protected"; - case 345 /* JSDocReadonlyTag */: + case 348 /* JSDocReadonlyTag */: return "readonly"; - case 346 /* JSDocOverrideTag */: + case 349 /* JSDocOverrideTag */: return "override"; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return "template"; - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return "typedef"; - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: return "param"; - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: return "prop"; - case 347 /* JSDocCallbackTag */: + case 350 /* JSDocCallbackTag */: return "callback"; - case 337 /* JSDocAugmentsTag */: + case 340 /* JSDocAugmentsTag */: return "augments"; - case 338 /* JSDocImplementsTag */: + case 341 /* JSDocImplementsTag */: return "implements"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); @@ -22680,35 +22728,35 @@ function aggregateChildrenFlags(children) { children.transformFlags = subtreeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */) { + if (kind >= 184 /* FirstTypeNode */ && kind <= 207 /* LastTypeNode */) { return -2 /* TypeExcludes */; } switch (kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 209 /* ArrayLiteralExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 211 /* ArrayLiteralExpression */: return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return -1941676032 /* ModuleExcludes */; - case 168 /* Parameter */: + case 169 /* Parameter */: return -2147483648 /* ParameterExcludes */; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return -2072174592 /* ArrowFunctionExcludes */; - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: return -1937940480 /* FunctionExcludes */; - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return -2146893824 /* VariableDeclarationListExcludes */; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return -2147344384 /* ClassExcludes */; - case 176 /* Constructor */: + case 178 /* Constructor */: return -1937948672 /* ConstructorExcludes */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return -2013249536 /* PropertyExcludes */; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return -2005057536 /* MethodOrAccessorExcludes */; case 132 /* AnyKeyword */: case 149 /* NumberKeyword */: @@ -22719,31 +22767,31 @@ function getTransformFlagsSubtreeExclusions(kind) { case 135 /* BooleanKeyword */: case 154 /* SymbolKeyword */: case 115 /* VoidKeyword */: - case 167 /* TypeParameter */: - case 170 /* PropertySignature */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: + case 171 /* PropertySignature */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return -2 /* TypeExcludes */; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return -2147278848 /* ObjectLiteralExcludes */; - case 301 /* CatchClause */: + case 304 /* CatchClause */: return -2147418112 /* CatchClauseExcludes */; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: return -2147450880 /* BindingPatternExcludes */; - case 216 /* TypeAssertionExpression */: - case 239 /* SatisfiesExpression */: - case 235 /* AsExpression */: - case 359 /* PartiallyEmittedExpression */: - case 217 /* ParenthesizedExpression */: + case 218 /* TypeAssertionExpression */: + case 241 /* SatisfiesExpression */: + case 237 /* AsExpression */: + case 362 /* PartiallyEmittedExpression */: + case 219 /* ParenthesizedExpression */: case 107 /* SuperKeyword */: return -2147483648 /* OuterExpressionExcludes */; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return -2147483648 /* PropertyAccessExcludes */; default: return -2147483648 /* NodeExcludes */; @@ -23044,7 +23092,7 @@ function getOrCreateEmitNode(node) { var _a2; if (!node.emitNode) { if (isParseTreeNode(node)) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } const sourceFile = (_a2 = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node)))) != null ? _a2 : Debug.fail("Could not determine parsed source file."); @@ -24043,589 +24091,595 @@ function isImportKeyword(node) { return node.kind === 101 /* ImportKeyword */; } function isQualifiedName(node) { - return node.kind === 165 /* QualifiedName */; + return node.kind === 166 /* QualifiedName */; } function isComputedPropertyName(node) { - return node.kind === 166 /* ComputedPropertyName */; + return node.kind === 167 /* ComputedPropertyName */; } function isTypeParameterDeclaration(node) { - return node.kind === 167 /* TypeParameter */; + return node.kind === 168 /* TypeParameter */; } function isParameter(node) { - return node.kind === 168 /* Parameter */; + return node.kind === 169 /* Parameter */; } function isDecoratorOrAnnotation(node) { - return node.kind === 169 /* Decorator */; + return node.kind === 170 /* Decorator */; } function isDecorator(node) { - return node.kind === 169 /* Decorator */ && node.annotationDeclaration === void 0; + return node.kind === 170 /* Decorator */ && node.annotationDeclaration === void 0; } function isAnnotation(node) { - return node.kind === 169 /* Decorator */ && node.annotationDeclaration !== void 0; + return node.kind === 170 /* Decorator */ && node.annotationDeclaration !== void 0; } function isPropertySignature(node) { - return node.kind === 170 /* PropertySignature */; + return node.kind === 171 /* PropertySignature */; +} +function isOverloadPropertyDeclaration(node) { + return node.kind === 174 /* OverloadPropertyDeclaration */; } function isPropertyDeclaration(node) { - return node.kind === 171 /* PropertyDeclaration */; + return node.kind === 172 /* PropertyDeclaration */; } function isAnnotationPropertyDeclaration(node) { - return node.kind === 172 /* AnnotationPropertyDeclaration */; + return node.kind === 173 /* AnnotationPropertyDeclaration */; } function isMethodSignature(node) { - return node.kind === 173 /* MethodSignature */; + return node.kind === 175 /* MethodSignature */; } function isMethodDeclaration(node) { - return node.kind === 174 /* MethodDeclaration */; + return node.kind === 176 /* MethodDeclaration */; } function isClassStaticBlockDeclaration(node) { - return node.kind === 175 /* ClassStaticBlockDeclaration */; + return node.kind === 177 /* ClassStaticBlockDeclaration */; } function isConstructorDeclaration(node) { - return node.kind === 176 /* Constructor */; + return node.kind === 178 /* Constructor */; } function isGetAccessorDeclaration(node) { - return node.kind === 177 /* GetAccessor */; + return node.kind === 179 /* GetAccessor */; } function isSetAccessorDeclaration(node) { - return node.kind === 178 /* SetAccessor */; + return node.kind === 180 /* SetAccessor */; } function isCallSignatureDeclaration(node) { - return node.kind === 179 /* CallSignature */; + return node.kind === 181 /* CallSignature */; } function isConstructSignatureDeclaration(node) { - return node.kind === 180 /* ConstructSignature */; + return node.kind === 182 /* ConstructSignature */; } function isIndexSignatureDeclaration(node) { - return node.kind === 181 /* IndexSignature */; + return node.kind === 183 /* IndexSignature */; } function isTypePredicateNode(node) { - return node.kind === 182 /* TypePredicate */; + return node.kind === 184 /* TypePredicate */; } function isTypeReferenceNode(node) { - return node.kind === 183 /* TypeReference */; + return node.kind === 185 /* TypeReference */; } function isFunctionTypeNode(node) { - return node.kind === 184 /* FunctionType */; + return node.kind === 186 /* FunctionType */; } function isConstructorTypeNode(node) { - return node.kind === 185 /* ConstructorType */; + return node.kind === 187 /* ConstructorType */; } function isTypeQueryNode(node) { - return node.kind === 186 /* TypeQuery */; + return node.kind === 188 /* TypeQuery */; } function isTypeLiteralNode(node) { - return node.kind === 187 /* TypeLiteral */; + return node.kind === 189 /* TypeLiteral */; } function isArrayTypeNode(node) { - return node.kind === 188 /* ArrayType */; + return node.kind === 190 /* ArrayType */; } function isTupleTypeNode(node) { - return node.kind === 189 /* TupleType */; + return node.kind === 191 /* TupleType */; } function isNamedTupleMember(node) { - return node.kind === 202 /* NamedTupleMember */; + return node.kind === 204 /* NamedTupleMember */; } function isOptionalTypeNode(node) { - return node.kind === 190 /* OptionalType */; + return node.kind === 192 /* OptionalType */; } function isRestTypeNode(node) { - return node.kind === 191 /* RestType */; + return node.kind === 193 /* RestType */; } function isUnionTypeNode(node) { - return node.kind === 192 /* UnionType */; + return node.kind === 194 /* UnionType */; } function isIntersectionTypeNode(node) { - return node.kind === 193 /* IntersectionType */; + return node.kind === 195 /* IntersectionType */; } function isConditionalTypeNode(node) { - return node.kind === 194 /* ConditionalType */; + return node.kind === 196 /* ConditionalType */; } function isInferTypeNode(node) { - return node.kind === 195 /* InferType */; + return node.kind === 197 /* InferType */; } function isParenthesizedTypeNode(node) { - return node.kind === 196 /* ParenthesizedType */; + return node.kind === 198 /* ParenthesizedType */; } function isThisTypeNode(node) { - return node.kind === 197 /* ThisType */; + return node.kind === 199 /* ThisType */; } function isTypeOperatorNode(node) { - return node.kind === 198 /* TypeOperator */; + return node.kind === 200 /* TypeOperator */; } function isIndexedAccessTypeNode(node) { - return node.kind === 199 /* IndexedAccessType */; + return node.kind === 201 /* IndexedAccessType */; } function isMappedTypeNode(node) { - return node.kind === 200 /* MappedType */; + return node.kind === 202 /* MappedType */; } function isLiteralTypeNode(node) { - return node.kind === 201 /* LiteralType */; + return node.kind === 203 /* LiteralType */; } function isImportTypeNode(node) { - return node.kind === 205 /* ImportType */; + return node.kind === 207 /* ImportType */; } function isTemplateLiteralTypeSpan(node) { - return node.kind === 204 /* TemplateLiteralTypeSpan */; + return node.kind === 206 /* TemplateLiteralTypeSpan */; } function isTemplateLiteralTypeNode(node) { - return node.kind === 203 /* TemplateLiteralType */; + return node.kind === 205 /* TemplateLiteralType */; } function isObjectBindingPattern(node) { - return node.kind === 206 /* ObjectBindingPattern */; + return node.kind === 208 /* ObjectBindingPattern */; } function isArrayBindingPattern(node) { - return node.kind === 207 /* ArrayBindingPattern */; + return node.kind === 209 /* ArrayBindingPattern */; } function isBindingElement(node) { - return node.kind === 208 /* BindingElement */; + return node.kind === 210 /* BindingElement */; } function isArrayLiteralExpression(node) { - return node.kind === 209 /* ArrayLiteralExpression */; + return node.kind === 211 /* ArrayLiteralExpression */; } function isObjectLiteralExpression(node) { - return node.kind === 210 /* ObjectLiteralExpression */; + return node.kind === 212 /* ObjectLiteralExpression */; } function isPropertyAccessExpression(node) { - return node.kind === 211 /* PropertyAccessExpression */; + return node.kind === 213 /* PropertyAccessExpression */; } function isElementAccessExpression(node) { - return node.kind === 212 /* ElementAccessExpression */; + return node.kind === 214 /* ElementAccessExpression */; } function isCallExpression(node) { - return node.kind === 213 /* CallExpression */; + return node.kind === 215 /* CallExpression */; } function isNewExpression(node) { - return node.kind === 214 /* NewExpression */; + return node.kind === 216 /* NewExpression */; } function isTaggedTemplateExpression(node) { - return node.kind === 215 /* TaggedTemplateExpression */; + return node.kind === 217 /* TaggedTemplateExpression */; } function isTypeAssertionExpression(node) { - return node.kind === 216 /* TypeAssertionExpression */; + return node.kind === 218 /* TypeAssertionExpression */; } function isParenthesizedExpression(node) { - return node.kind === 217 /* ParenthesizedExpression */; + return node.kind === 219 /* ParenthesizedExpression */; } function isFunctionExpression(node) { - return node.kind === 218 /* FunctionExpression */; + return node.kind === 220 /* FunctionExpression */; } function isEtsComponentExpression(node) { - return node.kind === 220 /* EtsComponentExpression */; + return node.kind === 222 /* EtsComponentExpression */; } function isArrowFunction(node) { - return node.kind === 219 /* ArrowFunction */; + return node.kind === 221 /* ArrowFunction */; } function isDeleteExpression(node) { - return node.kind === 221 /* DeleteExpression */; + return node.kind === 223 /* DeleteExpression */; } function isTypeOfExpression(node) { - return node.kind === 222 /* TypeOfExpression */; + return node.kind === 224 /* TypeOfExpression */; } function isVoidExpression(node) { - return node.kind === 223 /* VoidExpression */; + return node.kind === 225 /* VoidExpression */; } function isAwaitExpression(node) { - return node.kind === 224 /* AwaitExpression */; + return node.kind === 226 /* AwaitExpression */; } function isPrefixUnaryExpression(node) { - return node.kind === 225 /* PrefixUnaryExpression */; + return node.kind === 227 /* PrefixUnaryExpression */; } function isPostfixUnaryExpression(node) { - return node.kind === 226 /* PostfixUnaryExpression */; + return node.kind === 228 /* PostfixUnaryExpression */; } function isBinaryExpression(node) { - return node.kind === 227 /* BinaryExpression */; + return node.kind === 229 /* BinaryExpression */; } function isConditionalExpression(node) { - return node.kind === 228 /* ConditionalExpression */; + return node.kind === 230 /* ConditionalExpression */; } function isTemplateExpression(node) { - return node.kind === 229 /* TemplateExpression */; + return node.kind === 231 /* TemplateExpression */; } function isYieldExpression(node) { - return node.kind === 230 /* YieldExpression */; + return node.kind === 232 /* YieldExpression */; } function isSpreadElement(node) { - return node.kind === 231 /* SpreadElement */; + return node.kind === 233 /* SpreadElement */; } function isClassExpression(node) { - return node.kind === 232 /* ClassExpression */; + return node.kind === 234 /* ClassExpression */; } function isOmittedExpression(node) { - return node.kind === 233 /* OmittedExpression */; + return node.kind === 235 /* OmittedExpression */; } function isExpressionWithTypeArguments(node) { - return node.kind === 234 /* ExpressionWithTypeArguments */; + return node.kind === 236 /* ExpressionWithTypeArguments */; } function isAsExpression(node) { - return node.kind === 235 /* AsExpression */; + return node.kind === 237 /* AsExpression */; } function isSatisfiesExpression(node) { - return node.kind === 239 /* SatisfiesExpression */; + return node.kind === 241 /* SatisfiesExpression */; } function isNonNullExpression(node) { - return node.kind === 236 /* NonNullExpression */; + return node.kind === 238 /* NonNullExpression */; } function isMetaProperty(node) { - return node.kind === 237 /* MetaProperty */; + return node.kind === 239 /* MetaProperty */; } function isSyntheticExpression(node) { - return node.kind === 238 /* SyntheticExpression */; + return node.kind === 240 /* SyntheticExpression */; } function isPartiallyEmittedExpression(node) { - return node.kind === 359 /* PartiallyEmittedExpression */; + return node.kind === 362 /* PartiallyEmittedExpression */; } function isCommaListExpression(node) { - return node.kind === 360 /* CommaListExpression */; + return node.kind === 363 /* CommaListExpression */; } function isTemplateSpan(node) { - return node.kind === 240 /* TemplateSpan */; + return node.kind === 242 /* TemplateSpan */; } function isSemicolonClassElement(node) { - return node.kind === 241 /* SemicolonClassElement */; + return node.kind === 243 /* SemicolonClassElement */; } function isBlock(node) { - return node.kind === 242 /* Block */; + return node.kind === 244 /* Block */; } function isVariableStatement(node) { - return node.kind === 244 /* VariableStatement */; + return node.kind === 246 /* VariableStatement */; } function isEmptyStatement(node) { - return node.kind === 243 /* EmptyStatement */; + return node.kind === 245 /* EmptyStatement */; } function isExpressionStatement(node) { - return node.kind === 245 /* ExpressionStatement */; + return node.kind === 247 /* ExpressionStatement */; } function isIfStatement(node) { - return node.kind === 246 /* IfStatement */; + return node.kind === 248 /* IfStatement */; } function isDoStatement(node) { - return node.kind === 247 /* DoStatement */; + return node.kind === 249 /* DoStatement */; } function isWhileStatement(node) { - return node.kind === 248 /* WhileStatement */; + return node.kind === 250 /* WhileStatement */; } function isForStatement(node) { - return node.kind === 249 /* ForStatement */; + return node.kind === 251 /* ForStatement */; } function isForInStatement(node) { - return node.kind === 250 /* ForInStatement */; + return node.kind === 252 /* ForInStatement */; } function isForOfStatement(node) { - return node.kind === 251 /* ForOfStatement */; + return node.kind === 253 /* ForOfStatement */; } function isContinueStatement(node) { - return node.kind === 252 /* ContinueStatement */; + return node.kind === 254 /* ContinueStatement */; } function isBreakStatement(node) { - return node.kind === 253 /* BreakStatement */; + return node.kind === 255 /* BreakStatement */; } function isReturnStatement(node) { - return node.kind === 254 /* ReturnStatement */; + return node.kind === 256 /* ReturnStatement */; } function isWithStatement(node) { - return node.kind === 255 /* WithStatement */; + return node.kind === 257 /* WithStatement */; } function isSwitchStatement(node) { - return node.kind === 256 /* SwitchStatement */; + return node.kind === 258 /* SwitchStatement */; } function isLabeledStatement(node) { - return node.kind === 257 /* LabeledStatement */; + return node.kind === 259 /* LabeledStatement */; } function isThrowStatement(node) { - return node.kind === 258 /* ThrowStatement */; + return node.kind === 260 /* ThrowStatement */; } function isTryStatement(node) { - return node.kind === 259 /* TryStatement */; + return node.kind === 261 /* TryStatement */; } function isDebuggerStatement(node) { - return node.kind === 260 /* DebuggerStatement */; + return node.kind === 262 /* DebuggerStatement */; } function isVariableDeclaration(node) { - return node.kind === 261 /* VariableDeclaration */; + return node.kind === 263 /* VariableDeclaration */; } function isVariableDeclarationList(node) { - return node.kind === 262 /* VariableDeclarationList */; + return node.kind === 264 /* VariableDeclarationList */; } function isFunctionDeclaration(node) { - return node.kind === 263 /* FunctionDeclaration */; + return node.kind === 265 /* FunctionDeclaration */; } function isClassDeclaration(node) { - return node.kind === 264 /* ClassDeclaration */; + return node.kind === 266 /* ClassDeclaration */; } function isStructDeclaration(node) { - return node.kind === 265 /* StructDeclaration */; + return node.kind === 267 /* StructDeclaration */; } function isAnnotationDeclaration(node) { - return node.kind === 266 /* AnnotationDeclaration */; + return node.kind === 268 /* AnnotationDeclaration */; +} +function isOverloadDeclaration(node) { + return node.kind === 269 /* OverloadDeclaration */; } function isInterfaceDeclaration(node) { - return node.kind === 267 /* InterfaceDeclaration */; + return node.kind === 270 /* InterfaceDeclaration */; } function isTypeAliasDeclaration(node) { - return node.kind === 268 /* TypeAliasDeclaration */; + return node.kind === 271 /* TypeAliasDeclaration */; } function isEnumDeclaration(node) { - return node.kind === 269 /* EnumDeclaration */; + return node.kind === 272 /* EnumDeclaration */; } function isModuleDeclaration(node) { - return node.kind === 270 /* ModuleDeclaration */; + return node.kind === 273 /* ModuleDeclaration */; } function isModuleBlock(node) { - return node.kind === 271 /* ModuleBlock */; + return node.kind === 274 /* ModuleBlock */; } function isCaseBlock(node) { - return node.kind === 272 /* CaseBlock */; + return node.kind === 275 /* CaseBlock */; } function isNamespaceExportDeclaration(node) { - return node.kind === 273 /* NamespaceExportDeclaration */; + return node.kind === 276 /* NamespaceExportDeclaration */; } function isImportEqualsDeclaration(node) { - return node.kind === 274 /* ImportEqualsDeclaration */; + return node.kind === 277 /* ImportEqualsDeclaration */; } function isImportDeclaration(node) { - return node.kind === 275 /* ImportDeclaration */; + return node.kind === 278 /* ImportDeclaration */; } function isImportClause(node) { - return node.kind === 276 /* ImportClause */; + return node.kind === 279 /* ImportClause */; } function isImportTypeAssertionContainer(node) { - return node.kind === 304 /* ImportTypeAssertionContainer */; + return node.kind === 307 /* ImportTypeAssertionContainer */; } function isAssertClause(node) { - return node.kind === 302 /* AssertClause */; + return node.kind === 305 /* AssertClause */; } function isAssertEntry(node) { - return node.kind === 303 /* AssertEntry */; + return node.kind === 306 /* AssertEntry */; } function isNamespaceImport(node) { - return node.kind === 277 /* NamespaceImport */; + return node.kind === 280 /* NamespaceImport */; } function isNamespaceExport(node) { - return node.kind === 283 /* NamespaceExport */; + return node.kind === 286 /* NamespaceExport */; } function isNamedImports(node) { - return node.kind === 278 /* NamedImports */; + return node.kind === 281 /* NamedImports */; } function isImportSpecifier(node) { - return node.kind === 279 /* ImportSpecifier */; + return node.kind === 282 /* ImportSpecifier */; } function isExportAssignment(node) { - return node.kind === 280 /* ExportAssignment */; + return node.kind === 283 /* ExportAssignment */; } function isExportDeclaration(node) { - return node.kind === 281 /* ExportDeclaration */; + return node.kind === 284 /* ExportDeclaration */; } function isNamedExports(node) { - return node.kind === 282 /* NamedExports */; + return node.kind === 285 /* NamedExports */; } function isExportSpecifier(node) { - return node.kind === 284 /* ExportSpecifier */; + return node.kind === 287 /* ExportSpecifier */; } function isMissingDeclaration(node) { - return node.kind === 285 /* MissingDeclaration */; + return node.kind === 288 /* MissingDeclaration */; } function isNotEmittedStatement(node) { - return node.kind === 358 /* NotEmittedStatement */; + return node.kind === 361 /* NotEmittedStatement */; } function isSyntheticReference(node) { - return node.kind === 363 /* SyntheticReferenceExpression */; + return node.kind === 366 /* SyntheticReferenceExpression */; } function isMergeDeclarationMarker(node) { - return node.kind === 361 /* MergeDeclarationMarker */; + return node.kind === 364 /* MergeDeclarationMarker */; } function isEndOfDeclarationMarker(node) { - return node.kind === 362 /* EndOfDeclarationMarker */; + return node.kind === 365 /* EndOfDeclarationMarker */; } function isExternalModuleReference(node) { - return node.kind === 286 /* ExternalModuleReference */; + return node.kind === 289 /* ExternalModuleReference */; } function isJsxElement(node) { - return node.kind === 287 /* JsxElement */; + return node.kind === 290 /* JsxElement */; } function isJsxSelfClosingElement(node) { - return node.kind === 288 /* JsxSelfClosingElement */; + return node.kind === 291 /* JsxSelfClosingElement */; } function isJsxOpeningElement(node) { - return node.kind === 289 /* JsxOpeningElement */; + return node.kind === 292 /* JsxOpeningElement */; } function isJsxClosingElement(node) { - return node.kind === 290 /* JsxClosingElement */; + return node.kind === 293 /* JsxClosingElement */; } function isJsxFragment(node) { - return node.kind === 291 /* JsxFragment */; + return node.kind === 294 /* JsxFragment */; } function isJsxOpeningFragment(node) { - return node.kind === 292 /* JsxOpeningFragment */; + return node.kind === 295 /* JsxOpeningFragment */; } function isJsxClosingFragment(node) { - return node.kind === 293 /* JsxClosingFragment */; + return node.kind === 296 /* JsxClosingFragment */; } function isJsxAttribute(node) { - return node.kind === 294 /* JsxAttribute */; + return node.kind === 297 /* JsxAttribute */; } function isJsxAttributes(node) { - return node.kind === 295 /* JsxAttributes */; + return node.kind === 298 /* JsxAttributes */; } function isJsxSpreadAttribute(node) { - return node.kind === 296 /* JsxSpreadAttribute */; + return node.kind === 299 /* JsxSpreadAttribute */; } function isJsxExpression(node) { - return node.kind === 297 /* JsxExpression */; + return node.kind === 300 /* JsxExpression */; } function isCaseClause(node) { - return node.kind === 298 /* CaseClause */; + return node.kind === 301 /* CaseClause */; } function isDefaultClause(node) { - return node.kind === 299 /* DefaultClause */; + return node.kind === 302 /* DefaultClause */; } function isHeritageClause(node) { - return node.kind === 300 /* HeritageClause */; + return node.kind === 303 /* HeritageClause */; } function isCatchClause(node) { - return node.kind === 301 /* CatchClause */; + return node.kind === 304 /* CatchClause */; } function isPropertyAssignment(node) { - return node.kind === 305 /* PropertyAssignment */; + return node.kind === 308 /* PropertyAssignment */; } function isShorthandPropertyAssignment(node) { - return node.kind === 306 /* ShorthandPropertyAssignment */; + return node.kind === 309 /* ShorthandPropertyAssignment */; } function isSpreadAssignment(node) { - return node.kind === 307 /* SpreadAssignment */; + return node.kind === 310 /* SpreadAssignment */; } function isEnumMember(node) { - return node.kind === 308 /* EnumMember */; + return node.kind === 311 /* EnumMember */; } function isUnparsedPrepend(node) { - return node.kind === 310 /* UnparsedPrepend */; + return node.kind === 313 /* UnparsedPrepend */; } function isSourceFile(node) { - return node.kind === 314 /* SourceFile */; + return node.kind === 317 /* SourceFile */; } function isBundle(node) { - return node.kind === 315 /* Bundle */; + return node.kind === 318 /* Bundle */; } function isUnparsedSource(node) { - return node.kind === 316 /* UnparsedSource */; + return node.kind === 319 /* UnparsedSource */; } function isJSDocTypeExpression(node) { - return node.kind === 318 /* JSDocTypeExpression */; + return node.kind === 321 /* JSDocTypeExpression */; } function isJSDocNameReference(node) { - return node.kind === 319 /* JSDocNameReference */; + return node.kind === 322 /* JSDocNameReference */; } function isJSDocMemberName(node) { - return node.kind === 320 /* JSDocMemberName */; + return node.kind === 323 /* JSDocMemberName */; } function isJSDocLink(node) { - return node.kind === 333 /* JSDocLink */; + return node.kind === 336 /* JSDocLink */; } function isJSDocLinkCode(node) { - return node.kind === 334 /* JSDocLinkCode */; + return node.kind === 337 /* JSDocLinkCode */; } function isJSDocLinkPlain(node) { - return node.kind === 335 /* JSDocLinkPlain */; + return node.kind === 338 /* JSDocLinkPlain */; } function isJSDocAllType(node) { - return node.kind === 321 /* JSDocAllType */; + return node.kind === 324 /* JSDocAllType */; } function isJSDocUnknownType(node) { - return node.kind === 322 /* JSDocUnknownType */; + return node.kind === 325 /* JSDocUnknownType */; } function isJSDocNullableType(node) { - return node.kind === 323 /* JSDocNullableType */; + return node.kind === 326 /* JSDocNullableType */; } function isJSDocNonNullableType(node) { - return node.kind === 324 /* JSDocNonNullableType */; + return node.kind === 327 /* JSDocNonNullableType */; } function isJSDocOptionalType(node) { - return node.kind === 325 /* JSDocOptionalType */; + return node.kind === 328 /* JSDocOptionalType */; } function isJSDocFunctionType(node) { - return node.kind === 326 /* JSDocFunctionType */; + return node.kind === 329 /* JSDocFunctionType */; } function isJSDocVariadicType(node) { - return node.kind === 327 /* JSDocVariadicType */; + return node.kind === 330 /* JSDocVariadicType */; } function isJSDocNamepathType(node) { - return node.kind === 328 /* JSDocNamepathType */; + return node.kind === 331 /* JSDocNamepathType */; } function isJSDoc(node) { - return node.kind === 329 /* JSDoc */; + return node.kind === 332 /* JSDoc */; } function isJSDocTypeLiteral(node) { - return node.kind === 331 /* JSDocTypeLiteral */; + return node.kind === 334 /* JSDocTypeLiteral */; } function isJSDocSignature(node) { - return node.kind === 332 /* JSDocSignature */; + return node.kind === 335 /* JSDocSignature */; } function isJSDocAugmentsTag(node) { - return node.kind === 337 /* JSDocAugmentsTag */; + return node.kind === 340 /* JSDocAugmentsTag */; } function isJSDocAuthorTag(node) { - return node.kind === 339 /* JSDocAuthorTag */; + return node.kind === 342 /* JSDocAuthorTag */; } function isJSDocClassTag(node) { - return node.kind === 341 /* JSDocClassTag */; + return node.kind === 344 /* JSDocClassTag */; } function isJSDocCallbackTag(node) { - return node.kind === 347 /* JSDocCallbackTag */; + return node.kind === 350 /* JSDocCallbackTag */; } function isJSDocPublicTag(node) { - return node.kind === 342 /* JSDocPublicTag */; + return node.kind === 345 /* JSDocPublicTag */; } function isJSDocPrivateTag(node) { - return node.kind === 343 /* JSDocPrivateTag */; + return node.kind === 346 /* JSDocPrivateTag */; } function isJSDocProtectedTag(node) { - return node.kind === 344 /* JSDocProtectedTag */; + return node.kind === 347 /* JSDocProtectedTag */; } function isJSDocReadonlyTag(node) { - return node.kind === 345 /* JSDocReadonlyTag */; + return node.kind === 348 /* JSDocReadonlyTag */; } function isJSDocOverrideTag(node) { - return node.kind === 346 /* JSDocOverrideTag */; + return node.kind === 349 /* JSDocOverrideTag */; } function isJSDocDeprecatedTag(node) { - return node.kind === 340 /* JSDocDeprecatedTag */; + return node.kind === 343 /* JSDocDeprecatedTag */; } function isJSDocSeeTag(node) { - return node.kind === 355 /* JSDocSeeTag */; + return node.kind === 358 /* JSDocSeeTag */; } function isJSDocEnumTag(node) { - return node.kind === 348 /* JSDocEnumTag */; + return node.kind === 351 /* JSDocEnumTag */; } function isJSDocParameterTag(node) { - return node.kind === 349 /* JSDocParameterTag */; + return node.kind === 352 /* JSDocParameterTag */; } function isJSDocReturnTag(node) { - return node.kind === 350 /* JSDocReturnTag */; + return node.kind === 353 /* JSDocReturnTag */; } function isJSDocThisTag(node) { - return node.kind === 351 /* JSDocThisTag */; + return node.kind === 354 /* JSDocThisTag */; } function isJSDocTypeTag(node) { - return node.kind === 352 /* JSDocTypeTag */; + return node.kind === 355 /* JSDocTypeTag */; } function isJSDocTemplateTag(node) { - return node.kind === 353 /* JSDocTemplateTag */; + return node.kind === 356 /* JSDocTemplateTag */; } function isJSDocTypedefTag(node) { - return node.kind === 354 /* JSDocTypedefTag */; + return node.kind === 357 /* JSDocTypedefTag */; } function isJSDocUnknownTag(node) { - return node.kind === 336 /* JSDocTag */; + return node.kind === 339 /* JSDocTag */; } function isJSDocPropertyTag(node) { - return node.kind === 356 /* JSDocPropertyTag */; + return node.kind === 359 /* JSDocPropertyTag */; } function isJSDocImplementsTag(node) { - return node.kind === 338 /* JSDocImplementsTag */; + return node.kind === 341 /* JSDocImplementsTag */; } function isSyntaxList(n) { - return n.kind === 357 /* SyntaxList */; + return n.kind === 360 /* SyntaxList */; } // src/compiler/factory/utilities.ts @@ -24869,14 +24923,14 @@ function createExpressionForObjectLiteralElementLike(factory2, node, property, r Debug.failBadSyntaxKind(property.name, "Private identifiers are not allowed in object literals."); } switch (property.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return createExpressionForAccessorDeclaration(factory2, node.properties, property, receiver, !!node.multiLine); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return createExpressionForPropertyAssignment(factory2, property, receiver); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return createExpressionForShorthandPropertyAssignment(factory2, property, receiver); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return createExpressionForMethodDeclaration(factory2, property, receiver); } } @@ -24929,7 +24983,7 @@ function startsWithUseStrict(statements) { return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement); } function isCommaSequence(node) { - return node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 360 /* CommaListExpression */; + return node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 363 /* CommaListExpression */; } function isJSDocTypeAssertion(node) { return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node); @@ -24941,18 +24995,18 @@ function getJSDocTypeAssertionType(node) { } function isOuterExpression(node, kinds = 15 /* All */) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { return false; } return (kinds & 1 /* Parentheses */) !== 0; - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: - case 239 /* SatisfiesExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: + case 241 /* SatisfiesExpression */: return (kinds & 2 /* TypeAssertions */) !== 0; - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return (kinds & 4 /* NonNullAssertions */) !== 0; - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -25058,10 +25112,10 @@ function getLocalNameForExternalImport(factory2, node, sourceFile) { const name = namespaceDeclaration.name; return isGeneratedIdentifier(name) ? name : factory2.createIdentifier(getSourceTextOfNodeFromSourceFile(sourceFile, name) || idText(name)); } - if (node.kind === 275 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 278 /* ImportDeclaration */ && node.importClause) { return factory2.getGeneratedNameForNode(node); } - if (node.kind === 281 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 284 /* ExportDeclaration */ && node.moduleSpecifier) { return factory2.getGeneratedNameForNode(node); } return void 0; @@ -25116,11 +25170,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } if (isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return bindingElement.name; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } } @@ -25134,11 +25188,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 168 /* Parameter */: - case 208 /* BindingElement */: + case 169 /* Parameter */: + case 210 /* BindingElement */: return bindingElement.dotDotDotToken; - case 231 /* SpreadElement */: - case 307 /* SpreadAssignment */: + case 233 /* SpreadElement */: + case 310 /* SpreadAssignment */: return bindingElement; } return void 0; @@ -25150,7 +25204,7 @@ function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { } function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 208 /* BindingElement */: + case 210 /* BindingElement */: if (bindingElement.propertyName) { const propertyName = bindingElement.propertyName; if (isPrivateIdentifier(propertyName)) { @@ -25159,7 +25213,7 @@ function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (bindingElement.name) { const propertyName = bindingElement.name; if (isPrivateIdentifier(propertyName)) { @@ -25168,7 +25222,7 @@ function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: if (bindingElement.name && isPrivateIdentifier(bindingElement.name)) { return Debug.failBadSyntaxKind(bindingElement.name); } @@ -25185,11 +25239,11 @@ function isStringOrNumericLiteral(node) { } function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: + case 211 /* ArrayLiteralExpression */: return name.elements; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return name.properties; } } @@ -25206,19 +25260,19 @@ function getJSDocTypeAliasName(fullName) { } function canHaveIllegalType(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 178 /* SetAccessor */; + return kind === 178 /* Constructor */ || kind === 180 /* SetAccessor */; } function canHaveIllegalTypeParameters(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 178 /* Constructor */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function canHaveIllegalDecorators(node) { const kind = node.kind; - return kind === 305 /* PropertyAssignment */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 263 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 285 /* MissingDeclaration */ || kind === 244 /* VariableStatement */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 269 /* EnumDeclaration */ || kind === 270 /* ModuleDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 273 /* NamespaceExportDeclaration */ || kind === 281 /* ExportDeclaration */ || kind === 280 /* ExportAssignment */; + return kind === 308 /* PropertyAssignment */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 265 /* FunctionDeclaration */ || kind === 178 /* Constructor */ || kind === 183 /* IndexSignature */ || kind === 177 /* ClassStaticBlockDeclaration */ || kind === 288 /* MissingDeclaration */ || kind === 246 /* VariableStatement */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 272 /* EnumDeclaration */ || kind === 273 /* ModuleDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 276 /* NamespaceExportDeclaration */ || kind === 284 /* ExportDeclaration */ || kind === 283 /* ExportAssignment */; } function canHaveIllegalModifiers(node) { const kind = node.kind; - return kind === 175 /* ClassStaticBlockDeclaration */ || kind === 305 /* PropertyAssignment */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 184 /* FunctionType */ || kind === 285 /* MissingDeclaration */ || kind === 273 /* NamespaceExportDeclaration */; + return kind === 177 /* ClassStaticBlockDeclaration */ || kind === 308 /* PropertyAssignment */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 186 /* FunctionType */ || kind === 288 /* MissingDeclaration */ || kind === 276 /* NamespaceExportDeclaration */; } var isTypeNodeOrTypeParameterDeclaration = or(isTypeNode, isTypeParameterDeclaration); var isQuestionOrExclamationToken = or(isQuestionToken, isExclamationToken); @@ -25504,11 +25558,11 @@ function setTextRange(range, location) { } function canHaveModifiers(node) { const kind = node.kind; - return kind === 167 /* TypeParameter */ || kind === 168 /* Parameter */ || kind === 170 /* PropertySignature */ || kind === 171 /* PropertyDeclaration */ || kind === 173 /* MethodSignature */ || kind === 174 /* MethodDeclaration */ || kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 185 /* ConstructorType */ || kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || kind === 232 /* ClassExpression */ || kind === 265 /* StructDeclaration */ || kind === 266 /* AnnotationDeclaration */ || kind === 244 /* VariableStatement */ || kind === 263 /* FunctionDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 269 /* EnumDeclaration */ || kind === 270 /* ModuleDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 280 /* ExportAssignment */ || kind === 281 /* ExportDeclaration */; + return kind === 168 /* TypeParameter */ || kind === 169 /* Parameter */ || kind === 171 /* PropertySignature */ || kind === 172 /* PropertyDeclaration */ || kind === 175 /* MethodSignature */ || kind === 176 /* MethodDeclaration */ || kind === 178 /* Constructor */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 183 /* IndexSignature */ || kind === 187 /* ConstructorType */ || kind === 220 /* FunctionExpression */ || kind === 221 /* ArrowFunction */ || kind === 234 /* ClassExpression */ || kind === 267 /* StructDeclaration */ || kind === 268 /* AnnotationDeclaration */ || kind === 246 /* VariableStatement */ || kind === 265 /* FunctionDeclaration */ || kind === 266 /* ClassDeclaration */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 272 /* EnumDeclaration */ || kind === 273 /* ModuleDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 283 /* ExportAssignment */ || kind === 284 /* ExportDeclaration */; } function canHaveDecorators(node) { const kind = node.kind; - return kind === 168 /* Parameter */ || kind === 171 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 232 /* ClassExpression */ || kind === 264 /* ClassDeclaration */ || kind === 265 /* StructDeclaration */; + return kind === 169 /* Parameter */ || kind === 172 /* PropertyDeclaration */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 234 /* ClassExpression */ || kind === 266 /* ClassDeclaration */ || kind === 267 /* StructDeclaration */; } // src/compiler/parser.ts @@ -25578,430 +25632,434 @@ function isImportMeta2(node) { return isMetaProperty(node) && node.keywordToken === 101 /* ImportKeyword */ && node.name.escapedText === "meta"; } var forEachChildTable = { - [165 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { + [166 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [167 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { + [168 /* 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); }, - [306 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { + [309 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || 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); }, - [307 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { + [310 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [168 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { + [169 /* 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); }, - [171 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { + [172 /* 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); }, - [172 /* AnnotationPropertyDeclaration */]: function forEachChildInAnnotationPropertyDeclaration(node, cbNode, _cbNodes) { + [173 /* AnnotationPropertyDeclaration */]: function forEachChildInAnnotationPropertyDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [170 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { + [171 /* 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); + }, + [174 /* OverloadPropertyDeclaration */]: function forEachChildInOverloadPropertyDeclaration(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); }, - [305 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { + [308 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); }, - [261 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { + [263 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [208 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { + [210 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [181 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { + [183 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [185 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { + [187 /* 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); }, - [184 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { + [186 /* 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); }, - [179 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [180 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [220 /* EtsComponentExpression */]: function forEachChildInEtsComponentExpression(node, cbNode, cbNodes) { + [181 /* CallSignature */]: forEachChildInCallOrConstructSignature, + [182 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, + [222 /* EtsComponentExpression */]: function forEachChildInEtsComponentExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.arguments) || visitNode2(cbNode, node.body); }, - [174 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { + [176 /* 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); }, - [173 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { + [175 /* 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); }, - [176 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { + [178 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || 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); }, - [177 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { + [179 /* 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); }, - [178 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { + [180 /* 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); }, - [263 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { + [265 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || 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); }, - [218 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { + [220 /* 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); }, - [219 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { + [221 /* 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); }, - [175 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { + [177 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); }, - [183 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { + [185 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [182 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { + [184 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); }, - [186 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { + [188 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [187 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { + [189 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.members); }, - [188 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { + [190 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.elementType); }, - [189 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { + [191 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [192 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [193 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [194 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { + [194 /* UnionType */]: forEachChildInUnionOrIntersectionType, + [195 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, + [196 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); }, - [195 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { + [197 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.typeParameter); }, - [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { + [207 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [304 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { + [307 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); }, - [196 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [198 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [199 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { + [198 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, + [200 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, + [201 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); }, - [200 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { + [202 /* 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); }, - [201 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { + [203 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.literal); }, - [202 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { + [204 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); }, - [206 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [207 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [209 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { + [208 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [209 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [211 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [210 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { + [212 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [211 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { + [213 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); }, - [212 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { + [214 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); }, - [213 /* CallExpression */]: forEachChildInCallOrNewExpression, - [214 /* NewExpression */]: forEachChildInCallOrNewExpression, - [215 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { + [215 /* CallExpression */]: forEachChildInCallOrNewExpression, + [216 /* NewExpression */]: forEachChildInCallOrNewExpression, + [217 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); }, - [216 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { + [218 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); }, - [217 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { + [219 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [221 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { + [223 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [222 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { + [224 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [223 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { + [225 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [225 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { + [227 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [230 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { + [232 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); }, - [224 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { + [226 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [226 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { + [228 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [227 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { + [229 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); }, - [235 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { + [237 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [236 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { + [238 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [239 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { + [241 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [237 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { + [239 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [228 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { + [230 /* 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); }, - [231 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { + [233 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [242 /* Block */]: forEachChildInBlock, - [271 /* ModuleBlock */]: forEachChildInBlock, - [314 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { + [244 /* Block */]: forEachChildInBlock, + [274 /* ModuleBlock */]: forEachChildInBlock, + [317 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); }, - [244 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { + [246 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); }, - [262 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { + [264 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.declarations); }, - [245 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { + [247 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [246 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { + [248 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); }, - [247 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { + [249 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); }, - [248 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { + [250 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [249 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { + [251 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); }, - [250 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { + [252 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [251 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { + [253 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [252 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [253 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [254 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { + [254 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, + [255 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, + [256 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [255 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { + [257 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [256 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { + [258 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); }, - [272 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { + [275 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.clauses); }, - [298 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { + [301 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); }, - [299 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { + [302 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements); }, - [257 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { + [259 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); }, - [258 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { + [260 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [259 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { + [261 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); }, - [301 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { + [304 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); }, - [169 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { + [170 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [264 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [232 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [265 /* StructDeclaration */]: forEachChildInClassDeclarationOrExpression, - [266 /* AnnotationDeclaration */]: forEachChildInAnnotationDeclaration, - [267 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { + [266 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, + [234 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, + [267 /* StructDeclaration */]: forEachChildInClassDeclarationOrExpression, + [268 /* AnnotationDeclaration */]: forEachChildInAnnotationDeclaration, + [269 /* OverloadDeclaration */]: forEachChildInOverloadDeclaration, + [270 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); }, - [268 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { + [271 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); }, - [269 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { + [272 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); }, - [308 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { + [311 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [270 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { + [273 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); }, - [274 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { + [277 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, - [275 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { + [278 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [276 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { + [279 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [302 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [305 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [303 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [306 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, - [273 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { + [276 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNode2(cbNode, node.name); }, - [277 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { + [280 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [283 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { + [286 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [278 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [282 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [281 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { + [281 /* NamedImports */]: forEachChildInNamedImportsOrExports, + [285 /* NamedExports */]: forEachChildInNamedImportsOrExports, + [284 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [279 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [284 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [280 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { + [282 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, + [287 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, + [283 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); }, - [229 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { + [231 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [240 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { + [242 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); }, - [203 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { + [205 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [204 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { + [206 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); }, - [166 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { + [167 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [300 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { + [303 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.types); }, - [234 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { + [236 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [286 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { + [289 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [285 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { + [288 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers); }, - [360 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { + [363 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [287 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { + [290 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); }, - [291 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { + [294 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); }, - [288 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [289 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [295 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { + [291 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [292 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [298 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [294 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { + [297 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [296 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { + [299 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [297 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { + [300 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); }, - [290 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { + [293 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tagName); }, - [190 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [191 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [318 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [324 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [323 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [325 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [327 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [326 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { + [192 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [193 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [321 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [327 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [326 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [328 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [330 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [329 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [329 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { + [332 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); }, - [355 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { + [358 /* 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)); }, - [319 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { + [322 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [320 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { + [323 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [349 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [356 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [339 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { + [352 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, + [359 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, + [342 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [338 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { + [341 /* 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)); }, - [337 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { + [340 /* 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)); }, - [353 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { + [356 /* 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)); }, - [354 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 318 /* 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))); + [357 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { + return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 321 /* 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))); }, - [347 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { + [350 /* 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)); }, - [350 /* JSDocReturnTag */]: forEachChildInJSDocReturnTag, - [352 /* JSDocTypeTag */]: forEachChildInJSDocReturnTag, - [351 /* JSDocThisTag */]: forEachChildInJSDocReturnTag, - [348 /* JSDocEnumTag */]: forEachChildInJSDocReturnTag, - [332 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { + [353 /* JSDocReturnTag */]: forEachChildInJSDocReturnTag, + [355 /* JSDocTypeTag */]: forEachChildInJSDocReturnTag, + [354 /* JSDocThisTag */]: forEachChildInJSDocReturnTag, + [351 /* JSDocEnumTag */]: forEachChildInJSDocReturnTag, + [335 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); }, - [333 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [334 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [335 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [331 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { + [336 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, + [337 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, + [338 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, + [334 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { return forEach(node.jsDocPropertyTags, cbNode); }, - [336 /* JSDocTag */]: forEachChildInJSDocTag, - [341 /* JSDocClassTag */]: forEachChildInJSDocTag, - [342 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [343 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [344 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [345 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [340 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [346 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [359 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression + [339 /* JSDocTag */]: forEachChildInJSDocTag, + [344 /* JSDocClassTag */]: forEachChildInJSDocTag, + [345 /* JSDocPublicTag */]: forEachChildInJSDocTag, + [346 /* JSDocPrivateTag */]: forEachChildInJSDocTag, + [347 /* JSDocProtectedTag */]: forEachChildInJSDocTag, + [348 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, + [343 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, + [349 /* JSDocOverrideTag */]: forEachChildInJSDocTag, + [362 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression }; function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); @@ -26030,6 +26088,9 @@ function forEachChildInClassDeclarationOrExpression(node, cbNode, cbNodes) { function forEachChildInAnnotationDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); } +function forEachChildInOverloadDeclaration(node, cbNode, cbNodes) { + return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); +} function forEachChildInNamedImportsOrExports(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); } @@ -26058,7 +26119,7 @@ function forEachChildInPartiallyEmittedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); } function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 164 /* LastToken */) { + if (node === void 0 || node.kind <= 165 /* LastToken */) { return; } const fn = forEachChildTable[node.kind]; @@ -26093,7 +26154,7 @@ function forEachChildRecursively(rootNode, cbNode, cbNodes) { continue; return res; } - if (current.kind >= 165 /* FirstNode */) { + if (current.kind >= 166 /* FirstNode */) { for (const child of gatherPossibleChildren(current)) { queue.push(child); parents.push(current); @@ -27065,7 +27126,7 @@ var Parser; parseErrorAtCurrentToken(diagnosticMessage, arg0); } const pos = getNodePos(); - const result = kind === 79 /* Identifier */ ? factory2.createIdentifier("", void 0, void 0) : isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(kind, "", "", void 0) : kind === 8 /* NumericLiteral */ ? factory2.createNumericLiteral("", void 0) : kind === 10 /* StringLiteral */ ? factory2.createStringLiteral("", void 0) : kind === 285 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factory2.createToken(kind); + const result = kind === 79 /* Identifier */ ? factory2.createIdentifier("", void 0, void 0) : isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(kind, "", "", void 0) : kind === 8 /* NumericLiteral */ ? factory2.createNumericLiteral("", void 0) : kind === 10 /* StringLiteral */ ? factory2.createStringLiteral("", void 0) : kind === 288 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factory2.createToken(kind); return finishNode(result, pos); } function internIdentifier(text) { @@ -27190,6 +27251,9 @@ var Parser; if (inAllowAnnotationContext() && token() === 59 /* AtToken */) { return lookAhead(() => nextToken() === 119 /* InterfaceKeyword */); } + if (token() === 164 /* OverloadKeyword */) { + return true; + } return canFollowExportModifier(); case 89 /* DefaultKeyword */: return nextTokenCanFollowDefaultKeyword(); @@ -27214,7 +27278,7 @@ var Parser; return isModifierKind(token()) && tryParse(nextTokenCanFollowModifier); } function canFollowModifier() { - return token() === 22 /* OpenBracketToken */ || token() === 18 /* OpenBraceToken */ || token() === 41 /* AsteriskToken */ || token() === 25 /* DotDotDotToken */ || token() === 59 /* AtToken */ && inAllowAnnotationContext() && lookAhead(() => nextToken() === 119 /* InterfaceKeyword */) || isLiteralPropertyName(); + return token() === 22 /* OpenBracketToken */ || token() === 18 /* OpenBraceToken */ || token() === 41 /* AsteriskToken */ || token() === 25 /* DotDotDotToken */ || token() === 59 /* AtToken */ && inAllowAnnotationContext() && lookAhead(() => nextToken() === 119 /* InterfaceKeyword */) || token() === 164 /* OverloadKeyword */ || isLiteralPropertyName(); } function nextTokenCanFollowDefaultKeyword() { nextToken(); @@ -27489,15 +27553,15 @@ var Parser; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 176 /* Constructor */: - case 181 /* IndexSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 241 /* SemicolonClassElement */: + case 178 /* Constructor */: + case 183 /* IndexSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 243 /* SemicolonClassElement */: return true; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return !inStructContext(); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: const methodDeclaration = node; const nameIsConstructor = methodDeclaration.name.kind === 79 /* Identifier */ && methodDeclaration.name.originalKeywordKind === 136 /* ConstructorKeyword */; return !nameIsConstructor; @@ -27508,8 +27572,8 @@ var Parser; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: return true; } } @@ -27518,66 +27582,66 @@ var Parser; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 244 /* VariableStatement */: - case 242 /* Block */: - case 246 /* IfStatement */: - case 245 /* ExpressionStatement */: - case 258 /* ThrowStatement */: - case 254 /* ReturnStatement */: - case 256 /* SwitchStatement */: - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 249 /* ForStatement */: - case 248 /* WhileStatement */: - case 255 /* WithStatement */: - case 243 /* EmptyStatement */: - case 259 /* TryStatement */: - case 257 /* LabeledStatement */: - case 247 /* DoStatement */: - case 260 /* DebuggerStatement */: - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 265 /* FunctionDeclaration */: + case 246 /* VariableStatement */: + case 244 /* Block */: + case 248 /* IfStatement */: + case 247 /* ExpressionStatement */: + case 260 /* ThrowStatement */: + case 256 /* ReturnStatement */: + case 258 /* SwitchStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 251 /* ForStatement */: + case 250 /* WhileStatement */: + case 257 /* WithStatement */: + case 245 /* EmptyStatement */: + case 261 /* TryStatement */: + case 259 /* LabeledStatement */: + case 249 /* DoStatement */: + case 262 /* DebuggerStatement */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 308 /* EnumMember */; + return node.kind === 311 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 170 /* PropertySignature */: - case 179 /* CallSignature */: + case 182 /* ConstructSignature */: + case 175 /* MethodSignature */: + case 183 /* IndexSignature */: + case 171 /* PropertySignature */: + case 181 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 261 /* VariableDeclaration */) { + if (node.kind !== 263 /* VariableDeclaration */) { return false; } const variableDeclarator = node; return variableDeclarator.initializer === void 0; } function isReusableParameter(node) { - if (node.kind !== 168 /* Parameter */) { + if (node.kind !== 169 /* Parameter */) { return false; } const parameter = node; @@ -27868,14 +27932,14 @@ var Parser; } function typeHasArrowFunctionBlockingParseError(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return nodeIsMissing(node.typeName); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: { + case 186 /* FunctionType */: + case 187 /* ConstructorType */: { const { parameters, type } = node; return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); } - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return typeHasArrowFunctionBlockingParseError(node.type); default: return false; @@ -28116,14 +28180,14 @@ var Parser; function parseSignatureMember(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 180 /* ConstructSignature */) { + if (kind === 182 /* ConstructSignature */) { parseExpected(104 /* NewKeyword */); } const typeParameters = parseTypeParameters(); const parameters = parseParameters(4 /* Type */); const type = parseReturnType(58 /* ColonToken */, true); parseTypeMemberSemicolon(); - const node = kind === 179 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); + const node = kind === 181 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } function isIndexSignature() { @@ -28161,6 +28225,17 @@ var Parser; node.illegalDecorators = decorators; return withJSDoc(finishNode(node, pos), hasJSDoc); } + function parseOverloadPropertyDeclaration(pos, hasJSDoc, modifiers) { + const name = parsePropertyName(); + const questionToken = parseOptionalToken(57 /* QuestionToken */); + let node; + const type = parseTypeAnnotation(); + node = factory2.createOverloadPropertyDeclaration(modifiers, name, questionToken, type); + if (token() === 63 /* EqualsToken */) + node.initializer = parseInitializer(); + parseTypeMemberSemicolon(); + return withJSDoc(finishNode(node, pos), hasJSDoc); + } function parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers) { const name = parsePropertyName(); const questionToken = parseOptionalToken(57 /* QuestionToken */); @@ -28202,19 +28277,19 @@ var Parser; } function parseTypeMember() { if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */) { - return parseSignatureMember(179 /* CallSignature */); + return parseSignatureMember(181 /* CallSignature */); } if (token() === 104 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(180 /* ConstructSignature */); + return parseSignatureMember(182 /* ConstructSignature */); } const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); const modifiers = parseModifiers(); if (parseContextualModifier(138 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 177 /* GetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 179 /* GetAccessor */, 4 /* Type */); } if (parseContextualModifier(152 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 178 /* SetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 180 /* SetAccessor */, 4 /* Type */); } if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, void 0, modifiers); @@ -29090,7 +29165,7 @@ var Parser; return void 0; } let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 196 /* ParenthesizedType */) { + while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 198 /* ParenthesizedType */) { unwrappedType = unwrappedType.type; } const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); @@ -29153,7 +29228,7 @@ var Parser; return parseBinaryExpressionRest(precedence, leftOperand, pos); } function isInOrOfKeyword(t) { - return t === 102 /* InKeyword */ || t === 164 /* OfKeyword */; + return t === 102 /* InKeyword */ || t === 165 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand, pos) { while (true) { @@ -29235,7 +29310,7 @@ var Parser; if (token() === 42 /* AsteriskAsteriskToken */) { const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 216 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 218 /* 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)); @@ -29358,11 +29433,11 @@ var Parser; const pos = getNodePos(); const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); let result; - if (opening.kind === 289 /* JsxOpeningElement */) { + if (opening.kind === 292 /* JsxOpeningElement */) { let children = parseJsxChildren(opening); let closingElement; const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 287 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { + if ((lastChild == null ? void 0 : lastChild.kind) === 290 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { const end = lastChild.children.end; const newLast = finishNode( factory2.createJsxElement( @@ -29386,10 +29461,10 @@ var Parser; } } result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 292 /* JsxOpeningFragment */) { + } else if (opening.kind === 295 /* JsxOpeningFragment */) { result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { - Debug.assert(opening.kind === 288 /* JsxSelfClosingElement */); + Debug.assert(opening.kind === 291 /* JsxSelfClosingElement */); result = opening; } if (inExpressionContext && token() === 29 /* LessThanToken */) { @@ -29445,7 +29520,7 @@ var Parser; if (!child) break; list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 287 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { + if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 290 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { break; } } @@ -29653,7 +29728,7 @@ var Parser; continue; } if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 234 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest(pos, expression, questionDotToken, void 0); + expression = !questionDotToken && expression.kind === 236 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest(pos, expression, questionDotToken, void 0); continue; } if (!questionDotToken) { @@ -29701,7 +29776,7 @@ var Parser; } } if (typeArguments || token() === 20 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 234 /* ExpressionWithTypeArguments */) { + if (!questionDotToken && expression.kind === 236 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -29928,10 +30003,10 @@ var Parser; const decorators = parseDecorators(); const modifiers = parseModifiers(); if (parseContextualModifier(138 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 177 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 179 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(152 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 178 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 180 /* SetAccessor */, 0 /* None */); } const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const tokenIsIdentifier = isIdentifier2(); @@ -30001,7 +30076,7 @@ var Parser; const expressionPos = getNodePos(); let expression = parseMemberExpressionRest(expressionPos, parsePrimaryExpression(), false); let typeArguments; - if (expression.kind === 234 /* ExpressionWithTypeArguments */) { + if (expression.kind === 236 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -30109,7 +30184,7 @@ var Parser; } } let node; - if (awaitToken ? parseExpected(164 /* OfKeyword */) : parseOptional(164 /* OfKeyword */)) { + if (awaitToken ? parseExpected(165 /* OfKeyword */) : parseOptional(165 /* OfKeyword */)) { const expression = allowInAnd(() => parseAssignmentExpressionOrHigher(true)); parseExpected(21 /* CloseParenToken */); node = factory2.createForOfStatement(awaitToken, initializer, expression, parseStatement()); @@ -30130,10 +30205,10 @@ var Parser; function parseBreakOrContinueStatement(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 253 /* BreakStatement */ ? 81 /* BreakKeyword */ : 87 /* ContinueKeyword */); + parseExpected(kind === 255 /* BreakStatement */ ? 81 /* BreakKeyword */ : 87 /* ContinueKeyword */); const label = canParseSemicolon() ? void 0 : parseIdentifier(); parseSemicolon(); - const node = kind === 253 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); + const node = kind === 255 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseReturnStatement() { @@ -30287,6 +30362,8 @@ var Parser; return inEtsContext(); case 59 /* AtToken */: return inAllowAnnotationContext() && nextToken() === 119 /* InterfaceKeyword */; + case 164 /* OverloadKeyword */: + return nextTokenIsIdentifierOnSameLine(); case 119 /* InterfaceKeyword */: case 155 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); @@ -30421,9 +30498,9 @@ var Parser; case 98 /* ForKeyword */: return parseForOrForInOrForOfStatement(); case 87 /* ContinueKeyword */: - return parseBreakOrContinueStatement(252 /* ContinueStatement */); + return parseBreakOrContinueStatement(254 /* ContinueStatement */); case 81 /* BreakKeyword */: - return parseBreakOrContinueStatement(253 /* BreakStatement */); + return parseBreakOrContinueStatement(255 /* BreakStatement */); case 106 /* ReturnKeyword */: return parseReturnStatement(); case 117 /* WithKeyword */: @@ -30439,6 +30516,7 @@ var Parser; case 88 /* DebuggerKeyword */: return parseDebuggerStatement(); case 59 /* AtToken */: + case 164 /* OverloadKeyword */: return parseDeclaration(); case 133 /* AsyncKeyword */: case 119 /* InterfaceKeyword */: @@ -30487,6 +30565,19 @@ var Parser; const node = factory2.createAnnotationDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } + function parseOverloadDeclaration(pos, hasJSDoc, decorators, modifiers) { + parseExpected(164 /* OverloadKeyword */); + const name = createIdentifier(isBindingIdentifier()); + let members; + if (parseExpected(18 /* OpenBraceToken */)) { + members = parseOverloadMembers(); + parseExpected(19 /* CloseBraceToken */); + } else { + members = createMissingList(); + } + const node = factory2.createOverloadDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, members); + return withJSDoc(finishNode(node, pos), hasJSDoc); + } function parseDeclaration() { var _a2, _b; const pos = getNodePos(); @@ -30556,6 +30647,8 @@ var Parser; return parseAnnotationDeclaration(pos, hasJSDoc, decorators, modifiers); } return parseDeclarationDefault(pos, decorators, modifiers); + case 164 /* OverloadKeyword */: + return parseOverloadDeclaration(pos, hasJSDoc, decorators, modifiers); case 119 /* InterfaceKeyword */: return parseInterfaceDeclaration(pos, hasJSDoc, decorators, modifiers); case 155 /* TypeKeyword */: @@ -30585,7 +30678,7 @@ var Parser; } function parseDeclarationDefault(pos, decorators, modifiers) { if (decorators || modifiers) { - const missing = createMissingNode(285 /* MissingDeclaration */, true, Diagnostics.Declaration_expected); + const missing = createMissingNode(288 /* MissingDeclaration */, true, Diagnostics.Declaration_expected); setTextRangePos(missing, pos); missing.illegalDecorators = decorators; missing.modifiers = modifiers; @@ -30695,7 +30788,7 @@ var Parser; } nextToken(); let declarations; - if (token() === 164 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 165 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { declarations = createMissingList(); } else { const savedDisallowIn = inDisallowInContext(); @@ -30725,7 +30818,7 @@ var Parser; const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const name = modifierFlags & 1024 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); if (name && hasEtsStylesDecoratorNames(decorators, sourceFileCompilerOptions)) { - fileStylesComponents.set(name.escapedText.toString(), 263 /* FunctionDeclaration */); + fileStylesComponents.set(name.escapedText.toString(), 265 /* FunctionDeclaration */); } const originalUICallbackContext = inUICallbackContext(); setEtsBuilderContext(hasEtsBuilderDecoratorNames(decorators, sourceFileCompilerOptions)); @@ -30829,7 +30922,7 @@ var Parser; setUICallbackContext(inBuildContext() || inBuilderContext()); if (inStructContext() && hasEtsStylesDecoratorNames(decorators, sourceFileCompilerOptions)) { if (methodName && currentStructName) { - structStylesComponents.set(methodName, { structName: currentStructName, kind: 174 /* MethodDeclaration */ }); + structStylesComponents.set(methodName, { structName: currentStructName, kind: 176 /* MethodDeclaration */ }); } const stylesEtsComponentDecoratorNames = getEtsStylesDecoratorComponentNames(decorators, sourceFileCompilerOptions); if (stylesEtsComponentDecoratorNames.length > 0) { @@ -30918,7 +31011,7 @@ var Parser; const parameters = parseParameters(0 /* None */); const type = parseReturnType(58 /* ColonToken */, false); const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 177 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, type, body) : factory2.createSetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, body); + const node = kind === 179 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, type, body) : factory2.createSetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, body); node.typeParameters = typeParameters; if (isSetAccessorDeclaration(node)) node.type = type; @@ -31130,10 +31223,10 @@ var Parser; return parseClassStaticBlockDeclaration(pos, hasJSDoc, decorators, modifiers); } if (parseContextualModifier(138 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 177 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 179 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(152 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 178 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 180 /* SetAccessor */, 0 /* None */); } if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, decorators, modifiers); @@ -31169,35 +31262,35 @@ var Parser; const hasJSDoc = hasPrecedingJSDocComment(); if (token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (parseContextualModifier(138 /* GetKeyword */)) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (parseContextualModifier(152 /* SetKeyword */)) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (isIndexSignature()) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); @@ -31208,11 +31301,66 @@ var Parser; } return Debug.fail("Should not have attempted to parse annotation member declaration."); } + function parseOverloadElement() { + const pos = getNodePos(); + if (token() === 26 /* SemicolonToken */) { + parseErrorAt(pos, pos, Diagnostics.Unexpected_keyword_or_identifier); + } + const hasJSDoc = hasPrecedingJSDocComment(); + if (token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (parseContextualModifier(138 /* GetKeyword */)) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (parseContextualModifier(152 /* SetKeyword */)) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (isIndexSignature()) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (tokenIsIdentifierOrKeyword(token())) { + const modifiers = parseModifiers(); + let overloadPropertyDeclaration = parseOverloadPropertyDeclaration(pos, hasJSDoc, modifiers); + if (overloadPropertyDeclaration.kind === 174 /* OverloadPropertyDeclaration */) { + return overloadPropertyDeclaration; + } + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + return Debug.fail("Should not have attempted to parse annotation member declaration."); + } function parseClassExpression() { - return parseClassDeclarationOrExpression(getNodePos(), hasPrecedingJSDocComment(), void 0, void 0, 232 /* ClassExpression */); + return parseClassDeclarationOrExpression(getNodePos(), hasPrecedingJSDocComment(), void 0, void 0, 234 /* ClassExpression */); } function parseClassDeclaration(pos, hasJSDoc, decorators, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers, 264 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers, 266 /* ClassDeclaration */); } function parseStructDeclaration(pos, hasJSDoc, decorators, modifiers) { return parseStructDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers); @@ -31233,7 +31381,7 @@ var Parser; members = createMissingList(); } setAwaitContext(savedAwaitContext); - const node = kind === 264 /* ClassDeclaration */ ? factory2.createClassDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members) : factory2.createClassExpression(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members); + const node = kind === 266 /* ClassDeclaration */ ? factory2.createClassDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members) : factory2.createClassExpression(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseStructDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers) { @@ -31297,7 +31445,7 @@ var Parser; function parseExpressionWithTypeArguments() { const pos = getNodePos(); const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 234 /* ExpressionWithTypeArguments */) { + if (expression.kind === 236 /* ExpressionWithTypeArguments */) { return expression; } const typeArguments = tryParseTypeArguments(); @@ -31315,13 +31463,16 @@ var Parser; function parseAnnotationMembers() { return parseList(ParsingContext.AnnotationMembers, parseAnnotationElement); } + function parseOverloadMembers() { + return parseList(ParsingContext.TypeMembers, parseOverloadElement); + } function parseStructMembers(pos) { const structMembers = parseList(ParsingContext.ClassMembers, parseClassElement); const virtualStructMembers = []; const virtualParameterProperties = []; structMembers.forEach((member) => { virtualStructMembers.push(member); - if (member.kind === 171 /* PropertyDeclaration */) { + if (member.kind === 172 /* PropertyDeclaration */) { const property = member; virtualParameterProperties.push( finishVirtualNode( @@ -31568,7 +31719,7 @@ var Parser; function parseImportClause(identifier, pos, isTypeOnly) { let namedBindings; if (!identifier || parseOptional(27 /* CommaToken */)) { - namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(278 /* NamedImports */); + namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(281 /* NamedImports */); } return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); } @@ -31601,15 +31752,15 @@ var Parser; } function parseNamedImportsOrExports(kind) { const pos = getNodePos(); - const node = kind === 278 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); + const node = kind === 281 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); return finishNode(node, pos); } function parseExportSpecifier() { const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(284 /* ExportSpecifier */), hasJSDoc); + return withJSDoc(parseImportOrExportSpecifier(287 /* ExportSpecifier */), hasJSDoc); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(279 /* ImportSpecifier */); + return parseImportOrExportSpecifier(282 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { const pos = getNodePos(); @@ -31653,10 +31804,10 @@ var Parser; parseExpected(129 /* AsKeyword */); name = parseNameWithKeywordCheck(); } - if (kind === 279 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 282 /* ImportSpecifier */ && checkIdentifierIsKeyword) { parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); } - const node = kind === 279 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); + const node = kind === 282 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); return finishNode(node, pos); function parseNameWithKeywordCheck() { checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); @@ -31683,7 +31834,7 @@ var Parser; parseExpected(160 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } else { - exportClause = parseNamedImportsOrExports(282 /* NamedExports */); + exportClause = parseNamedImportsOrExports(285 /* NamedExports */); if (token() === 160 /* FromKeyword */ || token() === 10 /* StringLiteral */ && !scanner.hasPrecedingLineBreak()) { parseExpected(160 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); @@ -32257,7 +32408,7 @@ var Parser; switch (node.kind) { case 150 /* ObjectKeyword */: return true; - case 188 /* ArrayType */: + case 190 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; @@ -32287,12 +32438,12 @@ var Parser; let child; let children; while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent2, name))) { - if (child.kind === 349 /* JSDocParameterTag */ || child.kind === 356 /* JSDocPropertyTag */) { + if (child.kind === 352 /* JSDocParameterTag */ || child.kind === 359 /* JSDocPropertyTag */) { children = append(children, child); } } if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 188 /* ArrayType */), pos); + const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 190 /* ArrayType */), pos); return finishNode(factory2.createJSDocTypeExpression(literal), pos); } } @@ -32405,7 +32556,7 @@ var Parser; let hasChildren = false; while (child = tryParse(() => parseChildPropertyTag(indent2))) { hasChildren = true; - if (child.kind === 352 /* JSDocTypeTag */) { + if (child.kind === 355 /* JSDocTypeTag */) { if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { @@ -32420,7 +32571,7 @@ var Parser; } } if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 188 /* ArrayType */; + const isArrayType = typeExpression && typeExpression.type.kind === 190 /* ArrayType */; const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start2); end2 = typeExpression.end; @@ -32471,7 +32622,7 @@ var Parser; const returnTag = tryParse(() => { if (parseOptionalJsdoc(59 /* AtToken */)) { const tag = parseTag(indent2); - if (tag && tag.kind === 350 /* JSDocReturnTag */) { + if (tag && tag.kind === 353 /* JSDocReturnTag */) { return tag; } } @@ -32505,7 +32656,7 @@ var Parser; case 59 /* AtToken */: if (canParseTag) { const child = tryParseChildTag(target, indent2); - if (child && (child.kind === 349 /* JSDocParameterTag */ || child.kind === 356 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 352 /* JSDocParameterTag */ || child.kind === 359 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -35025,7 +35176,7 @@ function convertConfigFileToObject(sourceFile, errors, reportOptionsErrors, opti var _a2; const rootExpression = (_a2 = sourceFile.statements[0]) == null ? void 0 : _a2.expression; const knownRootOptions = reportOptionsErrors ? getTsconfigRootOptionsMap() : void 0; - if (rootExpression && rootExpression.kind !== 210 /* ObjectLiteralExpression */) { + if (rootExpression && rootExpression.kind !== 212 /* ObjectLiteralExpression */) { errors.push(createDiagnosticForNodeInSourceFile( sourceFile, rootExpression, @@ -35057,7 +35208,7 @@ function convertToObjectWorker(sourceFile, rootExpression, errors, returnValue, function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) { const result = returnValue ? {} : void 0; for (const element of node.properties) { - if (element.kind !== 305 /* PropertyAssignment */) { + if (element.kind !== 308 /* PropertyAssignment */) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); continue; } @@ -35145,13 +35296,13 @@ function convertToObjectWorker(sourceFile, rootExpression, errors, returnValue, case 8 /* NumericLiteral */: reportInvalidOptionValue(option && option.type !== "number"); return validateValue(Number(valueExpression.text)); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: if (valueExpression.operator !== 40 /* MinusToken */ || valueExpression.operand.kind !== 8 /* NumericLiteral */) { break; } reportInvalidOptionValue(option && option.type !== "number"); return validateValue(-Number(valueExpression.operand.text)); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: reportInvalidOptionValue(option && option.type !== "object"); const objectLiteralExpression = valueExpression; if (option) { @@ -35170,7 +35321,7 @@ function convertToObjectWorker(sourceFile, rootExpression, errors, returnValue, void 0 )); } - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: reportInvalidOptionValue(option && option.type !== "list"); return validateValue(convertArrayLiteralExpressionToJson( valueExpression.elements, @@ -38214,7 +38365,7 @@ function getReservedDecoratorsOfEtsFile(node, host) { } function getReservedDecoratorsOfStructDeclaration(node, host) { let reservedDecorators; - if (node.parent.kind === 265 /* StructDeclaration */) { + if (node.parent.kind === 267 /* StructDeclaration */) { reservedDecorators = ensureEtsDecorators(node, host); } return reservedDecorators; @@ -38431,10 +38582,10 @@ function isTokenInsideBuilder(decorators, compilerOptions) { return false; } function getEtsComponentExpressionInnerCallExpressionNode(node) { - while (node && node.kind !== 220 /* EtsComponentExpression */) { - if (node.kind === 213 /* CallExpression */) { + while (node && node.kind !== 222 /* EtsComponentExpression */) { + if (node.kind === 215 /* CallExpression */) { node = node.expression; - } else if (node.kind === 211 /* PropertyAccessExpression */) { + } else if (node.kind === 213 /* PropertyAccessExpression */) { node = node.expression; } else { node = void 0; @@ -38447,7 +38598,7 @@ function getRootEtsComponentInnerCallExpressionNode(node) { return node; } while (node) { - const ancestor = getAncestor(isCallExpression(node) ? node.parent : node, 213 /* CallExpression */); + const ancestor = getAncestor(isCallExpression(node) ? node.parent : node, 215 /* CallExpression */); const target = getRootEtsComponent(ancestor); if (target && isInStateStylesObject(node)) { return target; @@ -38476,7 +38627,7 @@ function getEtsComponentExpressionInnerExpressionStatementNode(node) { return void 0; } function isInStateStylesObject(node) { - const ancestor = getAncestor(node, 210 /* ObjectLiteralExpression */); + const ancestor = getAncestor(node, 212 /* ObjectLiteralExpression */); return ancestor !== void 0 && ancestor.parent !== void 0 && isPropertyAssignment(ancestor.parent); } function getEtsExtendDecoratorsComponentNames(decorators, compilerOptions) { @@ -38484,7 +38635,7 @@ function getEtsExtendDecoratorsComponentNames(decorators, compilerOptions) { const extendComponents = []; const extendDecorator = (_c = (_b = (_a2 = compilerOptions.ets) == null ? void 0 : _a2.extend) == null ? void 0 : _b.decorator) != null ? _c : "Extend"; decorators == null ? void 0 : decorators.forEach((decorator) => { - if (decorator.expression.kind === 213 /* CallExpression */) { + if (decorator.expression.kind === 215 /* CallExpression */) { const identifier = decorator.expression.expression; const args = decorator.expression.arguments; if (identifier.kind === 79 /* Identifier */ && (extendDecorator == null ? void 0 : extendDecorator.includes(identifier.escapedText.toString())) && args.length) { @@ -38501,7 +38652,7 @@ function getEtsStylesDecoratorComponentNames(decorators, compilerOptions) { const stylesComponents = []; const stylesDecorator = (_c = (_b = (_a2 = compilerOptions.ets) == null ? void 0 : _a2.styles) == null ? void 0 : _b.decorator) != null ? _c : "Styles"; decorators == null ? void 0 : decorators.forEach((decorator) => { - if (decorator.kind === 169 /* Decorator */ && decorator.expression.kind === 79 /* Identifier */) { + if (decorator.kind === 170 /* Decorator */ && decorator.expression.kind === 79 /* Identifier */) { const identifier = decorator.expression; if (identifier.kind === 79 /* Identifier */ && identifier.escapedText === stylesDecorator) { stylesComponents.push(identifier.escapedText); @@ -38547,7 +38698,7 @@ function transformAnnotation(context) { } function visitAnnotationsDeclarations(node) { switch (node.kind) { - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return visitAnnotationDeclaration(node); default: return visitEachChild(node, visitAnnotationsDeclarations, context); @@ -38555,9 +38706,9 @@ function transformAnnotation(context) { } function visitAnnotations(node) { switch (node.kind) { - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return visitImportSpecifier(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return visitAnnotation(node); default: return visitEachChild(node, visitAnnotations, context); @@ -38597,14 +38748,14 @@ function transformAnnotation(context) { return factory.createIdentifier( annotationMagicNamePrefix + expr.escapedText ); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: const propAccessExpr = expr; return factory.updatePropertyAccessExpression( propAccessExpr, propAccessExpr.expression, addMagicPrefixToAnnotationNameIdentifier(propAccessExpr.name) ); - case 213 /* CallExpression */: + case 215 /* CallExpression */: const callExpr = expr; return factory.updateCallExpression( callExpr, @@ -38685,16 +38836,16 @@ function transformTypeExportImportAndConstEnumInTypeScript(context) { } function visitImportExportAndConstEnumMember(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return visitImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return visitExportDeclaration(node); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return visitConstEnum(node); - case 308 /* EnumMember */: + case 311 /* EnumMember */: return visitEnumMember(node); default: return visitEachChild(node, visitImportExportAndConstEnumMember, context); @@ -38740,7 +38891,7 @@ function transformTypeExportImportAndConstEnumInTypeScript(context) { return name || namedBindings ? factory.updateImportClause(node, false, name, namedBindings) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 277 /* NamespaceImport */) { + if (node.kind === 280 /* NamespaceImport */) { if (resolver.isReferencedAliasDeclaration(node)) { return node; } @@ -39326,23 +39477,23 @@ function getModuleInstanceStateCached(node, visited = new Map2()) { } function getModuleInstanceStateWorker(node, visited) { switch (node.kind) { - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return 0 /* NonInstantiated */; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: if (isEnumConst(node)) { return 2 /* ConstEnumOnly */; } break; - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: if (!hasSyntacticModifier(node, 1 /* Export */)) { return 0 /* NonInstantiated */; } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: const exportDeclaration = node; - if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 282 /* NamedExports */) { + if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 285 /* NamedExports */) { let state = 0 /* NonInstantiated */; for (const specifier of exportDeclaration.exportClause.elements) { const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); @@ -39356,7 +39507,7 @@ function getModuleInstanceStateWorker(node, visited) { return state; } break; - case 271 /* ModuleBlock */: { + case 274 /* ModuleBlock */: { let state = 0 /* NonInstantiated */; forEachChild(node, (n) => { const childState = getModuleInstanceStateCached(n, visited); @@ -39375,7 +39526,7 @@ function getModuleInstanceStateWorker(node, visited) { }); return state; } - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return getModuleInstanceState(node, visited); case 79 /* Identifier */: if (node.isInJSDocNamespace) { @@ -39547,7 +39698,7 @@ function createBinder() { } } function getDeclarationName(node) { - if (node.kind === 280 /* ExportAssignment */) { + if (node.kind === 283 /* ExportAssignment */) { return node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; } const name = getNameOfDeclaration(node); @@ -39556,7 +39707,7 @@ function createBinder() { const moduleName = getTextOfIdentifierOrLiteral(name); return isGlobalScopeAugmentation(node) ? "__global" : `"${moduleName}"`; } - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -39578,30 +39729,30 @@ function createBinder() { return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0; } switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: return "__constructor" /* Constructor */; - case 184 /* FunctionType */: - case 179 /* CallSignature */: - case 332 /* JSDocSignature */: + case 186 /* FunctionType */: + case 181 /* CallSignature */: + case 335 /* JSDocSignature */: return "__call" /* Call */; - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 187 /* ConstructorType */: + case 182 /* ConstructSignature */: return "__new" /* New */; - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return "__index" /* Index */; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return "__export" /* ExportStar */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return "export=" /* ExportEquals */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) === 2 /* ModuleExports */) { return "export=" /* ExportEquals */; } Debug.fail("Unknown binary declaration kind"); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: return isJSDocConstructSignature(node) ? "__new" /* New */ : "__call" /* Call */; - case 168 /* Parameter */: - Debug.assert(node.parent.kind === 326 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); + case 169 /* Parameter */: + Debug.assert(node.parent.kind === 329 /* 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; @@ -39648,7 +39799,7 @@ function createBinder() { messageNeedsName = false; multipleDefaultExports = true; } else { - if (symbol.declarations && symbol.declarations.length && (node.kind === 280 /* ExportAssignment */ && !node.isExportEquals)) { + if (symbol.declarations && symbol.declarations.length && (node.kind === 283 /* ExportAssignment */ && !node.isExportEquals)) { message = Diagnostics.A_module_cannot_have_multiple_default_exports; messageNeedsName = false; multipleDefaultExports = true; @@ -39687,7 +39838,7 @@ function createBinder() { function declareModuleMember(node, symbolFlags, symbolExcludes) { const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { - if (node.kind === 284 /* ExportSpecifier */ || node.kind === 274 /* ImportEqualsDeclaration */ && hasExportModifier) { + if (node.kind === 287 /* ExportSpecifier */ || node.kind === 277 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { return declareSymbol(container.locals, void 0, node, symbolFlags, symbolExcludes); @@ -39731,7 +39882,7 @@ function createBinder() { const saveThisParentContainer = thisParentContainer; const savedBlockScopeContainer = blockScopeContainer; if (containerFlags & 1 /* IsContainer */) { - if (node.kind !== 219 /* ArrowFunction */) { + if (node.kind !== 221 /* ArrowFunction */) { thisParentContainer = container; } container = blockScopeContainer = node; @@ -39751,14 +39902,14 @@ function createBinder() { const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 177 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { currentFlow.node = node; } } - currentReturnTarget = isImmediatelyInvoked || node.kind === 176 /* Constructor */ || isInJSFile(node) && (node.kind === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */) ? createBranchLabel() : void 0; + currentReturnTarget = isImmediatelyInvoked || node.kind === 178 /* Constructor */ || isInJSFile(node) && (node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */) ? createBranchLabel() : void 0; currentExceptionTarget = void 0; currentBreakTarget = void 0; currentContinueTarget = void 0; @@ -39772,14 +39923,14 @@ function createBinder() { node.flags |= 512 /* HasExplicitReturn */; node.endFlowNode = currentFlow; } - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { node.flags |= emitFlags; node.endFlowNode = currentFlow; } if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); currentFlow = finishFlowLabel(currentReturnTarget); - if (node.kind === 176 /* Constructor */ || node.kind === 175 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { + if (node.kind === 178 /* Constructor */ || node.kind === 177 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */)) { node.returnFlowNode = currentFlow; } } @@ -39804,8 +39955,8 @@ function createBinder() { blockScopeContainer = savedBlockScopeContainer; } function bindEachFunctionsFirst(nodes) { - bindEach(nodes, (n) => n.kind === 263 /* FunctionDeclaration */ ? bind(n) : void 0); - bindEach(nodes, (n) => n.kind !== 263 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind === 265 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind !== 265 /* FunctionDeclaration */ ? bind(n) : void 0); } function bindEach(nodes, bindFunction = bind) { if (nodes === void 0) { @@ -39825,59 +39976,59 @@ function createBinder() { inAssignmentPattern = saveInAssignmentPattern; return; } - if (node.kind >= 244 /* FirstStatement */ && node.kind <= 260 /* LastStatement */ && !options.allowUnreachableCode) { + if (node.kind >= 246 /* FirstStatement */ && node.kind <= 262 /* LastStatement */ && !options.allowUnreachableCode) { node.flowNode = currentFlow; } switch (node.kind) { - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: bindWhileStatement(node); break; - case 247 /* DoStatement */: + case 249 /* DoStatement */: bindDoStatement(node); break; - case 249 /* ForStatement */: + case 251 /* ForStatement */: bindForStatement(node); break; - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 246 /* IfStatement */: + case 248 /* IfStatement */: bindIfStatement(node); break; - case 254 /* ReturnStatement */: - case 258 /* ThrowStatement */: + case 256 /* ReturnStatement */: + case 260 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 259 /* TryStatement */: + case 261 /* TryStatement */: bindTryStatement(node); break; - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: bindSwitchStatement(node); break; - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: bindCaseBlock(node); break; - case 298 /* CaseClause */: + case 301 /* CaseClause */: bindCaseClause(node); break; - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: bindExpressionStatement(node); break; - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: bindLabeledStatement(node); break; - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: bindPrefixUnaryExpressionFlow(node); break; - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: bindPostfixUnaryExpressionFlow(node); break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isDestructuringAssignment(node)) { inAssignmentPattern = saveInAssignmentPattern; bindDestructuringAssignmentFlow(node); @@ -39885,49 +40036,49 @@ function createBinder() { } bindBinaryExpressionFlow(node); break; - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: bindDeleteExpressionFlow(node); break; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: bindConditionalExpressionFlow(node); break; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: bindVariableDeclarationFlow(node); break; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: bindAccessExpressionFlow(node); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: bindCallExpressionFlow(node); break; - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: bindNonNullExpressionFlow(node); break; - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 314 /* SourceFile */: { + case 317 /* SourceFile */: { bindEachFunctionsFirst(node.statements); bind(node.endOfFileToken); break; } - case 242 /* Block */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 274 /* ModuleBlock */: bindEachFunctionsFirst(node.statements); break; - case 208 /* BindingElement */: + case 210 /* BindingElement */: bindBindingElementFlow(node); break; - case 168 /* Parameter */: + case 169 /* Parameter */: bindParameterFlow(node); break; - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: - case 305 /* PropertyAssignment */: - case 231 /* SpreadElement */: + case 212 /* ObjectLiteralExpression */: + case 211 /* ArrayLiteralExpression */: + case 308 /* PropertyAssignment */: + case 233 /* SpreadElement */: inAssignmentPattern = saveInAssignmentPattern; default: bindEachChild(node); @@ -39941,19 +40092,19 @@ function createBinder() { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: case 109 /* ThisKeyword */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return containsNarrowableReference(expr); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return hasNarrowableArgument(expr); - case 217 /* ParenthesizedExpression */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: return isNarrowingExpression(expr.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isNarrowingBinaryExpression(expr); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return expr.operator === 53 /* ExclamationToken */ && isNarrowingExpression(expr.operand); - case 222 /* TypeOfExpression */: + case 224 /* TypeOfExpression */: return isNarrowingExpression(expr.expression); } return false; @@ -39972,7 +40123,7 @@ function createBinder() { } } } - if (expr.expression.kind === 211 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { + if (expr.expression.kind === 213 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { return true; } return false; @@ -40003,9 +40154,9 @@ function createBinder() { } function isNarrowableOperand(expr) { switch (expr.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return isNarrowableOperand(expr.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (expr.operatorToken.kind) { case 63 /* EqualsToken */: return isNarrowableOperand(expr.left); @@ -40078,24 +40229,24 @@ function createBinder() { function isStatementCondition(node) { const parent2 = node.parent; switch (parent2.kind) { - case 246 /* IfStatement */: - case 248 /* WhileStatement */: - case 247 /* DoStatement */: + case 248 /* IfStatement */: + case 250 /* WhileStatement */: + case 249 /* DoStatement */: return parent2.expression === node; - case 249 /* ForStatement */: - case 228 /* ConditionalExpression */: + case 251 /* ForStatement */: + case 230 /* ConditionalExpression */: return parent2.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 217 /* ParenthesizedExpression */) { + if (node.kind === 219 /* ParenthesizedExpression */) { node = node.expression; - } else if (node.kind === 225 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { + } else if (node.kind === 227 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { node = node.operand; } else { - return node.kind === 227 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */); + return node.kind === 229 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */); } } } @@ -40136,7 +40287,7 @@ function createBinder() { } function setContinueTarget(node, target) { let label = activeLabelList; - while (label && node.parent.kind === 257 /* LabeledStatement */) { + while (label && node.parent.kind === 259 /* LabeledStatement */) { label.continueTarget = target; label = label.next; node = node.parent; @@ -40187,12 +40338,12 @@ function createBinder() { bind(node.expression); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 251 /* ForOfStatement */) { + if (node.kind === 253 /* ForOfStatement */) { bind(node.awaitModifier); } addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 262 /* VariableDeclarationList */) { + if (node.initializer.kind !== 264 /* VariableDeclarationList */) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -40214,7 +40365,7 @@ function createBinder() { } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 254 /* ReturnStatement */) { + if (node.kind === 256 /* ReturnStatement */) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -40231,7 +40382,7 @@ function createBinder() { return void 0; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - const flowLabel = node.kind === 253 /* BreakStatement */ ? breakTarget : continueTarget; + const flowLabel = node.kind === 255 /* BreakStatement */ ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -40301,7 +40452,7 @@ function createBinder() { preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 299 /* DefaultClause */); + const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 302 /* DefaultClause */); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -40344,7 +40495,7 @@ function createBinder() { maybeBindExpressionFlowIfCall(node.expression); } function maybeBindExpressionFlowIfCall(node) { - if (node.kind === 213 /* CallExpression */) { + if (node.kind === 215 /* CallExpression */) { const call = node; if (call.expression.kind !== 107 /* SuperKeyword */ && isDottedName(call.expression)) { currentFlow = createFlowCall(currentFlow, call); @@ -40370,7 +40521,7 @@ function createBinder() { currentFlow = finishFlowLabel(postStatementLabel); } function bindDestructuringTargetFlow(node) { - if (node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { + if (node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { bindAssignmentTargetFlow(node.left); } else { bindAssignmentTargetFlow(node); @@ -40379,21 +40530,21 @@ function createBinder() { function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); - } else if (node.kind === 209 /* ArrayLiteralExpression */) { + } else if (node.kind === 211 /* ArrayLiteralExpression */) { for (const e of node.elements) { - if (e.kind === 231 /* SpreadElement */) { + if (e.kind === 233 /* SpreadElement */) { bindAssignmentTargetFlow(e.expression); } else { bindDestructuringTargetFlow(e); } } - } else if (node.kind === 210 /* ObjectLiteralExpression */) { + } else if (node.kind === 212 /* ObjectLiteralExpression */) { for (const p of node.properties) { - if (p.kind === 305 /* PropertyAssignment */) { + if (p.kind === 308 /* PropertyAssignment */) { bindDestructuringTargetFlow(p.initializer); - } else if (p.kind === 306 /* ShorthandPropertyAssignment */) { + } else if (p.kind === 309 /* ShorthandPropertyAssignment */) { bindAssignmentTargetFlow(p.name); - } else if (p.kind === 307 /* SpreadAssignment */) { + } else if (p.kind === 310 /* SpreadAssignment */) { bindAssignmentTargetFlow(p.expression); } } @@ -40516,7 +40667,7 @@ function createBinder() { const operator = node.operatorToken.kind; if (isAssignmentOperator(operator) && !isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 63 /* EqualsToken */ && node.left.kind === 212 /* ElementAccessExpression */) { + if (operator === 63 /* EqualsToken */ && node.left.kind === 214 /* ElementAccessExpression */) { const elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -40544,7 +40695,7 @@ function createBinder() { } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 211 /* PropertyAccessExpression */) { + if (node.expression.kind === 213 /* PropertyAccessExpression */) { bindAssignmentTargetFlow(node.expression); } } @@ -40609,7 +40760,7 @@ function createBinder() { } function bindJSDocTypeAlias(node) { bind(node.tagName); - if (node.kind !== 348 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 351 /* JSDocEnumTag */ && node.fullName) { setParent(node.fullName, node); setParentRecursive(node.fullName, false); } @@ -40620,7 +40771,7 @@ function createBinder() { function bindJSDocClassTag(node) { bindEachChild(node); const host = getHostSignatureFromJSDoc(node); - if (host && host.kind !== 174 /* MethodDeclaration */) { + if (host && host.kind !== 176 /* MethodDeclaration */) { addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } @@ -40633,15 +40784,15 @@ function createBinder() { } function bindOptionalChainRest(node) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: bind(node.questionDotToken); bind(node.name); break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: bind(node.questionDotToken); bind(node.argumentExpression); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: bind(node.questionDotToken); bindEach(node.typeArguments); bindEach(node.arguments); @@ -40688,7 +40839,7 @@ function createBinder() { bindOptionalChainFlow(node); } else { const expr = skipParentheses(node.expression); - if (expr.kind === 218 /* FunctionExpression */ || expr.kind === 219 /* ArrowFunction */) { + if (expr.kind === 220 /* FunctionExpression */ || expr.kind === 221 /* ArrowFunction */) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); @@ -40699,7 +40850,7 @@ function createBinder() { } } } - if (node.expression.kind === 211 /* PropertyAccessExpression */) { + if (node.expression.kind === 213 /* PropertyAccessExpression */) { const propertyAccess = node.expression; if (isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -40708,58 +40859,60 @@ function createBinder() { } function getContainerFlags(node) { switch (node.kind) { - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 269 /* EnumDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 295 /* JsxAttributes */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 272 /* EnumDeclaration */: + case 212 /* ObjectLiteralExpression */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 298 /* JsxAttributes */: return 1 /* IsContainer */; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return 1 /* IsContainer */ | 64 /* IsInterface */; - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 200 /* MappedType */: - case 181 /* IndexSignature */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 202 /* MappedType */: + case 183 /* IndexSignature */: return 1 /* IsContainer */ | 32 /* HasLocals */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */; } - case 176 /* Constructor */: - case 263 /* FunctionDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 332 /* JSDocSignature */: - case 326 /* JSDocFunctionType */: - case 184 /* FunctionType */: - case 180 /* ConstructSignature */: - case 185 /* ConstructorType */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 265 /* FunctionDeclaration */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 335 /* JSDocSignature */: + case 329 /* JSDocFunctionType */: + case 186 /* FunctionType */: + case 182 /* ConstructSignature */: + case 187 /* ConstructorType */: + case 177 /* ClassStaticBlockDeclaration */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return 4 /* IsControlFlowContainer */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 301 /* CatchClause */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 272 /* CaseBlock */: + case 304 /* CatchClause */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 275 /* CaseBlock */: return 2 /* IsBlockScopedContainer */; - case 242 /* Block */: + case 244 /* Block */: return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */; } return 0 /* None */; @@ -40772,43 +40925,44 @@ function createBinder() { } function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 314 /* SourceFile */: + case 317 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 210 /* ObjectLiteralExpression */: - case 267 /* InterfaceDeclaration */: - case 295 /* JsxAttributes */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 212 /* ObjectLiteralExpression */: + case 270 /* InterfaceDeclaration */: + case 298 /* JsxAttributes */: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 332 /* JSDocSignature */: - case 181 /* IndexSignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 326 /* JSDocFunctionType */: - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 175 /* ClassStaticBlockDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 200 /* MappedType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 335 /* JSDocSignature */: + case 183 /* IndexSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 329 /* JSDocFunctionType */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 177 /* ClassStaticBlockDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 202 /* MappedType */: return declareSymbol(container.locals, void 0, node, symbolFlags, symbolExcludes); } } @@ -40894,10 +41048,10 @@ function createBinder() { } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (isExternalOrCommonJsModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -41087,7 +41241,7 @@ function createBinder() { } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2 /* ES2015 */) { - if (blockScopeContainer.kind !== 314 /* SourceFile */ && blockScopeContainer.kind !== 270 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { + if (blockScopeContainer.kind !== 317 /* SourceFile */ && blockScopeContainer.kind !== 273 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); file.bindDiagnostics.push(createFileDiagnostic( file, @@ -41154,7 +41308,7 @@ function createBinder() { node.tracingPath = file.path; const saveInStrictMode = inStrictMode; bindWorker(node); - if (node.kind > 164 /* LastToken */) { + if (node.kind > 165 /* LastToken */) { const saveParent = parent; parent = node; const containerFlags = getContainerFlags(node); @@ -41216,23 +41370,23 @@ function createBinder() { break; } case 109 /* ThisKeyword */: - if (currentFlow && (isExpression(node) || parent.kind === 306 /* ShorthandPropertyAssignment */)) { + if (currentFlow && (isExpression(node) || parent.kind === 309 /* ShorthandPropertyAssignment */)) { node.flowNode = currentFlow; } return checkContextualIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: if (currentFlow && isPartOfTypeQuery(node)) { node.flowNode = currentFlow; } break; - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: case 107 /* SuperKeyword */: node.flowNode = currentFlow; break; case 80 /* PrivateIdentifier */: return checkPrivateIdentifier(node); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: const expr = node; if (currentFlow && isNarrowableReference(expr)) { expr.flowNode = currentFlow; @@ -41250,7 +41404,7 @@ function createBinder() { ); } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const specialKind = getAssignmentDeclarationKind(node); switch (specialKind) { case 1 /* ExportsProperty */: @@ -41285,79 +41439,80 @@ function createBinder() { Debug.fail("Unknown binary expression special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return checkStrictModeCatchClause(node); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); case 8 /* NumericLiteral */: return checkStrictModeNumericLiteral(node); - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return checkStrictModeWithStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return checkStrictModeLabeledStatement(node); - case 197 /* ThisType */: + case 199 /* ThisType */: seenThisKeyword = true; return; - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return bindTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return bindParameter(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return bindVariableDeclarationOrBindingElement(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: node.flowNode = currentFlow; return bindVariableDeclarationOrBindingElement(node); - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* OverloadPropertyDeclaration */: return bindPropertyWorker(node); - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 308 /* EnumMember */: + case 311 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return bindPropertyOrMethodOrAccessor( node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ ); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, 0 /* None */); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */); - case 184 /* FunctionType */: - case 326 /* JSDocFunctionType */: - case 332 /* JSDocSignature */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 329 /* JSDocFunctionType */: + case 335 /* JSDocSignature */: + case 187 /* ConstructorType */: return bindFunctionOrConstructorType(node); - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 200 /* MappedType */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 202 /* MappedType */: return bindAnonymousTypeWorker(node); - case 341 /* JSDocClassTag */: + case 344 /* JSDocClassTag */: return bindJSDocClassTag(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return bindFunctionExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: const assignmentKind = getAssignmentDeclarationKind(node); switch (assignmentKind) { case 7 /* ObjectDefinePropertyValue */: @@ -41375,61 +41530,63 @@ function createBinder() { bindCallExpression(node); } break; - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: inStrictMode = true; return bindClassLikeDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return bindAnnotationDeclaration(node); - case 267 /* InterfaceDeclaration */: + case 269 /* OverloadDeclaration */: + return bindOverloadDeclaration(node); + case 270 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return bindModuleDeclaration(node); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return bindJsxAttributes(node); - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 274 /* ImportEqualsDeclaration */: - case 277 /* NamespaceImport */: - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 277 /* ImportEqualsDeclaration */: + case 280 /* NamespaceImport */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return bindNamespaceExportDeclaration(node); - case 276 /* ImportClause */: + case 279 /* ImportClause */: return bindImportClause(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return bindExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return bindExportAssignment(node); - case 314 /* SourceFile */: + case 317 /* SourceFile */: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 242 /* Block */: + case 244 /* Block */: if (!isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) { return; } - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 349 /* JSDocParameterTag */: - if (node.parent.kind === 332 /* JSDocSignature */) { + case 352 /* JSDocParameterTag */: + if (node.parent.kind === 335 /* JSDocSignature */) { return bindParameter(node); } - if (node.parent.kind !== 331 /* JSDocTypeLiteral */) { + if (node.parent.kind !== 334 /* JSDocTypeLiteral */) { break; } - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: const propTag = node; - const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 325 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; + const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 328 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); } } @@ -41567,8 +41724,8 @@ function createBinder() { } const thisContainer = getThisContainer(node, false); switch (thisContainer.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: let constructorSymbol = thisContainer.symbol; if (isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 63 /* EqualsToken */) { const l = thisContainer.parent.left; @@ -41586,13 +41743,14 @@ function createBinder() { addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32 /* Class */); } break; - case 176 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 177 /* ClassStaticBlockDeclaration */: const containingClass = thisContainer.parent; const symbolTable = isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members; if (hasDynamicName(node)) { @@ -41601,7 +41759,7 @@ function createBinder() { declareSymbol(symbolTable, containingClass.symbol, node, 4 /* Property */ | 67108864 /* Assignment */, 0 /* None */, true); } break; - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (hasDynamicName(node)) { break; } else if (thisContainer.commonJsModuleIndicator) { @@ -41626,7 +41784,7 @@ function createBinder() { function bindSpecialPropertyDeclaration(node) { if (node.expression.kind === 109 /* ThisKeyword */) { bindThisPropertyAssignment(node); - } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 314 /* SourceFile */) { + } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 317 /* SourceFile */) { if (isPrototypeAccess(node.expression)) { bindPrototypePropertyAssignment(node, node.parent); } else { @@ -41656,7 +41814,7 @@ function createBinder() { } function bindObjectDefinePropertyAssignment(node) { let namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]); - const isToplevel = node.parent.parent.kind === 314 /* SourceFile */; + const isToplevel = node.parent.parent.kind === 317 /* SourceFile */; namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, node.arguments[0], isToplevel, false, false); bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, false); } @@ -41742,7 +41900,7 @@ function createBinder() { declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */); } function isTopLevelNamespaceAssignment(propertyAccess) { - return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 314 /* SourceFile */ : propertyAccess.parent.parent.kind === 314 /* SourceFile */; + return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 317 /* SourceFile */ : propertyAccess.parent.parent.kind === 317 /* SourceFile */; } function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) { let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer); @@ -41800,7 +41958,7 @@ function createBinder() { } } function bindClassLikeDeclaration(node) { - if (node.kind === 264 /* ClassDeclaration */ || node.kind === 265 /* StructDeclaration */) { + if (node.kind === 266 /* ClassDeclaration */ || node.kind === 267 /* StructDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); } else { const bindingName = node.name ? node.name.escapedText : "__class" /* Class */; @@ -41822,7 +41980,7 @@ function createBinder() { prototypeSymbol.parent = symbol; } function bindAnnotationDeclaration(node) { - Debug.assert(node.kind === 266 /* AnnotationDeclaration */); + Debug.assert(node.kind === 268 /* AnnotationDeclaration */); bindBlockScopedDeclaration(node, 32 /* Class */ | 268435456 /* Annotation */, 899503 /* ClassExcludes */); const { symbol } = node; const prototypeSymbol = createSymbol(4 /* Property */ | 4194304 /* Prototype */, "prototype"); @@ -41836,6 +41994,21 @@ function createBinder() { symbol.exports.set(prototypeSymbol.escapedName, prototypeSymbol); prototypeSymbol.parent = symbol; } + function bindOverloadDeclaration(node) { + Debug.assert(node.kind === 269 /* OverloadDeclaration */); + bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); + const { symbol } = node; + const prototypeSymbol = createSymbol(4 /* Property */ | 4194304 /* Prototype */, "prototype"); + const symbolExport = symbol.exports.get(prototypeSymbol.escapedName); + if (symbolExport) { + if (node.name) { + setParent(node.name, node); + } + file.bindDiagnostics.push(createDiagnosticForNode2(symbolExport.declarations[0], Diagnostics.Duplicate_identifier_0, symbolName(prototypeSymbol))); + } + symbol.exports.set(prototypeSymbol.escapedName, prototypeSymbol); + prototypeSymbol.parent = symbol; + } function bindEnumDeclaration(node) { return isEnumConst(node) ? bindBlockScopedDeclaration(node, 128 /* ConstEnum */, 899967 /* ConstEnumExcludes */) : bindBlockScopedDeclaration(node, 256 /* RegularEnum */, 899327 /* RegularEnumExcludes */); } @@ -41844,7 +42017,7 @@ function createBinder() { checkStrictModeEvalOrArguments(node, node.name); } if (!isBindingPattern(node.name)) { - const possibleVariableDecl = node.kind === 261 /* VariableDeclaration */ ? node : node.parent.parent; + const possibleVariableDecl = node.kind === 263 /* VariableDeclaration */ ? node : node.parent.parent; if (isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { @@ -41857,7 +42030,7 @@ function createBinder() { } } function bindParameter(node) { - if (node.kind === 349 /* JSDocParameterTag */ && container.kind !== 332 /* JSDocSignature */) { + if (node.kind === 352 /* JSDocParameterTag */ && container.kind !== 335 /* JSDocSignature */) { return; } if (inStrictMode && !(node.flags & 16777216 /* Ambient */)) { @@ -41924,7 +42097,7 @@ function createBinder() { } else { declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } - } else if (node.parent.kind === 195 /* InferType */) { + } else if (node.parent.kind === 197 /* InferType */) { const container2 = getInferTypeContainer(node.parent); if (container2) { if (!container2.locals) { @@ -41947,7 +42120,7 @@ function createBinder() { return false; } if (currentFlow === unreachableFlow) { - const reportError = isStatementButNotDeclaration(node) && node.kind !== 243 /* EmptyStatement */ || node.kind === 264 /* ClassDeclaration */ || node.kind === 270 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node); + const reportError = isStatementButNotDeclaration(node) && node.kind !== 245 /* EmptyStatement */ || node.kind === 266 /* ClassDeclaration */ || node.kind === 273 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node); if (reportError) { currentFlow = reportedUnreachableFlow; if (!options.allowUnreachableCode) { @@ -41973,12 +42146,12 @@ function isExecutableStatement(s) { } function isPurelyTypeDeclaration(s) { switch (s.kind) { - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return true; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return getModuleInstanceState(s) !== 1 /* Instantiated */; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return hasSyntacticModifier(s, 2048 /* Const */); default: return false; @@ -42160,7 +42333,7 @@ function createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignatu symbol.exports.forEach(visitSymbol); } forEach(symbol.declarations, (d) => { - if (d.type && d.type.kind === 186 /* TypeQuery */) { + if (d.type && d.type.kind === 188 /* TypeQuery */) { const query = d.type; const entity = getResolvedSymbol(getFirstIdentifier2(query.exprName)); visitSymbol(entity); @@ -44224,7 +44397,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks()); } function isGlobalSourceFile(node) { - return node.kind === 314 /* SourceFile */ && !isExternalOrCommonJsModule(node); + return node.kind === 317 /* SourceFile */ && !isExternalOrCommonJsModule(node); } function isValidFromLibs(symbol, node) { var _a2; @@ -44301,13 +44474,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile); } if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { - if (declaration.kind === 208 /* BindingElement */) { - const errorBindingElement = getAncestor(usage, 208 /* BindingElement */); + if (declaration.kind === 210 /* BindingElement */) { + const errorBindingElement = getAncestor(usage, 210 /* BindingElement */); if (errorBindingElement) { return findAncestor(errorBindingElement, isBindingElement) !== findAncestor(declaration, isBindingElement) || declaration.pos < errorBindingElement.pos; } - return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 261 /* VariableDeclaration */), usage); - } else if (declaration.kind === 261 /* VariableDeclaration */) { + return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 263 /* VariableDeclaration */), usage); + } else if (declaration.kind === 263 /* VariableDeclaration */) { return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } else if (isClassDeclaration(declaration)) { return !findAncestor(usage, (n) => isComputedPropertyName(n) && n.parent.parent === declaration); @@ -44318,10 +44491,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } return true; } - if (usage.parent.kind === 284 /* ExportSpecifier */ || usage.parent.kind === 280 /* ExportAssignment */ && usage.parent.isExportEquals) { + if (usage.parent.kind === 287 /* ExportSpecifier */ || usage.parent.kind === 283 /* ExportAssignment */ && usage.parent.isExportEquals) { return true; } - if (usage.kind === 280 /* ExportAssignment */ && usage.isExportEquals) { + if (usage.kind === 283 /* ExportAssignment */ && usage.isExportEquals) { return true; } if (!!(usage.flags & 8388608 /* JSDoc */) || isInTypeQuery(usage) || usageInTypeDeclaration()) { @@ -44340,9 +44513,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration2, usage2) { switch (declaration2.parent.parent.kind) { - case 244 /* VariableStatement */: - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: + case 246 /* VariableStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) { return true; } @@ -44367,7 +44540,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const initializerOfProperty = propertyDeclaration.initializer === current; if (initializerOfProperty) { if (isStatic(current.parent)) { - if (declaration2.kind === 174 /* MethodDeclaration */) { + if (declaration2.kind === 176 /* MethodDeclaration */) { return true; } if (isPropertyDeclaration(declaration2) && getContainingClass(usage2) === getContainingClass(declaration2)) { @@ -44381,7 +44554,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } else { - const isDeclarationInstanceProperty = declaration2.kind === 171 /* PropertyDeclaration */ && !isStatic(declaration2); + const isDeclarationInstanceProperty = declaration2.kind === 172 /* PropertyDeclaration */ && !isStatic(declaration2); if (!isDeclarationInstanceProperty || getContainingClass(usage2) !== getContainingClass(declaration2)) { return true; } @@ -44400,15 +44573,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return "quit"; } switch (node.kind) { - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return true; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return stopAtAnyPropertyDeclaration && (isPropertyDeclaration(declaration2) && node.parent === declaration2.parent || isParameterPropertyDeclaration(declaration2, declaration2.parent) && node.parent === declaration2.parent.parent) ? "quit" : true; - case 242 /* Block */: + case 244 /* Block */: switch (node.parent.kind) { - case 177 /* GetAccessor */: - case 174 /* MethodDeclaration */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 176 /* MethodDeclaration */: + case 180 /* SetAccessor */: return true; default: return false; @@ -44438,22 +44611,22 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function requiresScopeChangeWorker(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 176 /* Constructor */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 178 /* Constructor */: return false; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 305 /* PropertyAssignment */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 308 /* PropertyAssignment */: return requiresScopeChangeWorker(node.name); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (hasStaticModifier(node)) { return target < 99 /* ESNext */ || !useDefineForClassFields; } return requiresScopeChangeWorker(node.name); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return requiresScopeChangeWorker(node.name); default: if (isNullishCoalesce(node) || isOptionalChain(node)) { @@ -44495,17 +44668,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 329 /* JSDoc */) { - useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 168 /* Parameter */ || lastLocation.kind === 349 /* JSDocParameterTag */ || lastLocation.kind === 350 /* JSDocReturnTag */ || lastLocation.kind === 167 /* TypeParameter */ : false; + if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 332 /* JSDoc */) { + useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 169 /* Parameter */ || lastLocation.kind === 352 /* JSDocParameterTag */ || lastLocation.kind === 353 /* JSDocReturnTag */ || lastLocation.kind === 168 /* TypeParameter */ : false; } if (meaning & result.flags & 3 /* Variable */) { if (useOuterVariableScopeInParameter(result, location, lastLocation)) { useResult = false; } else if (result.flags & 1 /* FunctionScopedVariable */) { - useResult = lastLocation.kind === 168 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); + useResult = lastLocation.kind === 169 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); } } - } else if (location.kind === 194 /* ConditionalType */) { + } else if (location.kind === 196 /* ConditionalType */) { useResult = lastLocation === location.trueType; } if (useResult) { @@ -44517,13 +44690,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation); switch (location.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) break; isInExternalModule = true; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: const moduleExports = getSymbolOfNode(location) ? ((_a2 = getSymbolOfNode(location)) == null ? void 0 : _a2.exports) || emptySymbols : emptySymbols; - if (location.kind === 314 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location)) { + if (location.kind === 317 /* 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) { @@ -44532,7 +44705,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { result = void 0; } const moduleExport = moduleExports.get(name); - if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 284 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 283 /* NamespaceExport */))) { + if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 287 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 286 /* NamespaceExport */))) { break; } } @@ -44544,12 +44717,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: if (result = lookup(((_c = getSymbolOfNode(location)) == null ? void 0 : _c.exports) || emptySymbols, name, meaning & 8 /* EnumMember */)) { break loop; } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (!isStatic(location)) { const ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -44560,9 +44733,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: if (result = lookup(getSymbolOfNode(location).members || emptySymbols, name, meaning & 788968 /* Type */)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { result = void 0; @@ -44576,7 +44749,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } break loop; } - if (location.kind === 232 /* ClassExpression */ && meaning & 32 /* Class */) { + if (location.kind === 234 /* ClassExpression */ && meaning & 32 /* Class */) { const className = location.name; if (className && name === className.escapedText) { result = location.symbol; @@ -44584,7 +44757,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: if (lastLocation === location.expression && location.parent.token === 95 /* ExtendsKeyword */) { const container = location.parent.parent; if (isClassLike(container) && (result = lookup(getSymbolOfNode(container).members, name, meaning & 788968 /* Type */))) { @@ -44595,9 +44768,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (isClassLike(grandparent) || grandparent.kind === 267 /* InterfaceDeclaration */) { + if (isClassLike(grandparent) || grandparent.kind === 270 /* InterfaceDeclaration */) { if (result = lookup(getSymbolOfNode(grandparent).members, name, meaning & 788968 /* Type */)) { if (nameNotFoundMessage) { error(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); @@ -44606,21 +44779,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: if (getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */) { break; } - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -44633,37 +44806,37 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 169 /* Decorator */: - if (location.parent && location.parent.kind === 168 /* Parameter */) { + case 170 /* Decorator */: + if (location.parent && location.parent.kind === 169 /* Parameter */) { location = location.parent; } - if (location.parent && (isClassElement(location.parent) || location.parent.kind === 264 /* ClassDeclaration */)) { + if (location.parent && (isClassElement(location.parent) || location.parent.kind === 266 /* ClassDeclaration */)) { location = location.parent; } break; - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: const root = getJSDocRoot(location); if (root) { location = root.parent; } break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (!associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 208 /* BindingElement */: + case 210 /* BindingElement */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (isParameterDeclaration(location) && !associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 195 /* InferType */: + case 197 /* InferType */: if (meaning & 262144 /* TypeParameter */) { const parameterName = location.typeParameter.name; if (parameterName && name === parameterName.escapedText) { @@ -44684,7 +44857,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (!result) { if (lastLocation) { - Debug.assert(lastLocation.kind === 314 /* SourceFile */); + Debug.assert(lastLocation.kind === 317 /* SourceFile */); if (lastLocation.commonJsModuleIndicator && name === "exports" && meaning & lastLocation.symbol.flags) { return lastLocation.symbol; } @@ -44781,7 +44954,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 284 /* ExportSpecifier */ ? 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 === 287 /* ExportSpecifier */ ? 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), @@ -44801,14 +44974,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { diagnostic, createDiagnosticForNode( typeOnlyDeclaration, - typeOnlyDeclaration.kind === 284 /* ExportSpecifier */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, + typeOnlyDeclaration.kind === 287 /* ExportSpecifier */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, unescapedName ) ); } function getIsDeferredContext(location, lastLocation) { - if (location.kind !== 219 /* ArrowFunction */ && location.kind !== 218 /* FunctionExpression */) { - return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 171 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); + if (location.kind !== 221 /* ArrowFunction */ && location.kind !== 220 /* FunctionExpression */) { + return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 172 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); } if (lastLocation && lastLocation === location.name) { return false; @@ -44820,12 +44993,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isSelfReferenceLocation(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 270 /* ModuleDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 273 /* ModuleDeclaration */: return true; default: return false; @@ -44837,7 +45010,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isTypeParameterSymbolDeclaredInContainer(symbol, container) { if (symbol.declarations) { for (const decl of symbol.declarations) { - if (decl.kind === 167 /* TypeParameter */) { + if (decl.kind === 168 /* TypeParameter */) { const parent = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent; if (parent === container) { return !(isJSDocTemplateTag(decl.parent) && find(decl.parent.parent.tags, isJSDocTypeAlias)); @@ -44887,9 +45060,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getEntityNameForExtendingInterface(node) { switch (node.kind) { case 79 /* Identifier */: - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : void 0; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: if (isEntityNameExpression(node.expression)) { return node.expression; } @@ -44937,7 +45110,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; } function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { - if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 284 /* ExportSpecifier */) { + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 287 /* ExportSpecifier */) { error(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); return true; } @@ -45026,7 +45199,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const declaration = (_a2 = result.declarations) == null ? void 0 : _a2.find( - (d) => isBlockOrCatchScoped(d) || isClassLike(d) || isAnnotationDeclaration(d) || d.kind === 269 /* EnumDeclaration */ + (d) => isBlockOrCatchScoped(d) || isClassLike(d) || isAnnotationDeclaration(d) || d.kind === 272 /* EnumDeclaration */ ); if (declaration === void 0) return Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration"); @@ -45060,13 +45233,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getAnyImportSyntax(node) { switch (node.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return node; - case 276 /* ImportClause */: + case 279 /* ImportClause */: return node.parent; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return node.parent.parent; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return node.parent.parent.parent; default: return void 0; @@ -45076,7 +45249,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration2); } function isAliasSymbolDeclaration2(node) { - return node.kind === 274 /* ImportEqualsDeclaration */ || node.kind === 273 /* NamespaceExportDeclaration */ || node.kind === 276 /* ImportClause */ && !!node.name || node.kind === 277 /* NamespaceImport */ || node.kind === 283 /* NamespaceExport */ || node.kind === 279 /* ImportSpecifier */ || node.kind === 284 /* ExportSpecifier */ || node.kind === 280 /* 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 === 306 /* ShorthandPropertyAssignment */ || node.kind === 305 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 261 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 208 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); + return node.kind === 277 /* ImportEqualsDeclaration */ || node.kind === 276 /* NamespaceExportDeclaration */ || node.kind === 279 /* ImportClause */ && !!node.name || node.kind === 280 /* NamespaceImport */ || node.kind === 286 /* NamespaceExport */ || node.kind === 282 /* ImportSpecifier */ || node.kind === 287 /* ExportSpecifier */ || node.kind === 283 /* 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 === 309 /* ShorthandPropertyAssignment */ || node.kind === 308 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 263 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 210 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); } function isAliasableOrJsExpression(e) { return isAliasableExpression(e) || isFunctionExpression(e) && isJSConstructor(e); @@ -45087,7 +45260,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 286 /* ExternalModuleReference */) { + if (isVariableDeclaration(node) || node.moduleReference.kind === 289 /* ExternalModuleReference */) { const immediate = resolveExternalModuleName( node, getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node) @@ -45103,7 +45276,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) { if (markSymbolOfAliasDeclarationIfTypeOnly(node, void 0, resolved, false) && !node.isTypeOnly) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node)); - const isExport = typeOnlyDeclaration.kind === 284 /* ExportSpecifier */; + const isExport = typeOnlyDeclaration.kind === 287 /* ExportSpecifier */; 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 = unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); @@ -45205,15 +45378,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getModuleSpecifierForImportOrExport(node) { switch (node.kind) { - case 276 /* ImportClause */: + case 279 /* ImportClause */: return node.parent.moduleSpecifier; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : void 0; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return node.parent.parent.moduleSpecifier; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return node.parent.parent.parent.moduleSpecifier; - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: return node.parent.parent.moduleSpecifier; default: return Debug.assertNever(node); @@ -45458,31 +45631,31 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve = false) { switch (node.kind) { - case 274 /* ImportEqualsDeclaration */: - case 261 /* VariableDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 263 /* VariableDeclaration */: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 276 /* ImportClause */: + case 279 /* ImportClause */: return getTargetOfImportClause(node, dontRecursivelyResolve); - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: return getTargetOfNamespaceExport(node, dontRecursivelyResolve); - case 279 /* ImportSpecifier */: - case 208 /* BindingElement */: + case 282 /* ImportSpecifier */: + case 210 /* BindingElement */: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: return getTargetOfExportSpecifier(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve); - case 280 /* ExportAssignment */: - case 227 /* BinaryExpression */: + case 283 /* ExportAssignment */: + case 229 /* BinaryExpression */: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return resolveEntityName(node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, true, dontRecursivelyResolve); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return getTargetOfAliasLikeExpression(node.initializer, dontRecursivelyResolve); - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: return getTargetOfAccessExpression(node, dontRecursivelyResolve); default: return Debug.fail(); @@ -45613,10 +45786,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (entityName.kind === 79 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 79 /* Identifier */ || entityName.parent.kind === 165 /* QualifiedName */) { + if (entityName.kind === 79 /* Identifier */ || entityName.parent.kind === 166 /* QualifiedName */) { return resolveEntityName(entityName, 1920 /* Namespace */, false, dontResolveAlias); } else { - Debug.assert(entityName.parent.kind === 274 /* ImportEqualsDeclaration */); + Debug.assert(entityName.parent.kind === 277 /* ImportEqualsDeclaration */); return resolveEntityName(entityName, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, false, dontResolveAlias); } } @@ -45676,9 +45849,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!symbol) { return getMergedSymbol(symbolFromJSPrototype); } - } else if (name.kind === 165 /* QualifiedName */ || name.kind === 211 /* PropertyAccessExpression */) { - const left = name.kind === 165 /* QualifiedName */ ? name.left : name.expression; - const right = name.kind === 165 /* QualifiedName */ ? name.right : name.name; + } else if (name.kind === 166 /* QualifiedName */ || name.kind === 213 /* PropertyAccessExpression */) { + const left = name.kind === 166 /* QualifiedName */ ? name.left : name.expression; + const right = name.kind === 166 /* QualifiedName */ ? name.right : name.name; let namespace = resolveEntityName(left, namespaceMeaning, ignoreErrors, false, location); if (!namespace || nodeIsMissing(right)) { return void 0; @@ -45735,7 +45908,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 280 /* ExportAssignment */)) { + if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 283 /* ExportAssignment */)) { markSymbolOfAliasDeclarationIfTypeOnly(getAliasDeclarationFromName(name), symbol, void 0, true); } return symbol.flags & meaning || dontResolveAlias ? symbol : resolveAlias(symbol); @@ -46038,7 +46211,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { var _a2; const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias); if (!dontResolveAlias && symbol) { - if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 314 /* SourceFile */)) { + if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 317 /* 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; @@ -46356,7 +46529,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function findConstructorDeclaration(node) { const members = node.members; for (const member of members) { - if (member.kind === 176 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 178 /* Constructor */ && nodeIsPresent(member.body)) { return member; } } @@ -46466,19 +46639,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } switch (location.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) { break; } - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: const sym = getSymbolOfNode(location); if (result = callback((sym == null ? void 0 : sym.exports) || emptySymbols, void 0, true, location)) { return result; } break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: let table; (getSymbolOfNode(location).members || emptySymbols).forEach((memberSymbol, key) => { if (memberSymbol.flags & (788968 /* Type */ & ~67108864 /* Assignment */)) { @@ -46534,7 +46707,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 284 /* 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, 287 /* ExportSpecifier */))) { const resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); const candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification); if (candidate) { @@ -46570,7 +46743,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (symbolFromSymbolTable === symbol) { return true; } - const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 284 /* ExportSpecifier */); + const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 287 /* ExportSpecifier */); symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; const flags = shouldResolveAlias ? getAllSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; if (flags & meaning) { @@ -46585,10 +46758,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (symbol.declarations && symbol.declarations.length) { for (const declaration of symbol.declarations) { switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: continue; default: return false; @@ -46687,10 +46860,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return node && getSymbolOfNode(node); } function hasExternalModuleSymbol(declaration) { - return isAmbientModule(declaration) || declaration.kind === 314 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isAmbientModule(declaration) || declaration.kind === 317 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasNonGlobalAugmentationExternalModuleSymbol(declaration) { - return isModuleWithStringLiteralName(declaration) || declaration.kind === 314 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isModuleWithStringLiteralName(declaration) || declaration.kind === 317 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { let aliasesToMakeVisible; @@ -46736,9 +46909,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isEntityNameVisible(entityName, enclosingDeclaration) { let meaning; - if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 234 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 166 /* ComputedPropertyName */) { + if (entityName.parent.kind === 188 /* TypeQuery */ || entityName.parent.kind === 236 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; - } else if (entityName.kind === 165 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 274 /* ImportEqualsDeclaration */) { + } else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 213 /* PropertyAccessExpression */ || entityName.parent.kind === 277 /* ImportEqualsDeclaration */) { meaning = 1920 /* Namespace */; } else { meaning = 788968 /* Type */; @@ -46778,7 +46951,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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) === 314 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); + const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 317 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); printer.writeNode(4 /* Unspecified */, entity, sourceFile, writer2); return writer2; @@ -46789,9 +46962,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function signatureToStringWorker(writer2) { let sigOutput; if (flags & 262144 /* WriteArrowStyleSignature */) { - sigOutput = kind === 1 /* Construct */ ? 185 /* ConstructorType */ : 184 /* FunctionType */; + sigOutput = kind === 1 /* Construct */ ? 187 /* ConstructorType */ : 186 /* FunctionType */; } else { - sigOutput = kind === 1 /* Construct */ ? 180 /* ConstructSignature */ : 179 /* CallSignature */; + sigOutput = kind === 1 /* Construct */ ? 182 /* ConstructSignature */ : 181 /* CallSignature */; } const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */); const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); @@ -47285,7 +47458,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function shouldWriteTypeOfFunctionSymbol() { var _a3; const isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */) && some(symbol.declarations, (declaration) => isStatic(declaration)); - const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || forEach(symbol.declarations, (declaration) => declaration.parent.kind === 314 /* SourceFile */ || declaration.parent.kind === 271 /* ModuleBlock */)); + const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || forEach(symbol.declarations, (declaration) => declaration.parent.kind === 317 /* SourceFile */ || declaration.parent.kind === 274 /* ModuleBlock */)); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a3 = context.visitedTypes) == null ? void 0 : _a3.has(typeId))) && (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration)); } @@ -47364,12 +47537,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { const signature = resolved.callSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 184 /* FunctionType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 186 /* FunctionType */, context); return signatureNode; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { const signature = resolved.constructSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 185 /* ConstructorType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 187 /* ConstructorType */, context); return signatureNode; } } @@ -47537,12 +47710,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const typeElements = []; for (const signature of resolvedType.callSignatures) { - typeElements.push(signatureToSignatureDeclarationHelper(signature, 179 /* CallSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 181 /* CallSignature */, context)); } for (const signature of resolvedType.constructSignatures) { if (signature.flags & 4 /* Abstract */) continue; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 180 /* ConstructSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 182 /* ConstructSignature */, context)); } for (const info of resolvedType.indexInfos) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0)); @@ -47614,7 +47787,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 173 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); + const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 175 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); typeElements.push(preserveCommentsOn(methodDeclaration)); } } else { @@ -47645,8 +47818,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function preserveCommentsOn(node) { var _a3; - if (some(propertySymbol.declarations, (d) => d.kind === 356 /* JSDocPropertyTag */)) { - const d = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d2) => d2.kind === 356 /* JSDocPropertyTag */); + if (some(propertySymbol.declarations, (d) => d.kind === 359 /* JSDocPropertyTag */)) { + const d = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d2) => d2.kind === 359 /* 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 }]); @@ -47749,7 +47922,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { typeParameters = signature.typeParameters && signature.typeParameters.map((parameter) => typeParameterToDeclaration(parameter, context)); } const expandedParams = getExpandedParameters(signature, true)[0]; - const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 176 /* 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 === 178 /* 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); @@ -47770,11 +47943,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } let modifiers = options == null ? void 0 : options.modifiers; - if (kind === 185 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { + if (kind === 187 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { const flags = modifiersToFlags(modifiers); modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */); } - const node = kind === 179 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 180 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_a2 = options == null ? void 0 : options.name) != null ? _a2 : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 174 /* MethodDeclaration */ ? factory.createMethodDeclaration(modifiers, void 0, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), void 0, typeParameters, parameters, returnTypeNode, void 0) : kind === 176 /* Constructor */ ? factory.createConstructorDeclaration(modifiers, parameters, void 0) : kind === 177 /* GetAccessor */ ? factory.createGetAccessorDeclaration(modifiers, (_c = options == null ? void 0 : options.name) != null ? _c : factory.createIdentifier(""), parameters, returnTypeNode, void 0) : kind === 178 /* SetAccessor */ ? factory.createSetAccessorDeclaration(modifiers, (_d = options == null ? void 0 : options.name) != null ? _d : factory.createIdentifier(""), parameters, void 0) : kind === 181 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 326 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 184 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 185 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 263 /* FunctionDeclaration */ ? factory.createFunctionDeclaration(modifiers, void 0, (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, void 0) : kind === 218 /* FunctionExpression */ ? factory.createFunctionExpression(modifiers, void 0, (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, factory.createBlock([])) : kind === 219 /* ArrowFunction */ ? factory.createArrowFunction(modifiers, typeParameters, parameters, returnTypeNode, void 0, factory.createBlock([])) : Debug.assertNever(kind); + const node = kind === 181 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 182 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 175 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_a2 = options == null ? void 0 : options.name) != null ? _a2 : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 176 /* MethodDeclaration */ ? factory.createMethodDeclaration(modifiers, void 0, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), void 0, typeParameters, parameters, returnTypeNode, void 0) : kind === 178 /* Constructor */ ? factory.createConstructorDeclaration(modifiers, parameters, void 0) : kind === 179 /* GetAccessor */ ? factory.createGetAccessorDeclaration(modifiers, (_c = options == null ? void 0 : options.name) != null ? _c : factory.createIdentifier(""), parameters, returnTypeNode, void 0) : kind === 180 /* SetAccessor */ ? factory.createSetAccessorDeclaration(modifiers, (_d = options == null ? void 0 : options.name) != null ? _d : factory.createIdentifier(""), parameters, void 0) : kind === 183 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 329 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 186 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 187 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 265 /* FunctionDeclaration */ ? factory.createFunctionDeclaration(modifiers, void 0, (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, void 0) : kind === 220 /* FunctionExpression */ ? factory.createFunctionExpression(modifiers, void 0, (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, factory.createBlock([])) : kind === 221 /* ArrowFunction */ ? factory.createArrowFunction(modifiers, typeParameters, parameters, returnTypeNode, void 0, factory.createBlock([])) : Debug.assertNever(kind); if (typeArguments) { node.typeArguments = factory.createNodeArray(typeArguments); } @@ -47812,9 +47985,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return typeParameterToDeclarationWithConstraint(type, context, constraintNode); } function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { - let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 168 /* Parameter */); + let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */); if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = getDeclarationOfKind(parameterSymbol, 349 /* JSDocParameterTag */); + parameterDeclaration = getDeclarationOfKind(parameterSymbol, 352 /* JSDocParameterTag */); } let parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -47824,7 +47997,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 165 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); + const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 79 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* 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( @@ -47972,11 +48145,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) { var _a2; - let file = getDeclarationOfKind(symbol, 314 /* SourceFile */); + let file = getDeclarationOfKind(symbol, 317 /* SourceFile */); if (!file) { const equivalentFileSymbol = firstDefined(symbol.declarations, (d) => getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol)); if (equivalentFileSymbol) { - file = getDeclarationOfKind(equivalentFileSymbol, 314 /* SourceFile */); + file = getDeclarationOfKind(equivalentFileSymbol, 317 /* SourceFile */); } } if (file && file.moduleName !== void 0) { @@ -48416,7 +48589,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } return transformed === existing ? setTextRange(factory.cloneNode(existing), existing) : transformed; function visitExistingNodeTreeSymbols(node) { - if (isJSDocAllType(node) || node.kind === 328 /* JSDocNamepathType */) { + if (isJSDocAllType(node) || node.kind === 331 /* JSDocNamepathType */) { return factory.createKeywordTypeNode(132 /* AnyKeyword */); } if (isJSDocUnknownType(node)) { @@ -48556,8 +48729,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function symbolTableToDeclarationStatements(symbolTable, context, bundled) { - const serializePropertySymbolForClass = makeSerializePropertySymbol(factory.createPropertyDeclaration, 174 /* MethodDeclaration */, true); - const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol((mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), 173 /* MethodSignature */, false); + const serializePropertySymbolForClass = makeSerializePropertySymbol(factory.createPropertyDeclaration, 176 /* MethodDeclaration */, true); + const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol((mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), 175 /* MethodSignature */, false); const enclosingDeclaration = context.enclosingDeclaration; let results = []; const visitedSymbols = new Set2(); @@ -48931,8 +49104,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 179 /* CallSignature */); - const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 180 /* ConstructSignature */); + const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 181 /* CallSignature */); + const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 182 /* ConstructSignature */); const indexSignatures = serializeIndexSignatures(interfaceType, baseType); const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(95 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; addResult(factory.createInterfaceDeclaration( @@ -49000,7 +49173,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { const signatures = getSignaturesOfType(type, 0 /* Call */); for (const sig of signatures) { - const decl = signatureToSignatureDeclarationHelper(sig, 263 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); + const decl = signatureToSignatureDeclarationHelper(sig, 265 /* 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)) { @@ -49135,7 +49308,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { (p) => serializePropertySymbolForClass(p, true, staticBaseType) ); const isNonConstructableClassLikeInJsFile = !isClass && !!symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && !some(getSignaturesOfType(staticType, 1 /* Construct */)); - const constructors = isNonConstructableClassLikeInJsFile ? [factory.createConstructorDeclaration(factory.createModifiersFromModifierFlags(8 /* Private */), [], void 0)] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 176 /* Constructor */); + const constructors = isNonConstructableClassLikeInJsFile ? [factory.createConstructorDeclaration(factory.createModifiersFromModifierFlags(8 /* Private */), [], void 0)] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 178 /* Constructor */); const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); context.enclosingDeclaration = oldEnclosing; addResult(setTextRange(factory.createClassDeclaration( @@ -49182,8 +49355,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const targetName = getInternalSymbolName(target, verbatimTargetName); includePrivateSymbol(target); switch (node.kind) { - case 208 /* BindingElement */: - if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 261 /* VariableDeclaration */) { + case 210 /* BindingElement */: + if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 263 /* VariableDeclaration */) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; addResult(factory.createImportDeclaration( @@ -49199,15 +49372,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { break; } Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); - case 306 /* ShorthandPropertyAssignment */: - if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 227 /* BinaryExpression */) { + case 309 /* ShorthandPropertyAssignment */: + if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 229 /* BinaryExpression */) { serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), targetName ); } break; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: if (isPropertyAccessExpression(node.initializer)) { const initializer = node.initializer; const uniqueName = factory.createUniqueName(localName); @@ -49226,7 +49399,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { ), modifierFlags); break; } - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, isJsonSourceFile)) { serializeMaybeAliasAssignment(symbol); break; @@ -49239,10 +49412,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { isLocalImport ? symbolToName(target, context, 67108863 /* All */, false) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) ), isLocalImport ? modifierFlags : 0 /* None */); break; - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); break; - case 276 /* ImportClause */: + case 279 /* ImportClause */: addResult(factory.createImportDeclaration( void 0, factory.createImportClause(false, factory.createIdentifier(localName), void 0), @@ -49250,7 +49423,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { void 0 ), 0 /* None */); break; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: addResult(factory.createImportDeclaration( void 0, factory.createImportClause(false, void 0, factory.createNamespaceImport(factory.createIdentifier(localName))), @@ -49258,7 +49431,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { void 0 ), 0 /* None */); break; - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: addResult(factory.createExportDeclaration( void 0, false, @@ -49266,7 +49439,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) ), 0 /* None */); break; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: addResult(factory.createImportDeclaration( void 0, factory.createImportClause( @@ -49284,7 +49457,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { void 0 ), 0 /* None */); break; - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: const specifier = node.parent.parent.moduleSpecifier; serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), @@ -49292,12 +49465,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { specifier && isStringLiteralLike(specifier) ? factory.createStringLiteral(specifier.text) : void 0 ); break; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: serializeMaybeAliasAssignment(symbol); break; - case 227 /* BinaryExpression */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 229 /* BinaryExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: if (symbol.escapedName === "default" /* Default */ || symbol.escapedName === "export=" /* ExportEquals */) { serializeMaybeAliasAssignment(symbol); } else { @@ -49673,17 +49846,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getTypeAliasForTypeLiteral(type) { if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */ && type.symbol.declarations) { const node = walkUpParenthesizedTypes(type.symbol.declarations[0].parent); - if (node.kind === 268 /* TypeAliasDeclaration */) { + if (node.kind === 271 /* TypeAliasDeclaration */) { return getSymbolOfNode(node); } } return void 0; } function isTopLevelInExternalModuleAugmentation(node) { - return node && node.parent && node.parent.kind === 271 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); + return node && node.parent && node.parent.kind === 274 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); } function isDefaultBindingContext(location) { - return location.kind === 314 /* SourceFile */ || isAmbientModule(location); + return location.kind === 317 /* SourceFile */ || isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { const nameType = getSymbolLinks(symbol).nameType; @@ -49728,17 +49901,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!declaration) { declaration = symbol.declarations[0]; } - if (declaration.parent && declaration.parent.kind === 261 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 263 /* VariableDeclaration */) { return declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: if (context && !context.encounteredError && !(context.flags & 131072 /* AllowAnonymousIdentifier */)) { context.encounteredError = true; } - return declaration.kind === 232 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; + return declaration.kind === 234 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; } } const name = getNameOfSymbolFromNameType(symbol, context); @@ -49755,68 +49928,68 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: - case 348 /* JSDocEnumTag */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: + case 351 /* JSDocEnumTag */: return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent)); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: if (isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 263 /* FunctionDeclaration */: - case 269 /* EnumDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 266 /* AnnotationDeclaration */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 265 /* FunctionDeclaration */: + case 272 /* EnumDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 268 /* AnnotationDeclaration */: if (isExternalModuleAugmentation(node)) { return true; } const parent = getDeclarationContainer(node); - if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 274 /* ImportEqualsDeclaration */ && parent.kind !== 314 /* SourceFile */ && parent.flags & 16777216 /* Ambient */)) { + if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 277 /* ImportEqualsDeclaration */ && parent.kind !== 317 /* SourceFile */ && parent.flags & 16777216 /* Ambient */)) { return isGlobalSourceFile(parent); } return isDeclarationVisible(parent); - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) { return false; } - case 176 /* Constructor */: - case 180 /* ConstructSignature */: - case 179 /* CallSignature */: - case 181 /* IndexSignature */: - case 168 /* Parameter */: - case 271 /* ModuleBlock */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 187 /* TypeLiteral */: - case 183 /* TypeReference */: - case 188 /* ArrayType */: - case 189 /* TupleType */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: + case 178 /* Constructor */: + case 182 /* ConstructSignature */: + case 181 /* CallSignature */: + case 183 /* IndexSignature */: + case 169 /* Parameter */: + case 274 /* ModuleBlock */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 189 /* TypeLiteral */: + case 185 /* TypeReference */: + case 190 /* ArrayType */: + case 191 /* TupleType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: + case 198 /* ParenthesizedType */: + case 204 /* NamedTupleMember */: return isDeclarationVisible(node.parent); - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: - case 279 /* ImportSpecifier */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: + case 282 /* ImportSpecifier */: return false; - case 167 /* TypeParameter */: - case 314 /* SourceFile */: - case 273 /* NamespaceExportDeclaration */: + case 168 /* TypeParameter */: + case 317 /* SourceFile */: + case 276 /* NamespaceExportDeclaration */: return true; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return false; default: return false; @@ -49825,9 +49998,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function collectLinkedAliases(node, setVisibility) { let exportSymbol; - if (node.parent && node.parent.kind === 280 /* ExportAssignment */) { + if (node.parent && node.parent.kind === 283 /* ExportAssignment */) { exportSymbol = resolveName(node, node.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, void 0, node, false); - } else if (node.parent.kind === 284 /* ExportSpecifier */) { + } else if (node.parent.kind === 287 /* ExportSpecifier */) { exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); } let result; @@ -49922,12 +50095,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getDeclarationContainer(node) { return findAncestor(getRootDeclaration(node), (node2) => { switch (node2.kind) { - case 261 /* VariableDeclaration */: - case 262 /* VariableDeclarationList */: - case 279 /* ImportSpecifier */: - case 278 /* NamedImports */: - case 277 /* NamespaceImport */: - case 276 /* ImportClause */: + case 263 /* VariableDeclaration */: + case 264 /* VariableDeclarationList */: + case 282 /* ImportSpecifier */: + case 281 /* NamedImports */: + case 280 /* NamespaceImport */: + case 279 /* ImportClause */: return false; default: return true; @@ -50031,23 +50204,23 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getParentElementAccess(node) { const ancestor = node.parent.parent; switch (ancestor.kind) { - case 208 /* BindingElement */: - case 305 /* PropertyAssignment */: + case 210 /* BindingElement */: + case 308 /* PropertyAssignment */: return getSyntheticElementAccess(ancestor); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return getSyntheticElementAccess(node.parent); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return ancestor.initializer; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return ancestor.right; } } function getDestructuringPropertyName(node) { const parent = node.parent; - if (node.kind === 208 /* BindingElement */ && parent.kind === 206 /* ObjectBindingPattern */) { + if (node.kind === 210 /* BindingElement */ && parent.kind === 208 /* ObjectBindingPattern */) { return getLiteralPropertyNameText(node.propertyName || node.name); } - if (node.kind === 305 /* PropertyAssignment */ || node.kind === 306 /* ShorthandPropertyAssignment */) { + if (node.kind === 308 /* PropertyAssignment */ || node.kind === 309 /* ShorthandPropertyAssignment */) { return getLiteralPropertyNameText(node.name); } return "" + parent.elements.indexOf(node); @@ -50072,7 +50245,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); } let type; - if (pattern.kind === 206 /* ObjectBindingPattern */) { + if (pattern.kind === 208 /* ObjectBindingPattern */) { if (declaration.dotDotDotToken) { parentType = getReducedType(parentType); if (parentType.flags & 2 /* Unknown */ || !isValidSpreadType(parentType)) { @@ -50127,17 +50300,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isEmptyArrayLiteral2(node) { const expr = skipParentheses(node, true); - return expr.kind === 209 /* ArrayLiteralExpression */ && expr.elements.length === 0; + return expr.kind === 211 /* 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 === 250 /* ForInStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 252 /* ForInStatement */) { const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression(declaration.parent.parent.expression, checkMode))); return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType; } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 251 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 253 /* ForOfStatement */) { const forOfStatement = declaration.parent.parent; return checkRightHandSideOfForOf(forOfStatement) || anyType; } @@ -50160,8 +50333,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (isParameter(declaration)) { const func = declaration.parent; - if (func.kind === 178 /* SetAccessor */ && hasBindableName(func)) { - const getter = getDeclarationOfKind(getSymbolOfNode(declaration.parent), 177 /* GetAccessor */); + if (func.kind === 180 /* SetAccessor */ && hasBindableName(func)) { + const getter = getDeclarationOfKind(getSymbolOfNode(declaration.parent), 179 /* GetAccessor */); if (getter) { const getterSignature = getSignatureFromDeclaration(getter); const thisParameter = getAccessorThisParameter(func); @@ -50214,7 +50387,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 212 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration(void 0, declaration, symbol, declaration)); + links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 214 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration(void 0, declaration, symbol, declaration)); } return links.isConstructorDeclaredProperty; } @@ -50230,7 +50403,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } for (const declaration of symbol.declarations) { const container = getThisContainer(declaration, false); - if (container && (container.kind === 176 /* Constructor */ || isJSConstructor(container))) { + if (container && (container.kind === 178 /* Constructor */ || isJSConstructor(container))) { return container; } } @@ -50492,7 +50665,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isDeclarationInConstructor(expression) { const thisContainer = getThisContainer(expression, false); - return thisContainer.kind === 176 /* Constructor */ || thisContainer.kind === 263 /* FunctionDeclaration */ || thisContainer.kind === 218 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); + return thisContainer.kind === 178 /* Constructor */ || thisContainer.kind === 265 /* FunctionDeclaration */ || thisContainer.kind === 220 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); } function getConstructorDefinedThisAssignmentTypes(types, declarations) { Debug.assert(types.length === declarations.length); @@ -50548,7 +50721,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2) { const elements = pattern.elements; const lastElement = lastOrUndefined(elements); - const restElement = lastElement && lastElement.kind === 208 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; + const restElement = lastElement && lastElement.kind === 210 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; if (elements.length === 0 || elements.length === 1 && restElement) { return languageVersion >= 2 /* ES2015 */ ? createIterableType(anyType) : anyArrayType; } @@ -50564,7 +50737,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return result; } function getTypeFromBindingPattern(pattern, includePatternInType = false, reportErrors2 = false) { - return pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); + return pattern.kind === 208 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors2) { return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration(declaration, true, 0 /* Normal */), declaration, reportErrors2); @@ -50597,7 +50770,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function declarationBelongsToPrivateAmbientMember(declaration) { const root = getRootDeclaration(declaration); - const memberDeclaration = root.kind === 168 /* Parameter */ ? root.parent : root; + const memberDeclaration = root.kind === 169 /* Parameter */ ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function tryGetTypeFromEffectiveTypeNode(node) { @@ -50665,7 +50838,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return reportCircularityError(symbol); } let type; - if (declaration.kind === 280 /* ExportAssignment */) { + if (declaration.kind === 283 /* 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); @@ -50682,7 +50855,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { type = tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionForMutableLocation(declaration.name, 0 /* Normal */); } else if (isObjectLiteralMethod(declaration)) { type = tryGetTypeFromEffectiveTypeNode(declaration) || checkObjectLiteralMethod(declaration, 0 /* Normal */); - } else if (isParameter(declaration) || isPropertyDeclaration(declaration) || isPropertySignature(declaration) || isAnnotationPropertyDeclaration(declaration) || isVariableDeclaration(declaration) || isBindingElement(declaration) || isJSDocPropertyLikeTag(declaration)) { + } else if (isParameter(declaration) || isPropertyDeclaration(declaration) || isPropertySignature(declaration) || isAnnotationPropertyDeclaration(declaration) || isVariableDeclaration(declaration) || isBindingElement(declaration) || isOverloadPropertyDeclaration(declaration) || isJSDocPropertyLikeTag(declaration)) { type = getWidenedTypeForVariableLikeDeclaration(declaration, true); } else if (isEnumDeclaration(declaration)) { type = getTypeOfFuncClassEnumModule(symbol); @@ -50702,13 +50875,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getAnnotatedAccessorTypeNode(accessor) { if (accessor) { switch (accessor.kind) { - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: const getterTypeAnnotation = getEffectiveReturnTypeNode(accessor); return getterTypeAnnotation; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: const setterTypeAnnotation = getEffectiveSetAccessorTypeAnnotationNode(accessor); return setterTypeAnnotation; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: Debug.assert(hasAccessorModifier(accessor)); const accessorTypeAnnotation = getEffectiveTypeAnnotationNode(accessor); return accessorTypeAnnotation; @@ -50733,9 +50906,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!pushTypeResolution(symbol, 0 /* Type */)) { return errorType; } - const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); - const accessor = tryCast(getDeclarationOfKind(symbol, 171 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const getter = getDeclarationOfKind(symbol, 179 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 180 /* SetAccessor */); + const accessor = tryCast(getDeclarationOfKind(symbol, 172 /* 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, true); if (!type) { if (setter && !isPrivateWithinAmbient(setter)) { @@ -50770,7 +50943,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!pushTypeResolution(symbol, 8 /* WriteType */)) { return errorType; } - const setter = (_a2 = getDeclarationOfKind(symbol, 178 /* SetAccessor */)) != null ? _a2 : tryCast(getDeclarationOfKind(symbol, 171 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const setter = (_a2 = getDeclarationOfKind(symbol, 180 /* SetAccessor */)) != null ? _a2 : tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let writeType = getAnnotatedAccessorType(setter); if (!popTypeResolution()) { if (getAnnotatedAccessorTypeNode(setter)) { @@ -50805,7 +50978,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const declaration = symbol.valueDeclaration; if (symbol.flags & 1536 /* Module */ && isShorthandAmbientModuleSymbol(symbol)) { return anyType; - } else if (declaration && (declaration.kind === 227 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 227 /* BinaryExpression */)) { + } else if (declaration && (declaration.kind === 229 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 229 /* BinaryExpression */)) { return getWidenedTypeForAssignmentDeclaration(symbol); } else if (symbol.flags & 512 /* ValueModule */ && declaration && isSourceFile(declaration) && declaration.commonJsModuleIndicator) { const resolvedModule = resolveExternalModuleSymbol(symbol); @@ -50861,7 +51034,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { ); return errorType; } - if (noImplicitAny && (declaration.kind !== 168 /* Parameter */ || declaration.initializer)) { + if (noImplicitAny && (declaration.kind !== 169 /* 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, @@ -50972,43 +51145,43 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return void 0; } switch (node.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 326 /* JSDocFunctionType */: - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 268 /* TypeAliasDeclaration */: - case 353 /* JSDocTemplateTag */: - case 354 /* JSDocTypedefTag */: - case 348 /* JSDocEnumTag */: - case 347 /* JSDocCallbackTag */: - case 200 /* MappedType */: - case 194 /* ConditionalType */: { + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 175 /* MethodSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 329 /* JSDocFunctionType */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 271 /* TypeAliasDeclaration */: + case 356 /* JSDocTemplateTag */: + case 357 /* JSDocTypedefTag */: + case 351 /* JSDocEnumTag */: + case 350 /* JSDocCallbackTag */: + case 202 /* MappedType */: + case 196 /* ConditionalType */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); - if (node.kind === 200 /* MappedType */) { + if (node.kind === 202 /* MappedType */) { return append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfNode(node.typeParameter))); - } else if (node.kind === 194 /* ConditionalType */) { + } else if (node.kind === 196 /* ConditionalType */) { return concatenate(outerTypeParameters, getInferTypeParameters(node)); } const outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, getEffectiveTypeParameterDeclarations(node)); - const thisType = includeThisTypes && (node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */ || node.kind === 267 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType; + const thisType = includeThisTypes && (node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */ || node.kind === 270 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType; return thisType ? append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters; } - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: const paramSymbol = getParameterSymbolFromJSDoc(node); if (paramSymbol) { node = paramSymbol.valueDeclaration; } break; - case 329 /* JSDoc */: { + case 332 /* JSDoc */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); return node.tags ? appendTypeParameters(outerTypeParameters, flatMap(node.tags, (t) => isJSDocTemplateTag(t) ? t.typeParameters : void 0)) : outerTypeParameters; } @@ -51016,7 +51189,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getOuterTypeParametersOfClassOrInterface(symbol) { - const declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : getDeclarationOfKind(symbol, 267 /* InterfaceDeclaration */); + const declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : getDeclarationOfKind(symbol, 270 /* InterfaceDeclaration */); Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); } @@ -51026,7 +51199,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let result; for (const node of symbol.declarations) { - if (node.kind === 267 /* InterfaceDeclaration */ || node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { + if (node.kind === 270 /* InterfaceDeclaration */ || node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { const declaration = node; result = appendTypeParameters(result, getEffectiveTypeParameterDeclarations(declaration)); } @@ -51159,7 +51332,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (!popTypeResolution() && type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 264 /* ClassDeclaration */ || declaration.kind === 267 /* InterfaceDeclaration */) { + if (declaration.kind === 266 /* ClassDeclaration */ || declaration.kind === 270 /* InterfaceDeclaration */) { reportCircularBaseType(declaration, type); } } @@ -51242,7 +51415,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; if (type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 267 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 270 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { for (const node of getInterfaceBaseTypeNodes(declaration)) { const baseType = getReducedType(getTypeFromTypeNode(node)); if (!isErrorType(baseType)) { @@ -51270,7 +51443,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; } for (const declaration of symbol.declarations) { - if (declaration.kind === 267 /* InterfaceDeclaration */) { + if (declaration.kind === 270 /* InterfaceDeclaration */) { if (declaration.flags & 128 /* ContainsThis */) { return false; } @@ -51336,7 +51509,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } else { type = errorType; - if (declaration.kind === 348 /* JSDocEnumTag */) { + if (declaration.kind === 351 /* 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)); @@ -51349,7 +51522,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isStringConcatExpression(expr) { if (isStringLiteralLike(expr)) { return true; - } else if (expr.kind === 227 /* BinaryExpression */) { + } else if (expr.kind === 229 /* BinaryExpression */) { return isStringConcatExpression(expr.left) && isStringConcatExpression(expr.right); } return false; @@ -51364,11 +51537,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 8 /* NumericLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return true; - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; case 79 /* Identifier */: return nodeIsMissing(expr) || !!getSymbolOfNode(member.parent).exports.get(expr.escapedText); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isStringConcatExpression(expr); default: return false; @@ -51382,7 +51555,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let hasNonLiteralMember = false; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 269 /* EnumDeclaration */) { + if (declaration.kind === 272 /* EnumDeclaration */) { for (const member of declaration.members) { if (member.initializer && isStringLiteralLike(member.initializer)) { return links.enumKind = 1 /* Literal */; @@ -51409,7 +51582,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const memberTypeList = []; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 269 /* EnumDeclaration */) { + if (declaration.kind === 272 /* EnumDeclaration */) { for (const member of declaration.members) { const value = getEnumMemberValue(member); const memberType = getFreshTypeOfLiteralType(getEnumLiteralType(value !== void 0 ? value : 0, enumCount, getSymbolOfNode(member))); @@ -51487,11 +51660,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 115 /* VoidKeyword */: case 157 /* UndefinedKeyword */: case 145 /* NeverKeyword */: - case 201 /* LiteralType */: + case 203 /* LiteralType */: return true; - case 188 /* ArrayType */: + case 190 /* ArrayType */: return isThislessType(node.elementType); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return !node.typeArguments || node.typeArguments.every(isThislessType); } return false; @@ -51507,21 +51680,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isThislessFunctionLikeDeclaration(node) { const returnType = getEffectiveReturnTypeNode(node); const typeParameters = getEffectiveTypeParameterDeclarations(node); - return (node.kind === 176 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); + return (node.kind === 178 /* 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 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return isThislessVariableLikeDeclaration(declaration); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return isThislessFunctionLikeDeclaration(declaration); } } @@ -52386,7 +52559,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isMappedTypeWithKeyofConstraintDeclaration(type) { const constraintDeclaration = getConstraintDeclarationForMappedType(type); - return constraintDeclaration.kind === 198 /* TypeOperator */ && constraintDeclaration.operator === 142 /* KeyOfKeyword */; + return constraintDeclaration.kind === 200 /* TypeOperator */ && constraintDeclaration.operator === 142 /* KeyOfKeyword */; } function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { @@ -53113,7 +53286,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return result; } function isJSDocOptionalParameter(node) { - return isInJSFile(node) && (node.type && node.type.kind === 325 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 325 /* JSDocOptionalType */)); + return isInJSFile(node) && (node.type && node.type.kind === 328 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 328 /* JSDocOptionalType */)); } function tryFindAmbientModule(moduleName, withAugmentations) { if (isExternalModuleNameRelative(moduleName)) { @@ -53146,7 +53319,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } const { isBracketed, typeExpression } = node; - return isBracketed || !!typeExpression && typeExpression.type.kind === 325 /* JSDocOptionalType */; + return isBracketed || !!typeExpression && typeExpression.type.kind === 328 /* JSDocOptionalType */; } function createTypePredicate(kind, parameterName, parameterIndex, type) { return { kind, parameterName, parameterIndex, type }; @@ -53214,7 +53387,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { parameters.push(paramSymbol); } - if (type && type.kind === 201 /* LiteralType */) { + if (type && type.kind === 203 /* LiteralType */) { flags |= 2 /* HasLiteralTypes */; } const isOptionalParameter2 = isOptionalJSDocPropertyLikeTag(param) || param.initializer || param.questionToken || isRestParameter(param) || iife && parameters.length > iife.arguments.length && !type || isJSDocOptionalParameter(param); @@ -53222,14 +53395,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { minArgumentCount = parameters.length; } } - if ((declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter || !thisParameter)) { - const otherKind = declaration.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; + if ((declaration.kind === 179 /* GetAccessor */ || declaration.kind === 180 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter || !thisParameter)) { + const otherKind = declaration.kind === 179 /* GetAccessor */ ? 180 /* SetAccessor */ : 179 /* GetAccessor */; const other = getDeclarationOfKind(getSymbolOfNode(declaration), otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); } } - const classType = declaration.kind === 176 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0; + const classType = declaration.kind === 178 /* 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 */; @@ -53305,15 +53478,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (node.kind) { case 79 /* Identifier */: return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol; - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return node.name.kind === 166 /* ComputedPropertyName */ && traverse(node.name); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + return node.name.kind === 167 /* ComputedPropertyName */ && traverse(node.name); + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return traverse(node.expression); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return traverse(node.initializer); default: return !nodeStartsNewLexicalEnvironment(node) && !isPartOfTypeNode(node) && !!forEachChild(node, traverse); @@ -53380,7 +53553,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function createTypePredicateFromTypePredicateNode(node, signature) { const parameterName = node.parameterName; const type = node.type && getTypeFromTypeNode(node.type); - return parameterName.kind === 197 /* ThisType */ ? createTypePredicate(node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, void 0, void 0, type) : createTypePredicate( + return parameterName.kind === 199 /* ThisType */ ? createTypePredicate(node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, void 0, void 0, type) : createTypePredicate( node.assertsModifier ? 3 /* AssertsIdentifier */ : 1 /* Identifier */, parameterName.escapedText, findIndex(signature.parameters, (p) => p.escapedName === parameterName.escapedText), @@ -53423,7 +53596,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return signature.resolvedReturnType; } function getReturnTypeFromAnnotation(declaration) { - if (declaration.kind === 176 /* Constructor */) { + if (declaration.kind === 178 /* Constructor */) { return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)); } if (isJSDocConstructSignature(declaration)) { @@ -53433,12 +53606,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (typeNode) { return getTypeFromTypeNode(typeNode); } - if (declaration.kind === 177 /* GetAccessor */ && hasBindableName(declaration)) { + if (declaration.kind === 179 /* GetAccessor */ && hasBindableName(declaration)) { const jsDocType = isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration); if (jsDocType) { return jsDocType; } - const setter = getDeclarationOfKind(getSymbolOfNode(declaration), 178 /* SetAccessor */); + const setter = getDeclarationOfKind(getSymbolOfNode(declaration), 180 /* SetAccessor */); const setterType = getAnnotatedAccessorType(setter); if (setterType) { return setterType; @@ -53526,7 +53699,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { var _a2; if (!signature.isolatedSignatureType) { const kind = (_a2 = signature.declaration) == null ? void 0 : _a2.kind; - const isConstructor = kind === void 0 || kind === 176 /* Constructor */ || kind === 180 /* ConstructSignature */ || kind === 185 /* ConstructorType */; + const isConstructor = kind === void 0 || kind === 178 /* Constructor */ || kind === 182 /* ConstructSignature */ || kind === 187 /* ConstructorType */; const type = createObjectType(16 /* Anonymous */); type.members = emptySymbols; type.properties = emptyArray; @@ -53585,9 +53758,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let inferences; if ((_a2 = typeParameter.symbol) == null ? void 0 : _a2.declarations) { for (const declaration of typeParameter.symbol.declarations) { - if (declaration.parent.kind === 195 /* InferType */) { + if (declaration.parent.kind === 197 /* InferType */) { const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent); - if (grandParent.kind === 183 /* TypeReference */ && !omitTypeReferences) { + if (grandParent.kind === 185 /* TypeReference */ && !omitTypeReferences) { const typeReference = grandParent; const typeParameters = getTypeParametersForTypeReference(typeReference); if (typeParameters) { @@ -53605,13 +53778,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - } else if (grandParent.kind === 168 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 191 /* RestType */ || grandParent.kind === 202 /* NamedTupleMember */ && grandParent.dotDotDotToken) { + } else if (grandParent.kind === 169 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 193 /* RestType */ || grandParent.kind === 204 /* NamedTupleMember */ && grandParent.dotDotDotToken) { inferences = append(inferences, createArrayType(unknownType)); - } else if (grandParent.kind === 204 /* TemplateLiteralTypeSpan */) { + } else if (grandParent.kind === 206 /* TemplateLiteralTypeSpan */) { inferences = append(inferences, stringType); - } else if (grandParent.kind === 167 /* TypeParameter */ && grandParent.parent.kind === 200 /* MappedType */) { + } else if (grandParent.kind === 168 /* TypeParameter */ && grandParent.parent.kind === 202 /* MappedType */) { inferences = append(inferences, keyofConstraintType); - } else if (grandParent.kind === 200 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 194 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 200 /* MappedType */ && grandParent.parent.checkType.type) { + } else if (grandParent.kind === 202 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 196 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 202 /* MappedType */ && grandParent.parent.checkType.type) { const checkMappedType2 = grandParent.parent.checkType; const nodeType = getTypeFromTypeNode(checkMappedType2.type); inferences = append(inferences, instantiateType( @@ -53636,7 +53809,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { let type = getTypeFromTypeNode(constraintDeclaration); if (type.flags & 1 /* Any */ && !isErrorType(type)) { - type = constraintDeclaration.parent.parent.kind === 200 /* MappedType */ ? keyofConstraintType : unknownType; + type = constraintDeclaration.parent.parent.kind === 202 /* MappedType */ ? keyofConstraintType : unknownType; } typeParameter.constraint = type; } @@ -53645,7 +53818,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return typeParameter.constraint === noConstraintType ? void 0 : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - const tp = getDeclarationOfKind(typeParameter.symbol, 167 /* TypeParameter */); + const tp = getDeclarationOfKind(typeParameter.symbol, 168 /* TypeParameter */); const host2 = isJSDocTemplateTag(tp.parent) ? getEffectiveContainerForJSDocTemplateTag(tp.parent) : tp.parent; return host2 && getSymbolOfNode(host2); } @@ -53725,7 +53898,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return ((_a2 = type.target.localTypeParameters) == null ? void 0 : _a2.map(() => errorType)) || emptyArray; } const node = type.node; - const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const typeArguments = !node ? emptyArray : node.kind === 185 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) : node.kind === 190 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); if (popTypeResolution()) { type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; } else { @@ -53759,7 +53932,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return errorType; } } - if (node.kind === 183 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { + if (node.kind === 185 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference(type, node, void 0); } const typeArguments = concatenate(type.outerTypeParameters, fillMissingTypeArguments(typeArgumentsFromTypeReferenceNode(node), typeParameters, minTypeArgumentCount, isJs)); @@ -53827,9 +54000,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTypeReferenceName(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return node.typeName; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: const expr = node.expression; if (isEntityNameExpression(expr)) { return expr; @@ -53841,10 +54014,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return symbol.parent ? `${getSymbolPath(symbol.parent)}.${symbol.escapedName}` : symbol.escapedName; } function getUnresolvedSymbolForEntityName(name) { - const identifier = name.kind === 165 /* QualifiedName */ ? name.right : name.kind === 211 /* PropertyAccessExpression */ ? name.name : name; + const identifier = name.kind === 166 /* QualifiedName */ ? name.right : name.kind === 213 /* PropertyAccessExpression */ ? name.name : name; const text = identifier.escapedText; if (text) { - const parentSymbol = name.kind === 165 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 211 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; + const parentSymbol = name.kind === 166 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 213 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; const path = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text; let result = unresolvedSymbols.get(path); if (!result) { @@ -53896,7 +54069,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const valueType = getTypeOfSymbol(symbol); let typeType = valueType; if (symbol.valueDeclaration) { - const isImportTypeWithQualifier = node.kind === 205 /* ImportType */ && node.qualifier; + const isImportTypeWithQualifier = node.kind === 207 /* ImportType */ && node.qualifier; if (valueType.symbol && valueType.symbol !== symbol && isImportTypeWithQualifier) { typeType = getTypeReferenceType(node, valueType.symbol); } @@ -53924,7 +54097,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getIntersectionType([substitutionType.constraint, substitutionType.baseType]); } function isUnaryTupleTypeNode(node) { - return node.kind === 189 /* TupleType */ && node.elements.length === 1; + return node.kind === 191 /* 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; @@ -53932,17 +54105,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getConditionalFlowTypeOfType(type, node) { let constraints; let covariant = true; - while (node && !isStatement(node) && node.kind !== 329 /* JSDoc */) { + while (node && !isStatement(node) && node.kind !== 332 /* JSDoc */) { const parent = node.parent; - if (parent.kind === 168 /* Parameter */) { + if (parent.kind === 169 /* Parameter */) { covariant = !covariant; } - if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent.kind === 194 /* ConditionalType */ && node === parent.trueType) { + if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent.kind === 196 /* 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 === 200 /* MappedType */ && node === parent.type) { + } else if (type.flags & 262144 /* TypeParameter */ && parent.kind === 202 /* MappedType */ && node === parent.type) { const mappedType = getTypeFromTypeNode(parent); if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) { const typeParameter = getHomomorphicTypeVariable(mappedType); @@ -53959,7 +54132,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return constraints ? getSubstitutionType(type, getIntersectionType(constraints)) : type; } function isJSDocTypeReference(node) { - return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 183 /* TypeReference */ || node.kind === 205 /* ImportType */); + return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 185 /* TypeReference */ || node.kind === 207 /* ImportType */); } function checkNoTypeArguments(node, symbol) { if (node.typeArguments) { @@ -54065,9 +54238,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (declarations) { for (const declaration of declarations) { switch (declaration.kind) { - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: return declaration; } } @@ -54228,11 +54401,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTupleElementFlags(node) { switch (node.kind) { - case 190 /* OptionalType */: + case 192 /* OptionalType */: return 2 /* Optional */; - case 191 /* RestType */: + case 193 /* RestType */: return getRestTypeElementFlags(node); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return node.questionToken ? 2 /* Optional */ : node.dotDotDotToken ? getRestTypeElementFlags(node) : 1 /* Required */; default: return 1 /* Required */; @@ -54248,55 +54421,55 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return readonly ? globalReadonlyArrayType : globalArrayType; } const elementFlags = map(node.elements, getTupleElementFlags); - const missingName = some(node.elements, (e) => e.kind !== 202 /* NamedTupleMember */); + const missingName = some(node.elements, (e) => e.kind !== 204 /* NamedTupleMember */); return getTupleTargetType(elementFlags, readonly, missingName ? void 0 : node.elements); } function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { - return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 188 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 189 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 190 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 191 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); } function isResolvedByTypeAlias(node) { const parent = node.parent; switch (parent.kind) { - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: - case 183 /* TypeReference */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 199 /* IndexedAccessType */: - case 194 /* ConditionalType */: - case 198 /* TypeOperator */: - case 188 /* ArrayType */: - case 189 /* TupleType */: + case 198 /* ParenthesizedType */: + case 204 /* NamedTupleMember */: + case 185 /* TypeReference */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: + case 201 /* IndexedAccessType */: + case 196 /* ConditionalType */: + case 200 /* TypeOperator */: + case 190 /* ArrayType */: + case 191 /* TupleType */: return isResolvedByTypeAlias(parent); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return true; } return false; } function mayResolveTypeAlias(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node, 788968 /* Type */).flags & 524288 /* TypeAlias */); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return true; - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return node.operator !== 158 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); - case 196 /* ParenthesizedType */: - case 190 /* OptionalType */: - case 202 /* NamedTupleMember */: - case 325 /* JSDocOptionalType */: - case 323 /* JSDocNullableType */: - case 324 /* JSDocNonNullableType */: - case 318 /* JSDocTypeExpression */: + case 198 /* ParenthesizedType */: + case 192 /* OptionalType */: + case 204 /* NamedTupleMember */: + case 328 /* JSDocOptionalType */: + case 326 /* JSDocNullableType */: + case 327 /* JSDocNonNullableType */: + case 321 /* JSDocTypeExpression */: return mayResolveTypeAlias(node.type); - case 191 /* RestType */: - return node.type.kind !== 188 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 193 /* RestType */: + return node.type.kind !== 190 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 194 /* UnionType */: + case 195 /* IntersectionType */: return some(node.types, mayResolveTypeAlias); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); } return false; @@ -54307,10 +54480,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const target = getArrayOrTupleTargetType(node); if (target === emptyGenericType) { links.resolvedType = emptyObjectType; - } else if (!(node.kind === 189 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { - links.resolvedType = node.kind === 189 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference(target, node, void 0); + } else if (!(node.kind === 191 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { + links.resolvedType = node.kind === 191 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference(target, node, void 0); } else { - const elementTypes = node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const elementTypes = node.kind === 190 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); links.resolvedType = createNormalizedTypeReference(target, elementTypes); } } @@ -55291,7 +55464,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) { var _a2; - const accessExpression = accessNode && accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode : void 0; + const accessExpression = accessNode && accessNode.kind === 214 /* ElementAccessExpression */ ? accessNode : void 0; const propName = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode); if (propName !== void 0) { if (accessFlags & 256 /* Contextual */) { @@ -55459,7 +55632,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getIndexNodeForAccessExpression(accessNode) { - return accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 199 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 166 /* ComputedPropertyName */ ? accessNode.expression : accessNode; + return accessNode.kind === 214 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 201 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 167 /* ComputedPropertyName */ ? accessNode.expression : accessNode; } function isPatternLiteralPlaceholderType(type) { return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type); @@ -55590,7 +55763,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */) accessFlags |= 1 /* IncludeUndefined */; - if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 199 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) { + if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 201 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) { if (objectType.flags & 3 /* AnyOrUnknown */) { return objectType; } @@ -56130,7 +56303,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getThisType(node) { const container = getThisContainer(node, false); const parent = container && container.parent; - if (parent && (isClassLike(parent) || parent.kind === 267 /* InterfaceDeclaration */)) { + if (parent && (isClassLike(parent) || parent.kind === 270 /* InterfaceDeclaration */)) { if (!isStatic(container) && (!isConstructorDeclaration(container) || isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType; } @@ -56160,17 +56333,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getArrayElementTypeNode(node) { switch (node.kind) { - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return getArrayElementTypeNode(node.type); - case 189 /* TupleType */: + case 191 /* TupleType */: if (node.elements.length === 1) { node = node.elements[0]; - if (node.kind === 191 /* RestType */ || node.kind === 202 /* NamedTupleMember */ && node.dotDotDotToken) { + if (node.kind === 193 /* RestType */ || node.kind === 204 /* NamedTupleMember */ && node.dotDotDotToken) { return getArrayElementTypeNode(node.type); } } break; - case 188 /* ArrayType */: + case 190 /* ArrayType */: return node.elementType; } return void 0; @@ -56185,8 +56358,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getTypeFromTypeNodeWorker(node) { switch (node.kind) { case 132 /* AnyKeyword */: - case 321 /* JSDocAllType */: - case 322 /* JSDocUnknownType */: + case 324 /* JSDocAllType */: + case 325 /* JSDocUnknownType */: return anyType; case 159 /* UnknownKeyword */: return unknownType; @@ -56212,66 +56385,66 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return node.flags & 262144 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; case 140 /* IntrinsicKeyword */: return intrinsicMarkerType; - case 197 /* ThisType */: + case 199 /* ThisType */: case 109 /* ThisKeyword */: return getTypeFromThisTypeNode(node); - case 201 /* LiteralType */: + case 203 /* LiteralType */: return getTypeFromLiteralTypeNode(node); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return getTypeFromTypeReference(node); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return node.assertsModifier ? voidType : booleanType; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 188 /* ArrayType */: - case 189 /* TupleType */: + case 190 /* ArrayType */: + case 191 /* TupleType */: return getTypeFromArrayOrTupleTypeNode(node); - case 190 /* OptionalType */: + case 192 /* OptionalType */: return getTypeFromOptionalTypeNode(node); - case 192 /* UnionType */: + case 194 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 323 /* JSDocNullableType */: + case 326 /* JSDocNullableType */: return getTypeFromJSDocNullableTypeNode(node); - case 325 /* JSDocOptionalType */: + case 328 /* JSDocOptionalType */: return addOptionality(getTypeFromTypeNode(node.type)); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return getTypeFromNamedTupleTypeNode(node); - case 196 /* ParenthesizedType */: - case 324 /* JSDocNonNullableType */: - case 318 /* JSDocTypeExpression */: + case 198 /* ParenthesizedType */: + case 327 /* JSDocNonNullableType */: + case 321 /* JSDocTypeExpression */: return getTypeFromTypeNode(node.type); - case 191 /* RestType */: + case 193 /* RestType */: return getTypeFromRestTypeNode(node); - case 327 /* JSDocVariadicType */: + case 330 /* JSDocVariadicType */: return getTypeFromJSDocVariadicType(node); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 326 /* JSDocFunctionType */: - case 332 /* JSDocSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 329 /* JSDocFunctionType */: + case 335 /* JSDocSignature */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return getTypeFromTypeOperatorNode(node); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return getTypeFromIndexedAccessTypeNode(node); - case 200 /* MappedType */: + case 202 /* MappedType */: return getTypeFromMappedTypeNode(node); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return getTypeFromConditionalTypeNode(node); - case 195 /* InferType */: + case 197 /* InferType */: return getTypeFromInferTypeNode(node); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: return getTypeFromTemplateTypeNode(node); - case 205 /* ImportType */: + case 207 /* ImportType */: return getTypeFromImportTypeNode(node); case 79 /* Identifier */: - case 165 /* QualifiedName */: - case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: const symbol = getSymbolAtLocation(node); return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType; default: @@ -56466,13 +56639,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return type; } function maybeTypeParameterReference(node) { - return !(node.parent.kind === 183 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 205 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); + return !(node.parent.kind === 185 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 207 /* 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 === 242 /* Block */ || n.kind === 194 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { + if (!n || n.kind === 244 /* Block */ || n.kind === 196 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { return true; } } @@ -56481,17 +56654,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; function containsReference(node2) { switch (node2.kind) { - case 197 /* ThisType */: + case 199 /* ThisType */: return !!tp.isThisType; case 79 /* Identifier */: return !tp.isThisType && isPartOfTypeNode(node2) && maybeTypeParameterReference(node2) && getTypeFromTypeNodeWorker(node2) === tp; - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: const entityName = node2.exprName; const firstIdentifier = getFirstIdentifier(entityName); const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier); const tpDeclaration = tp.symbol.declarations[0]; let tpScope; - if (tpDeclaration.kind === 167 /* TypeParameter */) { + if (tpDeclaration.kind === 168 /* TypeParameter */) { tpScope = tpDeclaration.parent; } else if (tp.isThisType) { tpScope = tpDeclaration; @@ -56502,8 +56675,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return some(firstIdentifierSymbol.declarations, (idDecl) => isNodeDescendantOf(idDecl, tpScope)) || some(node2.typeArguments, containsReference); } return true; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return !node2.type && !!node2.body || some(node2.typeParameters, containsReference) || some(node2.parameters, containsReference) || !!node2.type && containsReference(node2.type); } return !!forEachChild(node2, containsReference); @@ -56734,32 +56907,32 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration); } function isContextSensitive(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 176 /* MethodDeclaration */ || isObjectLiteralMethod(node)); switch (node.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 263 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: return isContextSensitiveFunctionLikeDeclaration(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return some(node.properties, isContextSensitive); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return some(node.elements, isContextSensitive); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return (node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return isContextSensitive(node.expression); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive); - case 294 /* JsxAttribute */: { + case 297 /* JsxAttribute */: { const { initializer } = node; return !!initializer && isContextSensitive(initializer); } - case 297 /* JsxExpression */: { + case 300 /* JsxExpression */: { const { expression } = node; return !!expression && isContextSensitive(expression); } @@ -56770,7 +56943,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node); } function hasContextSensitiveReturnExpression(node) { - return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 242 /* Block */ && isContextSensitive(node.body); + return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 244 /* Block */ && isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { return (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func); @@ -56843,23 +57016,23 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; } switch (node.kind) { - case 297 /* JsxExpression */: - case 217 /* ParenthesizedExpression */: + case 300 /* JsxExpression */: + case 219 /* ParenthesizedExpression */: return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 27 /* CommaToken */: return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); } break; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer); } return false; @@ -57033,16 +57206,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) { switch (child.kind) { - case 297 /* JsxExpression */: + case 300 /* 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 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: return { errorNode: child, innerExpression: child, nameType }; default: return Debug.assertNever(child, "Found invalid jsx child"); @@ -57168,13 +57341,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue; } switch (prop.kind) { - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: - case 174 /* MethodDeclaration */: - case 306 /* ShorthandPropertyAssignment */: + case 180 /* SetAccessor */: + case 179 /* GetAccessor */: + case 176 /* MethodDeclaration */: + case 309 /* ShorthandPropertyAssignment */: yield { errorNode: prop.name, innerExpression: void 0, nameType: type }; break; - case 305 /* PropertyAssignment */: + case 308 /* 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: @@ -57228,7 +57401,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); } const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 174 /* MethodDeclaration */ && kind !== 173 /* MethodSignature */ && kind !== 176 /* Constructor */; + const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 176 /* MethodDeclaration */ && kind !== 175 /* MethodSignature */ && kind !== 178 /* Constructor */; let result = -1 /* True */; const sourceThisType = getThisTypeOfSignature(source); if (sourceThisType && sourceThisType !== voidType) { @@ -59076,7 +59249,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const sourceSignature = first(sourceSignatures); const targetSignature = first(targetSignatures); result2 = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors2, incompatibleReporter(sourceSignature, targetSignature)); - if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 176 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 176 /* Constructor */)) { + if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 178 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 178 /* Constructor */)) { const constructSignatureToString = (signature) => signatureToString(signature, void 0, 262144 /* WriteArrowStyleSignature */, kind); reportError(Diagnostics.Type_0_is_not_assignable_to_type_1, constructSignatureToString(sourceSignature), constructSignatureToString(targetSignature)); reportError(Diagnostics.Types_of_construct_signatures_are_incompatible); @@ -59694,7 +59867,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const target = type.target; if (getObjectFlags(target) & 1 /* Class */) { const baseTypeNode = getBaseTypeNodeOfClass(target); - if (baseTypeNode && baseTypeNode.expression.kind !== 79 /* Identifier */ && baseTypeNode.expression.kind !== 211 /* PropertyAccessExpression */) { + if (baseTypeNode && baseTypeNode.expression.kind !== 79 /* Identifier */ && baseTypeNode.expression.kind !== 213 /* PropertyAccessExpression */) { return void 0; } } @@ -60061,12 +60234,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let diagnostic; switch (declaration.kind) { - case 227 /* BinaryExpression */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 229 /* BinaryExpression */: + case 172 /* PropertyDeclaration */: + case 171 /* 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 168 /* Parameter */: + case 169 /* Parameter */: const param = declaration; if (isIdentifier(param.name) && (isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && (resolveName(param, param.name.escapedText, 788968 /* Type */, void 0, param.name.escapedText, true) || param.name.originalKeywordKind && isTypeNodeKind(param.name.originalKeywordKind))) { const newName = "arg" + param.parent.parameters.indexOf(param); @@ -60076,22 +60249,22 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } 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 208 /* BindingElement */: + case 210 /* BindingElement */: diagnostic = Diagnostics.Binding_element_0_implicitly_has_an_1_type; if (!noImplicitAny) { return; } break; - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 221 /* 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); @@ -60102,7 +60275,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } 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 200 /* MappedType */: + case 202 /* MappedType */: if (noImplicitAny) { error(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); } @@ -60199,7 +60372,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function inferFromIntraExpressionSites(context) { if (context.intraExpressionInferenceSites) { for (const { node, type } of context.intraExpressionInferenceSites) { - const contextualType = node.kind === 174 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType(node, 2 /* NoConstraints */); + const contextualType = node.kind === 176 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType(node, 2 /* NoConstraints */); if (contextualType) { inferTypes(context.inferences, type, contextualType); } @@ -60251,8 +60424,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isNonGenericTopLevelType(type) { if (type.aliasSymbol && !type.aliasTypeArguments) { - const declaration = getDeclarationOfKind(type.aliasSymbol, 268 /* TypeAliasDeclaration */); - return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 314 /* SourceFile */ ? true : n.kind === 270 /* ModuleDeclaration */ ? false : "quit")); + const declaration = getDeclarationOfKind(type.aliasSymbol, 271 /* TypeAliasDeclaration */); + return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 317 /* SourceFile */ ? true : n.kind === 273 /* ModuleDeclaration */ ? false : "quit")); } return false; } @@ -60997,7 +61170,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function inferFromSignature(source, target) { const saveBivariant = bivariant; const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - bivariant = bivariant || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 176 /* Constructor */; + bivariant = bivariant || kind === 176 /* MethodDeclaration */ || kind === 175 /* MethodSignature */ || kind === 178 /* Constructor */; applyToParameterTypes(source, target, inferFromContravariantTypesIfStrictFunctionTypes); bivariant = saveBivariant; applyToReturnTypes(source, target, inferFromTypes); @@ -61153,7 +61326,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; } default: - if (node.parent.kind === 306 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 309 /* 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; @@ -61178,7 +61351,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isInTypeQuery(node) { return !!findAncestor( node, - (n) => n.kind === 186 /* TypeQuery */ ? true : n.kind === 79 /* Identifier */ || n.kind === 165 /* QualifiedName */ ? false : "quit" + (n) => n.kind === 188 /* TypeQuery */ ? true : n.kind === 79 /* Identifier */ || n.kind === 166 /* QualifiedName */ ? false : "quit" ); } function getFlowCacheKey(node, declaredType, initialType, flowContainer) { @@ -61190,59 +61363,59 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } case 109 /* ThisKeyword */: return `0|${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`; - case 236 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: const left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer); return left && left + "." + node.right.escapedText; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: const propName = getAccessedPropertyName(node); if (propName !== void 0) { const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); return key && key + "." + propName; } break; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: return `${getNodeId(node)}#${getTypeId(declaredType)}`; } return void 0; } function isMatchingReference(source, target) { switch (target.kind) { - case 217 /* ParenthesizedExpression */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: return isMatchingReference(source, target.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression(target) && target.operatorToken.kind === 27 /* CommaToken */ && isMatchingReference(source, target.right); } switch (source.kind) { - case 237 /* MetaProperty */: - return target.kind === 237 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; + case 239 /* MetaProperty */: + return target.kind === 239 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - return isThisInTypeQuery(source) ? target.kind === 109 /* ThisKeyword */ : target.kind === 79 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (target.kind === 261 /* VariableDeclaration */ || target.kind === 208 /* BindingElement */) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target); + return isThisInTypeQuery(source) ? target.kind === 109 /* ThisKeyword */ : target.kind === 79 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (target.kind === 263 /* VariableDeclaration */ || target.kind === 210 /* BindingElement */) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target); case 109 /* ThisKeyword */: return target.kind === 109 /* ThisKeyword */; case 107 /* SuperKeyword */: return target.kind === 107 /* SuperKeyword */; - case 236 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: return isMatchingReference(source.expression, target); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* 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 165 /* QualifiedName */: + case 166 /* QualifiedName */: return isAccessExpression(target) && source.right.escapedText === getAccessedPropertyName(target) && isMatchingReference(source.left, target.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isBinaryExpression(source) && source.operatorToken.kind === 27 /* CommaToken */ && isMatchingReference(source.right, target); } return false; @@ -61392,7 +61565,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getMatchingUnionConstituentForObjectLiteral(unionType, node) { const keyPropertyName = getKeyPropertyName(unionType); - const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 305 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); + const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 308 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); const propType = propNode && getContextFreeTypeOfExpression(propNode.initializer); return propType && getConstituentTypeForKeyType(unionType, propType); } @@ -61407,7 +61580,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - if (expression.expression.kind === 211 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { + if (expression.expression.kind === 213 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { return true; } return false; @@ -61568,11 +61741,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return createArrayType(checkIteratedTypeOrElementType(65 /* Destructuring */, type, undefinedType, void 0) || errorType); } function getAssignedTypeOfBinaryExpression(node) { - const isDestructuringDefaultAssignment = node.parent.kind === 209 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 305 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); + const isDestructuringDefaultAssignment = node.parent.kind === 211 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 308 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent) { - return parent.parent.kind === 227 /* BinaryExpression */ && parent.parent.left === parent || parent.parent.kind === 251 /* ForOfStatement */ && parent.parent.initializer === parent; + return parent.parent.kind === 229 /* BinaryExpression */ && parent.parent.left === parent || parent.parent.kind === 253 /* ForOfStatement */ && parent.parent.initializer === parent; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element)); @@ -61589,21 +61762,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getAssignedType(node) { const { parent } = node; switch (parent.kind) { - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return stringType; - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return checkRightHandSideOfForOf(parent) || errorType; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return getAssignedTypeOfBinaryExpression(parent); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return undefinedType; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return getAssignedTypeOfArrayLiteralElement(parent, node); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return getAssignedTypeOfSpreadExpression(parent); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return getAssignedTypeOfPropertyAssignment(parent); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return getAssignedTypeOfShorthandPropertyAssignment(parent); } return errorType; @@ -61611,7 +61784,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getInitialTypeOfBindingElement(node) { const pattern = node.parent; const parentType = getInitialType(pattern.parent); - const type = pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); + const type = pattern.kind === 208 /* 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) { @@ -61622,25 +61795,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 250 /* ForInStatement */) { + if (node.parent.parent.kind === 252 /* ForInStatement */) { return stringType; } - if (node.parent.parent.kind === 251 /* ForOfStatement */) { + if (node.parent.parent.kind === 253 /* ForOfStatement */) { return checkRightHandSideOfForOf(node.parent.parent) || errorType; } return errorType; } function getInitialType(node) { - return node.kind === 261 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); + return node.kind === 263 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function isEmptyArrayAssignment(node) { - return node.kind === 261 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 208 /* BindingElement */ && node.parent.kind === 227 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); + return node.kind === 263 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 210 /* BindingElement */ && node.parent.kind === 229 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return getReferenceCandidate(node.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 75 /* BarBarEqualsToken */: @@ -61655,10 +61828,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getReferenceRoot(node) { const { parent } = node; - return parent.kind === 217 /* ParenthesizedExpression */ || parent.kind === 227 /* BinaryExpression */ && parent.operatorToken.kind === 63 /* EqualsToken */ && parent.left === node || parent.kind === 227 /* BinaryExpression */ && parent.operatorToken.kind === 27 /* CommaToken */ && parent.right === node ? getReferenceRoot(parent) : node; + return parent.kind === 219 /* ParenthesizedExpression */ || parent.kind === 229 /* BinaryExpression */ && parent.operatorToken.kind === 63 /* EqualsToken */ && parent.left === node || parent.kind === 229 /* BinaryExpression */ && parent.operatorToken.kind === 27 /* CommaToken */ && parent.right === node ? getReferenceRoot(parent) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 298 /* CaseClause */) { + if (clause.kind === 301 /* CaseClause */) { return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); } return neverType; @@ -61674,12 +61847,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return links.switchTypes; } function getSwitchClauseTypeOfWitnesses(switchStatement) { - if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 298 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { + if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 301 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { return void 0; } const witnesses = []; for (const clause of switchStatement.caseBlock.clauses) { - const text = clause.kind === 298 /* CaseClause */ ? clause.expression.text : void 0; + const text = clause.kind === 301 /* CaseClause */ ? clause.expression.text : void 0; witnesses.push(text && !contains(witnesses, text) ? text : void 0); } return witnesses; @@ -61829,8 +62002,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isEvolvingArrayOperationTarget(node) { const root = getReferenceRoot(node); const parent = root.parent; - const isLengthPushOrUnshift = isPropertyAccessExpression(parent) && (parent.name.escapedText === "length" || parent.parent.kind === 213 /* CallExpression */ && isIdentifier(parent.name) && isPushOrUnshiftIdentifier(parent.name)); - const isElementAssignment = parent.kind === 212 /* ElementAccessExpression */ && parent.expression === root && parent.parent.kind === 227 /* 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 === 215 /* CallExpression */ && isIdentifier(parent.name) && isPushOrUnshiftIdentifier(parent.name)); + const isElementAssignment = parent.kind === 214 /* ElementAccessExpression */ && parent.expression === root && parent.parent.kind === 229 /* 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) { @@ -61853,7 +62026,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isDeclarationWithExplicitTypeAnnotation(declaration)) { return getTypeOfSymbol(symbol); } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 251 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 253 /* ForOfStatement */) { const statement = declaration.parent.parent; const expressionType = getTypeOfDottedName(statement.expression, void 0); if (expressionType) { @@ -61877,7 +62050,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getExplicitThisType(node); case 107 /* SuperKeyword */: return checkSuperExpression(node); - case 211 /* PropertyAccessExpression */: { + case 213 /* PropertyAccessExpression */: { const type = getTypeOfDottedName(node.expression, diagnostic); if (type) { const name = node.name; @@ -61894,7 +62067,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } return void 0; } - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return getTypeOfDottedName(node.expression, diagnostic); } } @@ -61904,7 +62077,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let signature = links.effectsSignature; if (signature === void 0) { let funcType; - if (node.parent.kind === 245 /* ExpressionStatement */) { + if (node.parent.kind === 247 /* ExpressionStatement */) { funcType = getTypeOfDottedName(node.expression, void 0); } else if (node.expression.kind !== 107 /* SuperKeyword */) { if (isOptionalChain(node)) { @@ -61946,7 +62119,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isFalseExpression(expr) { const node = skipParentheses(expr, true); - return node.kind === 96 /* FalseKeyword */ || node.kind === 227 /* 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 === 229 /* 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) { @@ -62045,8 +62218,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const symbol = getResolvedSymbol(node); return isConstVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); } - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol); } return false; @@ -62066,7 +62239,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 236 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { + if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 238 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { return declaredType; } return resultType === nonNullUnknownType ? unknownType : resultType; @@ -62135,7 +62308,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { target.antecedents = saveAntecedents; } else if (flags & 2 /* Start */) { const container = flow.node; - if (container && container !== flowContainer && reference.kind !== 211 /* PropertyAccessExpression */ && reference.kind !== 212 /* ElementAccessExpression */ && reference.kind !== 109 /* ThisKeyword */) { + if (container && container !== flowContainer && reference.kind !== 213 /* PropertyAccessExpression */ && reference.kind !== 214 /* ElementAccessExpression */ && reference.kind !== 109 /* ThisKeyword */) { flow = container.flowNode; continue; } @@ -62154,7 +62327,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getInitialOrAssignedType(flow) { const node = flow.node; - return getNarrowableTypeForReference(node.kind === 261 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); + return getNarrowableTypeForReference(node.kind === 263 /* VariableDeclaration */ || node.kind === 210 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); } function getTypeAtFlowAssignment(flow) { const node = flow.node; @@ -62184,13 +62357,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConst(node))) { const init = getDeclaredExpandoInitializer(node); - if (init && (init.kind === 218 /* FunctionExpression */ || init.kind === 219 /* ArrowFunction */)) { + if (init && (init.kind === 220 /* FunctionExpression */ || init.kind === 221 /* ArrowFunction */)) { return getTypeAtFlowNode(flow.antecedent); } } return declaredType; } - if (isVariableDeclaration(node) && node.parent.parent.kind === 250 /* ForInStatement */ && isMatchingReference(reference, node.parent.parent.expression)) { + if (isVariableDeclaration(node) && node.parent.parent.kind === 252 /* ForInStatement */ && isMatchingReference(reference, node.parent.parent.expression)) { return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent)))); } return void 0; @@ -62200,7 +62373,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.kind === 96 /* FalseKeyword */) { return unreachableNeverType; } - if (node.kind === 227 /* BinaryExpression */) { + if (node.kind === 229 /* BinaryExpression */) { if (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); } @@ -62229,13 +62402,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getTypeAtFlowArrayMutation(flow) { if (declaredType === autoType || declaredType === autoArrayType) { const node = flow.node; - const expr = node.kind === 213 /* CallExpression */ ? node.expression.expression : node.left.expression; + const expr = node.kind === 215 /* 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 === 213 /* CallExpression */) { + if (node.kind === 215 /* CallExpression */) { for (const arg of node.arguments) { evolvedType2 = addEvolvingArrayElementType(evolvedType2, arg); } @@ -62272,7 +62445,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let type = getTypeFromFlowType(flowType); if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); - } else if (expr.kind === 222 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { + } else if (expr.kind === 224 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else { if (strictNullChecks) { @@ -62284,7 +62457,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { flow.clauseEnd, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)) ); - } else if (expr.kind === 222 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + } else if (expr.kind === 224 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { type = narrowTypeBySwitchOptionalChainContainment( type, flow.switchStatement, @@ -62533,10 +62706,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const operator = expr.operatorToken.kind; const left = getReferenceCandidate(expr.left); const right = getReferenceCandidate(expr.right); - if (left.kind === 222 /* TypeOfExpression */ && isStringLiteralLike(right)) { + if (left.kind === 224 /* TypeOfExpression */ && isStringLiteralLike(right)) { return narrowTypeByTypeof(type, left, operator, right, assumeTrue); } - if (right.kind === 222 /* TypeOfExpression */ && isStringLiteralLike(left)) { + if (right.kind === 224 /* TypeOfExpression */ && isStringLiteralLike(left)) { return narrowTypeByTypeof(type, right, operator, left, assumeTrue); } if (isMatchingReference(reference, left)) { @@ -62734,7 +62907,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!witnesses) { return type; } - const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 299 /* DefaultClause */); + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 302 /* DefaultClause */); const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; if (hasDefaultClause) { const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); @@ -62887,17 +63060,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } case 109 /* ThisKeyword */: case 107 /* SuperKeyword */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return narrowTypeByCallExpression(type, expr, assumeTrue); - case 217 /* ParenthesizedExpression */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: return narrowType(type, expr.expression, assumeTrue); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: if (expr.operator === 53 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } @@ -62935,7 +63108,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getNonMissingTypeOfSymbol(symbol); } function getControlFlowContainer(node) { - return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 271 /* ModuleBlock */ || node2.kind === 314 /* SourceFile */ || node2.kind === 171 /* PropertyDeclaration */ || node2.kind === 172 /* AnnotationPropertyDeclaration */); + return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 274 /* ModuleBlock */ || node2.kind === 317 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */ || node2.kind === 173 /* AnnotationPropertyDeclaration */); } function isSymbolAssigned(symbol) { if (!symbol.valueDeclaration) { @@ -62971,7 +63144,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function removeOptionalityFromDeclaredType(declaredType, declaration) { if (pushTypeResolution(declaration.symbol, 2 /* DeclaredType */)) { - const annotationIncludesUndefined = strictNullChecks && declaration.kind === 168 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !(getTypeFacts(checkExpression(declaration.initializer)) & 16777216 /* IsUndefined */); + const annotationIncludesUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !(getTypeFacts(checkExpression(declaration.initializer)) & 16777216 /* IsUndefined */); popTypeResolution(); return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; } else { @@ -62981,7 +63154,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isConstraintPosition(type, node) { const parent = node.parent; - return parent.kind === 211 /* PropertyAccessExpression */ || parent.kind === 165 /* QualifiedName */ || parent.kind === 213 /* CallExpression */ && parent.expression === node || parent.kind === 212 /* ElementAccessExpression */ && parent.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent.argumentExpression))); + return parent.kind === 213 /* PropertyAccessExpression */ || parent.kind === 166 /* QualifiedName */ || parent.kind === 215 /* CallExpression */ && parent.expression === node || parent.kind === 214 /* 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 */)); @@ -63029,14 +63202,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (declaration) { if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) { const parent = declaration.parent.parent; - if (parent.kind === 261 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent.kind === 168 /* Parameter */) { + if (parent.kind === 263 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent.kind === 169 /* Parameter */) { const links = getNodeLinks(parent); if (!(links.flags & 268435456 /* InCheckIdentifier */)) { links.flags |= 268435456 /* InCheckIdentifier */; const parentType = getTypeForBindingElementParent(parent, 0 /* Normal */); const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType); links.flags &= ~268435456 /* InCheckIdentifier */; - if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent.kind === 168 /* Parameter */ && isSymbolAssigned(symbol))) { + if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent.kind === 169 /* Parameter */ && isSymbolAssigned(symbol))) { const pattern = declaration.parent; const narrowedType = getFlowTypeOfReference(pattern, parentTypeConstraint, parentTypeConstraint, void 0, location.flowNode); if (narrowedType.flags & 131072 /* Never */) { @@ -63079,7 +63252,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const container = getContainingFunction(node); if (languageVersion < 2 /* ES2015 */) { - if (container.kind === 219 /* ArrowFunction */) { + if (container.kind === 221 /* 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); @@ -63100,7 +63273,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let declaration = localOrExportSymbol.valueDeclaration; if (declaration && localOrExportSymbol.flags & 32 /* Class */) { - if (declaration.kind === 264 /* ClassDeclaration */ && nodeIsDecorated(declaration)) { + if (declaration.kind === 266 /* ClassDeclaration */ && nodeIsDecorated(declaration)) { let container = getContainingClass(node); while (container !== void 0) { if (container === declaration && container.name !== node) { @@ -63110,9 +63283,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } container = getContainingClass(container); } - } else if (declaration.kind === 232 /* ClassExpression */) { + } else if (declaration.kind === 234 /* ClassExpression */) { let container = getThisContainer(node, false); - while (container.kind !== 314 /* SourceFile */) { + while (container.kind !== 317 /* SourceFile */) { if (container.parent === declaration) { if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) { getNodeLinks(declaration).flags |= 16777216 /* ClassWithConstructorReference */; @@ -63160,16 +63333,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return type; } type = getNarrowableTypeForReference(type, node, checkMode); - const isParameter2 = getRootDeclaration(declaration).kind === 168 /* Parameter */; + const isParameter2 = getRootDeclaration(declaration).kind === 169 /* 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 === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { + while (flowContainer !== declarationContainer && (flowContainer.kind === 220 /* FunctionExpression */ || flowContainer.kind === 221 /* 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) || node.parent.kind === 284 /* ExportSpecifier */) || node.parent.kind === 236 /* NonNullExpression */ || declaration.kind === 261 /* 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) || node.parent.kind === 287 /* ExportSpecifier */) || node.parent.kind === 238 /* NonNullExpression */ || declaration.kind === 263 /* 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)) { @@ -63219,7 +63392,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return findAncestor(node, (n) => !n || nodeStartsNewLexicalEnvironment(n) ? "quit" : isIterationStatement(n, false)); } function checkNestedBlockScopedBinding(node, symbol) { - if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 301 /* CatchClause */) { + if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 304 /* CatchClause */) { return; } const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); @@ -63229,7 +63402,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isCaptured) { let capturesBlockScopeBindingInLoopBody = true; if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 262 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 264 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container) { const part = getPartOfForStatementContainingNode(node.parent, container); if (part) { @@ -63248,7 +63421,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 262 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 264 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) { getNodeLinks(symbol.valueDeclaration).flags |= 4194304 /* NeedsLoopOutParameter */; } @@ -63265,13 +63438,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isAssignedInBodyOfForStatement(node, container) { let current = node; - while (current.parent.kind === 217 /* ParenthesizedExpression */) { + while (current.parent.kind === 219 /* ParenthesizedExpression */) { current = current.parent; } let isAssigned = false; if (isAssignmentTarget(current)) { isAssigned = true; - } else if (current.parent.kind === 225 /* PrefixUnaryExpression */ || current.parent.kind === 226 /* PostfixUnaryExpression */) { + } else if (current.parent.kind === 227 /* PrefixUnaryExpression */ || current.parent.kind === 228 /* PostfixUnaryExpression */) { const expr = current.parent; isAssigned = expr.operator === 45 /* PlusPlusToken */ || expr.operator === 46 /* MinusMinusToken */; } @@ -63282,7 +63455,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 171 /* PropertyDeclaration */ || container.kind === 176 /* Constructor */) { + if (container.kind === 172 /* PropertyDeclaration */ || container.kind === 178 /* Constructor */) { const classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } else { @@ -63316,27 +63489,27 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const isNodeInTypeQuery = isInTypeQuery(node); let container = getThisContainer(node, true); let capturedByArrowFunction = false; - if (container.kind === 176 /* Constructor */) { + if (container.kind === 178 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } - if (container.kind === 219 /* ArrowFunction */) { + if (container.kind === 221 /* ArrowFunction */) { container = getThisContainer(container, false); capturedByArrowFunction = true; } checkThisInStaticClassFieldInitializerInDecoratedClass(node, container); switch (container.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 176 /* Constructor */: + case 178 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } break; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: error(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); break; } @@ -63410,13 +63583,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getClassNameFromPrototypeMethod(container) { - if (container.kind === 218 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { + if (container.kind === 220 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { return container.parent.left.expression.expression; - } else if (container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 176 /* MethodDeclaration */ && container.parent.kind === 212 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { return container.parent.parent.left.expression; - } else if (container.kind === 218 /* FunctionExpression */ && container.parent.kind === 305 /* PropertyAssignment */ && container.parent.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 220 /* FunctionExpression */ && container.parent.kind === 308 /* PropertyAssignment */ && container.parent.parent.kind === 212 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { return container.parent.parent.parent.left.expression; - } else if (container.kind === 218 /* 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 === 220 /* 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; @@ -63424,7 +63597,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTypeForThisExpressionFromJSDoc(node) { const jsdocType = getJSDocType(node); - if (jsdocType && jsdocType.kind === 326 /* JSDocFunctionType */) { + if (jsdocType && jsdocType.kind === 329 /* 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); @@ -63436,16 +63609,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 168 /* Parameter */ && n.parent === constructorDecl); + return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 169 /* Parameter */ && n.parent === constructorDecl); } function checkSuperExpression(node) { - const isCallExpression2 = node.parent.kind === 213 /* CallExpression */ && node.parent.expression === node; + const isCallExpression2 = node.parent.kind === 215 /* CallExpression */ && node.parent.expression === node; const immediateContainer = getSuperContainer(node, true); let container = immediateContainer; let needToCaptureLexicalThis = false; let inAsyncFunction = false; if (!isCallExpression2) { - while (container && container.kind === 219 /* ArrowFunction */) { + while (container && container.kind === 221 /* ArrowFunction */) { if (hasSyntacticModifier(container, 512 /* Async */)) inAsyncFunction = true; container = getSuperContainer(container, true); @@ -63457,19 +63630,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const canUseSuperExpression = isLegalUsageOfSuperExpression(container); let nodeCheckFlag = 0; if (!canUseSuperExpression) { - const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 166 /* ComputedPropertyName */); - if (current && current.kind === 166 /* ComputedPropertyName */) { + const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 167 /* ComputedPropertyName */); + if (current && current.kind === 167 /* 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 === 210 /* ObjectLiteralExpression */)) { + } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 212 /* 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 === 176 /* Constructor */) { + if (!isCallExpression2 && immediateContainer.kind === 178 /* 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) { @@ -63485,7 +63658,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { nodeCheckFlag = 256 /* SuperInstance */; } getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 174 /* MethodDeclaration */ && inAsyncFunction) { + if (container.kind === 176 /* MethodDeclaration */ && inAsyncFunction) { if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 4096 /* MethodWithSuperPropertyAssignmentInAsync */; } else { @@ -63495,7 +63668,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 210 /* ObjectLiteralExpression */) { + if (container.parent.kind === 212 /* 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; @@ -63513,7 +63686,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!baseClassType) { return errorType; } - if (container.kind === 176 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 178 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return errorType; } @@ -63523,13 +63696,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } if (isCallExpression2) { - return container2.kind === 176 /* Constructor */; + return container2.kind === 178 /* Constructor */; } else { - if (isClassLike(container2.parent) || container2.parent.kind === 210 /* ObjectLiteralExpression */) { + if (isClassLike(container2.parent) || container2.parent.kind === 212 /* ObjectLiteralExpression */) { if (isStatic(container2)) { - return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 171 /* PropertyDeclaration */ || container2.kind === 175 /* ClassStaticBlockDeclaration */; + return container2.kind === 176 /* MethodDeclaration */ || container2.kind === 175 /* MethodSignature */ || container2.kind === 179 /* GetAccessor */ || container2.kind === 180 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 177 /* ClassStaticBlockDeclaration */; } else { - return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 171 /* PropertyDeclaration */ || container2.kind === 170 /* PropertySignature */ || container2.kind === 176 /* Constructor */; + return container2.kind === 176 /* MethodDeclaration */ || container2.kind === 175 /* MethodSignature */ || container2.kind === 179 /* GetAccessor */ || container2.kind === 180 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 171 /* PropertySignature */ || container2.kind === 178 /* Constructor */; } } } @@ -63537,7 +63710,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getContainingObjectLiteral(func) { - return (func.kind === 174 /* MethodDeclaration */ || func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) && func.parent.kind === 210 /* ObjectLiteralExpression */ ? func.parent : func.kind === 218 /* FunctionExpression */ && func.parent.kind === 305 /* PropertyAssignment */ ? func.parent.parent : void 0; + return (func.kind === 176 /* MethodDeclaration */ || func.kind === 179 /* GetAccessor */ || func.kind === 180 /* SetAccessor */) && func.parent.kind === 212 /* ObjectLiteralExpression */ ? func.parent : func.kind === 220 /* FunctionExpression */ && func.parent.kind === 308 /* PropertyAssignment */ ? func.parent.parent : void 0; } function getThisTypeArgument(type) { return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? getTypeArguments(type)[0] : void 0; @@ -63548,7 +63721,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }); } function getContextualThisParameterType(func) { - if (func.kind === 219 /* ArrowFunction */) { + if (func.kind === 221 /* ArrowFunction */) { return void 0; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -63572,7 +63745,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (thisType) { return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); } - if (literal.parent.kind !== 305 /* PropertyAssignment */) { + if (literal.parent.kind !== 308 /* PropertyAssignment */) { break; } literal = literal.parent.parent; @@ -63581,7 +63754,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral)); } const parent = walkUpParenthesizedExpressions(func.parent); - if (parent.kind === 227 /* BinaryExpression */ && parent.operatorToken.kind === 63 /* EqualsToken */) { + if (parent.kind === 229 /* BinaryExpression */ && parent.operatorToken.kind === 63 /* EqualsToken */) { const target = parent.left; if (isAccessExpression(target)) { const { expression } = target; @@ -63628,11 +63801,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getTypeFromTypeNode(typeNode); } switch (declaration.kind) { - case 168 /* Parameter */: + case 169 /* Parameter */: return getContextuallyTypedParameterType(declaration); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return getContextualTypeForBindingElement(declaration, contextFlags); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (isStatic(declaration)) { return getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags); } @@ -63641,10 +63814,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getContextualTypeForBindingElement(declaration, contextFlags) { const parent = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent, contextFlags) || parent.kind !== 208 /* BindingElement */ && parent.initializer && checkDeclarationInitializer(parent, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); + const parentType = getContextualTypeForVariableLikeDeclaration(parent, contextFlags) || parent.kind !== 210 /* BindingElement */ && parent.initializer && checkDeclarationInitializer(parent, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0; - if (parent.name.kind === 207 /* ArrayBindingPattern */) { + if (parent.name.kind === 209 /* ArrayBindingPattern */) { const index = indexOfNode(declaration.parent.elements, declaration); if (index < 0) return void 0; @@ -63777,7 +63950,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return signatureHasRestParameter(signature) && argIndex >= restIndex ? getIndexedAccessType(getTypeOfSymbol(signature.parameters[restIndex]), getNumberLiteralType(argIndex - restIndex), 256 /* Contextual */) : getTypeAtPosition(signature, argIndex); } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 215 /* TaggedTemplateExpression */) { + if (template.parent.kind === 217 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return void 0; @@ -64036,10 +64209,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: case 157 /* UndefinedKeyword */: return true; - case 211 /* PropertyAccessExpression */: - case 217 /* ParenthesizedExpression */: + case 213 /* PropertyAccessExpression */: + case 219 /* ParenthesizedExpression */: return isPossiblyDiscriminantValue(node.expression); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return !node.expression || isPossiblyDiscriminantValue(node.expression); } return false; @@ -64049,7 +64222,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 305 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), + filter(node.properties, (p) => !!p.symbol && p.kind === 308 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), (prop) => [() => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -64069,7 +64242,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 294 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), + filter(node.properties, (p) => !!p.symbol && p.kind === 297 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), (prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -64126,63 +64299,63 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const { parent } = node; switch (parent.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 208 /* BindingElement */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 210 /* BindingElement */: return getContextualTypeForInitializerExpression(node, contextFlags); - case 219 /* ArrowFunction */: - case 254 /* ReturnStatement */: + case 221 /* ArrowFunction */: + case 256 /* ReturnStatement */: return getContextualTypeForReturnExpression(node, contextFlags); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return getContextualTypeForYieldOperand(parent, contextFlags); - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return getContextualTypeForAwaitOperand(parent, contextFlags); - case 213 /* CallExpression */: - case 220 /* EtsComponentExpression */: + case 215 /* CallExpression */: + case 222 /* EtsComponentExpression */: if (isInEtsFile(parent) && parent.expression.kind === 101 /* ImportKeyword */) { return stringType; } - case 214 /* NewExpression */: + case 216 /* NewExpression */: return getContextualTypeForArgument(parent, node); - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: return isConstTypeReference(parent.type) ? tryFindWhenConstTypeReference(parent) : getTypeFromTypeNode(parent.type); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node, contextFlags); - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent, contextFlags); - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: return getContextualType(parent.parent, contextFlags); - case 209 /* ArrayLiteralExpression */: { + case 211 /* ArrayLiteralExpression */: { const arrayLiteral = parent; const type = getApparentTypeOfContextualType(arrayLiteral, contextFlags); return getContextualTypeForElementExpression(type, indexOfNode(arrayLiteral.elements, node)); } - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node, contextFlags); - case 240 /* TemplateSpan */: - Debug.assert(parent.parent.kind === 229 /* TemplateExpression */); + case 242 /* TemplateSpan */: + Debug.assert(parent.parent.kind === 231 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent.parent, node); - case 217 /* ParenthesizedExpression */: { + case 219 /* ParenthesizedExpression */: { const tag = isInJSFile(parent) ? getJSDocTypeTag(parent) : void 0; return !tag ? getContextualType(parent, contextFlags) : isJSDocTypeTag(tag) && isConstTypeReference(tag.typeExpression.type) ? tryFindWhenConstTypeReference(parent) : getTypeFromTypeNode(tag.typeExpression.type); } - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return getContextualType(parent, contextFlags); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return getTypeFromTypeNode(parent.type); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return tryGetTypeFromEffectiveTypeNode(parent); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return getContextualTypeForJsxExpression(parent, contextFlags); - case 294 /* JsxAttribute */: - case 296 /* JsxSpreadAttribute */: + case 297 /* JsxAttribute */: + case 299 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent, contextFlags); - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return getContextualJsxElementAttributesType(parent, contextFlags); } return void 0; @@ -64404,7 +64577,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return isFunctionExpressionOrArrowFunction(node) || isObjectLiteralMethod(node) ? getContextualSignature(node) : void 0; } function getContextualSignature(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 176 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const typeTagSignature = getSignatureOfTypeTag(node); if (typeTagSignature) { return typeTagSignature; @@ -64445,7 +64618,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return node.isSpread ? getIndexedAccessType(node.type, numberType) : node.type; } function hasDefaultValue(node) { - return node.kind === 208 /* BindingElement */ && !!node.initializer || node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */; + return node.kind === 210 /* BindingElement */ && !!node.initializer || node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */; } function checkArrayLiteral(node, checkMode, forceTuple) { const elements = node.elements; @@ -64458,7 +64631,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let hasOmittedExpression = false; for (let i = 0; i < elementCount; i++) { const e = elements[i]; - if (e.kind === 231 /* SpreadElement */) { + if (e.kind === 233 /* SpreadElement */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */); } @@ -64474,7 +64647,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { elementTypes.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, e.expression)); elementFlags.push(4 /* Rest */); } - } else if (exactOptionalPropertyTypes && e.kind === 233 /* OmittedExpression */) { + } else if (exactOptionalPropertyTypes && e.kind === 235 /* OmittedExpression */) { hasOmittedExpression = true; elementTypes.push(missingType); elementFlags.push(2 /* Optional */); @@ -64511,7 +64684,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isNumericName(name) { switch (name.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return isNumericComputedName(name); case 79 /* Identifier */: return isNumericLiteralName(name.escapedText); @@ -64528,7 +64701,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 102 /* InKeyword */ && node.parent.kind !== 177 /* GetAccessor */ && node.parent.kind !== 178 /* 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 !== 179 /* GetAccessor */ && node.parent.kind !== 180 /* SetAccessor */) { return links.resolvedType = errorType; } links.resolvedType = checkExpression(node.expression); @@ -64587,7 +64760,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let propertiesArray = []; let spread = emptyObjectType; const contextualType = getApparentTypeOfContextualType(node, void 0); - const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 206 /* ObjectBindingPattern */ || contextualType.pattern.kind === 210 /* ObjectLiteralExpression */); + const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 208 /* ObjectBindingPattern */ || contextualType.pattern.kind === 212 /* ObjectLiteralExpression */); const inConstContext = isConstContext(node); const checkFlags = inConstContext ? 8 /* Readonly */ : 0; const isInJavascript = isInJSFile(node) && !isInJsonFile(node); @@ -64606,9 +64779,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let offset = 0; for (const memberDecl of node.properties) { let member = getSymbolOfNode(memberDecl); - const computedNameType = memberDecl.name && memberDecl.name.kind === 166 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; - if (memberDecl.kind === 305 /* PropertyAssignment */ || memberDecl.kind === 306 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { - let type = memberDecl.kind === 305 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : memberDecl.kind === 306 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode); + const computedNameType = memberDecl.name && memberDecl.name.kind === 167 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; + if (memberDecl.kind === 308 /* PropertyAssignment */ || memberDecl.kind === 309 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { + let type = memberDecl.kind === 308 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : memberDecl.kind === 309 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode); if (isInJavascript) { const jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl); if (jsDocType) { @@ -64625,7 +64798,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { prop.nameType = nameType; } if (inDestructuringPattern) { - const isOptional = memberDecl.kind === 305 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 306 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; + const isOptional = memberDecl.kind === 308 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 309 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; if (isOptional) { prop.flags |= 16777216 /* Optional */; } @@ -64651,16 +64824,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { prop.target = member; member = prop; allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop); - if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 305 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { + if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 308 /* PropertyAssignment */ || memberDecl.kind === 176 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { const inferenceContext = getInferenceContext(node); Debug.assert(inferenceContext); - const inferenceNode = memberDecl.kind === 305 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; + const inferenceNode = memberDecl.kind === 308 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; addIntraExpressionInferenceSite(inferenceContext, inferenceNode, type); } if (type.symbol && type.symbol.flags & 268435456 /* Annotation */) { error(memberDecl, Diagnostics.Annotation_cannot_be_used_as_a_value); } - } else if (memberDecl.kind === 307 /* SpreadAssignment */) { + } else if (memberDecl.kind === 310 /* SpreadAssignment */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(memberDecl, 2 /* Assign */); } @@ -64689,7 +64862,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } continue; } else { - Debug.assert(memberDecl.kind === 177 /* GetAccessor */ || memberDecl.kind === 178 /* SetAccessor */); + Debug.assert(memberDecl.kind === 179 /* GetAccessor */ || memberDecl.kind === 180 /* SetAccessor */); checkNodeDeferred(memberDecl); } if (computedNameType && !(computedNameType.flags & 8576 /* StringOrNumberLiteralOrUnique */)) { @@ -64713,13 +64886,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (contextualTypeHasPattern) { const rootPatternParent = findAncestor( contextualType.pattern.parent, - (n) => n.kind === 261 /* VariableDeclaration */ || n.kind === 227 /* BinaryExpression */ || n.kind === 168 /* Parameter */ + (n) => n.kind === 263 /* VariableDeclaration */ || n.kind === 229 /* BinaryExpression */ || n.kind === 169 /* Parameter */ ); const spreadOrOutsideRootObject = findAncestor( node, - (n) => n === rootPatternParent || n.kind === 307 /* SpreadAssignment */ + (n) => n === rootPatternParent || n.kind === 310 /* SpreadAssignment */ ); - if (spreadOrOutsideRootObject.kind !== 307 /* SpreadAssignment */) { + if (spreadOrOutsideRootObject.kind !== 310 /* SpreadAssignment */) { for (const prop of getPropertiesOfType(contextualType)) { if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { @@ -64848,7 +65021,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } else { - Debug.assert(attributeDecl.kind === 296 /* JsxSpreadAttribute */); + Debug.assert(attributeDecl.kind === 299 /* JsxSpreadAttribute */); if (attributesTable.size > 0) { spread = getSpreadType(spread, createJsxAttributesType(), attributes.symbol, objectFlags, false); attributesTable = createSymbolTable(); @@ -64873,7 +65046,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { spread = getSpreadType(spread, createJsxAttributesType(), attributes.symbol, objectFlags, false); } } - const parent = openingLikeElement.parent.kind === 287 /* JsxElement */ ? openingLikeElement.parent : void 0; + const parent = openingLikeElement.parent.kind === 290 /* JsxElement */ ? openingLikeElement.parent : void 0; if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) { const childrenTypes = checkJsxChildren(parent, checkMode); if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { @@ -64919,7 +65092,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!child.containsOnlyTriviaWhiteSpaces) { childrenTypes.push(stringType); } - } else if (child.kind === 297 /* JsxExpression */ && !child.expression) { + } else if (child.kind === 300 /* JsxExpression */ && !child.expression) { continue; } else { childrenTypes.push(checkExpressionForMutableLocation(child, checkMode)); @@ -65236,7 +65409,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError = true) { - const errorNode = !reportError ? void 0 : node.kind === 165 /* QualifiedName */ ? node.right : node.kind === 205 /* ImportType */ ? node : node.kind === 208 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; + const errorNode = !reportError ? void 0 : node.kind === 166 /* QualifiedName */ ? node.right : node.kind === 207 /* ImportType */ ? node : node.kind === 210 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); } function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) { @@ -65449,7 +65622,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return checkPropertyAccessExpressionOrQualifiedName(node, node.left, leftType, node.right, checkMode); } function isMethodAccessForCall(node) { - while (node.parent.kind === 217 /* ParenthesizedExpression */) { + while (node.parent.kind === 219 /* ParenthesizedExpression */) { node = node.parent; } return isCallOrNewExpression(node.parent) && node.parent.expression === node; @@ -65604,7 +65777,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } return isErrorType(apparentType) ? errorType : apparentType; } - prop = getPropertyOfType(apparentType, right.escapedText, false, node.kind === 165 /* QualifiedName */); + prop = getPropertyOfType(apparentType, right.escapedText, false, node.kind === 166 /* QualifiedName */); if (!prop) { const etsComponentExpressionNode = getEtsComponentExpressionInnerCallExpressionNode(node) || getRootEtsComponentInnerCallExpressionNode(node); const locals = getSourceFileOfNode(node).locals; @@ -65629,7 +65802,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - if (isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 308 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { + if (isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 311 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { markAliasReferenced(parentSymbol, node); } let propType; @@ -65727,7 +65900,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (declaration && isPropertyWithoutInitializer(declaration)) { if (!isStatic(declaration)) { const flowContainer = getControlFlowContainer(node); - if (flowContainer.kind === 176 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { + if (flowContainer.kind === 178 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { assumeUninitialized = true; } } @@ -65771,7 +65944,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!needInitialization && !(hasRequireDecorator && checkStructPropertyPosition(valueDeclaration, node))) { diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); } - } else if (valueDeclaration.kind === 264 /* ClassDeclaration */ && node.parent.kind !== 183 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { + } else if (valueDeclaration.kind === 266 /* ClassDeclaration */ && node.parent.kind !== 185 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { diagnosticMessage = error(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { @@ -65784,25 +65957,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isInPropertyInitializerOrClassStaticBlock(node) { return !!findAncestor(node, (node2) => { switch (node2.kind) { - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return true; - case 305 /* PropertyAssignment */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 307 /* SpreadAssignment */: - case 166 /* ComputedPropertyName */: - case 240 /* TemplateSpan */: - case 297 /* JsxExpression */: - case 294 /* JsxAttribute */: - case 295 /* JsxAttributes */: - case 296 /* JsxSpreadAttribute */: - case 289 /* JsxOpeningElement */: - case 234 /* ExpressionWithTypeArguments */: - case 300 /* HeritageClause */: + case 308 /* PropertyAssignment */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 310 /* SpreadAssignment */: + case 167 /* ComputedPropertyName */: + case 242 /* TemplateSpan */: + case 300 /* JsxExpression */: + case 297 /* JsxAttribute */: + case 298 /* JsxAttributes */: + case 299 /* JsxSpreadAttribute */: + case 292 /* JsxOpeningElement */: + case 236 /* ExpressionWithTypeArguments */: + case 303 /* HeritageClause */: return false; - case 219 /* ArrowFunction */: - case 245 /* ExpressionStatement */: + case 221 /* ArrowFunction */: + case 247 /* ExpressionStatement */: return isBlock(node2.parent) && isClassStaticBlockDeclaration(node2.parent.parent) ? true : "quit"; default: return isExpressionNode(node2) ? false : "quit"; @@ -66037,18 +66210,18 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isValidPropertyAccess(node, propertyName) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return isValidPropertyAccessWithType(node, node.expression.kind === 107 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return isValidPropertyAccessWithType(node, false, propertyName, getWidenedType(checkExpression(node.left))); - case 205 /* ImportType */: + case 207 /* ImportType */: return isValidPropertyAccessWithType(node, false, propertyName, getTypeFromTypeNode(node)); } } function isValidPropertyAccessForCompletions(node, type, property) { return isPropertyAccessible( node, - node.kind === 211 /* PropertyAccessExpression */ && node.expression.kind === 107 /* SuperKeyword */, + node.kind === 213 /* PropertyAccessExpression */ && node.expression.kind === 107 /* SuperKeyword */, false, type, property @@ -66073,7 +66246,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getForInVariableSymbol(node) { const initializer = node.initializer; - if (initializer.kind === 262 /* VariableDeclarationList */) { + if (initializer.kind === 264 /* VariableDeclarationList */) { const variable = initializer.declarations[0]; if (variable && !isBindingPattern(variable.name)) { return getSymbolOfNode(variable); @@ -66094,7 +66267,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let child = expr; let node = expr.parent; while (node) { - if (node.kind === 250 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { + if (node.kind === 252 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { return true; } child = node; @@ -66138,11 +66311,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (callLikeExpressionMayHaveTypeArguments(node)) { forEach(node.typeArguments, checkSourceElement); } - if (node.kind === 215 /* TaggedTemplateExpression */) { + if (node.kind === 217 /* TaggedTemplateExpression */) { checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); - } else if (node.kind !== 169 /* Decorator */) { + } else if (node.kind !== 170 /* Decorator */) { forEach(node.arguments, (argument) => { checkExpression(argument); }); @@ -66187,7 +66360,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function isSpreadArgument(arg) { - return !!arg && (arg.kind === 231 /* SpreadElement */ || arg.kind === 238 /* SyntheticExpression */ && arg.isSpread); + return !!arg && (arg.kind === 233 /* SpreadElement */ || arg.kind === 240 /* SyntheticExpression */ && arg.isSpread); } function getSpreadArgumentIndex(args) { return findIndex(args, isSpreadArgument); @@ -66203,9 +66376,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let callIsIncomplete = false; let effectiveParameterCount = getParameterCount(signature); let effectiveMinimumArguments = getMinArgumentCount(signature); - if (node.kind === 215 /* TaggedTemplateExpression */) { + if (node.kind === 217 /* TaggedTemplateExpression */) { argCount = args.length; - if (node.template.kind === 229 /* TemplateExpression */) { + if (node.template.kind === 231 /* TemplateExpression */) { const lastSpan = last(node.template.templateSpans); callIsIncomplete = nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated; } else { @@ -66213,7 +66386,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { Debug.assert(templateLiteral.kind === 14 /* NoSubstitutionTemplateLiteral */); callIsIncomplete = !!templateLiteral.isUnterminated; } - } else if (node.kind === 169 /* Decorator */) { + } else if (node.kind === 170 /* Decorator */) { argCount = getDecoratorArgumentCount(node, signature); } else if (isJsxOpeningLikeElement(node)) { callIsIncomplete = node.attributes.end === node.end; @@ -66224,7 +66397,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { effectiveParameterCount = args.length === 0 ? effectiveParameterCount : 1; effectiveMinimumArguments = Math.min(effectiveMinimumArguments, 1); } else if (!node.arguments) { - Debug.assert(node.kind === 214 /* NewExpression */); + Debug.assert(node.kind === 216 /* NewExpression */); return getMinArgumentCount(signature) === 0; } else { argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -66305,7 +66478,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isJsxOpeningLikeElement(node)) { return inferJsxTypeArguments(node, signature, checkMode, context); } - if (node.kind !== 169 /* Decorator */) { + if (node.kind !== 170 /* Decorator */) { const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); const contextualType = getContextualType(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); if (contextualType) { @@ -66342,7 +66515,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 233 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { + if (arg.kind !== 235 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { const paramType = getTypeAtPosition(signature, i); if (couldContainTypeVariables(paramType)) { const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode); @@ -66363,7 +66536,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (index >= argCount - 1) { const arg = args[argCount - 1]; if (isSpreadArgument(arg)) { - return getMutableArrayOrTupleType(arg.kind === 238 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode)); + return getMutableArrayOrTupleType(arg.kind === 240 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode)); } } const types = []; @@ -66372,12 +66545,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { for (let i = index; i < argCount; i++) { const arg = args[i]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 238 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); + const spreadType = arg.kind === 240 /* 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 === 231 /* SpreadElement */ ? arg.expression : arg)); + types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 233 /* SpreadElement */ ? arg.expression : arg)); flags.push(4 /* Rest */); } } else { @@ -66387,7 +66560,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType)); flags.push(1 /* Required */); } - if (arg.kind === 238 /* SyntheticExpression */ && arg.tupleNameSource) { + if (arg.kind === 240 /* SyntheticExpression */ && arg.tupleNameSource) { names.push(arg.tupleNameSource); } } @@ -66530,7 +66703,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return void 0; } const thisType = getThisTypeOfSignature(signature); - if (thisType && thisType !== voidType && node.kind !== 214 /* NewExpression */) { + if (thisType && thisType !== voidType && node.kind !== 216 /* NewExpression */) { const thisArgumentNode = getThisArgumentOfCall(node); const thisArgumentType = getThisArgumentType(thisArgumentNode); const errorNode = reportErrors2 ? thisArgumentNode || node : void 0; @@ -66545,7 +66718,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 233 /* OmittedExpression */) { + if (arg.kind !== 235 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); const argType = checkExpressionWithContextualType(arg, paramType, void 0, checkMode); const checkArgType = checkMode & 4 /* SkipContextSensitive */ ? getRegularTypeOfObjectLiteral(argType) : argType; @@ -66580,7 +66753,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getThisArgumentOfCall(node) { - const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : void 0; + const expression = node.kind === 215 /* CallExpression */ ? node.expression : node.kind === 217 /* TaggedTemplateExpression */ ? node.tag : void 0; if (expression) { const callee = skipOuterExpressions(expression); if (isAccessExpression(callee)) { @@ -66595,17 +66768,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return result; } function getEffectiveCallArguments(node) { - if (node.kind === 215 /* TaggedTemplateExpression */) { + if (node.kind === 217 /* TaggedTemplateExpression */) { const template = node.template; const args2 = [createSyntheticExpression(template, getGlobalTemplateStringsArrayType())]; - if (template.kind === 229 /* TemplateExpression */) { + if (template.kind === 231 /* TemplateExpression */) { forEach(template.templateSpans, (span) => { args2.push(span.expression); }); } return args2; } - if (node.kind === 169 /* Decorator */) { + if (node.kind === 170 /* Decorator */) { return getEffectiveDecoratorArguments(node); } if (isJsxOpeningLikeElement(node)) { @@ -66617,7 +66790,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const effectiveArgs = args.slice(0, spreadIndex); for (let i = spreadIndex; i < args.length; i++) { const arg = args[i]; - const spreadType = arg.kind === 231 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); + const spreadType = arg.kind === 233 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); if (spreadType && isTupleType(spreadType)) { forEach(getTypeArguments(spreadType), (t, i2) => { var _a2; @@ -66642,30 +66815,30 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const parent = node.parent; const expr = node.expression; switch (parent.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: return [ createSyntheticExpression(expr, getTypeOfSymbol(getSymbolOfNode(parent))) ]; - case 168 /* Parameter */: + case 169 /* Parameter */: const func = parent.parent; return [ - createSyntheticExpression(expr, parent.parent.kind === 176 /* Constructor */ ? getTypeOfSymbol(getSymbolOfNode(func)) : errorType), + createSyntheticExpression(expr, parent.parent.kind === 178 /* Constructor */ ? getTypeOfSymbol(getSymbolOfNode(func)) : errorType), createSyntheticExpression(expr, anyType), createSyntheticExpression(expr, numberType) ]; - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: const hasPropDesc = languageVersion !== 0 /* ES3 */ && (!isPropertyDeclaration(parent) || hasAccessorModifier(parent)); return [ createSyntheticExpression(expr, getParentTypeOfClassElement(parent)), createSyntheticExpression(expr, getClassElementPropertyKeyType(parent)), createSyntheticExpression(expr, hasPropDesc ? createTypedPropertyDescriptorType(getTypeOfNode(parent)) : anyType) ]; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: if (isEtsFunctionDecorators(getNameOfDecorator(node), compilerOptions)) { const symbol = getSymbolOfNode(expr); return symbol ? [ @@ -66678,19 +66851,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getDecoratorArgumentCount(node, signature) { switch (node.parent.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: return 1; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return hasAccessorModifier(node.parent) ? 3 : 2; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return languageVersion === 0 /* ES3 */ || signature.parameters.length <= 2 ? 2 : 3; - case 168 /* Parameter */: + case 169 /* Parameter */: return 3; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: if (isEtsFunctionDecorators(getNameOfDecorator(node), compilerOptions)) { return isCallExpression(node.expression) ? 1 : 0; } @@ -66817,10 +66990,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, fallbackError) { - const isTaggedTemplate = node.kind === 215 /* TaggedTemplateExpression */; - const isDecorator2 = node.kind === 169 /* Decorator */; + const isTaggedTemplate = node.kind === 217 /* TaggedTemplateExpression */; + const isDecorator2 = node.kind === 170 /* Decorator */; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); - const isEtsComponentExpression2 = node.kind === 220 /* EtsComponentExpression */; + const isEtsComponentExpression2 = node.kind === 222 /* EtsComponentExpression */; const reportErrors2 = !candidatesOutArray; let typeArguments; let virtual; @@ -66850,7 +67023,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let candidateForArgumentArityError; let candidateForTypeArgumentError; let result; - const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 213 /* CallExpression */ && node.arguments.hasTrailingComma; + const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 215 /* CallExpression */ && node.arguments.hasTrailingComma; if (candidates.length > 1) { result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma); } @@ -67300,7 +67473,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const declaration = signature.declaration; const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */); - if (!modifiers || declaration.kind !== 176 /* Constructor */) { + if (!modifiers || declaration.kind !== 178 /* Constructor */) { return true; } const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(declaration.parent.symbol); @@ -67442,19 +67615,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 168 /* Parameter */: + case 169 /* Parameter */: return Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: const decoratorName = getNameOfDecorator(node); if (isEtsFunctionDecorators(decoratorName, compilerOptions)) { return Diagnostics.Unable_to_resolve_signature_of_function_decorator_when_decorators_are_not_valid; @@ -67614,20 +67787,20 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function resolveSignature(node, candidatesOutArray, checkMode) { switch (node.kind) { - case 213 /* CallExpression */: - case 220 /* EtsComponentExpression */: + case 215 /* CallExpression */: + case 222 /* EtsComponentExpression */: return resolveCallExpression(node, candidatesOutArray, checkMode); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return resolveNewExpression(node, candidatesOutArray, checkMode); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode); - case 169 /* Decorator */: + case 170 /* Decorator */: if (isAnnotation(node)) { return resolveAnnotation(node); } return resolveDecorator(node, candidatesOutArray, checkMode); - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); } } @@ -67732,7 +67905,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } let parent = node.parent; - while (parent && parent.kind === 211 /* PropertyAccessExpression */) { + while (parent && parent.kind === 213 /* PropertyAccessExpression */) { parent = parent.parent; } if (parent && isBinaryExpression(parent) && isPrototypeAccess(parent.left) && parent.operatorToken.kind === 63 /* EqualsToken */) { @@ -67751,9 +67924,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.expression.kind === 107 /* SuperKeyword */) { return voidType; } - if (node.kind === 214 /* NewExpression */) { + if (node.kind === 216 /* NewExpression */) { const declaration = signature.declaration; - if (declaration && declaration.kind !== 176 /* Constructor */ && declaration.kind !== 180 /* ConstructSignature */ && declaration.kind !== 185 /* ConstructorType */ && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { + if (declaration && declaration.kind !== 178 /* Constructor */ && declaration.kind !== 182 /* ConstructSignature */ && declaration.kind !== 187 /* ConstructorType */ && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { if (noImplicitAny) { error(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } @@ -67767,7 +67940,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (returnType.flags & 12288 /* ESSymbolLike */ && isSymbolOrSymbolForCall(node)) { return getESSymbolLikeTypeForNode(walkUpParenthesizedExpressions(node.parent)); } - if (node.kind === 213 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 245 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { + if (node.kind === 215 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 247 /* 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)) { @@ -67787,7 +67960,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(node.expression, Diagnostics.UI_component_0_cannot_be_used_in_this_place, diagnosticName(node.expression)); } const signatureDeclaration = signature.declaration; - if (node.kind === 213 /* CallExpression */ && signatureDeclaration && !isJSDocSignature(signatureDeclaration) && (isMethodDeclaration(signatureDeclaration) || isMethodSignature(signatureDeclaration) || isFunctionDeclaration(signatureDeclaration))) { + if (node.kind === 215 /* CallExpression */ && signatureDeclaration && !isJSDocSignature(signatureDeclaration) && (isMethodDeclaration(signatureDeclaration) || isMethodSignature(signatureDeclaration) || isFunctionDeclaration(signatureDeclaration))) { if (shouldCheckThrows(signatureDeclaration) && !hasAsyncErrorCallbacks(signatureDeclaration)) { checkThrowableFunction(node); } @@ -68127,20 +68300,20 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getDeprecatedSuggestionNode(node) { node = skipParentheses(node); switch (node.kind) { - case 213 /* CallExpression */: - case 169 /* Decorator */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 170 /* Decorator */: + case 216 /* NewExpression */: return getDeprecatedSuggestionNode(node.expression); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return getDeprecatedSuggestionNode(node.tag); - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return getDeprecatedSuggestionNode(node.tagName); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return node.argumentExpression; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return node.name; - case 183 /* TypeReference */: + case 185 /* TypeReference */: const typeReference = node; return isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference; default: @@ -68249,7 +68422,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (resolvedRequire.flags & 2097152 /* Alias */) { return false; } - const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 263 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 261 /* VariableDeclaration */ : 0 /* Unknown */; + const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 265 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 263 /* VariableDeclaration */ : 0 /* Unknown */; if (targetDeclarationKind !== 0 /* Unknown */) { const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind); return !!decl && !!(decl.flags & 16777216 /* Ambient */); @@ -68267,7 +68440,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getReturnTypeOfSignature(signature); } function checkAssertion(node) { - if (node.kind === 216 /* TypeAssertionExpression */) { + if (node.kind === 218 /* 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); @@ -68283,18 +68456,18 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 9 /* BigIntLiteral */: case 111 /* TrueKeyword */: case 96 /* FalseKeyword */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 229 /* TemplateExpression */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 231 /* TemplateExpression */: return true; - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return isValidConstAssertionArgument(node.expression); - case 225 /* PrefixUnaryExpression */: + case 227 /* 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 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: const expr = node.expression; let symbol = getTypeOfNode(expr).symbol; if (symbol && symbol.flags & 2097152 /* Alias */) { @@ -68340,7 +68513,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkExpressionWithTypeArguments(node) { checkGrammarExpressionWithTypeArguments(node); - const exprType = node.kind === 234 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); + const exprType = node.kind === 236 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); const typeArguments = node.typeArguments; if (exprType === silentNeverType || isErrorType(exprType) || !some(typeArguments)) { return exprType; @@ -68435,7 +68608,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 176 /* Constructor */) { + } else if (container.kind === 178 /* Constructor */) { const symbol = getSymbolOfNode(container.parent); return getTypeOfSymbol(symbol); } else { @@ -68485,7 +68658,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getParameterIdentifierNameAtPosition(signature, pos) { var _a2; - if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 326 /* JSDocFunctionType */) { + if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 329 /* JSDocFunctionType */) { return void 0; } const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -68517,7 +68690,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name); } function isValidDeclarationForTupleLabel(d) { - return d.kind === 202 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); + return d.kind === 204 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); } function getNameableDeclarationAtPosition(signature, pos) { const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -68776,7 +68949,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let yieldType; let nextType; let fallbackReturnType = voidType; - if (func.body.kind !== 242 /* Block */) { + if (func.body.kind !== 244 /* Block */) { returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */); if (isAsync) { returnType = unwrapAwaitedType(checkAwaitedType(returnType, false, func, Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)); @@ -68910,7 +69083,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return links.isExhaustive; } function computeExhaustiveSwitchStatement(node) { - if (node.expression.kind === 222 /* TypeOfExpression */) { + if (node.expression.kind === 224 /* TypeOfExpression */) { const witnesses = getSwitchClauseTypeOfWitnesses(node); if (!witnesses) { return false; @@ -68965,11 +69138,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function mayReturnNever(func) { switch (func.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return true; - case 174 /* MethodDeclaration */: - return func.parent.kind === 210 /* ObjectLiteralExpression */; + case 176 /* MethodDeclaration */: + return func.parent.kind === 212 /* ObjectLiteralExpression */; default: return false; } @@ -69011,7 +69184,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return judgeReturnTypeOfStyles(); } } - if (func.kind === 173 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 242 /* Block */ || !functionHasImplicitReturn(func)) { + if (func.kind === 175 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 244 /* Block */ || !functionHasImplicitReturn(func)) { return; } const hasExplicitReturn = func.flags & 512 /* HasExplicitReturn */; @@ -69047,7 +69220,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 176 /* MethodDeclaration */ || isObjectLiteralMethod(node)); checkNodeDeferred(node); if (isFunctionExpression(node)) { checkCollisionsForDeclarationName(node, node.name); @@ -69070,7 +69243,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return anyFunctionType; } const hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 218 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 220 /* FunctionExpression */) { checkGrammarForGenerator(node); } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -69114,7 +69287,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 176 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const functionFlags = getFunctionFlags(node); const returnType = getReturnTypeFromAnnotation(node); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); @@ -69122,7 +69295,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!getEffectiveReturnTypeNode(node)) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 242 /* Block */) { + if (node.body.kind === 244 /* Block */) { checkSourceElement(node.body); } else { const exprType = checkExpression(node.body); @@ -69188,7 +69361,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isReadonlySymbol(symbol)) { if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 109 /* ThisKeyword */) { const ctor = getContainingFunction(expr); - if (!(ctor && (ctor.kind === 176 /* Constructor */ || isJSConstructor(ctor)))) { + if (!(ctor && (ctor.kind === 178 /* Constructor */ || isJSConstructor(ctor)))) { return true; } if (symbol.valueDeclaration) { @@ -69209,7 +69382,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const symbol2 = getNodeLinks(node).resolvedSymbol; if (symbol2.flags & 2097152 /* Alias */) { const declaration = getDeclarationOfAliasSymbol(symbol2); - return !!declaration && declaration.kind === 277 /* NamespaceImport */; + return !!declaration && declaration.kind === 280 /* NamespaceImport */; } } } @@ -69314,7 +69487,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 176 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { + if (container && container.kind !== 178 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { const relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); } @@ -69507,7 +69680,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkObjectLiteralDestructuringPropertyAssignment(node, objectLiteralType, propertyIndex, allProperties, rightIsThis = false) { const properties = node.properties; const property = properties[propertyIndex]; - if (property.kind === 305 /* PropertyAssignment */ || property.kind === 306 /* ShorthandPropertyAssignment */) { + if (property.kind === 308 /* PropertyAssignment */ || property.kind === 309 /* ShorthandPropertyAssignment */) { const name = property.name; const exprType = getLiteralTypeFromPropertyName(name); if (isTypeUsableAsPropertyName(exprType)) { @@ -69520,8 +69693,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */, name); const type = getFlowTypeOfDestructuring(property, elementType); - return checkDestructuringAssignment(property.kind === 306 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); - } else if (property.kind === 307 /* SpreadAssignment */) { + return checkDestructuringAssignment(property.kind === 309 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); + } else if (property.kind === 310 /* SpreadAssignment */) { if (propertyIndex < properties.length - 1) { error(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { @@ -69553,7 +69726,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let inBoundsType = compilerOptions.noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType; for (let i = 0; i < elements.length; i++) { let type = possiblyOutOfBoundsType; - if (node.elements[i].kind === 231 /* SpreadElement */) { + if (node.elements[i].kind === 233 /* SpreadElement */) { type = inBoundsType = inBoundsType != null ? inBoundsType : checkIteratedTypeOrElementType(65 /* Destructuring */, sourceType, undefinedType, node) || errorType; } checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode); @@ -69563,8 +69736,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { const elements = node.elements; const element = elements[elementIndex]; - if (element.kind !== 233 /* OmittedExpression */) { - if (element.kind !== 231 /* SpreadElement */) { + if (element.kind !== 235 /* OmittedExpression */) { + if (element.kind !== 233 /* SpreadElement */) { const indexType = getNumberLiteralType(elementIndex); if (isArrayLikeType(sourceType)) { const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(element) ? 16 /* NoTupleBoundsCheck */ : 0); @@ -69579,7 +69752,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { const restExpression = element.expression; - if (restExpression.kind === 227 /* BinaryExpression */ && restExpression.operatorToken.kind === 63 /* EqualsToken */) { + if (restExpression.kind === 229 /* 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); @@ -69592,7 +69765,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) { let target; - if (exprOrAssignment.kind === 306 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 309 /* ShorthandPropertyAssignment */) { const prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) { @@ -69604,25 +69777,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { target = exprOrAssignment; } - if (target.kind === 227 /* BinaryExpression */ && target.operatorToken.kind === 63 /* EqualsToken */) { + if (target.kind === 229 /* BinaryExpression */ && target.operatorToken.kind === 63 /* EqualsToken */) { checkBinaryExpression(target, checkMode); target = target.left; if (strictNullChecks) { sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); } } - if (target.kind === 210 /* ObjectLiteralExpression */) { + if (target.kind === 212 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType, rightIsThis); } - if (target.kind === 209 /* ArrayLiteralExpression */) { + if (target.kind === 211 /* 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 === 307 /* 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 === 307 /* 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 === 310 /* 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 === 310 /* 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); } @@ -69637,8 +69810,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: case 10 /* StringLiteral */: case 13 /* RegularExpressionLiteral */: - case 215 /* TaggedTemplateExpression */: - case 229 /* TemplateExpression */: + case 217 /* TaggedTemplateExpression */: + case 231 /* TemplateExpression */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: @@ -69646,25 +69819,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 96 /* FalseKeyword */: case 105 /* NullKeyword */: case 157 /* UndefinedKeyword */: - case 218 /* FunctionExpression */: - case 232 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 222 /* TypeOfExpression */: - case 236 /* NonNullExpression */: - case 288 /* JsxSelfClosingElement */: - case 287 /* JsxElement */: + case 220 /* FunctionExpression */: + case 234 /* ClassExpression */: + case 221 /* ArrowFunction */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 224 /* TypeOfExpression */: + case 238 /* NonNullExpression */: + case 291 /* JsxSelfClosingElement */: + case 290 /* JsxElement */: return true; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: switch (node.operator) { case 53 /* ExclamationToken */: case 39 /* PlusToken */: @@ -69673,9 +69846,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; } return false; - case 223 /* VoidExpression */: - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 225 /* VoidExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: default: return false; } @@ -69711,7 +69884,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } checkGrammarNullishCoalesceWithLogicalExpression(node); const operator = node.operatorToken.kind; - if (operator === 63 /* EqualsToken */ && (node.left.kind === 210 /* ObjectLiteralExpression */ || node.left.kind === 209 /* ArrayLiteralExpression */)) { + if (operator === 63 /* EqualsToken */ && (node.left.kind === 212 /* ObjectLiteralExpression */ || node.left.kind === 211 /* ArrayLiteralExpression */)) { state.skip = true; setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 109 /* ThisKeyword */)); return state; @@ -69733,7 +69906,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { if (operator === 55 /* AmpersandAmpersandToken */) { let parent = node.parent; - while (parent.kind === 217 /* ParenthesizedExpression */ || isBinaryExpression(parent) && (parent.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || parent.operatorToken.kind === 56 /* BarBarToken */)) { + while (parent.kind === 219 /* ParenthesizedExpression */ || isBinaryExpression(parent) && (parent.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || parent.operatorToken.kind === 56 /* BarBarToken */)) { parent = parent.parent; } checkTestingKnownTruthyCallableOrAwaitableType(node.left, leftType, isIfStatement(parent) ? parent.thenStatement : void 0); @@ -69800,7 +69973,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { const operator = operatorToken.kind; - if (operator === 63 /* EqualsToken */ && (left.kind === 210 /* ObjectLiteralExpression */ || left.kind === 209 /* ArrayLiteralExpression */)) { + if (operator === 63 /* EqualsToken */ && (left.kind === 212 /* ObjectLiteralExpression */ || left.kind === 211 /* ArrayLiteralExpression */)) { return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 109 /* ThisKeyword */); } let leftType; @@ -70238,7 +70411,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return !!(type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */) || type.flags & 58982400 /* InstantiableNonPrimitive */ && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 402653316 /* StringLike */)); } function getContextNode(node) { - if (node.kind === 295 /* JsxAttributes */ && !isJsxSelfClosingElement(node.parent)) { + if (node.kind === 298 /* JsxAttributes */ && !isJsxSelfClosingElement(node.parent)) { return node.parent.parent; } return node; @@ -70279,12 +70452,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isTypeAssertion(node) { node = skipParentheses(node, true); - return node.kind === 216 /* TypeAssertionExpression */ || node.kind === 235 /* AsExpression */ || isJSDocTypeAssertion(node); + return node.kind === 218 /* TypeAssertionExpression */ || node.kind === 237 /* AsExpression */ || isJSDocTypeAssertion(node); } function checkDeclarationInitializer(declaration, checkMode, contextualType) { const initializer = getEffectiveInitializer(declaration); const type = getQuickTypeOfExpression(initializer) || (contextualType ? checkExpressionWithContextualType(initializer, contextualType, void 0, checkMode || 0 /* Normal */) : checkExpressionCached(initializer, checkMode)); - return isParameter(declaration) && declaration.name.kind === 207 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; + return isParameter(declaration) && declaration.name.kind === 209 /* 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; @@ -70292,7 +70465,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 208 /* BindingElement */ && e.dotDotDotToken)) { + if (i < patternElements.length - 1 || !(e.kind === 210 /* BindingElement */ && e.dotDotDotToken)) { elementTypes.push(!isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement(e, false, false) : anyType); elementFlags.push(2 /* Optional */); if (!isOmittedExpression(e) && !hasDefaultValue(e)) { @@ -70338,14 +70511,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return isConstContext(node) || isCommonJsExportedExpression(node) ? getRegularTypeOfLiteralType(type) : isTypeAssertion(node) ? type : getWidenedLiteralLikeTypeForContextualType(type, instantiateContextualType(arguments.length === 2 ? getContextualType(node, void 0) : contextualType, node, void 0)); } function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); } function checkObjectLiteralMethod(node, checkMode) { checkGrammarMethod(node); - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } const uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -70551,7 +70724,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return type; } function checkConstEnumAccess(node, type) { - const ok = node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 79 /* Identifier */ || node.kind === 165 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 186 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 284 /* ExportSpecifier */; + const ok = node.parent.kind === 213 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 214 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 79 /* Identifier */ || node.kind === 166 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 188 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 287 /* 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); } @@ -70574,9 +70747,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const kind = node.kind; if (cancellationToken) { switch (kind) { - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -70607,87 +70780,87 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return trueType; case 96 /* FalseKeyword */: return falseType; - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: return checkTemplateExpression(node); case 13 /* RegularExpressionLiteral */: return globalRegExpType; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return checkArrayLiteral(node, checkMode, forceTuple); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return checkObjectLiteral(node, checkMode); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node, checkMode); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return checkQualifiedName(node, checkMode); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return checkIndexedAccess(node, checkMode); - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (node.expression.kind === 101 /* ImportKeyword */) { return checkImportCallExpression(node); } - case 214 /* NewExpression */: + case 216 /* NewExpression */: return checkCallExpression(node, checkMode); - case 220 /* EtsComponentExpression */: + case 222 /* EtsComponentExpression */: const newNode = node; if (newNode.body && newNode.body.statements.length) { traverseEtsComponentStatements(newNode.body.statements, checkMode); } return checkCallExpression(node, checkMode); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return checkParenthesizedExpression(node, checkMode); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return checkClassExpression(node); - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 222 /* TypeOfExpression */: + case 224 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: return checkAssertion(node); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return checkNonNullAssertion(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return checkExpressionWithTypeArguments(node); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return checkSatisfiesExpression(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return checkMetaProperty(node); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return checkDeleteExpression(node); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return checkVoidExpression(node); - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return checkAwaitExpression(node); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return checkBinaryExpression(node, checkMode); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return checkConditionalExpression(node, checkMode); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return checkSpreadExpression(node, checkMode); - case 233 /* OmittedExpression */: + case 235 /* OmittedExpression */: return undefinedWideningType; - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return checkYieldExpression(node); - case 238 /* SyntheticExpression */: + case 240 /* SyntheticExpression */: return checkSyntheticExpression(node); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return checkJsxExpression(node, checkMode); - case 287 /* JsxElement */: + case 290 /* JsxElement */: return checkJsxElement(node, checkMode); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node, checkMode); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return checkJsxFragment(node); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return checkJsxAttributes(node, checkMode); - case 289 /* JsxOpeningElement */: + case 292 /* JsxOpeningElement */: Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return errorType; @@ -70772,10 +70945,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkVariableLikeDeclaration(node); const func = getContainingFunction(node); if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { - if (!(func.kind === 176 /* Constructor */ && nodeIsPresent(func.body))) { + if (!(func.kind === 178 /* Constructor */ && nodeIsPresent(func.body))) { error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } - if (func.kind === 176 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { + if (func.kind === 178 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { error(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); } } @@ -70786,13 +70959,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (func.parameters.indexOf(node) !== 0) { error(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); } - if (func.kind === 176 /* Constructor */ || func.kind === 180 /* ConstructSignature */ || func.kind === 185 /* ConstructorType */) { + if (func.kind === 178 /* Constructor */ || func.kind === 182 /* ConstructSignature */ || func.kind === 187 /* ConstructorType */) { error(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); } - if (func.kind === 219 /* ArrowFunction */) { + if (func.kind === 221 /* ArrowFunction */) { error(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); } - if (func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) { + if (func.kind === 179 /* GetAccessor */ || func.kind === 180 /* SetAccessor */) { error(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); } } @@ -70847,13 +71020,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTypePredicateParent(node) { switch (node.parent.kind) { - case 219 /* ArrowFunction */: - case 179 /* CallSignature */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 184 /* FunctionType */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 221 /* ArrowFunction */: + case 181 /* CallSignature */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 186 /* FunctionType */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: const parent = node.parent; if (node === parent.type) { return parent; @@ -70873,7 +71046,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { predicateVariableName ); return true; - } else if (name.kind === 207 /* ArrayBindingPattern */ || name.kind === 206 /* ObjectBindingPattern */) { + } else if (name.kind === 209 /* ArrayBindingPattern */ || name.kind === 208 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( name, predicateVariableNode, @@ -70885,9 +71058,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkSignatureDeclaration(node) { - if (node.kind === 181 /* IndexSignature */) { + if (node.kind === 183 /* IndexSignature */) { checkGrammarIndexSignature(node); - } else if (node.kind === 184 /* FunctionType */ || node.kind === 263 /* FunctionDeclaration */ || node.kind === 185 /* ConstructorType */ || node.kind === 179 /* CallSignature */ || node.kind === 176 /* Constructor */ || node.kind === 180 /* ConstructSignature */) { + } else if (node.kind === 186 /* FunctionType */ || node.kind === 265 /* FunctionDeclaration */ || node.kind === 187 /* ConstructorType */ || node.kind === 181 /* CallSignature */ || node.kind === 178 /* Constructor */ || node.kind === 182 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } const functionFlags = getFunctionFlags(node); @@ -70914,10 +71087,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const returnTypeNode = getEffectiveReturnTypeNode(node); if (noImplicitAny && !returnTypeNode) { switch (node.kind) { - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: error(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 179 /* CallSignature */: + case 181 /* CallSignature */: error(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -70939,7 +71112,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkAsyncFunctionReturnType(node, returnTypeNode); } } - if (node.kind !== 181 /* IndexSignature */ && node.kind !== 326 /* JSDocFunctionType */) { + if (node.kind !== 183 /* IndexSignature */ && node.kind !== 329 /* JSDocFunctionType */) { registerForUnusedIdentifiersCheck(node); } } @@ -70949,7 +71122,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const staticNames = new Map2(); const privateIdentifiers = new Map2(); for (const member of node.members) { - if (member.kind === 176 /* Constructor */) { + if (member.kind === 178 /* Constructor */) { for (const param of member.parameters) { if (isParameterPropertyDeclaration(param, member) && !isBindingPattern(param.name)) { addName(instanceNames, param.name, param.name.escapedText, 3 /* GetOrSetAccessor */); @@ -70967,19 +71140,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const memberName = name && getPropertyNameForPropertyNameNode(name); if (memberName) { switch (member.kind) { - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: addName(names, name, memberName, 1 /* GetAccessor */ | privateStaticFlags); break; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: addName(names, name, memberName, 2 /* SetAccessor */ | privateStaticFlags); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: addName(names, name, memberName, 8 /* Method */ | privateStaticFlags); break; } @@ -71032,7 +71205,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkObjectTypeForDuplicateDeclarations(node) { const names = new Map2(); for (const member of node.members) { - if (member.kind === 170 /* PropertySignature */) { + if (member.kind === 171 /* PropertySignature */) { let memberName; const name = member.name; switch (name.kind) { @@ -71056,7 +71229,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 267 /* InterfaceDeclaration */) { + if (node.kind === 270 /* InterfaceDeclaration */) { const nodeSymbol = getSymbolOfNode(node); if (nodeSymbol.declarations && nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -71092,7 +71265,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (type.symbol.declarations) { for (const decl of type.symbol.declarations) { - if (decl.kind === 269 /* EnumDeclaration */) { + if (decl.kind === 272 /* EnumDeclaration */) { const members = decl.members; for (let i = 0; i < members.length; ++i) { if (i > 1 && typeof getConstantValue2(members[i - 1]) !== typeof getConstantValue2(members[i])) { @@ -71164,7 +71337,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function evaluateAnnotationPropertyConstantExpression(expr) { switch (expr.kind) { - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: const value = evaluateAnnotationPropertyConstantExpression(expr.operand); if (typeof value === "number" || typeof value === "string" || typeof value === "boolean") { switch (expr.operator) { @@ -71183,7 +71356,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const left = evaluateAnnotationPropertyConstantExpression(expr.left); const right = evaluateAnnotationPropertyConstantExpression(expr.right); if (left !== void 0 && right !== void 0 && typeof left === typeof right) { @@ -71252,7 +71425,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: const elements = expr.elements; const result = new Array(elements.length); for (let i = 0; i < elements.length; ++i) { @@ -71276,7 +71449,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 8 /* NumericLiteral */: checkGrammarNumericLiteral(expr); return +expr.text; - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return evaluateAnnotationPropertyConstantExpression(expr.expression); case 79 /* Identifier */: if (isInfinityOrNaNString(expr.escapedText)) { @@ -71290,7 +71463,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return evaluateAnnotationPropertyConstantExpression(symbol.valueDeclaration.initializer); } break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (isConstantMemberAccess(expr)) { return getConstantValue2(expr); } @@ -71309,7 +71482,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } checkVariableLikeDeclaration(node); setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 171 /* PropertyDeclaration */ && node.initializer) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) { error(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); } if (isAnnotationPropertyDeclaration(node)) { @@ -71400,7 +71573,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 176 /* 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)) { @@ -71448,7 +71621,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isPrivateIdentifierClassElementDeclaration(n)) { return true; } - return n.kind === 171 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; + return n.kind === 172 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; } function checkConstructorDeclarationDiagnostics() { const containingClassDecl = node.parent; @@ -71511,20 +71684,20 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 177 /* GetAccessor */) { + if (node.kind === 179 /* 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 === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { const symbol = getSymbolOfNode(node); - const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); + const getter = getDeclarationOfKind(symbol, 179 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 180 /* SetAccessor */); if (getter && setter && !(getNodeCheckFlags(getter) & 1 /* TypeChecked */)) { getNodeLinks(getter).flags |= 1 /* TypeChecked */; const getterFlags = getEffectiveModifierFlags(getter); @@ -71545,7 +71718,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } const returnType = getTypeOfAccessors(getSymbolOfNode(node)); - if (node.kind === 177 /* GetAccessor */) { + if (node.kind === 179 /* GetAccessor */) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -71600,7 +71773,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkTypeReferenceNode(node) { checkGrammarTypeArguments(node, node.typeArguments); - if (node.kind === 183 /* TypeReference */ && node.typeName.jsdocDotPos !== void 0 && !isInJSFile(node) && !isInJSDoc(node)) { + if (node.kind === 185 /* TypeReference */ && node.typeName.jsdocDotPos !== void 0 && !isInJSFile(node) && !isInJSDoc(node)) { grammarErrorAtPos(node, node.typeName.jsdocDotPos, 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); } forEach(node.typeArguments, checkSourceElement); @@ -71664,7 +71837,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let seenRestElement = false; const hasNamedElement = some(elementTypes, isNamedTupleMember); for (const e of elementTypes) { - if (e.kind !== 202 /* NamedTupleMember */ && hasNamedElement) { + if (e.kind !== 204 /* NamedTupleMember */ && hasNamedElement) { grammarErrorOnNode(e, Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names); break; } @@ -71709,7 +71882,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const objectType = type.objectType; const indexType = type.indexType; if (isTypeAssignableTo(indexType, getIndexType(objectType, false))) { - if (accessNode.kind === 212 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { + if (accessNode.kind === 214 /* 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; @@ -71770,7 +71943,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { forEachChild(node, checkSourceElement); } function checkInferType(node) { - if (!findAncestor(node, (n) => n.parent && n.parent.kind === 194 /* ConditionalType */ && n.parent.extendsType === n)) { + if (!findAncestor(node, (n) => n.parent && n.parent.kind === 196 /* ConditionalType */ && n.parent.extendsType === n)) { grammarErrorOnNode(node, Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type); } checkSourceElement(node.typeParameter); @@ -71780,7 +71953,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!links.typeParametersChecked) { links.typeParametersChecked = true; const typeParameter = getDeclaredTypeOfTypeParameter(symbol); - const declarations = getDeclarationsOfKind(symbol, 167 /* TypeParameter */); + const declarations = getDeclarationsOfKind(symbol, 168 /* TypeParameter */); if (!areTypeParametersIdentical(declarations, [typeParameter], (decl) => [decl])) { const name = symbolToString(symbol); for (const declaration of declarations) { @@ -71818,10 +71991,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.dotDotDotToken && node.questionToken) { grammarErrorOnNode(node, Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest); } - if (node.type.kind === 190 /* OptionalType */) { + if (node.type.kind === 192 /* 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 === 191 /* RestType */) { + if (node.type.kind === 193 /* 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); @@ -71832,7 +72005,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getEffectiveDeclarationFlags(n, flagsToCheck) { let flags = getCombinedModifierFlags(n); - if (n.parent.kind !== 267 /* InterfaceDeclaration */ && n.parent.kind !== 264 /* ClassDeclaration */ && n.parent.kind !== 232 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { + if (n.parent.kind !== 270 /* InterfaceDeclaration */ && n.parent.kind !== 266 /* ClassDeclaration */ && n.parent.kind !== 234 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { if (!(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { flags |= 1 /* Export */; } @@ -71905,7 +72078,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const errorNode2 = subsequentNode.name || subsequentNode; const subsequentName = subsequentNode.name; if (node.name && subsequentName && (isPrivateIdentifier(node.name) && isPrivateIdentifier(subsequentName) && node.name.escapedText === subsequentName.escapedText || isComputedPropertyName(node.name) && isComputedPropertyName(subsequentName) || isPropertyNameLiteral(node.name) && isPropertyNameLiteral(subsequentName) && getEscapedTextOfIdentifierOrLiteral(node.name) === getEscapedTextOfIdentifierOrLiteral(subsequentName))) { - const reportError = (node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); + const reportError = (node.kind === 176 /* MethodDeclaration */ || node.kind === 175 /* 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); @@ -71937,14 +72110,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { for (const current of declarations) { const node = current; const inAmbientContext = node.flags & 16777216 /* Ambient */; - const inAmbientContextOrInterface = node.parent && (node.parent.kind === 267 /* InterfaceDeclaration */ || node.parent.kind === 187 /* TypeLiteral */) || inAmbientContext; + const inAmbientContextOrInterface = node.parent && (node.parent.kind === 270 /* InterfaceDeclaration */ || node.parent.kind === 189 /* TypeLiteral */) || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = void 0; } - if ((node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */) && !inAmbientContext) { + if ((node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */) && !inAmbientContext) { hasNonAmbientClass = true; } - if (node.kind === 263 /* FunctionDeclaration */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 176 /* Constructor */) { + if (node.kind === 265 /* FunctionDeclaration */ || node.kind === 176 /* MethodDeclaration */ || node.kind === 175 /* MethodSignature */ || node.kind === 178 /* Constructor */) { functionDeclarations.push(node); const currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; @@ -71986,9 +72159,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }); } if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 /* Function */ && declarations) { - const relatedDiagnostics = filter(declarations, (d) => d.kind === 264 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); + const relatedDiagnostics = filter(declarations, (d) => d.kind === 266 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); forEach(declarations, (declaration) => { - const diagnostic = declaration.kind === 264 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 263 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; + const diagnostic = declaration.kind === 266 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 265 /* 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)), @@ -72067,43 +72240,43 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getDeclarationSpaces(decl) { let d = decl; switch (d.kind) { - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return 2 /* ExportType */; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return isAmbientModule(d) || getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4 /* ExportNamespace */ | 1 /* ExportValue */ : 4 /* ExportNamespace */; - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; - case 280 /* ExportAssignment */: - case 227 /* BinaryExpression */: + case 283 /* ExportAssignment */: + case 229 /* BinaryExpression */: const node2 = d; const expression = isExportAssignment(node2) ? node2.expression : node2.right; if (!isEntityNameExpression(expression)) { return 1 /* ExportValue */; } d = expression; - case 274 /* ImportEqualsDeclaration */: - case 277 /* NamespaceImport */: - case 276 /* ImportClause */: + case 277 /* ImportEqualsDeclaration */: + case 280 /* NamespaceImport */: + case 279 /* ImportClause */: let result = 0 /* None */; const target = resolveAlias(getSymbolOfNode(d)); forEach(target.declarations, (d2) => { result |= getDeclarationSpaces(d2); }); return result; - case 261 /* VariableDeclaration */: - case 208 /* BindingElement */: - case 263 /* FunctionDeclaration */: - case 279 /* ImportSpecifier */: + case 263 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 265 /* FunctionDeclaration */: + case 282 /* ImportSpecifier */: case 79 /* Identifier */: return 1 /* ExportValue */; default: @@ -72354,21 +72527,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let headMessage; let expectedReturnType; switch (node.parent.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; const classSymbol = getSymbolOfNode(node.parent); const classConstructorType = getTypeOfSymbol(classSymbol); expectedReturnType = getUnionType([classConstructorType, voidType]); break; - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: headMessage = Diagnostics.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any; expectedReturnType = voidType; break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; const methodType = getTypeOfNode(node.parent); const descriptorType = createTypedPropertyDescriptorType(methodType); @@ -72414,15 +72587,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getEntityNameForDecoratorMetadata(node) { if (node) { switch (node.kind) { - case 193 /* IntersectionType */: - case 192 /* UnionType */: + case 195 /* IntersectionType */: + case 194 /* UnionType */: return getEntityNameForDecoratorMetadataFromTypeList(node.types); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return getEntityNameForDecoratorMetadataFromTypeList([node.trueType, node.falseType]); - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: + case 198 /* ParenthesizedType */: + case 204 /* NamedTupleMember */: return getEntityNameForDecoratorMetadata(node.type); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return node.typeName; } } @@ -72430,13 +72603,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getEntityNameForDecoratorMetadataFromTypeList(types) { let commonEntityName; for (let typeNode of types) { - while (typeNode.kind === 196 /* ParenthesizedType */ || typeNode.kind === 202 /* NamedTupleMember */) { + while (typeNode.kind === 198 /* ParenthesizedType */ || typeNode.kind === 204 /* NamedTupleMember */) { typeNode = typeNode.type; } if (typeNode.kind === 145 /* NeverKeyword */) { continue; } - if (!strictNullChecks && (typeNode.kind === 201 /* LiteralType */ && typeNode.literal.kind === 105 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { + if (!strictNullChecks && (typeNode.kind === 203 /* LiteralType */ && typeNode.literal.kind === 105 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { continue; } const individualEntityName = getEntityNameForDecoratorMetadata(typeNode); @@ -72496,9 +72669,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } switch (annotatedDecl.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: const enclosingDecl = annotatedDecl.parent; Debug.assert(isClassDeclaration(enclosingDecl)); if (hasSyntacticModifier(enclosingDecl, 256 /* Abstract */)) { @@ -72529,10 +72702,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: ident = da.expression; break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: ident = da.expression; break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: ident = getIdentifierFromEntityNameExpression(da.expression.expression); break; default: @@ -72587,13 +72760,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */); - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { checkExternalEmitHelpers(firstDecorator, 32 /* Param */); } if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */); switch (node.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: const constructor = getFirstConstructorWithBody(node); if (constructor) { for (const parameter of constructor.parameters) { @@ -72601,22 +72774,22 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - const otherKind = node.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + const otherKind = node.kind === 179 /* GetAccessor */ ? 180 /* SetAccessor */ : 179 /* GetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfNode(node), otherKind); markDecoratorMedataDataTypeNodeAsReferenced(getAnnotatedAccessorTypeNode(node) || otherAccessor && getAnnotatedAccessorTypeNode(otherAccessor)); break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: for (const parameter of node.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(node)); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveTypeAnnotationNode(node)); break; - case 168 /* Parameter */: + case 169 /* Parameter */: markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); const containingSignature = node.parent; for (const parameter of containingSignature.parameters) { @@ -72714,7 +72887,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (node.kind) { case 79 /* Identifier */: return node; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return node.name; default: return void 0; @@ -72725,7 +72898,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkDecorators(node); checkSignatureDeclaration(node); const functionFlags = getFunctionFlags(node); - if (node.name && node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { @@ -72741,7 +72914,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkFunctionOrConstructorSymbol(symbol); } } - const body = node.kind === 173 /* MethodSignature */ ? void 0 : node.body; + const body = node.kind === 175 /* MethodSignature */ ? void 0 : node.body; checkSourceElement(body); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node)); addLazyDiagnostic(checkFunctionOrMethodDeclarationDiagnostics); @@ -72777,43 +72950,43 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) { for (const node of potentiallyUnusedIdentifiers) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: checkUnusedClassMembers(node, addDiagnostic); checkUnusedTypeParameters(node, addDiagnostic); break; - case 314 /* SourceFile */: - case 270 /* ModuleDeclaration */: - case 242 /* Block */: - case 272 /* CaseBlock */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 317 /* SourceFile */: + case 273 /* ModuleDeclaration */: + case 244 /* Block */: + case 275 /* CaseBlock */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: checkUnusedLocalsAndParameters(node, addDiagnostic); break; - case 176 /* Constructor */: - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* Constructor */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: if (node.body) { checkUnusedLocalsAndParameters(node, addDiagnostic); } checkUnusedTypeParameters(node, addDiagnostic); break; - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: checkUnusedTypeParameters(node, addDiagnostic); break; - case 195 /* InferType */: + case 197 /* InferType */: checkUnusedInferTypeParameter(node, addDiagnostic); break; default: @@ -72832,11 +73005,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkUnusedClassMembers(node, addDiagnostic) { for (const member of node.members) { switch (member.kind) { - case 174 /* MethodDeclaration */: - case 171 /* PropertyDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - if (member.kind === 178 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { + case 176 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + if (member.kind === 180 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { break; } const symbol = getSymbolOfNode(member); @@ -72844,16 +73017,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; - case 176 /* Constructor */: + case 178 /* 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 181 /* IndexSignature */: - case 241 /* SemicolonClassElement */: - case 175 /* ClassStaticBlockDeclaration */: + case 183 /* IndexSignature */: + case 243 /* SemicolonClassElement */: + case 177 /* ClassStaticBlockDeclaration */: break; default: Debug.fail("Unexpected class member"); @@ -72877,7 +73050,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue; const name = idText(typeParameter.name); const { parent } = typeParameter; - if (parent.kind !== 195 /* InferType */ && parent.typeParameters.every(isTypeParameterUnused)) { + if (parent.kind !== 197 /* InferType */ && parent.typeParameters.every(isTypeParameterUnused)) { if (tryAddToSet(seenParentsWithEveryUnused, parent)) { const sourceFile = getSourceFileOfNode(parent); const range = isJSDocTemplateTag(parent) ? rangeOfNode(parent) : rangeOfTypeParameters(sourceFile, parent.typeParameters); @@ -72957,7 +73130,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }); unusedImports.forEach(([importClause, unuseds]) => { const importDecl = importClause.parent; - const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 277 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); + const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 280 /* 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 { @@ -72968,7 +73141,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 261 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 262 /* VariableDeclarationList */) { + if (bindingElements.length === 1 && bindingPattern.parent.kind === 263 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 264 /* 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)); @@ -72981,7 +73154,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }); 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 === 244 /* 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 === 246 /* 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))); @@ -73010,21 +73183,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (name.kind) { case 79 /* Identifier */: return idText(name); - case 207 /* ArrayBindingPattern */: - case 206 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: return bindingNameText(cast(first(name.elements), isBindingElement).name); default: return Debug.assertNever(name); } } function isImportedDeclaration(node) { - return node.kind === 276 /* ImportClause */ || node.kind === 279 /* ImportSpecifier */ || node.kind === 277 /* NamespaceImport */; + return node.kind === 279 /* ImportClause */ || node.kind === 282 /* ImportSpecifier */ || node.kind === 280 /* NamespaceImport */; } function importClauseFromImported(decl) { - return decl.kind === 276 /* ImportClause */ ? decl : decl.kind === 277 /* NamespaceImport */ ? decl.parent : decl.parent.parent; + return decl.kind === 279 /* ImportClause */ ? decl : decl.kind === 280 /* NamespaceImport */ ? decl.parent : decl.parent.parent; } function checkBlock(node) { - if (node.kind === 242 /* Block */) { + if (node.kind === 244 /* Block */) { checkGrammarStatementInAmbientContext(node); } if (isFunctionOrModuleBlock(node)) { @@ -73052,7 +73225,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if ((identifier == null ? void 0 : identifier.escapedText) !== name) { return false; } - if (node.kind === 171 /* PropertyDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */ || node.kind === 305 /* PropertyAssignment */) { + if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 176 /* MethodDeclaration */ || node.kind === 175 /* MethodSignature */ || node.kind === 179 /* GetAccessor */ || node.kind === 180 /* SetAccessor */ || node.kind === 308 /* PropertyAssignment */) { return false; } if (node.flags & 16777216 /* Ambient */) { @@ -73108,7 +73281,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const parent = getDeclarationContainer(node); - if (parent.kind === 314 /* SourceFile */ && isExternalOrCommonJsModule(parent)) { + if (parent.kind === 317 /* SourceFile */ && isExternalOrCommonJsModule(parent)) { errorSkippedOn( "noEmit", name, @@ -73126,7 +73299,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const parent = getDeclarationContainer(node); - if (parent.kind === 314 /* SourceFile */ && isExternalOrCommonJsModule(parent) && parent.flags & 2048 /* HasAsyncFunctions */) { + if (parent.kind === 317 /* SourceFile */ && isExternalOrCommonJsModule(parent) && parent.flags & 2048 /* HasAsyncFunctions */) { errorSkippedOn( "noEmit", name, @@ -73208,7 +73381,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if ((getCombinedNodeFlags(node) & 3 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { return; } - if (node.kind === 261 /* VariableDeclaration */ && !node.initializer) { + if (node.kind === 263 /* VariableDeclaration */ && !node.initializer) { return; } const symbol = getSymbolOfNode(node); @@ -73218,9 +73391,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const localDeclarationSymbol = resolveName(node, node.name.escapedText, 3 /* Variable */, void 0, void 0, false); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3 /* BlockScoped */) { - const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 262 /* VariableDeclarationList */); - const container = varDeclList.parent.kind === 244 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; - const namesShareScope = container && (container.kind === 242 /* Block */ && isFunctionLike(container.parent) || container.kind === 271 /* ModuleBlock */ || container.kind === 270 /* ModuleDeclaration */ || container.kind === 314 /* SourceFile */); + const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 264 /* VariableDeclarationList */); + const container = varDeclList.parent.kind === 246 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; + const namesShareScope = container && (container.kind === 244 /* Block */ && isFunctionLike(container.parent) || container.kind === 274 /* ModuleBlock */ || container.kind === 273 /* ModuleDeclaration */ || container.kind === 317 /* 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); @@ -73241,7 +73414,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!node.name) { return; } - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (hasOnlyExpressionInitializer(node) && node.initializer) { checkExpressionCached(node.initializer); @@ -73255,7 +73428,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < 5 /* ES2018 */) { checkExternalEmitHelpers(node, 4 /* Rest */); } - if (node.propertyName && node.propertyName.kind === 166 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } const parent = node.parent.parent; @@ -73275,7 +73448,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } if (isBindingPattern(node.name)) { - if (node.name.kind === 207 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { + if (node.name.kind === 209 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512 /* Read */); } forEach(node.name.elements, checkSourceElement); @@ -73285,7 +73458,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } if (isBindingPattern(node.name)) { - const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 250 /* ForInStatement */; + const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 252 /* ForInStatement */; const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression)); if (needCheckInitializer || needCheckWidenedType) { const widenedType = getWidenedTypeForVariableLikeDeclaration(node); @@ -73308,7 +73481,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const symbol = getSymbolOfNode(node); - if (symbol.flags & 2097152 /* Alias */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.kind === 208 /* BindingElement */ ? node.parent.parent : node)) { + if (symbol.flags & 2097152 /* Alias */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.kind === 210 /* BindingElement */ ? node.parent.parent : node)) { checkAliasSymbol(node); return; } @@ -73317,7 +73490,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 250 /* ForInStatement */) { + if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 252 /* ForInStatement */) { checkTypeAssignableToAndOptionallyElaborate(checkExpressionCached(initializer), type, node, initializer, void 0); } } @@ -73338,9 +73511,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } } - if (node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 170 /* PropertySignature */ && node.kind !== 172 /* AnnotationPropertyDeclaration */) { + if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 173 /* AnnotationPropertyDeclaration */) { checkExportsOnMergedDeclarations(node); - if (node.kind === 261 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { + if (node.kind === 263 /* VariableDeclaration */ || node.kind === 210 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionsForDeclarationName(node, node.name); @@ -73348,7 +73521,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) { const nextDeclarationName = getNameOfDeclaration(nextDeclaration); - const message = nextDeclaration.kind === 171 /* PropertyDeclaration */ || nextDeclaration.kind === 170 /* 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 === 172 /* PropertyDeclaration */ || nextDeclaration.kind === 171 /* 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, @@ -73365,7 +73538,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function areDeclarationFlagsIdentical(left, right) { - if (left.kind === 168 /* Parameter */ && right.kind === 261 /* VariableDeclaration */ || left.kind === 261 /* VariableDeclaration */ && right.kind === 168 /* Parameter */) { + if (left.kind === 169 /* Parameter */ && right.kind === 263 /* VariableDeclaration */ || left.kind === 263 /* VariableDeclaration */ && right.kind === 169 /* Parameter */) { return true; } if (hasQuestionToken(left) !== hasQuestionToken(right)) { @@ -73401,7 +73574,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const type = checkTruthinessExpression(node.expression); checkTestingKnownTruthyCallableOrAwaitableType(node.expression, type, node.thenStatement); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 243 /* EmptyStatement */) { + if (node.thenStatement.kind === 245 /* EmptyStatement */) { error(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -73517,12 +73690,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 262 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 264 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 262 /* VariableDeclarationList */) { + if (node.initializer.kind === 264 /* VariableDeclarationList */) { forEach(node.initializer.declarations, checkVariableDeclaration); } else { checkExpression(node.initializer); @@ -73552,12 +73725,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(node, 256 /* ForOfIncludes */); } - if (node.initializer.kind === 262 /* VariableDeclarationList */) { + if (node.initializer.kind === 264 /* VariableDeclarationList */) { checkForInOrForOfVariableDeclaration(node); } else { const varExpr = node.initializer; const iteratedType = checkRightHandSideOfForOf(node); - if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { + if (varExpr.kind === 211 /* ArrayLiteralExpression */ || varExpr.kind === 212 /* ObjectLiteralExpression */) { checkDestructuringAssignment(varExpr, iteratedType || errorType); } else { const leftType = checkExpression(varExpr); @@ -73579,7 +73752,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); const rightType = getNonNullableTypeIfNeeded(checkExpression(node.expression)); - if (node.initializer.kind === 262 /* VariableDeclarationList */) { + if (node.initializer.kind === 264 /* 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); @@ -73588,7 +73761,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { const varExpr = node.initializer; const leftType = checkExpression(varExpr); - if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { + if (varExpr.kind === 211 /* ArrayLiteralExpression */ || varExpr.kind === 212 /* 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); @@ -74145,11 +74318,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const functionFlags = getFunctionFlags(container); if (strictNullChecks || node.expression || returnType.flags & 131072 /* Never */) { const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType; - if (container.kind === 178 /* SetAccessor */) { + if (container.kind === 180 /* SetAccessor */) { if (node.expression) { error(node, Diagnostics.Setters_cannot_return_a_value); } - } else if (container.kind === 176 /* Constructor */) { + } else if (container.kind === 178 /* 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); } @@ -74160,7 +74333,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression); } } - } else if (container.kind !== 176 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) { + } else if (container.kind !== 178 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) { error(node, Diagnostics.Not_all_code_paths_return_a_value); } } @@ -74185,7 +74358,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const expressionType = checkExpression(node.expression); const expressionIsLiteral = isLiteralType(expressionType); forEach(node.caseBlock.clauses, (clause) => { - if (clause.kind === 299 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 302 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === void 0) { firstDefaultClause = clause; } else { @@ -74193,7 +74366,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { hasDuplicateDefaultClause = true; } } - if (clause.kind === 298 /* CaseClause */) { + if (clause.kind === 301 /* CaseClause */) { addLazyDiagnostic(createLazyCaseClauseDiagnostics(clause)); } forEach(clause.statements, checkSourceElement); @@ -74225,7 +74398,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isFunctionLike(current)) { return "quit"; } - if (current.kind === 257 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { + if (current.kind === 259 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { grammarErrorOnNode(node.label, Diagnostics.Duplicate_label_0, getTextOfNode(node.label)); return true; } @@ -74309,8 +74482,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const indexInfos = getApplicableIndexInfos(type, propNameType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 267 /* InterfaceDeclaration */) : void 0; - const propDeclaration = declaration && declaration.kind === 227 /* BinaryExpression */ || name && name.kind === 166 /* ComputedPropertyName */ ? declaration : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 270 /* InterfaceDeclaration */) : void 0; + const propDeclaration = declaration && declaration.kind === 229 /* BinaryExpression */ || name && name.kind === 167 /* ComputedPropertyName */ ? declaration : void 0; const localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : void 0; for (const info of indexInfos) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : void 0; @@ -74334,7 +74507,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkIndexConstraintForIndexSignature(type, checkInfo) { const declaration = checkInfo.declaration; const indexInfos = getApplicableIndexInfos(type, checkInfo.keyType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 267 /* InterfaceDeclaration */) : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 270 /* InterfaceDeclaration */) : void 0; const localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfNode(declaration)) === type.symbol ? declaration : void 0; for (const info of indexInfos) { if (info === checkInfo) @@ -74439,7 +74612,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkTypeParametersNotReferenced(root, typeParameters, index) { visit(root); function visit(node) { - if (node.kind === 183 /* TypeReference */) { + if (node.kind === 185 /* TypeReference */) { const type = getTypeFromTypeReference(node); if (type.flags & 262144 /* TypeParameter */) { for (let i = index; i < typeParameters.length; i++) { @@ -74866,7 +75039,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getCheckFlags(s) & 1 /* Instantiated */ ? s.target : s; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { - return filter(symbol.declarations, (d) => d.kind === 264 /* ClassDeclaration */ || d.kind === 267 /* InterfaceDeclaration */); + return filter(symbol.declarations, (d) => d.kind === 266 /* ClassDeclaration */ || d.kind === 270 /* InterfaceDeclaration */); } function checkKindsOfPropertyMemberOverrides(type, baseType) { var _a2, _b, _c, _d; @@ -74896,7 +75069,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue basePropertyCheck; } } - if (derivedClassDecl.kind === 232 /* ClassExpression */) { + if (derivedClassDecl.kind === 234 /* ClassExpression */) { error( derivedClassDecl, Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, @@ -74931,7 +75104,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 171 /* PropertyDeclaration */ && !d.initializer); + const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 172 /* 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; @@ -75034,7 +75207,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function isPropertyWithoutInitializer(node) { - return node.kind === 171 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; + return node.kind === 172 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; } function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) { for (const staticBlock of staticBlocks) { @@ -75068,7 +75241,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkExportsOnMergedDeclarations(node); const symbol = getSymbolOfNode(node); checkTypeParameterListsIdentical(symbol); - const firstInterfaceDecl = getDeclarationOfKind(symbol, 267 /* InterfaceDeclaration */); + const firstInterfaceDecl = getDeclarationOfKind(symbol, 270 /* InterfaceDeclaration */); if (node === firstInterfaceDecl) { const type = getDeclaredTypeOfSymbol(symbol); const typeWithThis = getTypeWithThisArgument(type); @@ -75167,7 +75340,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return value; function evaluate(expr) { switch (expr.kind) { - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: const value2 = evaluate(expr.operand); if (typeof value2 === "number") { switch (expr.operator) { @@ -75180,7 +75353,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const left = evaluate(expr.left); const right = evaluate(expr.right); if (typeof left === "number" && typeof right === "number") { @@ -75220,7 +75393,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 8 /* NumericLiteral */: checkGrammarNumericLiteral(expr); return +expr.text; - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return evaluate(expr.expression); case 79 /* Identifier */: const identifier = expr; @@ -75228,13 +75401,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return +identifier.escapedText; } return nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText); - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: if (isConstantMemberAccess(expr)) { const type = getTypeOfExpression(expr.expression); if (type.symbol && type.symbol.flags & 384 /* Enum */) { let name; - if (expr.kind === 211 /* PropertyAccessExpression */) { + if (expr.kind === 213 /* PropertyAccessExpression */) { name = expr.name.escapedText; } else { name = escapeLeadingUnderscores(cast(expr.argumentExpression, isLiteralExpression).text); @@ -75268,7 +75441,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (type === errorType) { return false; } - return node.kind === 79 /* Identifier */ || node.kind === 211 /* PropertyAccessExpression */ && isConstantMemberAccess(node.expression) || node.kind === 212 /* ElementAccessExpression */ && isConstantMemberAccess(node.expression) && isStringLiteralLike(node.argumentExpression); + return node.kind === 79 /* Identifier */ || node.kind === 213 /* PropertyAccessExpression */ && isConstantMemberAccess(node.expression) || node.kind === 214 /* ElementAccessExpression */ && isConstantMemberAccess(node.expression) && isStringLiteralLike(node.argumentExpression); } function checkEnumDeclaration(node) { addLazyDiagnostic(() => checkEnumDeclarationWorker(node)); @@ -75292,7 +75465,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let seenEnumMissingInitialInitializer = false; forEach(enumSymbol.declarations, (declaration) => { - if (declaration.kind !== 269 /* EnumDeclaration */) { + if (declaration.kind !== 272 /* EnumDeclaration */) { return false; } const enumDeclaration = declaration; @@ -75319,7 +75492,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const declarations = symbol.declarations; if (declarations) { for (const declaration of declarations) { - if ((declaration.kind === 264 /* ClassDeclaration */ || declaration.kind === 263 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { + if ((declaration.kind === 266 /* ClassDeclaration */ || declaration.kind === 265 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { return declaration; } } @@ -75375,7 +75548,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 264 /* ClassDeclaration */); + const mergedClass = getDeclarationOfKind(symbol, 266 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 32768 /* LexicalModuleMergesWithClass */; } @@ -75406,21 +75579,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: for (const decl of node.declarationList.declarations) { checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 280 /* ExportAssignment */: - case 281 /* ExportDeclaration */: + case 283 /* ExportAssignment */: + case 284 /* ExportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 274 /* ImportEqualsDeclaration */: - case 275 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 208 /* BindingElement */: - case 261 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 263 /* VariableDeclaration */: const name = node.name; if (isBindingPattern(name)) { for (const el of name.elements) { @@ -75428,12 +75601,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } break; } - case 264 /* ClassDeclaration */: - case 269 /* EnumDeclaration */: - case 263 /* FunctionDeclaration */: - case 267 /* InterfaceDeclaration */: - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 266 /* ClassDeclaration */: + case 272 /* EnumDeclaration */: + case 265 /* FunctionDeclaration */: + case 270 /* InterfaceDeclaration */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: if (isGlobalAugmentation) { return; } @@ -75444,12 +75617,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (node.kind) { case 79 /* Identifier */: return node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.left; } while (node.kind !== 79 /* Identifier */); return node; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: do { if (isModuleExportsAccessExpression(node.expression) && !isPrivateIdentifier(node.name)) { return node.name; @@ -75468,9 +75641,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(moduleName, Diagnostics.String_literal_expected); return false; } - const inAmbientExternalModule = node.parent.kind === 271 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - if (node.parent.kind !== 314 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 281 /* 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 === 274 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + if (node.parent.kind !== 317 /* SourceFile */ && !inAmbientExternalModule) { + error(moduleName, node.kind === 284 /* 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)) { @@ -75499,8 +75672,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 283 /* NamespaceExport */); - if (node.kind === 284 /* ExportSpecifier */) { + Debug.assert(node.kind !== 286 /* NamespaceExport */); + if (node.kind === 287 /* 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) { @@ -75514,7 +75687,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } else { - Debug.assert(node.kind !== 261 /* VariableDeclaration */); + Debug.assert(node.kind !== 263 /* 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); @@ -75530,7 +75703,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 284 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + const message = node.kind === 287 /* 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 (compilerOptions.isolatedModules && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 16777216 /* Ambient */)) { @@ -75538,25 +75711,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const isType = !(targetFlags & 111551 /* Value */); if (isType || typeOnlyAlias) { switch (node.kind) { - case 276 /* ImportClause */: - case 279 /* ImportSpecifier */: - case 274 /* ImportEqualsDeclaration */: { + case 279 /* ImportClause */: + case 282 /* ImportSpecifier */: + case 277 /* ImportEqualsDeclaration */: { if (compilerOptions.preserveValueImports) { Debug.assertIsDefined(node.name, "An ImportClause with a symbol should have a name"); const message = isType ? Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_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 === 279 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); + const name = idText(node.kind === 282 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); addTypeOnlyDeclarationRelatedInfo( error(node, message, name), isType ? void 0 : typeOnlyAlias, name ); } - if (isType && node.kind === 274 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { + if (isType && node.kind === 277 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { error(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided); } break; } - case 284 /* ExportSpecifier */: { + case 287 /* ExportSpecifier */: { if (getSourceFileOfNode(typeOnlyAlias) !== getSourceFileOfNode(node)) { const message = isType ? Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isolatedModules_is_enabled; const name = idText(node.propertyName || node.name); @@ -75625,7 +75798,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkImportBinding(node) { checkCollisionsForDeclarationName(node, node.name); checkAliasSymbol(node); - if (node.kind === 279 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (node.kind === 282 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { checkExternalEmitHelpers(node, 131072 /* ImportDefault */); } } @@ -75672,7 +75845,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 277 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 280 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); if (moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && getESModuleInterop(compilerOptions)) { checkExternalEmitHelpers(node, 65536 /* ImportStar */); @@ -75698,7 +75871,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (hasSyntacticModifier(node, 1 /* Export */)) { markExportAsReferenced(node); } - if (node.moduleReference.kind !== 286 /* ExternalModuleReference */) { + if (node.moduleReference.kind !== 289 /* ExternalModuleReference */) { const target = resolveAlias(getSymbolOfNode(node)); if (target !== unknownSymbol) { const targetFlags = getAllSymbolFlags(target); @@ -75736,9 +75909,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause && !isNamespaceExport(node.exportClause)) { forEach(node.exportClause.elements, checkExportSpecifier); - const inAmbientExternalModule = node.parent.kind === 271 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 271 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; - if (node.parent.kind !== 314 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + const inAmbientExternalModule = node.parent.kind === 274 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 274 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; + if (node.parent.kind !== 317 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { error(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } else { @@ -75764,7 +75937,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkGrammarExportDeclaration(node) { var _a2; if (node.isTypeOnly) { - if (((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 282 /* NamedExports */) { + if (((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 285 /* NamedExports */) { return checkGrammarNamedImportsOrExports(node.exportClause); } else { return grammarErrorOnNode(node, Diagnostics.Only_named_exports_may_use_export_type); @@ -75773,7 +75946,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function checkGrammarModuleElementContext(node, errorMessage) { - const isInAppropriateContext = node.parent.kind === 314 /* SourceFile */ || node.parent.kind === 271 /* ModuleBlock */ || node.parent.kind === 270 /* ModuleDeclaration */; + const isInAppropriateContext = node.parent.kind === 317 /* SourceFile */ || node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 273 /* ModuleDeclaration */; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -75846,7 +76019,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: ident = node.expression; break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: ident = node.expression; break; default: @@ -75871,8 +76044,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (checkGrammarModuleElementContext(node, illegalContextMessage)) { return; } - const container = node.parent.kind === 314 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 270 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 317 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 273 /* ModuleDeclaration */ && !isAmbientModule(container)) { if (node.isExportEquals) { error(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } else { @@ -75984,186 +76157,188 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const kind = node.kind; if (cancellationToken) { switch (kind) { - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } - if (kind >= 244 /* FirstStatement */ && kind <= 260 /* LastStatement */ && node.flowNode && !isReachableFlowNode(node.flowNode)) { + if (kind >= 246 /* FirstStatement */ && kind <= 262 /* LastStatement */ && node.flowNode && !isReachableFlowNode(node.flowNode)) { errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected); } switch (kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return checkTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return checkParameter(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return checkPropertyDeclaration(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return checkPropertySignature(node); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return checkPropertyDeclaration(node); - case 185 /* ConstructorType */: - case 184 /* FunctionType */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: + case 187 /* ConstructorType */: + case 186 /* FunctionType */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: return checkSignatureDeclaration(node); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return checkMethodDeclaration(node); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return checkClassStaticBlockDeclaration(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return checkConstructorDeclaration(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return checkAccessorDeclaration(node); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return checkTypeReferenceNode(node); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return checkTypePredicate(node); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return checkTypeQuery(node); - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: return checkTypeLiteral(node); - case 188 /* ArrayType */: + case 190 /* ArrayType */: return checkArrayType(node); - case 189 /* TupleType */: + case 191 /* TupleType */: return checkTupleType(node); - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 196 /* ParenthesizedType */: - case 190 /* OptionalType */: - case 191 /* RestType */: + case 198 /* ParenthesizedType */: + case 192 /* OptionalType */: + case 193 /* RestType */: return checkSourceElement(node.type); - case 197 /* ThisType */: + case 199 /* ThisType */: return checkThisType(node); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return checkTypeOperator(node); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return checkConditionalType(node); - case 195 /* InferType */: + case 197 /* InferType */: return checkInferType(node); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: return checkTemplateLiteralType(node); - case 205 /* ImportType */: + case 207 /* ImportType */: return checkImportType(node); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return checkNamedTupleMember(node); - case 337 /* JSDocAugmentsTag */: + case 340 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 338 /* JSDocImplementsTag */: + case 341 /* JSDocImplementsTag */: return checkJSDocImplementsTag(node); - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 333 /* JSDocLink */: - case 334 /* JSDocLinkCode */: - case 335 /* JSDocLinkPlain */: + case 336 /* JSDocLink */: + case 337 /* JSDocLinkCode */: + case 338 /* JSDocLinkPlain */: return checkJSDocLinkLikeTag(node); - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: return checkJSDocParameterTag(node); - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: return checkJSDocPropertyTag(node); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: checkJSDocFunctionType(node); - case 324 /* JSDocNonNullableType */: - case 323 /* JSDocNullableType */: - case 321 /* JSDocAllType */: - case 322 /* JSDocUnknownType */: - case 331 /* JSDocTypeLiteral */: + case 327 /* JSDocNonNullableType */: + case 326 /* JSDocNullableType */: + case 324 /* JSDocAllType */: + case 325 /* JSDocUnknownType */: + case 334 /* JSDocTypeLiteral */: checkJSDocTypeIsInJsFile(node); forEachChild(node, checkSourceElement); return; - case 327 /* JSDocVariadicType */: + case 330 /* JSDocVariadicType */: checkJSDocVariadicType(node); return; - case 318 /* JSDocTypeExpression */: + case 321 /* JSDocTypeExpression */: return checkSourceElement(node.type); - case 342 /* JSDocPublicTag */: - case 344 /* JSDocProtectedTag */: - case 343 /* JSDocPrivateTag */: + case 345 /* JSDocPublicTag */: + case 347 /* JSDocProtectedTag */: + case 346 /* JSDocPrivateTag */: return checkJSDocAccessibilityModifiers(node); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return checkIndexedAccessType(node); - case 200 /* MappedType */: + case 202 /* MappedType */: return checkMappedType(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 242 /* Block */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 274 /* ModuleBlock */: return checkBlock(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return checkVariableStatement(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return checkExpressionStatement(node); - case 246 /* IfStatement */: + case 248 /* IfStatement */: return checkIfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return checkDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return checkWhileStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return checkForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return checkForInStatement(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return checkForOfStatement(node); - case 252 /* ContinueStatement */: - case 253 /* BreakStatement */: + case 254 /* ContinueStatement */: + case 255 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return checkReturnStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return checkWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return checkSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return checkLabeledStatement(node); - case 258 /* ThrowStatement */: + case 260 /* ThrowStatement */: return checkThrowStatement(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return checkTryStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return checkBindingElement(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return checkClassDeclaration(node); - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return checkStructDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return checkAnnotationDeclaration(node); - case 267 /* InterfaceDeclaration */: + case 269 /* OverloadDeclaration */: + return; + case 270 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return checkImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return checkExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return checkExportAssignment(node); - case 243 /* EmptyStatement */: - case 260 /* DebuggerStatement */: + case 245 /* EmptyStatement */: + case 262 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 285 /* MissingDeclaration */: + case 288 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -76250,33 +76425,33 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { currentNode = node; instantiationCount = 0; switch (node.kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 169 /* Decorator */: - case 289 /* JsxOpeningElement */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 217 /* TaggedTemplateExpression */: + case 170 /* Decorator */: + case 292 /* JsxOpeningElement */: resolveUntypedCall(node); break; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: checkAccessorDeclaration(node); break; - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: checkClassExpressionDeferred(node); break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: checkTypeParameterDeferred(node); break; - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: checkJsxSelfClosingElementDeferred(node); break; - case 287 /* JsxElement */: + case 290 /* JsxElement */: checkJsxElementDeferred(node); break; } @@ -76440,27 +76615,27 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { copySymbols(location.locals, meaning); } switch (location.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (!isExternalModule(location)) break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: copyLocallyVisibleExportSymbols(getSymbolOfNode(location).exports, meaning & 2623475 /* ModuleMember */); break; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 8 /* EnumMember */); break; - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: const className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: if (!isStaticSymbol) { copySymbols(getMembersOfSymbol(getSymbolOfNode(location)), meaning & 788968 /* Type */); } break; - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: const funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -76493,7 +76668,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function copyLocallyVisibleExportSymbols(source, meaning2) { if (meaning2) { source.forEach((symbol) => { - if (!getDeclarationOfKind(symbol, 284 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 283 /* NamespaceExport */)) { + if (!getDeclarationOfKind(symbol, 287 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 286 /* NamespaceExport */)) { copySymbol(symbol, meaning2); } }); @@ -76504,16 +76679,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return name.kind === 79 /* Identifier */ && isTypeDeclaration(name.parent) && getNameOfDeclaration(name.parent) === name; } function isTypeReferenceIdentifier(node) { - while (node.parent.kind === 165 /* QualifiedName */) { + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 183 /* TypeReference */; + return node.parent.kind === 185 /* TypeReference */; } function isHeritageClauseElementIdentifier(node) { - while (node.parent.kind === 211 /* PropertyAccessExpression */) { + while (node.parent.kind === 213 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent.kind === 234 /* ExpressionWithTypeArguments */; + return node.parent.kind === 236 /* ExpressionWithTypeArguments */; } function forEachEnclosingClass(node, callback) { let result; @@ -76540,13 +76715,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return !!forEachEnclosingClass(node, (n) => n === classDeclaration); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 165 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 166 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 274 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 277 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } - if (nodeOnRightSide.parent.kind === 280 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 283 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } return void 0; @@ -76572,7 +76747,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { node = parent; parent = parent.parent; } - if (parent && parent.kind === 205 /* ImportType */ && parent.qualifier === node) { + if (parent && parent.kind === 207 /* ImportType */ && parent.qualifier === node) { return parent; } return void 0; @@ -76581,7 +76756,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isDeclarationName(name)) { return getSymbolOfNode(name.parent); } - if (isInJSFile(name) && name.parent.kind === 211 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { + if (isInJSFile(name) && name.parent.kind === 213 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { if (!isPrivateIdentifier(name) && !isJSDocMemberName(name)) { const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(name); if (specialPropertyAssignmentSymbol) { @@ -76589,7 +76764,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - if (name.parent.kind === 280 /* ExportAssignment */ && isEntityNameExpression(name)) { + if (name.parent.kind === 283 /* ExportAssignment */ && isEntityNameExpression(name)) { const success = resolveEntityName( name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, @@ -76599,7 +76774,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return success; } } else if (isEntityName(name) && isInRightSideOfImportOrExportAssignment(name)) { - const importEqualsDeclaration = getAncestor(name, 274 /* ImportEqualsDeclaration */); + const importEqualsDeclaration = getAncestor(name, 277 /* ImportEqualsDeclaration */); Debug.assert(importEqualsDeclaration !== void 0); return getSymbolOfPartOfRightHandSideOfImportEquals(name, true); } @@ -76616,7 +76791,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (isHeritageClauseElementIdentifier(name)) { let meaning = 0 /* None */; - if (name.parent.kind === 234 /* ExpressionWithTypeArguments */) { + if (name.parent.kind === 236 /* ExpressionWithTypeArguments */) { meaning = 788968 /* Type */; if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) { meaning |= 111551 /* Value */; @@ -76630,10 +76805,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return entityNameSymbol; } } - if (name.parent.kind === 349 /* JSDocParameterTag */) { + if (name.parent.kind === 352 /* JSDocParameterTag */) { return getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 167 /* TypeParameter */ && name.parent.parent.kind === 353 /* JSDocTemplateTag */) { + if (name.parent.kind === 168 /* TypeParameter */ && name.parent.parent.kind === 356 /* JSDocTemplateTag */) { Debug.assert(!isInJSFile(name)); const typeParameter = getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -76665,12 +76840,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return result; } else if (isPrivateIdentifier(name)) { return getSymbolForPrivateIdentifierExpression(name); - } else if (name.kind === 211 /* PropertyAccessExpression */ || name.kind === 165 /* QualifiedName */) { + } else if (name.kind === 213 /* PropertyAccessExpression */ || name.kind === 166 /* QualifiedName */) { const links = getNodeLinks(name); if (links.resolvedSymbol) { return links.resolvedSymbol; } - if (name.kind === 211 /* PropertyAccessExpression */) { + if (name.kind === 213 /* PropertyAccessExpression */) { checkPropertyAccessExpression(name, 0 /* Normal */); if (!links.resolvedSymbol) { const expressionType = checkExpressionCached(name.expression); @@ -76710,11 +76885,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return resolveJSDocMemberName(name); } } else if (isTypeReferenceIdentifier(name)) { - const meaning = name.parent.kind === 183 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; + const meaning = name.parent.kind === 185 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; const symbol = resolveEntityName(name, meaning, true, true); return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name); } - if (name.parent.kind === 182 /* TypePredicate */) { + if (name.parent.kind === 184 /* TypePredicate */) { return resolveEntityName(name, 1 /* FunctionScopedVariable */, true); } return void 0; @@ -76739,7 +76914,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getSymbolAtLocation(node, ignoreErrors) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { return isExternalModule(node) ? getMergedSymbol(node.symbol) : void 0; } const { parent } = node; @@ -76756,7 +76931,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.kind === 79 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); - } else if (parent.kind === 208 /* BindingElement */ && grandParent.kind === 206 /* ObjectBindingPattern */ && node === parent.propertyName) { + } else if (parent.kind === 210 /* BindingElement */ && grandParent.kind === 208 /* ObjectBindingPattern */ && node === parent.propertyName) { const typeOfPattern = getTypeOfNode(grandParent); const propertyDeclaration = getPropertyOfType(typeOfPattern, node.escapedText); if (propertyDeclaration) { @@ -76775,8 +76950,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (node.kind) { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 211 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: if (!isThisInTypeQuery(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); } @@ -76791,19 +76966,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isInExpressionContext(node)) { return checkExpression(node).symbol; } - case 197 /* ThisType */: + case 199 /* ThisType */: return getTypeFromThisTypeNode(node).symbol; case 107 /* SuperKeyword */: return checkExpression(node).symbol; case 136 /* ConstructorKeyword */: const constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 176 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 178 /* 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 === 275 /* ImportDeclaration */ || node.parent.kind === 281 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && isRequireCall(node.parent, false) || isImportCall(node.parent)) || isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent) { + if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 278 /* ImportDeclaration */ || node.parent.kind === 284 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && isRequireCall(node.parent, false) || isImportCall(node.parent)) || isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent) { return resolveExternalModuleName(node, node, ignoreErrors); } if (isCallExpression(parent) && isBindableObjectDefinePropertyCall(parent) && parent.arguments[1] === node) { @@ -76817,14 +76992,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 38 /* EqualsGreaterThanToken */: case 84 /* ClassKeyword */: return getSymbolOfNode(node.parent); - case 205 /* ImportType */: + case 207 /* ImportType */: return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : void 0; case 94 /* ExportKeyword */: return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0; case 101 /* ImportKeyword */: case 104 /* NewKeyword */: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return checkExpression(node).symbol; default: return void 0; @@ -76840,7 +77015,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return void 0; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 306 /* ShorthandPropertyAssignment */) { + if (location && location.kind === 309 /* ShorthandPropertyAssignment */) { return resolveEntityName(location.name, 111551 /* Value */ | 2097152 /* Alias */, true); } return void 0; @@ -76925,16 +77100,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getTypeOfNode(node); } function getTypeOfAssignmentPattern(expr) { - Debug.assert(expr.kind === 210 /* ObjectLiteralExpression */ || expr.kind === 209 /* ArrayLiteralExpression */); - if (expr.parent.kind === 251 /* ForOfStatement */) { + Debug.assert(expr.kind === 212 /* ObjectLiteralExpression */ || expr.kind === 211 /* ArrayLiteralExpression */); + if (expr.parent.kind === 253 /* ForOfStatement */) { const iteratedType = checkRightHandSideOfForOf(expr.parent); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 227 /* BinaryExpression */) { + if (expr.parent.kind === 229 /* BinaryExpression */) { const iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 305 /* PropertyAssignment */) { + if (expr.parent.kind === 308 /* PropertyAssignment */) { const node2 = cast(expr.parent.parent, isObjectLiteralExpression); const typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node2) || errorType; const propertyIndex = indexOfNode(node2.properties, expr.parent); @@ -76967,7 +77142,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 8 /* NumericLiteral */: case 10 /* StringLiteral */: return getStringLiteralType(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: const nameType = checkComputedPropertyName(name); return isTypeAssignableToKind(nameType, 12288 /* ESSymbolLike */) ? nameType : stringType; default: @@ -77058,7 +77233,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 314 /* SourceFile */) { + if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 317 /* SourceFile */) { const symbolFile = parentSymbol.valueDeclaration; const referenceFile = getSourceFileOfNode(node); const symbolIsUmdExport = symbolFile !== referenceFile; @@ -77083,7 +77258,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return void 0; } function isSymbolOfDestructuredElementOfCatchBinding(symbol) { - return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 301 /* CatchClause */; + return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 304 /* CatchClause */; } function isSymbolOfDeclarationWithCollidingName(symbol) { if (symbol.flags & 418 /* BlockScoped */ && symbol.valueDeclaration && !isSourceFile(symbol.valueDeclaration)) { @@ -77097,7 +77272,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else if (nodeLinks2.flags & 262144 /* CapturedBlockScopedBinding */) { const isDeclaredInLoop = nodeLinks2.flags & 524288 /* BlockScopedBindingInLoop */; const inLoopInitializer = isIterationStatement(container, false); - const inLoopBodyBlock = container.kind === 242 /* Block */ && isIterationStatement(container.parent, false); + const inLoopBodyBlock = container.kind === 244 /* Block */ && isIterationStatement(container.parent, false); links.isDeclarationWithCollidingName = !isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || !inLoopInitializer && !inLoopBodyBlock); } else { links.isDeclarationWithCollidingName = false; @@ -77132,25 +77307,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isValueAliasDeclaration(node) { switch (node.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return isAliasResolvedToValue(getSymbolOfNode(node)); - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: const symbol = getSymbolOfNode(node); return !!symbol && isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: const exportClause = node.exportClause; return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration)); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return node.expression && node.expression.kind === 79 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfNode(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(nodeIn) { const node = getParseTreeNode(nodeIn, isImportEqualsDeclaration); - if (node === void 0 || node.parent.kind !== 314 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { + if (node === void 0 || node.parent.kind !== 317 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { return false; } const isValue = isAliasResolvedToValue(getSymbolOfNode(node)); @@ -77239,15 +77414,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function canHaveConstantValue(node) { switch (node.kind) { - case 308 /* EnumMember */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 311 /* EnumMember */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return true; } return false; } function getConstantValue2(node) { - if (node.kind === 308 /* EnumMember */) { + if (node.kind === 311 /* EnumMember */) { return getEnumMemberValue(node); } const symbol = getNodeLinks(node).resolvedSymbol; @@ -77445,7 +77620,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: ident = node.expression; break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: ident = node.expression; break; default: @@ -77552,12 +77727,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { getJsxFragmentFactoryEntity, getAllAccessorDeclarations(accessor) { accessor = getParseTreeNode(accessor, isGetOrSetAccessorDeclaration); - const otherKind = accessor.kind === 178 /* SetAccessor */ ? 177 /* GetAccessor */ : 178 /* SetAccessor */; + const otherKind = accessor.kind === 180 /* SetAccessor */ ? 179 /* GetAccessor */ : 180 /* SetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfNode(accessor), otherKind); const firstAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? otherAccessor : accessor; const secondAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? accessor : otherAccessor; - const setAccessor = accessor.kind === 178 /* SetAccessor */ ? accessor : otherAccessor; - const getAccessor = accessor.kind === 177 /* GetAccessor */ ? accessor : otherAccessor; + const setAccessor = accessor.kind === 180 /* SetAccessor */ ? accessor : otherAccessor; + const getAccessor = accessor.kind === 179 /* GetAccessor */ ? accessor : otherAccessor; return { firstAccessor, secondAccessor, @@ -77573,7 +77748,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }, getDeclarationStatementsForSourceFile: (node, flags, tracker, bundled) => { const n = getParseTreeNode(node); - Debug.assert(n && n.kind === 314 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); + Debug.assert(n && n.kind === 317 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); const sym = getSymbolOfNode(node); if (!sym) { return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled); @@ -77685,18 +77860,18 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function isInHeritageClause(node) { - return node.parent && node.parent.kind === 234 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 300 /* HeritageClause */; + return node.parent && node.parent.kind === 236 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 303 /* HeritageClause */; } function getTypeReferenceDirectivesForEntityName(node) { if (!fileToDirective) { return void 0; } let meaning; - if (node.parent.kind === 166 /* ComputedPropertyName */) { + if (node.parent.kind === 167 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } else { meaning = 788968 /* Type */ | 1920 /* Namespace */; - if (node.kind === 79 /* Identifier */ && isInTypeQuery(node) || node.kind === 211 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { + if (node.kind === 79 /* Identifier */ && isInTypeQuery(node) || node.kind === 213 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } } @@ -77734,7 +77909,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 314 /* SourceFile */ && current.flags & 512 /* ValueModule */) { + if (current.valueDeclaration && current.valueDeclaration.kind === 317 /* SourceFile */ && current.flags & 512 /* ValueModule */) { return false; } for (const decl of symbol.declarations) { @@ -77759,12 +77934,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getExternalModuleFileFromDeclaration(declaration) { - const specifier = declaration.kind === 270 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); + const specifier = declaration.kind === 273 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); const moduleSymbol = resolveExternalModuleNameWorker(specifier, specifier, void 0); if (!moduleSymbol) { return void 0; } - return getDeclarationOfKind(moduleSymbol, 314 /* SourceFile */); + return getDeclarationOfKind(moduleSymbol, 317 /* SourceFile */); } function initializeTypeChecker() { for (const file of host.getSourceFiles()) { @@ -77993,7 +78168,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; } if (!nodeCanBeDecorated(node, node.parent, node.parent.parent, compilerOptions)) { - const isMethodDeclarationAndNodeIsNotPresent = node.kind === 174 /* MethodDeclaration */ && !nodeIsPresent(node.body); + const isMethodDeclarationAndNodeIsNotPresent = node.kind === 176 /* MethodDeclaration */ && !nodeIsPresent(node.body); const message = isMethodDeclarationAndNodeIsNotPresent ? Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload : Diagnostics.Decorators_are_not_valid_here; for (const decorator of decorators) { if (!grammarErrorOnNode(decorator, message)) { @@ -78001,7 +78176,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } return true; - } else if (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */) { + } else if (node.kind === 179 /* GetAccessor */ || node.kind === 180 /* 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); @@ -78021,21 +78196,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue; } if (modifier.kind !== 147 /* ReadonlyKeyword */) { - if (node.kind === 170 /* PropertySignature */ || node.kind === 173 /* MethodSignature */) { + if (node.kind === 171 /* PropertySignature */ || node.kind === 175 /* MethodSignature */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_member, tokenToString(modifier.kind)); } - if (node.kind === 181 /* IndexSignature */ && (modifier.kind !== 125 /* StaticKeyword */ || !isClassLike(node.parent))) { + if (node.kind === 183 /* 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 !== 102 /* InKeyword */ && modifier.kind !== 146 /* OutKeyword */) { - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_parameter, tokenToString(modifier.kind)); } } switch (modifier.kind) { case 86 /* ConstKeyword */: - if (node.kind !== 269 /* EnumDeclaration */) { + if (node.kind !== 272 /* EnumDeclaration */) { return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(86 /* ConstKeyword */)); } break; @@ -78070,7 +78245,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 271 /* ModuleBlock */ || node.parent.kind === 314 /* SourceFile */) { + } else if (node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 317 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 256 /* Abstract */) { if (modifier.kind === 122 /* PrivateKeyword */) { @@ -78092,9 +78267,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 271 /* ModuleBlock */ || node.parent.kind === 314 /* SourceFile */) { + } else if (node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 317 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* 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"); @@ -78111,7 +78286,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 171 /* PropertyDeclaration */) { + } else if (node.kind !== 172 /* PropertyDeclaration */) { return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); } flags |= 128 /* Accessor */; @@ -78119,7 +78294,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 147 /* ReadonlyKeyword */: if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); - } else if (node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 170 /* PropertySignature */ && node.kind !== 181 /* IndexSignature */ && node.kind !== 168 /* Parameter */) { + } else if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 183 /* IndexSignature */ && node.kind !== 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } flags |= 64 /* Readonly */; @@ -78135,14 +78310,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 1 /* Export */; break; case 89 /* DefaultKeyword */: - const container = node.parent.kind === 314 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 270 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 317 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 273 /* 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"); @@ -78158,9 +78333,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); - } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 271 /* ModuleBlock */) { + } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 274 /* 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"); @@ -78172,11 +78347,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 264 /* ClassDeclaration */ && node.kind !== 185 /* ConstructorType */) { - if (node.kind !== 174 /* MethodDeclaration */ && node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 177 /* GetAccessor */ && node.kind !== 178 /* SetAccessor */) { + if (node.kind !== 266 /* ClassDeclaration */ && node.kind !== 187 /* ConstructorType */) { + if (node.kind !== 176 /* MethodDeclaration */ && node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 179 /* GetAccessor */ && node.kind !== 180 /* SetAccessor */) { return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 264 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { + if (!(node.parent.kind === 266 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { return grammarErrorOnNode(modifier, Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 32 /* Static */) { @@ -78205,7 +78380,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } if (flags & 256 /* Abstract */) { @@ -78218,7 +78393,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 146 /* OutKeyword */: const inOutFlag = modifier.kind === 102 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; const inOutText = modifier.kind === 102 /* InKeyword */ ? "in" : "out"; - if (node.kind !== 167 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { + if (node.kind !== 168 /* 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) { @@ -78231,7 +78406,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { break; } } - if (node.kind === 176 /* Constructor */) { + if (node.kind === 178 /* Constructor */) { if (flags & 32 /* Static */) { return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -78242,11 +78417,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } return false; - } else if ((node.kind === 275 /* ImportDeclaration */ || node.kind === 274 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + } else if ((node.kind === 278 /* ImportDeclaration */ || node.kind === 277 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 168 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { + } else if (node.kind === 169 /* 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 === 168 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { + } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 512 /* Async */) { @@ -78259,49 +78434,51 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function shouldReportBadModifier(node) { switch (node.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 270 /* ModuleDeclaration */: - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 168 /* Parameter */: - case 167 /* TypeParameter */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 178 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* OverloadPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 183 /* IndexSignature */: + case 273 /* ModuleDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 169 /* Parameter */: + case 168 /* TypeParameter */: return false; - case 175 /* ClassStaticBlockDeclaration */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 273 /* NamespaceExportDeclaration */: - case 184 /* FunctionType */: - case 285 /* MissingDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 276 /* NamespaceExportDeclaration */: + case 186 /* FunctionType */: + case 288 /* MissingDeclaration */: return true; default: - if (node.parent.kind === 271 /* ModuleBlock */ || node.parent.kind === 314 /* SourceFile */) { + if (node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 317 /* SourceFile */) { return false; } switch (node.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return nodeHasAnyModifiersExcept(node, 133 /* AsyncKeyword */); - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 185 /* ConstructorType */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 187 /* ConstructorType */: return nodeHasAnyModifiersExcept(node, 127 /* AbstractKeyword */); - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 244 /* VariableStatement */: - case 268 /* TypeAliasDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 246 /* VariableStatement */: + case 271 /* TypeAliasDeclaration */: return true; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return nodeHasAnyModifiersExcept(node, 86 /* ConstKeyword */); default: Debug.assertNever(node); @@ -78319,10 +78496,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return false; } return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -78535,11 +78712,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 166 /* ComputedPropertyName */) { + if (node.kind !== 167 /* ComputedPropertyName */) { return false; } const computedPropertyName = node; - if (computedPropertyName.expression.kind === 227 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 27 /* CommaToken */) { + if (computedPropertyName.expression.kind === 229 /* 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; @@ -78547,7 +78724,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkGrammarForGenerator(node) { if (node.asteriskToken) { Debug.assert( - node.kind === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */ || node.kind === 174 /* MethodDeclaration */ + node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */ || node.kind === 176 /* MethodDeclaration */ ); if (node.flags & 16777216 /* Ambient */) { return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_allowed_in_an_ambient_context); @@ -78566,7 +78743,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkGrammarObjectLiteralExpression(node, inDestructuring) { const seen = new Map2(); for (const prop of node.properties) { - if (prop.kind === 307 /* SpreadAssignment */) { + if (prop.kind === 310 /* SpreadAssignment */) { if (inDestructuring) { const expression = skipParentheses(prop.expression); if (isArrayLiteralExpression(expression) || isObjectLiteralExpression(expression)) { @@ -78576,10 +78753,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue; } const name = prop.name; - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { checkGrammarComputedPropertyName(name); } - if (prop.kind === 306 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 309 /* 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 */) { @@ -78587,7 +78764,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (canHaveModifiers(prop) && prop.modifiers) { for (const mod of prop.modifiers) { - if (isModifier(mod) && (mod.kind !== 133 /* AsyncKeyword */ || prop.kind !== 174 /* MethodDeclaration */)) { + if (isModifier(mod) && (mod.kind !== 133 /* AsyncKeyword */ || prop.kind !== 176 /* MethodDeclaration */)) { grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod)); } } @@ -78598,8 +78775,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let currentKind; switch (prop.kind) { - case 306 /* ShorthandPropertyAssignment */: - case 305 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 308 /* 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 */) { @@ -78607,13 +78784,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } currentKind = 4 /* PropertyAssignment */; break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: currentKind = 8 /* Method */; break; - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: currentKind = 1 /* GetAccessor */; break; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: currentKind = 2 /* SetAccessor */; break; default: @@ -78650,7 +78827,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkGrammarTypeArguments(node, node.typeArguments); const seen = new Map2(); for (const attr of node.attributes.properties) { - if (attr.kind === 296 /* JsxSpreadAttribute */) { + if (attr.kind === 299 /* JsxSpreadAttribute */) { continue; } const { name, initializer } = attr; @@ -78659,7 +78836,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { return grammarErrorOnNode(name, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } - if (initializer && initializer.kind === 297 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 300 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(initializer, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -78694,7 +78871,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 251 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { + if (forInOrOfStatement.kind === 253 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { if (!(forInOrOfStatement.flags & 32768 /* AwaitContext */)) { const sourceFile = getSourceFileOfNode(forInOrOfStatement); if (isInTopLevelContext(forInOrOfStatement)) { @@ -78734,7 +78911,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 176 /* Constructor */) { + if (func && func.kind !== 178 /* 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); @@ -78750,7 +78927,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { grammarErrorOnNode(forInOrOfStatement.initializer, Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async); return false; } - if (forInOrOfStatement.initializer.kind === 262 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 264 /* VariableDeclarationList */) { const variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { const declarations = variableList.declarations; @@ -78758,16 +78935,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } if (declarations.length > 1) { - const diagnostic = forInOrOfStatement.kind === 250 /* 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 === 252 /* 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 === 250 /* 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 === 252 /* 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 === 250 /* 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 === 252 /* 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); } } @@ -78775,7 +78952,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function checkGrammarAccessor(accessor) { - if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 187 /* TypeLiteral */ && accessor.parent.kind !== 267 /* InterfaceDeclaration */) { + if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 189 /* TypeLiteral */ && accessor.parent.kind !== 270 /* InterfaceDeclaration */) { if (languageVersion < 1 /* ES5 */) { return grammarErrorOnNode(accessor.name, Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); } @@ -78790,7 +78967,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (hasSyntacticModifier(accessor, 256 /* Abstract */)) { return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } - if (accessor.parent.kind === 187 /* TypeLiteral */ || accessor.parent.kind === 267 /* InterfaceDeclaration */) { + if (accessor.parent.kind === 189 /* TypeLiteral */ || accessor.parent.kind === 270 /* InterfaceDeclaration */) { return grammarErrorOnNode(accessor.body, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } } @@ -78800,10 +78977,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!doesAccessorHaveCorrectParameterCount(accessor)) { return grammarErrorOnNode( accessor.name, - accessor.kind === 177 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter + accessor.kind === 179 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter ); } - if (accessor.kind === 178 /* SetAccessor */) { + if (accessor.kind === 180 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -78821,10 +78998,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 179 /* GetAccessor */ ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 179 /* GetAccessor */ ? 1 : 2)) { return getThisParameter(accessor); } } @@ -78841,7 +79018,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } switch (parent.kind) { - case 261 /* VariableDeclaration */: + case 263 /* 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); @@ -78853,12 +79030,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return grammarErrorOnNode(parent.name, Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const); } break; - case 171 /* PropertyDeclaration */: + case 172 /* 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 170 /* PropertySignature */: + case 171 /* 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); } @@ -78867,7 +79044,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_not_allowed_here); } } else if (node.operator === 147 /* ReadonlyKeyword */) { - if (node.type.kind !== 188 /* ArrayType */ && node.type.kind !== 189 /* TupleType */) { + if (node.type.kind !== 190 /* ArrayType */ && node.type.kind !== 191 /* TupleType */) { return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(154 /* SymbolKeyword */)); } } @@ -78881,8 +79058,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (checkGrammarFunctionLikeDeclaration(node)) { return true; } - if (node.kind === 174 /* MethodDeclaration */) { - if (node.parent.kind === 210 /* ObjectLiteralExpression */) { + if (node.kind === 176 /* MethodDeclaration */) { + if (node.parent.kind === 212 /* 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)) { @@ -78903,12 +79080,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } 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 === 174 /* MethodDeclaration */ && !node.body) { + } else if (node.kind === 176 /* 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 === 267 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 270 /* 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 === 187 /* TypeLiteral */) { + } else if (node.parent.kind === 189 /* 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); } } @@ -78919,17 +79096,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: if (node.label && current.label.escapedText === node.label.escapedText) { - const isMisplacedContinueLabel = node.kind === 252 /* ContinueStatement */ && !isIterationStatement(current.statement, true); + const isMisplacedContinueLabel = node.kind === 254 /* ContinueStatement */ && !isIterationStatement(current.statement, true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); } return false; } break; - case 256 /* SwitchStatement */: - if (node.kind === 253 /* BreakStatement */ && !node.label) { + case 258 /* SwitchStatement */: + if (node.kind === 255 /* BreakStatement */ && !node.label) { return false; } break; @@ -78942,10 +79119,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { current = current.parent; } if (node.label) { - const message = node.kind === 253 /* 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 === 255 /* 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 === 253 /* 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 === 255 /* 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); } } @@ -78965,10 +79142,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function isStringOrNumberLiteralExpression(expr) { - return isStringOrNumericLiteralLike(expr) || expr.kind === 225 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; + return isStringOrNumericLiteralLike(expr) || expr.kind === 227 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; } function isBigIntLiteralExpression(expr) { - return expr.kind === 9 /* BigIntLiteral */ || expr.kind === 225 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 9 /* BigIntLiteral */; + return expr.kind === 9 /* BigIntLiteral */ || expr.kind === 227 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 9 /* BigIntLiteral */; } function isSimpleLiteralEnumReference(expr) { if ((isPropertyAccessExpression(expr) || isElementAccessExpression(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) { @@ -78990,7 +79167,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 250 /* ForInStatement */ && node.parent.parent.kind !== 251 /* ForOfStatement */) { + if (node.parent.parent.kind !== 252 /* ForInStatement */ && node.parent.parent.kind !== 253 /* ForOfStatement */) { if (node.flags & 16777216 /* Ambient */) { checkAmbientInitializer(node); } else if (!node.initializer) { @@ -79002,7 +79179,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - if (node.exclamationToken && (node.parent.parent.kind !== 244 /* VariableStatement */ || !node.type || node.initializer || node.flags & 16777216 /* Ambient */)) { + if (node.exclamationToken && (node.parent.parent.kind !== 246 /* 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); } @@ -79054,15 +79231,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { - case 246 /* IfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 255 /* WithStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 248 /* IfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 257 /* WithStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: return false; - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return allowLetAndConstDeclarations(parent.parent); } return true; @@ -79164,7 +79341,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) { return true; } - } else if (node.parent.kind === 267 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 270 /* 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; } @@ -79190,14 +79367,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 267 /* InterfaceDeclaration */ || node.kind === 268 /* TypeAliasDeclaration */ || node.kind === 275 /* ImportDeclaration */ || node.kind === 274 /* ImportEqualsDeclaration */ || node.kind === 281 /* ExportDeclaration */ || node.kind === 280 /* ExportAssignment */ || node.kind === 273 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { + if (node.kind === 270 /* InterfaceDeclaration */ || node.kind === 271 /* TypeAliasDeclaration */ || node.kind === 278 /* ImportDeclaration */ || node.kind === 277 /* ImportEqualsDeclaration */ || node.kind === 284 /* ExportDeclaration */ || node.kind === 283 /* ExportAssignment */ || node.kind === 276 /* 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 === 244 /* VariableStatement */) { + if (isDeclaration(decl) || decl.kind === 246 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -79214,7 +79391,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 242 /* Block */ || node.parent.kind === 271 /* ModuleBlock */ || node.parent.kind === 314 /* SourceFile */) { + if (node.parent.kind === 244 /* Block */ || node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 317 /* SourceFile */) { const links2 = getNodeLinks(node.parent); if (!links2.hasReportedStatementInAmbientContext) { return links2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -79229,9 +79406,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 201 /* LiteralType */)) { + } else if (isChildOfNodeWithKind(node, 203 /* LiteralType */)) { diagnosticMessage = Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0; - } else if (isChildOfNodeWithKind(node, 308 /* EnumMember */)) { + } else if (isChildOfNodeWithKind(node, 311 /* EnumMember */)) { diagnosticMessage = Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0; } if (diagnosticMessage) { @@ -79291,7 +79468,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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) === 278 /* NamedImports */) { + if (node.isTypeOnly && ((_a2 = node.namedBindings) == null ? void 0 : _a2.kind) === 281 /* NamedImports */) { return checkGrammarNamedImportsOrExports(node.namedBindings); } return false; @@ -79301,7 +79478,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (specifier.isTypeOnly) { return grammarErrorOnFirstToken( specifier, - specifier.kind === 279 /* 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 === 282 /* 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 ); } }); @@ -79410,12 +79587,12 @@ function isNotAccessor(declaration) { return !isAccessor(declaration); } function isNotOverload(declaration) { - return declaration.kind !== 263 /* FunctionDeclaration */ && declaration.kind !== 174 /* MethodDeclaration */ || !!declaration.body; + return declaration.kind !== 265 /* FunctionDeclaration */ && declaration.kind !== 176 /* MethodDeclaration */ || !!declaration.body; } function isDeclarationNameOrImportPropertyName(name) { switch (name.parent.kind) { - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return isIdentifier(name); default: return isDeclarationName(name); @@ -79693,20 +79870,20 @@ var visitEachChildTable = { nodesVisitor(node.typeArguments, visitor, isTypeNodeOrTypeParameterDeclaration) ); }, - [165 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [166 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateQualifiedName( node, nodeVisitor(node.left, visitor, isEntityName), nodeVisitor(node.right, visitor, isIdentifier) ); }, - [166 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [167 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateComputedPropertyName( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [167 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [168 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -79715,7 +79892,7 @@ var visitEachChildTable = { nodeVisitor(node.default, visitor, isTypeNode) ); }, - [168 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [169 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -79726,14 +79903,14 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [169 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [170 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDecorator( node, nodeVisitor(node.expression, visitor, isExpression), node.annotationDeclaration ); }, - [170 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [171 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertySignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -79742,7 +79919,16 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [171 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [174 /* OverloadPropertyDeclaration */]: function visitEachChildOfOverloadPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + return context.factory.updateOverloadPropertyDeclaration( + node, + nodesVisitor(node.modifiers, visitor, isModifier), + nodeVisitor(node.name, visitor, isPropertyName), + nodeVisitor(node.questionToken, tokenVisitor, isToken), + nodeVisitor(node.type, visitor, isTypeNode) + ); + }, + [172 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { var _a2; return context.factory.updatePropertyDeclaration( node, @@ -79753,7 +79939,7 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [172 /* AnnotationPropertyDeclaration */]: function visitEachChildOfAnnotationPropertyDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [173 /* AnnotationPropertyDeclaration */]: function visitEachChildOfAnnotationPropertyDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAnnotationPropertyDeclaration( node, nodeVisitor(node.name, visitor, isPropertyName), @@ -79761,7 +79947,7 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [173 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [175 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -79772,7 +79958,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [174 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [176 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -79785,7 +79971,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [176 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [178 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -79793,7 +79979,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [177 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [179 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { if (context.isLexicalEnvironmentSuspended && context.isLexicalEnvironmentSuspended()) { return context.factory.updateGetAccessorDeclaration( node, @@ -79814,7 +80000,7 @@ var visitEachChildTable = { ); } }, - [178 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [180 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { if (context.isLexicalEnvironmentSuspended && context.isLexicalEnvironmentSuspended()) { return context.factory.updateSetAccessorDeclaration( node, @@ -79833,7 +80019,7 @@ var visitEachChildTable = { ); } }, - [175 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [177 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { context.startLexicalEnvironment(); context.suspendLexicalEnvironment(); return context.factory.updateClassStaticBlockDeclaration( @@ -79841,7 +80027,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [179 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [181 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCallSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -79849,7 +80035,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [180 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [182 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -79857,7 +80043,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [181 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [183 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -79865,7 +80051,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [182 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [184 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypePredicateNode( node, nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), @@ -79873,14 +80059,14 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [183 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [185 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeReferenceNode( node, nodeVisitor(node.typeName, visitor, isEntityName), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [184 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [186 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateFunctionTypeNode( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -79888,7 +80074,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [185 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [187 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorTypeNode( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -79897,56 +80083,56 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [186 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [188 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeQueryNode( node, nodeVisitor(node.exprName, visitor, isEntityName), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [187 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [189 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTypeLiteralNode( node, nodesVisitor(node.members, visitor, isTypeElement) ); }, - [188 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [190 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateArrayTypeNode( node, nodeVisitor(node.elementType, visitor, isTypeNode) ); }, - [189 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [191 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTupleTypeNode( node, nodesVisitor(node.elements, visitor, isTypeNode) ); }, - [190 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [192 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateOptionalTypeNode( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [191 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [193 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateRestTypeNode( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [192 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [194 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateUnionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [193 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [195 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateIntersectionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [194 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [196 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConditionalTypeNode( node, nodeVisitor(node.checkType, visitor, isTypeNode), @@ -79955,13 +80141,13 @@ var visitEachChildTable = { nodeVisitor(node.falseType, visitor, isTypeNode) ); }, - [195 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [197 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInferTypeNode( node, nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration) ); }, - [205 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [207 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeNode( node, nodeVisitor(node.argument, visitor, isTypeNode), @@ -79971,14 +80157,14 @@ var visitEachChildTable = { node.isTypeOf ); }, - [304 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [307 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeAssertionContainer( node, nodeVisitor(node.assertClause, visitor, isAssertClause), node.multiLine ); }, - [202 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [204 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateNamedTupleMember( node, nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken), @@ -79987,26 +80173,26 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [196 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [198 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedType( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [198 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [200 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOperatorNode( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [199 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [201 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexedAccessTypeNode( node, nodeVisitor(node.objectType, visitor, isTypeNode), nodeVisitor(node.indexType, visitor, isTypeNode) ); }, - [200 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [202 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMappedTypeNode( node, nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken), @@ -80017,39 +80203,39 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [201 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [203 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLiteralTypeNode( node, nodeVisitor(node.literal, visitor, isExpression) ); }, - [203 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [205 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralType( node, nodeVisitor(node.head, visitor, isTemplateHead), nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) ); }, - [204 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [206 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralTypeSpan( node, nodeVisitor(node.type, visitor, isTypeNode), nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail) ); }, - [206 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [208 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectBindingPattern( node, nodesVisitor(node.elements, visitor, isBindingElement) ); }, - [207 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [209 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayBindingPattern( node, nodesVisitor(node.elements, visitor, isArrayBindingElement) ); }, - [208 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [210 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBindingElement( node, nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken), @@ -80058,19 +80244,19 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [209 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [211 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayLiteralExpression( node, nodesVisitor(node.elements, visitor, isExpression) ); }, - [210 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [212 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectLiteralExpression( node, nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) ); }, - [211 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [213 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( node, nodeVisitor(node.expression, visitor, isExpression), @@ -80082,7 +80268,7 @@ var visitEachChildTable = { nodeVisitor(node.name, visitor, isMemberName) ); }, - [212 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [214 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isElementAccessChain(node) ? context.factory.updateElementAccessChain( node, nodeVisitor(node.expression, visitor, isExpression), @@ -80094,7 +80280,7 @@ var visitEachChildTable = { nodeVisitor(node.argumentExpression, visitor, isExpression) ); }, - [213 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [215 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return isCallChain(node) ? context.factory.updateCallChain( node, nodeVisitor(node.expression, visitor, isExpression), @@ -80108,7 +80294,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [220 /* EtsComponentExpression */]: function visitEachChildOfEtsComponentExpression(node, visitor, context, nodesVisitor, nodeVisitor) { + [222 /* EtsComponentExpression */]: function visitEachChildOfEtsComponentExpression(node, visitor, context, nodesVisitor, nodeVisitor) { return context.factory.updateEtsComponentExpression( node, nodeVisitor(node.expression, visitor, isExpression), @@ -80116,7 +80302,7 @@ var visitEachChildTable = { nodeVisitor(node.body, visitor, isBlock) ); }, - [214 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [216 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNewExpression( node, nodeVisitor(node.expression, visitor, isExpression), @@ -80124,7 +80310,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [215 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [217 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTaggedTemplateExpression( node, nodeVisitor(node.tag, visitor, isExpression), @@ -80132,20 +80318,20 @@ var visitEachChildTable = { nodeVisitor(node.template, visitor, isTemplateLiteral) ); }, - [216 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [218 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAssertion( node, nodeVisitor(node.type, visitor, isTypeNode), nodeVisitor(node.expression, visitor, isExpression) ); }, - [217 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [219 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [218 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [220 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionExpression( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -80157,7 +80343,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [219 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [221 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateArrowFunction( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -80168,43 +80354,43 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [221 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [223 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDeleteExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [222 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [224 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOfExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [223 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [225 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVoidExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [224 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [226 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAwaitExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [225 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [227 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePrefixUnaryExpression( node, nodeVisitor(node.operand, visitor, isExpression) ); }, - [226 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [228 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePostfixUnaryExpression( node, nodeVisitor(node.operand, visitor, isExpression) ); }, - [227 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [229 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBinaryExpression( node, nodeVisitor(node.left, visitor, isExpression), @@ -80212,7 +80398,7 @@ var visitEachChildTable = { nodeVisitor(node.right, visitor, isExpression) ); }, - [228 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [230 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateConditionalExpression( node, nodeVisitor(node.condition, visitor, isExpression), @@ -80222,27 +80408,27 @@ var visitEachChildTable = { nodeVisitor(node.whenFalse, visitor, isExpression) ); }, - [229 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [231 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateExpression( node, nodeVisitor(node.head, visitor, isTemplateHead), nodesVisitor(node.templateSpans, visitor, isTemplateSpan) ); }, - [230 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [232 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateYieldExpression( node, nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken), nodeVisitor(node.expression, visitor, isExpression) ); }, - [231 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [233 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadElement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [232 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [234 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -80252,28 +80438,28 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [234 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [236 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionWithTypeArguments( node, nodeVisitor(node.expression, visitor, isExpression), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [235 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [237 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAsExpression( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.type, visitor, isTypeNode) ); }, - [239 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [241 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSatisfiesExpression( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.type, visitor, isTypeNode) ); }, - [236 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [238 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return isOptionalChain(node) ? context.factory.updateNonNullChain( node, nodeVisitor(node.expression, visitor, isExpression) @@ -80282,39 +80468,39 @@ var visitEachChildTable = { nodeVisitor(node.expression, visitor, isExpression) ); }, - [237 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [239 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [240 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [242 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateSpan( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail) ); }, - [242 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [244 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [244 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [246 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVariableStatement( node, nodesVisitor(node.modifiers, visitor, isModifier), nodeVisitor(node.declarationList, visitor, isVariableDeclarationList) ); }, - [245 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [247 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [246 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [248 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIfStatement( node, nodeVisitor(node.expression, visitor, isExpression), @@ -80322,21 +80508,21 @@ var visitEachChildTable = { nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) ); }, - [247 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [249 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDoStatement( node, visitIterationBody(node.statement, visitor, context, nodeVisitor), nodeVisitor(node.expression, visitor, isExpression) ); }, - [248 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [250 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWhileStatement( node, nodeVisitor(node.expression, visitor, isExpression), visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [249 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [251 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -80345,7 +80531,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [250 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [252 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForInStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -80353,7 +80539,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [251 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [253 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateForOfStatement( node, nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword), @@ -80362,52 +80548,52 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [252 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [254 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [253 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [255 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [254 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [256 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateReturnStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [255 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [257 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWithStatement( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock) ); }, - [256 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [258 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSwitchStatement( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.caseBlock, visitor, isCaseBlock) ); }, - [257 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [259 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, nodeVisitor(node.label, visitor, isIdentifier), nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock) ); }, - [258 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [260 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateThrowStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [259 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [261 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, nodeVisitor(node.tryBlock, visitor, isBlock), @@ -80415,7 +80601,7 @@ var visitEachChildTable = { nodeVisitor(node.finallyBlock, visitor, isBlock) ); }, - [261 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [263 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateVariableDeclaration( node, nodeVisitor(node.name, visitor, isBindingName), @@ -80424,13 +80610,13 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [262 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [264 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateVariableDeclarationList( node, nodesVisitor(node.declarations, visitor, isVariableDeclaration) ); }, - [263 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [265 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -80442,7 +80628,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [264 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [266 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -80452,7 +80638,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [265 /* StructDeclaration */]: function visitEachChildOfStructDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [267 /* StructDeclaration */]: function visitEachChildOfStructDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateStructDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -80462,7 +80648,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [266 /* AnnotationDeclaration */]: function visitEachChildOfAnnotationDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [268 /* AnnotationDeclaration */]: function visitEachChildOfAnnotationDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAnnotationDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -80470,7 +80656,15 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isAnnotationElement) ); }, - [267 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [269 /* OverloadDeclaration */]: function visitEachChildOfOverloadDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + return context.factory.updateOverloadDeclaration( + node, + nodesVisitor(node.modifiers, visitor, isModifier), + nodeVisitor(node.name, visitor, isIdentifier), + nodesVisitor(node.members, visitor, isOverloadElement) + ); + }, + [270 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -80480,7 +80674,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [268 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [271 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -80489,7 +80683,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [269 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [272 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -80497,7 +80691,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isEnumMember) ); }, - [270 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [273 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateModuleDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -80505,25 +80699,25 @@ var visitEachChildTable = { nodeVisitor(node.body, visitor, isModuleBody) ); }, - [271 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [274 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateModuleBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [272 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [275 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCaseBlock( node, nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) ); }, - [273 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [276 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [274 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [277 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportEqualsDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -80532,7 +80726,7 @@ var visitEachChildTable = { nodeVisitor(node.moduleReference, visitor, isModuleReference) ); }, - [275 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [278 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -80541,21 +80735,21 @@ var visitEachChildTable = { nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [302 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [305 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateAssertClause( node, nodesVisitor(node.elements, visitor, isAssertEntry), node.multiLine ); }, - [303 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [306 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAssertEntry( node, nodeVisitor(node.name, visitor, isAssertionKey), nodeVisitor(node.value, visitor, isExpression) ); }, - [276 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [279 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, node.isTypeOnly, @@ -80563,25 +80757,25 @@ var visitEachChildTable = { nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, - [277 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [280 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [283 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [286 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [278 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [281 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedImports( node, nodesVisitor(node.elements, visitor, isImportSpecifier) ); }, - [279 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [282 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportSpecifier( node, node.isTypeOnly, @@ -80589,14 +80783,14 @@ var visitEachChildTable = { nodeVisitor(node.name, visitor, isIdentifier) ); }, - [280 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [283 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportAssignment( node, nodesVisitor(node.modifiers, visitor, isModifier), nodeVisitor(node.expression, visitor, isExpression) ); }, - [281 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [284 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -80606,13 +80800,13 @@ var visitEachChildTable = { nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [282 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [285 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedExports( node, nodesVisitor(node.elements, visitor, isExportSpecifier) ); }, - [284 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [287 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportSpecifier( node, node.isTypeOnly, @@ -80620,13 +80814,13 @@ var visitEachChildTable = { nodeVisitor(node.name, visitor, isIdentifier) ); }, - [286 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [289 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExternalModuleReference( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [287 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [290 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxElement( node, nodeVisitor(node.openingElement, visitor, isJsxOpeningElement), @@ -80634,7 +80828,7 @@ var visitEachChildTable = { nodeVisitor(node.closingElement, visitor, isJsxClosingElement) ); }, - [288 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [291 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSelfClosingElement( node, nodeVisitor(node.tagName, visitor, isJsxTagNameExpression), @@ -80642,7 +80836,7 @@ var visitEachChildTable = { nodeVisitor(node.attributes, visitor, isJsxAttributes) ); }, - [289 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [292 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxOpeningElement( node, nodeVisitor(node.tagName, visitor, isJsxTagNameExpression), @@ -80650,13 +80844,13 @@ var visitEachChildTable = { nodeVisitor(node.attributes, visitor, isJsxAttributes) ); }, - [290 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [293 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxClosingElement( node, nodeVisitor(node.tagName, visitor, isJsxTagNameExpression) ); }, - [291 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [294 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxFragment( node, nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment), @@ -80664,97 +80858,97 @@ var visitEachChildTable = { nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment) ); }, - [294 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [297 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttribute( node, nodeVisitor(node.name, visitor, isIdentifier), nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) ); }, - [295 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [298 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttributes( node, nodesVisitor(node.properties, visitor, isJsxAttributeLike) ); }, - [296 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [299 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSpreadAttribute( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [297 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [300 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [298 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [301 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCaseClause( node, nodeVisitor(node.expression, visitor, isExpression), nodesVisitor(node.statements, visitor, isStatement) ); }, - [299 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [302 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateDefaultClause( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [300 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [303 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateHeritageClause( node, nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) ); }, - [301 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [304 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), nodeVisitor(node.block, visitor, isBlock) ); }, - [305 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [308 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePropertyAssignment( node, nodeVisitor(node.name, visitor, isPropertyName), nodeVisitor(node.initializer, visitor, isExpression) ); }, - [306 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [309 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, nodeVisitor(node.name, visitor, isIdentifier), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, - [307 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [310 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadAssignment( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [308 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [311 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumMember( node, nodeVisitor(node.name, visitor, isPropertyName), nodeVisitor(node.initializer, visitor, isExpression) ); }, - [314 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { + [317 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile( node, visitLexicalEnvironment(node.statements, visitor, context) ); }, - [359 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [362 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePartiallyEmittedExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [360 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [363 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCommaListExpression( node, nodesVisitor(node.elements, visitor, isExpression) @@ -81328,7 +81522,7 @@ function isNamedDefaultReference(e) { function chainBundle(context, transformSourceFile) { return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - return node.kind === 314 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 317 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -81371,7 +81565,7 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption let hasImportDefault = false; for (const node of sourceFile.statements) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: externalImports.push(node); if (!hasImportStar && getImportNeedsImportStarHelper(node)) { hasImportStar = true; @@ -81380,12 +81574,12 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption hasImportDefault = true; } break; - case 274 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 286 /* ExternalModuleReference */) { + case 277 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 289 /* ExternalModuleReference */) { externalImports.push(node); } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { externalImports.push(node); @@ -81408,19 +81602,19 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption addExportedNamesForExportDeclaration(node); } break; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { exportEquals = node; } break; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: if (hasSyntacticModifier(node, 1 /* Export */)) { for (const decl of node.declarationList.declarations) { exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames); } } break; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -81437,7 +81631,7 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption } } break; - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -81581,7 +81775,7 @@ function isStaticPropertyDeclaration(member) { return isPropertyDeclaration(member) && hasStaticModifier(member); } function isInitializedProperty(member) { - return member.kind === 171 /* PropertyDeclaration */ && member.initializer !== void 0; + return member.kind === 172 /* PropertyDeclaration */ && member.initializer !== void 0; } function isNonStaticMethodOrAccessorWithPrivateName(member) { return !isStatic(member) && (isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member)) && isPrivateIdentifier(member.name); @@ -81618,12 +81812,12 @@ function getAllDecoratorsOfClass(node) { } function getAllDecoratorsOfClassElement(member, parent) { switch (member.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return getAllDecoratorsOfAccessors(member, parent); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return getAllDecoratorsOfMethod(member); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return getAllDecoratorsOfProperty(member); default: return void 0; @@ -82116,8 +82310,8 @@ function transformTypeScript(context) { const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); + context.enableSubstitution(213 /* PropertyAccessExpression */); + context.enableSubstitution(214 /* ElementAccessExpression */); let currentSourceFile; let currentNamespace; let currentNamespaceContainerName; @@ -82128,14 +82322,14 @@ function transformTypeScript(context) { let applicableSubstitutions; return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - if (node.kind === 315 /* Bundle */) { + if (node.kind === 318 /* Bundle */) { return transformBundle(node); } return transformSourceFile(node); } function transformBundle(node) { return factory2.createBundle(node.sourceFiles.map(transformSourceFile), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 317 /* InputFiles */) { + if (prepend.kind === 320 /* InputFiles */) { return createUnparsedSourceFile(prepend, "js"); } return prepend; @@ -82166,22 +82360,22 @@ function transformTypeScript(context) { } function onBeforeVisitNode(node) { switch (node.kind) { - case 314 /* SourceFile */: - case 272 /* CaseBlock */: - case 271 /* ModuleBlock */: - case 242 /* Block */: + case 317 /* SourceFile */: + case 275 /* CaseBlock */: + case 274 /* ModuleBlock */: + case 244 /* Block */: currentLexicalScope = node; currentScopeFirstDeclarationsOfName = void 0; break; - case 264 /* ClassDeclaration */: - case 263 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 265 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 2 /* Ambient */)) { break; } if (node.name) { recordEmittedDeclarationInScope(node); } else { - Debug.assert(node.kind === 264 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); + Debug.assert(node.kind === 266 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); } break; } @@ -82200,10 +82394,10 @@ function transformTypeScript(context) { } function sourceElementVisitorWorker(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 280 /* ExportAssignment */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 283 /* ExportAssignment */: + case 284 /* ExportDeclaration */: return visitElidableStatement(node); default: return visitorWorker(node); @@ -82221,13 +82415,13 @@ function transformTypeScript(context) { return node; } switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return visitImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return visitExportAssignment(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return visitExportDeclaration(node); default: Debug.fail("Unhandled ellided statement"); @@ -82237,7 +82431,7 @@ function transformTypeScript(context) { return saveStateAndInvoke(node, namespaceElementVisitorWorker); } function namespaceElementVisitorWorker(node) { - if (node.kind === 281 /* ExportDeclaration */ || node.kind === 275 /* ImportDeclaration */ || node.kind === 276 /* ImportClause */ || node.kind === 274 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 286 /* ExternalModuleReference */) { + if (node.kind === 284 /* ExportDeclaration */ || node.kind === 278 /* ImportDeclaration */ || node.kind === 279 /* ImportClause */ || node.kind === 277 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 289 /* ExternalModuleReference */) { return void 0; } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) { return visitTypeScript(node); @@ -82249,21 +82443,21 @@ function transformTypeScript(context) { } function classElementVisitorWorker(node, parent) { switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: return visitConstructor(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node, parent); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return visitGetAccessor(node, parent); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return visitSetAccessor(node, parent); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return visitMethodDeclaration(node, parent); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return visitEachChild(node, visitor, context); - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: return node; - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return; default: return Debug.failBadSyntaxKind(node); @@ -82274,15 +82468,15 @@ function transformTypeScript(context) { } function objectLiteralElementVisitorWorker(node, parent) { switch (node.kind) { - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 307 /* SpreadAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 310 /* SpreadAssignment */: return visitor(node); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return visitGetAccessor(node, parent); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return visitSetAccessor(node, parent); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return visitMethodDeclaration(node, parent); default: return Debug.failBadSyntaxKind(node); @@ -82317,13 +82511,13 @@ function transformTypeScript(context) { case 147 /* ReadonlyKeyword */: case 102 /* InKeyword */: case 146 /* OutKeyword */: - case 188 /* ArrayType */: - case 189 /* TupleType */: - case 190 /* OptionalType */: - case 191 /* RestType */: - case 187 /* TypeLiteral */: - case 182 /* TypePredicate */: - case 167 /* TypeParameter */: + case 190 /* ArrayType */: + case 191 /* TupleType */: + case 192 /* OptionalType */: + case 193 /* RestType */: + case 189 /* TypeLiteral */: + case 184 /* TypePredicate */: + case 168 /* TypeParameter */: case 132 /* AnyKeyword */: case 159 /* UnknownKeyword */: case 135 /* BooleanKeyword */: @@ -82332,83 +82526,86 @@ function transformTypeScript(context) { case 145 /* NeverKeyword */: case 115 /* VoidKeyword */: case 154 /* SymbolKeyword */: - case 185 /* ConstructorType */: - case 184 /* FunctionType */: - case 186 /* TypeQuery */: - case 183 /* TypeReference */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 194 /* ConditionalType */: - case 196 /* ParenthesizedType */: - case 197 /* ThisType */: - case 198 /* TypeOperator */: - case 199 /* IndexedAccessType */: - case 200 /* MappedType */: - case 201 /* LiteralType */: - case 181 /* IndexSignature */: + case 187 /* ConstructorType */: + case 186 /* FunctionType */: + case 188 /* TypeQuery */: + case 185 /* TypeReference */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: + case 196 /* ConditionalType */: + case 198 /* ParenthesizedType */: + case 199 /* ThisType */: + case 200 /* TypeOperator */: + case 201 /* IndexedAccessType */: + case 202 /* MappedType */: + case 203 /* LiteralType */: + case 183 /* IndexSignature */: return void 0; - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return factory2.createNotEmittedStatement(node); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return void 0; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return factory2.createNotEmittedStatement(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return visitClassExpression(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: + return factory2.createNotEmittedStatement(node); + case 269 /* OverloadDeclaration */: return factory2.createNotEmittedStatement(node); - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return visitHeritageClause(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArguments(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 176 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 177 /* ClassStaticBlockDeclaration */: return Debug.fail("Class and object literal elements must be visited with their respective visitors"); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return visitFunctionExpression(node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return visitArrowFunction(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node); - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: return visitAssertionExpression(node); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return visitSatisfiesExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return visitNewExpression(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return visitNonNullExpression(node); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return visitEnumDeclaration(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return visitModuleDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node); - case 289 /* JsxOpeningElement */: + case 292 /* JsxOpeningElement */: return visitJsxJsxOpeningElement(node); default: return visitEachChild(node, visitor, context); @@ -82640,19 +82837,19 @@ function transformTypeScript(context) { } function shouldAddTypeMetadata(node) { const kind = node.kind; - return kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 171 /* PropertyDeclaration */; + return kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 172 /* PropertyDeclaration */; } function shouldAddReturnTypeMetadata(node) { - return node.kind === 174 /* MethodDeclaration */; + return node.kind === 176 /* MethodDeclaration */; } function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return getFirstConstructorWithBody(node) !== void 0; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return true; } return false; @@ -83185,12 +83382,12 @@ function transformTypeScript(context) { factory2.createVariableDeclaration( factory2.getLocalName(node, false, true) ) - ], currentLexicalScope.kind === 314 /* SourceFile */ ? 0 /* None */ : 1 /* Let */) + ], currentLexicalScope.kind === 317 /* SourceFile */ ? 0 /* None */ : 1 /* Let */) ); setOriginalNode(statement, node); recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 269 /* EnumDeclaration */) { + if (node.kind === 272 /* EnumDeclaration */) { setSourceMapRange(statement.declarationList, node); } else { setSourceMapRange(statement, node); @@ -83272,7 +83469,7 @@ function transformTypeScript(context) { let statementsLocation; let blockLocation; if (node.body) { - if (node.body.kind === 271 /* ModuleBlock */) { + if (node.body.kind === 274 /* ModuleBlock */) { saveStateAndInvoke(node.body, (body) => addRange(statements, visitNodes2(body.statements, namespaceElementVisitor, isStatement))); statementsLocation = node.body.statements; blockLocation = node.body; @@ -83301,13 +83498,13 @@ function transformTypeScript(context) { true ); setTextRange(block, blockLocation); - if (!node.body || node.body.kind !== 271 /* ModuleBlock */) { + if (!node.body || node.body.kind !== 274 /* ModuleBlock */) { setEmitFlags(block, getEmitFlags(block) | 1536 /* NoComments */); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 270 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 273 /* ModuleDeclaration */) { const recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -83335,7 +83532,7 @@ function transformTypeScript(context) { return name || namedBindings ? factory2.updateImportClause(node, false, name, namedBindings) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 277 /* NamespaceImport */) { + if (node.kind === 280 /* NamespaceImport */) { return shouldEmitAliasDeclaration(node) ? node : void 0; } else { const allowEmpty = compilerOptions.preserveValueImports && (compilerOptions.importsNotUsedAsValues === 1 /* Preserve */ || compilerOptions.importsNotUsedAsValues === 2 /* Error */); @@ -83505,15 +83702,15 @@ function transformTypeScript(context) { if ((enabledSubstitutions & 2 /* NamespaceExports */) === 0) { enabledSubstitutions |= 2 /* NamespaceExports */; context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(306 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(270 /* ModuleDeclaration */); + context.enableSubstitution(309 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(273 /* ModuleDeclaration */); } } function isTransformedModuleDeclaration(node) { - return getOriginalNode(node).kind === 270 /* ModuleDeclaration */; + return getOriginalNode(node).kind === 273 /* ModuleDeclaration */; } function isTransformedEnumDeclaration(node) { - return getOriginalNode(node).kind === 269 /* EnumDeclaration */; + return getOriginalNode(node).kind === 272 /* EnumDeclaration */; } function onEmitNode(hint, node, emitCallback) { const savedApplicableSubstitutions = applicableSubstitutions; @@ -83558,9 +83755,9 @@ function transformTypeScript(context) { switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return substituteElementAccessExpression(node); } return node; @@ -83571,8 +83768,8 @@ function transformTypeScript(context) { function trySubstituteNamespaceExportedName(node) { if (enabledSubstitutions & applicableSubstitutions && !isGeneratedIdentifier(node) && !isLocalName(node)) { const container = resolver.getReferencedExportContainer(node, false); - if (container && container.kind !== 314 /* SourceFile */) { - const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 270 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 269 /* EnumDeclaration */; + if (container && container.kind !== 317 /* SourceFile */) { + const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 273 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 272 /* EnumDeclaration */; if (substitute) { return setTextRange( factory2.createPropertyAccessExpression(factory2.getGeneratedNameForNode(container), node), @@ -83687,45 +83884,49 @@ function transformClassFields(context) { switch (node.kind) { case 128 /* AccessorKeyword */: return shouldTransformAutoAccessors ? void 0 : node; - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return void 0; - case 232 /* ClassExpression */: + case 269 /* OverloadDeclaration */: + return void 0; + case 234 /* ClassExpression */: return visitClassExpression(node); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + return void 0; + case 174 /* OverloadPropertyDeclaration */: return void 0; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); case 80 /* PrivateIdentifier */: return visitPrivateIdentifier(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, false); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node, false); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitCallExpression(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node); - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: { + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: { return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( void 0, fallbackVisitor, @@ -83741,10 +83942,10 @@ function transformClassFields(context) { } function discardedValueVisitor(node) { switch (node.kind) { - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, true); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node, true); default: return visitor(node); @@ -83752,9 +83953,9 @@ function transformClassFields(context) { } function heritageClauseVisitor(node) { switch (node.kind) { - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return visitEachChild(node, heritageClauseVisitor, context); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArgumentsInHeritageClause(node); default: return visitor(node); @@ -83762,8 +83963,8 @@ function transformClassFields(context) { } function assignmentTargetVisitor(node) { switch (node.kind) { - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return visitAssignmentPattern(node); default: return visitor(node); @@ -83771,25 +83972,25 @@ function transformClassFields(context) { } function classElementVisitor(node) { switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: return visitConstructorDeclaration(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( void 0, visitMethodOrAccessorDeclaration, node ); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( void 0, visitPropertyDeclaration, node ); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: return node; default: return visitor(node); @@ -83797,10 +83998,10 @@ function transformClassFields(context) { } function accessorFieldResultVisitor(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return transformFieldInitializer(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return classElementVisitor(node); default: Debug.assertMissingNode(node, "Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration"); @@ -84884,14 +85085,14 @@ function transformClassFields(context) { if ((enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */) === 0) { enabledSubstitutions |= 2 /* ClassStaticThisOrSuperReference */; context.enableSubstitution(109 /* ThisKeyword */); - context.enableEmitNotification(263 /* FunctionDeclaration */); - context.enableEmitNotification(218 /* FunctionExpression */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(171 /* PropertyDeclaration */); - context.enableEmitNotification(166 /* ComputedPropertyName */); + context.enableEmitNotification(265 /* FunctionDeclaration */); + context.enableEmitNotification(220 /* FunctionExpression */); + context.enableEmitNotification(178 /* Constructor */); + context.enableEmitNotification(179 /* GetAccessor */); + context.enableEmitNotification(180 /* SetAccessor */); + context.enableEmitNotification(176 /* MethodDeclaration */); + context.enableEmitNotification(172 /* PropertyDeclaration */); + context.enableEmitNotification(167 /* ComputedPropertyName */); } } function addMethodStatements(statements, methods, receiver) { @@ -84933,12 +85134,12 @@ function transformClassFields(context) { } } switch (node.kind) { - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: if (isArrowFunction(original) || getEmitFlags(node) & 262144 /* AsyncFunctionBody */) { break; } - case 263 /* FunctionDeclaration */: - case 176 /* Constructor */: { + case 265 /* FunctionDeclaration */: + case 178 /* Constructor */: { const savedClassLexicalEnvironment = currentClassLexicalEnvironment; const savedCurrentComputedPropertyNameClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment; currentClassLexicalEnvironment = void 0; @@ -84948,10 +85149,10 @@ function transformClassFields(context) { currentComputedPropertyNameClassLexicalEnvironment = savedCurrentComputedPropertyNameClassLexicalEnvironment; return; } - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - case 171 /* PropertyDeclaration */: { + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { const savedClassLexicalEnvironment = currentClassLexicalEnvironment; const savedCurrentComputedPropertyNameClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment; currentComputedPropertyNameClassLexicalEnvironment = currentClassLexicalEnvironment; @@ -84961,7 +85162,7 @@ function transformClassFields(context) { currentComputedPropertyNameClassLexicalEnvironment = savedCurrentComputedPropertyNameClassLexicalEnvironment; return; } - case 166 /* ComputedPropertyName */: { + case 167 /* ComputedPropertyName */: { const savedClassLexicalEnvironment = currentClassLexicalEnvironment; const savedCurrentComputedPropertyNameClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment; currentClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment; @@ -85435,15 +85636,15 @@ function createRuntimeTypeSerializer(context) { } function serializeTypeOfNode(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: return serializeTypeNode(node.type); - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: + case 180 /* SetAccessor */: + case 179 /* GetAccessor */: return serializeTypeNode(getAccessorTypeNode(node)); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 174 /* MethodDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 176 /* MethodDeclaration */: return factory.createIdentifier("Function"); default: return factory.createVoidZero(); @@ -85470,7 +85671,7 @@ function createRuntimeTypeSerializer(context) { return factory.createArrayLiteralExpression(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 177 /* GetAccessor */) { + if (container && node.kind === 179 /* GetAccessor */) { const { setAccessor } = getAllAccessorDeclarations(container.members, node); if (setAccessor) { return setAccessor.parameters; @@ -85496,22 +85697,22 @@ function createRuntimeTypeSerializer(context) { case 157 /* UndefinedKeyword */: case 145 /* NeverKeyword */: return factory.createVoidZero(); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: return factory.createIdentifier("Function"); - case 188 /* ArrayType */: - case 189 /* TupleType */: + case 190 /* ArrayType */: + case 191 /* TupleType */: return factory.createIdentifier("Array"); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return node.assertsModifier ? factory.createVoidZero() : factory.createIdentifier("Boolean"); case 135 /* BooleanKeyword */: return factory.createIdentifier("Boolean"); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: case 153 /* StringKeyword */: return factory.createIdentifier("String"); case 150 /* ObjectKeyword */: return factory.createIdentifier("Object"); - case 201 /* LiteralType */: + case 203 /* LiteralType */: return serializeLiteralOfLiteralTypeNode(node.literal); case 149 /* NumberKeyword */: return factory.createIdentifier("Number"); @@ -85519,37 +85720,37 @@ function createRuntimeTypeSerializer(context) { return getGlobalConstructor("BigInt", 7 /* ES2020 */); case 154 /* SymbolKeyword */: return getGlobalConstructor("Symbol", 2 /* ES2015 */); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return serializeTypeReferenceNode(node); - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return serializeUnionOrIntersectionConstituents(node.types, true); - case 192 /* UnionType */: + case 194 /* UnionType */: return serializeUnionOrIntersectionConstituents(node.types, false); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return serializeUnionOrIntersectionConstituents([node.trueType, node.falseType], false); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: if (node.operator === 147 /* ReadonlyKeyword */) { return serializeTypeNode(node.type); } break; - case 186 /* TypeQuery */: - case 199 /* IndexedAccessType */: - case 200 /* MappedType */: - case 187 /* TypeLiteral */: + case 188 /* TypeQuery */: + case 201 /* IndexedAccessType */: + case 202 /* MappedType */: + case 189 /* TypeLiteral */: case 132 /* AnyKeyword */: case 159 /* UnknownKeyword */: - case 197 /* ThisType */: - case 205 /* ImportType */: + case 199 /* ThisType */: + case 207 /* ImportType */: break; - case 321 /* JSDocAllType */: - case 322 /* JSDocUnknownType */: - case 326 /* JSDocFunctionType */: - case 327 /* JSDocVariadicType */: - case 328 /* JSDocNamepathType */: + case 324 /* JSDocAllType */: + case 325 /* JSDocUnknownType */: + case 329 /* JSDocFunctionType */: + case 330 /* JSDocVariadicType */: + case 331 /* JSDocNamepathType */: break; - case 323 /* JSDocNullableType */: - case 324 /* JSDocNonNullableType */: - case 325 /* JSDocOptionalType */: + case 326 /* JSDocNullableType */: + case 327 /* JSDocNonNullableType */: + case 328 /* JSDocOptionalType */: return serializeTypeNode(node.type); default: return Debug.failBadSyntaxKind(node); @@ -85561,7 +85762,7 @@ function createRuntimeTypeSerializer(context) { case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return factory.createIdentifier("String"); - case 225 /* PrefixUnaryExpression */: { + case 227 /* PrefixUnaryExpression */: { const operand = node.operand; switch (operand.kind) { case 8 /* NumericLiteral */: @@ -85694,7 +85895,7 @@ function createRuntimeTypeSerializer(context) { name.original = void 0; setParent(name, getParseTreeNode(currentLexicalScope)); return name; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return serializeQualifiedNameAsExpression(node); } } @@ -85742,23 +85943,23 @@ function transformLegacyDecorators(context) { return node; } switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return void 0; - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return visitClassExpression(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return visitConstructorDeclaration(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameterDeclaration(node); default: return visitEachChild(node, visitor, context); @@ -86176,34 +86377,34 @@ function transformES2017(context) { switch (node.kind) { case 133 /* AsyncKeyword */: return void 0; - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return visitAwaitExpression(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitMethodDeclaration, node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionDeclaration, node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionExpression, node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return doWithContext(1 /* NonTopLevel */, visitArrowFunction, node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 107 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 107 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitGetAccessorDeclaration, node); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitSetAccessorDeclaration, node); - case 176 /* Constructor */: + case 178 /* Constructor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitConstructorDeclaration, node); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitDefault, node); default: return visitEachChild(node, visitor, context); @@ -86212,27 +86413,27 @@ function transformES2017(context) { function asyncBodyVisitor(node) { if (isNodeWithPossibleHoistedDeclaration(node)) { switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatementInAsyncBody(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatementInAsyncBody(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatementInAsyncBody(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatementInAsyncBody(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClauseInAsyncBody(node); - case 242 /* Block */: - case 256 /* SwitchStatement */: - case 272 /* CaseBlock */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 259 /* TryStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 246 /* IfStatement */: - case 255 /* WithStatement */: - case 257 /* LabeledStatement */: + case 244 /* Block */: + case 258 /* SwitchStatement */: + case 275 /* CaseBlock */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 261 /* TryStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 248 /* IfStatement */: + case 257 /* WithStatement */: + case 259 /* LabeledStatement */: return visitEachChild(node, asyncBodyVisitor, context); default: return Debug.assertNever(node, "Unhandled node."); @@ -86482,7 +86683,7 @@ function transformES2017(context) { const original = getOriginalNode(node, isFunctionLike); const nodeType = original.type; const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0; - const isArrowFunction2 = node.kind === 219 /* ArrowFunction */; + const isArrowFunction2 = node.kind === 221 /* ArrowFunction */; const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192 /* CaptureArguments */) !== 0; const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames; enclosingFunctionParameterNames = new Set2(); @@ -86571,15 +86772,15 @@ function transformES2017(context) { function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); - context.enableEmitNotification(264 /* ClassDeclaration */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(244 /* VariableStatement */); + context.enableSubstitution(215 /* CallExpression */); + context.enableSubstitution(213 /* PropertyAccessExpression */); + context.enableSubstitution(214 /* ElementAccessExpression */); + context.enableEmitNotification(266 /* ClassDeclaration */); + context.enableEmitNotification(176 /* MethodDeclaration */); + context.enableEmitNotification(179 /* GetAccessor */); + context.enableEmitNotification(180 /* SetAccessor */); + context.enableEmitNotification(178 /* Constructor */); + context.enableEmitNotification(246 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -86610,11 +86811,11 @@ function transformES2017(context) { } function substituteExpression(node) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -86657,7 +86858,7 @@ function transformES2017(context) { } function isSuperContainer(node) { const kind = node.kind; - return kind === 264 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 266 /* ClassDeclaration */ || kind === 178 /* Constructor */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 4096 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -86884,115 +87085,115 @@ function transformES2018(context) { return node; } switch (node.kind) { - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return visitAwaitExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return visitYieldExpression(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return visitReturnStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return visitLabeledStatement(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClause(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 250 /* ForInStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 252 /* ForInStatement */: return doWithHierarchyFacts( visitDefault, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatement(node, void 0); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return doWithHierarchyFacts( visitForStatement, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return visitVoidExpression(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return doWithHierarchyFacts( visitConstructorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return doWithHierarchyFacts( visitMethodDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return doWithHierarchyFacts( visitGetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return doWithHierarchyFacts( visitSetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return doWithHierarchyFacts( visitFunctionDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return doWithHierarchyFacts( visitFunctionExpression, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return doWithHierarchyFacts( visitArrowFunction, node, 2 /* ArrowFunctionExcludes */, 0 /* ArrowFunctionIncludes */ ); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 107 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 107 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return doWithHierarchyFacts( visitDefault, node, @@ -87070,7 +87271,7 @@ function transformES2018(context) { function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 /* Async */) { const statement = unwrapInnermostStatementOfLabel(node); - if (statement.kind === 251 /* ForOfStatement */ && statement.awaitModifier) { + if (statement.kind === 253 /* ForOfStatement */ && statement.awaitModifier) { return visitForOfStatement(statement, node); } return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node); @@ -87081,7 +87282,7 @@ function transformES2018(context) { let chunkObject; const objects = []; for (const e of elements) { - if (e.kind === 307 /* SpreadAssignment */) { + if (e.kind === 310 /* SpreadAssignment */) { if (chunkObject) { objects.push(factory2.createObjectLiteralExpression(chunkObject)); chunkObject = void 0; @@ -87089,7 +87290,7 @@ function transformES2018(context) { const target = e.expression; objects.push(visitNode(target, visitor, isExpression)); } else { - chunkObject = append(chunkObject, e.kind === 305 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); + chunkObject = append(chunkObject, e.kind === 308 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); } } if (chunkObject) { @@ -87100,7 +87301,7 @@ function transformES2018(context) { function visitObjectLiteralExpression(node) { if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { const objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 210 /* ObjectLiteralExpression */) { + if (objects.length && objects[0].kind !== 212 /* ObjectLiteralExpression */) { objects.unshift(factory2.createObjectLiteralExpression()); } let expression = objects[0]; @@ -87753,15 +87954,15 @@ function transformES2018(context) { function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); - context.enableEmitNotification(264 /* ClassDeclaration */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(244 /* VariableStatement */); + context.enableSubstitution(215 /* CallExpression */); + context.enableSubstitution(213 /* PropertyAccessExpression */); + context.enableSubstitution(214 /* ElementAccessExpression */); + context.enableEmitNotification(266 /* ClassDeclaration */); + context.enableEmitNotification(176 /* MethodDeclaration */); + context.enableEmitNotification(179 /* GetAccessor */); + context.enableEmitNotification(180 /* SetAccessor */); + context.enableEmitNotification(178 /* Constructor */); + context.enableEmitNotification(246 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -87792,11 +87993,11 @@ function transformES2018(context) { } function substituteExpression(node) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -87839,7 +88040,7 @@ function transformES2018(context) { } function isSuperContainer(node) { const kind = node.kind; - return kind === 264 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 266 /* ClassDeclaration */ || kind === 178 /* Constructor */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 4096 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -87882,7 +88083,7 @@ function transformES2019(context) { return node; } switch (node.kind) { - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClause(node); default: return visitEachChild(node, visitor, context); @@ -87918,25 +88119,25 @@ function transformES2020(context) { return node; } switch (node.kind) { - case 213 /* CallExpression */: { + case 215 /* CallExpression */: { const updated = visitNonOptionalCallExpression(node, false); Debug.assertNotNode(updated, isSyntheticReference); return updated; } - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: if (isOptionalChain(node)) { const updated = visitOptionalExpression(node, false, false); Debug.assertNotNode(updated, isSyntheticReference); return updated; } return visitEachChild(node, visitor, context); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (node.operatorToken.kind === 60 /* QuestionQuestionToken */) { return transformNullishCoalescingExpression(node); } return visitEachChild(node, visitor, context); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return visitDeleteExpression(node); default: return visitEachChild(node, visitor, context); @@ -87974,7 +88175,7 @@ function transformES2020(context) { thisArg = expression; } } - expression = node.kind === 211 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); + expression = node.kind === 213 /* 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) { @@ -87993,12 +88194,12 @@ function transformES2020(context) { } function visitNonOptionalExpression(node, captureThisArg, isDelete) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return visitNode(node, visitor, isExpression); @@ -88019,8 +88220,8 @@ function transformES2020(context) { for (let i = 0; i < chain.length; i++) { const segment = chain[i]; switch (segment.kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { if (!isSimpleCopiableExpression(rightExpression)) { thisArg = factory2.createTempVariable(hoistVariableDeclaration); @@ -88029,9 +88230,9 @@ function transformES2020(context) { thisArg = rightExpression; } } - rightExpression = segment.kind === 211 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); + rightExpression = segment.kind === 213 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (i === 0 && leftThisArg) { if (!isGeneratedIdentifier(leftThisArg)) { leftThisArg = factory2.cloneNode(leftThisArg); @@ -88110,7 +88311,7 @@ function transformES2021(context) { return node; } switch (node.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const binaryExpression = node; if (isLogicalOrCoalescingAssignmentExpression(binaryExpression)) { return transformLogicalAssignment(binaryExpression); @@ -88288,13 +88489,13 @@ function transformJsx(context) { } function visitorWorker(node) { switch (node.kind) { - case 287 /* JsxElement */: + case 290 /* JsxElement */: return visitJsxElement(node, false); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node, false); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return visitJsxFragment(node, false); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return visitJsxExpression(node); default: return visitEachChild(node, visitor, context); @@ -88304,13 +88505,13 @@ function transformJsx(context) { switch (node.kind) { case 11 /* JsxText */: return visitJsxText(node); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return visitJsxExpression(node); - case 287 /* JsxElement */: + case 290 /* JsxElement */: return visitJsxElement(node, true); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node, true); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return visitJsxFragment(node, true); default: return Debug.failBadSyntaxKind(node); @@ -88505,7 +88706,7 @@ function transformJsx(context) { const literal = factory2.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote); return setTextRange(literal, node); } - if (node.kind === 297 /* JsxExpression */) { + if (node.kind === 300 /* JsxExpression */) { if (node.expression === void 0) { return factory2.createTrue(); } @@ -88567,7 +88768,7 @@ function transformJsx(context) { return decoded === text ? void 0 : decoded; } function getTagName(node) { - if (node.kind === 287 /* JsxElement */) { + if (node.kind === 290 /* JsxElement */) { return getTagName(node.openingElement); } else { const name = node.tagName; @@ -88866,7 +89067,7 @@ function transformES2016(context) { return node; } switch (node.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node); default: return visitEachChild(node, visitor, context); @@ -89070,7 +89271,7 @@ function transformES2015(context) { hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 254 /* ReturnStatement */ && !node.expression; + return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 256 /* 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(node, false) || isBlock(node)); @@ -89110,65 +89311,65 @@ function transformES2015(context) { switch (node.kind) { case 125 /* StaticKeyword */: return void 0; - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return visitClassExpression(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return visitArrowFunction(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return visitFunctionExpression(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return visitVariableDeclaration(node); case 79 /* Identifier */: return visitIdentifier(node); - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return visitVariableDeclarationList(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return visitSwitchStatement(node); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return visitCaseBlock(node); - case 242 /* Block */: + case 244 /* Block */: return visitBlock(node, false); - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: return visitBreakOrContinueStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return visitLabeledStatement(node); - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return visitDoOrWhileStatement(node, void 0); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node, void 0); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatement(node, void 0); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatement(node, void 0); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClause(node); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return visitShorthandPropertyAssignment(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return visitNewExpression(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: @@ -89179,30 +89380,30 @@ function transformES2015(context) { return visitStringLiteral(node); case 8 /* NumericLiteral */: return visitNumericLiteral(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: return visitTemplateExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return visitYieldExpression(node); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return visitSpreadElement(node); case 107 /* SuperKeyword */: return visitSuperKeyword(false); case 109 /* ThisKeyword */: return visitThisKeyword(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return visitMetaProperty(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return visitAccessorDeclaration(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return visitReturnStatement(node); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return visitVoidExpression(node); default: return visitEachChild(node, visitor, context); @@ -89303,13 +89504,13 @@ function transformES2015(context) { } function visitBreakOrContinueStatement(node) { if (convertedLoopState) { - const jump = node.kind === 253 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + const jump = node.kind === 255 /* 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 === 253 /* BreakStatement */) { + if (node.kind === 255 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; labelMarker = "break"; } else { @@ -89317,7 +89518,7 @@ function transformES2015(context) { labelMarker = "continue"; } } else { - if (node.kind === 253 /* BreakStatement */) { + if (node.kind === 255 /* BreakStatement */) { labelMarker = `break-${label.escapedText}`; setLabeledJump(convertedLoopState, true, idText(label), labelMarker); } else { @@ -89561,14 +89762,14 @@ function transformES2015(context) { }; } function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 254 /* ReturnStatement */) { + if (statement.kind === 256 /* ReturnStatement */) { return true; - } else if (statement.kind === 246 /* IfStatement */) { + } else if (statement.kind === 248 /* IfStatement */) { const ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } - } else if (statement.kind === 242 /* Block */) { + } else if (statement.kind === 244 /* Block */) { const lastStatement = lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -89810,7 +90011,7 @@ function transformES2015(context) { return true; } function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) { + if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 221 /* ArrowFunction */) { insertCaptureThisForNode(statements, node, factory2.createThis()); return true; } @@ -89849,21 +90050,21 @@ function transformES2015(context) { if (hierarchyFacts & 32768 /* NewTarget */) { let newTarget; switch (node.kind) { - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return statements; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: newTarget = factory2.createVoidZero(); break; - case 176 /* Constructor */: + case 178 /* Constructor */: newTarget = factory2.createPropertyAccessExpression( setEmitFlags(factory2.createThis(), 4 /* NoSubstitution */), "constructor" ); break; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: newTarget = factory2.createConditionalExpression( factory2.createLogicalAnd( setEmitFlags(factory2.createThis(), 4 /* NoSubstitution */), @@ -89907,21 +90108,21 @@ function transformES2015(context) { function addClassMembers(statements, node) { for (const member of node.members) { switch (member.kind) { - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 176 /* Constructor */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 177 /* ClassStaticBlockDeclaration */: break; default: Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName); @@ -90074,7 +90275,7 @@ function transformES2015(context) { 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 === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { + if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */)) { name = factory2.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); @@ -90120,7 +90321,7 @@ function transformES2015(context) { multiLine = true; } } else { - Debug.assert(node.kind === 219 /* ArrowFunction */); + Debug.assert(node.kind === 221 /* ArrowFunction */); statementsLocation = moveRangeEnd(body, -1); const equalsGreaterThanToken = node.equalsGreaterThanToken; if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { @@ -90323,14 +90524,14 @@ function transformES2015(context) { } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return visitDoOrWhileStatement(node, outermostLabeledStatement); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node, outermostLabeledStatement); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatement(node, outermostLabeledStatement); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -90607,7 +90808,7 @@ function transformES2015(context) { 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 === 166 /* ComputedPropertyName */)) { + if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 167 /* ComputedPropertyName */)) { numInitialProperties = i; break; } @@ -90719,15 +90920,15 @@ function transformES2015(context) { } function convertIterationStatementCore(node, initializerFunction, convertedLoopBody) { switch (node.kind) { - case 249 /* ForStatement */: + case 251 /* ForStatement */: return convertForStatement(node, initializerFunction, convertedLoopBody); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return convertForInStatement(node, convertedLoopBody); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return convertForOfStatement(node, convertedLoopBody); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return convertDoStatement(node, convertedLoopBody); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return convertWhileStatement(node, convertedLoopBody); default: return Debug.failBadSyntaxKind(node, "IterationStatement expected"); @@ -90778,11 +90979,11 @@ function transformES2015(context) { function createConvertedLoopState(node) { let loopInitializer; switch (node.kind) { - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: const initializer = node.initializer; - if (initializer && initializer.kind === 262 /* VariableDeclarationList */) { + if (initializer && initializer.kind === 264 /* VariableDeclarationList */) { loopInitializer = initializer; } break; @@ -91136,20 +91337,20 @@ function transformES2015(context) { for (let i = start; i < numProperties; i++) { const property = properties[i]; switch (property.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, !!node.multiLine)); } break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -91252,7 +91453,7 @@ function transformES2015(context) { let updated; const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody(node); - if (node.kind === 177 /* GetAccessor */) { + if (node.kind === 179 /* GetAccessor */) { updated = factory2.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body); } else { updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); @@ -91554,13 +91755,13 @@ function transformES2015(context) { if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) { enabledSubstitutions |= 1 /* CapturedThis */; context.enableSubstitution(109 /* ThisKeyword */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(219 /* ArrowFunction */); - context.enableEmitNotification(218 /* FunctionExpression */); - context.enableEmitNotification(263 /* FunctionDeclaration */); + context.enableEmitNotification(178 /* Constructor */); + context.enableEmitNotification(176 /* MethodDeclaration */); + context.enableEmitNotification(179 /* GetAccessor */); + context.enableEmitNotification(180 /* SetAccessor */); + context.enableEmitNotification(221 /* ArrowFunction */); + context.enableEmitNotification(220 /* FunctionExpression */); + context.enableEmitNotification(265 /* FunctionDeclaration */); } } function onSubstituteNode(hint, node) { @@ -91584,10 +91785,10 @@ function transformES2015(context) { } function isNameOfDeclarationWithCollidingName(node) { switch (node.parent.kind) { - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: - case 269 /* EnumDeclaration */: - case 261 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: + case 272 /* EnumDeclaration */: + case 263 /* VariableDeclaration */: return node.parent.name === node && resolver.isDeclarationWithCollidingName(node.parent); } return false; @@ -91644,11 +91845,11 @@ function transformES2015(context) { return false; } const statement = firstOrUndefined(constructor.body.statements); - if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 245 /* ExpressionStatement */) { + if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 247 /* ExpressionStatement */) { return false; } const statementExpression = statement.expression; - if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 213 /* CallExpression */) { + if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 215 /* CallExpression */) { return false; } const callTarget = statementExpression.expression; @@ -91656,7 +91857,7 @@ function transformES2015(context) { return false; } const callArgument = singleOrUndefined(statementExpression.arguments); - if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 231 /* SpreadElement */) { + if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 233 /* SpreadElement */) { return false; } const expression = callArgument.expression; @@ -91673,24 +91874,24 @@ function transformES5(context) { if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(289 /* JsxOpeningElement */); - context.enableEmitNotification(290 /* JsxClosingElement */); - context.enableEmitNotification(288 /* JsxSelfClosingElement */); + context.enableEmitNotification(292 /* JsxOpeningElement */); + context.enableEmitNotification(293 /* JsxClosingElement */); + context.enableEmitNotification(291 /* JsxSelfClosingElement */); noSubstitution = []; } const previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(305 /* PropertyAssignment */); + context.enableSubstitution(213 /* PropertyAccessExpression */); + context.enableSubstitution(308 /* PropertyAssignment */); return chainBundle(context, transformSourceFile); function transformSourceFile(node) { return node; } function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 289 /* JsxOpeningElement */: - case 290 /* JsxClosingElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 293 /* JsxClosingElement */: + case 291 /* JsxSelfClosingElement */: const tagName = node.tagName; noSubstitution[getOriginalNodeId(tagName)] = true; break; @@ -91861,13 +92062,13 @@ function transformGenerators(context) { } function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 247 /* DoStatement */: + case 249 /* DoStatement */: return visitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return visitWhileStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return visitSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -91875,24 +92076,24 @@ function transformGenerators(context) { } function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return visitFunctionExpression(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return visitAccessorDeclaration(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatement(node); - case 253 /* BreakStatement */: + case 255 /* BreakStatement */: return visitBreakStatement(node); - case 252 /* ContinueStatement */: + case 254 /* ContinueStatement */: return visitContinueStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return visitReturnStatement(node); default: if (node.transformFlags & 1048576 /* ContainsYield */) { @@ -91906,23 +92107,23 @@ function transformGenerators(context) { } function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return visitCommaListExpression(node); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return visitConditionalExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return visitYieldExpression(node); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return visitNewExpression(node); default: return visitEachChild(node, visitor, context); @@ -91930,9 +92131,9 @@ function transformGenerators(context) { } function visitGenerator(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return visitFunctionExpression(node); default: return Debug.failBadSyntaxKind(node); @@ -92099,14 +92300,14 @@ function transformGenerators(context) { if (containsYield(right)) { let target; switch (left.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: target = factory2.updatePropertyAccessExpression( left, cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)), left.name ); break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: target = factory2.updateElementAccessExpression( left, cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)), @@ -92378,35 +92579,35 @@ function transformGenerators(context) { } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 242 /* Block */: + case 244 /* Block */: return transformAndEmitBlock(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return transformAndEmitExpressionStatement(node); - case 246 /* IfStatement */: + case 248 /* IfStatement */: return transformAndEmitIfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return transformAndEmitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return transformAndEmitWhileStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return transformAndEmitForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return transformAndEmitForInStatement(node); - case 252 /* ContinueStatement */: + case 254 /* ContinueStatement */: return transformAndEmitContinueStatement(node); - case 253 /* BreakStatement */: + case 255 /* BreakStatement */: return transformAndEmitBreakStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return transformAndEmitReturnStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return transformAndEmitWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return transformAndEmitSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return transformAndEmitLabeledStatement(node); - case 258 /* ThrowStatement */: + case 260 /* ThrowStatement */: return transformAndEmitThrowStatement(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return transformAndEmitTryStatement(node); default: return emitStatement(visitNode(node, visitor, isStatement)); @@ -92731,7 +92932,7 @@ function transformGenerators(context) { for (let i = 0; i < numClauses; i++) { const clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 299 /* DefaultClause */ && defaultClauseIndex === -1) { + if (clause.kind === 302 /* DefaultClause */ && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -92741,7 +92942,7 @@ function transformGenerators(context) { let defaultClausesSkipped = 0; for (let i = clausesWritten; i < numClauses; i++) { const clause = caseBlock.clauses[i]; - if (clause.kind === 298 /* CaseClause */) { + if (clause.kind === 301 /* CaseClause */) { if (containsYield(clause.expression) && pendingClauses.length > 0) { break; } @@ -93666,12 +93867,12 @@ function transformModule(context) { const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(215 /* TaggedTemplateExpression */); + context.enableSubstitution(215 /* CallExpression */); + context.enableSubstitution(217 /* TaggedTemplateExpression */); context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(227 /* BinaryExpression */); - context.enableSubstitution(306 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(314 /* SourceFile */); + context.enableSubstitution(229 /* BinaryExpression */); + context.enableSubstitution(309 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(317 /* SourceFile */); const moduleInfoMap = []; const deferredExports = []; let currentSourceFile; @@ -93979,23 +94180,23 @@ function transformModule(context) { } function topLevelVisitor(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return visitImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return visitExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return visitExportAssignment(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 361 /* MergeDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 362 /* EndOfDeclarationMarker */: + case 365 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return visitor(node); @@ -94006,26 +94207,26 @@ function transformModule(context) { return node; } switch (node.kind) { - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) { return visitImportCallExpression(node); } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -94040,24 +94241,24 @@ function transformModule(context) { if (isObjectLiteralExpression(node)) { for (const elem of node.properties) { switch (elem.kind) { - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (destructuringNeedsFlattening(elem.initializer)) { return true; } break; - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: if (destructuringNeedsFlattening(elem.name)) { return true; } break; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: if (destructuringNeedsFlattening(elem.expression)) { return true; } break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return false; default: Debug.assertNever(elem, "Unhandled object member kind"); @@ -94714,7 +94915,7 @@ function transformModule(context) { } } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 244 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 246 /* VariableStatement */) { const id = getOriginalNodeId(node); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original); } @@ -94746,10 +94947,10 @@ function transformModule(context) { const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 278 /* NamedImports */: + case 281 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding, true); } @@ -94893,7 +95094,7 @@ function transformModule(context) { return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)]; previousOnEmitNode(hint, node, emitCallback); @@ -94931,11 +95132,11 @@ function transformModule(context) { switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return substituteCallExpression(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return substituteTaggedTemplateExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return substituteBinaryExpression(node); } return node; @@ -94986,7 +95187,7 @@ function transformModule(context) { return node; } else if (!(isGeneratedIdentifier(node) && !(node.autoGenerateFlags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) { const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); - if (exportContainer && exportContainer.kind === 314 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 317 /* SourceFile */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createIdentifier("exports"), @@ -95065,10 +95266,10 @@ function transformSystemModule(context) { context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(306 /* ShorthandPropertyAssignment */); - context.enableSubstitution(227 /* BinaryExpression */); - context.enableSubstitution(237 /* MetaProperty */); - context.enableEmitNotification(314 /* SourceFile */); + context.enableSubstitution(309 /* ShorthandPropertyAssignment */); + context.enableSubstitution(229 /* BinaryExpression */); + context.enableSubstitution(239 /* MetaProperty */); + context.enableEmitNotification(317 /* SourceFile */); const moduleInfoMap = []; const deferredExports = []; const exportFunctionsMap = []; @@ -95218,7 +95419,7 @@ function transformSystemModule(context) { if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) { let hasExportDeclarationWithExportClause = false; for (const externalImport of moduleInfo.externalImports) { - if (externalImport.kind === 281 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 284 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -95337,11 +95538,11 @@ function transformSystemModule(context) { for (const entry of group2.externalImports) { const importVariableName = getLocalNameForExternalImport(factory2, entry, currentSourceFile); switch (entry.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: if (!entry.importClause) { break; } - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: Debug.assert(importVariableName !== void 0); statements.push( factory2.createExpressionStatement( @@ -95363,7 +95564,7 @@ function transformSystemModule(context) { ); } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: Debug.assert(importVariableName !== void 0); if (entry.exportClause) { if (isNamedExports(entry.exportClause)) { @@ -95432,13 +95633,13 @@ function transformSystemModule(context) { } function topLevelVisitor(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return visitImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return visitExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return visitExportAssignment(node); default: return topLevelNestedVisitor(node); @@ -95583,7 +95784,7 @@ function transformSystemModule(context) { } } function shouldHoistVariableDeclarationList(node) { - return (getEmitFlags(node) & 2097152 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 314 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); + return (getEmitFlags(node) & 2097152 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 317 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); } function transformInitializedVariable(node, isExportedDeclaration) { const createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; @@ -95607,7 +95808,7 @@ function transformSystemModule(context) { 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 === 244 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 246 /* VariableStatement */) { const id = getOriginalNodeId(node); const isExportedDeclaration = hasSyntacticModifier(node.original, 1 /* Export */); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration); @@ -95645,10 +95846,10 @@ function transformSystemModule(context) { const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 278 /* NamedImports */: + case 281 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding); } @@ -95743,43 +95944,43 @@ function transformSystemModule(context) { } function topLevelNestedVisitor(node) { switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node, true); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatement(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return visitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return visitWhileStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return visitLabeledStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return visitWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return visitSwitchStatement(node); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return visitCaseBlock(node); - case 298 /* CaseClause */: + case 301 /* CaseClause */: return visitCaseClause(node); - case 299 /* DefaultClause */: + case 302 /* DefaultClause */: return visitDefaultClause(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return visitTryStatement(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClause(node); - case 242 /* Block */: + case 244 /* Block */: return visitBlock(node); - case 361 /* MergeDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 362 /* EndOfDeclarationMarker */: + case 365 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return visitor(node); @@ -95921,26 +96122,26 @@ function transformSystemModule(context) { return node; } switch (node.kind) { - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node, false); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (isImportCall(node)) { return visitImportCallExpression(node); } break; - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -96000,7 +96201,7 @@ function transformSystemModule(context) { return hasExportedReferenceInDestructuringTarget(node.initializer); } else if (isIdentifier(node)) { const container = resolver.getReferencedExportContainer(node); - return container !== void 0 && container.kind === 314 /* SourceFile */; + return container !== void 0 && container.kind === 317 /* SourceFile */; } else { return false; } @@ -96044,7 +96245,7 @@ function transformSystemModule(context) { return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { const id = getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -96078,7 +96279,7 @@ function transformSystemModule(context) { } function substituteUnspecified(node) { switch (node.kind) { - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return substituteShorthandPropertyAssignment(node); } return node; @@ -96120,9 +96321,9 @@ function transformSystemModule(context) { switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return substituteBinaryExpression(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return substituteMetaProperty(node); } return node; @@ -96185,7 +96386,7 @@ function transformSystemModule(context) { const valueDeclaration = resolver.getReferencedImportDeclaration(name) || resolver.getReferencedValueDeclaration(name); if (valueDeclaration) { const exportContainer = resolver.getReferencedExportContainer(name, false); - if (exportContainer && exportContainer.kind === 314 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 317 /* SourceFile */) { exportedNames = append(exportedNames, factory2.getDeclarationName(valueDeclaration)); } exportedNames = addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]); @@ -96218,7 +96419,7 @@ function transformECMAScriptModule(context) { const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(314 /* SourceFile */); + context.enableEmitNotification(317 /* SourceFile */); context.enableSubstitution(79 /* Identifier */); let helperNameSubstitutions; let currentSourceFile; @@ -96269,11 +96470,11 @@ function transformECMAScriptModule(context) { } function visitor(node) { switch (node.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return getEmitModuleKind(compilerOptions) >= 100 /* Node16 */ ? visitImportEqualsDeclaration(node) : void 0; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return visitExportAssignment(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: const exportDecl = node; return visitExportDeclaration(exportDecl); } @@ -96435,8 +96636,8 @@ function transformNodeModule(context) { const cjsOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(314 /* SourceFile */); - context.enableEmitNotification(314 /* SourceFile */); + context.enableSubstitution(317 /* SourceFile */); + context.enableEmitNotification(317 /* SourceFile */); let currentSourceFile; return transformSourceFileOrBundle; function onSubstituteNode(hint, node) { @@ -96479,7 +96680,7 @@ function transformNodeModule(context) { return result; } function transformSourceFileOrBundle(node) { - return node.kind === 314 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 317 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -96509,7 +96710,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.kind === 266 /* 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; @@ -96526,7 +96727,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.kind === 266 /* 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; @@ -96534,7 +96735,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { } } function createGetSymbolAccessibilityDiagnosticForNode(node) { - if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isAnnotationPropertyDeclaration(node) || isPropertyAccessExpression(node) || isBindingElement(node) || isConstructorDeclaration(node)) { + if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isAnnotationPropertyDeclaration(node) || isPropertyAccessExpression(node) || isBindingElement(node) || isConstructorDeclaration(node) || isOverloadPropertyDeclaration(node)) { return getVariableDeclarationTypeVisibilityError; } else if (isSetAccessor(node) || isGetAccessor(node)) { return getAccessorDeclarationTypeVisibilityError; @@ -96557,12 +96758,12 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { 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 === 261 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { + if (node.kind === 263 /* VariableDeclaration */ || node.kind === 210 /* 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 === 171 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 170 /* PropertySignature */ || node.kind === 168 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { + } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 213 /* PropertyAccessExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* 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 === 264 /* ClassDeclaration */ || node.kind === 168 /* Parameter */) { + } else if (node.parent.kind === 266 /* ClassDeclaration */ || node.kind === 169 /* 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; @@ -96579,7 +96780,7 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; - if (node.kind === 178 /* SetAccessor */) { + if (node.kind === 180 /* 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 { @@ -96601,26 +96802,26 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { function getReturnTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; switch (node.kind) { - case 180 /* ConstructSignature */: + case 182 /* 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 179 /* CallSignature */: + case 181 /* 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 181 /* IndexSignature */: + case 183 /* 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 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.kind === 266 /* 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 263 /* FunctionDeclaration */: + case 265 /* 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: @@ -96641,29 +96842,29 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 176 /* Constructor */: + case 178 /* 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 180 /* ConstructSignature */: - case 185 /* ConstructorType */: + case 182 /* ConstructSignature */: + case 187 /* 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 179 /* CallSignature */: + case 181 /* 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 181 /* IndexSignature */: + case 183 /* 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 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 266 /* 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 263 /* FunctionDeclaration */: - case 184 /* FunctionType */: + case 265 /* FunctionDeclaration */: + case 186 /* 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 178 /* SetAccessor */: - case 177 /* GetAccessor */: + case 180 /* SetAccessor */: + case 179 /* 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)}`); @@ -96672,37 +96873,37 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { function getTypeParameterConstraintVisibilityError() { let diagnosticMessage; switch (node.parent.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 200 /* MappedType */: + case 202 /* MappedType */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1; break; - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 187 /* ConstructorType */: + case 182 /* ConstructSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 179 /* CallSignature */: + case 181 /* CallSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 266 /* 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 184 /* FunctionType */: - case 263 /* FunctionDeclaration */: + case 186 /* FunctionType */: + case 265 /* FunctionDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -96755,7 +96956,7 @@ function hasInternalAnnotation(range, currentSourceFile) { } function isInternalDeclaration(node, currentSourceFile) { const parseTreeNode = getParseTreeNode(node); - if (parseTreeNode && parseTreeNode.kind === 168 /* Parameter */) { + if (parseTreeNode && parseTreeNode.kind === 169 /* Parameter */) { const paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode); const previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : void 0; const text = currentSourceFile.text; @@ -96964,10 +97165,10 @@ function transformDeclarations(context) { return result; } function transformRoot(node) { - if (node.kind === 314 /* SourceFile */ && node.isDeclarationFile) { + if (node.kind === 317 /* SourceFile */ && node.isDeclarationFile) { return node; } - if (node.kind === 315 /* Bundle */) { + if (node.kind === 318 /* Bundle */) { isBundledEmit = true; refs = new Map2(); libs2 = new Map2(); @@ -97004,7 +97205,7 @@ function transformDeclarations(context) { return factory2.updateSourceFile(sourceFile, transformAndReplaceLatePaintedStatements(updated2), true, [], [], false, []); } ), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 317 /* InputFiles */) { + if (prepend.kind === 320 /* InputFiles */) { const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; collectReferences(sourceFile, refs); @@ -97146,14 +97347,14 @@ function transformDeclarations(context) { if (name.kind === 79 /* Identifier */) { return name; } else { - if (name.kind === 207 /* ArrayBindingPattern */) { + if (name.kind === 209 /* ArrayBindingPattern */) { return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement)); } else { return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement)); } } function visitBindingElement(elem) { - if (elem.kind === 233 /* OmittedExpression */) { + if (elem.kind === 235 /* OmittedExpression */) { return elem; } if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced) { @@ -97213,14 +97414,14 @@ function transformDeclarations(context) { if (type !== void 0 && isTypeReferenceNode(type) && type.typeName.virtual) { return; } - const shouldUseResolverType = node.kind === 168 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); + const shouldUseResolverType = node.kind === 169 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); if (type && !shouldUseResolverType) { return visitNode(type, visitDeclarationSubtree); } if (!getParseTreeNode(node)) { return type ? visitNode(type, visitDeclarationSubtree) : factory2.createKeywordTypeNode(132 /* AnyKeyword */); } - if (node.kind === 178 /* SetAccessor */) { + if (node.kind === 180 /* SetAccessor */) { return factory2.createKeywordTypeNode(132 /* AnyKeyword */); } errorNameNode = node.name; @@ -97229,10 +97430,10 @@ function transformDeclarations(context) { oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); } - if (node.kind === 261 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { + if (node.kind === 263 /* VariableDeclaration */ || node.kind === 210 /* BindingElement */) { return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); } - if (node.kind === 168 /* Parameter */ || node.kind === 171 /* PropertyDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 172 /* AnnotationPropertyDeclaration */) { + if (node.kind === 169 /* Parameter */ || node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 173 /* AnnotationPropertyDeclaration */ || node.kind === 174 /* OverloadPropertyDeclaration */) { 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)); @@ -97249,23 +97450,23 @@ function transformDeclarations(context) { function isDeclarationAndNotVisible(node) { node = getParseTreeNode(node); switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 270 /* ModuleDeclaration */: - case 267 /* InterfaceDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 266 /* AnnotationDeclaration */: + case 265 /* FunctionDeclaration */: + case 273 /* ModuleDeclaration */: + case 270 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 268 /* AnnotationDeclaration */: return !resolver.isDeclarationVisible(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return !getBindingNameVisible(node); - case 274 /* ImportEqualsDeclaration */: - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: + case 277 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: return false; - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return true; } return false; @@ -97330,7 +97531,7 @@ function transformDeclarations(context) { return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree); } function isEnclosingDeclaration(node) { - return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isStructDeclaration(node) || isAnnotationDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node); + return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isStructDeclaration(node) || isAnnotationDeclaration(node) || isOverloadDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node); } function checkEntityNameVisibility(entityName, enclosingDeclaration2) { const visibilityResult = resolver.isEntityNameVisible(entityName, enclosingDeclaration2); @@ -97346,7 +97547,7 @@ function transformDeclarations(context) { function rewriteModuleSpecifier(parent, input) { if (!input) return void 0; - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 270 /* ModuleDeclaration */ && parent.kind !== 205 /* ImportType */; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 273 /* ModuleDeclaration */ && parent.kind !== 207 /* ImportType */; if (isStringLiteralLike(input)) { if (isBundledEmit) { const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent); @@ -97365,7 +97566,7 @@ function transformDeclarations(context) { function transformImportEqualsDeclaration(decl) { if (!resolver.isDeclarationVisible(decl)) return; - if (decl.moduleReference.kind === 286 /* ExternalModuleReference */) { + if (decl.moduleReference.kind === 289 /* ExternalModuleReference */) { const specifier = getExternalModuleImportEqualsDeclarationExpression(decl); return factory2.updateImportEqualsDeclaration( decl, @@ -97401,7 +97602,7 @@ function transformDeclarations(context) { void 0 ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); } - if (decl.importClause.namedBindings.kind === 277 /* NamespaceImport */) { + if (decl.importClause.namedBindings.kind === 280 /* NamespaceImport */) { const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : void 0; return visibleDefaultBinding || namedBindings ? factory2.updateImportDeclaration(decl, decl.modifiers, factory2.updateImportClause( decl.importClause, @@ -97512,7 +97713,7 @@ function transformDeclarations(context) { const oldDiag = getSymbolAccessibilityDiagnostic; const canProduceDiagnostic = canProduceDiagnostics(input); const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; - let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 187 /* TypeLiteral */ || input.kind === 200 /* MappedType */) && input.parent.kind !== 268 /* TypeAliasDeclaration */; + let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 189 /* TypeLiteral */ || input.kind === 202 /* MappedType */) && input.parent.kind !== 271 /* TypeAliasDeclaration */; if (isMethodDeclaration(input) || isMethodSignature(input)) { if (hasEffectiveModifier(input, 8 /* Private */)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) @@ -97531,26 +97732,26 @@ function transformDeclarations(context) { } if (isProcessedComponent(input)) { switch (input.kind) { - case 234 /* ExpressionWithTypeArguments */: { + case 236 /* 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 183 /* TypeReference */: { + case 185 /* TypeReference */: { checkEntityNameVisibility(input.typeName, enclosingDeclaration); const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateTypeReferenceNode(node, node.typeName, node.typeArguments)); } - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: return cleanup(factory2.updateConstructSignature( input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type) )); - case 176 /* Constructor */: { + case 178 /* Constructor */: { const ctor = factory2.createConstructorDeclaration( ensureModifiers(input), updateParamsList(input, input.parameters, 0 /* None */), @@ -97558,7 +97759,7 @@ function transformDeclarations(context) { ); return cleanup(ctor); } - case 174 /* MethodDeclaration */: { + case 176 /* MethodDeclaration */: { if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -97576,7 +97777,7 @@ function transformDeclarations(context) { ); return cleanup(sig); } - case 177 /* GetAccessor */: { + case 179 /* GetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -97590,7 +97791,7 @@ function transformDeclarations(context) { void 0 )); } - case 178 /* SetAccessor */: { + case 180 /* SetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -97602,7 +97803,7 @@ function transformDeclarations(context) { void 0 )); } - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -97615,14 +97816,14 @@ function transformDeclarations(context) { ensureType(input, input.type), ensureNoInitializer(input) )); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return cleanup(factory2.updateAnnotationPropertyDeclaration( input, input.name, ensureType(input, input.type), input.initializer )); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -97633,7 +97834,18 @@ function transformDeclarations(context) { input.questionToken, ensureType(input, input.type) )); - case 173 /* MethodSignature */: { + case 174 /* OverloadPropertyDeclaration */: + if (isPrivateIdentifier(input.name)) { + return cleanup(void 0); + } + return cleanup(factory2.updateOverloadPropertyDeclaration( + input, + ensureModifiers(input), + input.name, + input.questionToken, + ensureType(input, input.type) + )); + case 175 /* MethodSignature */: { if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -97647,7 +97859,7 @@ function transformDeclarations(context) { ensureType(input, input.type) )); } - case 179 /* CallSignature */: { + case 181 /* CallSignature */: { return cleanup(factory2.updateCallSignature( input, ensureTypeParams(input, input.typeParameters), @@ -97655,7 +97867,7 @@ function transformDeclarations(context) { ensureType(input, input.type) )); } - case 181 /* IndexSignature */: { + case 183 /* IndexSignature */: { return cleanup(factory2.updateIndexSignature( input, ensureModifiers(input), @@ -97663,7 +97875,7 @@ function transformDeclarations(context) { visitNode(input.type, visitDeclarationSubtree) || factory2.createKeywordTypeNode(132 /* AnyKeyword */) )); } - case 261 /* VariableDeclaration */: { + case 263 /* VariableDeclaration */: { if (isBindingPattern(input.name)) { return recreateBindingPattern(input.name); } @@ -97671,13 +97883,13 @@ function transformDeclarations(context) { suppressNewDiagnosticContexts = true; return cleanup(factory2.updateVariableDeclaration(input, input.name, void 0, ensureType(input, input.type), ensureNoInitializer(input))); } - case 167 /* TypeParameter */: { + case 168 /* TypeParameter */: { if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { return cleanup(factory2.updateTypeParameterDeclaration(input, input.modifiers, input.name, void 0, void 0)); } return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); } - case 194 /* ConditionalType */: { + case 196 /* ConditionalType */: { const checkType = visitNode(input.checkType, visitDeclarationSubtree); const extendsType = visitNode(input.extendsType, visitDeclarationSubtree); const oldEnclosingDecl = enclosingDeclaration; @@ -97687,13 +97899,13 @@ function transformDeclarations(context) { const falseType = visitNode(input.falseType, visitDeclarationSubtree); return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType)); } - case 184 /* FunctionType */: { + case 186 /* FunctionType */: { return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree))); } - case 185 /* ConstructorType */: { + case 187 /* ConstructorType */: { return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree))); } - case 205 /* ImportType */: { + case 207 /* ImportType */: { if (!isLiteralImportTypeNode(input)) return cleanup(input); return cleanup(factory2.updateImportTypeNode( @@ -97733,7 +97945,7 @@ function transformDeclarations(context) { } } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); + return node.parent.kind === 176 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); } function visitDeclarationStatements(input) { if (!isPreservedDeclarationStatement(input)) { @@ -97742,7 +97954,7 @@ function transformDeclarations(context) { if (shouldStripInternal(input)) return; switch (input.kind) { - case 281 /* ExportDeclaration */: { + case 284 /* ExportDeclaration */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -97756,7 +97968,7 @@ function transformDeclarations(context) { getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0 ); } - case 280 /* ExportAssignment */: { + case 283 /* ExportAssignment */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -97798,10 +98010,10 @@ function transformDeclarations(context) { if (shouldStripInternal(input)) return; switch (input.kind) { - case 274 /* ImportEqualsDeclaration */: { + case 277 /* ImportEqualsDeclaration */: { return transformImportEqualsDeclaration(input); } - case 275 /* ImportDeclaration */: { + case 278 /* ImportDeclaration */: { return transformImportDeclaration(input); } } @@ -97821,7 +98033,7 @@ function transformDeclarations(context) { } const previousNeedsDeclare = needsDeclare; switch (input.kind) { - case 268 /* TypeAliasDeclaration */: { + case 271 /* TypeAliasDeclaration */: { needsDeclare = false; const clean2 = cleanup(factory2.updateTypeAliasDeclaration( input, @@ -97836,7 +98048,7 @@ function transformDeclarations(context) { needsDeclare = previousNeedsDeclare; return clean2; } - case 267 /* InterfaceDeclaration */: { + case 270 /* InterfaceDeclaration */: { return cleanup(factory2.updateInterfaceDeclaration( input, ensureModifiers(input), @@ -97846,7 +98058,7 @@ function transformDeclarations(context) { visitNodes2(input.members, visitDeclarationSubtree) )); } - case 263 /* FunctionDeclaration */: { + case 265 /* FunctionDeclaration */: { const clean2 = cleanup(factory2.updateFunctionDeclaration( input, ensureModifiers(input), @@ -97936,10 +98148,10 @@ function transformDeclarations(context) { return clean2; } } - case 270 /* ModuleDeclaration */: { + case 273 /* ModuleDeclaration */: { needsDeclare = false; const inner = input.body; - if (inner && inner.kind === 271 /* ModuleBlock */) { + if (inner && inner.kind === 274 /* ModuleBlock */) { const oldNeedsScopeFix = needsScopeFixMarker; const oldHasScopeFix = resultHasScopeMarker; resultHasScopeMarker = false; @@ -97983,7 +98195,7 @@ function transformDeclarations(context) { )); } } - case 265 /* StructDeclaration */: { + case 267 /* StructDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const decorators = ensureEtsDecorators(input, host); @@ -98000,7 +98212,7 @@ function transformDeclarations(context) { members )); } - case 266 /* AnnotationDeclaration */: { + case 268 /* AnnotationDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -98013,7 +98225,20 @@ function transformDeclarations(context) { members )); } - case 264 /* ClassDeclaration */: { + case 269 /* OverloadDeclaration */: { + errorNameNode = input.name; + errorFallbackNode = input; + const modifiers = factory2.createNodeArray(ensureModifiers(input)); + const memberNodes = visitNodes2(input.members, visitDeclarationSubtree); + const members = factory2.createNodeArray(memberNodes); + return cleanup(factory2.updateOverloadDeclaration( + input, + modifiers, + input.name, + members + )); + } + case 266 /* ClassDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -98116,10 +98341,10 @@ function transformDeclarations(context) { )); } } - case 244 /* VariableStatement */: { + case 246 /* VariableStatement */: { return cleanup(transformVariableStatement(input)); } - case 269 /* EnumDeclaration */: { + case 272 /* EnumDeclaration */: { return cleanup(factory2.updateEnumDeclaration(input, factory2.createNodeArray(ensureModifiers(input)), input.name, factory2.createNodeArray(mapDefined(input.members, (m) => { if (shouldStripInternal(m)) return; @@ -98135,7 +98360,7 @@ function transformDeclarations(context) { if (canProdiceDiagnostic) { getSymbolAccessibilityDiagnostic = oldDiag; } - if (input.kind === 270 /* ModuleDeclaration */) { + if (input.kind === 273 /* ModuleDeclaration */) { needsDeclare = previousNeedsDeclare; } if (node === input) { @@ -98158,7 +98383,7 @@ function transformDeclarations(context) { return flatten(mapDefined(d.elements, (e) => recreateBindingElement(e))); } function recreateBindingElement(e) { - if (e.kind === 233 /* OmittedExpression */) { + if (e.kind === 235 /* OmittedExpression */) { return; } if (e.name) { @@ -98207,7 +98432,7 @@ function transformDeclarations(context) { 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 === 314 /* SourceFile */; + const parentIsFile = node.parent.kind === 317 /* SourceFile */; if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { mask ^= 2 /* Ambient */; additions = 0 /* None */; @@ -98233,7 +98458,7 @@ function transformDeclarations(context) { } } function isAlwaysType(node) { - if (node.kind === 267 /* InterfaceDeclaration */) { + if (node.kind === 270 /* InterfaceDeclaration */) { return true; } return false; @@ -98253,60 +98478,62 @@ function maskModifierFlags(node, modifierMask = 258047 /* All */ ^ 4 /* Public * } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 177 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; + return accessor.kind === 179 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; } } function canHaveLiteralInitializer(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return !hasEffectiveModifier(node, 8 /* Private */); - case 168 /* Parameter */: - case 261 /* VariableDeclaration */: + case 169 /* Parameter */: + case 263 /* VariableDeclaration */: return true; } return false; } function isPreservedDeclarationStatement(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 270 /* ModuleDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 267 /* InterfaceDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 244 /* VariableStatement */: - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: + case 265 /* FunctionDeclaration */: + case 273 /* ModuleDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 270 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 246 /* VariableStatement */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: return true; } return false; } function isProcessedComponent(node) { switch (node.kind) { - case 180 /* ConstructSignature */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 181 /* IndexSignature */: - case 261 /* VariableDeclaration */: - case 167 /* TypeParameter */: - case 234 /* ExpressionWithTypeArguments */: - case 183 /* TypeReference */: - case 194 /* ConditionalType */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 205 /* ImportType */: + case 182 /* ConstructSignature */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 171 /* PropertySignature */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 183 /* IndexSignature */: + case 263 /* VariableDeclaration */: + case 168 /* TypeParameter */: + case 236 /* ExpressionWithTypeArguments */: + case 185 /* TypeReference */: + case 196 /* ConditionalType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 207 /* ImportType */: return true; } return false; @@ -98422,7 +98649,7 @@ function noEmitNotification(hint, node, callback) { } function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) { var _a2, _b; - const enabledSyntaxKindFeatures = new Array(364 /* Count */); + const enabledSyntaxKindFeatures = new Array(367 /* Count */); let lexicalEnvironmentVariableDeclarations; let lexicalEnvironmentFunctionDeclarations; let lexicalEnvironmentStatements; @@ -98501,7 +98728,7 @@ function transformNodes(resolver, host, factory2, options, nodes, transformers, state = 1 /* Initialized */; const transformed = []; for (const node of nodes) { - (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Emit, "transformNodes", node.kind === 314 /* 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 === 317 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); PerformanceDotting.start("transformRoot"); transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); PerformanceDotting.stop("transformRoot"); @@ -98818,7 +99045,7 @@ function getOutputPathsForBundle(options, forceDtsPaths) { } function getOutputPathsFor(sourceFile, host, forceDtsPaths) { const options = host.getCompilerOptions(); - if (sourceFile.kind === 315 /* Bundle */) { + if (sourceFile.kind === 318 /* Bundle */) { return getOutputPathsForBundle(options, forceDtsPaths); } else { const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options)); @@ -99191,8 +99418,8 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform, printer, mapOptions) { const sourceFileOrBundle = transform.transformed[0]; - const bundle = sourceFileOrBundle.kind === 315 /* Bundle */ ? sourceFileOrBundle : void 0; - const sourceFile = sourceFileOrBundle.kind === 314 /* SourceFile */ ? sourceFileOrBundle : void 0; + const bundle = sourceFileOrBundle.kind === 318 /* Bundle */ ? sourceFileOrBundle : void 0; + const sourceFile = sourceFileOrBundle.kind === 317 /* SourceFile */ ? sourceFileOrBundle : void 0; const sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; let sourceMapGenerator; if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) { @@ -99246,7 +99473,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla writer.clear(); } function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) { - return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 314 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); + return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 317 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); } function getSourceRoot(mapOptions) { const sourceRoot = normalizeSlashes(mapOptions.sourceRoot || ""); @@ -99605,11 +99832,11 @@ function createPrinter(printerOptions = {}, handlers = {}) { break; } switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: return printFile(node); - case 315 /* Bundle */: + case 318 /* Bundle */: return printBundle(node); - case 316 /* UnparsedSource */: + case 319 /* UnparsedSource */: return printUnparsedSource(node); } writeNode(hint, node, sourceFile, beginPrint()); @@ -99923,300 +100150,304 @@ function createPrinter(printerOptions = {}, handlers = {}) { return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return emitQualifiedName(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return emitTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return emitParameter(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return emitDecorator(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return emitPropertySignature(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return emitPropertyDeclaration(node); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return emitAnnotationPropertyDeclaration(node); - case 173 /* MethodSignature */: + case 174 /* OverloadPropertyDeclaration */: + return emitOverloadPropertyDeclaration(node); + case 175 /* MethodSignature */: return emitMethodSignature(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return emitMethodDeclaration(node); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return emitClassStaticBlockDeclaration(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return emitConstructor(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return emitAccessorDeclaration(node); - case 179 /* CallSignature */: + case 181 /* CallSignature */: return emitCallSignature(node); - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: return emitConstructSignature(node); - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return emitIndexSignature(node); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return emitTypePredicate(node); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return emitTypeReference(node); - case 184 /* FunctionType */: + case 186 /* FunctionType */: return emitFunctionType(node); - case 185 /* ConstructorType */: + case 187 /* ConstructorType */: return emitConstructorType(node); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return emitTypeQuery(node); - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: return emitTypeLiteral(node); - case 188 /* ArrayType */: + case 190 /* ArrayType */: return emitArrayType(node); - case 189 /* TupleType */: + case 191 /* TupleType */: return emitTupleType(node); - case 190 /* OptionalType */: + case 192 /* OptionalType */: return emitOptionalType(node); - case 192 /* UnionType */: + case 194 /* UnionType */: return emitUnionType(node); - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return emitIntersectionType(node); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return emitConditionalType(node); - case 195 /* InferType */: + case 197 /* InferType */: return emitInferType(node); - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return emitParenthesizedType(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 197 /* ThisType */: + case 199 /* ThisType */: return emitThisType(); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return emitTypeOperator(node); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return emitIndexedAccessType(node); - case 200 /* MappedType */: + case 202 /* MappedType */: return emitMappedType(node); - case 201 /* LiteralType */: + case 203 /* LiteralType */: return emitLiteralType(node); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return emitNamedTupleMember(node); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: return emitTemplateType(node); - case 204 /* TemplateLiteralTypeSpan */: + case 206 /* TemplateLiteralTypeSpan */: return emitTemplateTypeSpan(node); - case 205 /* ImportType */: + case 207 /* ImportType */: return emitImportTypeNode(node); - case 206 /* ObjectBindingPattern */: + case 208 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return emitBindingElement(node); - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return emitTemplateSpan(node); - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: return emitSemicolonClassElement(); - case 242 /* Block */: + case 244 /* Block */: return emitBlock(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return emitVariableStatement(node); - case 243 /* EmptyStatement */: + case 245 /* EmptyStatement */: return emitEmptyStatement(false); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return emitExpressionStatement(node); - case 246 /* IfStatement */: + case 248 /* IfStatement */: return emitIfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return emitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return emitWhileStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return emitForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return emitForInStatement(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return emitForOfStatement(node); - case 252 /* ContinueStatement */: + case 254 /* ContinueStatement */: return emitContinueStatement(node); - case 253 /* BreakStatement */: + case 255 /* BreakStatement */: return emitBreakStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return emitReturnStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return emitWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return emitSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return emitLabeledStatement(node); - case 258 /* ThrowStatement */: + case 260 /* ThrowStatement */: return emitThrowStatement(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return emitTryStatement(node); - case 260 /* DebuggerStatement */: + case 262 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return emitVariableDeclarationList(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return emitFunctionDeclaration(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return emitClassOrStructDeclaration(node); - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return emitClassOrStructDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return emitAnnotationDeclaration(node); - case 267 /* InterfaceDeclaration */: + case 269 /* OverloadDeclaration */: + return emitOverloadDeclaration(node); + case 270 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return emitModuleBlock(node); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return emitCaseBlock(node); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return emitNamespaceExportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return emitImportDeclaration(node); - case 276 /* ImportClause */: + case 279 /* ImportClause */: return emitImportClause(node); - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return emitNamespaceImport(node); - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: return emitNamespaceExport(node); - case 278 /* NamedImports */: + case 281 /* NamedImports */: return emitNamedImports(node); - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return emitImportSpecifier(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return emitExportAssignment(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return emitExportDeclaration(node); - case 282 /* NamedExports */: + case 285 /* NamedExports */: return emitNamedExports(node); - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: return emitExportSpecifier(node); - case 302 /* AssertClause */: + case 305 /* AssertClause */: return emitAssertClause(node); - case 303 /* AssertEntry */: + case 306 /* AssertEntry */: return emitAssertEntry(node); - case 285 /* MissingDeclaration */: + case 288 /* MissingDeclaration */: return; - case 286 /* ExternalModuleReference */: + case 289 /* ExternalModuleReference */: return emitExternalModuleReference(node); case 11 /* JsxText */: return emitJsxText(node); - case 289 /* JsxOpeningElement */: - case 292 /* JsxOpeningFragment */: + case 292 /* JsxOpeningElement */: + case 295 /* JsxOpeningFragment */: return emitJsxOpeningElementOrFragment(node); - case 290 /* JsxClosingElement */: - case 293 /* JsxClosingFragment */: + case 293 /* JsxClosingElement */: + case 296 /* JsxClosingFragment */: return emitJsxClosingElementOrFragment(node); - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: return emitJsxAttribute(node); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return emitJsxAttributes(node); - case 296 /* JsxSpreadAttribute */: + case 299 /* JsxSpreadAttribute */: return emitJsxSpreadAttribute(node); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return emitJsxExpression(node); - case 298 /* CaseClause */: + case 301 /* CaseClause */: return emitCaseClause(node); - case 299 /* DefaultClause */: + case 302 /* DefaultClause */: return emitDefaultClause(node); - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return emitHeritageClause(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return emitCatchClause(node); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: return emitSpreadAssignment(node); - case 308 /* EnumMember */: + case 311 /* EnumMember */: return emitEnumMember(node); - case 309 /* UnparsedPrologue */: + case 312 /* UnparsedPrologue */: return writeUnparsedNode(node); - case 316 /* UnparsedSource */: - case 310 /* UnparsedPrepend */: + case 319 /* UnparsedSource */: + case 313 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); - case 311 /* UnparsedText */: - case 312 /* UnparsedInternalText */: + case 314 /* UnparsedText */: + case 315 /* UnparsedInternalText */: return emitUnparsedTextLike(node); - case 313 /* UnparsedSyntheticReference */: + case 316 /* UnparsedSyntheticReference */: return emitUnparsedSyntheticReference(node); - case 314 /* SourceFile */: + case 317 /* SourceFile */: return emitSourceFile(node); - case 315 /* Bundle */: + case 318 /* Bundle */: return Debug.fail("Bundles should be printed using printBundle"); - case 317 /* InputFiles */: + case 320 /* InputFiles */: return Debug.fail("InputFiles should not be printed"); - case 318 /* JSDocTypeExpression */: + case 321 /* JSDocTypeExpression */: return emitJSDocTypeExpression(node); - case 319 /* JSDocNameReference */: + case 322 /* JSDocNameReference */: return emitJSDocNameReference(node); - case 321 /* JSDocAllType */: + case 324 /* JSDocAllType */: return writePunctuation("*"); - case 322 /* JSDocUnknownType */: + case 325 /* JSDocUnknownType */: return writePunctuation("?"); - case 323 /* JSDocNullableType */: + case 326 /* JSDocNullableType */: return emitJSDocNullableType(node); - case 324 /* JSDocNonNullableType */: + case 327 /* JSDocNonNullableType */: return emitJSDocNonNullableType(node); - case 325 /* JSDocOptionalType */: + case 328 /* JSDocOptionalType */: return emitJSDocOptionalType(node); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: return emitJSDocFunctionType(node); - case 191 /* RestType */: - case 327 /* JSDocVariadicType */: + case 193 /* RestType */: + case 330 /* JSDocVariadicType */: return emitRestOrJSDocVariadicType(node); - case 328 /* JSDocNamepathType */: + case 331 /* JSDocNamepathType */: return; - case 329 /* JSDoc */: + case 332 /* JSDoc */: return emitJSDoc(node); - case 331 /* JSDocTypeLiteral */: + case 334 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 332 /* JSDocSignature */: + case 335 /* JSDocSignature */: return emitJSDocSignature(node); - case 336 /* JSDocTag */: - case 341 /* JSDocClassTag */: - case 346 /* JSDocOverrideTag */: + case 339 /* JSDocTag */: + case 344 /* JSDocClassTag */: + case 349 /* JSDocOverrideTag */: return emitJSDocSimpleTag(node); - case 337 /* JSDocAugmentsTag */: - case 338 /* JSDocImplementsTag */: + case 340 /* JSDocAugmentsTag */: + case 341 /* JSDocImplementsTag */: return emitJSDocHeritageTag(node); - case 339 /* JSDocAuthorTag */: - case 340 /* JSDocDeprecatedTag */: + case 342 /* JSDocAuthorTag */: + case 343 /* JSDocDeprecatedTag */: return; - case 342 /* JSDocPublicTag */: - case 343 /* JSDocPrivateTag */: - case 344 /* JSDocProtectedTag */: - case 345 /* JSDocReadonlyTag */: + case 345 /* JSDocPublicTag */: + case 346 /* JSDocPrivateTag */: + case 347 /* JSDocProtectedTag */: + case 348 /* JSDocReadonlyTag */: return; - case 347 /* JSDocCallbackTag */: + case 350 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); - case 349 /* JSDocParameterTag */: - case 356 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: + case 359 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 348 /* JSDocEnumTag */: - case 350 /* JSDocReturnTag */: - case 351 /* JSDocThisTag */: - case 352 /* JSDocTypeTag */: + case 351 /* JSDocEnumTag */: + case 353 /* JSDocReturnTag */: + case 354 /* JSDocThisTag */: + case 355 /* JSDocTypeTag */: return emitJSDocSimpleTypedTag(node); - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 355 /* JSDocSeeTag */: + case 358 /* JSDocSeeTag */: return emitJSDocSeeTag(node); - case 358 /* NotEmittedStatement */: - case 362 /* EndOfDeclarationMarker */: - case 361 /* MergeDeclarationMarker */: + case 361 /* NotEmittedStatement */: + case 365 /* EndOfDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: return; } if (isExpression(node)) { @@ -100245,84 +100476,84 @@ function createPrinter(printerOptions = {}, handlers = {}) { return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return emitArrayLiteralExpression(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return emitObjectLiteralExpression(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return emitPropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return emitElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return emitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return emitNewExpression(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: return emitTypeAssertionExpression(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return emitParenthesizedExpression(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return emitFunctionExpression(node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return emitArrowFunction(node); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return emitDeleteExpression(node); - case 222 /* TypeOfExpression */: + case 224 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return emitVoidExpression(node); - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return emitAwaitExpression(node); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return emitBinaryExpression(node); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return emitConditionalExpression(node); - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: return emitTemplateExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return emitYieldExpression(node); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return emitSpreadElement(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return emitClassExpression(node); - case 233 /* OmittedExpression */: + case 235 /* OmittedExpression */: return; - case 235 /* AsExpression */: + case 237 /* AsExpression */: return emitAsExpression(node); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return emitNonNullExpression(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return emitSatisfiesExpression(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return emitMetaProperty(node); - case 238 /* SyntheticExpression */: + case 240 /* SyntheticExpression */: return Debug.fail("SyntheticExpression should never be printed."); - case 287 /* JsxElement */: + case 290 /* JsxElement */: return emitJsxElement(node); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return emitJsxSelfClosingElement(node); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return emitJsxFragment(node); - case 357 /* SyntaxList */: + case 360 /* SyntaxList */: return Debug.fail("SyntaxList should not be printed"); - case 358 /* NotEmittedStatement */: + case 361 /* NotEmittedStatement */: return; - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return emitCommaList(node); - case 361 /* MergeDeclarationMarker */: - case 362 /* EndOfDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: + case 365 /* EndOfDeclarationMarker */: return; - case 363 /* SyntheticReferenceExpression */: + case 366 /* SyntheticReferenceExpression */: return Debug.fail("SyntheticReferenceExpression should not be printed"); } } @@ -100373,7 +100604,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitHelpers(node) { let helpersEmitted = false; - const bundle = node.kind === 315 /* Bundle */ ? node : void 0; + const bundle = node.kind === 318 /* Bundle */ ? node : void 0; if (bundle && moduleKind === 0 /* None */) { return; } @@ -100444,7 +100675,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { updateOrPushBundleFileTextLike( pos, writer.getTextPos(), - unparsed.kind === 311 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ + unparsed.kind === 314 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ ); } } @@ -100475,7 +100706,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitTabStop(hint, node, snippet) { Debug.assert( - node.kind === 243 /* EmptyStatement */, + node.kind === 245 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` ); Debug.assert( @@ -100531,7 +100762,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emit(node.dotDotDotToken); emitNodeWithWriter(node.name, writeParameter); emit(node.questionToken); - if (node.parent && node.parent.kind === 326 /* JSDocFunctionType */ && !node.name) { + if (node.parent && node.parent.kind === 329 /* JSDocFunctionType */ && !node.name) { emit(node.type); } else { emitTypeAnnotation(node.type); @@ -100549,6 +100780,11 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitTypeAnnotation(node.type); writeTrailingSemicolon(); } + function emitOverloadPropertyDeclaration(node) { + emitModifiers(node, node.modifiers); + emitNodeWithWriter(node.name, writeProperty); + emit(node.questionToken); + } function emitPropertyDeclaration(node) { emitDecoratorsAndModifiers(node, node.modifiers); emit(node.name); @@ -100593,7 +100829,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitAccessorDeclaration(node) { emitDecoratorsAndModifiers(node, node.modifiers); - writeKeyword(node.kind === 177 /* GetAccessor */ ? "get" : "set"); + writeKeyword(node.kind === 179 /* GetAccessor */ ? "get" : "set"); writeSpace(); emit(node.name); emitSignatureAndBody(node, emitSignatureHead); @@ -101022,7 +101258,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function shouldEmitWhitespaceBeforeOperand(node) { const operand = node.operand; - return operand.kind === 225 /* 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 === 227 /* 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); @@ -101218,7 +101454,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (node.elseStatement) { writeLineOrSpace(node, node.thenStatement, node.elseStatement); emitTokenWithComment(92 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); - if (node.elseStatement.kind === 246 /* IfStatement */) { + if (node.elseStatement.kind === 248 /* IfStatement */) { writeSpace(); emit(node.elseStatement); } else { @@ -101279,7 +101515,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(164 /* OfKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(165 /* OfKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); @@ -101287,7 +101523,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitForBinding(node) { if (node !== void 0) { - if (node.kind === 262 /* VariableDeclarationList */) { + if (node.kind === 264 /* VariableDeclarationList */) { emit(node); } else { emitExpression(node); @@ -101323,7 +101559,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } pos = writeTokenText(token, writer2, pos); if (isSimilarNode && contextNode.end !== pos) { - const isJsxExprContext = contextNode.kind === 297 /* JsxExpression */; + const isJsxExprContext = contextNode.kind === 300 /* JsxExpression */; emitTrailingCommentsOfPosition(pos, !isJsxExprContext, isJsxExprContext); } return pos; @@ -101582,6 +101818,25 @@ function createPrinter(printerOptions = {}, handlers = {}) { decreaseIndent(); } } + function emitOverloadDeclaration(node) { + emitDecoratorsAndModifiers(node, node.modifiers); + writeKeyword("overload"); + if (node.name) { + writeSpace(); + emitIdentifierName(node.name); + } + const indentedFlag = getEmitFlags(node) & 65536 /* Indented */; + if (indentedFlag) { + increaseIndent(); + } + writeSpace(); + writePunctuation("{"); + emitList(node, node.members, 145 /* EnumMembers */); + writePunctuation("}"); + if (indentedFlag) { + decreaseIndent(); + } + } function emitTypeAliasDeclaration(node) { if (isSendableFunctionOrType(node, true)) { emitDecorators(node, node.illegalDecorators); @@ -101979,7 +102234,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 352 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 355 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } else { @@ -102023,7 +102278,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { function emitJSDocTypedefTag(tag) { emitJSDocTagName(tag.tagName); if (tag.typeExpression) { - if (tag.typeExpression.kind === 318 /* JSDocTypeExpression */) { + if (tag.typeExpression.kind === 321 /* JSDocTypeExpression */) { emitJSDocTypeExpression(tag.typeExpression); } else { writeSpace(); @@ -102041,7 +102296,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emit(tag.fullName); } emitJSDocComment(tag.comment); - if (tag.typeExpression && tag.typeExpression.kind === 331 /* JSDocTypeLiteral */) { + if (tag.typeExpression && tag.typeExpression.kind === 334 /* JSDocTypeLiteral */) { emitJSDocTypeLiteral(tag.typeExpression); } } @@ -102857,7 +103112,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { return block.statements.length === 0 && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile)); } function skipSynthesizedParentheses(node) { - while (node.kind === 217 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { + while (node.kind === 219 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -102927,84 +103182,84 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (!node) return; switch (node.kind) { - case 242 /* Block */: + case 244 /* Block */: forEach(node.statements, generateNames); break; - case 257 /* LabeledStatement */: - case 255 /* WithStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 259 /* LabeledStatement */: + case 257 /* WithStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: generateNames(node.statement); break; - case 246 /* IfStatement */: + case 248 /* IfStatement */: generateNames(node.thenStatement); generateNames(node.elseStatement); break; - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: - case 250 /* ForInStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: + case 252 /* ForInStatement */: generateNames(node.initializer); generateNames(node.statement); break; - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: generateNames(node.caseBlock); break; - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: forEach(node.clauses, generateNames); break; - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: forEach(node.statements, generateNames); break; - case 259 /* TryStatement */: + case 261 /* TryStatement */: generateNames(node.tryBlock); generateNames(node.catchClause); generateNames(node.finallyBlock); break; - case 301 /* CatchClause */: + case 304 /* CatchClause */: generateNames(node.variableDeclaration); generateNames(node.block); break; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: generateNames(node.declarationList); break; - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: forEach(node.declarations, generateNames); break; - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: generateNameIfNeeded(node.name); break; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: generateNameIfNeeded(node.name); if (getEmitFlags(node) & 524288 /* ReuseTempVariableScope */) { forEach(node.parameters, generateNames); generateNames(node.body); } break; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: forEach(node.elements, generateNames); break; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: generateNames(node.importClause); break; - case 276 /* ImportClause */: + case 279 /* ImportClause */: generateNameIfNeeded(node.name); generateNames(node.namedBindings); break; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: generateNameIfNeeded(node.name); break; - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: generateNameIfNeeded(node.name); break; - case 278 /* NamedImports */: + case 281 /* NamedImports */: forEach(node.elements, generateNames); break; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: generateNameIfNeeded(node.propertyName || node.name); break; } @@ -103013,13 +103268,13 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (!node) return; switch (node.kind) { - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: generateNameIfNeeded(node.name); break; } @@ -103193,27 +103448,27 @@ function createPrinter(printerOptions = {}, handlers = {}) { prefix, suffix ); - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForModuleOrEnum(node); - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForImportOrExportDeclaration(node); - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 280 /* ExportAssignment */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 283 /* ExportAssignment */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForExportDefault(); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForClassExpression(); - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return generateNameForMethodOrAccessor(node, privateName, prefix, suffix); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return makeTempVariableName(TempFlags.Auto, true, privateName, prefix, suffix); default: return makeTempVariableName(TempFlags.Auto, false, privateName, prefix, suffix); @@ -103304,14 +103559,14 @@ function createPrinter(printerOptions = {}, handlers = {}) { const skipTrailingComments = end < 0 || (emitFlags & 1024 /* NoTrailingComments */) !== 0 || node.kind === 11 /* JsxText */; if ((pos > 0 || end > 0) && pos !== end) { if (!skipLeadingComments) { - emitLeadingComments(pos, node.kind !== 358 /* NotEmittedStatement */); + emitLeadingComments(pos, node.kind !== 361 /* NotEmittedStatement */); } if (!skipLeadingComments || pos >= 0 && (emitFlags & 512 /* NoLeadingComments */) !== 0) { containerPos = pos; } if (!skipTrailingComments || end >= 0 && (emitFlags & 1024 /* NoTrailingComments */) !== 0) { containerEnd = end; - if (node.kind === 262 /* VariableDeclarationList */) { + if (node.kind === 264 /* VariableDeclarationList */) { declarationListContainerEnd = end; } } @@ -103327,7 +103582,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { containerPos = savedContainerPos; containerEnd = savedContainerEnd; declarationListContainerEnd = savedDeclarationListContainerEnd; - if (!skipTrailingComments && node.kind !== 358 /* NotEmittedStatement */) { + if (!skipTrailingComments && node.kind !== 361 /* NotEmittedStatement */) { emitTrailingComments(end); } } @@ -103579,7 +103834,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } } else { const source = sourceMapRange.source || sourceMapSource; - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { + if (node.kind !== 361 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos)); } if (emitFlags & 64 /* NoNestedSourceMaps */) { @@ -103594,7 +103849,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (emitFlags & 64 /* NoNestedSourceMaps */) { sourceMapsDisabled = false; } - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { + if (node.kind !== 361 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end); } } @@ -105996,89 +106251,89 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return diagnostics; function walk(node, parent) { switch (parent.kind) { - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: if (parent.questionToken === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); return "skip"; } - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 261 /* VariableDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 221 /* ArrowFunction */: + case 263 /* 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 276 /* ImportClause */: + case 279 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(parent, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); return "skip"; } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); return "skip"; } break; - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 287 /* 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 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.import_can_only_be_used_in_TypeScript_files)); return "skip"; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.export_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: const heritageClause = node; if (heritageClause.token === 118 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 267 /* InterfaceDeclaration */: + case 270 /* 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 270 /* ModuleDeclaration */: + case 273 /* 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 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); return "skip"; - case 269 /* EnumDeclaration */: + case 272 /* 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 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 235 /* AsExpression */: + case 237 /* AsExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: Debug.fail(); } } @@ -106087,27 +106342,27 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config diagnostics.push(createDiagnosticForNode2(parent, Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning)); } switch (parent.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 221 /* ArrowFunction */: if (nodes === parent.typeParameters) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); return "skip"; } - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: if (nodes === parent.modifiers) { - checkModifiers(parent.modifiers, parent.kind === 244 /* VariableStatement */); + checkModifiers(parent.modifiers, parent.kind === 246 /* VariableStatement */); return "skip"; } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (nodes === parent.modifiers) { for (const modifier of nodes) { if (isModifier(modifier) && modifier.kind !== 125 /* StaticKeyword */ && modifier.kind !== 128 /* AccessorKeyword */) { @@ -106117,18 +106372,18 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return "skip"; } break; - case 168 /* Parameter */: + case 169 /* 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 213 /* CallExpression */: - case 214 /* NewExpression */: - case 234 /* ExpressionWithTypeArguments */: - case 288 /* JsxSelfClosingElement */: - case 289 /* JsxOpeningElement */: - case 215 /* TaggedTemplateExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 236 /* ExpressionWithTypeArguments */: + case 291 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 217 /* TaggedTemplateExpression */: if (nodes === parent.typeArguments) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); return "skip"; diff --git a/lib/tsserver.js b/lib/tsserver.js index 79441c1134..6bd0122795 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -1822,6 +1822,9 @@ __export(server_exports, { isOptionalTypeNode: () => isOptionalTypeNode, isOuterExpression: () => isOuterExpression, isOutermostOptionalChain: () => isOutermostOptionalChain, + isOverloadDeclaration: () => isOverloadDeclaration, + isOverloadElement: () => isOverloadElement, + isOverloadPropertyDeclaration: () => isOverloadPropertyDeclaration, isOverrideModifier: () => isOverrideModifier, isPackedArrayLiteral: () => isPackedArrayLiteral, isParameter: () => isParameter, @@ -6555,208 +6558,211 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => { SyntaxKind5[SyntaxKind5["GlobalKeyword"] = 161] = "GlobalKeyword"; SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 162] = "BigIntKeyword"; SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 163] = "OverrideKeyword"; - SyntaxKind5[SyntaxKind5["OfKeyword"] = 164] = "OfKeyword"; - SyntaxKind5[SyntaxKind5["QualifiedName"] = 165] = "QualifiedName"; - SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 166] = "ComputedPropertyName"; - SyntaxKind5[SyntaxKind5["TypeParameter"] = 167] = "TypeParameter"; - SyntaxKind5[SyntaxKind5["Parameter"] = 168] = "Parameter"; - SyntaxKind5[SyntaxKind5["Decorator"] = 169] = "Decorator"; - SyntaxKind5[SyntaxKind5["PropertySignature"] = 170] = "PropertySignature"; - SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 171] = "PropertyDeclaration"; - SyntaxKind5[SyntaxKind5["AnnotationPropertyDeclaration"] = 172] = "AnnotationPropertyDeclaration"; - SyntaxKind5[SyntaxKind5["MethodSignature"] = 173] = "MethodSignature"; - SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 174] = "MethodDeclaration"; - SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 175] = "ClassStaticBlockDeclaration"; - SyntaxKind5[SyntaxKind5["Constructor"] = 176] = "Constructor"; - SyntaxKind5[SyntaxKind5["GetAccessor"] = 177] = "GetAccessor"; - SyntaxKind5[SyntaxKind5["SetAccessor"] = 178] = "SetAccessor"; - SyntaxKind5[SyntaxKind5["CallSignature"] = 179] = "CallSignature"; - SyntaxKind5[SyntaxKind5["ConstructSignature"] = 180] = "ConstructSignature"; - SyntaxKind5[SyntaxKind5["IndexSignature"] = 181] = "IndexSignature"; - SyntaxKind5[SyntaxKind5["TypePredicate"] = 182] = "TypePredicate"; - SyntaxKind5[SyntaxKind5["TypeReference"] = 183] = "TypeReference"; - SyntaxKind5[SyntaxKind5["FunctionType"] = 184] = "FunctionType"; - SyntaxKind5[SyntaxKind5["ConstructorType"] = 185] = "ConstructorType"; - SyntaxKind5[SyntaxKind5["TypeQuery"] = 186] = "TypeQuery"; - SyntaxKind5[SyntaxKind5["TypeLiteral"] = 187] = "TypeLiteral"; - SyntaxKind5[SyntaxKind5["ArrayType"] = 188] = "ArrayType"; - SyntaxKind5[SyntaxKind5["TupleType"] = 189] = "TupleType"; - SyntaxKind5[SyntaxKind5["OptionalType"] = 190] = "OptionalType"; - SyntaxKind5[SyntaxKind5["RestType"] = 191] = "RestType"; - SyntaxKind5[SyntaxKind5["UnionType"] = 192] = "UnionType"; - SyntaxKind5[SyntaxKind5["IntersectionType"] = 193] = "IntersectionType"; - SyntaxKind5[SyntaxKind5["ConditionalType"] = 194] = "ConditionalType"; - SyntaxKind5[SyntaxKind5["InferType"] = 195] = "InferType"; - SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 196] = "ParenthesizedType"; - SyntaxKind5[SyntaxKind5["ThisType"] = 197] = "ThisType"; - SyntaxKind5[SyntaxKind5["TypeOperator"] = 198] = "TypeOperator"; - SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 199] = "IndexedAccessType"; - SyntaxKind5[SyntaxKind5["MappedType"] = 200] = "MappedType"; - SyntaxKind5[SyntaxKind5["LiteralType"] = 201] = "LiteralType"; - SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 202] = "NamedTupleMember"; - SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 203] = "TemplateLiteralType"; - SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 204] = "TemplateLiteralTypeSpan"; - SyntaxKind5[SyntaxKind5["ImportType"] = 205] = "ImportType"; - SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 206] = "ObjectBindingPattern"; - SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 207] = "ArrayBindingPattern"; - SyntaxKind5[SyntaxKind5["BindingElement"] = 208] = "BindingElement"; - SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 209] = "ArrayLiteralExpression"; - SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 210] = "ObjectLiteralExpression"; - SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 211] = "PropertyAccessExpression"; - SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 212] = "ElementAccessExpression"; - SyntaxKind5[SyntaxKind5["CallExpression"] = 213] = "CallExpression"; - SyntaxKind5[SyntaxKind5["NewExpression"] = 214] = "NewExpression"; - SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 215] = "TaggedTemplateExpression"; - SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 216] = "TypeAssertionExpression"; - SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 217] = "ParenthesizedExpression"; - SyntaxKind5[SyntaxKind5["FunctionExpression"] = 218] = "FunctionExpression"; - SyntaxKind5[SyntaxKind5["ArrowFunction"] = 219] = "ArrowFunction"; - SyntaxKind5[SyntaxKind5["EtsComponentExpression"] = 220] = "EtsComponentExpression"; - SyntaxKind5[SyntaxKind5["DeleteExpression"] = 221] = "DeleteExpression"; - SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 222] = "TypeOfExpression"; - SyntaxKind5[SyntaxKind5["VoidExpression"] = 223] = "VoidExpression"; - SyntaxKind5[SyntaxKind5["AwaitExpression"] = 224] = "AwaitExpression"; - SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 225] = "PrefixUnaryExpression"; - SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 226] = "PostfixUnaryExpression"; - SyntaxKind5[SyntaxKind5["BinaryExpression"] = 227] = "BinaryExpression"; - SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 228] = "ConditionalExpression"; - SyntaxKind5[SyntaxKind5["TemplateExpression"] = 229] = "TemplateExpression"; - SyntaxKind5[SyntaxKind5["YieldExpression"] = 230] = "YieldExpression"; - SyntaxKind5[SyntaxKind5["SpreadElement"] = 231] = "SpreadElement"; - SyntaxKind5[SyntaxKind5["ClassExpression"] = 232] = "ClassExpression"; - SyntaxKind5[SyntaxKind5["OmittedExpression"] = 233] = "OmittedExpression"; - SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 234] = "ExpressionWithTypeArguments"; - SyntaxKind5[SyntaxKind5["AsExpression"] = 235] = "AsExpression"; - SyntaxKind5[SyntaxKind5["NonNullExpression"] = 236] = "NonNullExpression"; - SyntaxKind5[SyntaxKind5["MetaProperty"] = 237] = "MetaProperty"; - SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 238] = "SyntheticExpression"; - SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 239] = "SatisfiesExpression"; - SyntaxKind5[SyntaxKind5["TemplateSpan"] = 240] = "TemplateSpan"; - SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 241] = "SemicolonClassElement"; - SyntaxKind5[SyntaxKind5["Block"] = 242] = "Block"; - SyntaxKind5[SyntaxKind5["EmptyStatement"] = 243] = "EmptyStatement"; - SyntaxKind5[SyntaxKind5["VariableStatement"] = 244] = "VariableStatement"; - SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 245] = "ExpressionStatement"; - SyntaxKind5[SyntaxKind5["IfStatement"] = 246] = "IfStatement"; - SyntaxKind5[SyntaxKind5["DoStatement"] = 247] = "DoStatement"; - SyntaxKind5[SyntaxKind5["WhileStatement"] = 248] = "WhileStatement"; - SyntaxKind5[SyntaxKind5["ForStatement"] = 249] = "ForStatement"; - SyntaxKind5[SyntaxKind5["ForInStatement"] = 250] = "ForInStatement"; - SyntaxKind5[SyntaxKind5["ForOfStatement"] = 251] = "ForOfStatement"; - SyntaxKind5[SyntaxKind5["ContinueStatement"] = 252] = "ContinueStatement"; - SyntaxKind5[SyntaxKind5["BreakStatement"] = 253] = "BreakStatement"; - SyntaxKind5[SyntaxKind5["ReturnStatement"] = 254] = "ReturnStatement"; - SyntaxKind5[SyntaxKind5["WithStatement"] = 255] = "WithStatement"; - SyntaxKind5[SyntaxKind5["SwitchStatement"] = 256] = "SwitchStatement"; - SyntaxKind5[SyntaxKind5["LabeledStatement"] = 257] = "LabeledStatement"; - SyntaxKind5[SyntaxKind5["ThrowStatement"] = 258] = "ThrowStatement"; - SyntaxKind5[SyntaxKind5["TryStatement"] = 259] = "TryStatement"; - SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 260] = "DebuggerStatement"; - SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 261] = "VariableDeclaration"; - SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 262] = "VariableDeclarationList"; - SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 263] = "FunctionDeclaration"; - SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 264] = "ClassDeclaration"; - SyntaxKind5[SyntaxKind5["StructDeclaration"] = 265] = "StructDeclaration"; - SyntaxKind5[SyntaxKind5["AnnotationDeclaration"] = 266] = "AnnotationDeclaration"; - SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 267] = "InterfaceDeclaration"; - SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 268] = "TypeAliasDeclaration"; - SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 269] = "EnumDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 270] = "ModuleDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleBlock"] = 271] = "ModuleBlock"; - SyntaxKind5[SyntaxKind5["CaseBlock"] = 272] = "CaseBlock"; - SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 273] = "NamespaceExportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 274] = "ImportEqualsDeclaration"; - SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 275] = "ImportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportClause"] = 276] = "ImportClause"; - SyntaxKind5[SyntaxKind5["NamespaceImport"] = 277] = "NamespaceImport"; - SyntaxKind5[SyntaxKind5["NamedImports"] = 278] = "NamedImports"; - SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 279] = "ImportSpecifier"; - SyntaxKind5[SyntaxKind5["ExportAssignment"] = 280] = "ExportAssignment"; - SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 281] = "ExportDeclaration"; - SyntaxKind5[SyntaxKind5["NamedExports"] = 282] = "NamedExports"; - SyntaxKind5[SyntaxKind5["NamespaceExport"] = 283] = "NamespaceExport"; - SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 284] = "ExportSpecifier"; - SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 285] = "MissingDeclaration"; - SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 286] = "ExternalModuleReference"; - SyntaxKind5[SyntaxKind5["JsxElement"] = 287] = "JsxElement"; - SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 288] = "JsxSelfClosingElement"; - SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 289] = "JsxOpeningElement"; - SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 290] = "JsxClosingElement"; - SyntaxKind5[SyntaxKind5["JsxFragment"] = 291] = "JsxFragment"; - SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 292] = "JsxOpeningFragment"; - SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 293] = "JsxClosingFragment"; - SyntaxKind5[SyntaxKind5["JsxAttribute"] = 294] = "JsxAttribute"; - SyntaxKind5[SyntaxKind5["JsxAttributes"] = 295] = "JsxAttributes"; - SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 296] = "JsxSpreadAttribute"; - SyntaxKind5[SyntaxKind5["JsxExpression"] = 297] = "JsxExpression"; - SyntaxKind5[SyntaxKind5["CaseClause"] = 298] = "CaseClause"; - SyntaxKind5[SyntaxKind5["DefaultClause"] = 299] = "DefaultClause"; - SyntaxKind5[SyntaxKind5["HeritageClause"] = 300] = "HeritageClause"; - SyntaxKind5[SyntaxKind5["CatchClause"] = 301] = "CatchClause"; - SyntaxKind5[SyntaxKind5["AssertClause"] = 302] = "AssertClause"; - SyntaxKind5[SyntaxKind5["AssertEntry"] = 303] = "AssertEntry"; - SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 304] = "ImportTypeAssertionContainer"; - SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 305] = "PropertyAssignment"; - SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 306] = "ShorthandPropertyAssignment"; - SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 307] = "SpreadAssignment"; - SyntaxKind5[SyntaxKind5["EnumMember"] = 308] = "EnumMember"; - SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 309] = "UnparsedPrologue"; - SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 310] = "UnparsedPrepend"; - SyntaxKind5[SyntaxKind5["UnparsedText"] = 311] = "UnparsedText"; - SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 312] = "UnparsedInternalText"; - SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 313] = "UnparsedSyntheticReference"; - SyntaxKind5[SyntaxKind5["SourceFile"] = 314] = "SourceFile"; - SyntaxKind5[SyntaxKind5["Bundle"] = 315] = "Bundle"; - SyntaxKind5[SyntaxKind5["UnparsedSource"] = 316] = "UnparsedSource"; - SyntaxKind5[SyntaxKind5["InputFiles"] = 317] = "InputFiles"; - SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 318] = "JSDocTypeExpression"; - SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 319] = "JSDocNameReference"; - SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 320] = "JSDocMemberName"; - SyntaxKind5[SyntaxKind5["JSDocAllType"] = 321] = "JSDocAllType"; - SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 322] = "JSDocUnknownType"; - SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 323] = "JSDocNullableType"; - SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 324] = "JSDocNonNullableType"; - SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 325] = "JSDocOptionalType"; - SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 326] = "JSDocFunctionType"; - SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 327] = "JSDocVariadicType"; - SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 328] = "JSDocNamepathType"; - SyntaxKind5[SyntaxKind5["JSDoc"] = 329] = "JSDoc"; - SyntaxKind5[SyntaxKind5["JSDocComment"] = 329 /* JSDoc */] = "JSDocComment"; - SyntaxKind5[SyntaxKind5["JSDocText"] = 330] = "JSDocText"; - SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 331] = "JSDocTypeLiteral"; - SyntaxKind5[SyntaxKind5["JSDocSignature"] = 332] = "JSDocSignature"; - SyntaxKind5[SyntaxKind5["JSDocLink"] = 333] = "JSDocLink"; - SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 334] = "JSDocLinkCode"; - SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 335] = "JSDocLinkPlain"; - SyntaxKind5[SyntaxKind5["JSDocTag"] = 336] = "JSDocTag"; - SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 337] = "JSDocAugmentsTag"; - SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 338] = "JSDocImplementsTag"; - SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 339] = "JSDocAuthorTag"; - SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 340] = "JSDocDeprecatedTag"; - SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 341] = "JSDocClassTag"; - SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 342] = "JSDocPublicTag"; - SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 343] = "JSDocPrivateTag"; - SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 344] = "JSDocProtectedTag"; - SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 345] = "JSDocReadonlyTag"; - SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 346] = "JSDocOverrideTag"; - SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 347] = "JSDocCallbackTag"; - SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 348] = "JSDocEnumTag"; - SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 349] = "JSDocParameterTag"; - SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 350] = "JSDocReturnTag"; - SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 351] = "JSDocThisTag"; - SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 352] = "JSDocTypeTag"; - SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 353] = "JSDocTemplateTag"; - SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 354] = "JSDocTypedefTag"; - SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 355] = "JSDocSeeTag"; - SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 356] = "JSDocPropertyTag"; - SyntaxKind5[SyntaxKind5["SyntaxList"] = 357] = "SyntaxList"; - SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 358] = "NotEmittedStatement"; - SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 359] = "PartiallyEmittedExpression"; - SyntaxKind5[SyntaxKind5["CommaListExpression"] = 360] = "CommaListExpression"; - SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 361] = "MergeDeclarationMarker"; - SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 362] = "EndOfDeclarationMarker"; - SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 363] = "SyntheticReferenceExpression"; - SyntaxKind5[SyntaxKind5["Count"] = 364] = "Count"; + SyntaxKind5[SyntaxKind5["OverloadKeyword"] = 164] = "OverloadKeyword"; + SyntaxKind5[SyntaxKind5["OfKeyword"] = 165] = "OfKeyword"; + SyntaxKind5[SyntaxKind5["QualifiedName"] = 166] = "QualifiedName"; + SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 167] = "ComputedPropertyName"; + SyntaxKind5[SyntaxKind5["TypeParameter"] = 168] = "TypeParameter"; + SyntaxKind5[SyntaxKind5["Parameter"] = 169] = "Parameter"; + SyntaxKind5[SyntaxKind5["Decorator"] = 170] = "Decorator"; + SyntaxKind5[SyntaxKind5["PropertySignature"] = 171] = "PropertySignature"; + SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 172] = "PropertyDeclaration"; + SyntaxKind5[SyntaxKind5["AnnotationPropertyDeclaration"] = 173] = "AnnotationPropertyDeclaration"; + SyntaxKind5[SyntaxKind5["OverloadPropertyDeclaration"] = 174] = "OverloadPropertyDeclaration"; + SyntaxKind5[SyntaxKind5["MethodSignature"] = 175] = "MethodSignature"; + SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 176] = "MethodDeclaration"; + SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 177] = "ClassStaticBlockDeclaration"; + SyntaxKind5[SyntaxKind5["Constructor"] = 178] = "Constructor"; + SyntaxKind5[SyntaxKind5["GetAccessor"] = 179] = "GetAccessor"; + SyntaxKind5[SyntaxKind5["SetAccessor"] = 180] = "SetAccessor"; + SyntaxKind5[SyntaxKind5["CallSignature"] = 181] = "CallSignature"; + SyntaxKind5[SyntaxKind5["ConstructSignature"] = 182] = "ConstructSignature"; + SyntaxKind5[SyntaxKind5["IndexSignature"] = 183] = "IndexSignature"; + SyntaxKind5[SyntaxKind5["TypePredicate"] = 184] = "TypePredicate"; + SyntaxKind5[SyntaxKind5["TypeReference"] = 185] = "TypeReference"; + SyntaxKind5[SyntaxKind5["FunctionType"] = 186] = "FunctionType"; + SyntaxKind5[SyntaxKind5["ConstructorType"] = 187] = "ConstructorType"; + SyntaxKind5[SyntaxKind5["TypeQuery"] = 188] = "TypeQuery"; + SyntaxKind5[SyntaxKind5["TypeLiteral"] = 189] = "TypeLiteral"; + SyntaxKind5[SyntaxKind5["ArrayType"] = 190] = "ArrayType"; + SyntaxKind5[SyntaxKind5["TupleType"] = 191] = "TupleType"; + SyntaxKind5[SyntaxKind5["OptionalType"] = 192] = "OptionalType"; + SyntaxKind5[SyntaxKind5["RestType"] = 193] = "RestType"; + SyntaxKind5[SyntaxKind5["UnionType"] = 194] = "UnionType"; + SyntaxKind5[SyntaxKind5["IntersectionType"] = 195] = "IntersectionType"; + SyntaxKind5[SyntaxKind5["ConditionalType"] = 196] = "ConditionalType"; + SyntaxKind5[SyntaxKind5["InferType"] = 197] = "InferType"; + SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 198] = "ParenthesizedType"; + SyntaxKind5[SyntaxKind5["ThisType"] = 199] = "ThisType"; + SyntaxKind5[SyntaxKind5["TypeOperator"] = 200] = "TypeOperator"; + SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 201] = "IndexedAccessType"; + SyntaxKind5[SyntaxKind5["MappedType"] = 202] = "MappedType"; + SyntaxKind5[SyntaxKind5["LiteralType"] = 203] = "LiteralType"; + SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 204] = "NamedTupleMember"; + SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 205] = "TemplateLiteralType"; + SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 206] = "TemplateLiteralTypeSpan"; + SyntaxKind5[SyntaxKind5["ImportType"] = 207] = "ImportType"; + SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 208] = "ObjectBindingPattern"; + SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 209] = "ArrayBindingPattern"; + SyntaxKind5[SyntaxKind5["BindingElement"] = 210] = "BindingElement"; + SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 211] = "ArrayLiteralExpression"; + SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 212] = "ObjectLiteralExpression"; + SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 213] = "PropertyAccessExpression"; + SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 214] = "ElementAccessExpression"; + SyntaxKind5[SyntaxKind5["CallExpression"] = 215] = "CallExpression"; + SyntaxKind5[SyntaxKind5["NewExpression"] = 216] = "NewExpression"; + SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 217] = "TaggedTemplateExpression"; + SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 218] = "TypeAssertionExpression"; + SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 219] = "ParenthesizedExpression"; + SyntaxKind5[SyntaxKind5["FunctionExpression"] = 220] = "FunctionExpression"; + SyntaxKind5[SyntaxKind5["ArrowFunction"] = 221] = "ArrowFunction"; + SyntaxKind5[SyntaxKind5["EtsComponentExpression"] = 222] = "EtsComponentExpression"; + SyntaxKind5[SyntaxKind5["DeleteExpression"] = 223] = "DeleteExpression"; + SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 224] = "TypeOfExpression"; + SyntaxKind5[SyntaxKind5["VoidExpression"] = 225] = "VoidExpression"; + SyntaxKind5[SyntaxKind5["AwaitExpression"] = 226] = "AwaitExpression"; + SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 227] = "PrefixUnaryExpression"; + SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 228] = "PostfixUnaryExpression"; + SyntaxKind5[SyntaxKind5["BinaryExpression"] = 229] = "BinaryExpression"; + SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 230] = "ConditionalExpression"; + SyntaxKind5[SyntaxKind5["TemplateExpression"] = 231] = "TemplateExpression"; + SyntaxKind5[SyntaxKind5["YieldExpression"] = 232] = "YieldExpression"; + SyntaxKind5[SyntaxKind5["SpreadElement"] = 233] = "SpreadElement"; + SyntaxKind5[SyntaxKind5["ClassExpression"] = 234] = "ClassExpression"; + SyntaxKind5[SyntaxKind5["OmittedExpression"] = 235] = "OmittedExpression"; + SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 236] = "ExpressionWithTypeArguments"; + SyntaxKind5[SyntaxKind5["AsExpression"] = 237] = "AsExpression"; + SyntaxKind5[SyntaxKind5["NonNullExpression"] = 238] = "NonNullExpression"; + SyntaxKind5[SyntaxKind5["MetaProperty"] = 239] = "MetaProperty"; + SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 240] = "SyntheticExpression"; + SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 241] = "SatisfiesExpression"; + SyntaxKind5[SyntaxKind5["TemplateSpan"] = 242] = "TemplateSpan"; + SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 243] = "SemicolonClassElement"; + SyntaxKind5[SyntaxKind5["Block"] = 244] = "Block"; + SyntaxKind5[SyntaxKind5["EmptyStatement"] = 245] = "EmptyStatement"; + SyntaxKind5[SyntaxKind5["VariableStatement"] = 246] = "VariableStatement"; + SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 247] = "ExpressionStatement"; + SyntaxKind5[SyntaxKind5["IfStatement"] = 248] = "IfStatement"; + SyntaxKind5[SyntaxKind5["DoStatement"] = 249] = "DoStatement"; + SyntaxKind5[SyntaxKind5["WhileStatement"] = 250] = "WhileStatement"; + SyntaxKind5[SyntaxKind5["ForStatement"] = 251] = "ForStatement"; + SyntaxKind5[SyntaxKind5["ForInStatement"] = 252] = "ForInStatement"; + SyntaxKind5[SyntaxKind5["ForOfStatement"] = 253] = "ForOfStatement"; + SyntaxKind5[SyntaxKind5["ContinueStatement"] = 254] = "ContinueStatement"; + SyntaxKind5[SyntaxKind5["BreakStatement"] = 255] = "BreakStatement"; + SyntaxKind5[SyntaxKind5["ReturnStatement"] = 256] = "ReturnStatement"; + SyntaxKind5[SyntaxKind5["WithStatement"] = 257] = "WithStatement"; + SyntaxKind5[SyntaxKind5["SwitchStatement"] = 258] = "SwitchStatement"; + SyntaxKind5[SyntaxKind5["LabeledStatement"] = 259] = "LabeledStatement"; + SyntaxKind5[SyntaxKind5["ThrowStatement"] = 260] = "ThrowStatement"; + SyntaxKind5[SyntaxKind5["TryStatement"] = 261] = "TryStatement"; + SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 262] = "DebuggerStatement"; + SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 263] = "VariableDeclaration"; + SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 264] = "VariableDeclarationList"; + SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 265] = "FunctionDeclaration"; + SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 266] = "ClassDeclaration"; + SyntaxKind5[SyntaxKind5["StructDeclaration"] = 267] = "StructDeclaration"; + SyntaxKind5[SyntaxKind5["AnnotationDeclaration"] = 268] = "AnnotationDeclaration"; + SyntaxKind5[SyntaxKind5["OverloadDeclaration"] = 269] = "OverloadDeclaration"; + SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 270] = "InterfaceDeclaration"; + SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 271] = "TypeAliasDeclaration"; + SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 272] = "EnumDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 273] = "ModuleDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleBlock"] = 274] = "ModuleBlock"; + SyntaxKind5[SyntaxKind5["CaseBlock"] = 275] = "CaseBlock"; + SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 276] = "NamespaceExportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 277] = "ImportEqualsDeclaration"; + SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 278] = "ImportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportClause"] = 279] = "ImportClause"; + SyntaxKind5[SyntaxKind5["NamespaceImport"] = 280] = "NamespaceImport"; + SyntaxKind5[SyntaxKind5["NamedImports"] = 281] = "NamedImports"; + SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 282] = "ImportSpecifier"; + SyntaxKind5[SyntaxKind5["ExportAssignment"] = 283] = "ExportAssignment"; + SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 284] = "ExportDeclaration"; + SyntaxKind5[SyntaxKind5["NamedExports"] = 285] = "NamedExports"; + SyntaxKind5[SyntaxKind5["NamespaceExport"] = 286] = "NamespaceExport"; + SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 287] = "ExportSpecifier"; + SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 288] = "MissingDeclaration"; + SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 289] = "ExternalModuleReference"; + SyntaxKind5[SyntaxKind5["JsxElement"] = 290] = "JsxElement"; + SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 291] = "JsxSelfClosingElement"; + SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 292] = "JsxOpeningElement"; + SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 293] = "JsxClosingElement"; + SyntaxKind5[SyntaxKind5["JsxFragment"] = 294] = "JsxFragment"; + SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 295] = "JsxOpeningFragment"; + SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 296] = "JsxClosingFragment"; + SyntaxKind5[SyntaxKind5["JsxAttribute"] = 297] = "JsxAttribute"; + SyntaxKind5[SyntaxKind5["JsxAttributes"] = 298] = "JsxAttributes"; + SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 299] = "JsxSpreadAttribute"; + SyntaxKind5[SyntaxKind5["JsxExpression"] = 300] = "JsxExpression"; + SyntaxKind5[SyntaxKind5["CaseClause"] = 301] = "CaseClause"; + SyntaxKind5[SyntaxKind5["DefaultClause"] = 302] = "DefaultClause"; + SyntaxKind5[SyntaxKind5["HeritageClause"] = 303] = "HeritageClause"; + SyntaxKind5[SyntaxKind5["CatchClause"] = 304] = "CatchClause"; + SyntaxKind5[SyntaxKind5["AssertClause"] = 305] = "AssertClause"; + SyntaxKind5[SyntaxKind5["AssertEntry"] = 306] = "AssertEntry"; + SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 307] = "ImportTypeAssertionContainer"; + SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 308] = "PropertyAssignment"; + SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 309] = "ShorthandPropertyAssignment"; + SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 310] = "SpreadAssignment"; + SyntaxKind5[SyntaxKind5["EnumMember"] = 311] = "EnumMember"; + SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 312] = "UnparsedPrologue"; + SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 313] = "UnparsedPrepend"; + SyntaxKind5[SyntaxKind5["UnparsedText"] = 314] = "UnparsedText"; + SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 315] = "UnparsedInternalText"; + SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 316] = "UnparsedSyntheticReference"; + SyntaxKind5[SyntaxKind5["SourceFile"] = 317] = "SourceFile"; + SyntaxKind5[SyntaxKind5["Bundle"] = 318] = "Bundle"; + SyntaxKind5[SyntaxKind5["UnparsedSource"] = 319] = "UnparsedSource"; + SyntaxKind5[SyntaxKind5["InputFiles"] = 320] = "InputFiles"; + SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 321] = "JSDocTypeExpression"; + SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 322] = "JSDocNameReference"; + SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 323] = "JSDocMemberName"; + SyntaxKind5[SyntaxKind5["JSDocAllType"] = 324] = "JSDocAllType"; + SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 325] = "JSDocUnknownType"; + SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 326] = "JSDocNullableType"; + SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 327] = "JSDocNonNullableType"; + SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 328] = "JSDocOptionalType"; + SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 329] = "JSDocFunctionType"; + SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 330] = "JSDocVariadicType"; + SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 331] = "JSDocNamepathType"; + SyntaxKind5[SyntaxKind5["JSDoc"] = 332] = "JSDoc"; + SyntaxKind5[SyntaxKind5["JSDocComment"] = 332 /* JSDoc */] = "JSDocComment"; + SyntaxKind5[SyntaxKind5["JSDocText"] = 333] = "JSDocText"; + SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 334] = "JSDocTypeLiteral"; + SyntaxKind5[SyntaxKind5["JSDocSignature"] = 335] = "JSDocSignature"; + SyntaxKind5[SyntaxKind5["JSDocLink"] = 336] = "JSDocLink"; + SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 337] = "JSDocLinkCode"; + SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 338] = "JSDocLinkPlain"; + SyntaxKind5[SyntaxKind5["JSDocTag"] = 339] = "JSDocTag"; + SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 340] = "JSDocAugmentsTag"; + SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 341] = "JSDocImplementsTag"; + SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 342] = "JSDocAuthorTag"; + SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 343] = "JSDocDeprecatedTag"; + SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 344] = "JSDocClassTag"; + SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 345] = "JSDocPublicTag"; + SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 346] = "JSDocPrivateTag"; + SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 347] = "JSDocProtectedTag"; + SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 348] = "JSDocReadonlyTag"; + SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 349] = "JSDocOverrideTag"; + SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 350] = "JSDocCallbackTag"; + SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 351] = "JSDocEnumTag"; + SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 352] = "JSDocParameterTag"; + SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 353] = "JSDocReturnTag"; + SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 354] = "JSDocThisTag"; + SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 355] = "JSDocTypeTag"; + SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 356] = "JSDocTemplateTag"; + SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 357] = "JSDocTypedefTag"; + SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 358] = "JSDocSeeTag"; + SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 359] = "JSDocPropertyTag"; + SyntaxKind5[SyntaxKind5["SyntaxList"] = 360] = "SyntaxList"; + SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 361] = "NotEmittedStatement"; + SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 362] = "PartiallyEmittedExpression"; + SyntaxKind5[SyntaxKind5["CommaListExpression"] = 363] = "CommaListExpression"; + SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 364] = "MergeDeclarationMarker"; + SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 365] = "EndOfDeclarationMarker"; + SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 366] = "SyntheticReferenceExpression"; + SyntaxKind5[SyntaxKind5["Count"] = 367] = "Count"; SyntaxKind5[SyntaxKind5["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment"; SyntaxKind5[SyntaxKind5["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment"; SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment"; @@ -6764,15 +6770,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => { SyntaxKind5[SyntaxKind5["FirstReservedWord"] = 81 /* BreakKeyword */] = "FirstReservedWord"; SyntaxKind5[SyntaxKind5["LastReservedWord"] = 117 /* WithKeyword */] = "LastReservedWord"; SyntaxKind5[SyntaxKind5["FirstKeyword"] = 81 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind5[SyntaxKind5["LastKeyword"] = 164 /* OfKeyword */] = "LastKeyword"; + SyntaxKind5[SyntaxKind5["LastKeyword"] = 165 /* OfKeyword */] = "LastKeyword"; SyntaxKind5[SyntaxKind5["FirstFutureReservedWord"] = 118 /* ImplementsKeyword */] = "FirstFutureReservedWord"; SyntaxKind5[SyntaxKind5["LastFutureReservedWord"] = 126 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 182 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind5[SyntaxKind5["LastTypeNode"] = 205 /* ImportType */] = "LastTypeNode"; + SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 184 /* TypePredicate */] = "FirstTypeNode"; + SyntaxKind5[SyntaxKind5["LastTypeNode"] = 207 /* ImportType */] = "LastTypeNode"; SyntaxKind5[SyntaxKind5["FirstPunctuation"] = 18 /* OpenBraceToken */] = "FirstPunctuation"; SyntaxKind5[SyntaxKind5["LastPunctuation"] = 78 /* CaretEqualsToken */] = "LastPunctuation"; SyntaxKind5[SyntaxKind5["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind5[SyntaxKind5["LastToken"] = 164 /* LastKeyword */] = "LastToken"; + SyntaxKind5[SyntaxKind5["LastToken"] = 165 /* LastKeyword */] = "LastToken"; SyntaxKind5[SyntaxKind5["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; SyntaxKind5[SyntaxKind5["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; SyntaxKind5[SyntaxKind5["FirstLiteralToken"] = 8 /* NumericLiteral */] = "FirstLiteralToken"; @@ -6781,15 +6787,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => { SyntaxKind5[SyntaxKind5["LastTemplateToken"] = 17 /* TemplateTail */] = "LastTemplateToken"; SyntaxKind5[SyntaxKind5["FirstBinaryOperator"] = 29 /* LessThanToken */] = "FirstBinaryOperator"; SyntaxKind5[SyntaxKind5["LastBinaryOperator"] = 78 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind5[SyntaxKind5["FirstStatement"] = 244 /* VariableStatement */] = "FirstStatement"; - SyntaxKind5[SyntaxKind5["LastStatement"] = 260 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind5[SyntaxKind5["FirstNode"] = 165 /* QualifiedName */] = "FirstNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 318 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 356 /* JSDocPropertyTag */] = "LastJSDocNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 336 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 356 /* JSDocPropertyTag */] = "LastJSDocTagNode"; + SyntaxKind5[SyntaxKind5["FirstStatement"] = 246 /* VariableStatement */] = "FirstStatement"; + SyntaxKind5[SyntaxKind5["LastStatement"] = 262 /* DebuggerStatement */] = "LastStatement"; + SyntaxKind5[SyntaxKind5["FirstNode"] = 166 /* QualifiedName */] = "FirstNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 321 /* JSDocTypeExpression */] = "FirstJSDocNode"; + SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 359 /* JSDocPropertyTag */] = "LastJSDocNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 339 /* JSDocTag */] = "FirstJSDocTagNode"; + SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 359 /* JSDocPropertyTag */] = "LastJSDocTagNode"; SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 127 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 164 /* OfKeyword */] = "LastContextualKeyword"; + SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 165 /* OfKeyword */] = "LastContextualKeyword"; return SyntaxKind5; })(SyntaxKind || {}); var NodeFlags = /* @__PURE__ */ ((NodeFlags4) => { @@ -11807,6 +11813,7 @@ var textToKeywordObj = { protected: 123 /* ProtectedKeyword */, public: 124 /* PublicKeyword */, override: 163 /* OverrideKeyword */, + overload: 164 /* OverloadKeyword */, out: 146 /* OutKeyword */, readonly: 147 /* ReadonlyKeyword */, require: 148 /* RequireKeyword */, @@ -11837,7 +11844,7 @@ var textToKeywordObj = { yield: 126 /* YieldKeyword */, async: 133 /* AsyncKeyword */, await: 134 /* AwaitKeyword */, - of: 164 /* OfKeyword */ + of: 165 /* OfKeyword */ }; var textToKeyword = new Map2(getEntries(textToKeywordObj)); var textToToken = new Map2(getEntries({ @@ -13912,16 +13919,16 @@ function collapseTextChangeRangesAcrossMultipleVersions(changes) { return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN); } function getTypeParameterOwner(d) { - if (d && d.kind === 167 /* TypeParameter */) { + if (d && d.kind === 168 /* TypeParameter */) { for (let current = d; current; current = current.parent) { - if (isFunctionLike(current) || isClassLike(current) || current.kind === 267 /* InterfaceDeclaration */) { + if (isFunctionLike(current) || isClassLike(current) || current.kind === 270 /* InterfaceDeclaration */) { return current; } } } } function isParameterPropertyDeclaration(node, parent2) { - return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 176 /* Constructor */; + return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 178 /* Constructor */; } function isEmptyBindingPattern(node) { if (isBindingPattern(node)) { @@ -13947,14 +13954,14 @@ function getCombinedFlags(node, getFlags) { node = walkUpBindingElementsAndPatterns(node); } let flags = getFlags(node); - if (node.kind === 261 /* VariableDeclaration */) { + if (node.kind === 263 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 262 /* VariableDeclarationList */) { + if (node && node.kind === 264 /* VariableDeclarationList */) { flags |= getFlags(node); node = node.parent; } - if (node && node.kind === 244 /* VariableStatement */) { + if (node && node.kind === 246 /* VariableStatement */) { flags |= getFlags(node); } return flags; @@ -14075,30 +14082,30 @@ function nameForNamelessJSDocTypedef(declaration) { return getDeclarationIdentifier(hostNode); } switch (hostNode.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); } break; - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: let expr = hostNode.expression; - if (expr.kind === 227 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { + if (expr.kind === 229 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { expr = expr.left; } switch (expr.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return expr.name; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: const arg = expr.argumentExpression; if (isIdentifier(arg)) { return arg; } } break; - case 217 /* ParenthesizedExpression */: { + case 219 /* ParenthesizedExpression */: { return getDeclarationIdentifier(hostNode.expression); } - case 257 /* LabeledStatement */: { + case 259 /* LabeledStatement */: { if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { return getDeclarationIdentifier(hostNode.statement); } @@ -14129,16 +14136,16 @@ function getNonAssignedNameOfDeclaration(declaration) { switch (declaration.kind) { case 79 /* Identifier */: return declaration; - case 356 /* JSDocPropertyTag */: - case 349 /* JSDocParameterTag */: { + case 359 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: { const { name } = declaration; - if (name.kind === 165 /* QualifiedName */) { + if (name.kind === 166 /* QualifiedName */) { return name.right; } break; } - case 213 /* CallExpression */: - case 227 /* BinaryExpression */: { + case 215 /* CallExpression */: + case 229 /* BinaryExpression */: { const expr2 = declaration; switch (getAssignmentDeclarationKind(expr2)) { case 1 /* ExportsProperty */: @@ -14154,15 +14161,15 @@ function getNonAssignedNameOfDeclaration(declaration) { return void 0; } } - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 348 /* JSDocEnumTag */: + case 351 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); - case 280 /* ExportAssignment */: { + case 283 /* ExportAssignment */: { const { expression } = declaration; return isIdentifier(expression) ? expression : void 0; } - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: const expr = declaration; if (isBindableStaticElementAccessExpression(expr)) { return expr.argumentExpression; @@ -14376,10 +14383,10 @@ function getAllJSDocTagsOfKind(node, kind) { 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 === 330 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); + return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 333 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); } function formatJSDocLink(link) { - const kind = link.kind === 333 /* JSDocLink */ ? "link" : link.kind === 334 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; + const kind = link.kind === 336 /* JSDocLink */ ? "link" : link.kind === 337 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; const name = link.name ? entityNameToString(link.name) : ""; const space = link.name && link.text.startsWith("://") ? "" : " "; return `{@${kind} ${name}${space}${link.text}}`; @@ -14389,7 +14396,7 @@ function getEffectiveTypeParameterDeclarations(node) { return emptyArray; } if (isJSDocTypeAlias(node)) { - Debug.assert(node.parent.kind === 329 /* JSDoc */); + Debug.assert(node.parent.kind === 332 /* JSDoc */); return flatMap(node.parent.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0); } if (node.typeParameters) { @@ -14417,7 +14424,7 @@ function isMemberName(node) { return node.kind === 79 /* Identifier */ || node.kind === 80 /* PrivateIdentifier */; } function isGetOrSetAccessorDeclaration(node) { - return node.kind === 178 /* SetAccessor */ || node.kind === 177 /* GetAccessor */; + return node.kind === 180 /* SetAccessor */ || node.kind === 179 /* GetAccessor */; } function isPropertyAccessChain(node) { return isPropertyAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); @@ -14430,7 +14437,7 @@ function isCallChain(node) { } function isOptionalChain(node) { const kind = node.kind; - return !!(node.flags & 32 /* OptionalChain */) && (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */ || kind === 213 /* CallExpression */ || kind === 236 /* NonNullExpression */); + return !!(node.flags & 32 /* OptionalChain */) && (kind === 213 /* PropertyAccessExpression */ || kind === 214 /* ElementAccessExpression */ || kind === 215 /* CallExpression */ || kind === 238 /* NonNullExpression */); } function isOptionalChainRoot(node) { return isOptionalChain(node) && !isNonNullExpression(node) && !!node.questionDotToken; @@ -14442,7 +14449,7 @@ function isOutermostOptionalChain(node) { return !isOptionalChain(node.parent) || isOptionalChainRoot(node.parent) || node !== node.parent.expression; } function isNullishCoalesce(node) { - return node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; + return node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; } function isConstTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "const" && !node.typeArguments; @@ -14454,34 +14461,34 @@ function isNonNullChain(node) { return isNonNullExpression(node) && !!(node.flags & 32 /* OptionalChain */); } function isBreakOrContinueStatement(node) { - return node.kind === 253 /* BreakStatement */ || node.kind === 252 /* ContinueStatement */; + return node.kind === 255 /* BreakStatement */ || node.kind === 254 /* ContinueStatement */; } function isNamedExportBindings(node) { - return node.kind === 283 /* NamespaceExport */ || node.kind === 282 /* NamedExports */; + return node.kind === 286 /* NamespaceExport */ || node.kind === 285 /* NamedExports */; } function isUnparsedTextLike(node) { switch (node.kind) { - case 311 /* UnparsedText */: - case 312 /* UnparsedInternalText */: + case 314 /* UnparsedText */: + case 315 /* UnparsedInternalText */: return true; default: return false; } } function isUnparsedNode(node) { - return isUnparsedTextLike(node) || node.kind === 309 /* UnparsedPrologue */ || node.kind === 313 /* UnparsedSyntheticReference */; + return isUnparsedTextLike(node) || node.kind === 312 /* UnparsedPrologue */ || node.kind === 316 /* UnparsedSyntheticReference */; } function isJSDocPropertyLikeTag(node) { - return node.kind === 356 /* JSDocPropertyTag */ || node.kind === 349 /* JSDocParameterTag */; + return node.kind === 359 /* JSDocPropertyTag */ || node.kind === 352 /* JSDocParameterTag */; } function isNode(node) { return isNodeKind(node.kind); } function isNodeKind(kind) { - return kind >= 165 /* FirstNode */; + return kind >= 166 /* FirstNode */; } function isTokenKind(kind) { - return kind >= 0 /* FirstToken */ && kind <= 164 /* LastToken */; + return kind >= 0 /* FirstToken */ && kind <= 165 /* LastToken */; } function isToken(n) { return isTokenKind(n.kind); @@ -14497,11 +14504,11 @@ function isLiteralExpression(node) { } function isLiteralExpressionOfObject(node) { switch (node.kind) { - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 211 /* ArrayLiteralExpression */: case 13 /* RegularExpressionLiteral */: - case 218 /* FunctionExpression */: - case 232 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 234 /* ClassExpression */: return true; } return false; @@ -14521,13 +14528,13 @@ function isImportOrExportSpecifier(node) { } function isTypeOnlyImportOrExportDeclaration(node) { switch (node.kind) { - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return node.parent.isTypeOnly; - case 276 /* ImportClause */: - case 274 /* ImportEqualsDeclaration */: + case 279 /* ImportClause */: + case 277 /* ImportEqualsDeclaration */: return node.isTypeOnly; default: return false; @@ -14583,15 +14590,15 @@ function isModifier(node) { } function isEntityName(node) { const kind = node.kind; - return kind === 165 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 166 /* 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 === 166 /* ComputedPropertyName */; + return kind === 79 /* Identifier */ || kind === 80 /* PrivateIdentifier */ || kind === 10 /* StringLiteral */ || kind === 8 /* NumericLiteral */ || kind === 167 /* ComputedPropertyName */; } function isBindingName(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 206 /* ObjectBindingPattern */ || kind === 207 /* ArrayBindingPattern */; + return kind === 79 /* Identifier */ || kind === 208 /* ObjectBindingPattern */ || kind === 209 /* ArrayBindingPattern */; } function isFunctionLike(node) { return !!node && isFunctionLikeKind(node.kind); @@ -14607,13 +14614,13 @@ function isBooleanLiteral(node) { } function isFunctionLikeDeclarationKind(kind) { switch (kind) { - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return true; default: return false; @@ -14621,14 +14628,14 @@ function isFunctionLikeDeclarationKind(kind) { } function isFunctionLikeKind(kind) { switch (kind) { - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 332 /* JSDocSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 184 /* FunctionType */: - case 326 /* JSDocFunctionType */: - case 185 /* ConstructorType */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 335 /* JSDocSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: + case 186 /* FunctionType */: + case 329 /* JSDocFunctionType */: + case 187 /* ConstructorType */: return true; default: return isFunctionLikeDeclarationKind(kind); @@ -14639,29 +14646,33 @@ function isFunctionOrModuleBlock(node) { } function isAnnotationElement(node) { const kind = node.kind; - return kind === 172 /* AnnotationPropertyDeclaration */; + return kind === 173 /* AnnotationPropertyDeclaration */; +} +function isOverloadElement(node) { + const kind = node.kind; + return kind === 174 /* OverloadPropertyDeclaration */; } function isClassElement(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 171 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 241 /* SemicolonClassElement */; + return kind === 178 /* Constructor */ || kind === 172 /* PropertyDeclaration */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 183 /* IndexSignature */ || kind === 177 /* ClassStaticBlockDeclaration */ || kind === 243 /* SemicolonClassElement */; } function isClassLike(node) { - return node && (node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */ || node.kind === 265 /* StructDeclaration */); + return node && (node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */ || node.kind === 267 /* StructDeclaration */); } function isStruct(node) { - return node && node.kind === 265 /* StructDeclaration */; + return node && node.kind === 267 /* StructDeclaration */; } function isAccessor(node) { - return node && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */); + return node && (node.kind === 179 /* GetAccessor */ || node.kind === 180 /* SetAccessor */); } function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); } function isMethodOrAccessor(node) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return true; default: return false; @@ -14669,10 +14680,10 @@ function isMethodOrAccessor(node) { } function isNamedClassElement(node) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 171 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 172 /* PropertyDeclaration */: return true; default: return false; @@ -14683,22 +14694,22 @@ function isModifierLike(node) { } function isTypeElement(node) { const kind = node.kind; - return kind === 180 /* ConstructSignature */ || kind === 179 /* CallSignature */ || kind === 170 /* PropertySignature */ || kind === 173 /* MethodSignature */ || kind === 181 /* IndexSignature */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 182 /* ConstructSignature */ || kind === 181 /* CallSignature */ || kind === 171 /* PropertySignature */ || kind === 175 /* MethodSignature */ || kind === 183 /* IndexSignature */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function isClassOrTypeElement(node) { return isTypeElement(node) || isClassElement(node); } function isObjectLiteralElementLike(node) { const kind = node.kind; - return kind === 305 /* PropertyAssignment */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 307 /* SpreadAssignment */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 308 /* PropertyAssignment */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 310 /* SpreadAssignment */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } function isFunctionOrConstructorTypeNode(node) { switch (node.kind) { - case 184 /* FunctionType */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: return true; } return false; @@ -14706,23 +14717,23 @@ function isFunctionOrConstructorTypeNode(node) { function isBindingPattern(node) { if (node) { const kind = node.kind; - return kind === 207 /* ArrayBindingPattern */ || kind === 206 /* ObjectBindingPattern */; + return kind === 209 /* ArrayBindingPattern */ || kind === 208 /* ObjectBindingPattern */; } return false; } function isAssignmentPattern(node) { const kind = node.kind; - return kind === 209 /* ArrayLiteralExpression */ || kind === 210 /* ObjectLiteralExpression */; + return kind === 211 /* ArrayLiteralExpression */ || kind === 212 /* ObjectLiteralExpression */; } function isArrayBindingElement(node) { const kind = node.kind; - return kind === 208 /* BindingElement */ || kind === 233 /* OmittedExpression */; + return kind === 210 /* BindingElement */ || kind === 235 /* OmittedExpression */; } function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: return true; } return false; @@ -14732,78 +14743,78 @@ function isBindingOrAssignmentPattern(node) { } function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 206 /* ObjectBindingPattern */: - case 210 /* ObjectLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 212 /* ObjectLiteralExpression */: return true; } return false; } function isObjectBindingOrAssignmentElement(node) { switch (node.kind) { - case 208 /* BindingElement */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 307 /* SpreadAssignment */: + case 210 /* BindingElement */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 310 /* SpreadAssignment */: return true; } return false; } function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 209 /* ArrayBindingPattern */: + case 211 /* ArrayLiteralExpression */: return true; } return false; } function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) { const kind = node.kind; - return kind === 211 /* PropertyAccessExpression */ || kind === 165 /* QualifiedName */ || kind === 205 /* ImportType */; + return kind === 213 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */ || kind === 207 /* ImportType */; } function isPropertyAccessOrQualifiedName(node) { const kind = node.kind; - return kind === 211 /* PropertyAccessExpression */ || kind === 165 /* QualifiedName */; + return kind === 213 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */; } function isCallLikeExpression(node) { switch (node.kind) { - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 169 /* Decorator */: - case 220 /* EtsComponentExpression */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 217 /* TaggedTemplateExpression */: + case 170 /* Decorator */: + case 222 /* EtsComponentExpression */: return true; default: return false; } } function isCallOrNewExpression(node) { - return node.kind === 213 /* CallExpression */ || node.kind === 214 /* NewExpression */; + return node.kind === 215 /* CallExpression */ || node.kind === 216 /* NewExpression */; } function isTemplateLiteral(node) { const kind = node.kind; - return kind === 229 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; + return kind === 231 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); } function isLeftHandSideExpressionKind(kind) { switch (kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 214 /* NewExpression */: - case 213 /* CallExpression */: - case 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: - case 215 /* TaggedTemplateExpression */: - case 209 /* ArrayLiteralExpression */: - case 217 /* ParenthesizedExpression */: - case 210 /* ObjectLiteralExpression */: - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 220 /* EtsComponentExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 216 /* NewExpression */: + case 215 /* CallExpression */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: + case 217 /* TaggedTemplateExpression */: + case 211 /* ArrayLiteralExpression */: + case 219 /* ParenthesizedExpression */: + case 212 /* ObjectLiteralExpression */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 222 /* EtsComponentExpression */: case 79 /* Identifier */: case 80 /* PrivateIdentifier */: case 13 /* RegularExpressionLiteral */: @@ -14811,15 +14822,15 @@ function isLeftHandSideExpressionKind(kind) { case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: case 96 /* FalseKeyword */: case 105 /* NullKeyword */: case 109 /* ThisKeyword */: case 111 /* TrueKeyword */: case 107 /* SuperKeyword */: - case 236 /* NonNullExpression */: - case 234 /* ExpressionWithTypeArguments */: - case 237 /* MetaProperty */: + case 238 /* NonNullExpression */: + case 236 /* ExpressionWithTypeArguments */: + case 239 /* MetaProperty */: case 101 /* ImportKeyword */: return true; default: @@ -14831,13 +14842,13 @@ function isUnaryExpression(node) { } function isUnaryExpressionKind(kind) { switch (kind) { - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: - case 221 /* DeleteExpression */: - case 222 /* TypeOfExpression */: - case 223 /* VoidExpression */: - case 224 /* AwaitExpression */: - case 216 /* TypeAssertionExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: + case 223 /* DeleteExpression */: + case 224 /* TypeOfExpression */: + case 225 /* VoidExpression */: + case 226 /* AwaitExpression */: + case 218 /* TypeAssertionExpression */: return true; default: return isLeftHandSideExpressionKind(kind); @@ -14845,9 +14856,9 @@ function isUnaryExpressionKind(kind) { } function isUnaryExpressionWithWrite(expr) { switch (expr.kind) { - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return true; - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return expr.operator === 45 /* PlusPlusToken */ || expr.operator === 46 /* MinusMinusToken */; default: return false; @@ -14858,16 +14869,16 @@ function isExpression(node) { } function isExpressionKind(kind) { switch (kind) { - case 228 /* ConditionalExpression */: - case 230 /* YieldExpression */: - case 219 /* ArrowFunction */: - case 227 /* BinaryExpression */: - case 231 /* SpreadElement */: - case 235 /* AsExpression */: - case 233 /* OmittedExpression */: - case 360 /* CommaListExpression */: - case 359 /* PartiallyEmittedExpression */: - case 239 /* SatisfiesExpression */: + case 230 /* ConditionalExpression */: + case 232 /* YieldExpression */: + case 221 /* ArrowFunction */: + case 229 /* BinaryExpression */: + case 233 /* SpreadElement */: + case 237 /* AsExpression */: + case 235 /* OmittedExpression */: + case 363 /* CommaListExpression */: + case 362 /* PartiallyEmittedExpression */: + case 241 /* SatisfiesExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -14875,20 +14886,20 @@ function isExpressionKind(kind) { } function isAssertionExpression(node) { const kind = node.kind; - return kind === 216 /* TypeAssertionExpression */ || kind === 235 /* AsExpression */; + return kind === 218 /* TypeAssertionExpression */ || kind === 237 /* AsExpression */; } function isNotEmittedOrPartiallyEmittedNode(node) { return isNotEmittedStatement(node) || isPartiallyEmittedExpression(node); } function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return true; - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -14947,7 +14958,7 @@ function allImportsAreAnnotations(imports, resolver) { }); } function isForInOrOfStatement(node) { - return node.kind === 250 /* ForInStatement */ || node.kind === 251 /* ForOfStatement */; + return node.kind === 252 /* ForInStatement */ || node.kind === 253 /* ForOfStatement */; } function isConciseBody(node) { return isBlock(node) || isExpression(node); @@ -14960,35 +14971,35 @@ function isForInitializer(node) { } function isModuleBody(node) { const kind = node.kind; - return kind === 271 /* ModuleBlock */ || kind === 270 /* ModuleDeclaration */ || kind === 79 /* Identifier */; + return kind === 274 /* ModuleBlock */ || kind === 273 /* ModuleDeclaration */ || kind === 79 /* Identifier */; } function isNamespaceBody(node) { const kind = node.kind; - return kind === 271 /* ModuleBlock */ || kind === 270 /* ModuleDeclaration */; + return kind === 274 /* ModuleBlock */ || kind === 273 /* ModuleDeclaration */; } function isJSDocNamespaceBody(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 270 /* ModuleDeclaration */; + return kind === 79 /* Identifier */ || kind === 273 /* ModuleDeclaration */; } function isNamedImportBindings(node) { const kind = node.kind; - return kind === 278 /* NamedImports */ || kind === 277 /* NamespaceImport */; + return kind === 281 /* NamedImports */ || kind === 280 /* NamespaceImport */; } function isModuleOrEnumDeclaration(node) { - return node.kind === 270 /* ModuleDeclaration */ || node.kind === 269 /* EnumDeclaration */; + return node.kind === 273 /* ModuleDeclaration */ || node.kind === 272 /* EnumDeclaration */; } function isDeclarationKind(kind) { - return kind === 219 /* ArrowFunction */ || kind === 208 /* BindingElement */ || kind === 264 /* ClassDeclaration */ || kind === 232 /* ClassExpression */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 265 /* StructDeclaration */ || kind === 266 /* AnnotationDeclaration */ || kind === 176 /* Constructor */ || kind === 269 /* EnumDeclaration */ || kind === 308 /* EnumMember */ || kind === 284 /* ExportSpecifier */ || kind === 263 /* FunctionDeclaration */ || kind === 218 /* FunctionExpression */ || kind === 177 /* GetAccessor */ || kind === 276 /* ImportClause */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 279 /* ImportSpecifier */ || kind === 267 /* InterfaceDeclaration */ || kind === 294 /* JsxAttribute */ || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 270 /* ModuleDeclaration */ || kind === 273 /* NamespaceExportDeclaration */ || kind === 277 /* NamespaceImport */ || kind === 283 /* NamespaceExport */ || kind === 168 /* Parameter */ || kind === 305 /* PropertyAssignment */ || kind === 171 /* PropertyDeclaration */ || kind === 172 /* AnnotationPropertyDeclaration */ || kind === 170 /* PropertySignature */ || kind === 178 /* SetAccessor */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 268 /* TypeAliasDeclaration */ || kind === 167 /* TypeParameter */ || kind === 261 /* VariableDeclaration */ || kind === 354 /* JSDocTypedefTag */ || kind === 347 /* JSDocCallbackTag */ || kind === 356 /* JSDocPropertyTag */; + return kind === 221 /* ArrowFunction */ || kind === 210 /* BindingElement */ || kind === 266 /* ClassDeclaration */ || kind === 234 /* ClassExpression */ || kind === 177 /* ClassStaticBlockDeclaration */ || kind === 267 /* StructDeclaration */ || kind === 268 /* AnnotationDeclaration */ || kind === 174 /* OverloadPropertyDeclaration */ || kind === 178 /* Constructor */ || kind === 272 /* EnumDeclaration */ || kind === 311 /* EnumMember */ || kind === 287 /* ExportSpecifier */ || kind === 265 /* FunctionDeclaration */ || kind === 220 /* FunctionExpression */ || kind === 179 /* GetAccessor */ || kind === 279 /* ImportClause */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 282 /* ImportSpecifier */ || kind === 270 /* InterfaceDeclaration */ || kind === 297 /* JsxAttribute */ || kind === 176 /* MethodDeclaration */ || kind === 175 /* MethodSignature */ || kind === 273 /* ModuleDeclaration */ || kind === 276 /* NamespaceExportDeclaration */ || kind === 280 /* NamespaceImport */ || kind === 286 /* NamespaceExport */ || kind === 169 /* Parameter */ || kind === 308 /* PropertyAssignment */ || kind === 172 /* PropertyDeclaration */ || kind === 173 /* AnnotationPropertyDeclaration */ || kind === 171 /* PropertySignature */ || kind === 180 /* SetAccessor */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 271 /* TypeAliasDeclaration */ || kind === 168 /* TypeParameter */ || kind === 263 /* VariableDeclaration */ || kind === 357 /* JSDocTypedefTag */ || kind === 350 /* JSDocCallbackTag */ || kind === 359 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { - return kind === 263 /* FunctionDeclaration */ || kind === 285 /* MissingDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 265 /* StructDeclaration */ || kind === 266 /* AnnotationDeclaration */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 269 /* EnumDeclaration */ || kind === 270 /* ModuleDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 281 /* ExportDeclaration */ || kind === 280 /* ExportAssignment */ || kind === 273 /* NamespaceExportDeclaration */; + return kind === 265 /* FunctionDeclaration */ || kind === 288 /* MissingDeclaration */ || kind === 266 /* ClassDeclaration */ || kind === 267 /* StructDeclaration */ || kind === 268 /* AnnotationDeclaration */ || kind === 269 /* OverloadDeclaration */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 272 /* EnumDeclaration */ || kind === 273 /* ModuleDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 284 /* ExportDeclaration */ || kind === 283 /* ExportAssignment */ || kind === 276 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 253 /* BreakStatement */ || kind === 252 /* ContinueStatement */ || kind === 260 /* DebuggerStatement */ || kind === 247 /* DoStatement */ || kind === 245 /* ExpressionStatement */ || kind === 243 /* EmptyStatement */ || kind === 250 /* ForInStatement */ || kind === 251 /* ForOfStatement */ || kind === 249 /* ForStatement */ || kind === 246 /* IfStatement */ || kind === 257 /* LabeledStatement */ || kind === 254 /* ReturnStatement */ || kind === 256 /* SwitchStatement */ || kind === 258 /* ThrowStatement */ || kind === 259 /* TryStatement */ || kind === 244 /* VariableStatement */ || kind === 248 /* WhileStatement */ || kind === 255 /* WithStatement */ || kind === 358 /* NotEmittedStatement */ || kind === 362 /* EndOfDeclarationMarker */ || kind === 361 /* MergeDeclarationMarker */; + return kind === 255 /* BreakStatement */ || kind === 254 /* ContinueStatement */ || kind === 262 /* DebuggerStatement */ || kind === 249 /* DoStatement */ || kind === 247 /* ExpressionStatement */ || kind === 245 /* EmptyStatement */ || kind === 252 /* ForInStatement */ || kind === 253 /* ForOfStatement */ || kind === 251 /* ForStatement */ || kind === 248 /* IfStatement */ || kind === 259 /* LabeledStatement */ || kind === 256 /* ReturnStatement */ || kind === 258 /* SwitchStatement */ || kind === 260 /* ThrowStatement */ || kind === 261 /* TryStatement */ || kind === 246 /* VariableStatement */ || kind === 250 /* WhileStatement */ || kind === 257 /* WithStatement */ || kind === 361 /* NotEmittedStatement */ || kind === 365 /* EndOfDeclarationMarker */ || kind === 364 /* MergeDeclarationMarker */; } function isDeclaration(node) { - if (node.kind === 167 /* TypeParameter */) { - return node.parent && node.parent.kind !== 353 /* JSDocTemplateTag */ || isInJSFile(node); + if (node.kind === 168 /* TypeParameter */) { + return node.parent && node.parent.kind !== 356 /* JSDocTemplateTag */ || isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -15003,10 +15014,10 @@ function isStatement(node) { return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); } function isBlockStatement(node) { - if (node.kind !== 242 /* Block */) + if (node.kind !== 244 /* Block */) return false; if (node.parent !== void 0) { - if (node.parent.kind === 259 /* TryStatement */ || node.parent.kind === 301 /* CatchClause */) { + if (node.parent.kind === 261 /* TryStatement */ || node.parent.kind === 304 /* CatchClause */) { return false; } } @@ -15014,50 +15025,50 @@ function isBlockStatement(node) { } function isStatementOrBlock(node) { const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 242 /* Block */; + return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 244 /* Block */; } function isModuleReference(node) { const kind = node.kind; - return kind === 286 /* ExternalModuleReference */ || kind === 165 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 289 /* ExternalModuleReference */ || kind === 166 /* QualifiedName */ || kind === 79 /* Identifier */; } function isJsxTagNameExpression(node) { const kind = node.kind; - return kind === 109 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 211 /* PropertyAccessExpression */; + return kind === 109 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 213 /* PropertyAccessExpression */; } function isJsxChild(node) { const kind = node.kind; - return kind === 287 /* JsxElement */ || kind === 297 /* JsxExpression */ || kind === 288 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 291 /* JsxFragment */; + return kind === 290 /* JsxElement */ || kind === 300 /* JsxExpression */ || kind === 291 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 294 /* JsxFragment */; } function isJsxAttributeLike(node) { const kind = node.kind; - return kind === 294 /* JsxAttribute */ || kind === 296 /* JsxSpreadAttribute */; + return kind === 297 /* JsxAttribute */ || kind === 299 /* JsxSpreadAttribute */; } function isStringLiteralOrJsxExpression(node) { const kind = node.kind; - return kind === 10 /* StringLiteral */ || kind === 297 /* JsxExpression */; + return kind === 10 /* StringLiteral */ || kind === 300 /* JsxExpression */; } function isJsxOpeningLikeElement(node) { const kind = node.kind; - return kind === 289 /* JsxOpeningElement */ || kind === 288 /* JsxSelfClosingElement */; + return kind === 292 /* JsxOpeningElement */ || kind === 291 /* JsxSelfClosingElement */; } function isCaseOrDefaultClause(node) { const kind = node.kind; - return kind === 298 /* CaseClause */ || kind === 299 /* DefaultClause */; + return kind === 301 /* CaseClause */ || kind === 302 /* DefaultClause */; } function isJSDocNode(node) { - return node.kind >= 318 /* FirstJSDocNode */ && node.kind <= 356 /* LastJSDocNode */; + return node.kind >= 321 /* FirstJSDocNode */ && node.kind <= 359 /* LastJSDocNode */; } function isJSDocCommentContainingNode(node) { - return node.kind === 329 /* JSDoc */ || node.kind === 328 /* JSDocNamepathType */ || node.kind === 330 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 332 /* JSDoc */ || node.kind === 331 /* JSDocNamepathType */ || node.kind === 333 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } function isJSDocTag(node) { - return node.kind >= 336 /* FirstJSDocTagNode */ && node.kind <= 356 /* LastJSDocTagNode */; + return node.kind >= 339 /* FirstJSDocTagNode */ && node.kind <= 359 /* LastJSDocTagNode */; } function isSetAccessor(node) { - return node.kind === 178 /* SetAccessor */; + return node.kind === 180 /* SetAccessor */; } function isGetAccessor(node) { - return node.kind === 177 /* GetAccessor */; + return node.kind === 179 /* GetAccessor */; } function hasJSDocNodes(node) { const { jsDoc } = node; @@ -15071,23 +15082,23 @@ function hasInitializer(node) { } function hasOnlyExpressionInitializer(node) { switch (node.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 305 /* PropertyAssignment */: - case 308 /* EnumMember */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 308 /* PropertyAssignment */: + case 311 /* EnumMember */: return true; default: return false; } } function isObjectLiteralElement(node) { - return node.kind === 294 /* JsxAttribute */ || node.kind === 296 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); + return node.kind === 297 /* JsxAttribute */ || node.kind === 299 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); } function isTypeReferenceType(node) { - return node.kind === 183 /* TypeReference */ || node.kind === 234 /* ExpressionWithTypeArguments */; + return node.kind === 185 /* TypeReference */ || node.kind === 236 /* ExpressionWithTypeArguments */; } var MAX_SMI_X86 = 1073741823; function guessIndentation(lines) { @@ -15115,7 +15126,7 @@ function isStringLiteralLike(node) { return node.kind === 10 /* StringLiteral */ || node.kind === 14 /* NoSubstitutionTemplateLiteral */; } function isJSDocLinkLike(node) { - return node.kind === 333 /* JSDocLink */ || node.kind === 334 /* JSDocLinkCode */ || node.kind === 335 /* JSDocLinkPlain */; + return node.kind === 336 /* JSDocLink */ || node.kind === 337 /* JSDocLinkCode */ || node.kind === 338 /* JSDocLinkPlain */; } function hasRestParameter(s) { const last2 = lastOrUndefined(s.parameters); @@ -15123,7 +15134,7 @@ function hasRestParameter(s) { } function isRestParameter(node) { const type = isJSDocParameterTag(node) ? node.typeExpression && node.typeExpression.type : node.type; - return node.dotDotDotToken !== void 0 || !!type && type.kind === 327 /* JSDocVariadicType */; + return node.dotDotDotToken !== void 0 || !!type && type.kind === 330 /* JSDocVariadicType */; } var _MemoryUtils = class { static tryGC() { @@ -15347,7 +15358,7 @@ function aggregateChildData(node) { } } function getSourceFileOfNode(node) { - while (node && node.kind !== 314 /* SourceFile */) { + while (node && node.kind !== 317 /* SourceFile */) { node = node.parent; } return node; @@ -15360,11 +15371,11 @@ function isPlainJsFile(file, checkJs) { } function isStatementWithLocals(node) { switch (node.kind) { - case 242 /* Block */: - case 272 /* CaseBlock */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 244 /* Block */: + case 275 /* CaseBlock */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: return true; } return false; @@ -15521,7 +15532,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) { if (includeJsDoc && hasJSDocNodes(node)) { return getTokenPosOfNode(node.jsDoc[0], sourceFile); } - if (node.kind === 357 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 360 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return node.virtual ? node.pos : skipTrivia( @@ -15724,7 +15735,7 @@ function isBlockOrCatchScoped(declaration) { } function isCatchClauseVariableDeclarationOrBindingElement(declaration) { const node = getRootDeclaration(declaration); - return node.kind === 261 /* VariableDeclaration */ && node.parent.kind === 301 /* CatchClause */; + return node.kind === 263 /* VariableDeclaration */ && node.parent.kind === 304 /* CatchClause */; } function isAmbientModule(node) { return isModuleDeclaration(node) && (node.name.kind === 10 /* StringLiteral */ || isGlobalScopeAugmentation(node)); @@ -15742,10 +15753,10 @@ function isShorthandAmbientModuleSymbol(moduleSymbol) { return isShorthandAmbientModule(moduleSymbol.valueDeclaration); } function isShorthandAmbientModule(node) { - return !!node && node.kind === 270 /* ModuleDeclaration */ && !node.body; + return !!node && node.kind === 273 /* ModuleDeclaration */ && !node.body; } function isBlockScopedContainerTopLevel(node) { - return node.kind === 314 /* SourceFile */ || node.kind === 270 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); + return node.kind === 317 /* SourceFile */ || node.kind === 273 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); } function isGlobalScopeAugmentation(module2) { return !!(module2.flags & 1024 /* GlobalAugmentation */); @@ -15755,9 +15766,9 @@ function isExternalModuleAugmentation(node) { } function isModuleAugmentationExternal(node) { switch (node.parent.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: return isExternalModule(node.parent); - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); } return false; @@ -15805,34 +15816,34 @@ function isAmbientPropertyDeclaration(node) { } function isBlockScope(node, parentNode) { switch (node.kind) { - case 314 /* SourceFile */: - case 272 /* CaseBlock */: - case 301 /* CatchClause */: - case 270 /* ModuleDeclaration */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 175 /* ClassStaticBlockDeclaration */: + case 317 /* SourceFile */: + case 275 /* CaseBlock */: + case 304 /* CatchClause */: + case 273 /* ModuleDeclaration */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return true; - case 242 /* Block */: + case 244 /* Block */: return !isFunctionLikeOrClassStaticBlockDeclaration(parentNode); } return false; } function isDeclarationWithTypeParameters(node) { switch (node.kind) { - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: - case 332 /* JSDocSignature */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: + case 335 /* JSDocSignature */: return true; default: assertType(node); @@ -15841,26 +15852,26 @@ function isDeclarationWithTypeParameters(node) { } function isDeclarationWithTypeParameterChildren(node) { switch (node.kind) { - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 326 /* JSDocFunctionType */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 353 /* JSDocTemplateTag */: - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 175 /* MethodSignature */: + case 183 /* IndexSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 329 /* JSDocFunctionType */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 356 /* JSDocTemplateTag */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return true; default: assertType(node); @@ -15869,8 +15880,8 @@ function isDeclarationWithTypeParameterChildren(node) { } function isAnyImportSyntax(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: return true; default: return false; @@ -15881,17 +15892,18 @@ function isAnyImportOrBareOrAccessedRequire(node) { } function isLateVisibilityPaintedStatement(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 244 /* VariableStatement */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 263 /* FunctionDeclaration */: - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 246 /* VariableStatement */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 265 /* FunctionDeclaration */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: return true; default: return false; @@ -15924,7 +15936,7 @@ function getNameFromIndexInfo(info) { return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : void 0; } function isComputedNonLiteralName(name) { - return name.kind === 166 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); + return name.kind === 167 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); } function tryGetTextOfPropertyName(name) { switch (name.kind) { @@ -15935,7 +15947,7 @@ function tryGetTextOfPropertyName(name) { case 8 /* NumericLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return void 0; @@ -15953,15 +15965,15 @@ function entityNameToString(name) { case 80 /* PrivateIdentifier */: case 79 /* Identifier */: return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { return Debug.assertNever(name.name); } - case 320 /* JSDocMemberName */: + case 323 /* JSDocMemberName */: return entityNameToString(name.left) + entityNameToString(name.right); default: return Debug.assertNever(name); @@ -16041,7 +16053,7 @@ function getSpanOfTokenAtPosition(sourceFile, pos) { } function getErrorSpanForArrowFunction(sourceFile, node) { const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 242 /* Block */) { + if (node.body && node.body.kind === 244 /* Block */) { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { @@ -16053,37 +16065,37 @@ function getErrorSpanForArrowFunction(sourceFile, node) { function getErrorSpanForNode(sourceFile, node) { let errorNode = node; switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: const pos2 = skipTrivia(sourceFile.text, 0, false); if (pos2 === sourceFile.text.length) { return createTextSpan(0, 0); } return getSpanOfTokenAtPosition(sourceFile, pos2); - case 261 /* VariableDeclaration */: - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 268 /* TypeAliasDeclaration */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: - case 277 /* NamespaceImport */: + case 263 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 271 /* TypeAliasDeclaration */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 171 /* PropertySignature */: + case 280 /* NamespaceImport */: errorNode = node.name; break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: const start2 = skipTrivia(sourceFile.text, node.pos); const end = node.statements.length > 0 ? node.statements[0].pos : node.end; return createTextSpanFromBounds(start2, end); @@ -16125,10 +16137,10 @@ function isLet(node) { return !!(getCombinedNodeFlags(node) & 1 /* Let */); } function isSuperCall(n) { - return n.kind === 213 /* CallExpression */ && n.expression.kind === 107 /* SuperKeyword */; + return n.kind === 215 /* CallExpression */ && n.expression.kind === 107 /* SuperKeyword */; } function isImportCall(n) { - return n.kind === 213 /* CallExpression */ && n.expression.kind === 101 /* ImportKeyword */; + return n.kind === 215 /* CallExpression */ && n.expression.kind === 101 /* ImportKeyword */; } function isImportMeta(n) { return isMetaProperty(n) && n.keywordToken === 101 /* ImportKeyword */ && n.name.escapedText === "meta"; @@ -16137,7 +16149,7 @@ function isLiteralImportTypeNode(n) { return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); } function isPrologueDirective(node) { - return node.kind === 245 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; + return node.kind === 247 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; } function isCustomPrologue(node) { return !!(getEmitFlags(node) & 1048576 /* CustomPrologue */); @@ -16152,7 +16164,7 @@ function isHoistedVariableStatement(node) { return isCustomPrologue(node) && isVariableStatement(node) && every(node.declarationList.declarations, isHoistedVariable); } function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 168 /* Parameter */ || node.kind === 167 /* TypeParameter */ || node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */ || node.kind === 217 /* ParenthesizedExpression */ || node.kind === 261 /* VariableDeclaration */ || node.kind === 284 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); + const commentRanges = node.kind === 169 /* Parameter */ || node.kind === 168 /* TypeParameter */ || node.kind === 220 /* FunctionExpression */ || node.kind === 221 /* ArrowFunction */ || node.kind === 219 /* ParenthesizedExpression */ || node.kind === 263 /* VariableDeclaration */ || node.kind === 287 /* 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*/; @@ -16160,7 +16172,7 @@ var fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*/; var defaultLibReferenceRegEx = /^(\/\/\/\s*/; function isPartOfTypeNode(node) { - if (182 /* FirstTypeNode */ <= node.kind && node.kind <= 205 /* LastTypeNode */) { + if (184 /* FirstTypeNode */ <= node.kind && node.kind <= 207 /* LastTypeNode */) { return true; } switch (node.kind) { @@ -16176,65 +16188,65 @@ function isPartOfTypeNode(node) { case 145 /* NeverKeyword */: return true; case 115 /* VoidKeyword */: - return node.parent.kind !== 223 /* VoidExpression */; - case 234 /* ExpressionWithTypeArguments */: + return node.parent.kind !== 225 /* VoidExpression */; + case 236 /* ExpressionWithTypeArguments */: return isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 167 /* TypeParameter */: - return node.parent.kind === 200 /* MappedType */ || node.parent.kind === 195 /* InferType */; + case 168 /* TypeParameter */: + return node.parent.kind === 202 /* MappedType */ || node.parent.kind === 197 /* InferType */; case 79 /* Identifier */: - if (node.parent.kind === 165 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node) { node = node.parent; - } else if (node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node) { + } else if (node.parent.kind === 213 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } Debug.assert( - node.kind === 79 /* Identifier */ || node.kind === 165 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, + node.kind === 79 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 213 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'." ); - case 165 /* QualifiedName */: - case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: case 109 /* ThisKeyword */: { const { parent: parent2 } = node; - if (parent2.kind === 186 /* TypeQuery */) { + if (parent2.kind === 188 /* TypeQuery */) { return false; } - if (parent2.kind === 205 /* ImportType */) { + if (parent2.kind === 207 /* ImportType */) { return !parent2.isTypeOf; } - if (182 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 205 /* LastTypeNode */) { + if (184 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 207 /* LastTypeNode */) { return true; } switch (parent2.kind) { - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return isHeritageClause(parent2.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent2); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return node === parent2.constraint; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return node === parent2.constraint; - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 168 /* Parameter */: - case 261 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 169 /* Parameter */: + case 263 /* VariableDeclaration */: return node === parent2.type; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return node === parent2.type; - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: return node === parent2.type; - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: return node === parent2.type; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: return contains(parent2.typeArguments, node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return false; } } @@ -16254,23 +16266,23 @@ function forEachReturnStatement(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return visitor(node); - case 272 /* CaseBlock */: - case 242 /* Block */: - case 246 /* IfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 255 /* WithStatement */: - case 256 /* SwitchStatement */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 257 /* LabeledStatement */: - case 259 /* TryStatement */: - case 301 /* CatchClause */: + case 275 /* CaseBlock */: + case 244 /* Block */: + case 248 /* IfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 257 /* WithStatement */: + case 258 /* SwitchStatement */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 259 /* LabeledStatement */: + case 261 /* TryStatement */: + case 304 /* CatchClause */: return forEachChild(node, traverse); } } @@ -16279,21 +16291,21 @@ function forEachYieldExpression(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: visitor(node); const operand = node.expression; if (operand) { traverse(operand); } return; - case 269 /* EnumDeclaration */: - case 267 /* InterfaceDeclaration */: - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 270 /* InterfaceDeclaration */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: return; default: if (isFunctionLike(node)) { - if (node.name && node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { traverse(node.name.expression); return; } @@ -16304,9 +16316,9 @@ function forEachYieldExpression(body, visitor) { } } function getRestParameterElementType(node) { - if (node && node.kind === 188 /* ArrayType */) { + if (node && node.kind === 190 /* ArrayType */) { return node.elementType; - } else if (node && node.kind === 183 /* TypeReference */) { + } else if (node && node.kind === 185 /* TypeReference */) { return singleOrUndefined(node.typeArguments); } else { return void 0; @@ -16314,27 +16326,27 @@ function getRestParameterElementType(node) { } function getMembersOfDeclaration(node) { switch (node.kind) { - case 267 /* InterfaceDeclaration */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 187 /* TypeLiteral */: + case 270 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 189 /* TypeLiteral */: return node.members; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return node.properties; } } function isVariableLike(node) { if (node) { switch (node.kind) { - case 208 /* BindingElement */: - case 308 /* EnumMember */: - case 168 /* Parameter */: - case 305 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 306 /* ShorthandPropertyAssignment */: - case 261 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 311 /* EnumMember */: + case 169 /* Parameter */: + case 308 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 309 /* ShorthandPropertyAssignment */: + case 263 /* VariableDeclaration */: return true; } } @@ -16344,7 +16356,7 @@ function isVariableLikeOrAccessor(node) { return isVariableLike(node) || isAccessor(node); } function isVariableDeclarationInVariableStatement(node) { - return node.parent.kind === 262 /* VariableDeclarationList */ && node.parent.parent.kind === 244 /* VariableStatement */; + return node.parent.kind === 264 /* VariableDeclarationList */ && node.parent.parent.kind === 246 /* VariableStatement */; } function isCommonJsExportedExpression(node) { if (!isInJSFile(node)) @@ -16361,13 +16373,13 @@ function isValidESSymbolDeclaration(node) { } function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return true; } return false; @@ -16377,20 +16389,20 @@ function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) { if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 257 /* LabeledStatement */) { + if (node.statement.kind !== 259 /* LabeledStatement */) { return node.statement; } node = node.statement; } } function isFunctionBlock(node) { - return node && node.kind === 242 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 244 /* Block */ && isFunctionLike(node.parent); } function isObjectLiteralMethod(node) { - return node && node.kind === 174 /* MethodDeclaration */ && node.parent.kind === 210 /* ObjectLiteralExpression */; + return node && node.kind === 176 /* MethodDeclaration */ && node.parent.kind === 212 /* ObjectLiteralExpression */; } function isObjectLiteralOrClassExpressionMethodOrAccessor(node) { - return (node.kind === 174 /* MethodDeclaration */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */) && (node.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.kind === 232 /* ClassExpression */); + return (node.kind === 176 /* MethodDeclaration */ || node.kind === 179 /* GetAccessor */ || node.kind === 180 /* SetAccessor */) && (node.parent.kind === 212 /* ObjectLiteralExpression */ || node.parent.kind === 234 /* ClassExpression */); } function isIdentifierTypePredicate(predicate) { return predicate && predicate.kind === 1 /* Identifier */; @@ -16400,7 +16412,7 @@ function isThisTypePredicate(predicate) { } function getPropertyAssignment(objectLiteral, key, key2) { return objectLiteral.properties.filter((property) => { - if (property.kind === 305 /* PropertyAssignment */) { + if (property.kind === 308 /* PropertyAssignment */) { const propName = tryGetTextOfPropertyName(property.name); return key === propName || !!key2 && key2 === propName; } @@ -16450,63 +16462,63 @@ function getContainingStruct(node) { return findAncestor(node.parent, isStruct); } function getThisContainer(node, includeArrowFunctions) { - Debug.assert(node.kind !== 314 /* SourceFile */); + Debug.assert(node.kind !== 317 /* SourceFile */); while (true) { node = node.parent; if (!node) { return Debug.fail(); } switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (isClassLike(node.parent.parent)) { return node; } node = node.parent; break; - case 169 /* Decorator */: - if (node.parent.kind === 168 /* Parameter */ && isClassElement(node.parent.parent)) { + case 170 /* Decorator */: + if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 270 /* ModuleDeclaration */: - case 175 /* ClassStaticBlockDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 269 /* EnumDeclaration */: - case 314 /* SourceFile */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 273 /* ModuleDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: + case 272 /* EnumDeclaration */: + case 317 /* SourceFile */: return node; } } } function isThisContainerOrFunctionBlock(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 171 /* PropertyDeclaration */: + case 221 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 172 /* PropertyDeclaration */: return true; - case 242 /* Block */: + case 244 /* Block */: switch (node.parent.kind) { - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return true; default: return false; @@ -16526,9 +16538,9 @@ function getNewTargetContainer(node) { const container = getThisContainer(node, false); if (container) { switch (container.kind) { - case 176 /* Constructor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 178 /* Constructor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return container; } } @@ -16541,26 +16553,26 @@ function getSuperContainer(node, stopOnFunctions) { return node; } switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: node = node.parent; break; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: if (!stopOnFunctions) { continue; } - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 177 /* ClassStaticBlockDeclaration */: return node; - case 169 /* Decorator */: - if (node.parent.kind === 168 /* Parameter */ && isClassElement(node.parent.parent)) { + case 170 /* Decorator */: + if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; @@ -16570,14 +16582,14 @@ function getSuperContainer(node, stopOnFunctions) { } } function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 218 /* FunctionExpression */ || func.kind === 219 /* ArrowFunction */) { + if (func.kind === 220 /* FunctionExpression */ || func.kind === 221 /* ArrowFunction */) { let prev = func; let parent2 = func.parent; - while (parent2.kind === 217 /* ParenthesizedExpression */) { + while (parent2.kind === 219 /* ParenthesizedExpression */) { prev = parent2; parent2 = parent2.parent; } - if (parent2.kind === 213 /* CallExpression */ && parent2.expression === prev) { + if (parent2.kind === 215 /* CallExpression */ && parent2.expression === prev) { return parent2; } } @@ -16587,11 +16599,11 @@ function isSuperOrSuperProperty(node) { } function isSuperProperty(node) { const kind = node.kind; - return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 107 /* SuperKeyword */; + return (kind === 213 /* PropertyAccessExpression */ || kind === 214 /* ElementAccessExpression */) && node.expression.kind === 107 /* SuperKeyword */; } function isThisProperty(node) { const kind = node.kind; - return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 109 /* ThisKeyword */; + return (kind === 213 /* PropertyAccessExpression */ || kind === 214 /* ElementAccessExpression */) && node.expression.kind === 109 /* ThisKeyword */; } function isThisInitializedDeclaration(node) { var _a2; @@ -16602,22 +16614,22 @@ function isThisInitializedObjectBindingExpression(node) { } function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return node.typeName; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return isEntityNameExpression(node.expression) ? node.expression : void 0; case 79 /* Identifier */: - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return node; } return void 0; } function getInvokedExpression(node) { switch (node.kind) { - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return node.tag; - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return node.tagName; default: return node.expression; @@ -16628,20 +16640,20 @@ function nodeCanBeDecorated(node, parent2, grandparent, compilerOptions) { return false; } switch (node.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: return true; - case 171 /* PropertyDeclaration */: - return parent2.kind === 264 /* ClassDeclaration */ || parent2.kind === 265 /* StructDeclaration */; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - return node.body !== void 0 && (parent2.kind === 264 /* ClassDeclaration */ || parent2.kind === 265 /* StructDeclaration */); - case 168 /* Parameter */: - return parent2.body !== void 0 && (parent2.kind === 176 /* Constructor */ || parent2.kind === 174 /* MethodDeclaration */ || parent2.kind === 178 /* SetAccessor */) && (grandparent.kind === 264 /* ClassDeclaration */ || grandparent.kind === 265 /* StructDeclaration */); - case 263 /* FunctionDeclaration */: + case 172 /* PropertyDeclaration */: + return parent2.kind === 266 /* ClassDeclaration */ || parent2.kind === 267 /* StructDeclaration */; + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: + return node.body !== void 0 && (parent2.kind === 266 /* ClassDeclaration */ || parent2.kind === 267 /* StructDeclaration */); + case 169 /* Parameter */: + return parent2.body !== void 0 && (parent2.kind === 178 /* Constructor */ || parent2.kind === 176 /* MethodDeclaration */ || parent2.kind === 180 /* SetAccessor */) && (grandparent.kind === 266 /* ClassDeclaration */ || grandparent.kind === 267 /* StructDeclaration */); + case 265 /* FunctionDeclaration */: return isArkTsDecorator(node, compilerOptions) || isSendableFunctionOrType(node); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return isSendableFunctionOrType(node); } return false; @@ -16654,13 +16666,13 @@ function nodeOrChildIsDecorated(node, parent2, grandparent) { } function childIsDecorated(node, parent2) { switch (node.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(m, node, parent2)); - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(m, node, parent2)); - case 174 /* MethodDeclaration */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: + case 176 /* MethodDeclaration */: + case 180 /* SetAccessor */: + case 178 /* Constructor */: return some(node.parameters, (p) => nodeIsDecorated(p, node, parent2)); default: return false; @@ -16674,7 +16686,7 @@ function classOrConstructorParameterIsDecorated(node) { } function isJSXTagName(node) { const { parent: parent2 } = node; - if (parent2.kind === 289 /* JsxOpeningElement */ || parent2.kind === 288 /* JsxSelfClosingElement */ || parent2.kind === 290 /* JsxClosingElement */) { + if (parent2.kind === 292 /* JsxOpeningElement */ || parent2.kind === 291 /* JsxSelfClosingElement */ || parent2.kind === 293 /* JsxClosingElement */) { return parent2.tagName === node; } return false; @@ -16686,55 +16698,55 @@ function isExpressionNode(node) { case 111 /* TrueKeyword */: case 96 /* FalseKeyword */: case 13 /* RegularExpressionLiteral */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 211 /* PropertyAccessExpression */: - case 220 /* EtsComponentExpression */: - case 212 /* ElementAccessExpression */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 235 /* AsExpression */: - case 216 /* TypeAssertionExpression */: - case 239 /* SatisfiesExpression */: - case 236 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: - case 218 /* FunctionExpression */: - case 232 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 223 /* VoidExpression */: - case 221 /* DeleteExpression */: - case 222 /* TypeOfExpression */: - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: - case 227 /* BinaryExpression */: - case 228 /* ConditionalExpression */: - case 231 /* SpreadElement */: - case 229 /* TemplateExpression */: - case 233 /* OmittedExpression */: - case 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: - case 230 /* YieldExpression */: - case 224 /* AwaitExpression */: - case 237 /* MetaProperty */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 213 /* PropertyAccessExpression */: + case 222 /* EtsComponentExpression */: + case 214 /* ElementAccessExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 217 /* TaggedTemplateExpression */: + case 237 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 241 /* SatisfiesExpression */: + case 238 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 220 /* FunctionExpression */: + case 234 /* ClassExpression */: + case 221 /* ArrowFunction */: + case 225 /* VoidExpression */: + case 223 /* DeleteExpression */: + case 224 /* TypeOfExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: + case 229 /* BinaryExpression */: + case 230 /* ConditionalExpression */: + case 233 /* SpreadElement */: + case 231 /* TemplateExpression */: + case 235 /* OmittedExpression */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: + case 232 /* YieldExpression */: + case 226 /* AwaitExpression */: + case 239 /* MetaProperty */: return true; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return !isHeritageClause(node.parent); - case 165 /* QualifiedName */: - while (node.parent.kind === 165 /* QualifiedName */) { + case 166 /* QualifiedName */: + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); - case 320 /* JSDocMemberName */: + return node.parent.kind === 188 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + case 323 /* JSDocMemberName */: while (isJSDocMemberName(node.parent)) { node = node.parent; } - return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + return node.parent.kind === 188 /* 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 === 102 /* InKeyword */; case 79 /* Identifier */: - if (node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { + if (node.parent.kind === 188 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { return true; } case 8 /* NumericLiteral */: @@ -16750,64 +16762,64 @@ function isExpressionNode(node) { function isInExpressionContext(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 308 /* EnumMember */: - case 305 /* PropertyAssignment */: - case 208 /* BindingElement */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 311 /* EnumMember */: + case 308 /* PropertyAssignment */: + case 210 /* BindingElement */: return parent2.initializer === node; - case 245 /* ExpressionStatement */: - case 246 /* IfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 254 /* ReturnStatement */: - case 255 /* WithStatement */: - case 256 /* SwitchStatement */: - case 298 /* CaseClause */: - case 258 /* ThrowStatement */: + case 247 /* ExpressionStatement */: + case 248 /* IfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 256 /* ReturnStatement */: + case 257 /* WithStatement */: + case 258 /* SwitchStatement */: + case 301 /* CaseClause */: + case 260 /* ThrowStatement */: return parent2.expression === node; - case 249 /* ForStatement */: + case 251 /* ForStatement */: const forStatement = parent2; - return forStatement.initializer === node && forStatement.initializer.kind !== 262 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + return forStatement.initializer === node && forStatement.initializer.kind !== 264 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: const forInStatement = parent2; - return forInStatement.initializer === node && forInStatement.initializer.kind !== 262 /* VariableDeclarationList */ || forInStatement.expression === node; - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + return forInStatement.initializer === node && forInStatement.initializer.kind !== 264 /* VariableDeclarationList */ || forInStatement.expression === node; + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: return node === parent2.expression; - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return node === parent2.expression; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return node === parent2.expression; - case 169 /* Decorator */: - case 297 /* JsxExpression */: - case 296 /* JsxSpreadAttribute */: - case 307 /* SpreadAssignment */: + case 170 /* Decorator */: + case 300 /* JsxExpression */: + case 299 /* JsxSpreadAttribute */: + case 310 /* SpreadAssignment */: return true; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return parent2.expression === node && !isPartOfTypeNode(parent2); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return parent2.objectAssignmentInitializer === node; - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return node === parent2.expression; default: return isExpressionNode(parent2); } } function isPartOfTypeQuery(node) { - while (node.kind === 165 /* QualifiedName */ || node.kind === 79 /* Identifier */) { + while (node.kind === 166 /* QualifiedName */ || node.kind === 79 /* Identifier */) { node = node.parent; } - return node.kind === 186 /* TypeQuery */; + return node.kind === 188 /* TypeQuery */; } function isNamespaceReexportDeclaration(node) { return isNamespaceExport(node) && !!node.parent.moduleSpecifier; } function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 274 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 286 /* ExternalModuleReference */; + return node.kind === 277 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 289 /* ExternalModuleReference */; } function getExternalModuleImportEqualsDeclarationExpression(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node)); @@ -16817,7 +16829,7 @@ function getExternalModuleRequireArgument(node) { return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0]; } function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 274 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 286 /* ExternalModuleReference */; + return node.kind === 277 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 289 /* ExternalModuleReference */; } function isSourceFileJS(file) { return isInJSFile(file); @@ -16876,7 +16888,7 @@ function isInStruct(node) { return !!container && isStruct(container); } function isRequireCall(callExpression, requireStringLiteralLikeArgument) { - if (callExpression.kind !== 213 /* CallExpression */) { + if (callExpression.kind !== 215 /* CallExpression */) { return false; } const { expression, arguments: args } = callExpression; @@ -16938,9 +16950,9 @@ function getAssignedExpandoInitializer(node) { function getExpandoInitializer(initializer, isPrototypeAssignment) { if (isCallExpression(initializer)) { const e = skipParentheses(initializer.expression); - return e.kind === 218 /* FunctionExpression */ || e.kind === 219 /* ArrowFunction */ ? initializer : void 0; + return e.kind === 220 /* FunctionExpression */ || e.kind === 221 /* ArrowFunction */ ? initializer : void 0; } - if (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 232 /* ClassExpression */ || initializer.kind === 219 /* ArrowFunction */) { + if (initializer.kind === 220 /* FunctionExpression */ || initializer.kind === 234 /* ClassExpression */ || initializer.kind === 221 /* ArrowFunction */) { return initializer; } if (isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAssignment)) { @@ -17102,7 +17114,7 @@ function isPrototypePropertyAssignment(node) { return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 3 /* PrototypeProperty */; } function isSpecialPropertyDeclaration(expr) { - return isInJSFile(expr) && expr.parent && expr.parent.kind === 245 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); + return isInJSFile(expr) && expr.parent && expr.parent.kind === 247 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); } function setValueDeclaration(symbol, node) { const { valueDeclaration } = symbol; @@ -17115,16 +17127,16 @@ function isFunctionSymbol(symbol) { return false; } const decl = symbol.valueDeclaration; - return decl.kind === 263 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); + return decl.kind === 265 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); } function tryGetModuleSpecifierFromDeclaration(node) { var _a2, _b; switch (node.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return (_a2 = findAncestor(node.initializer, (node2) => isRequireCall(node2, true))) == null ? void 0 : _a2.arguments[0]; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return tryCast(node.moduleSpecifier, isStringLiteralLike); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); default: Debug.assertNever(node); @@ -17135,14 +17147,14 @@ function importFromModuleSpecifier(node) { } function tryGetImportFromModuleSpecifier(node) { switch (node.parent.kind) { - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: return node.parent; - case 286 /* ExternalModuleReference */: + case 289 /* ExternalModuleReference */: return node.parent.parent; - case 213 /* CallExpression */: + case 215 /* CallExpression */: return isImportCall(node.parent) || isRequireCall(node.parent, false) ? node.parent : void 0; - case 201 /* LiteralType */: + case 203 /* LiteralType */: Debug.assert(isStringLiteral(node)); return tryCast(node.parent.parent, isImportTypeNode); default: @@ -17151,16 +17163,16 @@ function tryGetImportFromModuleSpecifier(node) { } function getExternalModuleName(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: return node.moduleSpecifier; - case 274 /* ImportEqualsDeclaration */: - return node.moduleReference.kind === 286 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; - case 205 /* ImportType */: + case 277 /* ImportEqualsDeclaration */: + return node.moduleReference.kind === 289 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; + case 207 /* ImportType */: return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; - case 213 /* CallExpression */: + case 215 /* CallExpression */: return node.arguments[0]; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return node.name.kind === 10 /* StringLiteral */ ? node.name : void 0; default: return Debug.assertNever(node); @@ -17168,18 +17180,18 @@ function getExternalModuleName(node) { } function getNamespaceDeclarationNode(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return node; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return node.exportClause && tryCast(node.exportClause, isNamespaceExport); default: return Debug.assertNever(node); } } function isDefaultImport(node) { - return node.kind === 275 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; + return node.kind === 278 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } function forEachImportClauseDeclaration(node, action) { if (node.name) { @@ -17196,13 +17208,13 @@ function forEachImportClauseDeclaration(node, action) { function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 168 /* Parameter */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 306 /* ShorthandPropertyAssignment */: - case 305 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 169 /* Parameter */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 309 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return node.questionToken !== void 0; } } @@ -17214,7 +17226,7 @@ function isJSDocConstructSignature(node) { return !!name && name.escapedText === "new"; } function isJSDocTypeAlias(node) { - return node.kind === 354 /* JSDocTypedefTag */ || node.kind === 347 /* JSDocCallbackTag */ || node.kind === 348 /* JSDocEnumTag */; + return node.kind === 357 /* JSDocTypedefTag */ || node.kind === 350 /* JSDocCallbackTag */ || node.kind === 351 /* JSDocEnumTag */; } function isTypeAlias(node) { return isJSDocTypeAlias(node) || isTypeAliasDeclaration(node); @@ -17227,14 +17239,14 @@ function getSourceOfDefaultedAssignment(node) { } function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: const v = getSingleVariableOfVariableStatement(node); return v && v.initializer; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer; - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return node.initializer; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return node.initializer; } } @@ -17242,7 +17254,7 @@ function getSingleVariableOfVariableStatement(node) { return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; } function getNestedModuleDeclaration(node) { - return isModuleDeclaration(node) && node.body && node.body.kind === 270 /* ModuleDeclaration */ ? node.body : void 0; + return isModuleDeclaration(node) && node.body && node.body.kind === 273 /* ModuleDeclaration */ ? node.body : void 0; } function getJSDocCommentsAndTags(hostNode, noCache) { let result; @@ -17254,11 +17266,11 @@ function getJSDocCommentsAndTags(hostNode, noCache) { if (hasJSDocNodes(node)) { result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc))); } - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node)); break; } - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node)); break; } @@ -17278,7 +17290,7 @@ function ownsJSDocTag(hostNode, tag) { } function getNextJSDocCommentLocation(node) { const parent2 = node.parent; - if (parent2.kind === 305 /* PropertyAssignment */ || parent2.kind === 280 /* ExportAssignment */ || parent2.kind === 171 /* PropertyDeclaration */ || parent2.kind === 245 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 254 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 63 /* EqualsToken */) { + if (parent2.kind === 308 /* PropertyAssignment */ || parent2.kind === 283 /* ExportAssignment */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 247 /* ExpressionStatement */ && node.kind === 213 /* PropertyAccessExpression */ || parent2.kind === 256 /* 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; @@ -17354,32 +17366,32 @@ function getAssignmentTargetKind(node) { let parent2 = node.parent; while (true) { switch (parent2.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const binaryOperator = parent2.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent2.left === node ? binaryOperator === 63 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: const unaryOperator = parent2.operator; return unaryOperator === 45 /* PlusPlusToken */ || unaryOperator === 46 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: return parent2.initializer === node ? 1 /* Definite */ : 0 /* None */; - case 217 /* ParenthesizedExpression */: - case 209 /* ArrayLiteralExpression */: - case 231 /* SpreadElement */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 211 /* ArrayLiteralExpression */: + case 233 /* SpreadElement */: + case 238 /* NonNullExpression */: node = parent2; break; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: node = parent2.parent; break; - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: if (parent2.name !== node) { return 0 /* None */; } node = parent2.parent; break; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (parent2.name === node) { return 0 /* None */; } @@ -17396,22 +17408,22 @@ function isAssignmentTarget(node) { } function isNodeWithPossibleHoistedDeclaration(node) { switch (node.kind) { - case 242 /* Block */: - case 244 /* VariableStatement */: - case 255 /* WithStatement */: - case 246 /* IfStatement */: - case 256 /* SwitchStatement */: - case 272 /* CaseBlock */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 257 /* LabeledStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 259 /* TryStatement */: - case 301 /* CatchClause */: + case 244 /* Block */: + case 246 /* VariableStatement */: + case 257 /* WithStatement */: + case 248 /* IfStatement */: + case 258 /* SwitchStatement */: + case 275 /* CaseBlock */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 259 /* LabeledStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 261 /* TryStatement */: + case 304 /* CatchClause */: return true; } return false; @@ -17426,14 +17438,14 @@ function walkUp(node, kind) { return node; } function walkUpParenthesizedTypes(node) { - return walkUp(node, 196 /* ParenthesizedType */); + return walkUp(node, 198 /* ParenthesizedType */); } function walkUpParenthesizedExpressions(node) { - return walkUp(node, 217 /* ParenthesizedExpression */); + return walkUp(node, 219 /* ParenthesizedExpression */); } function walkUpParenthesizedTypesAndGetParentAndChild(node) { let child; - while (node && node.kind === 196 /* ParenthesizedType */) { + while (node && node.kind === 198 /* ParenthesizedType */) { child = node; node = node.parent; } @@ -17449,11 +17461,11 @@ function skipParentheses(node, excludeJSDocTypeAssertions) { return skipOuterExpressions(node, flags); } function isDeleteTarget(node) { - if (node.kind !== 211 /* PropertyAccessExpression */ && node.kind !== 212 /* ElementAccessExpression */) { + if (node.kind !== 213 /* PropertyAccessExpression */ && node.kind !== 214 /* ElementAccessExpression */) { return false; } node = walkUpParenthesizedExpressions(node.parent); - return node && node.kind === 221 /* DeleteExpression */; + return node && node.kind === 223 /* DeleteExpression */; } function isNodeDescendantOf(node, ancestor) { while (node) { @@ -17491,56 +17503,56 @@ function getDeclarationFromName(name) { } } function isLiteralComputedPropertyDeclarationName(node) { - return isStringOrNumericLiteralLike(node) && node.parent.kind === 166 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); + return isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); } function isIdentifierName(node) { const parent2 = node.parent; switch (parent2.kind) { - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 308 /* EnumMember */: - case 305 /* PropertyAssignment */: - case 211 /* PropertyAccessExpression */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 311 /* EnumMember */: + case 308 /* PropertyAssignment */: + case 213 /* PropertyAccessExpression */: return parent2.name === node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return parent2.right === node; - case 208 /* BindingElement */: - case 279 /* ImportSpecifier */: + case 210 /* BindingElement */: + case 282 /* ImportSpecifier */: return parent2.propertyName === node; - case 284 /* ExportSpecifier */: - case 294 /* JsxAttribute */: - case 288 /* JsxSelfClosingElement */: - case 289 /* JsxOpeningElement */: - case 290 /* JsxClosingElement */: + case 287 /* ExportSpecifier */: + case 297 /* JsxAttribute */: + case 291 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 293 /* JsxClosingElement */: return true; } return false; } function isAliasSymbolDeclaration(node) { - if (node.kind === 274 /* ImportEqualsDeclaration */ || node.kind === 273 /* NamespaceExportDeclaration */ || node.kind === 276 /* ImportClause */ && !!node.name || node.kind === 277 /* NamespaceImport */ || node.kind === 283 /* NamespaceExport */ || node.kind === 279 /* ImportSpecifier */ || node.kind === 284 /* ExportSpecifier */ || node.kind === 280 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { + if (node.kind === 277 /* ImportEqualsDeclaration */ || node.kind === 276 /* NamespaceExportDeclaration */ || node.kind === 279 /* ImportClause */ && !!node.name || node.kind === 280 /* NamespaceImport */ || node.kind === 286 /* NamespaceExport */ || node.kind === 282 /* ImportSpecifier */ || node.kind === 287 /* ExportSpecifier */ || node.kind === 283 /* 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 276 /* ImportClause */: - case 279 /* ImportSpecifier */: - case 277 /* NamespaceImport */: - case 284 /* ExportSpecifier */: - case 280 /* ExportAssignment */: - case 274 /* ImportEqualsDeclaration */: - case 283 /* NamespaceExport */: + case 279 /* ImportClause */: + case 282 /* ImportSpecifier */: + case 280 /* NamespaceImport */: + case 287 /* ExportSpecifier */: + case 283 /* ExportAssignment */: + case 277 /* ImportEqualsDeclaration */: + case 286 /* NamespaceExport */: return node.parent; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.parent; - } while (node.parent.kind === 165 /* QualifiedName */); + } while (node.parent.kind === 166 /* QualifiedName */); return getAliasDeclarationFromName(node); } } @@ -17555,7 +17567,7 @@ function getExportAssignmentExpression(node) { return isExportAssignment(node) ? node.expression : node.right; } function getPropertyAssignmentAliasLikeExpression(node) { - return node.kind === 306 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 305 /* PropertyAssignment */ ? node.initializer : node.parent.right; + return node.kind === 309 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 308 /* PropertyAssignment */ ? node.initializer : node.parent.right; } function getEffectiveBaseTypeNode(node) { const baseType = getClassExtendsHeritageElement(node); @@ -17640,10 +17652,10 @@ function getVirtualEtsComponent(node) { return void 0; } function isKeyword(token) { - return 81 /* FirstKeyword */ <= token && token <= 164 /* LastKeyword */; + return 81 /* FirstKeyword */ <= token && token <= 165 /* LastKeyword */; } function isContextualKeyword(token) { - return 127 /* FirstContextualKeyword */ <= token && token <= 164 /* LastContextualKeyword */; + return 127 /* FirstContextualKeyword */ <= token && token <= 165 /* LastContextualKeyword */; } function isNonContextualKeyword(token) { return isKeyword(token) && !isContextualKeyword(token); @@ -17679,13 +17691,13 @@ function getFunctionFlags(node) { } let flags = 0 /* Normal */; switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: if (node.asteriskToken) { flags |= 1 /* Generator */; } - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: if (hasSyntacticModifier(node, 512 /* Async */)) { flags |= 2 /* Async */; } @@ -17698,10 +17710,10 @@ function getFunctionFlags(node) { } function isAsyncFunction(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */); } return false; @@ -17717,7 +17729,7 @@ function hasDynamicName(declaration) { return !!name && isDynamicName(name); } function isDynamicName(name) { - if (!(name.kind === 166 /* ComputedPropertyName */ || name.kind === 212 /* ElementAccessExpression */)) { + if (!(name.kind === 167 /* ComputedPropertyName */ || name.kind === 214 /* ElementAccessExpression */)) { return false; } const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; @@ -17731,7 +17743,7 @@ function getPropertyNameForPropertyNameNode(name) { case 10 /* StringLiteral */: case 8 /* NumericLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -17783,17 +17795,17 @@ function isPushOrUnshiftIdentifier(node) { } function isParameterDeclaration(node) { const root = getRootDeclaration(node); - return root.kind === 168 /* Parameter */; + return root.kind === 169 /* Parameter */; } function getRootDeclaration(node) { - while (node.kind === 208 /* BindingElement */) { + while (node.kind === 210 /* BindingElement */) { node = node.parent.parent; } return node; } function nodeStartsNewLexicalEnvironment(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 218 /* FunctionExpression */ || kind === 263 /* FunctionDeclaration */ || kind === 219 /* ArrowFunction */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 270 /* ModuleDeclaration */ || kind === 314 /* SourceFile */; + return kind === 178 /* Constructor */ || kind === 220 /* FunctionExpression */ || kind === 265 /* FunctionDeclaration */ || kind === 221 /* ArrowFunction */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 273 /* ModuleDeclaration */ || kind === 317 /* SourceFile */; } function nodeIsSynthesized(range) { return positionIsSynthesized(range.pos) || positionIsSynthesized(range.end); @@ -17808,22 +17820,22 @@ var Associativity = /* @__PURE__ */ ((Associativity2) => { })(Associativity || {}); function getExpressionAssociativity(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 216 /* NewExpression */ && expression.arguments !== void 0; return getOperatorAssociativity(expression.kind, operator, hasArguments); } function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 214 /* NewExpression */: + case 216 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 225 /* PrefixUnaryExpression */: - case 222 /* TypeOfExpression */: - case 223 /* VoidExpression */: - case 221 /* DeleteExpression */: - case 224 /* AwaitExpression */: - case 228 /* ConditionalExpression */: - case 230 /* YieldExpression */: + case 227 /* PrefixUnaryExpression */: + case 224 /* TypeOfExpression */: + case 225 /* VoidExpression */: + case 223 /* DeleteExpression */: + case 226 /* AwaitExpression */: + case 230 /* ConditionalExpression */: + case 232 /* YieldExpression */: return 1 /* Right */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (operator) { case 42 /* AsteriskAsteriskToken */: case 63 /* EqualsToken */: @@ -17849,13 +17861,13 @@ function getOperatorAssociativity(kind, operator, hasArguments) { } function getExpressionPrecedence(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 216 /* NewExpression */ && expression.arguments !== void 0; return getOperatorPrecedence(expression.kind, operator, hasArguments); } function getOperator(expression) { - if (expression.kind === 227 /* BinaryExpression */) { + if (expression.kind === 229 /* BinaryExpression */) { return expression.operatorToken.kind; - } else if (expression.kind === 225 /* PrefixUnaryExpression */ || expression.kind === 226 /* PostfixUnaryExpression */) { + } else if (expression.kind === 227 /* PrefixUnaryExpression */ || expression.kind === 228 /* PostfixUnaryExpression */) { return expression.operator; } else { return expression.kind; @@ -17891,15 +17903,15 @@ var OperatorPrecedence = /* @__PURE__ */ ((OperatorPrecedence2) => { })(OperatorPrecedence || {}); function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return 0 /* Comma */; - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return 1 /* Spread */; - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return 2 /* Yield */; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return 4 /* Conditional */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (operatorKind) { case 27 /* CommaToken */: return 0 /* Comma */; @@ -17923,27 +17935,27 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { default: return getBinaryOperatorPrecedence(operatorKind); } - case 216 /* TypeAssertionExpression */: - case 236 /* NonNullExpression */: - case 225 /* PrefixUnaryExpression */: - case 222 /* TypeOfExpression */: - case 223 /* VoidExpression */: - case 221 /* DeleteExpression */: - case 224 /* AwaitExpression */: + case 218 /* TypeAssertionExpression */: + case 238 /* NonNullExpression */: + case 227 /* PrefixUnaryExpression */: + case 224 /* TypeOfExpression */: + case 225 /* VoidExpression */: + case 223 /* DeleteExpression */: + case 226 /* AwaitExpression */: return 16 /* Unary */; - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return 17 /* Update */; - case 213 /* CallExpression */: + case 215 /* CallExpression */: return 18 /* LeftHandSide */; - case 214 /* NewExpression */: + case 216 /* NewExpression */: return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */; - case 215 /* TaggedTemplateExpression */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 237 /* MetaProperty */: + case 217 /* TaggedTemplateExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 239 /* MetaProperty */: return 19 /* Member */; - case 235 /* AsExpression */: - case 239 /* SatisfiesExpression */: + case 237 /* AsExpression */: + case 241 /* SatisfiesExpression */: return 11 /* Relational */; case 109 /* ThisKeyword */: case 107 /* SuperKeyword */: @@ -17955,19 +17967,19 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 232 /* ClassExpression */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 234 /* ClassExpression */: case 13 /* RegularExpressionLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 229 /* TemplateExpression */: - case 217 /* ParenthesizedExpression */: - case 233 /* OmittedExpression */: - case 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: + case 231 /* TemplateExpression */: + case 219 /* ParenthesizedExpression */: + case 235 /* OmittedExpression */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: return 20 /* Primary */; default: return -1 /* Invalid */; @@ -18020,7 +18032,7 @@ function getBinaryOperatorPrecedence(kind) { function getSemanticJsxChildren(children) { return filter(children, (i) => { switch (i.kind) { - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return !!i.expression; case 11 /* JsxText */: return !i.containsOnlyTriviaWhiteSpaces; @@ -18411,7 +18423,7 @@ function isThisInTypeQuery(node) { while (isQualifiedName(node.parent) && node.parent.left === node) { node = node.parent; } - return node.parent.kind === 186 /* TypeQuery */; + return node.parent.kind === 188 /* TypeQuery */; } function identifierIsThisKeyword(id) { return id.originalKeywordKind === 109 /* ThisKeyword */; @@ -18423,9 +18435,9 @@ function getAllAccessorDeclarations(declarations, accessor) { let setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 177 /* GetAccessor */) { + if (accessor.kind === 179 /* GetAccessor */) { getAccessor = accessor; - } else if (accessor.kind === 178 /* SetAccessor */) { + } else if (accessor.kind === 180 /* SetAccessor */) { setAccessor = accessor; } else { Debug.fail("Accessor has wrong kind"); @@ -18441,10 +18453,10 @@ function getAllAccessorDeclarations(declarations, accessor) { } else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 177 /* GetAccessor */ && !getAccessor) { + if (member.kind === 179 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 178 /* SetAccessor */ && !setAccessor) { + if (member.kind === 180 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -18476,7 +18488,7 @@ function getJSDocTypeParameterDeclarations(node) { return flatMap(getJSDocTags(node), (tag) => isNonTypeAliasTemplate(tag) ? tag.typeParameters : void 0); } function isNonTypeAliasTemplate(tag) { - return isJSDocTemplateTag(tag) && !(tag.parent.kind === 329 /* JSDoc */ && tag.parent.tags.some(isJSDocTypeAlias)); + return isJSDocTemplateTag(tag) && !(tag.parent.kind === 332 /* JSDoc */ && tag.parent.tags.some(isJSDocTypeAlias)); } function getEffectiveSetAccessorTypeAnnotationNode(node) { const parameter = getSetAccessorValueParameter(node); @@ -18661,7 +18673,7 @@ function getSelectedSyntacticModifierFlags(node, flags) { return getSyntacticModifierFlags(node) & flags; } function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { - if (node.kind >= 0 /* FirstToken */ && node.kind <= 164 /* LastToken */) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 165 /* LastToken */) { return 0 /* None */; } if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { @@ -18752,7 +18764,7 @@ function modifierToFlag(token) { return 32768 /* In */; case 146 /* OutKeyword */: return 65536 /* Out */; - case 169 /* Decorator */: + case 170 /* Decorator */: return 131072 /* Decorator */; } return 0 /* None */; @@ -18785,7 +18797,7 @@ function isLeftHandSideOfAssignment(node) { function isDestructuringAssignment(node) { if (isAssignmentExpression(node, true)) { const kind = node.left.kind; - return kind === 210 /* ObjectLiteralExpression */ || kind === 209 /* ArrayLiteralExpression */; + return kind === 212 /* ObjectLiteralExpression */ || kind === 211 /* ArrayLiteralExpression */; } return false; } @@ -18799,12 +18811,12 @@ function getFirstIdentifier(node) { switch (node.kind) { case 79 /* Identifier */: return node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.left; } while (node.kind !== 79 /* Identifier */); return node; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: do { node = node.expression; } while (node.kind !== 79 /* Identifier */); @@ -18812,7 +18824,7 @@ function getFirstIdentifier(node) { } } function isDottedName(node) { - return node.kind === 79 /* Identifier */ || node.kind === 109 /* ThisKeyword */ || node.kind === 107 /* SuperKeyword */ || node.kind === 237 /* MetaProperty */ || node.kind === 211 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 217 /* ParenthesizedExpression */ && isDottedName(node.expression); + return node.kind === 79 /* Identifier */ || node.kind === 109 /* ThisKeyword */ || node.kind === 107 /* SuperKeyword */ || node.kind === 239 /* MetaProperty */ || node.kind === 213 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 219 /* ParenthesizedExpression */ && isDottedName(node.expression); } function isPropertyAccessEntityNameExpression(node) { return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); @@ -18837,7 +18849,7 @@ function isPrototypeAccess(node) { return isBindableStaticAccessExpression(node) && getElementOrPropertyAccessName(node) === "prototype"; } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return node.parent.kind === 165 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node; + return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 213 /* PropertyAccessExpression */ && node.parent.name === node; } function isRightSideOfAccessExpression(node) { return isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node; @@ -18846,10 +18858,10 @@ 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 === 210 /* ObjectLiteralExpression */ && expression.properties.length === 0; + return expression.kind === 212 /* ObjectLiteralExpression */ && expression.properties.length === 0; } function isEmptyArrayLiteral(expression) { - return expression.kind === 209 /* ArrayLiteralExpression */ && expression.elements.length === 0; + return expression.kind === 211 /* ArrayLiteralExpression */ && expression.elements.length === 0; } function getLocalSymbolForExportDefault(symbol) { if (!isExportDefaultSymbol(symbol) || !symbol.declarations) @@ -19077,8 +19089,8 @@ function isDeclarationNameOfEnumOrNamespace(node) { const parseNode = getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 269 /* EnumDeclaration */: - case 270 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 273 /* ModuleDeclaration */: return parseNode === parseNode.parent.name; } } @@ -19139,30 +19151,30 @@ function accessKind(node) { if (!parent2) return 0 /* Read */; switch (parent2.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return accessKind(parent2); - case 226 /* PostfixUnaryExpression */: - case 225 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: const { operator } = parent2; return operator === 45 /* PlusPlusToken */ || operator === 46 /* MinusMinusToken */ ? writeOrReadWrite() : 0 /* Read */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const { left, operatorToken } = parent2; return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 63 /* EqualsToken */ ? 1 /* Write */ : writeOrReadWrite() : 0 /* Read */; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return parent2.name !== node ? 0 /* Read */ : accessKind(parent2); - case 305 /* PropertyAssignment */: { + case 308 /* PropertyAssignment */: { const parentAccess = accessKind(parent2.parent); return node === parent2.name ? reverseAccessKind(parentAccess) : parentAccess; } - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return node === parent2.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent2.parent); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return accessKind(parent2); default: return 0 /* Read */; } function writeOrReadWrite() { - return parent2.parent && walkUpParenthesizedExpressions(parent2.parent).kind === 245 /* ExpressionStatement */ ? 1 /* Write */ : 2 /* ReadWrite */; + return parent2.parent && walkUpParenthesizedExpressions(parent2.parent).kind === 247 /* ExpressionStatement */ ? 1 /* Write */ : 2 /* ReadWrite */; } } function reverseAccessKind(a) { @@ -19275,16 +19287,16 @@ function isObjectTypeDeclaration(node) { return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node); } function isTypeNodeKind(kind) { - return kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */ || kind === 132 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 149 /* NumberKeyword */ || kind === 162 /* BigIntKeyword */ || kind === 150 /* ObjectKeyword */ || kind === 135 /* BooleanKeyword */ || kind === 153 /* StringKeyword */ || kind === 154 /* SymbolKeyword */ || kind === 115 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 145 /* NeverKeyword */ || kind === 234 /* ExpressionWithTypeArguments */ || kind === 321 /* JSDocAllType */ || kind === 322 /* JSDocUnknownType */ || kind === 323 /* JSDocNullableType */ || kind === 324 /* JSDocNonNullableType */ || kind === 325 /* JSDocOptionalType */ || kind === 326 /* JSDocFunctionType */ || kind === 327 /* JSDocVariadicType */; + return kind >= 184 /* FirstTypeNode */ && kind <= 207 /* LastTypeNode */ || kind === 132 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 149 /* NumberKeyword */ || kind === 162 /* BigIntKeyword */ || kind === 150 /* ObjectKeyword */ || kind === 135 /* BooleanKeyword */ || kind === 153 /* StringKeyword */ || kind === 154 /* SymbolKeyword */ || kind === 115 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 145 /* NeverKeyword */ || kind === 236 /* ExpressionWithTypeArguments */ || kind === 324 /* JSDocAllType */ || kind === 325 /* JSDocUnknownType */ || kind === 326 /* JSDocNullableType */ || kind === 327 /* JSDocNonNullableType */ || kind === 328 /* JSDocOptionalType */ || kind === 329 /* JSDocFunctionType */ || kind === 330 /* JSDocVariadicType */; } function isAccessExpression(node) { - return node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */; + return node.kind === 213 /* PropertyAccessExpression */ || node.kind === 214 /* ElementAccessExpression */; } function getNameOfAccessExpression(node) { - if (node.kind === 211 /* PropertyAccessExpression */) { + if (node.kind === 213 /* PropertyAccessExpression */) { return node.name; } - Debug.assert(node.kind === 212 /* ElementAccessExpression */); + Debug.assert(node.kind === 214 /* ElementAccessExpression */); return node.argumentExpression; } function isBundleFileTextLike(section) { @@ -19297,7 +19309,7 @@ function isBundleFileTextLike(section) { } } function isNamedImportsOrExports(node) { - return node.kind === 278 /* NamedImports */ || node.kind === 282 /* NamedExports */; + return node.kind === 281 /* NamedImports */ || node.kind === 285 /* NamedExports */; } function getLeftmostAccessExpression(expr) { while (isAccessExpression(expr)) { @@ -19310,12 +19322,12 @@ function forEachNameInAccessChainWalkingLeft(name, action) { return walkAccessExpression(name.parent); } function walkAccessExpression(access) { - if (access.kind === 211 /* PropertyAccessExpression */) { + if (access.kind === 213 /* PropertyAccessExpression */) { const res = action(access.name); if (res !== void 0) { return res; } - } else if (access.kind === 212 /* ElementAccessExpression */) { + } else if (access.kind === 214 /* ElementAccessExpression */) { if (isIdentifier(access.argumentExpression) || isStringLiteralLike(access.argumentExpression)) { const res = action(access.argumentExpression); if (res !== void 0) { @@ -19337,28 +19349,28 @@ function forEachNameInAccessChainWalkingLeft(name, action) { function getLeftmostExpression(node, stopAtCallExpressions) { while (true) { switch (node.kind) { - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: node = node.operand; continue; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: node = node.left; continue; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: node = node.condition; continue; - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: node = node.tag; continue; - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (stopAtCallExpressions) { return node; } - case 235 /* AsExpression */: - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: - case 236 /* NonNullExpression */: - case 359 /* PartiallyEmittedExpression */: - case 239 /* SatisfiesExpression */: + case 237 /* AsExpression */: + case 214 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 238 /* NonNullExpression */: + case 362 /* PartiallyEmittedExpression */: + case 241 /* SatisfiesExpression */: node = node.expression; continue; } @@ -20322,33 +20334,33 @@ function isShorthandPropertyNameUseSite(useSite) { return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite; } function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { - while (node.kind === 79 /* Identifier */ || node.kind === 211 /* PropertyAccessExpression */) { + while (node.kind === 79 /* Identifier */ || node.kind === 213 /* PropertyAccessExpression */) { node = node.parent; } - if (node.kind !== 166 /* ComputedPropertyName */) { + if (node.kind !== 167 /* ComputedPropertyName */) { return false; } if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) { return true; } const containerKind = node.parent.parent.kind; - return containerKind === 267 /* InterfaceDeclaration */ || containerKind === 187 /* TypeLiteral */; + return containerKind === 270 /* InterfaceDeclaration */ || containerKind === 189 /* TypeLiteral */; } function isIdentifierInNonEmittingHeritageClause(node) { if (node.kind !== 79 /* Identifier */) return false; const heritageClause = findAncestor(node.parent, (parent2) => { switch (parent2.kind) { - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return true; - case 211 /* PropertyAccessExpression */: - case 234 /* ExpressionWithTypeArguments */: + case 213 /* PropertyAccessExpression */: + case 236 /* ExpressionWithTypeArguments */: return false; default: return "quit"; } }); - return (heritageClause == null ? void 0 : heritageClause.token) === 118 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 267 /* InterfaceDeclaration */; + return (heritageClause == null ? void 0 : heritageClause.token) === 118 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 270 /* InterfaceDeclaration */; } function isIdentifierTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName); @@ -20437,20 +20449,20 @@ function getContainingNodeArray(node) { if (!node.parent) return void 0; switch (node.kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: const { parent: parent3 } = node; - return parent3.kind === 195 /* InferType */ ? void 0 : parent3.typeParameters; - case 168 /* Parameter */: + return parent3.kind === 197 /* InferType */ ? void 0 : parent3.typeParameters; + case 169 /* Parameter */: return node.parent.parameters; - case 204 /* TemplateLiteralTypeSpan */: + case 206 /* TemplateLiteralTypeSpan */: return node.parent.templateSpans; - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return node.parent.templateSpans; - case 169 /* Decorator */: { + case 170 /* Decorator */: { const { parent: parent4 } = node; return canHaveDecorators(parent4) ? parent4.modifiers : canHaveIllegalDecorators(parent4) ? parent4.illegalDecorators : void 0; } - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return node.parent.heritageClauses; } const { parent: parent2 } = node; @@ -20458,43 +20470,43 @@ function getContainingNodeArray(node) { return isJSDocTypeLiteral(node.parent) ? void 0 : node.parent.tags; } switch (parent2.kind) { - case 187 /* TypeLiteral */: - case 267 /* InterfaceDeclaration */: + case 189 /* TypeLiteral */: + case 270 /* InterfaceDeclaration */: return isTypeElement(node) ? parent2.members : void 0; - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return parent2.types; - case 189 /* TupleType */: - case 209 /* ArrayLiteralExpression */: - case 360 /* CommaListExpression */: - case 278 /* NamedImports */: - case 282 /* NamedExports */: + case 191 /* TupleType */: + case 211 /* ArrayLiteralExpression */: + case 363 /* CommaListExpression */: + case 281 /* NamedImports */: + case 285 /* NamedExports */: return parent2.elements; - case 210 /* ObjectLiteralExpression */: - case 295 /* JsxAttributes */: + case 212 /* ObjectLiteralExpression */: + case 298 /* JsxAttributes */: return parent2.properties; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: return isTypeNode(node) ? parent2.typeArguments : parent2.expression === node ? void 0 : parent2.arguments; - case 287 /* JsxElement */: - case 291 /* JsxFragment */: + case 290 /* JsxElement */: + case 294 /* JsxFragment */: return isJsxChild(node) ? parent2.children : void 0; - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return isTypeNode(node) ? parent2.typeArguments : void 0; - case 242 /* Block */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 274 /* ModuleBlock */: return parent2.statements; - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return parent2.clauses; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return isClassElement(node) ? parent2.members : void 0; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return isEnumMember(node) ? parent2.members : void 0; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return parent2.statements; } } @@ -20503,7 +20515,7 @@ function hasContextSensitiveParameters(node) { if (some(node.parameters, (p) => !getEffectiveTypeAnnotationNode(p))) { return true; } - if (node.kind !== 219 /* ArrowFunction */) { + if (node.kind !== 221 /* ArrowFunction */) { const parameter = firstOrUndefined(node.parameters); if (!(parameter && parameterIsThisKeyword(parameter))) { return true; @@ -20516,14 +20528,14 @@ function isInfinityOrNaNString(name) { return name === "Infinity" || name === "-Infinity" || name === "NaN"; } function isCatchClauseVariableDeclaration(node) { - return node.kind === 261 /* VariableDeclaration */ && node.parent.kind === 301 /* CatchClause */; + return node.kind === 263 /* VariableDeclaration */ && node.parent.kind === 304 /* CatchClause */; } function isParameterOrCatchClauseVariable(symbol) { const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration); return !!declaration && (isParameter(declaration) || isCatchClauseVariableDeclaration(declaration)); } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */; + return node.kind === 220 /* FunctionExpression */ || node.kind === 221 /* ArrowFunction */; } function escapeSnippetText(text) { return text.replace(/\$/gm, () => "\\$"); @@ -20586,23 +20598,23 @@ function getNodeModulePathParts(fullPath, modulePathPart) { } function getParameterTypeNode(parameter) { var _a2; - return parameter.kind === 349 /* JSDocParameterTag */ ? (_a2 = parameter.typeExpression) == null ? void 0 : _a2.type : parameter.type; + return parameter.kind === 352 /* JSDocParameterTag */ ? (_a2 = parameter.typeExpression) == null ? void 0 : _a2.type : parameter.type; } function isTypeDeclaration(node) { switch (node.kind) { - case 167 /* TypeParameter */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 168 /* TypeParameter */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return true; - case 276 /* ImportClause */: + case 279 /* ImportClause */: return node.isTypeOnly; - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return node.parent.parent.isTypeOnly; default: return false; @@ -20615,7 +20627,7 @@ function isCalledStructDeclaration(declarations) { if (!declarations) { return false; } - return declarations.some((declaration) => declaration.kind === 265 /* StructDeclaration */); + return declarations.some((declaration) => declaration.kind === 267 /* StructDeclaration */); } function getNameOfDecorator(node) { const expression = node.expression; @@ -20847,16 +20859,16 @@ function createParenthesizerRules(factory2) { return parenthesizerRule; } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(227 /* BinaryExpression */, binaryOperator); + const binaryOperatorPrecedence = getOperatorPrecedence(229 /* BinaryExpression */, binaryOperator); + const binaryOperatorAssociativity = getOperatorAssociativity(229 /* BinaryExpression */, binaryOperator); const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 219 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { + if (!isLeftSideOfBinary && operand.kind === 221 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { return true; } const operandPrecedence = getExpressionPrecedence(emittedOperand); switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 230 /* YieldExpression */) { + if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 232 /* YieldExpression */) { return false; } return true; @@ -20890,7 +20902,7 @@ function createParenthesizerRules(factory2) { if (isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { + if (node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { if (node.cachedLiteralKind !== void 0) { return node.cachedLiteralKind; } @@ -20903,7 +20915,7 @@ function createParenthesizerRules(factory2) { } function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 217 /* ParenthesizedExpression */) { + if (skipped.kind === 219 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; @@ -20918,7 +20930,7 @@ function createParenthesizerRules(factory2) { return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; } function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(228 /* ConditionalExpression */, 57 /* QuestionToken */); + const conditionalPrecedence = getOperatorPrecedence(230 /* ConditionalExpression */, 57 /* QuestionToken */); const emittedCondition = skipPartiallyEmittedExpressions(condition); const conditionPrecedence = getExpressionPrecedence(emittedCondition); if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { @@ -20935,8 +20947,8 @@ function createParenthesizerRules(factory2) { let needsParens = isCommaSequence(check); if (!needsParens) { switch (getLeftmostExpression(check, false).kind) { - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: needsParens = true; } } @@ -20945,16 +20957,16 @@ function createParenthesizerRules(factory2) { function parenthesizeExpressionOfNew(expression) { const leftmostExpr = getLeftmostExpression(expression, true); switch (leftmostExpr.kind) { - case 213 /* CallExpression */: + case 215 /* CallExpression */: return factory2.createParenthesizedExpression(expression); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; } return parenthesizeLeftSideOfAccess(expression); } function parenthesizeLeftSideOfAccess(expression, optionalChain) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 214 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { + if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 216 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { return expression; } return setTextRange(factory2.createParenthesizedExpression(expression), expression); @@ -20972,7 +20984,7 @@ function createParenthesizerRules(factory2) { function parenthesizeExpressionForDisallowedComma(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, 27 /* CommaToken */); + const commaPrecedence = getOperatorPrecedence(229 /* BinaryExpression */, 27 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); } function parenthesizeExpressionOfExpressionStatement(expression) { @@ -20980,7 +20992,7 @@ function createParenthesizerRules(factory2) { if (isCallExpression(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */) { + if (kind === 220 /* FunctionExpression */ || kind === 221 /* ArrowFunction */) { const updated = factory2.updateCallExpression( emittedExpression, setTextRange(factory2.createParenthesizedExpression(callee), callee), @@ -20991,37 +21003,37 @@ function createParenthesizerRules(factory2) { } } const leftmostExpressionKind = getLeftmostExpression(emittedExpression, false).kind; - if (leftmostExpressionKind === 210 /* ObjectLiteralExpression */ || leftmostExpressionKind === 218 /* FunctionExpression */) { + if (leftmostExpressionKind === 212 /* ObjectLiteralExpression */ || leftmostExpressionKind === 220 /* FunctionExpression */) { return setTextRange(factory2.createParenthesizedExpression(expression), expression); } return expression; } function parenthesizeConciseBodyOfArrowFunction(body) { - if (!isBlock(body) && (isCommaSequence(body) || getLeftmostExpression(body, false).kind === 210 /* ObjectLiteralExpression */)) { + if (!isBlock(body) && (isCommaSequence(body) || getLeftmostExpression(body, false).kind === 212 /* ObjectLiteralExpression */)) { return setTextRange(factory2.createParenthesizedExpression(body), body); } return body; } function parenthesizeCheckTypeOfConditionalType(checkType) { switch (checkType.kind) { - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 194 /* ConditionalType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 196 /* ConditionalType */: return factory2.createParenthesizedType(checkType); } return checkType; } function parenthesizeExtendsTypeOfConditionalType(extendsType) { switch (extendsType.kind) { - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return factory2.createParenthesizedType(extendsType); } return extendsType; } function parenthesizeConstituentTypeOfUnionType(type) { switch (type.kind) { - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeCheckTypeOfConditionalType(type); @@ -21031,8 +21043,8 @@ function createParenthesizerRules(factory2) { } function parenthesizeConstituentTypeOfIntersectionType(type) { switch (type.kind) { - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfUnionType(type); @@ -21042,23 +21054,23 @@ function createParenthesizerRules(factory2) { } function parenthesizeOperandOfTypeOperator(type) { switch (type.kind) { - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } function parenthesizeOperandOfReadonlyTypeOperator(type) { switch (type.kind) { - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } function parenthesizeNonArrayTypeOfPostfixType(type) { switch (type.kind) { - case 195 /* InferType */: - case 198 /* TypeOperator */: - case 186 /* TypeQuery */: + case 197 /* InferType */: + case 200 /* TypeOperator */: + case 188 /* TypeQuery */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); @@ -21212,11 +21224,11 @@ function createNodeConverters(factory2) { } function convertToAssignmentPattern(node) { switch (node.kind) { - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 209 /* ArrayBindingPattern */: + case 211 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 206 /* ObjectBindingPattern */: - case 210 /* ObjectLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 212 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -21341,6 +21353,8 @@ function createNodeFactory(flags, baseFactory2) { updatePropertyDeclaration: updatePropertyDeclaration2, createAnnotationPropertyDeclaration, updateAnnotationPropertyDeclaration, + createOverloadPropertyDeclaration, + updateOverloadPropertyDeclaration, createMethodSignature: createMethodSignature3, updateMethodSignature: updateMethodSignature3, createMethodDeclaration, @@ -21536,6 +21550,8 @@ function createNodeFactory(flags, baseFactory2) { updateStructDeclaration, createAnnotationDeclaration, updateAnnotationDeclaration, + createOverloadDeclaration, + updateOverloadDeclaration, createInterfaceDeclaration: createInterfaceDeclaration2, updateInterfaceDeclaration: updateInterfaceDeclaration2, createTypeAliasDeclaration: createTypeAliasDeclaration2, @@ -21582,40 +21598,40 @@ function createNodeFactory(flags, baseFactory2) { createExternalModuleReference: createExternalModuleReference2, updateExternalModuleReference: updateExternalModuleReference2, get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(321 /* JSDocAllType */); + return getJSDocPrimaryTypeCreateFunction(324 /* JSDocAllType */); }, get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(322 /* JSDocUnknownType */); + return getJSDocPrimaryTypeCreateFunction(325 /* JSDocUnknownType */); }, get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(324 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(327 /* JSDocNonNullableType */); }, get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(324 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(327 /* JSDocNonNullableType */); }, get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(323 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(326 /* JSDocNullableType */); }, get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(323 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(326 /* JSDocNullableType */); }, get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(325 /* JSDocOptionalType */); + return getJSDocUnaryTypeCreateFunction(328 /* JSDocOptionalType */); }, get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(325 /* JSDocOptionalType */); + return getJSDocUnaryTypeUpdateFunction(328 /* JSDocOptionalType */); }, get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(327 /* JSDocVariadicType */); + return getJSDocUnaryTypeCreateFunction(330 /* JSDocVariadicType */); }, get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(327 /* JSDocVariadicType */); + return getJSDocUnaryTypeUpdateFunction(330 /* JSDocVariadicType */); }, get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(328 /* JSDocNamepathType */); + return getJSDocUnaryTypeCreateFunction(331 /* JSDocNamepathType */); }, get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(328 /* JSDocNamepathType */); + return getJSDocUnaryTypeUpdateFunction(331 /* JSDocNamepathType */); }, createJSDocFunctionType, updateJSDocFunctionType, @@ -21652,76 +21668,76 @@ function createNodeFactory(flags, baseFactory2) { createJSDocLinkPlain, updateJSDocLinkPlain, get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(352 /* JSDocTypeTag */); + return getJSDocTypeLikeTagCreateFunction(355 /* JSDocTypeTag */); }, get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocTypeTag */); + return getJSDocTypeLikeTagUpdateFunction(355 /* JSDocTypeTag */); }, get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(350 /* JSDocReturnTag */); + return getJSDocTypeLikeTagCreateFunction(353 /* JSDocReturnTag */); }, get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocReturnTag */); + return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocReturnTag */); }, get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(351 /* JSDocThisTag */); + return getJSDocTypeLikeTagCreateFunction(354 /* JSDocThisTag */); }, get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocThisTag */); + return getJSDocTypeLikeTagUpdateFunction(354 /* JSDocThisTag */); }, get createJSDocEnumTag() { - return getJSDocTypeLikeTagCreateFunction(348 /* JSDocEnumTag */); + return getJSDocTypeLikeTagCreateFunction(351 /* JSDocEnumTag */); }, get updateJSDocEnumTag() { - return getJSDocTypeLikeTagUpdateFunction(348 /* JSDocEnumTag */); + return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocEnumTag */); }, get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(339 /* JSDocAuthorTag */); + return getJSDocSimpleTagCreateFunction(342 /* JSDocAuthorTag */); }, get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(339 /* JSDocAuthorTag */); + return getJSDocSimpleTagUpdateFunction(342 /* JSDocAuthorTag */); }, get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(341 /* JSDocClassTag */); + return getJSDocSimpleTagCreateFunction(344 /* JSDocClassTag */); }, get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(341 /* JSDocClassTag */); + return getJSDocSimpleTagUpdateFunction(344 /* JSDocClassTag */); }, get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(342 /* JSDocPublicTag */); + return getJSDocSimpleTagCreateFunction(345 /* JSDocPublicTag */); }, get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(342 /* JSDocPublicTag */); + return getJSDocSimpleTagUpdateFunction(345 /* JSDocPublicTag */); }, get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(343 /* JSDocPrivateTag */); + return getJSDocSimpleTagCreateFunction(346 /* JSDocPrivateTag */); }, get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(343 /* JSDocPrivateTag */); + return getJSDocSimpleTagUpdateFunction(346 /* JSDocPrivateTag */); }, get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(344 /* JSDocProtectedTag */); + return getJSDocSimpleTagCreateFunction(347 /* JSDocProtectedTag */); }, get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(344 /* JSDocProtectedTag */); + return getJSDocSimpleTagUpdateFunction(347 /* JSDocProtectedTag */); }, get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(345 /* JSDocReadonlyTag */); + return getJSDocSimpleTagCreateFunction(348 /* JSDocReadonlyTag */); }, get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(345 /* JSDocReadonlyTag */); + return getJSDocSimpleTagUpdateFunction(348 /* JSDocReadonlyTag */); }, get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(346 /* JSDocOverrideTag */); + return getJSDocSimpleTagCreateFunction(349 /* JSDocOverrideTag */); }, get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(346 /* JSDocOverrideTag */); + return getJSDocSimpleTagUpdateFunction(349 /* JSDocOverrideTag */); }, get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(340 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagCreateFunction(343 /* JSDocDeprecatedTag */); }, get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(340 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagUpdateFunction(343 /* JSDocDeprecatedTag */); }, createJSDocUnknownTag, updateJSDocUnknownTag, @@ -21972,12 +21988,13 @@ function createNodeFactory(flags, baseFactory2) { } if (name) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 305 /* PropertyAssignment */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 308 /* PropertyAssignment */: if (isIdentifier(name)) { node.transformFlags |= propagateIdentifierNameFlags(name); break; @@ -22244,7 +22261,7 @@ function createNodeFactory(flags, baseFactory2) { return baseFactory2.createBaseTokenNode(kind); } function createToken3(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 164 /* LastToken */, "Invalid token"); + Debug.assert(token >= 0 /* FirstToken */ && token <= 165 /* 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"); @@ -22348,7 +22365,7 @@ function createNodeFactory(flags, baseFactory2) { return result.length ? result : void 0; } function createQualifiedName2(left, right) { - const node = createBaseNode(165 /* QualifiedName */); + const node = createBaseNode(166 /* QualifiedName */); node.left = left; node.right = asName(right); node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); @@ -22358,7 +22375,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createQualifiedName2(left, right), node) : node; } function createComputedPropertyName2(expression) { - const node = createBaseNode(166 /* ComputedPropertyName */); + const node = createBaseNode(167 /* ComputedPropertyName */); node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; return node; @@ -22368,7 +22385,7 @@ function createNodeFactory(flags, baseFactory2) { } function createTypeParameterDeclaration2(modifiers, name, constraint, defaultType) { const node = createBaseNamedDeclaration( - 167 /* TypeParameter */, + 168 /* TypeParameter */, modifiers, name ); @@ -22382,7 +22399,7 @@ function createNodeFactory(flags, baseFactory2) { } function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { const node = createBaseVariableLikeDeclaration( - 168 /* Parameter */, + 169 /* Parameter */, modifiers, name, type, @@ -22407,7 +22424,7 @@ function createNodeFactory(flags, baseFactory2) { 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 createDecorator2(expression, annotationDeclaration) { - const node = createBaseNode(169 /* Decorator */); + const node = createBaseNode(170 /* Decorator */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.annotationDeclaration = annotationDeclaration; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */ | 8192 /* ContainsTypeScriptClassSyntax */ | 33554432 /* ContainsDecorators */; @@ -22418,7 +22435,7 @@ function createNodeFactory(flags, baseFactory2) { } function createPropertySignature3(modifiers, name, questionToken, type) { const node = createBaseNamedDeclaration( - 170 /* PropertySignature */, + 171 /* PropertySignature */, modifiers, name ); @@ -22431,6 +22448,21 @@ function createNodeFactory(flags, baseFactory2) { function updatePropertySignature3(node, modifiers, name, questionToken, type) { return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.type !== type ? finishUpdatePropertySignature(createPropertySignature3(modifiers, name, questionToken, type), node) : node; } + function createOverloadPropertyDeclaration(modifiers, name, questionToken, type) { + const node = createBaseNamedDeclaration( + 174 /* OverloadPropertyDeclaration */, + modifiers, + name + ); + node.type = type; + node.questionToken = questionToken; + node.transformFlags = 1 /* ContainsTypeScript */; + node.initializer = void 0; + return node; + } + function updateOverloadPropertyDeclaration(node, modifiers, name, questionToken, type) { + return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createOverloadPropertyDeclaration(modifiers, name, questionToken, type), node) : node; + } function finishUpdatePropertySignature(updated, original) { if (updated !== original) { updated.initializer = original.initializer; @@ -22439,7 +22471,7 @@ function createNodeFactory(flags, baseFactory2) { } function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { const node = createBaseVariableLikeDeclaration( - 171 /* PropertyDeclaration */, + 172 /* PropertyDeclaration */, modifiers, name, type, @@ -22461,7 +22493,7 @@ function createNodeFactory(flags, baseFactory2) { } function createAnnotationPropertyDeclaration(name, type, initializer) { const node = createBaseVariableLikeDeclaration( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, void 0, name, type, @@ -22475,7 +22507,7 @@ function createNodeFactory(flags, baseFactory2) { } function createMethodSignature3(modifiers, name, questionToken, typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 173 /* MethodSignature */, + 175 /* MethodSignature */, modifiers, name, typeParameters, @@ -22491,7 +22523,7 @@ function createNodeFactory(flags, baseFactory2) { } function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 174 /* MethodDeclaration */, + 176 /* MethodDeclaration */, modifiers, name, typeParameters, @@ -22528,7 +22560,7 @@ function createNodeFactory(flags, baseFactory2) { } function createClassStaticBlockDeclaration(body) { const node = createBaseGenericNamedDeclaration( - 175 /* ClassStaticBlockDeclaration */, + 177 /* ClassStaticBlockDeclaration */, void 0, void 0, void 0 @@ -22551,7 +22583,7 @@ function createNodeFactory(flags, baseFactory2) { } function createConstructorDeclaration(modifiers, parameters, body) { const node = createBaseFunctionLikeDeclaration( - 176 /* Constructor */, + 178 /* Constructor */, modifiers, void 0, void 0, @@ -22578,7 +22610,7 @@ function createNodeFactory(flags, baseFactory2) { } function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 177 /* GetAccessor */, + 179 /* GetAccessor */, modifiers, name, void 0, @@ -22600,7 +22632,7 @@ function createNodeFactory(flags, baseFactory2) { } function createSetAccessorDeclaration(modifiers, name, parameters, body) { const node = createBaseFunctionLikeDeclaration( - 178 /* SetAccessor */, + 180 /* SetAccessor */, modifiers, name, void 0, @@ -22624,7 +22656,7 @@ function createNodeFactory(flags, baseFactory2) { } function createCallSignature2(typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 179 /* CallSignature */, + 181 /* CallSignature */, void 0, void 0, typeParameters, @@ -22639,7 +22671,7 @@ function createNodeFactory(flags, baseFactory2) { } function createConstructSignature2(typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 180 /* ConstructSignature */, + 182 /* ConstructSignature */, void 0, void 0, typeParameters, @@ -22654,7 +22686,7 @@ function createNodeFactory(flags, baseFactory2) { } function createIndexSignature3(modifiers, parameters, type) { const node = createBaseSignatureDeclaration( - 181 /* IndexSignature */, + 183 /* IndexSignature */, modifiers, void 0, void 0, @@ -22668,7 +22700,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature3(modifiers, parameters, type), node) : node; } function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(204 /* TemplateLiteralTypeSpan */); + const node = createBaseNode(206 /* TemplateLiteralTypeSpan */); node.type = type; node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; @@ -22681,7 +22713,7 @@ function createNodeFactory(flags, baseFactory2) { return createToken3(kind); } function createTypePredicateNode3(assertsModifier, parameterName, type) { - const node = createBaseNode(182 /* TypePredicate */); + const node = createBaseNode(184 /* TypePredicate */); node.assertsModifier = assertsModifier; node.parameterName = asName(parameterName); node.type = type; @@ -22692,7 +22724,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode3(assertsModifier, parameterName, type), node) : node; } function createTypeReferenceNode2(typeName, typeArguments) { - const node = createBaseNode(183 /* TypeReference */); + const node = createBaseNode(185 /* TypeReference */); node.typeName = asName(typeName); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray2(typeArguments)); node.transformFlags = 1 /* ContainsTypeScript */; @@ -22703,7 +22735,7 @@ function createNodeFactory(flags, baseFactory2) { } function createFunctionTypeNode2(typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 184 /* FunctionType */, + 186 /* FunctionType */, void 0, void 0, typeParameters, @@ -22728,7 +22760,7 @@ function createNodeFactory(flags, baseFactory2) { } function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 185 /* ConstructorType */, + 187 /* ConstructorType */, modifiers, void 0, typeParameters, @@ -22751,7 +22783,7 @@ function createNodeFactory(flags, baseFactory2) { return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); } function createTypeQueryNode2(exprName, typeArguments) { - const node = createBaseNode(186 /* TypeQuery */); + const node = createBaseNode(188 /* TypeQuery */); node.exprName = exprName; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags = 1 /* ContainsTypeScript */; @@ -22761,7 +22793,7 @@ function createNodeFactory(flags, baseFactory2) { return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode2(exprName, typeArguments), node) : node; } function createTypeLiteralNode2(members) { - const node = createBaseNode(187 /* TypeLiteral */); + const node = createBaseNode(189 /* TypeLiteral */); node.members = createNodeArray2(members); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22770,7 +22802,7 @@ function createNodeFactory(flags, baseFactory2) { return node.members !== members ? update(createTypeLiteralNode2(members), node) : node; } function createArrayTypeNode2(elementType) { - const node = createBaseNode(188 /* ArrayType */); + const node = createBaseNode(190 /* ArrayType */); node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22779,7 +22811,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elementType !== elementType ? update(createArrayTypeNode2(elementType), node) : node; } function createTupleTypeNode2(elements) { - const node = createBaseNode(189 /* TupleType */); + const node = createBaseNode(191 /* TupleType */); node.elements = createNodeArray2(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22788,7 +22820,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createTupleTypeNode2(elements), node) : node; } function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseNode(202 /* NamedTupleMember */); + const node = createBaseNode(204 /* NamedTupleMember */); node.dotDotDotToken = dotDotDotToken; node.name = name; node.questionToken = questionToken; @@ -22800,7 +22832,7 @@ function createNodeFactory(flags, baseFactory2) { return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createNamedTupleMember(dotDotDotToken, name, questionToken, type), node) : node; } function createOptionalTypeNode2(type) { - const node = createBaseNode(190 /* OptionalType */); + const node = createBaseNode(192 /* OptionalType */); node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22809,7 +22841,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createOptionalTypeNode2(type), node) : node; } function createRestTypeNode2(type) { - const node = createBaseNode(191 /* RestType */); + const node = createBaseNode(193 /* RestType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22827,19 +22859,19 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; } function createUnionTypeNode2(types) { - return createUnionOrIntersectionTypeNode(192 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); + return createUnionOrIntersectionTypeNode(194 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function updateUnionTypeNode2(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function createIntersectionTypeNode2(types) { - return createUnionOrIntersectionTypeNode(193 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); + return createUnionOrIntersectionTypeNode(195 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function updateIntersectionTypeNode2(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function createConditionalTypeNode2(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(194 /* ConditionalType */); + const node = createBaseNode(196 /* ConditionalType */); node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); node.trueType = trueType; @@ -22851,7 +22883,7 @@ function createNodeFactory(flags, baseFactory2) { return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? update(createConditionalTypeNode2(checkType, extendsType, trueType, falseType), node) : node; } function createInferTypeNode2(typeParameter) { - const node = createBaseNode(195 /* InferType */); + const node = createBaseNode(197 /* InferType */); node.typeParameter = typeParameter; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22860,7 +22892,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameter !== typeParameter ? update(createInferTypeNode2(typeParameter), node) : node; } function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(203 /* TemplateLiteralType */); + const node = createBaseNode(205 /* TemplateLiteralType */); node.head = head; node.templateSpans = createNodeArray2(templateSpans); node.transformFlags = 1 /* ContainsTypeScript */; @@ -22870,7 +22902,7 @@ function createNodeFactory(flags, baseFactory2) { return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } function createImportTypeNode2(argument, assertions, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(205 /* ImportType */); + const node = createBaseNode(207 /* ImportType */); node.argument = argument; node.assertions = assertions; node.qualifier = qualifier; @@ -22883,7 +22915,7 @@ function createNodeFactory(flags, baseFactory2) { return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode2(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType2(type) { - const node = createBaseNode(196 /* ParenthesizedType */); + const node = createBaseNode(198 /* ParenthesizedType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22892,12 +22924,12 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createParenthesizedType2(type), node) : node; } function createThisTypeNode2() { - const node = createBaseNode(197 /* ThisType */); + const node = createBaseNode(199 /* ThisType */); node.transformFlags = 1 /* ContainsTypeScript */; return node; } function createTypeOperatorNode3(operator, type) { - const node = createBaseNode(198 /* TypeOperator */); + const node = createBaseNode(200 /* TypeOperator */); node.operator = operator; node.type = operator === 147 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); node.transformFlags = 1 /* ContainsTypeScript */; @@ -22907,7 +22939,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createTypeOperatorNode3(node.operator, type), node) : node; } function createIndexedAccessTypeNode2(objectType, indexType) { - const node = createBaseNode(199 /* IndexedAccessType */); + const node = createBaseNode(201 /* IndexedAccessType */); node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); node.indexType = indexType; node.transformFlags = 1 /* ContainsTypeScript */; @@ -22917,7 +22949,7 @@ function createNodeFactory(flags, baseFactory2) { return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode2(objectType, indexType), node) : node; } function createMappedTypeNode2(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseNode(200 /* MappedType */); + const node = createBaseNode(202 /* MappedType */); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; node.nameType = nameType; @@ -22931,7 +22963,7 @@ function createNodeFactory(flags, baseFactory2) { return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? update(createMappedTypeNode2(readonlyToken, typeParameter, nameType, questionToken, type, members), node) : node; } function createLiteralTypeNode2(literal) { - const node = createBaseNode(201 /* LiteralType */); + const node = createBaseNode(203 /* LiteralType */); node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22940,7 +22972,7 @@ function createNodeFactory(flags, baseFactory2) { return node.literal !== literal ? update(createLiteralTypeNode2(literal), node) : node; } function createObjectBindingPattern2(elements) { - const node = createBaseNode(206 /* ObjectBindingPattern */); + const node = createBaseNode(208 /* ObjectBindingPattern */); node.elements = createNodeArray2(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { @@ -22952,7 +22984,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createObjectBindingPattern2(elements), node) : node; } function createArrayBindingPattern2(elements) { - const node = createBaseNode(207 /* ArrayBindingPattern */); + const node = createBaseNode(209 /* ArrayBindingPattern */); node.elements = createNodeArray2(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; return node; @@ -22962,7 +22994,7 @@ function createNodeFactory(flags, baseFactory2) { } function createBindingElement2(dotDotDotToken, propertyName, name, initializer) { const node = createBaseBindingLikeDeclaration( - 208 /* BindingElement */, + 210 /* BindingElement */, void 0, name, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer) @@ -22985,7 +23017,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseExpression(209 /* ArrayLiteralExpression */); + const node = createBaseExpression(211 /* ArrayLiteralExpression */); const lastElement = elements && lastOrUndefined(elements); const elementsArray = createNodeArray2(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); @@ -22997,7 +23029,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; } function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseExpression(210 /* ObjectLiteralExpression */); + const node = createBaseExpression(212 /* ObjectLiteralExpression */); node.properties = createNodeArray2(properties); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.properties); @@ -23007,7 +23039,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; } function createPropertyAccessExpression(expression, name) { - const node = createBaseExpression(211 /* PropertyAccessExpression */); + const node = createBaseExpression(213 /* PropertyAccessExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.name = asName(name); node.transformFlags = propagateChildFlags(node.expression) | (isIdentifier(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912 /* ContainsPrivateIdentifierInExpression */); @@ -23023,7 +23055,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.name !== name ? update(createPropertyAccessExpression(expression, name), node) : node; } function createPropertyAccessChain2(expression, questionDotToken, name) { - const node = createBaseExpression(211 /* PropertyAccessExpression */); + const node = createBaseExpression(213 /* PropertyAccessExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.questionDotToken = questionDotToken; @@ -23036,7 +23068,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain2(expression, questionDotToken, name), node) : node; } function createElementAccessExpression(expression, index) { - const node = createBaseExpression(212 /* ElementAccessExpression */); + const node = createBaseExpression(214 /* ElementAccessExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.argumentExpression = asExpression(index); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.argumentExpression); @@ -23052,7 +23084,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.argumentExpression !== argumentExpression ? update(createElementAccessExpression(expression, argumentExpression), node) : node; } function createElementAccessChain2(expression, questionDotToken, index) { - const node = createBaseExpression(212 /* ElementAccessExpression */); + const node = createBaseExpression(214 /* ElementAccessExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.questionDotToken = questionDotToken; @@ -23065,7 +23097,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain2(expression, questionDotToken, argumentExpression), node) : node; } function createCallExpression(expression, typeArguments, argumentsArray) { - const node = createBaseExpression(213 /* CallExpression */); + const node = createBaseExpression(215 /* CallExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.typeArguments = asNodeArray(typeArguments); node.arguments = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray2(argumentsArray)); @@ -23087,7 +23119,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallExpression(expression, typeArguments, argumentsArray), node) : node; } function createCallChain2(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseExpression(213 /* CallExpression */); + const node = createBaseExpression(215 /* CallExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.questionDotToken = questionDotToken; @@ -23107,7 +23139,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain2(expression, questionDotToken, typeArguments, argumentsArray), node) : node; } function createNewExpression(expression, typeArguments, argumentsArray) { - const node = createBaseExpression(214 /* NewExpression */); + const node = createBaseExpression(216 /* NewExpression */); node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; @@ -23121,7 +23153,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; } function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseExpression(215 /* TaggedTemplateExpression */); + const node = createBaseExpression(217 /* TaggedTemplateExpression */); node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess(tag, false); node.typeArguments = asNodeArray(typeArguments); node.template = template; @@ -23138,7 +23170,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; } function createTypeAssertion2(type, expression) { - const node = createBaseExpression(216 /* TypeAssertionExpression */); + const node = createBaseExpression(218 /* TypeAssertionExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -23148,7 +23180,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type || node.expression !== expression ? update(createTypeAssertion2(type, expression), node) : node; } function createParenthesizedExpression(expression) { - const node = createBaseExpression(217 /* ParenthesizedExpression */); + const node = createBaseExpression(219 /* ParenthesizedExpression */); node.expression = expression; node.transformFlags = propagateChildFlags(node.expression); return node; @@ -23158,7 +23190,7 @@ function createNodeFactory(flags, baseFactory2) { } function createFunctionExpression2(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 218 /* FunctionExpression */, + 220 /* FunctionExpression */, modifiers, name, typeParameters, @@ -23186,7 +23218,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression2(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node; } function createEtsComponentExpression(name, argumentsArray, body) { - const node = createBaseExpression(220 /* EtsComponentExpression */); + const node = createBaseExpression(222 /* EtsComponentExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(name); node.arguments = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray2(argumentsArray)); node.body = body; @@ -23197,7 +23229,7 @@ function createNodeFactory(flags, baseFactory2) { } function createArrowFunction3(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { const node = createBaseFunctionLikeDeclaration( - 219 /* ArrowFunction */, + 221 /* ArrowFunction */, modifiers, void 0, typeParameters, @@ -23216,7 +23248,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction3(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node; } function createDeleteExpression(expression) { - const node = createBaseExpression(221 /* DeleteExpression */); + const node = createBaseExpression(223 /* DeleteExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23225,7 +23257,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; } function createTypeOfExpression(expression) { - const node = createBaseExpression(222 /* TypeOfExpression */); + const node = createBaseExpression(224 /* TypeOfExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23234,7 +23266,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; } function createVoidExpression(expression) { - const node = createBaseExpression(223 /* VoidExpression */); + const node = createBaseExpression(225 /* VoidExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23243,7 +23275,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createVoidExpression(expression), node) : node; } function createAwaitExpression(expression) { - const node = createBaseExpression(224 /* AwaitExpression */); + const node = createBaseExpression(226 /* AwaitExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; return node; @@ -23252,7 +23284,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; } function createPrefixUnaryExpression(operator, operand) { - const node = createBaseExpression(225 /* PrefixUnaryExpression */); + const node = createBaseExpression(227 /* PrefixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -23265,7 +23297,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; } function createPostfixUnaryExpression(operand, operator) { - const node = createBaseExpression(226 /* PostfixUnaryExpression */); + const node = createBaseExpression(228 /* PostfixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -23278,7 +23310,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; } function createBinaryExpression(left, operator, right) { - const node = createBaseExpression(227 /* BinaryExpression */); + const node = createBaseExpression(229 /* BinaryExpression */); const operatorToken = asToken(operator); const operatorKind = operatorToken.kind; node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); @@ -23327,7 +23359,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseExpression(228 /* ConditionalExpression */); + const node = createBaseExpression(230 /* ConditionalExpression */); node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); node.questionToken = questionToken != null ? questionToken : createToken3(57 /* QuestionToken */); node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); @@ -23340,7 +23372,7 @@ function createNodeFactory(flags, baseFactory2) { 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 createTemplateExpression2(head, templateSpans) { - const node = createBaseExpression(229 /* TemplateExpression */); + const node = createBaseExpression(231 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray2(templateSpans); node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; @@ -23393,7 +23425,7 @@ function createNodeFactory(flags, baseFactory2) { } function createYieldExpression(asteriskToken, expression) { Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseExpression(230 /* YieldExpression */); + const node = createBaseExpression(232 /* YieldExpression */); node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.asteriskToken = asteriskToken; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; @@ -23403,7 +23435,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; } function createSpreadElement(expression) { - const node = createBaseExpression(231 /* SpreadElement */); + const node = createBaseExpression(233 /* SpreadElement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; return node; @@ -23413,7 +23445,7 @@ function createNodeFactory(flags, baseFactory2) { } function createClassExpression3(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseClassLikeDeclaration( - 232 /* ClassExpression */, + 234 /* ClassExpression */, modifiers, name, typeParameters, @@ -23427,10 +23459,10 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression3(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createOmittedExpression2() { - return createBaseExpression(233 /* OmittedExpression */); + return createBaseExpression(235 /* OmittedExpression */); } function createExpressionWithTypeArguments3(expression, typeArguments) { - const node = createBaseNode(234 /* ExpressionWithTypeArguments */); + const node = createBaseNode(236 /* ExpressionWithTypeArguments */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.typeArguments) | 1024 /* ContainsES2015 */; @@ -23440,7 +23472,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments3(expression, typeArguments), node) : node; } function createAsExpression2(expression, type) { - const node = createBaseExpression(235 /* AsExpression */); + const node = createBaseExpression(237 /* AsExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -23450,7 +23482,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createAsExpression2(expression, type), node) : node; } function createNonNullExpression2(expression) { - const node = createBaseExpression(236 /* NonNullExpression */); + const node = createBaseExpression(238 /* NonNullExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; return node; @@ -23462,7 +23494,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createNonNullExpression2(expression), node) : node; } function createSatisfiesExpression(expression, type) { - const node = createBaseExpression(239 /* SatisfiesExpression */); + const node = createBaseExpression(241 /* SatisfiesExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -23472,7 +23504,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; } function createNonNullChain2(expression) { - const node = createBaseExpression(236 /* NonNullExpression */); + const node = createBaseExpression(238 /* NonNullExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -23483,7 +23515,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createNonNullChain2(expression), node) : node; } function createMetaProperty2(keywordToken, name) { - const node = createBaseExpression(237 /* MetaProperty */); + const node = createBaseExpression(239 /* MetaProperty */); node.keywordToken = keywordToken; node.name = name; node.transformFlags |= propagateChildFlags(node.name); @@ -23503,7 +23535,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createMetaProperty2(node.keywordToken, name), node) : node; } function createTemplateSpan2(expression, literal) { - const node = createBaseNode(240 /* TemplateSpan */); + const node = createBaseNode(242 /* TemplateSpan */); node.expression = expression; node.literal = literal; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; @@ -23513,12 +23545,12 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan2(expression, literal), node) : node; } function createSemicolonClassElement2() { - const node = createBaseNode(241 /* SemicolonClassElement */); + const node = createBaseNode(243 /* SemicolonClassElement */); node.transformFlags |= 1024 /* ContainsES2015 */; return node; } function createBlock2(statements, multiLine) { - const node = createBaseNode(242 /* Block */); + const node = createBaseNode(244 /* Block */); node.statements = createNodeArray2(statements); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.statements); @@ -23528,7 +23560,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createBlock2(statements, node.multiLine), node) : node; } function createVariableStatement2(modifiers, declarationList) { - const node = createBaseDeclaration(244 /* VariableStatement */); + const node = createBaseDeclaration(246 /* VariableStatement */); node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList2(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); @@ -23541,10 +23573,10 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement2(modifiers, declarationList), node) : node; } function createEmptyStatement2() { - return createBaseNode(243 /* EmptyStatement */); + return createBaseNode(245 /* EmptyStatement */); } function createExpressionStatement2(expression) { - const node = createBaseNode(245 /* ExpressionStatement */); + const node = createBaseNode(247 /* ExpressionStatement */); node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23553,7 +23585,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createExpressionStatement2(expression), node) : node; } function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(246 /* IfStatement */); + const node = createBaseNode(248 /* IfStatement */); node.expression = expression; node.thenStatement = asEmbeddedStatement(thenStatement); node.elseStatement = asEmbeddedStatement(elseStatement); @@ -23564,7 +23596,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; } function createDoStatement(statement, expression) { - const node = createBaseNode(247 /* DoStatement */); + const node = createBaseNode(249 /* DoStatement */); node.statement = asEmbeddedStatement(statement); node.expression = expression; node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); @@ -23574,7 +23606,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; } function createWhileStatement(expression, statement) { - const node = createBaseNode(248 /* WhileStatement */); + const node = createBaseNode(250 /* WhileStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -23584,7 +23616,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; } function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(249 /* ForStatement */); + const node = createBaseNode(251 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -23596,7 +23628,7 @@ function createNodeFactory(flags, baseFactory2) { 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(250 /* ForInStatement */); + const node = createBaseNode(252 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = asEmbeddedStatement(statement); @@ -23607,7 +23639,7 @@ function createNodeFactory(flags, baseFactory2) { 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(251 /* ForOfStatement */); + const node = createBaseNode(253 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); @@ -23621,7 +23653,7 @@ function createNodeFactory(flags, baseFactory2) { 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(252 /* ContinueStatement */); + const node = createBaseNode(254 /* ContinueStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; return node; @@ -23630,7 +23662,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createContinueStatement(label), node) : node; } function createBreakStatement(label) { - const node = createBaseNode(253 /* BreakStatement */); + const node = createBaseNode(255 /* BreakStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; return node; @@ -23639,7 +23671,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createBreakStatement(label), node) : node; } function createReturnStatement(expression) { - const node = createBaseNode(254 /* ReturnStatement */); + const node = createBaseNode(256 /* ReturnStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; return node; @@ -23648,7 +23680,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createReturnStatement(expression), node) : node; } function createWithStatement(expression, statement) { - const node = createBaseNode(255 /* WithStatement */); + const node = createBaseNode(257 /* WithStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -23658,7 +23690,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; } function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(256 /* SwitchStatement */); + const node = createBaseNode(258 /* SwitchStatement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.caseBlock = caseBlock; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); @@ -23668,7 +23700,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; } function createLabeledStatement(label, statement) { - const node = createBaseNode(257 /* LabeledStatement */); + const node = createBaseNode(259 /* LabeledStatement */); node.label = asName(label); node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); @@ -23678,7 +23710,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; } function createThrowStatement(expression) { - const node = createBaseNode(258 /* ThrowStatement */); + const node = createBaseNode(260 /* ThrowStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23687,7 +23719,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createThrowStatement(expression), node) : node; } function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(259 /* TryStatement */); + const node = createBaseNode(261 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -23698,11 +23730,11 @@ function createNodeFactory(flags, baseFactory2) { return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; } function createDebuggerStatement2() { - return createBaseNode(260 /* DebuggerStatement */); + return createBaseNode(262 /* DebuggerStatement */); } function createVariableDeclaration3(name, exclamationToken, type, initializer) { const node = createBaseVariableLikeDeclaration( - 261 /* VariableDeclaration */, + 263 /* VariableDeclaration */, void 0, name, type, @@ -23719,7 +23751,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.type !== type || node.exclamationToken !== exclamationToken || node.initializer !== initializer ? update(createVariableDeclaration3(name, exclamationToken, type, initializer), node) : node; } function createVariableDeclarationList2(declarations, flags2 = 0 /* None */) { - const node = createBaseNode(262 /* VariableDeclarationList */); + const node = createBaseNode(264 /* VariableDeclarationList */); node.flags |= flags2 & 3 /* BlockScoped */; node.declarations = createNodeArray2(declarations); node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -23733,7 +23765,7 @@ function createNodeFactory(flags, baseFactory2) { } function createFunctionDeclaration2(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 263 /* FunctionDeclaration */, + 265 /* FunctionDeclaration */, modifiers, name, typeParameters, @@ -23770,7 +23802,7 @@ function createNodeFactory(flags, baseFactory2) { } function createClassDeclaration2(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseClassLikeDeclaration( - 264 /* ClassDeclaration */, + 266 /* ClassDeclaration */, modifiers, name, typeParameters, @@ -23792,7 +23824,7 @@ function createNodeFactory(flags, baseFactory2) { } function createStructDeclaration(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseClassLikeDeclaration( - 265 /* StructDeclaration */, + 267 /* StructDeclaration */, modifiers, name, typeParameters, @@ -23814,7 +23846,7 @@ function createNodeFactory(flags, baseFactory2) { } function createAnnotationDeclaration(modifiers, name, members) { const node = createBaseNamedDeclaration( - 266 /* AnnotationDeclaration */, + 268 /* AnnotationDeclaration */, modifiers, name ); @@ -23831,9 +23863,28 @@ function createNodeFactory(flags, baseFactory2) { function updateAnnotationDeclaration(node, modifiers, name, members) { return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createAnnotationDeclaration(modifiers, name, members), node) : node; } + function createOverloadDeclaration(modifiers, name, members) { + const node = createBaseNamedDeclaration( + 269 /* OverloadDeclaration */, + modifiers, + name + ); + node.members = createNodeArray2(members); + node.transformFlags |= propagateChildrenFlags(node.members); + if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + node.transformFlags = 1 /* ContainsTypeScript */; + } else { + node.transformFlags |= 1024 /* ContainsES2015 */; + node.transformFlags |= 1 /* ContainsTypeScript */; + } + return node; + } + function updateOverloadDeclaration(node, modifiers, name, members) { + return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createOverloadDeclaration(modifiers, name, members), node) : node; + } function createInterfaceDeclaration2(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseInterfaceOrClassLikeDeclaration( - 267 /* InterfaceDeclaration */, + 270 /* InterfaceDeclaration */, modifiers, name, typeParameters, @@ -23855,7 +23906,7 @@ function createNodeFactory(flags, baseFactory2) { } function createTypeAliasDeclaration2(modifiers, name, typeParameters, type) { const node = createBaseGenericNamedDeclaration( - 268 /* TypeAliasDeclaration */, + 271 /* TypeAliasDeclaration */, modifiers, name, typeParameters @@ -23876,7 +23927,7 @@ function createNodeFactory(flags, baseFactory2) { } function createEnumDeclaration2(modifiers, name, members) { const node = createBaseNamedDeclaration( - 269 /* EnumDeclaration */, + 272 /* EnumDeclaration */, modifiers, name ); @@ -23896,7 +23947,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createModuleDeclaration2(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(270 /* ModuleDeclaration */); + const node = createBaseDeclaration(273 /* ModuleDeclaration */); node.modifiers = asNodeArray(modifiers); node.flags |= flags2 & (16 /* Namespace */ | 4 /* NestedNamespace */ | 1024 /* GlobalAugmentation */); node.name = name; @@ -23920,7 +23971,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createModuleBlock2(statements) { - const node = createBaseNode(271 /* ModuleBlock */); + const node = createBaseNode(274 /* ModuleBlock */); node.statements = createNodeArray2(statements); node.transformFlags |= propagateChildrenFlags(node.statements); return node; @@ -23929,7 +23980,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createModuleBlock2(statements), node) : node; } function createCaseBlock2(clauses) { - const node = createBaseNode(272 /* CaseBlock */); + const node = createBaseNode(275 /* CaseBlock */); node.clauses = createNodeArray2(clauses); node.transformFlags |= propagateChildrenFlags(node.clauses); return node; @@ -23939,7 +23990,7 @@ function createNodeFactory(flags, baseFactory2) { } function createNamespaceExportDeclaration2(name) { const node = createBaseNamedDeclaration( - 273 /* NamespaceExportDeclaration */, + 276 /* NamespaceExportDeclaration */, void 0, name ); @@ -23960,7 +24011,7 @@ function createNodeFactory(flags, baseFactory2) { } function createImportEqualsDeclaration2(modifiers, isTypeOnly, name, moduleReference) { const node = createBaseNamedDeclaration( - 274 /* ImportEqualsDeclaration */, + 277 /* ImportEqualsDeclaration */, modifiers, name ); @@ -23983,7 +24034,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createImportDeclaration2(modifiers, importClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(275 /* ImportDeclaration */); + const node = createBaseDeclaration(278 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; @@ -24003,7 +24054,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createImportClause3(isTypeOnly, name, namedBindings) { - const node = createBaseNode(276 /* ImportClause */); + const node = createBaseNode(279 /* ImportClause */); node.isTypeOnly = isTypeOnly; node.name = name; node.namedBindings = namedBindings; @@ -24025,7 +24076,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createAssertClause(elements, multiLine) { - const node = createBaseNode(302 /* AssertClause */); + const node = createBaseNode(305 /* AssertClause */); node.elements = createNodeArray2(elements); node.multiLine = multiLine; node.transformFlags |= 4 /* ContainsESNext */; @@ -24035,7 +24086,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; } function createAssertEntry(name, value) { - const node = createBaseNode(303 /* AssertEntry */); + const node = createBaseNode(306 /* AssertEntry */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -24045,7 +24096,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; } function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(304 /* ImportTypeAssertionContainer */); + const node = createBaseNode(307 /* ImportTypeAssertionContainer */); node.assertClause = clause; node.multiLine = multiLine; return node; @@ -24054,7 +24105,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } function createNamespaceImport2(name) { - const node = createBaseNode(277 /* NamespaceImport */); + const node = createBaseNode(280 /* NamespaceImport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24064,7 +24115,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceImport2(name), node) : node; } function createNamespaceExport2(name) { - const node = createBaseNode(283 /* NamespaceExport */); + const node = createBaseNode(286 /* NamespaceExport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name) | 4 /* ContainsESNext */; node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24074,7 +24125,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceExport2(name), node) : node; } function createNamedImports2(elements) { - const node = createBaseNode(278 /* NamedImports */); + const node = createBaseNode(281 /* NamedImports */); node.elements = createNodeArray2(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24084,7 +24135,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedImports2(elements), node) : node; } function createImportSpecifier2(isTypeOnly, propertyName, name) { - const node = createBaseNode(279 /* ImportSpecifier */); + const node = createBaseNode(282 /* ImportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = propertyName; node.name = name; @@ -24096,7 +24147,7 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createImportSpecifier2(isTypeOnly, propertyName, name), node) : node; } function createExportAssignment3(modifiers, isExportEquals, expression) { - const node = createBaseDeclaration(280 /* ExportAssignment */); + const node = createBaseDeclaration(283 /* ExportAssignment */); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary(63 /* EqualsToken */, void 0, expression) : parenthesizerRules().parenthesizeExpressionOfExportDefault(expression); @@ -24115,7 +24166,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createExportDeclaration3(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(281 /* ExportDeclaration */); + const node = createBaseDeclaration(284 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; @@ -24136,7 +24187,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createNamedExports2(elements) { - const node = createBaseNode(282 /* NamedExports */); + const node = createBaseNode(285 /* NamedExports */); node.elements = createNodeArray2(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24146,7 +24197,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedExports2(elements), node) : node; } function createExportSpecifier2(isTypeOnly, propertyName, name) { - const node = createBaseNode(284 /* ExportSpecifier */); + const node = createBaseNode(287 /* ExportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = asName(propertyName); node.name = asName(name); @@ -24158,11 +24209,11 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier2(isTypeOnly, propertyName, name), node) : node; } function createMissingDeclaration() { - const node = createBaseDeclaration(285 /* MissingDeclaration */); + const node = createBaseDeclaration(288 /* MissingDeclaration */); return node; } function createExternalModuleReference2(expression) { - const node = createBaseNode(286 /* ExternalModuleReference */); + const node = createBaseNode(289 /* ExternalModuleReference */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24195,7 +24246,7 @@ function createNodeFactory(flags, baseFactory2) { } function createJSDocFunctionType(parameters, type) { const node = createBaseSignatureDeclaration( - 326 /* JSDocFunctionType */, + 329 /* JSDocFunctionType */, void 0, void 0, void 0, @@ -24208,7 +24259,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; } function createJSDocTypeLiteral2(propertyTags, isArrayType = false) { - const node = createBaseNode(331 /* JSDocTypeLiteral */); + const node = createBaseNode(334 /* JSDocTypeLiteral */); node.jsDocPropertyTags = asNodeArray(propertyTags); node.isArrayType = isArrayType; return node; @@ -24217,7 +24268,7 @@ function createNodeFactory(flags, baseFactory2) { return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral2(propertyTags, isArrayType), node) : node; } function createJSDocTypeExpression2(type) { - const node = createBaseNode(318 /* JSDocTypeExpression */); + const node = createBaseNode(321 /* JSDocTypeExpression */); node.type = type; return node; } @@ -24225,7 +24276,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createJSDocTypeExpression2(type), node) : node; } function createJSDocSignature2(typeParameters, parameters, type) { - const node = createBaseNode(332 /* JSDocSignature */); + const node = createBaseNode(335 /* JSDocSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray2(parameters); node.type = type; @@ -24245,7 +24296,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createJSDocTemplateTag2(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(353 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier3("template"), comment); + const node = createBaseJSDocTag(356 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier3("template"), comment); node.constraint = constraint; node.typeParameters = createNodeArray2(typeParameters); return node; @@ -24254,7 +24305,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag2(tagName, constraint, typeParameters, comment), node) : node; } function createJSDocTypedefTag2(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTag(354 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier3("typedef"), comment); + const node = createBaseJSDocTag(357 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier3("typedef"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -24264,7 +24315,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag2(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocParameterTag2(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTag(349 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier3("param"), comment); + const node = createBaseJSDocTag(352 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier3("param"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -24275,7 +24326,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag2(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocPropertyTag2(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTag(356 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier3("prop"), comment); + const node = createBaseJSDocTag(359 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier3("prop"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -24286,7 +24337,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag2(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocCallbackTag2(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTag(347 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier3("callback"), comment); + const node = createBaseJSDocTag(350 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier3("callback"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -24296,7 +24347,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag2(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocAugmentsTag2(tagName, className, comment) { - const node = createBaseJSDocTag(337 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier3("augments"), comment); + const node = createBaseJSDocTag(340 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier3("augments"), comment); node.class = className; return node; } @@ -24304,12 +24355,12 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocAugmentsTag2(tagName, className, comment), node) : node; } function createJSDocImplementsTag2(tagName, className, comment) { - const node = createBaseJSDocTag(338 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier3("implements"), comment); + const node = createBaseJSDocTag(341 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier3("implements"), comment); node.class = className; return node; } function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(355 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier3("see"), comment); + const node = createBaseJSDocTag(358 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier3("see"), comment); node.name = name; return node; } @@ -24317,7 +24368,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; } function createJSDocNameReference(name) { - const node = createBaseNode(319 /* JSDocNameReference */); + const node = createBaseNode(322 /* JSDocNameReference */); node.name = name; return node; } @@ -24325,7 +24376,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocNameReference(name), node) : node; } function createJSDocMemberName(left, right) { - const node = createBaseNode(320 /* JSDocMemberName */); + const node = createBaseNode(323 /* JSDocMemberName */); node.left = left; node.right = right; node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); @@ -24335,7 +24386,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; } function createJSDocLink(name, text) { - const node = createBaseNode(333 /* JSDocLink */); + const node = createBaseNode(336 /* JSDocLink */); node.name = name; node.text = text; return node; @@ -24344,7 +24395,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLink(name, text), node) : node; } function createJSDocLinkCode(name, text) { - const node = createBaseNode(334 /* JSDocLinkCode */); + const node = createBaseNode(337 /* JSDocLinkCode */); node.name = name; node.text = text; return node; @@ -24353,7 +24404,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; } function createJSDocLinkPlain(name, text) { - const node = createBaseNode(335 /* JSDocLinkPlain */); + const node = createBaseNode(338 /* JSDocLinkPlain */); node.name = name; node.text = text; return node; @@ -24380,14 +24431,14 @@ function createNodeFactory(flags, baseFactory2) { 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(336 /* JSDocTag */, tagName, comment); + const node = createBaseJSDocTag(339 /* JSDocTag */, tagName, comment); return node; } function updateJSDocUnknownTag(node, tagName, comment) { return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; } function createJSDocText(text) { - const node = createBaseNode(330 /* JSDocText */); + const node = createBaseNode(333 /* JSDocText */); node.text = text; return node; } @@ -24395,7 +24446,7 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text ? update(createJSDocText(text), node) : node; } function createJSDocComment2(comment, tags) { - const node = createBaseNode(329 /* JSDoc */); + const node = createBaseNode(332 /* JSDoc */); node.comment = comment; node.tags = asNodeArray(tags); return node; @@ -24404,7 +24455,7 @@ function createNodeFactory(flags, baseFactory2) { return node.comment !== comment || node.tags !== tags ? update(createJSDocComment2(comment, tags), node) : node; } function createJsxElement2(openingElement, children, closingElement) { - const node = createBaseNode(287 /* JsxElement */); + const node = createBaseNode(290 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray2(children); node.closingElement = closingElement; @@ -24415,7 +24466,7 @@ function createNodeFactory(flags, baseFactory2) { return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? update(createJsxElement2(openingElement, children, closingElement), node) : node; } function createJsxSelfClosingElement2(tagName, typeArguments, attributes) { - const node = createBaseNode(288 /* JsxSelfClosingElement */); + const node = createBaseNode(291 /* JsxSelfClosingElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -24429,7 +24480,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxSelfClosingElement2(tagName, typeArguments, attributes), node) : node; } function createJsxOpeningElement2(tagName, typeArguments, attributes) { - const node = createBaseNode(289 /* JsxOpeningElement */); + const node = createBaseNode(292 /* JsxOpeningElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -24443,7 +24494,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement2(tagName, typeArguments, attributes), node) : node; } function createJsxClosingElement2(tagName) { - const node = createBaseNode(290 /* JsxClosingElement */); + const node = createBaseNode(293 /* JsxClosingElement */); node.tagName = tagName; node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; return node; @@ -24452,7 +24503,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName ? update(createJsxClosingElement2(tagName), node) : node; } function createJsxFragment2(openingFragment, children, closingFragment) { - const node = createBaseNode(291 /* JsxFragment */); + const node = createBaseNode(294 /* JsxFragment */); node.openingFragment = openingFragment; node.children = createNodeArray2(children); node.closingFragment = closingFragment; @@ -24473,17 +24524,17 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText2(text, containsOnlyTriviaWhiteSpaces), node) : node; } function createJsxOpeningFragment2() { - const node = createBaseNode(292 /* JsxOpeningFragment */); + const node = createBaseNode(295 /* JsxOpeningFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxJsxClosingFragment2() { - const node = createBaseNode(293 /* JsxClosingFragment */); + const node = createBaseNode(296 /* JsxClosingFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxAttribute2(name, initializer) { - const node = createBaseNode(294 /* JsxAttribute */); + const node = createBaseNode(297 /* JsxAttribute */); node.name = name; node.initializer = initializer; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; @@ -24493,7 +24544,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute2(name, initializer), node) : node; } function createJsxAttributes2(properties) { - const node = createBaseNode(295 /* JsxAttributes */); + const node = createBaseNode(298 /* JsxAttributes */); node.properties = createNodeArray2(properties); node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; return node; @@ -24502,7 +24553,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createJsxAttributes2(properties), node) : node; } function createJsxSpreadAttribute2(expression) { - const node = createBaseNode(296 /* JsxSpreadAttribute */); + const node = createBaseNode(299 /* JsxSpreadAttribute */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; return node; @@ -24511,7 +24562,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxSpreadAttribute2(expression), node) : node; } function createJsxExpression2(dotDotDotToken, expression) { - const node = createBaseNode(297 /* JsxExpression */); + const node = createBaseNode(300 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; @@ -24521,7 +24572,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxExpression2(node.dotDotDotToken, expression), node) : node; } function createCaseClause2(expression, statements) { - const node = createBaseNode(298 /* CaseClause */); + const node = createBaseNode(301 /* CaseClause */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.statements = createNodeArray2(statements); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); @@ -24531,7 +24582,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statements !== statements ? update(createCaseClause2(expression, statements), node) : node; } function createDefaultClause2(statements) { - const node = createBaseNode(299 /* DefaultClause */); + const node = createBaseNode(302 /* DefaultClause */); node.statements = createNodeArray2(statements); node.transformFlags = propagateChildrenFlags(node.statements); return node; @@ -24540,7 +24591,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createDefaultClause2(statements), node) : node; } function createHeritageClause2(token, types) { - const node = createBaseNode(300 /* HeritageClause */); + const node = createBaseNode(303 /* HeritageClause */); node.token = token; node.types = createNodeArray2(types); node.transformFlags |= propagateChildrenFlags(node.types); @@ -24560,7 +24611,7 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createHeritageClause2(node.token, types), node) : node; } function createCatchClause2(variableDeclaration, block) { - const node = createBaseNode(301 /* CatchClause */); + const node = createBaseNode(304 /* CatchClause */); if (typeof variableDeclaration === "string" || variableDeclaration && !isVariableDeclaration(variableDeclaration)) { variableDeclaration = createVariableDeclaration3( variableDeclaration, @@ -24581,7 +24632,7 @@ function createNodeFactory(flags, baseFactory2) { } function createPropertyAssignment2(name, initializer) { const node = createBaseNamedDeclaration( - 305 /* PropertyAssignment */, + 308 /* PropertyAssignment */, void 0, name ); @@ -24607,7 +24658,7 @@ function createNodeFactory(flags, baseFactory2) { } function createShorthandPropertyAssignment2(name, objectAssignmentInitializer) { const node = createBaseNamedDeclaration( - 306 /* ShorthandPropertyAssignment */, + 309 /* ShorthandPropertyAssignment */, void 0, name ); @@ -24634,7 +24685,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createSpreadAssignment2(expression) { - const node = createBaseNode(307 /* SpreadAssignment */); + const node = createBaseNode(310 /* SpreadAssignment */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; return node; @@ -24643,7 +24694,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createSpreadAssignment2(expression), node) : node; } function createEnumMember2(name, initializer) { - const node = createBaseNode(308 /* EnumMember */); + const node = createBaseNode(311 /* EnumMember */); node.name = asName(name); node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; @@ -24653,7 +24704,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createEnumMember2(name, initializer), node) : node; } function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(314 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(317 /* SourceFile */); node.statements = createNodeArray2(statements); node.endOfFileToken = endOfFileToken; node.flags |= flags2; @@ -24668,7 +24719,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) { - const node = source.redirectInfo ? Object.create(source.redirectInfo.redirectTarget) : baseFactory2.createBaseSourceFileNode(314 /* SourceFile */); + const node = source.redirectInfo ? Object.create(source.redirectInfo.redirectTarget) : baseFactory2.createBaseSourceFileNode(317 /* SourceFile */); for (const p in source) { if (p === "emitNode" || hasProperty(node, p) || !hasProperty(source, p)) continue; @@ -24690,7 +24741,7 @@ function createNodeFactory(flags, baseFactory2) { 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 createBundle2(sourceFiles, prepends = emptyArray) { - const node = createBaseNode(315 /* Bundle */); + const node = createBaseNode(318 /* Bundle */); node.prepends = prepends; node.sourceFiles = sourceFiles; return node; @@ -24699,7 +24750,7 @@ function createNodeFactory(flags, baseFactory2) { return node.sourceFiles !== sourceFiles || node.prepends !== prepends ? update(createBundle2(sourceFiles, prepends), node) : node; } function createUnparsedSource(prologues, syntheticReferences, texts) { - const node = createBaseNode(316 /* UnparsedSource */); + const node = createBaseNode(319 /* UnparsedSource */); node.prologues = prologues; node.syntheticReferences = syntheticReferences; node.texts = texts; @@ -24716,48 +24767,48 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createUnparsedPrologue(data) { - return createBaseUnparsedNode(309 /* UnparsedPrologue */, data); + return createBaseUnparsedNode(312 /* UnparsedPrologue */, data); } function createUnparsedPrepend(data, texts) { - const node = createBaseUnparsedNode(310 /* UnparsedPrepend */, data); + const node = createBaseUnparsedNode(313 /* UnparsedPrepend */, data); node.texts = texts; return node; } function createUnparsedTextLike(data, internal) { - return createBaseUnparsedNode(internal ? 312 /* UnparsedInternalText */ : 311 /* UnparsedText */, data); + return createBaseUnparsedNode(internal ? 315 /* UnparsedInternalText */ : 314 /* UnparsedText */, data); } function createUnparsedSyntheticReference(section) { - const node = createBaseNode(313 /* UnparsedSyntheticReference */); + const node = createBaseNode(316 /* UnparsedSyntheticReference */); node.data = section.data; node.section = section; return node; } function createInputFiles2() { - const node = createBaseNode(317 /* InputFiles */); + const node = createBaseNode(320 /* InputFiles */); node.javascriptText = ""; node.declarationText = ""; return node; } function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(238 /* SyntheticExpression */); + const node = createBaseNode(240 /* SyntheticExpression */); node.type = type; node.isSpread = isSpread; node.tupleNameSource = tupleNameSource; return node; } function createSyntaxList3(children) { - const node = createBaseNode(357 /* SyntaxList */); + const node = createBaseNode(360 /* SyntaxList */); node._children = children; return node; } function createNotEmittedStatement2(original) { - const node = createBaseNode(358 /* NotEmittedStatement */); + const node = createBaseNode(361 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; } function createPartiallyEmittedExpression2(expression, original) { - const node = createBaseNode(359 /* PartiallyEmittedExpression */); + const node = createBaseNode(362 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -24779,7 +24830,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createCommaListExpression(elements) { - const node = createBaseNode(360 /* CommaListExpression */); + const node = createBaseNode(363 /* CommaListExpression */); node.elements = createNodeArray2(sameFlatMap(elements, flattenCommaElements)); node.transformFlags |= propagateChildrenFlags(node.elements); return node; @@ -24788,19 +24839,19 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; } function createEndOfDeclarationMarker(original) { - const node = createBaseNode(362 /* EndOfDeclarationMarker */); + const node = createBaseNode(365 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createMergeDeclarationMarker(original) { - const node = createBaseNode(361 /* MergeDeclarationMarker */); + const node = createBaseNode(364 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(363 /* SyntheticReferenceExpression */); + const node = createBaseNode(366 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); @@ -24813,7 +24864,7 @@ function createNodeFactory(flags, baseFactory2) { if (node === void 0) { return node; } - const clone2 = isSourceFile(node) ? baseFactory2.createBaseSourceFileNode(314 /* SourceFile */) : isIdentifier(node) ? baseFactory2.createBaseIdentifierNode(79 /* Identifier */) : isPrivateIdentifier(node) ? baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */) : !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind); + const clone2 = isSourceFile(node) ? baseFactory2.createBaseSourceFileNode(317 /* SourceFile */) : isIdentifier(node) ? baseFactory2.createBaseIdentifierNode(79 /* Identifier */) : isPrivateIdentifier(node) ? baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */) : !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind); clone2.flags |= node.flags & ~8 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); @@ -24938,17 +24989,17 @@ function createNodeFactory(flags, baseFactory2) { } function updateOuterExpression(outerExpression, expression) { switch (outerExpression.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return updateParenthesizedExpression(outerExpression, expression); - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: return updateTypeAssertion2(outerExpression, outerExpression.type, expression); - case 235 /* AsExpression */: + case 237 /* AsExpression */: return updateAsExpression2(outerExpression, expression, outerExpression.type); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return updateNonNullExpression2(outerExpression, expression); - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression2(outerExpression, expression); } } @@ -24988,13 +25039,13 @@ function createNodeFactory(flags, baseFactory2) { case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: return false; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: const elements = target.elements; if (elements.length === 0) { return false; } return true; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -25241,7 +25292,7 @@ function createNodeFactory(flags, baseFactory2) { } else { modifierArray = modifiers; } - return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration2(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature3(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, (_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature3(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature2(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression2(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction3(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression3(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isStructDeclaration(node) ? updateStructDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isAnnotationDeclaration(node) ? updateAnnotationDeclaration(node, modifierArray, node.name, node.members) : isVariableStatement(node) ? updateVariableStatement2(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration2(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration2(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration2(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration2(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration2(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration2(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration2(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration2(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment2(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration3(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); + return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration2(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature3(node, modifierArray, node.name, node.questionToken, node.type) : isOverloadPropertyDeclaration(node) ? updateOverloadPropertyDeclaration(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, (_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature3(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature2(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression2(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction3(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression3(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isStructDeclaration(node) ? updateStructDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isAnnotationDeclaration(node) ? updateAnnotationDeclaration(node, modifierArray, node.name, node.members) : isOverloadDeclaration(node) ? updateOverloadDeclaration(node, modifierArray, node.name, node.members) : isVariableStatement(node) ? updateVariableStatement2(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration2(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration2(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration2(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration2(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration2(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration2(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration2(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration2(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment2(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration3(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); } function asNodeArray(array) { return array ? createNodeArray2(array) : void 0; @@ -25274,41 +25325,41 @@ function updateWithOriginal(updated, original) { } function getDefaultTagNameForKind(kind) { switch (kind) { - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: return "type"; - case 350 /* JSDocReturnTag */: + case 353 /* JSDocReturnTag */: return "returns"; - case 351 /* JSDocThisTag */: + case 354 /* JSDocThisTag */: return "this"; - case 348 /* JSDocEnumTag */: + case 351 /* JSDocEnumTag */: return "enum"; - case 339 /* JSDocAuthorTag */: + case 342 /* JSDocAuthorTag */: return "author"; - case 341 /* JSDocClassTag */: + case 344 /* JSDocClassTag */: return "class"; - case 342 /* JSDocPublicTag */: + case 345 /* JSDocPublicTag */: return "public"; - case 343 /* JSDocPrivateTag */: + case 346 /* JSDocPrivateTag */: return "private"; - case 344 /* JSDocProtectedTag */: + case 347 /* JSDocProtectedTag */: return "protected"; - case 345 /* JSDocReadonlyTag */: + case 348 /* JSDocReadonlyTag */: return "readonly"; - case 346 /* JSDocOverrideTag */: + case 349 /* JSDocOverrideTag */: return "override"; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return "template"; - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return "typedef"; - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: return "param"; - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: return "prop"; - case 347 /* JSDocCallbackTag */: + case 350 /* JSDocCallbackTag */: return "callback"; - case 337 /* JSDocAugmentsTag */: + case 340 /* JSDocAugmentsTag */: return "augments"; - case 338 /* JSDocImplementsTag */: + case 341 /* JSDocImplementsTag */: return "implements"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); @@ -25381,35 +25432,35 @@ function aggregateChildrenFlags(children) { children.transformFlags = subtreeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */) { + if (kind >= 184 /* FirstTypeNode */ && kind <= 207 /* LastTypeNode */) { return -2 /* TypeExcludes */; } switch (kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 209 /* ArrayLiteralExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 211 /* ArrayLiteralExpression */: return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return -1941676032 /* ModuleExcludes */; - case 168 /* Parameter */: + case 169 /* Parameter */: return -2147483648 /* ParameterExcludes */; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return -2072174592 /* ArrowFunctionExcludes */; - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: return -1937940480 /* FunctionExcludes */; - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return -2146893824 /* VariableDeclarationListExcludes */; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return -2147344384 /* ClassExcludes */; - case 176 /* Constructor */: + case 178 /* Constructor */: return -1937948672 /* ConstructorExcludes */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return -2013249536 /* PropertyExcludes */; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return -2005057536 /* MethodOrAccessorExcludes */; case 132 /* AnyKeyword */: case 149 /* NumberKeyword */: @@ -25420,31 +25471,31 @@ function getTransformFlagsSubtreeExclusions(kind) { case 135 /* BooleanKeyword */: case 154 /* SymbolKeyword */: case 115 /* VoidKeyword */: - case 167 /* TypeParameter */: - case 170 /* PropertySignature */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: + case 171 /* PropertySignature */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return -2 /* TypeExcludes */; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return -2147278848 /* ObjectLiteralExcludes */; - case 301 /* CatchClause */: + case 304 /* CatchClause */: return -2147418112 /* CatchClauseExcludes */; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: return -2147450880 /* BindingPatternExcludes */; - case 216 /* TypeAssertionExpression */: - case 239 /* SatisfiesExpression */: - case 235 /* AsExpression */: - case 359 /* PartiallyEmittedExpression */: - case 217 /* ParenthesizedExpression */: + case 218 /* TypeAssertionExpression */: + case 241 /* SatisfiesExpression */: + case 237 /* AsExpression */: + case 362 /* PartiallyEmittedExpression */: + case 219 /* ParenthesizedExpression */: case 107 /* SuperKeyword */: return -2147483648 /* OuterExpressionExcludes */; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return -2147483648 /* PropertyAccessExcludes */; default: return -2147483648 /* NodeExcludes */; @@ -25745,7 +25796,7 @@ function getOrCreateEmitNode(node) { var _a2; if (!node.emitNode) { if (isParseTreeNode(node)) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } const sourceFile = (_a2 = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node)))) != null ? _a2 : Debug.fail("Could not determine parsed source file."); @@ -26744,589 +26795,595 @@ function isImportKeyword(node) { return node.kind === 101 /* ImportKeyword */; } function isQualifiedName(node) { - return node.kind === 165 /* QualifiedName */; + return node.kind === 166 /* QualifiedName */; } function isComputedPropertyName(node) { - return node.kind === 166 /* ComputedPropertyName */; + return node.kind === 167 /* ComputedPropertyName */; } function isTypeParameterDeclaration(node) { - return node.kind === 167 /* TypeParameter */; + return node.kind === 168 /* TypeParameter */; } function isParameter(node) { - return node.kind === 168 /* Parameter */; + return node.kind === 169 /* Parameter */; } function isDecoratorOrAnnotation(node) { - return node.kind === 169 /* Decorator */; + return node.kind === 170 /* Decorator */; } function isDecorator(node) { - return node.kind === 169 /* Decorator */ && node.annotationDeclaration === void 0; + return node.kind === 170 /* Decorator */ && node.annotationDeclaration === void 0; } function isAnnotation(node) { - return node.kind === 169 /* Decorator */ && node.annotationDeclaration !== void 0; + return node.kind === 170 /* Decorator */ && node.annotationDeclaration !== void 0; } function isPropertySignature(node) { - return node.kind === 170 /* PropertySignature */; + return node.kind === 171 /* PropertySignature */; +} +function isOverloadPropertyDeclaration(node) { + return node.kind === 174 /* OverloadPropertyDeclaration */; } function isPropertyDeclaration(node) { - return node.kind === 171 /* PropertyDeclaration */; + return node.kind === 172 /* PropertyDeclaration */; } function isAnnotationPropertyDeclaration(node) { - return node.kind === 172 /* AnnotationPropertyDeclaration */; + return node.kind === 173 /* AnnotationPropertyDeclaration */; } function isMethodSignature(node) { - return node.kind === 173 /* MethodSignature */; + return node.kind === 175 /* MethodSignature */; } function isMethodDeclaration(node) { - return node.kind === 174 /* MethodDeclaration */; + return node.kind === 176 /* MethodDeclaration */; } function isClassStaticBlockDeclaration(node) { - return node.kind === 175 /* ClassStaticBlockDeclaration */; + return node.kind === 177 /* ClassStaticBlockDeclaration */; } function isConstructorDeclaration(node) { - return node.kind === 176 /* Constructor */; + return node.kind === 178 /* Constructor */; } function isGetAccessorDeclaration(node) { - return node.kind === 177 /* GetAccessor */; + return node.kind === 179 /* GetAccessor */; } function isSetAccessorDeclaration(node) { - return node.kind === 178 /* SetAccessor */; + return node.kind === 180 /* SetAccessor */; } function isCallSignatureDeclaration(node) { - return node.kind === 179 /* CallSignature */; + return node.kind === 181 /* CallSignature */; } function isConstructSignatureDeclaration(node) { - return node.kind === 180 /* ConstructSignature */; + return node.kind === 182 /* ConstructSignature */; } function isIndexSignatureDeclaration(node) { - return node.kind === 181 /* IndexSignature */; + return node.kind === 183 /* IndexSignature */; } function isTypePredicateNode(node) { - return node.kind === 182 /* TypePredicate */; + return node.kind === 184 /* TypePredicate */; } function isTypeReferenceNode(node) { - return node.kind === 183 /* TypeReference */; + return node.kind === 185 /* TypeReference */; } function isFunctionTypeNode(node) { - return node.kind === 184 /* FunctionType */; + return node.kind === 186 /* FunctionType */; } function isConstructorTypeNode(node) { - return node.kind === 185 /* ConstructorType */; + return node.kind === 187 /* ConstructorType */; } function isTypeQueryNode(node) { - return node.kind === 186 /* TypeQuery */; + return node.kind === 188 /* TypeQuery */; } function isTypeLiteralNode(node) { - return node.kind === 187 /* TypeLiteral */; + return node.kind === 189 /* TypeLiteral */; } function isArrayTypeNode(node) { - return node.kind === 188 /* ArrayType */; + return node.kind === 190 /* ArrayType */; } function isTupleTypeNode(node) { - return node.kind === 189 /* TupleType */; + return node.kind === 191 /* TupleType */; } function isNamedTupleMember(node) { - return node.kind === 202 /* NamedTupleMember */; + return node.kind === 204 /* NamedTupleMember */; } function isOptionalTypeNode(node) { - return node.kind === 190 /* OptionalType */; + return node.kind === 192 /* OptionalType */; } function isRestTypeNode(node) { - return node.kind === 191 /* RestType */; + return node.kind === 193 /* RestType */; } function isUnionTypeNode(node) { - return node.kind === 192 /* UnionType */; + return node.kind === 194 /* UnionType */; } function isIntersectionTypeNode(node) { - return node.kind === 193 /* IntersectionType */; + return node.kind === 195 /* IntersectionType */; } function isConditionalTypeNode(node) { - return node.kind === 194 /* ConditionalType */; + return node.kind === 196 /* ConditionalType */; } function isInferTypeNode(node) { - return node.kind === 195 /* InferType */; + return node.kind === 197 /* InferType */; } function isParenthesizedTypeNode(node) { - return node.kind === 196 /* ParenthesizedType */; + return node.kind === 198 /* ParenthesizedType */; } function isThisTypeNode(node) { - return node.kind === 197 /* ThisType */; + return node.kind === 199 /* ThisType */; } function isTypeOperatorNode(node) { - return node.kind === 198 /* TypeOperator */; + return node.kind === 200 /* TypeOperator */; } function isIndexedAccessTypeNode(node) { - return node.kind === 199 /* IndexedAccessType */; + return node.kind === 201 /* IndexedAccessType */; } function isMappedTypeNode(node) { - return node.kind === 200 /* MappedType */; + return node.kind === 202 /* MappedType */; } function isLiteralTypeNode(node) { - return node.kind === 201 /* LiteralType */; + return node.kind === 203 /* LiteralType */; } function isImportTypeNode(node) { - return node.kind === 205 /* ImportType */; + return node.kind === 207 /* ImportType */; } function isTemplateLiteralTypeSpan(node) { - return node.kind === 204 /* TemplateLiteralTypeSpan */; + return node.kind === 206 /* TemplateLiteralTypeSpan */; } function isTemplateLiteralTypeNode(node) { - return node.kind === 203 /* TemplateLiteralType */; + return node.kind === 205 /* TemplateLiteralType */; } function isObjectBindingPattern(node) { - return node.kind === 206 /* ObjectBindingPattern */; + return node.kind === 208 /* ObjectBindingPattern */; } function isArrayBindingPattern(node) { - return node.kind === 207 /* ArrayBindingPattern */; + return node.kind === 209 /* ArrayBindingPattern */; } function isBindingElement(node) { - return node.kind === 208 /* BindingElement */; + return node.kind === 210 /* BindingElement */; } function isArrayLiteralExpression(node) { - return node.kind === 209 /* ArrayLiteralExpression */; + return node.kind === 211 /* ArrayLiteralExpression */; } function isObjectLiteralExpression(node) { - return node.kind === 210 /* ObjectLiteralExpression */; + return node.kind === 212 /* ObjectLiteralExpression */; } function isPropertyAccessExpression(node) { - return node.kind === 211 /* PropertyAccessExpression */; + return node.kind === 213 /* PropertyAccessExpression */; } function isElementAccessExpression(node) { - return node.kind === 212 /* ElementAccessExpression */; + return node.kind === 214 /* ElementAccessExpression */; } function isCallExpression(node) { - return node.kind === 213 /* CallExpression */; + return node.kind === 215 /* CallExpression */; } function isNewExpression(node) { - return node.kind === 214 /* NewExpression */; + return node.kind === 216 /* NewExpression */; } function isTaggedTemplateExpression(node) { - return node.kind === 215 /* TaggedTemplateExpression */; + return node.kind === 217 /* TaggedTemplateExpression */; } function isTypeAssertionExpression(node) { - return node.kind === 216 /* TypeAssertionExpression */; + return node.kind === 218 /* TypeAssertionExpression */; } function isParenthesizedExpression(node) { - return node.kind === 217 /* ParenthesizedExpression */; + return node.kind === 219 /* ParenthesizedExpression */; } function isFunctionExpression(node) { - return node.kind === 218 /* FunctionExpression */; + return node.kind === 220 /* FunctionExpression */; } function isEtsComponentExpression(node) { - return node.kind === 220 /* EtsComponentExpression */; + return node.kind === 222 /* EtsComponentExpression */; } function isArrowFunction(node) { - return node.kind === 219 /* ArrowFunction */; + return node.kind === 221 /* ArrowFunction */; } function isDeleteExpression(node) { - return node.kind === 221 /* DeleteExpression */; + return node.kind === 223 /* DeleteExpression */; } function isTypeOfExpression(node) { - return node.kind === 222 /* TypeOfExpression */; + return node.kind === 224 /* TypeOfExpression */; } function isVoidExpression(node) { - return node.kind === 223 /* VoidExpression */; + return node.kind === 225 /* VoidExpression */; } function isAwaitExpression(node) { - return node.kind === 224 /* AwaitExpression */; + return node.kind === 226 /* AwaitExpression */; } function isPrefixUnaryExpression(node) { - return node.kind === 225 /* PrefixUnaryExpression */; + return node.kind === 227 /* PrefixUnaryExpression */; } function isPostfixUnaryExpression(node) { - return node.kind === 226 /* PostfixUnaryExpression */; + return node.kind === 228 /* PostfixUnaryExpression */; } function isBinaryExpression(node) { - return node.kind === 227 /* BinaryExpression */; + return node.kind === 229 /* BinaryExpression */; } function isConditionalExpression(node) { - return node.kind === 228 /* ConditionalExpression */; + return node.kind === 230 /* ConditionalExpression */; } function isTemplateExpression(node) { - return node.kind === 229 /* TemplateExpression */; + return node.kind === 231 /* TemplateExpression */; } function isYieldExpression(node) { - return node.kind === 230 /* YieldExpression */; + return node.kind === 232 /* YieldExpression */; } function isSpreadElement(node) { - return node.kind === 231 /* SpreadElement */; + return node.kind === 233 /* SpreadElement */; } function isClassExpression(node) { - return node.kind === 232 /* ClassExpression */; + return node.kind === 234 /* ClassExpression */; } function isOmittedExpression(node) { - return node.kind === 233 /* OmittedExpression */; + return node.kind === 235 /* OmittedExpression */; } function isExpressionWithTypeArguments(node) { - return node.kind === 234 /* ExpressionWithTypeArguments */; + return node.kind === 236 /* ExpressionWithTypeArguments */; } function isAsExpression(node) { - return node.kind === 235 /* AsExpression */; + return node.kind === 237 /* AsExpression */; } function isSatisfiesExpression(node) { - return node.kind === 239 /* SatisfiesExpression */; + return node.kind === 241 /* SatisfiesExpression */; } function isNonNullExpression(node) { - return node.kind === 236 /* NonNullExpression */; + return node.kind === 238 /* NonNullExpression */; } function isMetaProperty(node) { - return node.kind === 237 /* MetaProperty */; + return node.kind === 239 /* MetaProperty */; } function isSyntheticExpression(node) { - return node.kind === 238 /* SyntheticExpression */; + return node.kind === 240 /* SyntheticExpression */; } function isPartiallyEmittedExpression(node) { - return node.kind === 359 /* PartiallyEmittedExpression */; + return node.kind === 362 /* PartiallyEmittedExpression */; } function isCommaListExpression(node) { - return node.kind === 360 /* CommaListExpression */; + return node.kind === 363 /* CommaListExpression */; } function isTemplateSpan(node) { - return node.kind === 240 /* TemplateSpan */; + return node.kind === 242 /* TemplateSpan */; } function isSemicolonClassElement(node) { - return node.kind === 241 /* SemicolonClassElement */; + return node.kind === 243 /* SemicolonClassElement */; } function isBlock(node) { - return node.kind === 242 /* Block */; + return node.kind === 244 /* Block */; } function isVariableStatement(node) { - return node.kind === 244 /* VariableStatement */; + return node.kind === 246 /* VariableStatement */; } function isEmptyStatement(node) { - return node.kind === 243 /* EmptyStatement */; + return node.kind === 245 /* EmptyStatement */; } function isExpressionStatement(node) { - return node.kind === 245 /* ExpressionStatement */; + return node.kind === 247 /* ExpressionStatement */; } function isIfStatement(node) { - return node.kind === 246 /* IfStatement */; + return node.kind === 248 /* IfStatement */; } function isDoStatement(node) { - return node.kind === 247 /* DoStatement */; + return node.kind === 249 /* DoStatement */; } function isWhileStatement(node) { - return node.kind === 248 /* WhileStatement */; + return node.kind === 250 /* WhileStatement */; } function isForStatement(node) { - return node.kind === 249 /* ForStatement */; + return node.kind === 251 /* ForStatement */; } function isForInStatement(node) { - return node.kind === 250 /* ForInStatement */; + return node.kind === 252 /* ForInStatement */; } function isForOfStatement(node) { - return node.kind === 251 /* ForOfStatement */; + return node.kind === 253 /* ForOfStatement */; } function isContinueStatement(node) { - return node.kind === 252 /* ContinueStatement */; + return node.kind === 254 /* ContinueStatement */; } function isBreakStatement(node) { - return node.kind === 253 /* BreakStatement */; + return node.kind === 255 /* BreakStatement */; } function isReturnStatement(node) { - return node.kind === 254 /* ReturnStatement */; + return node.kind === 256 /* ReturnStatement */; } function isWithStatement(node) { - return node.kind === 255 /* WithStatement */; + return node.kind === 257 /* WithStatement */; } function isSwitchStatement(node) { - return node.kind === 256 /* SwitchStatement */; + return node.kind === 258 /* SwitchStatement */; } function isLabeledStatement(node) { - return node.kind === 257 /* LabeledStatement */; + return node.kind === 259 /* LabeledStatement */; } function isThrowStatement(node) { - return node.kind === 258 /* ThrowStatement */; + return node.kind === 260 /* ThrowStatement */; } function isTryStatement(node) { - return node.kind === 259 /* TryStatement */; + return node.kind === 261 /* TryStatement */; } function isDebuggerStatement(node) { - return node.kind === 260 /* DebuggerStatement */; + return node.kind === 262 /* DebuggerStatement */; } function isVariableDeclaration(node) { - return node.kind === 261 /* VariableDeclaration */; + return node.kind === 263 /* VariableDeclaration */; } function isVariableDeclarationList(node) { - return node.kind === 262 /* VariableDeclarationList */; + return node.kind === 264 /* VariableDeclarationList */; } function isFunctionDeclaration(node) { - return node.kind === 263 /* FunctionDeclaration */; + return node.kind === 265 /* FunctionDeclaration */; } function isClassDeclaration(node) { - return node.kind === 264 /* ClassDeclaration */; + return node.kind === 266 /* ClassDeclaration */; } function isStructDeclaration(node) { - return node.kind === 265 /* StructDeclaration */; + return node.kind === 267 /* StructDeclaration */; } function isAnnotationDeclaration(node) { - return node.kind === 266 /* AnnotationDeclaration */; + return node.kind === 268 /* AnnotationDeclaration */; +} +function isOverloadDeclaration(node) { + return node.kind === 269 /* OverloadDeclaration */; } function isInterfaceDeclaration(node) { - return node.kind === 267 /* InterfaceDeclaration */; + return node.kind === 270 /* InterfaceDeclaration */; } function isTypeAliasDeclaration(node) { - return node.kind === 268 /* TypeAliasDeclaration */; + return node.kind === 271 /* TypeAliasDeclaration */; } function isEnumDeclaration(node) { - return node.kind === 269 /* EnumDeclaration */; + return node.kind === 272 /* EnumDeclaration */; } function isModuleDeclaration(node) { - return node.kind === 270 /* ModuleDeclaration */; + return node.kind === 273 /* ModuleDeclaration */; } function isModuleBlock(node) { - return node.kind === 271 /* ModuleBlock */; + return node.kind === 274 /* ModuleBlock */; } function isCaseBlock(node) { - return node.kind === 272 /* CaseBlock */; + return node.kind === 275 /* CaseBlock */; } function isNamespaceExportDeclaration(node) { - return node.kind === 273 /* NamespaceExportDeclaration */; + return node.kind === 276 /* NamespaceExportDeclaration */; } function isImportEqualsDeclaration(node) { - return node.kind === 274 /* ImportEqualsDeclaration */; + return node.kind === 277 /* ImportEqualsDeclaration */; } function isImportDeclaration(node) { - return node.kind === 275 /* ImportDeclaration */; + return node.kind === 278 /* ImportDeclaration */; } function isImportClause(node) { - return node.kind === 276 /* ImportClause */; + return node.kind === 279 /* ImportClause */; } function isImportTypeAssertionContainer(node) { - return node.kind === 304 /* ImportTypeAssertionContainer */; + return node.kind === 307 /* ImportTypeAssertionContainer */; } function isAssertClause(node) { - return node.kind === 302 /* AssertClause */; + return node.kind === 305 /* AssertClause */; } function isAssertEntry(node) { - return node.kind === 303 /* AssertEntry */; + return node.kind === 306 /* AssertEntry */; } function isNamespaceImport(node) { - return node.kind === 277 /* NamespaceImport */; + return node.kind === 280 /* NamespaceImport */; } function isNamespaceExport(node) { - return node.kind === 283 /* NamespaceExport */; + return node.kind === 286 /* NamespaceExport */; } function isNamedImports(node) { - return node.kind === 278 /* NamedImports */; + return node.kind === 281 /* NamedImports */; } function isImportSpecifier(node) { - return node.kind === 279 /* ImportSpecifier */; + return node.kind === 282 /* ImportSpecifier */; } function isExportAssignment(node) { - return node.kind === 280 /* ExportAssignment */; + return node.kind === 283 /* ExportAssignment */; } function isExportDeclaration(node) { - return node.kind === 281 /* ExportDeclaration */; + return node.kind === 284 /* ExportDeclaration */; } function isNamedExports(node) { - return node.kind === 282 /* NamedExports */; + return node.kind === 285 /* NamedExports */; } function isExportSpecifier(node) { - return node.kind === 284 /* ExportSpecifier */; + return node.kind === 287 /* ExportSpecifier */; } function isMissingDeclaration(node) { - return node.kind === 285 /* MissingDeclaration */; + return node.kind === 288 /* MissingDeclaration */; } function isNotEmittedStatement(node) { - return node.kind === 358 /* NotEmittedStatement */; + return node.kind === 361 /* NotEmittedStatement */; } function isSyntheticReference(node) { - return node.kind === 363 /* SyntheticReferenceExpression */; + return node.kind === 366 /* SyntheticReferenceExpression */; } function isMergeDeclarationMarker(node) { - return node.kind === 361 /* MergeDeclarationMarker */; + return node.kind === 364 /* MergeDeclarationMarker */; } function isEndOfDeclarationMarker(node) { - return node.kind === 362 /* EndOfDeclarationMarker */; + return node.kind === 365 /* EndOfDeclarationMarker */; } function isExternalModuleReference(node) { - return node.kind === 286 /* ExternalModuleReference */; + return node.kind === 289 /* ExternalModuleReference */; } function isJsxElement(node) { - return node.kind === 287 /* JsxElement */; + return node.kind === 290 /* JsxElement */; } function isJsxSelfClosingElement(node) { - return node.kind === 288 /* JsxSelfClosingElement */; + return node.kind === 291 /* JsxSelfClosingElement */; } function isJsxOpeningElement(node) { - return node.kind === 289 /* JsxOpeningElement */; + return node.kind === 292 /* JsxOpeningElement */; } function isJsxClosingElement(node) { - return node.kind === 290 /* JsxClosingElement */; + return node.kind === 293 /* JsxClosingElement */; } function isJsxFragment(node) { - return node.kind === 291 /* JsxFragment */; + return node.kind === 294 /* JsxFragment */; } function isJsxOpeningFragment(node) { - return node.kind === 292 /* JsxOpeningFragment */; + return node.kind === 295 /* JsxOpeningFragment */; } function isJsxClosingFragment(node) { - return node.kind === 293 /* JsxClosingFragment */; + return node.kind === 296 /* JsxClosingFragment */; } function isJsxAttribute(node) { - return node.kind === 294 /* JsxAttribute */; + return node.kind === 297 /* JsxAttribute */; } function isJsxAttributes(node) { - return node.kind === 295 /* JsxAttributes */; + return node.kind === 298 /* JsxAttributes */; } function isJsxSpreadAttribute(node) { - return node.kind === 296 /* JsxSpreadAttribute */; + return node.kind === 299 /* JsxSpreadAttribute */; } function isJsxExpression(node) { - return node.kind === 297 /* JsxExpression */; + return node.kind === 300 /* JsxExpression */; } function isCaseClause(node) { - return node.kind === 298 /* CaseClause */; + return node.kind === 301 /* CaseClause */; } function isDefaultClause(node) { - return node.kind === 299 /* DefaultClause */; + return node.kind === 302 /* DefaultClause */; } function isHeritageClause(node) { - return node.kind === 300 /* HeritageClause */; + return node.kind === 303 /* HeritageClause */; } function isCatchClause(node) { - return node.kind === 301 /* CatchClause */; + return node.kind === 304 /* CatchClause */; } function isPropertyAssignment(node) { - return node.kind === 305 /* PropertyAssignment */; + return node.kind === 308 /* PropertyAssignment */; } function isShorthandPropertyAssignment(node) { - return node.kind === 306 /* ShorthandPropertyAssignment */; + return node.kind === 309 /* ShorthandPropertyAssignment */; } function isSpreadAssignment(node) { - return node.kind === 307 /* SpreadAssignment */; + return node.kind === 310 /* SpreadAssignment */; } function isEnumMember(node) { - return node.kind === 308 /* EnumMember */; + return node.kind === 311 /* EnumMember */; } function isUnparsedPrepend(node) { - return node.kind === 310 /* UnparsedPrepend */; + return node.kind === 313 /* UnparsedPrepend */; } function isSourceFile(node) { - return node.kind === 314 /* SourceFile */; + return node.kind === 317 /* SourceFile */; } function isBundle(node) { - return node.kind === 315 /* Bundle */; + return node.kind === 318 /* Bundle */; } function isUnparsedSource(node) { - return node.kind === 316 /* UnparsedSource */; + return node.kind === 319 /* UnparsedSource */; } function isJSDocTypeExpression(node) { - return node.kind === 318 /* JSDocTypeExpression */; + return node.kind === 321 /* JSDocTypeExpression */; } function isJSDocNameReference(node) { - return node.kind === 319 /* JSDocNameReference */; + return node.kind === 322 /* JSDocNameReference */; } function isJSDocMemberName(node) { - return node.kind === 320 /* JSDocMemberName */; + return node.kind === 323 /* JSDocMemberName */; } function isJSDocLink(node) { - return node.kind === 333 /* JSDocLink */; + return node.kind === 336 /* JSDocLink */; } function isJSDocLinkCode(node) { - return node.kind === 334 /* JSDocLinkCode */; + return node.kind === 337 /* JSDocLinkCode */; } function isJSDocLinkPlain(node) { - return node.kind === 335 /* JSDocLinkPlain */; + return node.kind === 338 /* JSDocLinkPlain */; } function isJSDocAllType(node) { - return node.kind === 321 /* JSDocAllType */; + return node.kind === 324 /* JSDocAllType */; } function isJSDocUnknownType(node) { - return node.kind === 322 /* JSDocUnknownType */; + return node.kind === 325 /* JSDocUnknownType */; } function isJSDocNullableType(node) { - return node.kind === 323 /* JSDocNullableType */; + return node.kind === 326 /* JSDocNullableType */; } function isJSDocNonNullableType(node) { - return node.kind === 324 /* JSDocNonNullableType */; + return node.kind === 327 /* JSDocNonNullableType */; } function isJSDocOptionalType(node) { - return node.kind === 325 /* JSDocOptionalType */; + return node.kind === 328 /* JSDocOptionalType */; } function isJSDocFunctionType(node) { - return node.kind === 326 /* JSDocFunctionType */; + return node.kind === 329 /* JSDocFunctionType */; } function isJSDocVariadicType(node) { - return node.kind === 327 /* JSDocVariadicType */; + return node.kind === 330 /* JSDocVariadicType */; } function isJSDocNamepathType(node) { - return node.kind === 328 /* JSDocNamepathType */; + return node.kind === 331 /* JSDocNamepathType */; } function isJSDoc(node) { - return node.kind === 329 /* JSDoc */; + return node.kind === 332 /* JSDoc */; } function isJSDocTypeLiteral(node) { - return node.kind === 331 /* JSDocTypeLiteral */; + return node.kind === 334 /* JSDocTypeLiteral */; } function isJSDocSignature(node) { - return node.kind === 332 /* JSDocSignature */; + return node.kind === 335 /* JSDocSignature */; } function isJSDocAugmentsTag(node) { - return node.kind === 337 /* JSDocAugmentsTag */; + return node.kind === 340 /* JSDocAugmentsTag */; } function isJSDocAuthorTag(node) { - return node.kind === 339 /* JSDocAuthorTag */; + return node.kind === 342 /* JSDocAuthorTag */; } function isJSDocClassTag(node) { - return node.kind === 341 /* JSDocClassTag */; + return node.kind === 344 /* JSDocClassTag */; } function isJSDocCallbackTag(node) { - return node.kind === 347 /* JSDocCallbackTag */; + return node.kind === 350 /* JSDocCallbackTag */; } function isJSDocPublicTag(node) { - return node.kind === 342 /* JSDocPublicTag */; + return node.kind === 345 /* JSDocPublicTag */; } function isJSDocPrivateTag(node) { - return node.kind === 343 /* JSDocPrivateTag */; + return node.kind === 346 /* JSDocPrivateTag */; } function isJSDocProtectedTag(node) { - return node.kind === 344 /* JSDocProtectedTag */; + return node.kind === 347 /* JSDocProtectedTag */; } function isJSDocReadonlyTag(node) { - return node.kind === 345 /* JSDocReadonlyTag */; + return node.kind === 348 /* JSDocReadonlyTag */; } function isJSDocOverrideTag(node) { - return node.kind === 346 /* JSDocOverrideTag */; + return node.kind === 349 /* JSDocOverrideTag */; } function isJSDocDeprecatedTag(node) { - return node.kind === 340 /* JSDocDeprecatedTag */; + return node.kind === 343 /* JSDocDeprecatedTag */; } function isJSDocSeeTag(node) { - return node.kind === 355 /* JSDocSeeTag */; + return node.kind === 358 /* JSDocSeeTag */; } function isJSDocEnumTag(node) { - return node.kind === 348 /* JSDocEnumTag */; + return node.kind === 351 /* JSDocEnumTag */; } function isJSDocParameterTag(node) { - return node.kind === 349 /* JSDocParameterTag */; + return node.kind === 352 /* JSDocParameterTag */; } function isJSDocReturnTag(node) { - return node.kind === 350 /* JSDocReturnTag */; + return node.kind === 353 /* JSDocReturnTag */; } function isJSDocThisTag(node) { - return node.kind === 351 /* JSDocThisTag */; + return node.kind === 354 /* JSDocThisTag */; } function isJSDocTypeTag(node) { - return node.kind === 352 /* JSDocTypeTag */; + return node.kind === 355 /* JSDocTypeTag */; } function isJSDocTemplateTag(node) { - return node.kind === 353 /* JSDocTemplateTag */; + return node.kind === 356 /* JSDocTemplateTag */; } function isJSDocTypedefTag(node) { - return node.kind === 354 /* JSDocTypedefTag */; + return node.kind === 357 /* JSDocTypedefTag */; } function isJSDocUnknownTag(node) { - return node.kind === 336 /* JSDocTag */; + return node.kind === 339 /* JSDocTag */; } function isJSDocPropertyTag(node) { - return node.kind === 356 /* JSDocPropertyTag */; + return node.kind === 359 /* JSDocPropertyTag */; } function isJSDocImplementsTag(node) { - return node.kind === 338 /* JSDocImplementsTag */; + return node.kind === 341 /* JSDocImplementsTag */; } function isSyntaxList(n) { - return n.kind === 357 /* SyntaxList */; + return n.kind === 360 /* SyntaxList */; } // src/compiler/factory/utilities.ts @@ -27570,14 +27627,14 @@ function createExpressionForObjectLiteralElementLike(factory2, node, property, r Debug.failBadSyntaxKind(property.name, "Private identifiers are not allowed in object literals."); } switch (property.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return createExpressionForAccessorDeclaration(factory2, node.properties, property, receiver, !!node.multiLine); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return createExpressionForPropertyAssignment(factory2, property, receiver); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return createExpressionForShorthandPropertyAssignment(factory2, property, receiver); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return createExpressionForMethodDeclaration(factory2, property, receiver); } } @@ -27630,7 +27687,7 @@ function startsWithUseStrict(statements) { return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement); } function isCommaSequence(node) { - return node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 360 /* CommaListExpression */; + return node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 363 /* CommaListExpression */; } function isJSDocTypeAssertion(node) { return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node); @@ -27642,18 +27699,18 @@ function getJSDocTypeAssertionType(node) { } function isOuterExpression(node, kinds = 15 /* All */) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { return false; } return (kinds & 1 /* Parentheses */) !== 0; - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: - case 239 /* SatisfiesExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: + case 241 /* SatisfiesExpression */: return (kinds & 2 /* TypeAssertions */) !== 0; - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return (kinds & 4 /* NonNullAssertions */) !== 0; - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -27759,10 +27816,10 @@ function getLocalNameForExternalImport(factory2, node, sourceFile) { const name = namespaceDeclaration.name; return isGeneratedIdentifier(name) ? name : factory2.createIdentifier(getSourceTextOfNodeFromSourceFile(sourceFile, name) || idText(name)); } - if (node.kind === 275 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 278 /* ImportDeclaration */ && node.importClause) { return factory2.getGeneratedNameForNode(node); } - if (node.kind === 281 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 284 /* ExportDeclaration */ && node.moduleSpecifier) { return factory2.getGeneratedNameForNode(node); } return void 0; @@ -27817,11 +27874,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } if (isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return bindingElement.name; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } } @@ -27835,11 +27892,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 168 /* Parameter */: - case 208 /* BindingElement */: + case 169 /* Parameter */: + case 210 /* BindingElement */: return bindingElement.dotDotDotToken; - case 231 /* SpreadElement */: - case 307 /* SpreadAssignment */: + case 233 /* SpreadElement */: + case 310 /* SpreadAssignment */: return bindingElement; } return void 0; @@ -27851,7 +27908,7 @@ function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { } function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 208 /* BindingElement */: + case 210 /* BindingElement */: if (bindingElement.propertyName) { const propertyName = bindingElement.propertyName; if (isPrivateIdentifier(propertyName)) { @@ -27860,7 +27917,7 @@ function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (bindingElement.name) { const propertyName = bindingElement.name; if (isPrivateIdentifier(propertyName)) { @@ -27869,7 +27926,7 @@ function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: if (bindingElement.name && isPrivateIdentifier(bindingElement.name)) { return Debug.failBadSyntaxKind(bindingElement.name); } @@ -27886,11 +27943,11 @@ function isStringOrNumericLiteral(node) { } function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: + case 211 /* ArrayLiteralExpression */: return name.elements; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return name.properties; } } @@ -27907,19 +27964,19 @@ function getJSDocTypeAliasName(fullName) { } function canHaveIllegalType(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 178 /* SetAccessor */; + return kind === 178 /* Constructor */ || kind === 180 /* SetAccessor */; } function canHaveIllegalTypeParameters(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 178 /* Constructor */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function canHaveIllegalDecorators(node) { const kind = node.kind; - return kind === 305 /* PropertyAssignment */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 263 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 285 /* MissingDeclaration */ || kind === 244 /* VariableStatement */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 269 /* EnumDeclaration */ || kind === 270 /* ModuleDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 273 /* NamespaceExportDeclaration */ || kind === 281 /* ExportDeclaration */ || kind === 280 /* ExportAssignment */; + return kind === 308 /* PropertyAssignment */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 265 /* FunctionDeclaration */ || kind === 178 /* Constructor */ || kind === 183 /* IndexSignature */ || kind === 177 /* ClassStaticBlockDeclaration */ || kind === 288 /* MissingDeclaration */ || kind === 246 /* VariableStatement */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 272 /* EnumDeclaration */ || kind === 273 /* ModuleDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 276 /* NamespaceExportDeclaration */ || kind === 284 /* ExportDeclaration */ || kind === 283 /* ExportAssignment */; } function canHaveIllegalModifiers(node) { const kind = node.kind; - return kind === 175 /* ClassStaticBlockDeclaration */ || kind === 305 /* PropertyAssignment */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 184 /* FunctionType */ || kind === 285 /* MissingDeclaration */ || kind === 273 /* NamespaceExportDeclaration */; + return kind === 177 /* ClassStaticBlockDeclaration */ || kind === 308 /* PropertyAssignment */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 186 /* FunctionType */ || kind === 288 /* MissingDeclaration */ || kind === 276 /* NamespaceExportDeclaration */; } var isTypeNodeOrTypeParameterDeclaration = or(isTypeNode, isTypeParameterDeclaration); var isQuestionOrExclamationToken = or(isQuestionToken, isExclamationToken); @@ -28205,11 +28262,11 @@ function setTextRange(range, location2) { } function canHaveModifiers(node) { const kind = node.kind; - return kind === 167 /* TypeParameter */ || kind === 168 /* Parameter */ || kind === 170 /* PropertySignature */ || kind === 171 /* PropertyDeclaration */ || kind === 173 /* MethodSignature */ || kind === 174 /* MethodDeclaration */ || kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 185 /* ConstructorType */ || kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || kind === 232 /* ClassExpression */ || kind === 265 /* StructDeclaration */ || kind === 266 /* AnnotationDeclaration */ || kind === 244 /* VariableStatement */ || kind === 263 /* FunctionDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 269 /* EnumDeclaration */ || kind === 270 /* ModuleDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 280 /* ExportAssignment */ || kind === 281 /* ExportDeclaration */; + return kind === 168 /* TypeParameter */ || kind === 169 /* Parameter */ || kind === 171 /* PropertySignature */ || kind === 172 /* PropertyDeclaration */ || kind === 175 /* MethodSignature */ || kind === 176 /* MethodDeclaration */ || kind === 178 /* Constructor */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 183 /* IndexSignature */ || kind === 187 /* ConstructorType */ || kind === 220 /* FunctionExpression */ || kind === 221 /* ArrowFunction */ || kind === 234 /* ClassExpression */ || kind === 267 /* StructDeclaration */ || kind === 268 /* AnnotationDeclaration */ || kind === 246 /* VariableStatement */ || kind === 265 /* FunctionDeclaration */ || kind === 266 /* ClassDeclaration */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 272 /* EnumDeclaration */ || kind === 273 /* ModuleDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 283 /* ExportAssignment */ || kind === 284 /* ExportDeclaration */; } function canHaveDecorators(node) { const kind = node.kind; - return kind === 168 /* Parameter */ || kind === 171 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 232 /* ClassExpression */ || kind === 264 /* ClassDeclaration */ || kind === 265 /* StructDeclaration */; + return kind === 169 /* Parameter */ || kind === 172 /* PropertyDeclaration */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 234 /* ClassExpression */ || kind === 266 /* ClassDeclaration */ || kind === 267 /* StructDeclaration */; } // src/compiler/parser.ts @@ -28264,430 +28321,434 @@ function isImportMeta2(node) { return isMetaProperty(node) && node.keywordToken === 101 /* ImportKeyword */ && node.name.escapedText === "meta"; } var forEachChildTable = { - [165 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { + [166 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [167 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { + [168 /* 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); }, - [306 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { + [309 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || 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); }, - [307 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { + [310 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [168 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { + [169 /* 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); }, - [171 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { + [172 /* 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); }, - [172 /* AnnotationPropertyDeclaration */]: function forEachChildInAnnotationPropertyDeclaration(node, cbNode, _cbNodes) { + [173 /* AnnotationPropertyDeclaration */]: function forEachChildInAnnotationPropertyDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [170 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { + [171 /* 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); + }, + [174 /* OverloadPropertyDeclaration */]: function forEachChildInOverloadPropertyDeclaration(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); }, - [305 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { + [308 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); }, - [261 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { + [263 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [208 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { + [210 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [181 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { + [183 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [185 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { + [187 /* 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); }, - [184 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { + [186 /* 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); }, - [179 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [180 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [220 /* EtsComponentExpression */]: function forEachChildInEtsComponentExpression(node, cbNode, cbNodes) { + [181 /* CallSignature */]: forEachChildInCallOrConstructSignature, + [182 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, + [222 /* EtsComponentExpression */]: function forEachChildInEtsComponentExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.arguments) || visitNode2(cbNode, node.body); }, - [174 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { + [176 /* 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); }, - [173 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { + [175 /* 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); }, - [176 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { + [178 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || 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); }, - [177 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { + [179 /* 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); }, - [178 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { + [180 /* 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); }, - [263 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { + [265 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || 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); }, - [218 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { + [220 /* 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); }, - [219 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { + [221 /* 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); }, - [175 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { + [177 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); }, - [183 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { + [185 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [182 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { + [184 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); }, - [186 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { + [188 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [187 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { + [189 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.members); }, - [188 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { + [190 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.elementType); }, - [189 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { + [191 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [192 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [193 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [194 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { + [194 /* UnionType */]: forEachChildInUnionOrIntersectionType, + [195 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, + [196 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); }, - [195 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { + [197 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.typeParameter); }, - [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { + [207 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [304 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { + [307 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); }, - [196 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [198 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [199 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { + [198 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, + [200 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, + [201 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); }, - [200 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { + [202 /* 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); }, - [201 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { + [203 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.literal); }, - [202 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { + [204 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); }, - [206 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [207 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [209 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { + [208 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [209 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [211 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [210 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { + [212 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [211 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { + [213 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); }, - [212 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { + [214 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); }, - [213 /* CallExpression */]: forEachChildInCallOrNewExpression, - [214 /* NewExpression */]: forEachChildInCallOrNewExpression, - [215 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { + [215 /* CallExpression */]: forEachChildInCallOrNewExpression, + [216 /* NewExpression */]: forEachChildInCallOrNewExpression, + [217 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); }, - [216 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { + [218 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); }, - [217 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { + [219 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [221 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { + [223 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [222 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { + [224 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [223 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { + [225 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [225 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { + [227 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [230 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { + [232 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); }, - [224 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { + [226 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [226 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { + [228 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [227 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { + [229 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); }, - [235 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { + [237 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [236 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { + [238 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [239 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { + [241 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [237 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { + [239 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [228 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { + [230 /* 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); }, - [231 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { + [233 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [242 /* Block */]: forEachChildInBlock, - [271 /* ModuleBlock */]: forEachChildInBlock, - [314 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { + [244 /* Block */]: forEachChildInBlock, + [274 /* ModuleBlock */]: forEachChildInBlock, + [317 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); }, - [244 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { + [246 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); }, - [262 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { + [264 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.declarations); }, - [245 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { + [247 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [246 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { + [248 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); }, - [247 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { + [249 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); }, - [248 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { + [250 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [249 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { + [251 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); }, - [250 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { + [252 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [251 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { + [253 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [252 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [253 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [254 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { + [254 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, + [255 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, + [256 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [255 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { + [257 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [256 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { + [258 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); }, - [272 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { + [275 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.clauses); }, - [298 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { + [301 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); }, - [299 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { + [302 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements); }, - [257 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { + [259 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); }, - [258 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { + [260 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [259 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { + [261 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); }, - [301 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { + [304 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); }, - [169 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { + [170 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [264 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [232 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [265 /* StructDeclaration */]: forEachChildInClassDeclarationOrExpression, - [266 /* AnnotationDeclaration */]: forEachChildInAnnotationDeclaration, - [267 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { + [266 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, + [234 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, + [267 /* StructDeclaration */]: forEachChildInClassDeclarationOrExpression, + [268 /* AnnotationDeclaration */]: forEachChildInAnnotationDeclaration, + [269 /* OverloadDeclaration */]: forEachChildInOverloadDeclaration, + [270 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); }, - [268 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { + [271 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); }, - [269 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { + [272 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); }, - [308 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { + [311 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [270 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { + [273 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); }, - [274 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { + [277 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, - [275 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { + [278 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [276 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { + [279 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [302 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [305 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [303 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [306 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, - [273 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { + [276 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNode2(cbNode, node.name); }, - [277 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { + [280 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [283 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { + [286 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [278 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [282 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [281 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { + [281 /* NamedImports */]: forEachChildInNamedImportsOrExports, + [285 /* NamedExports */]: forEachChildInNamedImportsOrExports, + [284 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [279 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [284 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [280 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { + [282 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, + [287 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, + [283 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); }, - [229 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { + [231 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [240 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { + [242 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); }, - [203 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { + [205 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [204 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { + [206 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); }, - [166 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { + [167 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [300 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { + [303 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.types); }, - [234 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { + [236 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [286 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { + [289 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [285 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { + [288 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers); }, - [360 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { + [363 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [287 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { + [290 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); }, - [291 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { + [294 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); }, - [288 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [289 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [295 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { + [291 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [292 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [298 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [294 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { + [297 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [296 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { + [299 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [297 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { + [300 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); }, - [290 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { + [293 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tagName); }, - [190 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [191 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [318 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [324 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [323 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [325 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [327 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [326 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { + [192 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [193 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [321 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [327 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [326 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [328 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [330 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [329 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [329 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { + [332 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); }, - [355 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { + [358 /* 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)); }, - [319 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { + [322 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [320 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { + [323 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [349 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [356 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [339 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { + [352 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, + [359 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, + [342 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [338 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { + [341 /* 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)); }, - [337 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { + [340 /* 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)); }, - [353 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { + [356 /* 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)); }, - [354 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 318 /* 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))); + [357 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { + return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 321 /* 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))); }, - [347 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { + [350 /* 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)); }, - [350 /* JSDocReturnTag */]: forEachChildInJSDocReturnTag, - [352 /* JSDocTypeTag */]: forEachChildInJSDocReturnTag, - [351 /* JSDocThisTag */]: forEachChildInJSDocReturnTag, - [348 /* JSDocEnumTag */]: forEachChildInJSDocReturnTag, - [332 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { + [353 /* JSDocReturnTag */]: forEachChildInJSDocReturnTag, + [355 /* JSDocTypeTag */]: forEachChildInJSDocReturnTag, + [354 /* JSDocThisTag */]: forEachChildInJSDocReturnTag, + [351 /* JSDocEnumTag */]: forEachChildInJSDocReturnTag, + [335 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); }, - [333 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [334 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [335 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [331 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { + [336 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, + [337 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, + [338 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, + [334 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { return forEach(node.jsDocPropertyTags, cbNode); }, - [336 /* JSDocTag */]: forEachChildInJSDocTag, - [341 /* JSDocClassTag */]: forEachChildInJSDocTag, - [342 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [343 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [344 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [345 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [340 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [346 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [359 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression + [339 /* JSDocTag */]: forEachChildInJSDocTag, + [344 /* JSDocClassTag */]: forEachChildInJSDocTag, + [345 /* JSDocPublicTag */]: forEachChildInJSDocTag, + [346 /* JSDocPrivateTag */]: forEachChildInJSDocTag, + [347 /* JSDocProtectedTag */]: forEachChildInJSDocTag, + [348 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, + [343 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, + [349 /* JSDocOverrideTag */]: forEachChildInJSDocTag, + [362 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression }; function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); @@ -28716,6 +28777,9 @@ function forEachChildInClassDeclarationOrExpression(node, cbNode, cbNodes) { function forEachChildInAnnotationDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); } +function forEachChildInOverloadDeclaration(node, cbNode, cbNodes) { + return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); +} function forEachChildInNamedImportsOrExports(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); } @@ -28744,7 +28808,7 @@ function forEachChildInPartiallyEmittedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); } function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 164 /* LastToken */) { + if (node === void 0 || node.kind <= 165 /* LastToken */) { return; } const fn = forEachChildTable[node.kind]; @@ -28779,7 +28843,7 @@ function forEachChildRecursively(rootNode, cbNode, cbNodes) { continue; return res; } - if (current.kind >= 165 /* FirstNode */) { + if (current.kind >= 166 /* FirstNode */) { for (const child of gatherPossibleChildren(current)) { queue.push(child); parents.push(current); @@ -29751,7 +29815,7 @@ var Parser; parseErrorAtCurrentToken(diagnosticMessage, arg0); } const pos = getNodePos(); - const result = kind === 79 /* Identifier */ ? factory2.createIdentifier("", void 0, void 0) : isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(kind, "", "", void 0) : kind === 8 /* NumericLiteral */ ? factory2.createNumericLiteral("", void 0) : kind === 10 /* StringLiteral */ ? factory2.createStringLiteral("", void 0) : kind === 285 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factory2.createToken(kind); + const result = kind === 79 /* Identifier */ ? factory2.createIdentifier("", void 0, void 0) : isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(kind, "", "", void 0) : kind === 8 /* NumericLiteral */ ? factory2.createNumericLiteral("", void 0) : kind === 10 /* StringLiteral */ ? factory2.createStringLiteral("", void 0) : kind === 288 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factory2.createToken(kind); return finishNode(result, pos); } function internIdentifier(text) { @@ -29876,6 +29940,9 @@ var Parser; if (inAllowAnnotationContext() && token() === 59 /* AtToken */) { return lookAhead(() => nextToken() === 119 /* InterfaceKeyword */); } + if (token() === 164 /* OverloadKeyword */) { + return true; + } return canFollowExportModifier(); case 89 /* DefaultKeyword */: return nextTokenCanFollowDefaultKeyword(); @@ -29900,7 +29967,7 @@ var Parser; return isModifierKind(token()) && tryParse(nextTokenCanFollowModifier); } function canFollowModifier() { - return token() === 22 /* OpenBracketToken */ || token() === 18 /* OpenBraceToken */ || token() === 41 /* AsteriskToken */ || token() === 25 /* DotDotDotToken */ || token() === 59 /* AtToken */ && inAllowAnnotationContext() && lookAhead(() => nextToken() === 119 /* InterfaceKeyword */) || isLiteralPropertyName(); + return token() === 22 /* OpenBracketToken */ || token() === 18 /* OpenBraceToken */ || token() === 41 /* AsteriskToken */ || token() === 25 /* DotDotDotToken */ || token() === 59 /* AtToken */ && inAllowAnnotationContext() && lookAhead(() => nextToken() === 119 /* InterfaceKeyword */) || token() === 164 /* OverloadKeyword */ || isLiteralPropertyName(); } function nextTokenCanFollowDefaultKeyword() { nextToken(); @@ -30175,15 +30242,15 @@ var Parser; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 176 /* Constructor */: - case 181 /* IndexSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 241 /* SemicolonClassElement */: + case 178 /* Constructor */: + case 183 /* IndexSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 243 /* SemicolonClassElement */: return true; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return !inStructContext(); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: const methodDeclaration = node; const nameIsConstructor = methodDeclaration.name.kind === 79 /* Identifier */ && methodDeclaration.name.originalKeywordKind === 136 /* ConstructorKeyword */; return !nameIsConstructor; @@ -30194,8 +30261,8 @@ var Parser; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: return true; } } @@ -30204,66 +30271,66 @@ var Parser; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 244 /* VariableStatement */: - case 242 /* Block */: - case 246 /* IfStatement */: - case 245 /* ExpressionStatement */: - case 258 /* ThrowStatement */: - case 254 /* ReturnStatement */: - case 256 /* SwitchStatement */: - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 249 /* ForStatement */: - case 248 /* WhileStatement */: - case 255 /* WithStatement */: - case 243 /* EmptyStatement */: - case 259 /* TryStatement */: - case 257 /* LabeledStatement */: - case 247 /* DoStatement */: - case 260 /* DebuggerStatement */: - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 265 /* FunctionDeclaration */: + case 246 /* VariableStatement */: + case 244 /* Block */: + case 248 /* IfStatement */: + case 247 /* ExpressionStatement */: + case 260 /* ThrowStatement */: + case 256 /* ReturnStatement */: + case 258 /* SwitchStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 251 /* ForStatement */: + case 250 /* WhileStatement */: + case 257 /* WithStatement */: + case 245 /* EmptyStatement */: + case 261 /* TryStatement */: + case 259 /* LabeledStatement */: + case 249 /* DoStatement */: + case 262 /* DebuggerStatement */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 308 /* EnumMember */; + return node.kind === 311 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 170 /* PropertySignature */: - case 179 /* CallSignature */: + case 182 /* ConstructSignature */: + case 175 /* MethodSignature */: + case 183 /* IndexSignature */: + case 171 /* PropertySignature */: + case 181 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 261 /* VariableDeclaration */) { + if (node.kind !== 263 /* VariableDeclaration */) { return false; } const variableDeclarator = node; return variableDeclarator.initializer === void 0; } function isReusableParameter(node) { - if (node.kind !== 168 /* Parameter */) { + if (node.kind !== 169 /* Parameter */) { return false; } const parameter = node; @@ -30554,14 +30621,14 @@ var Parser; } function typeHasArrowFunctionBlockingParseError(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return nodeIsMissing(node.typeName); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: { + case 186 /* FunctionType */: + case 187 /* ConstructorType */: { const { parameters, type } = node; return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); } - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return typeHasArrowFunctionBlockingParseError(node.type); default: return false; @@ -30802,14 +30869,14 @@ var Parser; function parseSignatureMember(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 180 /* ConstructSignature */) { + if (kind === 182 /* ConstructSignature */) { parseExpected(104 /* NewKeyword */); } const typeParameters = parseTypeParameters(); const parameters = parseParameters(4 /* Type */); const type = parseReturnType(58 /* ColonToken */, true); parseTypeMemberSemicolon(); - const node = kind === 179 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); + const node = kind === 181 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } function isIndexSignature() { @@ -30847,6 +30914,17 @@ var Parser; node.illegalDecorators = decorators; return withJSDoc(finishNode(node, pos), hasJSDoc); } + function parseOverloadPropertyDeclaration(pos, hasJSDoc, modifiers) { + const name = parsePropertyName(); + const questionToken = parseOptionalToken(57 /* QuestionToken */); + let node; + const type = parseTypeAnnotation(); + node = factory2.createOverloadPropertyDeclaration(modifiers, name, questionToken, type); + if (token() === 63 /* EqualsToken */) + node.initializer = parseInitializer(); + parseTypeMemberSemicolon(); + return withJSDoc(finishNode(node, pos), hasJSDoc); + } function parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers) { const name = parsePropertyName(); const questionToken = parseOptionalToken(57 /* QuestionToken */); @@ -30888,19 +30966,19 @@ var Parser; } function parseTypeMember() { if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */) { - return parseSignatureMember(179 /* CallSignature */); + return parseSignatureMember(181 /* CallSignature */); } if (token() === 104 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(180 /* ConstructSignature */); + return parseSignatureMember(182 /* ConstructSignature */); } const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); const modifiers = parseModifiers(); if (parseContextualModifier(138 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 177 /* GetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 179 /* GetAccessor */, 4 /* Type */); } if (parseContextualModifier(152 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 178 /* SetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 180 /* SetAccessor */, 4 /* Type */); } if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, void 0, modifiers); @@ -31776,7 +31854,7 @@ var Parser; return void 0; } let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 196 /* ParenthesizedType */) { + while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 198 /* ParenthesizedType */) { unwrappedType = unwrappedType.type; } const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); @@ -31839,7 +31917,7 @@ var Parser; return parseBinaryExpressionRest(precedence, leftOperand, pos); } function isInOrOfKeyword(t) { - return t === 102 /* InKeyword */ || t === 164 /* OfKeyword */; + return t === 102 /* InKeyword */ || t === 165 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand, pos) { while (true) { @@ -31921,7 +31999,7 @@ var Parser; if (token() === 42 /* AsteriskAsteriskToken */) { const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 216 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 218 /* 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)); @@ -32044,11 +32122,11 @@ var Parser; const pos = getNodePos(); const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); let result; - if (opening.kind === 289 /* JsxOpeningElement */) { + if (opening.kind === 292 /* JsxOpeningElement */) { let children = parseJsxChildren(opening); let closingElement; const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 287 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { + if ((lastChild == null ? void 0 : lastChild.kind) === 290 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { const end = lastChild.children.end; const newLast = finishNode( factory2.createJsxElement( @@ -32072,10 +32150,10 @@ var Parser; } } result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 292 /* JsxOpeningFragment */) { + } else if (opening.kind === 295 /* JsxOpeningFragment */) { result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { - Debug.assert(opening.kind === 288 /* JsxSelfClosingElement */); + Debug.assert(opening.kind === 291 /* JsxSelfClosingElement */); result = opening; } if (inExpressionContext && token() === 29 /* LessThanToken */) { @@ -32131,7 +32209,7 @@ var Parser; if (!child) break; list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 287 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { + if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 290 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { break; } } @@ -32339,7 +32417,7 @@ var Parser; continue; } if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 234 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest(pos, expression, questionDotToken, void 0); + expression = !questionDotToken && expression.kind === 236 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest(pos, expression, questionDotToken, void 0); continue; } if (!questionDotToken) { @@ -32387,7 +32465,7 @@ var Parser; } } if (typeArguments || token() === 20 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 234 /* ExpressionWithTypeArguments */) { + if (!questionDotToken && expression.kind === 236 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -32614,10 +32692,10 @@ var Parser; const decorators = parseDecorators(); const modifiers = parseModifiers(); if (parseContextualModifier(138 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 177 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 179 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(152 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 178 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 180 /* SetAccessor */, 0 /* None */); } const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const tokenIsIdentifier = isIdentifier2(); @@ -32687,7 +32765,7 @@ var Parser; const expressionPos = getNodePos(); let expression = parseMemberExpressionRest(expressionPos, parsePrimaryExpression(), false); let typeArguments; - if (expression.kind === 234 /* ExpressionWithTypeArguments */) { + if (expression.kind === 236 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -32795,7 +32873,7 @@ var Parser; } } let node; - if (awaitToken ? parseExpected(164 /* OfKeyword */) : parseOptional(164 /* OfKeyword */)) { + if (awaitToken ? parseExpected(165 /* OfKeyword */) : parseOptional(165 /* OfKeyword */)) { const expression = allowInAnd(() => parseAssignmentExpressionOrHigher(true)); parseExpected(21 /* CloseParenToken */); node = factory2.createForOfStatement(awaitToken, initializer, expression, parseStatement()); @@ -32816,10 +32894,10 @@ var Parser; function parseBreakOrContinueStatement(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 253 /* BreakStatement */ ? 81 /* BreakKeyword */ : 87 /* ContinueKeyword */); + parseExpected(kind === 255 /* BreakStatement */ ? 81 /* BreakKeyword */ : 87 /* ContinueKeyword */); const label = canParseSemicolon() ? void 0 : parseIdentifier(); parseSemicolon(); - const node = kind === 253 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); + const node = kind === 255 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseReturnStatement() { @@ -32973,6 +33051,8 @@ var Parser; return inEtsContext(); case 59 /* AtToken */: return inAllowAnnotationContext() && nextToken() === 119 /* InterfaceKeyword */; + case 164 /* OverloadKeyword */: + return nextTokenIsIdentifierOnSameLine(); case 119 /* InterfaceKeyword */: case 155 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); @@ -33107,9 +33187,9 @@ var Parser; case 98 /* ForKeyword */: return parseForOrForInOrForOfStatement(); case 87 /* ContinueKeyword */: - return parseBreakOrContinueStatement(252 /* ContinueStatement */); + return parseBreakOrContinueStatement(254 /* ContinueStatement */); case 81 /* BreakKeyword */: - return parseBreakOrContinueStatement(253 /* BreakStatement */); + return parseBreakOrContinueStatement(255 /* BreakStatement */); case 106 /* ReturnKeyword */: return parseReturnStatement(); case 117 /* WithKeyword */: @@ -33125,6 +33205,7 @@ var Parser; case 88 /* DebuggerKeyword */: return parseDebuggerStatement(); case 59 /* AtToken */: + case 164 /* OverloadKeyword */: return parseDeclaration(); case 133 /* AsyncKeyword */: case 119 /* InterfaceKeyword */: @@ -33173,6 +33254,19 @@ var Parser; const node = factory2.createAnnotationDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } + function parseOverloadDeclaration(pos, hasJSDoc, decorators, modifiers) { + parseExpected(164 /* OverloadKeyword */); + const name = createIdentifier3(isBindingIdentifier()); + let members; + if (parseExpected(18 /* OpenBraceToken */)) { + members = parseOverloadMembers(); + parseExpected(19 /* CloseBraceToken */); + } else { + members = createMissingList(); + } + const node = factory2.createOverloadDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, members); + return withJSDoc(finishNode(node, pos), hasJSDoc); + } function parseDeclaration() { var _a2, _b; const pos = getNodePos(); @@ -33242,6 +33336,8 @@ var Parser; return parseAnnotationDeclaration(pos, hasJSDoc, decorators, modifiers); } return parseDeclarationDefault(pos, decorators, modifiers); + case 164 /* OverloadKeyword */: + return parseOverloadDeclaration(pos, hasJSDoc, decorators, modifiers); case 119 /* InterfaceKeyword */: return parseInterfaceDeclaration(pos, hasJSDoc, decorators, modifiers); case 155 /* TypeKeyword */: @@ -33271,7 +33367,7 @@ var Parser; } function parseDeclarationDefault(pos, decorators, modifiers) { if (decorators || modifiers) { - const missing = createMissingNode(285 /* MissingDeclaration */, true, Diagnostics.Declaration_expected); + const missing = createMissingNode(288 /* MissingDeclaration */, true, Diagnostics.Declaration_expected); setTextRangePos(missing, pos); missing.illegalDecorators = decorators; missing.modifiers = modifiers; @@ -33381,7 +33477,7 @@ var Parser; } nextToken(); let declarations; - if (token() === 164 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 165 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { declarations = createMissingList(); } else { const savedDisallowIn = inDisallowInContext(); @@ -33411,7 +33507,7 @@ var Parser; const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const name = modifierFlags & 1024 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); if (name && hasEtsStylesDecoratorNames(decorators, sourceFileCompilerOptions)) { - fileStylesComponents.set(name.escapedText.toString(), 263 /* FunctionDeclaration */); + fileStylesComponents.set(name.escapedText.toString(), 265 /* FunctionDeclaration */); } const originalUICallbackContext = inUICallbackContext(); setEtsBuilderContext(hasEtsBuilderDecoratorNames(decorators, sourceFileCompilerOptions)); @@ -33515,7 +33611,7 @@ var Parser; setUICallbackContext(inBuildContext() || inBuilderContext()); if (inStructContext() && hasEtsStylesDecoratorNames(decorators, sourceFileCompilerOptions)) { if (methodName && currentStructName) { - structStylesComponents.set(methodName, { structName: currentStructName, kind: 174 /* MethodDeclaration */ }); + structStylesComponents.set(methodName, { structName: currentStructName, kind: 176 /* MethodDeclaration */ }); } const stylesEtsComponentDecoratorNames = getEtsStylesDecoratorComponentNames(decorators, sourceFileCompilerOptions); if (stylesEtsComponentDecoratorNames.length > 0) { @@ -33604,7 +33700,7 @@ var Parser; const parameters = parseParameters(0 /* None */); const type = parseReturnType(58 /* ColonToken */, false); const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 177 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, type, body) : factory2.createSetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, body); + const node = kind === 179 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, type, body) : factory2.createSetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, body); node.typeParameters = typeParameters; if (isSetAccessorDeclaration(node)) node.type = type; @@ -33816,10 +33912,10 @@ var Parser; return parseClassStaticBlockDeclaration(pos, hasJSDoc, decorators, modifiers); } if (parseContextualModifier(138 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 177 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 179 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(152 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 178 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 180 /* SetAccessor */, 0 /* None */); } if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, decorators, modifiers); @@ -33855,35 +33951,35 @@ var Parser; const hasJSDoc = hasPrecedingJSDocComment(); if (token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (parseContextualModifier(138 /* GetKeyword */)) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (parseContextualModifier(152 /* SetKeyword */)) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (isIndexSignature()) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); @@ -33894,11 +33990,66 @@ var Parser; } return Debug.fail("Should not have attempted to parse annotation member declaration."); } + function parseOverloadElement() { + const pos = getNodePos(); + if (token() === 26 /* SemicolonToken */) { + parseErrorAt(pos, pos, Diagnostics.Unexpected_keyword_or_identifier); + } + const hasJSDoc = hasPrecedingJSDocComment(); + if (token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (parseContextualModifier(138 /* GetKeyword */)) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (parseContextualModifier(152 /* SetKeyword */)) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (isIndexSignature()) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (tokenIsIdentifierOrKeyword(token())) { + const modifiers = parseModifiers(); + let overloadPropertyDeclaration = parseOverloadPropertyDeclaration(pos, hasJSDoc, modifiers); + if (overloadPropertyDeclaration.kind === 174 /* OverloadPropertyDeclaration */) { + return overloadPropertyDeclaration; + } + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + return Debug.fail("Should not have attempted to parse annotation member declaration."); + } function parseClassExpression() { - return parseClassDeclarationOrExpression(getNodePos(), hasPrecedingJSDocComment(), void 0, void 0, 232 /* ClassExpression */); + return parseClassDeclarationOrExpression(getNodePos(), hasPrecedingJSDocComment(), void 0, void 0, 234 /* ClassExpression */); } function parseClassDeclaration(pos, hasJSDoc, decorators, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers, 264 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers, 266 /* ClassDeclaration */); } function parseStructDeclaration(pos, hasJSDoc, decorators, modifiers) { return parseStructDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers); @@ -33919,7 +34070,7 @@ var Parser; members = createMissingList(); } setAwaitContext(savedAwaitContext); - const node = kind === 264 /* ClassDeclaration */ ? factory2.createClassDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members) : factory2.createClassExpression(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members); + const node = kind === 266 /* ClassDeclaration */ ? factory2.createClassDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members) : factory2.createClassExpression(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseStructDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers) { @@ -33983,7 +34134,7 @@ var Parser; function parseExpressionWithTypeArguments() { const pos = getNodePos(); const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 234 /* ExpressionWithTypeArguments */) { + if (expression.kind === 236 /* ExpressionWithTypeArguments */) { return expression; } const typeArguments = tryParseTypeArguments(); @@ -34001,13 +34152,16 @@ var Parser; function parseAnnotationMembers() { return parseList(ParsingContext.AnnotationMembers, parseAnnotationElement); } + function parseOverloadMembers() { + return parseList(ParsingContext.TypeMembers, parseOverloadElement); + } function parseStructMembers(pos) { const structMembers = parseList(ParsingContext.ClassMembers, parseClassElement); const virtualStructMembers = []; const virtualParameterProperties = []; structMembers.forEach((member) => { virtualStructMembers.push(member); - if (member.kind === 171 /* PropertyDeclaration */) { + if (member.kind === 172 /* PropertyDeclaration */) { const property = member; virtualParameterProperties.push( finishVirtualNode( @@ -34254,7 +34408,7 @@ var Parser; function parseImportClause(identifier, pos, isTypeOnly) { let namedBindings; if (!identifier || parseOptional(27 /* CommaToken */)) { - namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(278 /* NamedImports */); + namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(281 /* NamedImports */); } return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); } @@ -34287,15 +34441,15 @@ var Parser; } function parseNamedImportsOrExports(kind) { const pos = getNodePos(); - const node = kind === 278 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); + const node = kind === 281 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); return finishNode(node, pos); } function parseExportSpecifier() { const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(284 /* ExportSpecifier */), hasJSDoc); + return withJSDoc(parseImportOrExportSpecifier(287 /* ExportSpecifier */), hasJSDoc); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(279 /* ImportSpecifier */); + return parseImportOrExportSpecifier(282 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { const pos = getNodePos(); @@ -34339,10 +34493,10 @@ var Parser; parseExpected(129 /* AsKeyword */); name = parseNameWithKeywordCheck(); } - if (kind === 279 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 282 /* ImportSpecifier */ && checkIdentifierIsKeyword) { parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); } - const node = kind === 279 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); + const node = kind === 282 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); return finishNode(node, pos); function parseNameWithKeywordCheck() { checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); @@ -34369,7 +34523,7 @@ var Parser; parseExpected(160 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } else { - exportClause = parseNamedImportsOrExports(282 /* NamedExports */); + exportClause = parseNamedImportsOrExports(285 /* NamedExports */); if (token() === 160 /* FromKeyword */ || token() === 10 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { parseExpected(160 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); @@ -34943,7 +35097,7 @@ var Parser; switch (node.kind) { case 150 /* ObjectKeyword */: return true; - case 188 /* ArrayType */: + case 190 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; @@ -34973,12 +35127,12 @@ var Parser; let child; let children; while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent3, name))) { - if (child.kind === 349 /* JSDocParameterTag */ || child.kind === 356 /* JSDocPropertyTag */) { + if (child.kind === 352 /* JSDocParameterTag */ || child.kind === 359 /* JSDocPropertyTag */) { children = append(children, child); } } if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 188 /* ArrayType */), pos); + const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 190 /* ArrayType */), pos); return finishNode(factory2.createJSDocTypeExpression(literal), pos); } } @@ -35091,7 +35245,7 @@ var Parser; let hasChildren = false; while (child = tryParse(() => parseChildPropertyTag(indent3))) { hasChildren = true; - if (child.kind === 352 /* JSDocTypeTag */) { + if (child.kind === 355 /* JSDocTypeTag */) { if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { @@ -35106,7 +35260,7 @@ var Parser; } } if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 188 /* ArrayType */; + const isArrayType = typeExpression && typeExpression.type.kind === 190 /* ArrayType */; const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start3); end2 = typeExpression.end; @@ -35157,7 +35311,7 @@ var Parser; const returnTag = tryParse(() => { if (parseOptionalJsdoc(59 /* AtToken */)) { const tag = parseTag(indent3); - if (tag && tag.kind === 350 /* JSDocReturnTag */) { + if (tag && tag.kind === 353 /* JSDocReturnTag */) { return tag; } } @@ -35191,7 +35345,7 @@ var Parser; case 59 /* AtToken */: if (canParseTag) { const child = tryParseChildTag(target, indent3); - if (child && (child.kind === 349 /* JSDocParameterTag */ || child.kind === 356 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 352 /* JSDocParameterTag */ || child.kind === 359 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -37711,7 +37865,7 @@ function convertConfigFileToObject(sourceFile, errors, reportOptionsErrors, opti var _a2; const rootExpression = (_a2 = sourceFile.statements[0]) == null ? void 0 : _a2.expression; const knownRootOptions = reportOptionsErrors ? getTsconfigRootOptionsMap() : void 0; - if (rootExpression && rootExpression.kind !== 210 /* ObjectLiteralExpression */) { + if (rootExpression && rootExpression.kind !== 212 /* ObjectLiteralExpression */) { errors.push(createDiagnosticForNodeInSourceFile( sourceFile, rootExpression, @@ -37743,7 +37897,7 @@ function convertToObjectWorker(sourceFile, rootExpression, errors, returnValue, function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) { const result = returnValue ? {} : void 0; for (const element of node.properties) { - if (element.kind !== 305 /* PropertyAssignment */) { + if (element.kind !== 308 /* PropertyAssignment */) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); continue; } @@ -37831,13 +37985,13 @@ function convertToObjectWorker(sourceFile, rootExpression, errors, returnValue, case 8 /* NumericLiteral */: reportInvalidOptionValue(option && option.type !== "number"); return validateValue(Number(valueExpression.text)); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: if (valueExpression.operator !== 40 /* MinusToken */ || valueExpression.operand.kind !== 8 /* NumericLiteral */) { break; } reportInvalidOptionValue(option && option.type !== "number"); return validateValue(-Number(valueExpression.operand.text)); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: reportInvalidOptionValue(option && option.type !== "object"); const objectLiteralExpression = valueExpression; if (option) { @@ -37856,7 +38010,7 @@ function convertToObjectWorker(sourceFile, rootExpression, errors, returnValue, void 0 )); } - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: reportInvalidOptionValue(option && option.type !== "list"); return validateValue(convertArrayLiteralExpressionToJson( valueExpression.elements, @@ -40900,7 +41054,7 @@ function getReservedDecoratorsOfEtsFile(node, host) { } function getReservedDecoratorsOfStructDeclaration(node, host) { let reservedDecorators; - if (node.parent.kind === 265 /* StructDeclaration */) { + if (node.parent.kind === 267 /* StructDeclaration */) { reservedDecorators = ensureEtsDecorators(node, host); } return reservedDecorators; @@ -41117,10 +41271,10 @@ function isTokenInsideBuilder(decorators, compilerOptions) { return false; } function getEtsComponentExpressionInnerCallExpressionNode(node) { - while (node && node.kind !== 220 /* EtsComponentExpression */) { - if (node.kind === 213 /* CallExpression */) { + while (node && node.kind !== 222 /* EtsComponentExpression */) { + if (node.kind === 215 /* CallExpression */) { node = node.expression; - } else if (node.kind === 211 /* PropertyAccessExpression */) { + } else if (node.kind === 213 /* PropertyAccessExpression */) { node = node.expression; } else { node = void 0; @@ -41133,7 +41287,7 @@ function getRootEtsComponentInnerCallExpressionNode(node) { return node; } while (node) { - const ancestor = getAncestor(isCallExpression(node) ? node.parent : node, 213 /* CallExpression */); + const ancestor = getAncestor(isCallExpression(node) ? node.parent : node, 215 /* CallExpression */); const target = getRootEtsComponent(ancestor); if (target && isInStateStylesObject(node)) { return target; @@ -41162,7 +41316,7 @@ function getEtsComponentExpressionInnerExpressionStatementNode(node) { return void 0; } function isInStateStylesObject(node) { - const ancestor = getAncestor(node, 210 /* ObjectLiteralExpression */); + const ancestor = getAncestor(node, 212 /* ObjectLiteralExpression */); return ancestor !== void 0 && ancestor.parent !== void 0 && isPropertyAssignment(ancestor.parent); } function getEtsExtendDecoratorsComponentNames(decorators, compilerOptions) { @@ -41170,7 +41324,7 @@ function getEtsExtendDecoratorsComponentNames(decorators, compilerOptions) { const extendComponents = []; const extendDecorator = (_c = (_b = (_a2 = compilerOptions.ets) == null ? void 0 : _a2.extend) == null ? void 0 : _b.decorator) != null ? _c : "Extend"; decorators == null ? void 0 : decorators.forEach((decorator) => { - if (decorator.expression.kind === 213 /* CallExpression */) { + if (decorator.expression.kind === 215 /* CallExpression */) { const identifier = decorator.expression.expression; const args = decorator.expression.arguments; if (identifier.kind === 79 /* Identifier */ && (extendDecorator == null ? void 0 : extendDecorator.includes(identifier.escapedText.toString())) && args.length) { @@ -41187,7 +41341,7 @@ function getEtsStylesDecoratorComponentNames(decorators, compilerOptions) { const stylesComponents = []; const stylesDecorator = (_c = (_b = (_a2 = compilerOptions.ets) == null ? void 0 : _a2.styles) == null ? void 0 : _b.decorator) != null ? _c : "Styles"; decorators == null ? void 0 : decorators.forEach((decorator) => { - if (decorator.kind === 169 /* Decorator */ && decorator.expression.kind === 79 /* Identifier */) { + if (decorator.kind === 170 /* Decorator */ && decorator.expression.kind === 79 /* Identifier */) { const identifier = decorator.expression; if (identifier.kind === 79 /* Identifier */ && identifier.escapedText === stylesDecorator) { stylesComponents.push(identifier.escapedText); @@ -41233,7 +41387,7 @@ function transformAnnotation(context) { } function visitAnnotationsDeclarations(node) { switch (node.kind) { - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return visitAnnotationDeclaration(node); default: return visitEachChild(node, visitAnnotationsDeclarations, context); @@ -41241,9 +41395,9 @@ function transformAnnotation(context) { } function visitAnnotations(node) { switch (node.kind) { - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return visitImportSpecifier(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return visitAnnotation(node); default: return visitEachChild(node, visitAnnotations, context); @@ -41283,14 +41437,14 @@ function transformAnnotation(context) { return factory.createIdentifier( annotationMagicNamePrefix + expr.escapedText ); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: const propAccessExpr = expr; return factory.updatePropertyAccessExpression( propAccessExpr, propAccessExpr.expression, addMagicPrefixToAnnotationNameIdentifier(propAccessExpr.name) ); - case 213 /* CallExpression */: + case 215 /* CallExpression */: const callExpr = expr; return factory.updateCallExpression( callExpr, @@ -41371,16 +41525,16 @@ function transformTypeExportImportAndConstEnumInTypeScript(context) { } function visitImportExportAndConstEnumMember(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return visitImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return visitExportDeclaration(node); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return visitConstEnum(node); - case 308 /* EnumMember */: + case 311 /* EnumMember */: return visitEnumMember(node); default: return visitEachChild(node, visitImportExportAndConstEnumMember, context); @@ -41426,7 +41580,7 @@ function transformTypeExportImportAndConstEnumInTypeScript(context) { return name || namedBindings ? factory.updateImportClause(node, false, name, namedBindings) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 277 /* NamespaceImport */) { + if (node.kind === 280 /* NamespaceImport */) { if (resolver.isReferencedAliasDeclaration(node)) { return node; } @@ -42012,23 +42166,23 @@ function getModuleInstanceStateCached(node, visited = new Map2()) { } function getModuleInstanceStateWorker(node, visited) { switch (node.kind) { - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return 0 /* NonInstantiated */; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: if (isEnumConst(node)) { return 2 /* ConstEnumOnly */; } break; - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: if (!hasSyntacticModifier(node, 1 /* Export */)) { return 0 /* NonInstantiated */; } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: const exportDeclaration = node; - if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 282 /* NamedExports */) { + if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 285 /* NamedExports */) { let state = 0 /* NonInstantiated */; for (const specifier of exportDeclaration.exportClause.elements) { const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); @@ -42042,7 +42196,7 @@ function getModuleInstanceStateWorker(node, visited) { return state; } break; - case 271 /* ModuleBlock */: { + case 274 /* ModuleBlock */: { let state = 0 /* NonInstantiated */; forEachChild(node, (n) => { const childState = getModuleInstanceStateCached(n, visited); @@ -42061,7 +42215,7 @@ function getModuleInstanceStateWorker(node, visited) { }); return state; } - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return getModuleInstanceState(node, visited); case 79 /* Identifier */: if (node.isInJSDocNamespace) { @@ -42221,7 +42375,7 @@ function createBinder() { } } function getDeclarationName(node) { - if (node.kind === 280 /* ExportAssignment */) { + if (node.kind === 283 /* ExportAssignment */) { return node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; } const name = getNameOfDeclaration(node); @@ -42230,7 +42384,7 @@ function createBinder() { const moduleName = getTextOfIdentifierOrLiteral(name); return isGlobalScopeAugmentation(node) ? "__global" : `"${moduleName}"`; } - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -42252,30 +42406,30 @@ function createBinder() { return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0; } switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: return "__constructor" /* Constructor */; - case 184 /* FunctionType */: - case 179 /* CallSignature */: - case 332 /* JSDocSignature */: + case 186 /* FunctionType */: + case 181 /* CallSignature */: + case 335 /* JSDocSignature */: return "__call" /* Call */; - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 187 /* ConstructorType */: + case 182 /* ConstructSignature */: return "__new" /* New */; - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return "__index" /* Index */; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return "__export" /* ExportStar */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return "export=" /* ExportEquals */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) === 2 /* ModuleExports */) { return "export=" /* ExportEquals */; } Debug.fail("Unknown binary declaration kind"); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: return isJSDocConstructSignature(node) ? "__new" /* New */ : "__call" /* Call */; - case 168 /* Parameter */: - Debug.assert(node.parent.kind === 326 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); + case 169 /* Parameter */: + Debug.assert(node.parent.kind === 329 /* 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; @@ -42322,7 +42476,7 @@ function createBinder() { messageNeedsName = false; multipleDefaultExports = true; } else { - if (symbol.declarations && symbol.declarations.length && (node.kind === 280 /* ExportAssignment */ && !node.isExportEquals)) { + if (symbol.declarations && symbol.declarations.length && (node.kind === 283 /* ExportAssignment */ && !node.isExportEquals)) { message = Diagnostics.A_module_cannot_have_multiple_default_exports; messageNeedsName = false; multipleDefaultExports = true; @@ -42361,7 +42515,7 @@ function createBinder() { function declareModuleMember(node, symbolFlags, symbolExcludes) { const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { - if (node.kind === 284 /* ExportSpecifier */ || node.kind === 274 /* ImportEqualsDeclaration */ && hasExportModifier) { + if (node.kind === 287 /* ExportSpecifier */ || node.kind === 277 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { return declareSymbol(container.locals, void 0, node, symbolFlags, symbolExcludes); @@ -42405,7 +42559,7 @@ function createBinder() { const saveThisParentContainer = thisParentContainer; const savedBlockScopeContainer = blockScopeContainer; if (containerFlags & 1 /* IsContainer */) { - if (node.kind !== 219 /* ArrowFunction */) { + if (node.kind !== 221 /* ArrowFunction */) { thisParentContainer = container; } container = blockScopeContainer = node; @@ -42425,14 +42579,14 @@ function createBinder() { const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 177 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { currentFlow.node = node; } } - currentReturnTarget = isImmediatelyInvoked || node.kind === 176 /* Constructor */ || isInJSFile(node) && (node.kind === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */) ? createBranchLabel() : void 0; + currentReturnTarget = isImmediatelyInvoked || node.kind === 178 /* Constructor */ || isInJSFile(node) && (node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */) ? createBranchLabel() : void 0; currentExceptionTarget = void 0; currentBreakTarget = void 0; currentContinueTarget = void 0; @@ -42446,14 +42600,14 @@ function createBinder() { node.flags |= 512 /* HasExplicitReturn */; node.endFlowNode = currentFlow; } - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { node.flags |= emitFlags; node.endFlowNode = currentFlow; } if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); currentFlow = finishFlowLabel(currentReturnTarget); - if (node.kind === 176 /* Constructor */ || node.kind === 175 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { + if (node.kind === 178 /* Constructor */ || node.kind === 177 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */)) { node.returnFlowNode = currentFlow; } } @@ -42478,8 +42632,8 @@ function createBinder() { blockScopeContainer = savedBlockScopeContainer; } function bindEachFunctionsFirst(nodes) { - bindEach(nodes, (n) => n.kind === 263 /* FunctionDeclaration */ ? bind(n) : void 0); - bindEach(nodes, (n) => n.kind !== 263 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind === 265 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind !== 265 /* FunctionDeclaration */ ? bind(n) : void 0); } function bindEach(nodes, bindFunction = bind) { if (nodes === void 0) { @@ -42499,59 +42653,59 @@ function createBinder() { inAssignmentPattern = saveInAssignmentPattern; return; } - if (node.kind >= 244 /* FirstStatement */ && node.kind <= 260 /* LastStatement */ && !options.allowUnreachableCode) { + if (node.kind >= 246 /* FirstStatement */ && node.kind <= 262 /* LastStatement */ && !options.allowUnreachableCode) { node.flowNode = currentFlow; } switch (node.kind) { - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: bindWhileStatement(node); break; - case 247 /* DoStatement */: + case 249 /* DoStatement */: bindDoStatement(node); break; - case 249 /* ForStatement */: + case 251 /* ForStatement */: bindForStatement(node); break; - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 246 /* IfStatement */: + case 248 /* IfStatement */: bindIfStatement(node); break; - case 254 /* ReturnStatement */: - case 258 /* ThrowStatement */: + case 256 /* ReturnStatement */: + case 260 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 259 /* TryStatement */: + case 261 /* TryStatement */: bindTryStatement(node); break; - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: bindSwitchStatement(node); break; - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: bindCaseBlock(node); break; - case 298 /* CaseClause */: + case 301 /* CaseClause */: bindCaseClause(node); break; - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: bindExpressionStatement(node); break; - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: bindLabeledStatement(node); break; - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: bindPrefixUnaryExpressionFlow(node); break; - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: bindPostfixUnaryExpressionFlow(node); break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isDestructuringAssignment(node)) { inAssignmentPattern = saveInAssignmentPattern; bindDestructuringAssignmentFlow(node); @@ -42559,49 +42713,49 @@ function createBinder() { } bindBinaryExpressionFlow(node); break; - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: bindDeleteExpressionFlow(node); break; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: bindConditionalExpressionFlow(node); break; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: bindVariableDeclarationFlow(node); break; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: bindAccessExpressionFlow(node); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: bindCallExpressionFlow(node); break; - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: bindNonNullExpressionFlow(node); break; - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 314 /* SourceFile */: { + case 317 /* SourceFile */: { bindEachFunctionsFirst(node.statements); bind(node.endOfFileToken); break; } - case 242 /* Block */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 274 /* ModuleBlock */: bindEachFunctionsFirst(node.statements); break; - case 208 /* BindingElement */: + case 210 /* BindingElement */: bindBindingElementFlow(node); break; - case 168 /* Parameter */: + case 169 /* Parameter */: bindParameterFlow(node); break; - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: - case 305 /* PropertyAssignment */: - case 231 /* SpreadElement */: + case 212 /* ObjectLiteralExpression */: + case 211 /* ArrayLiteralExpression */: + case 308 /* PropertyAssignment */: + case 233 /* SpreadElement */: inAssignmentPattern = saveInAssignmentPattern; default: bindEachChild(node); @@ -42615,19 +42769,19 @@ function createBinder() { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: case 109 /* ThisKeyword */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return containsNarrowableReference(expr); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return hasNarrowableArgument(expr); - case 217 /* ParenthesizedExpression */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: return isNarrowingExpression(expr.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isNarrowingBinaryExpression(expr); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return expr.operator === 53 /* ExclamationToken */ && isNarrowingExpression(expr.operand); - case 222 /* TypeOfExpression */: + case 224 /* TypeOfExpression */: return isNarrowingExpression(expr.expression); } return false; @@ -42646,7 +42800,7 @@ function createBinder() { } } } - if (expr.expression.kind === 211 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { + if (expr.expression.kind === 213 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { return true; } return false; @@ -42677,9 +42831,9 @@ function createBinder() { } function isNarrowableOperand(expr) { switch (expr.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return isNarrowableOperand(expr.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (expr.operatorToken.kind) { case 63 /* EqualsToken */: return isNarrowableOperand(expr.left); @@ -42752,24 +42906,24 @@ function createBinder() { function isStatementCondition(node) { const parent3 = node.parent; switch (parent3.kind) { - case 246 /* IfStatement */: - case 248 /* WhileStatement */: - case 247 /* DoStatement */: + case 248 /* IfStatement */: + case 250 /* WhileStatement */: + case 249 /* DoStatement */: return parent3.expression === node; - case 249 /* ForStatement */: - case 228 /* ConditionalExpression */: + case 251 /* ForStatement */: + case 230 /* ConditionalExpression */: return parent3.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 217 /* ParenthesizedExpression */) { + if (node.kind === 219 /* ParenthesizedExpression */) { node = node.expression; - } else if (node.kind === 225 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { + } else if (node.kind === 227 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { node = node.operand; } else { - return node.kind === 227 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */); + return node.kind === 229 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */); } } } @@ -42810,7 +42964,7 @@ function createBinder() { } function setContinueTarget(node, target) { let label = activeLabelList; - while (label && node.parent.kind === 257 /* LabeledStatement */) { + while (label && node.parent.kind === 259 /* LabeledStatement */) { label.continueTarget = target; label = label.next; node = node.parent; @@ -42861,12 +43015,12 @@ function createBinder() { bind(node.expression); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 251 /* ForOfStatement */) { + if (node.kind === 253 /* ForOfStatement */) { bind(node.awaitModifier); } addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 262 /* VariableDeclarationList */) { + if (node.initializer.kind !== 264 /* VariableDeclarationList */) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -42888,7 +43042,7 @@ function createBinder() { } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 254 /* ReturnStatement */) { + if (node.kind === 256 /* ReturnStatement */) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -42905,7 +43059,7 @@ function createBinder() { return void 0; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - const flowLabel = node.kind === 253 /* BreakStatement */ ? breakTarget : continueTarget; + const flowLabel = node.kind === 255 /* BreakStatement */ ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -42975,7 +43129,7 @@ function createBinder() { preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 299 /* DefaultClause */); + const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 302 /* DefaultClause */); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -43018,7 +43172,7 @@ function createBinder() { maybeBindExpressionFlowIfCall(node.expression); } function maybeBindExpressionFlowIfCall(node) { - if (node.kind === 213 /* CallExpression */) { + if (node.kind === 215 /* CallExpression */) { const call = node; if (call.expression.kind !== 107 /* SuperKeyword */ && isDottedName(call.expression)) { currentFlow = createFlowCall(currentFlow, call); @@ -43044,7 +43198,7 @@ function createBinder() { currentFlow = finishFlowLabel(postStatementLabel); } function bindDestructuringTargetFlow(node) { - if (node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { + if (node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { bindAssignmentTargetFlow(node.left); } else { bindAssignmentTargetFlow(node); @@ -43053,21 +43207,21 @@ function createBinder() { function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); - } else if (node.kind === 209 /* ArrayLiteralExpression */) { + } else if (node.kind === 211 /* ArrayLiteralExpression */) { for (const e of node.elements) { - if (e.kind === 231 /* SpreadElement */) { + if (e.kind === 233 /* SpreadElement */) { bindAssignmentTargetFlow(e.expression); } else { bindDestructuringTargetFlow(e); } } - } else if (node.kind === 210 /* ObjectLiteralExpression */) { + } else if (node.kind === 212 /* ObjectLiteralExpression */) { for (const p of node.properties) { - if (p.kind === 305 /* PropertyAssignment */) { + if (p.kind === 308 /* PropertyAssignment */) { bindDestructuringTargetFlow(p.initializer); - } else if (p.kind === 306 /* ShorthandPropertyAssignment */) { + } else if (p.kind === 309 /* ShorthandPropertyAssignment */) { bindAssignmentTargetFlow(p.name); - } else if (p.kind === 307 /* SpreadAssignment */) { + } else if (p.kind === 310 /* SpreadAssignment */) { bindAssignmentTargetFlow(p.expression); } } @@ -43190,7 +43344,7 @@ function createBinder() { const operator = node.operatorToken.kind; if (isAssignmentOperator(operator) && !isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 63 /* EqualsToken */ && node.left.kind === 212 /* ElementAccessExpression */) { + if (operator === 63 /* EqualsToken */ && node.left.kind === 214 /* ElementAccessExpression */) { const elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -43218,7 +43372,7 @@ function createBinder() { } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 211 /* PropertyAccessExpression */) { + if (node.expression.kind === 213 /* PropertyAccessExpression */) { bindAssignmentTargetFlow(node.expression); } } @@ -43283,7 +43437,7 @@ function createBinder() { } function bindJSDocTypeAlias(node) { bind(node.tagName); - if (node.kind !== 348 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 351 /* JSDocEnumTag */ && node.fullName) { setParent(node.fullName, node); setParentRecursive(node.fullName, false); } @@ -43294,7 +43448,7 @@ function createBinder() { function bindJSDocClassTag(node) { bindEachChild(node); const host = getHostSignatureFromJSDoc(node); - if (host && host.kind !== 174 /* MethodDeclaration */) { + if (host && host.kind !== 176 /* MethodDeclaration */) { addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } @@ -43307,15 +43461,15 @@ function createBinder() { } function bindOptionalChainRest(node) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: bind(node.questionDotToken); bind(node.name); break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: bind(node.questionDotToken); bind(node.argumentExpression); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: bind(node.questionDotToken); bindEach(node.typeArguments); bindEach(node.arguments); @@ -43362,7 +43516,7 @@ function createBinder() { bindOptionalChainFlow(node); } else { const expr = skipParentheses(node.expression); - if (expr.kind === 218 /* FunctionExpression */ || expr.kind === 219 /* ArrowFunction */) { + if (expr.kind === 220 /* FunctionExpression */ || expr.kind === 221 /* ArrowFunction */) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); @@ -43373,7 +43527,7 @@ function createBinder() { } } } - if (node.expression.kind === 211 /* PropertyAccessExpression */) { + if (node.expression.kind === 213 /* PropertyAccessExpression */) { const propertyAccess = node.expression; if (isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -43382,58 +43536,60 @@ function createBinder() { } function getContainerFlags(node) { switch (node.kind) { - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 269 /* EnumDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 295 /* JsxAttributes */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 272 /* EnumDeclaration */: + case 212 /* ObjectLiteralExpression */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 298 /* JsxAttributes */: return 1 /* IsContainer */; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return 1 /* IsContainer */ | 64 /* IsInterface */; - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 200 /* MappedType */: - case 181 /* IndexSignature */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 202 /* MappedType */: + case 183 /* IndexSignature */: return 1 /* IsContainer */ | 32 /* HasLocals */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */; } - case 176 /* Constructor */: - case 263 /* FunctionDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 332 /* JSDocSignature */: - case 326 /* JSDocFunctionType */: - case 184 /* FunctionType */: - case 180 /* ConstructSignature */: - case 185 /* ConstructorType */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 265 /* FunctionDeclaration */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 335 /* JSDocSignature */: + case 329 /* JSDocFunctionType */: + case 186 /* FunctionType */: + case 182 /* ConstructSignature */: + case 187 /* ConstructorType */: + case 177 /* ClassStaticBlockDeclaration */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return 4 /* IsControlFlowContainer */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 301 /* CatchClause */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 272 /* CaseBlock */: + case 304 /* CatchClause */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 275 /* CaseBlock */: return 2 /* IsBlockScopedContainer */; - case 242 /* Block */: + case 244 /* Block */: return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */; } return 0 /* None */; @@ -43446,43 +43602,44 @@ function createBinder() { } function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 314 /* SourceFile */: + case 317 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 210 /* ObjectLiteralExpression */: - case 267 /* InterfaceDeclaration */: - case 295 /* JsxAttributes */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 212 /* ObjectLiteralExpression */: + case 270 /* InterfaceDeclaration */: + case 298 /* JsxAttributes */: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 332 /* JSDocSignature */: - case 181 /* IndexSignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 326 /* JSDocFunctionType */: - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 175 /* ClassStaticBlockDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 200 /* MappedType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 335 /* JSDocSignature */: + case 183 /* IndexSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 329 /* JSDocFunctionType */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 177 /* ClassStaticBlockDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 202 /* MappedType */: return declareSymbol(container.locals, void 0, node, symbolFlags, symbolExcludes); } } @@ -43568,10 +43725,10 @@ function createBinder() { } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (isExternalOrCommonJsModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -43761,7 +43918,7 @@ function createBinder() { } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2 /* ES2015 */) { - if (blockScopeContainer.kind !== 314 /* SourceFile */ && blockScopeContainer.kind !== 270 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { + if (blockScopeContainer.kind !== 317 /* SourceFile */ && blockScopeContainer.kind !== 273 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); file.bindDiagnostics.push(createFileDiagnostic( file, @@ -43828,7 +43985,7 @@ function createBinder() { node.tracingPath = file.path; const saveInStrictMode = inStrictMode; bindWorker(node); - if (node.kind > 164 /* LastToken */) { + if (node.kind > 165 /* LastToken */) { const saveParent = parent2; parent2 = node; const containerFlags = getContainerFlags(node); @@ -43890,23 +44047,23 @@ function createBinder() { break; } case 109 /* ThisKeyword */: - if (currentFlow && (isExpression(node) || parent2.kind === 306 /* ShorthandPropertyAssignment */)) { + if (currentFlow && (isExpression(node) || parent2.kind === 309 /* ShorthandPropertyAssignment */)) { node.flowNode = currentFlow; } return checkContextualIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: if (currentFlow && isPartOfTypeQuery(node)) { node.flowNode = currentFlow; } break; - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: case 107 /* SuperKeyword */: node.flowNode = currentFlow; break; case 80 /* PrivateIdentifier */: return checkPrivateIdentifier(node); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: const expr = node; if (currentFlow && isNarrowableReference(expr)) { expr.flowNode = currentFlow; @@ -43924,7 +44081,7 @@ function createBinder() { ); } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const specialKind = getAssignmentDeclarationKind(node); switch (specialKind) { case 1 /* ExportsProperty */: @@ -43959,79 +44116,80 @@ function createBinder() { Debug.fail("Unknown binary expression special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return checkStrictModeCatchClause(node); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); case 8 /* NumericLiteral */: return checkStrictModeNumericLiteral(node); - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return checkStrictModeWithStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return checkStrictModeLabeledStatement(node); - case 197 /* ThisType */: + case 199 /* ThisType */: seenThisKeyword = true; return; - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return bindTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return bindParameter(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return bindVariableDeclarationOrBindingElement(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: node.flowNode = currentFlow; return bindVariableDeclarationOrBindingElement(node); - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* OverloadPropertyDeclaration */: return bindPropertyWorker(node); - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 308 /* EnumMember */: + case 311 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return bindPropertyOrMethodOrAccessor( node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ ); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, 0 /* None */); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */); - case 184 /* FunctionType */: - case 326 /* JSDocFunctionType */: - case 332 /* JSDocSignature */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 329 /* JSDocFunctionType */: + case 335 /* JSDocSignature */: + case 187 /* ConstructorType */: return bindFunctionOrConstructorType(node); - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 200 /* MappedType */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 202 /* MappedType */: return bindAnonymousTypeWorker(node); - case 341 /* JSDocClassTag */: + case 344 /* JSDocClassTag */: return bindJSDocClassTag(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return bindFunctionExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: const assignmentKind = getAssignmentDeclarationKind(node); switch (assignmentKind) { case 7 /* ObjectDefinePropertyValue */: @@ -44049,61 +44207,63 @@ function createBinder() { bindCallExpression(node); } break; - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: inStrictMode = true; return bindClassLikeDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return bindAnnotationDeclaration(node); - case 267 /* InterfaceDeclaration */: + case 269 /* OverloadDeclaration */: + return bindOverloadDeclaration(node); + case 270 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return bindModuleDeclaration(node); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return bindJsxAttributes(node); - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 274 /* ImportEqualsDeclaration */: - case 277 /* NamespaceImport */: - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 277 /* ImportEqualsDeclaration */: + case 280 /* NamespaceImport */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return bindNamespaceExportDeclaration(node); - case 276 /* ImportClause */: + case 279 /* ImportClause */: return bindImportClause(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return bindExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return bindExportAssignment(node); - case 314 /* SourceFile */: + case 317 /* SourceFile */: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 242 /* Block */: + case 244 /* Block */: if (!isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) { return; } - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 349 /* JSDocParameterTag */: - if (node.parent.kind === 332 /* JSDocSignature */) { + case 352 /* JSDocParameterTag */: + if (node.parent.kind === 335 /* JSDocSignature */) { return bindParameter(node); } - if (node.parent.kind !== 331 /* JSDocTypeLiteral */) { + if (node.parent.kind !== 334 /* JSDocTypeLiteral */) { break; } - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: const propTag = node; - const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 325 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; + const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 328 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); } } @@ -44241,8 +44401,8 @@ function createBinder() { } const thisContainer = getThisContainer(node, false); switch (thisContainer.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: let constructorSymbol = thisContainer.symbol; if (isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 63 /* EqualsToken */) { const l = thisContainer.parent.left; @@ -44260,13 +44420,14 @@ function createBinder() { addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32 /* Class */); } break; - case 176 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 177 /* ClassStaticBlockDeclaration */: const containingClass = thisContainer.parent; const symbolTable = isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members; if (hasDynamicName(node)) { @@ -44275,7 +44436,7 @@ function createBinder() { declareSymbol(symbolTable, containingClass.symbol, node, 4 /* Property */ | 67108864 /* Assignment */, 0 /* None */, true); } break; - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (hasDynamicName(node)) { break; } else if (thisContainer.commonJsModuleIndicator) { @@ -44300,7 +44461,7 @@ function createBinder() { function bindSpecialPropertyDeclaration(node) { if (node.expression.kind === 109 /* ThisKeyword */) { bindThisPropertyAssignment(node); - } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 314 /* SourceFile */) { + } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 317 /* SourceFile */) { if (isPrototypeAccess(node.expression)) { bindPrototypePropertyAssignment(node, node.parent); } else { @@ -44330,7 +44491,7 @@ function createBinder() { } function bindObjectDefinePropertyAssignment(node) { let namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]); - const isToplevel = node.parent.parent.kind === 314 /* SourceFile */; + const isToplevel = node.parent.parent.kind === 317 /* SourceFile */; namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, node.arguments[0], isToplevel, false, false); bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, false); } @@ -44416,7 +44577,7 @@ function createBinder() { declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */); } function isTopLevelNamespaceAssignment(propertyAccess) { - return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 314 /* SourceFile */ : propertyAccess.parent.parent.kind === 314 /* SourceFile */; + return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 317 /* SourceFile */ : propertyAccess.parent.parent.kind === 317 /* SourceFile */; } function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) { let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer); @@ -44474,7 +44635,7 @@ function createBinder() { } } function bindClassLikeDeclaration(node) { - if (node.kind === 264 /* ClassDeclaration */ || node.kind === 265 /* StructDeclaration */) { + if (node.kind === 266 /* ClassDeclaration */ || node.kind === 267 /* StructDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); } else { const bindingName = node.name ? node.name.escapedText : "__class" /* Class */; @@ -44496,7 +44657,7 @@ function createBinder() { prototypeSymbol.parent = symbol; } function bindAnnotationDeclaration(node) { - Debug.assert(node.kind === 266 /* AnnotationDeclaration */); + Debug.assert(node.kind === 268 /* AnnotationDeclaration */); bindBlockScopedDeclaration(node, 32 /* Class */ | 268435456 /* Annotation */, 899503 /* ClassExcludes */); const { symbol } = node; const prototypeSymbol = createSymbol(4 /* Property */ | 4194304 /* Prototype */, "prototype"); @@ -44510,6 +44671,21 @@ function createBinder() { symbol.exports.set(prototypeSymbol.escapedName, prototypeSymbol); prototypeSymbol.parent = symbol; } + function bindOverloadDeclaration(node) { + Debug.assert(node.kind === 269 /* OverloadDeclaration */); + bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); + const { symbol } = node; + const prototypeSymbol = createSymbol(4 /* Property */ | 4194304 /* Prototype */, "prototype"); + const symbolExport = symbol.exports.get(prototypeSymbol.escapedName); + if (symbolExport) { + if (node.name) { + setParent(node.name, node); + } + file.bindDiagnostics.push(createDiagnosticForNode2(symbolExport.declarations[0], Diagnostics.Duplicate_identifier_0, symbolName(prototypeSymbol))); + } + symbol.exports.set(prototypeSymbol.escapedName, prototypeSymbol); + prototypeSymbol.parent = symbol; + } function bindEnumDeclaration(node) { return isEnumConst(node) ? bindBlockScopedDeclaration(node, 128 /* ConstEnum */, 899967 /* ConstEnumExcludes */) : bindBlockScopedDeclaration(node, 256 /* RegularEnum */, 899327 /* RegularEnumExcludes */); } @@ -44518,7 +44694,7 @@ function createBinder() { checkStrictModeEvalOrArguments(node, node.name); } if (!isBindingPattern(node.name)) { - const possibleVariableDecl = node.kind === 261 /* VariableDeclaration */ ? node : node.parent.parent; + const possibleVariableDecl = node.kind === 263 /* VariableDeclaration */ ? node : node.parent.parent; if (isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { @@ -44531,7 +44707,7 @@ function createBinder() { } } function bindParameter(node) { - if (node.kind === 349 /* JSDocParameterTag */ && container.kind !== 332 /* JSDocSignature */) { + if (node.kind === 352 /* JSDocParameterTag */ && container.kind !== 335 /* JSDocSignature */) { return; } if (inStrictMode && !(node.flags & 16777216 /* Ambient */)) { @@ -44598,7 +44774,7 @@ function createBinder() { } else { declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } - } else if (node.parent.kind === 195 /* InferType */) { + } else if (node.parent.kind === 197 /* InferType */) { const container2 = getInferTypeContainer(node.parent); if (container2) { if (!container2.locals) { @@ -44621,7 +44797,7 @@ function createBinder() { return false; } if (currentFlow === unreachableFlow) { - const reportError = isStatementButNotDeclaration(node) && node.kind !== 243 /* EmptyStatement */ || node.kind === 264 /* ClassDeclaration */ || node.kind === 270 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node); + const reportError = isStatementButNotDeclaration(node) && node.kind !== 245 /* EmptyStatement */ || node.kind === 266 /* ClassDeclaration */ || node.kind === 273 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node); if (reportError) { currentFlow = reportedUnreachableFlow; if (!options.allowUnreachableCode) { @@ -44647,12 +44823,12 @@ function isExecutableStatement(s) { } function isPurelyTypeDeclaration(s) { switch (s.kind) { - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return true; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return getModuleInstanceState(s) !== 1 /* Instantiated */; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return hasSyntacticModifier(s, 2048 /* Const */); default: return false; @@ -44834,7 +45010,7 @@ function createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignatu symbol.exports.forEach(visitSymbol); } forEach(symbol.declarations, (d) => { - if (d.type && d.type.kind === 186 /* TypeQuery */) { + if (d.type && d.type.kind === 188 /* TypeQuery */) { const query = d.type; const entity = getResolvedSymbol(getFirstIdentifier2(query.exprName)); visitSymbol(entity); @@ -46767,7 +46943,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks()); } function isGlobalSourceFile(node) { - return node.kind === 314 /* SourceFile */ && !isExternalOrCommonJsModule(node); + return node.kind === 317 /* SourceFile */ && !isExternalOrCommonJsModule(node); } function isValidFromLibs(symbol, node) { var _a2; @@ -46844,13 +47020,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile); } if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { - if (declaration.kind === 208 /* BindingElement */) { - const errorBindingElement = getAncestor(usage, 208 /* BindingElement */); + if (declaration.kind === 210 /* BindingElement */) { + const errorBindingElement = getAncestor(usage, 210 /* BindingElement */); if (errorBindingElement) { return findAncestor(errorBindingElement, isBindingElement) !== findAncestor(declaration, isBindingElement) || declaration.pos < errorBindingElement.pos; } - return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 261 /* VariableDeclaration */), usage); - } else if (declaration.kind === 261 /* VariableDeclaration */) { + return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 263 /* VariableDeclaration */), usage); + } else if (declaration.kind === 263 /* VariableDeclaration */) { return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } else if (isClassDeclaration(declaration)) { return !findAncestor(usage, (n) => isComputedPropertyName(n) && n.parent.parent === declaration); @@ -46861,10 +47037,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } return true; } - if (usage.parent.kind === 284 /* ExportSpecifier */ || usage.parent.kind === 280 /* ExportAssignment */ && usage.parent.isExportEquals) { + if (usage.parent.kind === 287 /* ExportSpecifier */ || usage.parent.kind === 283 /* ExportAssignment */ && usage.parent.isExportEquals) { return true; } - if (usage.kind === 280 /* ExportAssignment */ && usage.isExportEquals) { + if (usage.kind === 283 /* ExportAssignment */ && usage.isExportEquals) { return true; } if (!!(usage.flags & 8388608 /* JSDoc */) || isInTypeQuery(usage) || usageInTypeDeclaration()) { @@ -46883,9 +47059,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration2, usage2) { switch (declaration2.parent.parent.kind) { - case 244 /* VariableStatement */: - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: + case 246 /* VariableStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) { return true; } @@ -46910,7 +47086,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const initializerOfProperty = propertyDeclaration.initializer === current; if (initializerOfProperty) { if (isStatic(current.parent)) { - if (declaration2.kind === 174 /* MethodDeclaration */) { + if (declaration2.kind === 176 /* MethodDeclaration */) { return true; } if (isPropertyDeclaration(declaration2) && getContainingClass(usage2) === getContainingClass(declaration2)) { @@ -46924,7 +47100,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } else { - const isDeclarationInstanceProperty = declaration2.kind === 171 /* PropertyDeclaration */ && !isStatic(declaration2); + const isDeclarationInstanceProperty = declaration2.kind === 172 /* PropertyDeclaration */ && !isStatic(declaration2); if (!isDeclarationInstanceProperty || getContainingClass(usage2) !== getContainingClass(declaration2)) { return true; } @@ -46943,15 +47119,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return "quit"; } switch (node.kind) { - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return true; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return stopAtAnyPropertyDeclaration && (isPropertyDeclaration(declaration2) && node.parent === declaration2.parent || isParameterPropertyDeclaration(declaration2, declaration2.parent) && node.parent === declaration2.parent.parent) ? "quit" : true; - case 242 /* Block */: + case 244 /* Block */: switch (node.parent.kind) { - case 177 /* GetAccessor */: - case 174 /* MethodDeclaration */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 176 /* MethodDeclaration */: + case 180 /* SetAccessor */: return true; default: return false; @@ -46981,22 +47157,22 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function requiresScopeChangeWorker(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 176 /* Constructor */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 178 /* Constructor */: return false; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 305 /* PropertyAssignment */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 308 /* PropertyAssignment */: return requiresScopeChangeWorker(node.name); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (hasStaticModifier(node)) { return target < 99 /* ESNext */ || !useDefineForClassFields; } return requiresScopeChangeWorker(node.name); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return requiresScopeChangeWorker(node.name); default: if (isNullishCoalesce(node) || isOptionalChain(node)) { @@ -47038,17 +47214,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (result = lookup(location2.locals, name, meaning)) { let useResult = true; if (isFunctionLike(location2) && lastLocation && lastLocation !== location2.body) { - if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 329 /* JSDoc */) { - useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location2.type || lastLocation.kind === 168 /* Parameter */ || lastLocation.kind === 349 /* JSDocParameterTag */ || lastLocation.kind === 350 /* JSDocReturnTag */ || lastLocation.kind === 167 /* TypeParameter */ : false; + if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 332 /* JSDoc */) { + useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location2.type || lastLocation.kind === 169 /* Parameter */ || lastLocation.kind === 352 /* JSDocParameterTag */ || lastLocation.kind === 353 /* JSDocReturnTag */ || lastLocation.kind === 168 /* TypeParameter */ : false; } if (meaning & result.flags & 3 /* Variable */) { if (useOuterVariableScopeInParameter(result, location2, lastLocation)) { useResult = false; } else if (result.flags & 1 /* FunctionScopedVariable */) { - useResult = lastLocation.kind === 168 /* Parameter */ || lastLocation === location2.type && !!findAncestor(result.valueDeclaration, isParameter); + useResult = lastLocation.kind === 169 /* Parameter */ || lastLocation === location2.type && !!findAncestor(result.valueDeclaration, isParameter); } } - } else if (location2.kind === 194 /* ConditionalType */) { + } else if (location2.kind === 196 /* ConditionalType */) { useResult = lastLocation === location2.trueType; } if (useResult) { @@ -47060,13 +47236,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } withinDeferredContext = withinDeferredContext || getIsDeferredContext(location2, lastLocation); switch (location2.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (!isExternalOrCommonJsModule(location2)) break; isInExternalModule = true; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: const moduleExports = getSymbolOfNode(location2) ? ((_a2 = getSymbolOfNode(location2)) == null ? void 0 : _a2.exports) || emptySymbols : emptySymbols; - if (location2.kind === 314 /* SourceFile */ || isModuleDeclaration(location2) && location2.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location2)) { + if (location2.kind === 317 /* SourceFile */ || isModuleDeclaration(location2) && location2.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location2)) { if (result = moduleExports.get("default" /* Default */)) { const localSymbol = getLocalSymbolForExportDefault(result); if (localSymbol && result.flags & meaning && localSymbol.escapedName === name) { @@ -47075,7 +47251,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { result = void 0; } const moduleExport = moduleExports.get(name); - if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 284 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 283 /* NamespaceExport */))) { + if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 287 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 286 /* NamespaceExport */))) { break; } } @@ -47087,12 +47263,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: if (result = lookup(((_c = getSymbolOfNode(location2)) == null ? void 0 : _c.exports) || emptySymbols, name, meaning & 8 /* EnumMember */)) { break loop; } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (!isStatic(location2)) { const ctor = findConstructorDeclaration(location2.parent); if (ctor && ctor.locals) { @@ -47103,9 +47279,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: if (result = lookup(getSymbolOfNode(location2).members || emptySymbols, name, meaning & 788968 /* Type */)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location2)) { result = void 0; @@ -47119,7 +47295,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } break loop; } - if (location2.kind === 232 /* ClassExpression */ && meaning & 32 /* Class */) { + if (location2.kind === 234 /* ClassExpression */ && meaning & 32 /* Class */) { const className = location2.name; if (className && name === className.escapedText) { result = location2.symbol; @@ -47127,7 +47303,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: if (lastLocation === location2.expression && location2.parent.token === 95 /* ExtendsKeyword */) { const container = location2.parent.parent; if (isClassLike(container) && (result = lookup(getSymbolOfNode(container).members, name, meaning & 788968 /* Type */))) { @@ -47138,9 +47314,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: grandparent = location2.parent.parent; - if (isClassLike(grandparent) || grandparent.kind === 267 /* InterfaceDeclaration */) { + if (isClassLike(grandparent) || grandparent.kind === 270 /* InterfaceDeclaration */) { if (result = lookup(getSymbolOfNode(grandparent).members, name, meaning & 788968 /* Type */)) { if (nameNotFoundMessage) { error(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); @@ -47149,21 +47325,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: if (getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */) { break; } - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -47176,37 +47352,37 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 169 /* Decorator */: - if (location2.parent && location2.parent.kind === 168 /* Parameter */) { + case 170 /* Decorator */: + if (location2.parent && location2.parent.kind === 169 /* Parameter */) { location2 = location2.parent; } - if (location2.parent && (isClassElement(location2.parent) || location2.parent.kind === 264 /* ClassDeclaration */)) { + if (location2.parent && (isClassElement(location2.parent) || location2.parent.kind === 266 /* ClassDeclaration */)) { location2 = location2.parent; } break; - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: const root = getJSDocRoot(location2); if (root) { location2 = root.parent; } break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (lastLocation && (lastLocation === location2.initializer || lastLocation === location2.name && isBindingPattern(lastLocation))) { if (!associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location2; } } break; - case 208 /* BindingElement */: + case 210 /* BindingElement */: if (lastLocation && (lastLocation === location2.initializer || lastLocation === location2.name && isBindingPattern(lastLocation))) { if (isParameterDeclaration(location2) && !associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location2; } } break; - case 195 /* InferType */: + case 197 /* InferType */: if (meaning & 262144 /* TypeParameter */) { const parameterName = location2.typeParameter.name; if (parameterName && name === parameterName.escapedText) { @@ -47227,7 +47403,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (!result) { if (lastLocation) { - Debug.assert(lastLocation.kind === 314 /* SourceFile */); + Debug.assert(lastLocation.kind === 317 /* SourceFile */); if (lastLocation.commonJsModuleIndicator && name === "exports" && meaning & lastLocation.symbol.flags) { return lastLocation.symbol; } @@ -47324,7 +47500,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 284 /* ExportSpecifier */ ? 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 === 287 /* ExportSpecifier */ ? 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), @@ -47344,14 +47520,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { diagnostic, createDiagnosticForNode( typeOnlyDeclaration, - typeOnlyDeclaration.kind === 284 /* ExportSpecifier */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, + typeOnlyDeclaration.kind === 287 /* ExportSpecifier */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, unescapedName ) ); } function getIsDeferredContext(location2, lastLocation) { - if (location2.kind !== 219 /* ArrowFunction */ && location2.kind !== 218 /* FunctionExpression */) { - return isTypeQueryNode(location2) || (isFunctionLikeDeclaration(location2) || location2.kind === 171 /* PropertyDeclaration */ && !isStatic(location2)) && (!lastLocation || lastLocation !== location2.name); + if (location2.kind !== 221 /* ArrowFunction */ && location2.kind !== 220 /* FunctionExpression */) { + return isTypeQueryNode(location2) || (isFunctionLikeDeclaration(location2) || location2.kind === 172 /* PropertyDeclaration */ && !isStatic(location2)) && (!lastLocation || lastLocation !== location2.name); } if (lastLocation && lastLocation === location2.name) { return false; @@ -47363,12 +47539,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isSelfReferenceLocation(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 270 /* ModuleDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 273 /* ModuleDeclaration */: return true; default: return false; @@ -47380,7 +47556,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isTypeParameterSymbolDeclaredInContainer(symbol, container) { if (symbol.declarations) { for (const decl of symbol.declarations) { - if (decl.kind === 167 /* TypeParameter */) { + if (decl.kind === 168 /* TypeParameter */) { const parent2 = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent; if (parent2 === container) { return !(isJSDocTemplateTag(decl.parent) && find(decl.parent.parent.tags, isJSDocTypeAlias)); @@ -47430,9 +47606,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getEntityNameForExtendingInterface(node) { switch (node.kind) { case 79 /* Identifier */: - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : void 0; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: if (isEntityNameExpression(node.expression)) { return node.expression; } @@ -47480,7 +47656,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; } function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { - if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 284 /* ExportSpecifier */) { + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 287 /* ExportSpecifier */) { error(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); return true; } @@ -47569,7 +47745,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const declaration = (_a2 = result.declarations) == null ? void 0 : _a2.find( - (d) => isBlockOrCatchScoped(d) || isClassLike(d) || isAnnotationDeclaration(d) || d.kind === 269 /* EnumDeclaration */ + (d) => isBlockOrCatchScoped(d) || isClassLike(d) || isAnnotationDeclaration(d) || d.kind === 272 /* EnumDeclaration */ ); if (declaration === void 0) return Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration"); @@ -47603,13 +47779,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getAnyImportSyntax(node) { switch (node.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return node; - case 276 /* ImportClause */: + case 279 /* ImportClause */: return node.parent; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return node.parent.parent; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return node.parent.parent.parent; default: return void 0; @@ -47619,7 +47795,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration2); } function isAliasSymbolDeclaration2(node) { - return node.kind === 274 /* ImportEqualsDeclaration */ || node.kind === 273 /* NamespaceExportDeclaration */ || node.kind === 276 /* ImportClause */ && !!node.name || node.kind === 277 /* NamespaceImport */ || node.kind === 283 /* NamespaceExport */ || node.kind === 279 /* ImportSpecifier */ || node.kind === 284 /* ExportSpecifier */ || node.kind === 280 /* 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 === 306 /* ShorthandPropertyAssignment */ || node.kind === 305 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 261 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 208 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); + return node.kind === 277 /* ImportEqualsDeclaration */ || node.kind === 276 /* NamespaceExportDeclaration */ || node.kind === 279 /* ImportClause */ && !!node.name || node.kind === 280 /* NamespaceImport */ || node.kind === 286 /* NamespaceExport */ || node.kind === 282 /* ImportSpecifier */ || node.kind === 287 /* ExportSpecifier */ || node.kind === 283 /* 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 === 309 /* ShorthandPropertyAssignment */ || node.kind === 308 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 263 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 210 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); } function isAliasableOrJsExpression(e) { return isAliasableExpression(e) || isFunctionExpression(e) && isJSConstructor(e); @@ -47630,7 +47806,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 286 /* ExternalModuleReference */) { + if (isVariableDeclaration(node) || node.moduleReference.kind === 289 /* ExternalModuleReference */) { const immediate = resolveExternalModuleName( node, getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node) @@ -47646,7 +47822,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) { if (markSymbolOfAliasDeclarationIfTypeOnly(node, void 0, resolved, false) && !node.isTypeOnly) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node)); - const isExport = typeOnlyDeclaration.kind === 284 /* ExportSpecifier */; + const isExport = typeOnlyDeclaration.kind === 287 /* ExportSpecifier */; 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 = unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); @@ -47748,15 +47924,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getModuleSpecifierForImportOrExport(node) { switch (node.kind) { - case 276 /* ImportClause */: + case 279 /* ImportClause */: return node.parent.moduleSpecifier; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : void 0; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return node.parent.parent.moduleSpecifier; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return node.parent.parent.parent.moduleSpecifier; - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: return node.parent.parent.moduleSpecifier; default: return Debug.assertNever(node); @@ -48001,31 +48177,31 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve = false) { switch (node.kind) { - case 274 /* ImportEqualsDeclaration */: - case 261 /* VariableDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 263 /* VariableDeclaration */: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 276 /* ImportClause */: + case 279 /* ImportClause */: return getTargetOfImportClause(node, dontRecursivelyResolve); - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: return getTargetOfNamespaceExport(node, dontRecursivelyResolve); - case 279 /* ImportSpecifier */: - case 208 /* BindingElement */: + case 282 /* ImportSpecifier */: + case 210 /* BindingElement */: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: return getTargetOfExportSpecifier(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve); - case 280 /* ExportAssignment */: - case 227 /* BinaryExpression */: + case 283 /* ExportAssignment */: + case 229 /* BinaryExpression */: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return resolveEntityName(node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, true, dontRecursivelyResolve); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return getTargetOfAliasLikeExpression(node.initializer, dontRecursivelyResolve); - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: return getTargetOfAccessExpression(node, dontRecursivelyResolve); default: return Debug.fail(); @@ -48156,10 +48332,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (entityName.kind === 79 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 79 /* Identifier */ || entityName.parent.kind === 165 /* QualifiedName */) { + if (entityName.kind === 79 /* Identifier */ || entityName.parent.kind === 166 /* QualifiedName */) { return resolveEntityName(entityName, 1920 /* Namespace */, false, dontResolveAlias); } else { - Debug.assert(entityName.parent.kind === 274 /* ImportEqualsDeclaration */); + Debug.assert(entityName.parent.kind === 277 /* ImportEqualsDeclaration */); return resolveEntityName(entityName, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, false, dontResolveAlias); } } @@ -48219,9 +48395,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!symbol) { return getMergedSymbol(symbolFromJSPrototype); } - } else if (name.kind === 165 /* QualifiedName */ || name.kind === 211 /* PropertyAccessExpression */) { - const left = name.kind === 165 /* QualifiedName */ ? name.left : name.expression; - const right = name.kind === 165 /* QualifiedName */ ? name.right : name.name; + } else if (name.kind === 166 /* QualifiedName */ || name.kind === 213 /* PropertyAccessExpression */) { + const left = name.kind === 166 /* QualifiedName */ ? name.left : name.expression; + const right = name.kind === 166 /* QualifiedName */ ? name.right : name.name; let namespace = resolveEntityName(left, namespaceMeaning, ignoreErrors, false, location2); if (!namespace || nodeIsMissing(right)) { return void 0; @@ -48278,7 +48454,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 280 /* ExportAssignment */)) { + if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 283 /* ExportAssignment */)) { markSymbolOfAliasDeclarationIfTypeOnly(getAliasDeclarationFromName(name), symbol, void 0, true); } return symbol.flags & meaning || dontResolveAlias ? symbol : resolveAlias(symbol); @@ -48581,7 +48757,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { var _a2; const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias); if (!dontResolveAlias && symbol) { - if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 314 /* SourceFile */)) { + if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 317 /* 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; @@ -48899,7 +49075,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function findConstructorDeclaration(node) { const members = node.members; for (const member of members) { - if (member.kind === 176 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 178 /* Constructor */ && nodeIsPresent(member.body)) { return member; } } @@ -49009,19 +49185,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } switch (location2.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (!isExternalOrCommonJsModule(location2)) { break; } - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: const sym = getSymbolOfNode(location2); if (result = callback((sym == null ? void 0 : sym.exports) || emptySymbols, void 0, true, location2)) { return result; } break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: let table; (getSymbolOfNode(location2).members || emptySymbols).forEach((memberSymbol, key) => { if (memberSymbol.flags & (788968 /* Type */ & ~67108864 /* Assignment */)) { @@ -49077,7 +49253,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 284 /* 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, 287 /* ExportSpecifier */))) { const resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); const candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification); if (candidate) { @@ -49113,7 +49289,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (symbolFromSymbolTable === symbol) { return true; } - const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 284 /* ExportSpecifier */); + const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 287 /* ExportSpecifier */); symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; const flags = shouldResolveAlias ? getAllSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; if (flags & meaning) { @@ -49128,10 +49304,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (symbol.declarations && symbol.declarations.length) { for (const declaration of symbol.declarations) { switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: continue; default: return false; @@ -49230,10 +49406,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return node && getSymbolOfNode(node); } function hasExternalModuleSymbol(declaration) { - return isAmbientModule(declaration) || declaration.kind === 314 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isAmbientModule(declaration) || declaration.kind === 317 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasNonGlobalAugmentationExternalModuleSymbol(declaration) { - return isModuleWithStringLiteralName(declaration) || declaration.kind === 314 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isModuleWithStringLiteralName(declaration) || declaration.kind === 317 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { let aliasesToMakeVisible; @@ -49279,9 +49455,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isEntityNameVisible(entityName, enclosingDeclaration) { let meaning; - if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 234 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 166 /* ComputedPropertyName */) { + if (entityName.parent.kind === 188 /* TypeQuery */ || entityName.parent.kind === 236 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; - } else if (entityName.kind === 165 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 274 /* ImportEqualsDeclaration */) { + } else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 213 /* PropertyAccessExpression */ || entityName.parent.kind === 277 /* ImportEqualsDeclaration */) { meaning = 1920 /* Namespace */; } else { meaning = 788968 /* Type */; @@ -49321,7 +49497,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker); function symbolToStringWorker(writer2) { const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); - const printer3 = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 314 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); + const printer3 = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 317 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); printer3.writeNode(4 /* Unspecified */, entity, sourceFile, writer2); return writer2; @@ -49332,9 +49508,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function signatureToStringWorker(writer2) { let sigOutput; if (flags & 262144 /* WriteArrowStyleSignature */) { - sigOutput = kind === 1 /* Construct */ ? 185 /* ConstructorType */ : 184 /* FunctionType */; + sigOutput = kind === 1 /* Construct */ ? 187 /* ConstructorType */ : 186 /* FunctionType */; } else { - sigOutput = kind === 1 /* Construct */ ? 180 /* ConstructSignature */ : 179 /* CallSignature */; + sigOutput = kind === 1 /* Construct */ ? 182 /* ConstructSignature */ : 181 /* CallSignature */; } const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */); const printer3 = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); @@ -49828,7 +50004,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function shouldWriteTypeOfFunctionSymbol() { var _a3; const isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */) && some(symbol.declarations, (declaration) => isStatic(declaration)); - const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || forEach(symbol.declarations, (declaration) => declaration.parent.kind === 314 /* SourceFile */ || declaration.parent.kind === 271 /* ModuleBlock */)); + const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || forEach(symbol.declarations, (declaration) => declaration.parent.kind === 317 /* SourceFile */ || declaration.parent.kind === 274 /* ModuleBlock */)); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a3 = context.visitedTypes) == null ? void 0 : _a3.has(typeId))) && (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration)); } @@ -49907,12 +50083,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { const signature = resolved.callSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 184 /* FunctionType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 186 /* FunctionType */, context); return signatureNode; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { const signature = resolved.constructSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 185 /* ConstructorType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 187 /* ConstructorType */, context); return signatureNode; } } @@ -50080,12 +50256,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const typeElements = []; for (const signature of resolvedType.callSignatures) { - typeElements.push(signatureToSignatureDeclarationHelper(signature, 179 /* CallSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 181 /* CallSignature */, context)); } for (const signature of resolvedType.constructSignatures) { if (signature.flags & 4 /* Abstract */) continue; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 180 /* ConstructSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 182 /* ConstructSignature */, context)); } for (const info of resolvedType.indexInfos) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0)); @@ -50157,7 +50333,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 173 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); + const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 175 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); typeElements.push(preserveCommentsOn(methodDeclaration)); } } else { @@ -50188,8 +50364,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function preserveCommentsOn(node) { var _a3; - if (some(propertySymbol.declarations, (d) => d.kind === 356 /* JSDocPropertyTag */)) { - const d = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d2) => d2.kind === 356 /* JSDocPropertyTag */); + if (some(propertySymbol.declarations, (d) => d.kind === 359 /* JSDocPropertyTag */)) { + const d = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d2) => d2.kind === 359 /* 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 }]); @@ -50292,7 +50468,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { typeParameters = signature.typeParameters && signature.typeParameters.map((parameter) => typeParameterToDeclaration(parameter, context)); } const expandedParams = getExpandedParameters(signature, true)[0]; - const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 176 /* 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 === 178 /* 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); @@ -50313,11 +50489,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } let modifiers = options == null ? void 0 : options.modifiers; - if (kind === 185 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { + if (kind === 187 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { const flags = modifiersToFlags(modifiers); modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */); } - const node = kind === 179 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 180 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_a2 = options == null ? void 0 : options.name) != null ? _a2 : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 174 /* MethodDeclaration */ ? factory.createMethodDeclaration(modifiers, void 0, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), void 0, typeParameters, parameters, returnTypeNode, void 0) : kind === 176 /* Constructor */ ? factory.createConstructorDeclaration(modifiers, parameters, void 0) : kind === 177 /* GetAccessor */ ? factory.createGetAccessorDeclaration(modifiers, (_c = options == null ? void 0 : options.name) != null ? _c : factory.createIdentifier(""), parameters, returnTypeNode, void 0) : kind === 178 /* SetAccessor */ ? factory.createSetAccessorDeclaration(modifiers, (_d = options == null ? void 0 : options.name) != null ? _d : factory.createIdentifier(""), parameters, void 0) : kind === 181 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 326 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 184 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 185 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 263 /* FunctionDeclaration */ ? factory.createFunctionDeclaration(modifiers, void 0, (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, void 0) : kind === 218 /* FunctionExpression */ ? factory.createFunctionExpression(modifiers, void 0, (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, factory.createBlock([])) : kind === 219 /* ArrowFunction */ ? factory.createArrowFunction(modifiers, typeParameters, parameters, returnTypeNode, void 0, factory.createBlock([])) : Debug.assertNever(kind); + const node = kind === 181 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 182 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 175 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_a2 = options == null ? void 0 : options.name) != null ? _a2 : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 176 /* MethodDeclaration */ ? factory.createMethodDeclaration(modifiers, void 0, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), void 0, typeParameters, parameters, returnTypeNode, void 0) : kind === 178 /* Constructor */ ? factory.createConstructorDeclaration(modifiers, parameters, void 0) : kind === 179 /* GetAccessor */ ? factory.createGetAccessorDeclaration(modifiers, (_c = options == null ? void 0 : options.name) != null ? _c : factory.createIdentifier(""), parameters, returnTypeNode, void 0) : kind === 180 /* SetAccessor */ ? factory.createSetAccessorDeclaration(modifiers, (_d = options == null ? void 0 : options.name) != null ? _d : factory.createIdentifier(""), parameters, void 0) : kind === 183 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 329 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 186 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 187 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 265 /* FunctionDeclaration */ ? factory.createFunctionDeclaration(modifiers, void 0, (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, void 0) : kind === 220 /* FunctionExpression */ ? factory.createFunctionExpression(modifiers, void 0, (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, factory.createBlock([])) : kind === 221 /* ArrowFunction */ ? factory.createArrowFunction(modifiers, typeParameters, parameters, returnTypeNode, void 0, factory.createBlock([])) : Debug.assertNever(kind); if (typeArguments) { node.typeArguments = factory.createNodeArray(typeArguments); } @@ -50355,9 +50531,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return typeParameterToDeclarationWithConstraint(type, context, constraintNode); } function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { - let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 168 /* Parameter */); + let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */); if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = getDeclarationOfKind(parameterSymbol, 349 /* JSDocParameterTag */); + parameterDeclaration = getDeclarationOfKind(parameterSymbol, 352 /* JSDocParameterTag */); } let parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -50367,7 +50543,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 165 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); + const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 79 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* 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( @@ -50515,11 +50691,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) { var _a2; - let file = getDeclarationOfKind(symbol, 314 /* SourceFile */); + let file = getDeclarationOfKind(symbol, 317 /* SourceFile */); if (!file) { const equivalentFileSymbol = firstDefined(symbol.declarations, (d) => getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol)); if (equivalentFileSymbol) { - file = getDeclarationOfKind(equivalentFileSymbol, 314 /* SourceFile */); + file = getDeclarationOfKind(equivalentFileSymbol, 317 /* SourceFile */); } } if (file && file.moduleName !== void 0) { @@ -50959,7 +51135,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } return transformed === existing ? setTextRange(factory.cloneNode(existing), existing) : transformed; function visitExistingNodeTreeSymbols(node) { - if (isJSDocAllType(node) || node.kind === 328 /* JSDocNamepathType */) { + if (isJSDocAllType(node) || node.kind === 331 /* JSDocNamepathType */) { return factory.createKeywordTypeNode(132 /* AnyKeyword */); } if (isJSDocUnknownType(node)) { @@ -51099,8 +51275,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function symbolTableToDeclarationStatements(symbolTable, context, bundled) { - const serializePropertySymbolForClass = makeSerializePropertySymbol(factory.createPropertyDeclaration, 174 /* MethodDeclaration */, true); - const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol((mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), 173 /* MethodSignature */, false); + const serializePropertySymbolForClass = makeSerializePropertySymbol(factory.createPropertyDeclaration, 176 /* MethodDeclaration */, true); + const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol((mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), 175 /* MethodSignature */, false); const enclosingDeclaration = context.enclosingDeclaration; let results = []; const visitedSymbols = new Set2(); @@ -51474,8 +51650,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 179 /* CallSignature */); - const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 180 /* ConstructSignature */); + const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 181 /* CallSignature */); + const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 182 /* ConstructSignature */); const indexSignatures = serializeIndexSignatures(interfaceType, baseType); const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(95 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; addResult(factory.createInterfaceDeclaration( @@ -51543,7 +51719,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { const signatures = getSignaturesOfType(type, 0 /* Call */); for (const sig of signatures) { - const decl = signatureToSignatureDeclarationHelper(sig, 263 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); + const decl = signatureToSignatureDeclarationHelper(sig, 265 /* 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)) { @@ -51678,7 +51854,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { (p) => serializePropertySymbolForClass(p, true, staticBaseType) ); const isNonConstructableClassLikeInJsFile = !isClass && !!symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && !some(getSignaturesOfType(staticType, 1 /* Construct */)); - const constructors = isNonConstructableClassLikeInJsFile ? [factory.createConstructorDeclaration(factory.createModifiersFromModifierFlags(8 /* Private */), [], void 0)] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 176 /* Constructor */); + const constructors = isNonConstructableClassLikeInJsFile ? [factory.createConstructorDeclaration(factory.createModifiersFromModifierFlags(8 /* Private */), [], void 0)] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 178 /* Constructor */); const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); context.enclosingDeclaration = oldEnclosing; addResult(setTextRange(factory.createClassDeclaration( @@ -51725,8 +51901,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const targetName = getInternalSymbolName(target, verbatimTargetName); includePrivateSymbol(target); switch (node.kind) { - case 208 /* BindingElement */: - if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 261 /* VariableDeclaration */) { + case 210 /* BindingElement */: + if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 263 /* VariableDeclaration */) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; addResult(factory.createImportDeclaration( @@ -51742,15 +51918,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { break; } Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); - case 306 /* ShorthandPropertyAssignment */: - if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 227 /* BinaryExpression */) { + case 309 /* ShorthandPropertyAssignment */: + if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 229 /* BinaryExpression */) { serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), targetName ); } break; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: if (isPropertyAccessExpression(node.initializer)) { const initializer = node.initializer; const uniqueName = factory.createUniqueName(localName); @@ -51769,7 +51945,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { ), modifierFlags); break; } - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, isJsonSourceFile)) { serializeMaybeAliasAssignment(symbol); break; @@ -51782,10 +51958,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { isLocalImport ? symbolToName(target, context, 67108863 /* All */, false) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) ), isLocalImport ? modifierFlags : 0 /* None */); break; - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); break; - case 276 /* ImportClause */: + case 279 /* ImportClause */: addResult(factory.createImportDeclaration( void 0, factory.createImportClause(false, factory.createIdentifier(localName), void 0), @@ -51793,7 +51969,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { void 0 ), 0 /* None */); break; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: addResult(factory.createImportDeclaration( void 0, factory.createImportClause(false, void 0, factory.createNamespaceImport(factory.createIdentifier(localName))), @@ -51801,7 +51977,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { void 0 ), 0 /* None */); break; - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: addResult(factory.createExportDeclaration( void 0, false, @@ -51809,7 +51985,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) ), 0 /* None */); break; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: addResult(factory.createImportDeclaration( void 0, factory.createImportClause( @@ -51827,7 +52003,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { void 0 ), 0 /* None */); break; - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: const specifier = node.parent.parent.moduleSpecifier; serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), @@ -51835,12 +52011,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { specifier && isStringLiteralLike(specifier) ? factory.createStringLiteral(specifier.text) : void 0 ); break; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: serializeMaybeAliasAssignment(symbol); break; - case 227 /* BinaryExpression */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 229 /* BinaryExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: if (symbol.escapedName === "default" /* Default */ || symbol.escapedName === "export=" /* ExportEquals */) { serializeMaybeAliasAssignment(symbol); } else { @@ -52216,17 +52392,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getTypeAliasForTypeLiteral(type) { if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */ && type.symbol.declarations) { const node = walkUpParenthesizedTypes(type.symbol.declarations[0].parent); - if (node.kind === 268 /* TypeAliasDeclaration */) { + if (node.kind === 271 /* TypeAliasDeclaration */) { return getSymbolOfNode(node); } } return void 0; } function isTopLevelInExternalModuleAugmentation(node) { - return node && node.parent && node.parent.kind === 271 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); + return node && node.parent && node.parent.kind === 274 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); } function isDefaultBindingContext(location2) { - return location2.kind === 314 /* SourceFile */ || isAmbientModule(location2); + return location2.kind === 317 /* SourceFile */ || isAmbientModule(location2); } function getNameOfSymbolFromNameType(symbol, context) { const nameType = getSymbolLinks(symbol).nameType; @@ -52271,17 +52447,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!declaration) { declaration = symbol.declarations[0]; } - if (declaration.parent && declaration.parent.kind === 261 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 263 /* VariableDeclaration */) { return declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: if (context && !context.encounteredError && !(context.flags & 131072 /* AllowAnonymousIdentifier */)) { context.encounteredError = true; } - return declaration.kind === 232 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; + return declaration.kind === 234 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; } } const name = getNameOfSymbolFromNameType(symbol, context); @@ -52298,68 +52474,68 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: - case 348 /* JSDocEnumTag */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: + case 351 /* JSDocEnumTag */: return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent)); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: if (isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 263 /* FunctionDeclaration */: - case 269 /* EnumDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 266 /* AnnotationDeclaration */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 265 /* FunctionDeclaration */: + case 272 /* EnumDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 268 /* AnnotationDeclaration */: if (isExternalModuleAugmentation(node)) { return true; } const parent2 = getDeclarationContainer(node); - if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 274 /* ImportEqualsDeclaration */ && parent2.kind !== 314 /* SourceFile */ && parent2.flags & 16777216 /* Ambient */)) { + if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 277 /* ImportEqualsDeclaration */ && parent2.kind !== 317 /* SourceFile */ && parent2.flags & 16777216 /* Ambient */)) { return isGlobalSourceFile(parent2); } return isDeclarationVisible(parent2); - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) { return false; } - case 176 /* Constructor */: - case 180 /* ConstructSignature */: - case 179 /* CallSignature */: - case 181 /* IndexSignature */: - case 168 /* Parameter */: - case 271 /* ModuleBlock */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 187 /* TypeLiteral */: - case 183 /* TypeReference */: - case 188 /* ArrayType */: - case 189 /* TupleType */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: + case 178 /* Constructor */: + case 182 /* ConstructSignature */: + case 181 /* CallSignature */: + case 183 /* IndexSignature */: + case 169 /* Parameter */: + case 274 /* ModuleBlock */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 189 /* TypeLiteral */: + case 185 /* TypeReference */: + case 190 /* ArrayType */: + case 191 /* TupleType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: + case 198 /* ParenthesizedType */: + case 204 /* NamedTupleMember */: return isDeclarationVisible(node.parent); - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: - case 279 /* ImportSpecifier */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: + case 282 /* ImportSpecifier */: return false; - case 167 /* TypeParameter */: - case 314 /* SourceFile */: - case 273 /* NamespaceExportDeclaration */: + case 168 /* TypeParameter */: + case 317 /* SourceFile */: + case 276 /* NamespaceExportDeclaration */: return true; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return false; default: return false; @@ -52368,9 +52544,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function collectLinkedAliases(node, setVisibility) { let exportSymbol; - if (node.parent && node.parent.kind === 280 /* ExportAssignment */) { + if (node.parent && node.parent.kind === 283 /* ExportAssignment */) { exportSymbol = resolveName(node, node.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, void 0, node, false); - } else if (node.parent.kind === 284 /* ExportSpecifier */) { + } else if (node.parent.kind === 287 /* ExportSpecifier */) { exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); } let result; @@ -52465,12 +52641,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getDeclarationContainer(node) { return findAncestor(getRootDeclaration(node), (node2) => { switch (node2.kind) { - case 261 /* VariableDeclaration */: - case 262 /* VariableDeclarationList */: - case 279 /* ImportSpecifier */: - case 278 /* NamedImports */: - case 277 /* NamespaceImport */: - case 276 /* ImportClause */: + case 263 /* VariableDeclaration */: + case 264 /* VariableDeclarationList */: + case 282 /* ImportSpecifier */: + case 281 /* NamedImports */: + case 280 /* NamespaceImport */: + case 279 /* ImportClause */: return false; default: return true; @@ -52574,23 +52750,23 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getParentElementAccess(node) { const ancestor = node.parent.parent; switch (ancestor.kind) { - case 208 /* BindingElement */: - case 305 /* PropertyAssignment */: + case 210 /* BindingElement */: + case 308 /* PropertyAssignment */: return getSyntheticElementAccess(ancestor); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return getSyntheticElementAccess(node.parent); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return ancestor.initializer; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return ancestor.right; } } function getDestructuringPropertyName(node) { const parent2 = node.parent; - if (node.kind === 208 /* BindingElement */ && parent2.kind === 206 /* ObjectBindingPattern */) { + if (node.kind === 210 /* BindingElement */ && parent2.kind === 208 /* ObjectBindingPattern */) { return getLiteralPropertyNameText(node.propertyName || node.name); } - if (node.kind === 305 /* PropertyAssignment */ || node.kind === 306 /* ShorthandPropertyAssignment */) { + if (node.kind === 308 /* PropertyAssignment */ || node.kind === 309 /* ShorthandPropertyAssignment */) { return getLiteralPropertyNameText(node.name); } return "" + parent2.elements.indexOf(node); @@ -52615,7 +52791,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); } let type; - if (pattern.kind === 206 /* ObjectBindingPattern */) { + if (pattern.kind === 208 /* ObjectBindingPattern */) { if (declaration.dotDotDotToken) { parentType = getReducedType(parentType); if (parentType.flags & 2 /* Unknown */ || !isValidSpreadType(parentType)) { @@ -52670,17 +52846,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isEmptyArrayLiteral2(node) { const expr = skipParentheses(node, true); - return expr.kind === 209 /* ArrayLiteralExpression */ && expr.elements.length === 0; + return expr.kind === 211 /* 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 === 250 /* ForInStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 252 /* ForInStatement */) { const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression(declaration.parent.parent.expression, checkMode))); return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType; } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 251 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 253 /* ForOfStatement */) { const forOfStatement = declaration.parent.parent; return checkRightHandSideOfForOf(forOfStatement) || anyType; } @@ -52703,8 +52879,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (isParameter(declaration)) { const func = declaration.parent; - if (func.kind === 178 /* SetAccessor */ && hasBindableName(func)) { - const getter = getDeclarationOfKind(getSymbolOfNode(declaration.parent), 177 /* GetAccessor */); + if (func.kind === 180 /* SetAccessor */ && hasBindableName(func)) { + const getter = getDeclarationOfKind(getSymbolOfNode(declaration.parent), 179 /* GetAccessor */); if (getter) { const getterSignature = getSignatureFromDeclaration(getter); const thisParameter = getAccessorThisParameter(func); @@ -52757,7 +52933,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 212 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration(void 0, declaration, symbol, declaration)); + links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 214 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration(void 0, declaration, symbol, declaration)); } return links.isConstructorDeclaredProperty; } @@ -52773,7 +52949,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } for (const declaration of symbol.declarations) { const container = getThisContainer(declaration, false); - if (container && (container.kind === 176 /* Constructor */ || isJSConstructor(container))) { + if (container && (container.kind === 178 /* Constructor */ || isJSConstructor(container))) { return container; } } @@ -53035,7 +53211,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isDeclarationInConstructor(expression) { const thisContainer = getThisContainer(expression, false); - return thisContainer.kind === 176 /* Constructor */ || thisContainer.kind === 263 /* FunctionDeclaration */ || thisContainer.kind === 218 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); + return thisContainer.kind === 178 /* Constructor */ || thisContainer.kind === 265 /* FunctionDeclaration */ || thisContainer.kind === 220 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); } function getConstructorDefinedThisAssignmentTypes(types, declarations) { Debug.assert(types.length === declarations.length); @@ -53091,7 +53267,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2) { const elements = pattern.elements; const lastElement = lastOrUndefined(elements); - const restElement = lastElement && lastElement.kind === 208 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; + const restElement = lastElement && lastElement.kind === 210 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; if (elements.length === 0 || elements.length === 1 && restElement) { return languageVersion >= 2 /* ES2015 */ ? createIterableType(anyType) : anyArrayType; } @@ -53107,7 +53283,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return result; } function getTypeFromBindingPattern(pattern, includePatternInType = false, reportErrors2 = false) { - return pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); + return pattern.kind === 208 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors2) { return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration(declaration, true, 0 /* Normal */), declaration, reportErrors2); @@ -53140,7 +53316,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function declarationBelongsToPrivateAmbientMember(declaration) { const root = getRootDeclaration(declaration); - const memberDeclaration = root.kind === 168 /* Parameter */ ? root.parent : root; + const memberDeclaration = root.kind === 169 /* Parameter */ ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function tryGetTypeFromEffectiveTypeNode(node) { @@ -53208,7 +53384,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return reportCircularityError(symbol); } let type; - if (declaration.kind === 280 /* ExportAssignment */) { + if (declaration.kind === 283 /* 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); @@ -53225,7 +53401,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { type = tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionForMutableLocation(declaration.name, 0 /* Normal */); } else if (isObjectLiteralMethod(declaration)) { type = tryGetTypeFromEffectiveTypeNode(declaration) || checkObjectLiteralMethod(declaration, 0 /* Normal */); - } else if (isParameter(declaration) || isPropertyDeclaration(declaration) || isPropertySignature(declaration) || isAnnotationPropertyDeclaration(declaration) || isVariableDeclaration(declaration) || isBindingElement(declaration) || isJSDocPropertyLikeTag(declaration)) { + } else if (isParameter(declaration) || isPropertyDeclaration(declaration) || isPropertySignature(declaration) || isAnnotationPropertyDeclaration(declaration) || isVariableDeclaration(declaration) || isBindingElement(declaration) || isOverloadPropertyDeclaration(declaration) || isJSDocPropertyLikeTag(declaration)) { type = getWidenedTypeForVariableLikeDeclaration(declaration, true); } else if (isEnumDeclaration(declaration)) { type = getTypeOfFuncClassEnumModule(symbol); @@ -53245,13 +53421,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getAnnotatedAccessorTypeNode(accessor) { if (accessor) { switch (accessor.kind) { - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: const getterTypeAnnotation = getEffectiveReturnTypeNode(accessor); return getterTypeAnnotation; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: const setterTypeAnnotation = getEffectiveSetAccessorTypeAnnotationNode(accessor); return setterTypeAnnotation; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: Debug.assert(hasAccessorModifier(accessor)); const accessorTypeAnnotation = getEffectiveTypeAnnotationNode(accessor); return accessorTypeAnnotation; @@ -53276,9 +53452,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!pushTypeResolution(symbol, 0 /* Type */)) { return errorType; } - const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); - const accessor = tryCast(getDeclarationOfKind(symbol, 171 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const getter = getDeclarationOfKind(symbol, 179 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 180 /* SetAccessor */); + const accessor = tryCast(getDeclarationOfKind(symbol, 172 /* 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, true); if (!type) { if (setter && !isPrivateWithinAmbient(setter)) { @@ -53313,7 +53489,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!pushTypeResolution(symbol, 8 /* WriteType */)) { return errorType; } - const setter = (_a2 = getDeclarationOfKind(symbol, 178 /* SetAccessor */)) != null ? _a2 : tryCast(getDeclarationOfKind(symbol, 171 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const setter = (_a2 = getDeclarationOfKind(symbol, 180 /* SetAccessor */)) != null ? _a2 : tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let writeType = getAnnotatedAccessorType(setter); if (!popTypeResolution()) { if (getAnnotatedAccessorTypeNode(setter)) { @@ -53348,7 +53524,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const declaration = symbol.valueDeclaration; if (symbol.flags & 1536 /* Module */ && isShorthandAmbientModuleSymbol(symbol)) { return anyType; - } else if (declaration && (declaration.kind === 227 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 227 /* BinaryExpression */)) { + } else if (declaration && (declaration.kind === 229 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 229 /* BinaryExpression */)) { return getWidenedTypeForAssignmentDeclaration(symbol); } else if (symbol.flags & 512 /* ValueModule */ && declaration && isSourceFile(declaration) && declaration.commonJsModuleIndicator) { const resolvedModule = resolveExternalModuleSymbol(symbol); @@ -53404,7 +53580,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { ); return errorType; } - if (noImplicitAny && (declaration.kind !== 168 /* Parameter */ || declaration.initializer)) { + if (noImplicitAny && (declaration.kind !== 169 /* 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, @@ -53515,43 +53691,43 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return void 0; } switch (node.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 326 /* JSDocFunctionType */: - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 268 /* TypeAliasDeclaration */: - case 353 /* JSDocTemplateTag */: - case 354 /* JSDocTypedefTag */: - case 348 /* JSDocEnumTag */: - case 347 /* JSDocCallbackTag */: - case 200 /* MappedType */: - case 194 /* ConditionalType */: { + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 175 /* MethodSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 329 /* JSDocFunctionType */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 271 /* TypeAliasDeclaration */: + case 356 /* JSDocTemplateTag */: + case 357 /* JSDocTypedefTag */: + case 351 /* JSDocEnumTag */: + case 350 /* JSDocCallbackTag */: + case 202 /* MappedType */: + case 196 /* ConditionalType */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); - if (node.kind === 200 /* MappedType */) { + if (node.kind === 202 /* MappedType */) { return append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfNode(node.typeParameter))); - } else if (node.kind === 194 /* ConditionalType */) { + } else if (node.kind === 196 /* ConditionalType */) { return concatenate(outerTypeParameters, getInferTypeParameters(node)); } const outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, getEffectiveTypeParameterDeclarations(node)); - const thisType = includeThisTypes && (node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */ || node.kind === 267 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType; + const thisType = includeThisTypes && (node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */ || node.kind === 270 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType; return thisType ? append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters; } - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: const paramSymbol = getParameterSymbolFromJSDoc(node); if (paramSymbol) { node = paramSymbol.valueDeclaration; } break; - case 329 /* JSDoc */: { + case 332 /* JSDoc */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); return node.tags ? appendTypeParameters(outerTypeParameters, flatMap(node.tags, (t) => isJSDocTemplateTag(t) ? t.typeParameters : void 0)) : outerTypeParameters; } @@ -53559,7 +53735,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getOuterTypeParametersOfClassOrInterface(symbol) { - const declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : getDeclarationOfKind(symbol, 267 /* InterfaceDeclaration */); + const declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : getDeclarationOfKind(symbol, 270 /* InterfaceDeclaration */); Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); } @@ -53569,7 +53745,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let result; for (const node of symbol.declarations) { - if (node.kind === 267 /* InterfaceDeclaration */ || node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { + if (node.kind === 270 /* InterfaceDeclaration */ || node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { const declaration = node; result = appendTypeParameters(result, getEffectiveTypeParameterDeclarations(declaration)); } @@ -53702,7 +53878,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (!popTypeResolution() && type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 264 /* ClassDeclaration */ || declaration.kind === 267 /* InterfaceDeclaration */) { + if (declaration.kind === 266 /* ClassDeclaration */ || declaration.kind === 270 /* InterfaceDeclaration */) { reportCircularBaseType(declaration, type); } } @@ -53785,7 +53961,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; if (type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 267 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 270 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { for (const node of getInterfaceBaseTypeNodes(declaration)) { const baseType = getReducedType(getTypeFromTypeNode(node)); if (!isErrorType(baseType)) { @@ -53813,7 +53989,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; } for (const declaration of symbol.declarations) { - if (declaration.kind === 267 /* InterfaceDeclaration */) { + if (declaration.kind === 270 /* InterfaceDeclaration */) { if (declaration.flags & 128 /* ContainsThis */) { return false; } @@ -53879,7 +54055,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } else { type = errorType; - if (declaration.kind === 348 /* JSDocEnumTag */) { + if (declaration.kind === 351 /* 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)); @@ -53892,7 +54068,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isStringConcatExpression(expr) { if (isStringLiteralLike(expr)) { return true; - } else if (expr.kind === 227 /* BinaryExpression */) { + } else if (expr.kind === 229 /* BinaryExpression */) { return isStringConcatExpression(expr.left) && isStringConcatExpression(expr.right); } return false; @@ -53907,11 +54083,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 8 /* NumericLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return true; - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; case 79 /* Identifier */: return nodeIsMissing(expr) || !!getSymbolOfNode(member.parent).exports.get(expr.escapedText); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isStringConcatExpression(expr); default: return false; @@ -53925,7 +54101,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let hasNonLiteralMember = false; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 269 /* EnumDeclaration */) { + if (declaration.kind === 272 /* EnumDeclaration */) { for (const member of declaration.members) { if (member.initializer && isStringLiteralLike(member.initializer)) { return links.enumKind = 1 /* Literal */; @@ -53952,7 +54128,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const memberTypeList = []; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 269 /* EnumDeclaration */) { + if (declaration.kind === 272 /* EnumDeclaration */) { for (const member of declaration.members) { const value = getEnumMemberValue(member); const memberType = getFreshTypeOfLiteralType(getEnumLiteralType(value !== void 0 ? value : 0, enumCount, getSymbolOfNode(member))); @@ -54030,11 +54206,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 115 /* VoidKeyword */: case 157 /* UndefinedKeyword */: case 145 /* NeverKeyword */: - case 201 /* LiteralType */: + case 203 /* LiteralType */: return true; - case 188 /* ArrayType */: + case 190 /* ArrayType */: return isThislessType(node.elementType); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return !node.typeArguments || node.typeArguments.every(isThislessType); } return false; @@ -54050,21 +54226,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isThislessFunctionLikeDeclaration(node) { const returnType = getEffectiveReturnTypeNode(node); const typeParameters = getEffectiveTypeParameterDeclarations(node); - return (node.kind === 176 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); + return (node.kind === 178 /* 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 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return isThislessVariableLikeDeclaration(declaration); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return isThislessFunctionLikeDeclaration(declaration); } } @@ -54929,7 +55105,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isMappedTypeWithKeyofConstraintDeclaration(type) { const constraintDeclaration = getConstraintDeclarationForMappedType(type); - return constraintDeclaration.kind === 198 /* TypeOperator */ && constraintDeclaration.operator === 142 /* KeyOfKeyword */; + return constraintDeclaration.kind === 200 /* TypeOperator */ && constraintDeclaration.operator === 142 /* KeyOfKeyword */; } function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { @@ -55656,7 +55832,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return result; } function isJSDocOptionalParameter(node) { - return isInJSFile(node) && (node.type && node.type.kind === 325 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 325 /* JSDocOptionalType */)); + return isInJSFile(node) && (node.type && node.type.kind === 328 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 328 /* JSDocOptionalType */)); } function tryFindAmbientModule(moduleName, withAugmentations) { if (isExternalModuleNameRelative(moduleName)) { @@ -55689,7 +55865,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } const { isBracketed, typeExpression } = node; - return isBracketed || !!typeExpression && typeExpression.type.kind === 325 /* JSDocOptionalType */; + return isBracketed || !!typeExpression && typeExpression.type.kind === 328 /* JSDocOptionalType */; } function createTypePredicate(kind, parameterName, parameterIndex, type) { return { kind, parameterName, parameterIndex, type }; @@ -55757,7 +55933,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { parameters.push(paramSymbol); } - if (type && type.kind === 201 /* LiteralType */) { + if (type && type.kind === 203 /* LiteralType */) { flags |= 2 /* HasLiteralTypes */; } const isOptionalParameter2 = isOptionalJSDocPropertyLikeTag(param) || param.initializer || param.questionToken || isRestParameter(param) || iife && parameters.length > iife.arguments.length && !type || isJSDocOptionalParameter(param); @@ -55765,14 +55941,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { minArgumentCount = parameters.length; } } - if ((declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { - const otherKind = declaration.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; + if ((declaration.kind === 179 /* GetAccessor */ || declaration.kind === 180 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { + const otherKind = declaration.kind === 179 /* GetAccessor */ ? 180 /* SetAccessor */ : 179 /* GetAccessor */; const other = getDeclarationOfKind(getSymbolOfNode(declaration), otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); } } - const classType = declaration.kind === 176 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0; + const classType = declaration.kind === 178 /* 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 */; @@ -55848,15 +56024,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (node.kind) { case 79 /* Identifier */: return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol; - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return node.name.kind === 166 /* ComputedPropertyName */ && traverse(node.name); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + return node.name.kind === 167 /* ComputedPropertyName */ && traverse(node.name); + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return traverse(node.expression); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return traverse(node.initializer); default: return !nodeStartsNewLexicalEnvironment(node) && !isPartOfTypeNode(node) && !!forEachChild(node, traverse); @@ -55923,7 +56099,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function createTypePredicateFromTypePredicateNode(node, signature) { const parameterName = node.parameterName; const type = node.type && getTypeFromTypeNode(node.type); - return parameterName.kind === 197 /* ThisType */ ? createTypePredicate(node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, void 0, void 0, type) : createTypePredicate( + return parameterName.kind === 199 /* ThisType */ ? createTypePredicate(node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, void 0, void 0, type) : createTypePredicate( node.assertsModifier ? 3 /* AssertsIdentifier */ : 1 /* Identifier */, parameterName.escapedText, findIndex(signature.parameters, (p) => p.escapedName === parameterName.escapedText), @@ -55966,7 +56142,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return signature.resolvedReturnType; } function getReturnTypeFromAnnotation(declaration) { - if (declaration.kind === 176 /* Constructor */) { + if (declaration.kind === 178 /* Constructor */) { return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)); } if (isJSDocConstructSignature(declaration)) { @@ -55976,12 +56152,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (typeNode) { return getTypeFromTypeNode(typeNode); } - if (declaration.kind === 177 /* GetAccessor */ && hasBindableName(declaration)) { + if (declaration.kind === 179 /* GetAccessor */ && hasBindableName(declaration)) { const jsDocType = isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration); if (jsDocType) { return jsDocType; } - const setter = getDeclarationOfKind(getSymbolOfNode(declaration), 178 /* SetAccessor */); + const setter = getDeclarationOfKind(getSymbolOfNode(declaration), 180 /* SetAccessor */); const setterType = getAnnotatedAccessorType(setter); if (setterType) { return setterType; @@ -56069,7 +56245,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { var _a2; if (!signature.isolatedSignatureType) { const kind = (_a2 = signature.declaration) == null ? void 0 : _a2.kind; - const isConstructor = kind === void 0 || kind === 176 /* Constructor */ || kind === 180 /* ConstructSignature */ || kind === 185 /* ConstructorType */; + const isConstructor = kind === void 0 || kind === 178 /* Constructor */ || kind === 182 /* ConstructSignature */ || kind === 187 /* ConstructorType */; const type = createObjectType(16 /* Anonymous */); type.members = emptySymbols; type.properties = emptyArray; @@ -56128,9 +56304,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let inferences; if ((_a2 = typeParameter.symbol) == null ? void 0 : _a2.declarations) { for (const declaration of typeParameter.symbol.declarations) { - if (declaration.parent.kind === 195 /* InferType */) { + if (declaration.parent.kind === 197 /* InferType */) { const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent); - if (grandParent.kind === 183 /* TypeReference */ && !omitTypeReferences) { + if (grandParent.kind === 185 /* TypeReference */ && !omitTypeReferences) { const typeReference = grandParent; const typeParameters = getTypeParametersForTypeReference(typeReference); if (typeParameters) { @@ -56148,13 +56324,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - } else if (grandParent.kind === 168 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 191 /* RestType */ || grandParent.kind === 202 /* NamedTupleMember */ && grandParent.dotDotDotToken) { + } else if (grandParent.kind === 169 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 193 /* RestType */ || grandParent.kind === 204 /* NamedTupleMember */ && grandParent.dotDotDotToken) { inferences = append(inferences, createArrayType(unknownType)); - } else if (grandParent.kind === 204 /* TemplateLiteralTypeSpan */) { + } else if (grandParent.kind === 206 /* TemplateLiteralTypeSpan */) { inferences = append(inferences, stringType); - } else if (grandParent.kind === 167 /* TypeParameter */ && grandParent.parent.kind === 200 /* MappedType */) { + } else if (grandParent.kind === 168 /* TypeParameter */ && grandParent.parent.kind === 202 /* MappedType */) { inferences = append(inferences, keyofConstraintType); - } else if (grandParent.kind === 200 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 194 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 200 /* MappedType */ && grandParent.parent.checkType.type) { + } else if (grandParent.kind === 202 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 196 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 202 /* MappedType */ && grandParent.parent.checkType.type) { const checkMappedType2 = grandParent.parent.checkType; const nodeType = getTypeFromTypeNode(checkMappedType2.type); inferences = append(inferences, instantiateType( @@ -56179,7 +56355,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { let type = getTypeFromTypeNode(constraintDeclaration); if (type.flags & 1 /* Any */ && !isErrorType(type)) { - type = constraintDeclaration.parent.parent.kind === 200 /* MappedType */ ? keyofConstraintType : unknownType; + type = constraintDeclaration.parent.parent.kind === 202 /* MappedType */ ? keyofConstraintType : unknownType; } typeParameter.constraint = type; } @@ -56188,7 +56364,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return typeParameter.constraint === noConstraintType ? void 0 : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - const tp = getDeclarationOfKind(typeParameter.symbol, 167 /* TypeParameter */); + const tp = getDeclarationOfKind(typeParameter.symbol, 168 /* TypeParameter */); const host2 = isJSDocTemplateTag(tp.parent) ? getEffectiveContainerForJSDocTemplateTag(tp.parent) : tp.parent; return host2 && getSymbolOfNode(host2); } @@ -56268,7 +56444,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return ((_a2 = type.target.localTypeParameters) == null ? void 0 : _a2.map(() => errorType)) || emptyArray; } const node = type.node; - const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const typeArguments = !node ? emptyArray : node.kind === 185 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 190 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); if (popTypeResolution()) { type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; } else { @@ -56302,7 +56478,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return errorType; } } - if (node.kind === 183 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { + if (node.kind === 185 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference(type, node, void 0); } const typeArguments = concatenate(type.outerTypeParameters, fillMissingTypeArguments(typeArgumentsFromTypeReferenceNode(node), typeParameters, minTypeArgumentCount, isJs)); @@ -56370,9 +56546,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTypeReferenceName(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return node.typeName; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: const expr = node.expression; if (isEntityNameExpression(expr)) { return expr; @@ -56384,10 +56560,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return symbol.parent ? `${getSymbolPath(symbol.parent)}.${symbol.escapedName}` : symbol.escapedName; } function getUnresolvedSymbolForEntityName(name) { - const identifier = name.kind === 165 /* QualifiedName */ ? name.right : name.kind === 211 /* PropertyAccessExpression */ ? name.name : name; + const identifier = name.kind === 166 /* QualifiedName */ ? name.right : name.kind === 213 /* PropertyAccessExpression */ ? name.name : name; const text = identifier.escapedText; if (text) { - const parentSymbol = name.kind === 165 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 211 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; + const parentSymbol = name.kind === 166 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 213 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; const path = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text; let result = unresolvedSymbols.get(path); if (!result) { @@ -56439,7 +56615,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const valueType = getTypeOfSymbol(symbol); let typeType = valueType; if (symbol.valueDeclaration) { - const isImportTypeWithQualifier = node.kind === 205 /* ImportType */ && node.qualifier; + const isImportTypeWithQualifier = node.kind === 207 /* ImportType */ && node.qualifier; if (valueType.symbol && valueType.symbol !== symbol && isImportTypeWithQualifier) { typeType = getTypeReferenceType(node, valueType.symbol); } @@ -56467,7 +56643,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getIntersectionType([substitutionType.constraint, substitutionType.baseType]); } function isUnaryTupleTypeNode(node) { - return node.kind === 189 /* TupleType */ && node.elements.length === 1; + return node.kind === 191 /* 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; @@ -56475,17 +56651,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getConditionalFlowTypeOfType(type, node) { let constraints; let covariant = true; - while (node && !isStatement(node) && node.kind !== 329 /* JSDoc */) { + while (node && !isStatement(node) && node.kind !== 332 /* JSDoc */) { const parent2 = node.parent; - if (parent2.kind === 168 /* Parameter */) { + if (parent2.kind === 169 /* Parameter */) { covariant = !covariant; } - if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 194 /* ConditionalType */ && node === parent2.trueType) { + if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 196 /* 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 === 200 /* MappedType */ && node === parent2.type) { + } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 202 /* MappedType */ && node === parent2.type) { const mappedType = getTypeFromTypeNode(parent2); if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) { const typeParameter = getHomomorphicTypeVariable(mappedType); @@ -56502,7 +56678,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return constraints ? getSubstitutionType(type, getIntersectionType(constraints)) : type; } function isJSDocTypeReference(node) { - return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 183 /* TypeReference */ || node.kind === 205 /* ImportType */); + return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 185 /* TypeReference */ || node.kind === 207 /* ImportType */); } function checkNoTypeArguments(node, symbol) { if (node.typeArguments) { @@ -56608,9 +56784,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (declarations) { for (const declaration of declarations) { switch (declaration.kind) { - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: return declaration; } } @@ -56771,11 +56947,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTupleElementFlags(node) { switch (node.kind) { - case 190 /* OptionalType */: + case 192 /* OptionalType */: return 2 /* Optional */; - case 191 /* RestType */: + case 193 /* RestType */: return getRestTypeElementFlags(node); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return node.questionToken ? 2 /* Optional */ : node.dotDotDotToken ? getRestTypeElementFlags(node) : 1 /* Required */; default: return 1 /* Required */; @@ -56791,55 +56967,55 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return readonly ? globalReadonlyArrayType : globalArrayType; } const elementFlags = map(node.elements, getTupleElementFlags); - const missingName = some(node.elements, (e) => e.kind !== 202 /* NamedTupleMember */); + const missingName = some(node.elements, (e) => e.kind !== 204 /* NamedTupleMember */); return getTupleTargetType(elementFlags, readonly, missingName ? void 0 : node.elements); } function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { - return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 188 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 189 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 190 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 191 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); } function isResolvedByTypeAlias(node) { const parent2 = node.parent; switch (parent2.kind) { - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: - case 183 /* TypeReference */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 199 /* IndexedAccessType */: - case 194 /* ConditionalType */: - case 198 /* TypeOperator */: - case 188 /* ArrayType */: - case 189 /* TupleType */: + case 198 /* ParenthesizedType */: + case 204 /* NamedTupleMember */: + case 185 /* TypeReference */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: + case 201 /* IndexedAccessType */: + case 196 /* ConditionalType */: + case 200 /* TypeOperator */: + case 190 /* ArrayType */: + case 191 /* TupleType */: return isResolvedByTypeAlias(parent2); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return true; } return false; } function mayResolveTypeAlias(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node, 788968 /* Type */).flags & 524288 /* TypeAlias */); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return true; - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return node.operator !== 158 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); - case 196 /* ParenthesizedType */: - case 190 /* OptionalType */: - case 202 /* NamedTupleMember */: - case 325 /* JSDocOptionalType */: - case 323 /* JSDocNullableType */: - case 324 /* JSDocNonNullableType */: - case 318 /* JSDocTypeExpression */: + case 198 /* ParenthesizedType */: + case 192 /* OptionalType */: + case 204 /* NamedTupleMember */: + case 328 /* JSDocOptionalType */: + case 326 /* JSDocNullableType */: + case 327 /* JSDocNonNullableType */: + case 321 /* JSDocTypeExpression */: return mayResolveTypeAlias(node.type); - case 191 /* RestType */: - return node.type.kind !== 188 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 193 /* RestType */: + return node.type.kind !== 190 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 194 /* UnionType */: + case 195 /* IntersectionType */: return some(node.types, mayResolveTypeAlias); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); } return false; @@ -56850,10 +57026,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const target = getArrayOrTupleTargetType(node); if (target === emptyGenericType) { links.resolvedType = emptyObjectType; - } else if (!(node.kind === 189 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { - links.resolvedType = node.kind === 189 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference(target, node, void 0); + } else if (!(node.kind === 191 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { + links.resolvedType = node.kind === 191 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference(target, node, void 0); } else { - const elementTypes = node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const elementTypes = node.kind === 190 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); links.resolvedType = createNormalizedTypeReference(target, elementTypes); } } @@ -57834,7 +58010,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) { var _a2; - const accessExpression = accessNode && accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode : void 0; + const accessExpression = accessNode && accessNode.kind === 214 /* ElementAccessExpression */ ? accessNode : void 0; const propName = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode); if (propName !== void 0) { if (accessFlags & 256 /* Contextual */) { @@ -58002,7 +58178,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getIndexNodeForAccessExpression(accessNode) { - return accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 199 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 166 /* ComputedPropertyName */ ? accessNode.expression : accessNode; + return accessNode.kind === 214 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 201 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 167 /* ComputedPropertyName */ ? accessNode.expression : accessNode; } function isPatternLiteralPlaceholderType(type) { return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type); @@ -58133,7 +58309,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */) accessFlags |= 1 /* IncludeUndefined */; - if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 199 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) { + if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 201 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) { if (objectType.flags & 3 /* AnyOrUnknown */) { return objectType; } @@ -58673,7 +58849,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getThisType(node) { const container = getThisContainer(node, false); const parent2 = container && container.parent; - if (parent2 && (isClassLike(parent2) || parent2.kind === 267 /* InterfaceDeclaration */)) { + if (parent2 && (isClassLike(parent2) || parent2.kind === 270 /* InterfaceDeclaration */)) { if (!isStatic(container) && (!isConstructorDeclaration(container) || isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent2)).thisType; } @@ -58703,17 +58879,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getArrayElementTypeNode(node) { switch (node.kind) { - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return getArrayElementTypeNode(node.type); - case 189 /* TupleType */: + case 191 /* TupleType */: if (node.elements.length === 1) { node = node.elements[0]; - if (node.kind === 191 /* RestType */ || node.kind === 202 /* NamedTupleMember */ && node.dotDotDotToken) { + if (node.kind === 193 /* RestType */ || node.kind === 204 /* NamedTupleMember */ && node.dotDotDotToken) { return getArrayElementTypeNode(node.type); } } break; - case 188 /* ArrayType */: + case 190 /* ArrayType */: return node.elementType; } return void 0; @@ -58728,8 +58904,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getTypeFromTypeNodeWorker(node) { switch (node.kind) { case 132 /* AnyKeyword */: - case 321 /* JSDocAllType */: - case 322 /* JSDocUnknownType */: + case 324 /* JSDocAllType */: + case 325 /* JSDocUnknownType */: return anyType; case 159 /* UnknownKeyword */: return unknownType; @@ -58755,66 +58931,66 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return node.flags & 262144 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; case 140 /* IntrinsicKeyword */: return intrinsicMarkerType; - case 197 /* ThisType */: + case 199 /* ThisType */: case 109 /* ThisKeyword */: return getTypeFromThisTypeNode(node); - case 201 /* LiteralType */: + case 203 /* LiteralType */: return getTypeFromLiteralTypeNode(node); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return getTypeFromTypeReference(node); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return node.assertsModifier ? voidType : booleanType; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 188 /* ArrayType */: - case 189 /* TupleType */: + case 190 /* ArrayType */: + case 191 /* TupleType */: return getTypeFromArrayOrTupleTypeNode(node); - case 190 /* OptionalType */: + case 192 /* OptionalType */: return getTypeFromOptionalTypeNode(node); - case 192 /* UnionType */: + case 194 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 323 /* JSDocNullableType */: + case 326 /* JSDocNullableType */: return getTypeFromJSDocNullableTypeNode(node); - case 325 /* JSDocOptionalType */: + case 328 /* JSDocOptionalType */: return addOptionality(getTypeFromTypeNode(node.type)); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return getTypeFromNamedTupleTypeNode(node); - case 196 /* ParenthesizedType */: - case 324 /* JSDocNonNullableType */: - case 318 /* JSDocTypeExpression */: + case 198 /* ParenthesizedType */: + case 327 /* JSDocNonNullableType */: + case 321 /* JSDocTypeExpression */: return getTypeFromTypeNode(node.type); - case 191 /* RestType */: + case 193 /* RestType */: return getTypeFromRestTypeNode(node); - case 327 /* JSDocVariadicType */: + case 330 /* JSDocVariadicType */: return getTypeFromJSDocVariadicType(node); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 326 /* JSDocFunctionType */: - case 332 /* JSDocSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 329 /* JSDocFunctionType */: + case 335 /* JSDocSignature */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return getTypeFromTypeOperatorNode(node); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return getTypeFromIndexedAccessTypeNode(node); - case 200 /* MappedType */: + case 202 /* MappedType */: return getTypeFromMappedTypeNode(node); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return getTypeFromConditionalTypeNode(node); - case 195 /* InferType */: + case 197 /* InferType */: return getTypeFromInferTypeNode(node); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: return getTypeFromTemplateTypeNode(node); - case 205 /* ImportType */: + case 207 /* ImportType */: return getTypeFromImportTypeNode(node); case 79 /* Identifier */: - case 165 /* QualifiedName */: - case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: const symbol = getSymbolAtLocation(node); return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType; default: @@ -59009,13 +59185,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return type; } function maybeTypeParameterReference(node) { - return !(node.parent.kind === 183 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 205 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); + return !(node.parent.kind === 185 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 207 /* 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 === 242 /* Block */ || n.kind === 194 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { + if (!n || n.kind === 244 /* Block */ || n.kind === 196 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { return true; } } @@ -59024,17 +59200,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; function containsReference(node2) { switch (node2.kind) { - case 197 /* ThisType */: + case 199 /* ThisType */: return !!tp.isThisType; case 79 /* Identifier */: return !tp.isThisType && isPartOfTypeNode(node2) && maybeTypeParameterReference(node2) && getTypeFromTypeNodeWorker(node2) === tp; - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: const entityName = node2.exprName; const firstIdentifier = getFirstIdentifier(entityName); const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier); const tpDeclaration = tp.symbol.declarations[0]; let tpScope; - if (tpDeclaration.kind === 167 /* TypeParameter */) { + if (tpDeclaration.kind === 168 /* TypeParameter */) { tpScope = tpDeclaration.parent; } else if (tp.isThisType) { tpScope = tpDeclaration; @@ -59045,8 +59221,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return some(firstIdentifierSymbol.declarations, (idDecl) => isNodeDescendantOf(idDecl, tpScope)) || some(node2.typeArguments, containsReference); } return true; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return !node2.type && !!node2.body || some(node2.typeParameters, containsReference) || some(node2.parameters, containsReference) || !!node2.type && containsReference(node2.type); } return !!forEachChild(node2, containsReference); @@ -59277,32 +59453,32 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration); } function isContextSensitive(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 176 /* MethodDeclaration */ || isObjectLiteralMethod(node)); switch (node.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 263 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: return isContextSensitiveFunctionLikeDeclaration(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return some(node.properties, isContextSensitive); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return some(node.elements, isContextSensitive); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return (node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return isContextSensitive(node.expression); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive); - case 294 /* JsxAttribute */: { + case 297 /* JsxAttribute */: { const { initializer } = node; return !!initializer && isContextSensitive(initializer); } - case 297 /* JsxExpression */: { + case 300 /* JsxExpression */: { const { expression } = node; return !!expression && isContextSensitive(expression); } @@ -59313,7 +59489,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node); } function hasContextSensitiveReturnExpression(node) { - return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 242 /* Block */ && isContextSensitive(node.body); + return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 244 /* Block */ && isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { return (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func); @@ -59386,23 +59562,23 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; } switch (node.kind) { - case 297 /* JsxExpression */: - case 217 /* ParenthesizedExpression */: + case 300 /* JsxExpression */: + case 219 /* ParenthesizedExpression */: return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 27 /* CommaToken */: return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); } break; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer); } return false; @@ -59576,16 +59752,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) { switch (child.kind) { - case 297 /* JsxExpression */: + case 300 /* 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 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: return { errorNode: child, innerExpression: child, nameType }; default: return Debug.assertNever(child, "Found invalid jsx child"); @@ -59711,13 +59887,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue; } switch (prop.kind) { - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: - case 174 /* MethodDeclaration */: - case 306 /* ShorthandPropertyAssignment */: + case 180 /* SetAccessor */: + case 179 /* GetAccessor */: + case 176 /* MethodDeclaration */: + case 309 /* ShorthandPropertyAssignment */: yield { errorNode: prop.name, innerExpression: void 0, nameType: type }; break; - case 305 /* PropertyAssignment */: + case 308 /* 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: @@ -59771,7 +59947,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); } const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 174 /* MethodDeclaration */ && kind !== 173 /* MethodSignature */ && kind !== 176 /* Constructor */; + const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 176 /* MethodDeclaration */ && kind !== 175 /* MethodSignature */ && kind !== 178 /* Constructor */; let result = -1 /* True */; const sourceThisType = getThisTypeOfSignature(source); if (sourceThisType && sourceThisType !== voidType) { @@ -61619,7 +61795,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const sourceSignature = first(sourceSignatures); const targetSignature = first(targetSignatures); result2 = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors2, incompatibleReporter(sourceSignature, targetSignature)); - if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 176 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 176 /* Constructor */)) { + if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 178 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 178 /* Constructor */)) { const constructSignatureToString = (signature) => signatureToString(signature, void 0, 262144 /* WriteArrowStyleSignature */, kind); reportError(Diagnostics.Type_0_is_not_assignable_to_type_1, constructSignatureToString(sourceSignature), constructSignatureToString(targetSignature)); reportError(Diagnostics.Types_of_construct_signatures_are_incompatible); @@ -62237,7 +62413,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const target = type.target; if (getObjectFlags(target) & 1 /* Class */) { const baseTypeNode = getBaseTypeNodeOfClass(target); - if (baseTypeNode && baseTypeNode.expression.kind !== 79 /* Identifier */ && baseTypeNode.expression.kind !== 211 /* PropertyAccessExpression */) { + if (baseTypeNode && baseTypeNode.expression.kind !== 79 /* Identifier */ && baseTypeNode.expression.kind !== 213 /* PropertyAccessExpression */) { return void 0; } } @@ -62604,12 +62780,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let diagnostic; switch (declaration.kind) { - case 227 /* BinaryExpression */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 229 /* BinaryExpression */: + case 172 /* PropertyDeclaration */: + case 171 /* 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 168 /* Parameter */: + case 169 /* Parameter */: const param = declaration; if (isIdentifier(param.name) && (isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && (resolveName(param, param.name.escapedText, 788968 /* Type */, void 0, param.name.escapedText, true) || param.name.originalKeywordKind && isTypeNodeKind(param.name.originalKeywordKind))) { const newName = "arg" + param.parent.parameters.indexOf(param); @@ -62619,22 +62795,22 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } 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 208 /* BindingElement */: + case 210 /* BindingElement */: diagnostic = Diagnostics.Binding_element_0_implicitly_has_an_1_type; if (!noImplicitAny) { return; } break; - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 221 /* 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); @@ -62645,7 +62821,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } 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 200 /* MappedType */: + case 202 /* MappedType */: if (noImplicitAny) { error(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); } @@ -62742,7 +62918,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function inferFromIntraExpressionSites(context) { if (context.intraExpressionInferenceSites) { for (const { node, type } of context.intraExpressionInferenceSites) { - const contextualType = node.kind === 174 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); + const contextualType = node.kind === 176 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); if (contextualType) { inferTypes(context.inferences, type, contextualType); } @@ -62794,8 +62970,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isNonGenericTopLevelType(type) { if (type.aliasSymbol && !type.aliasTypeArguments) { - const declaration = getDeclarationOfKind(type.aliasSymbol, 268 /* TypeAliasDeclaration */); - return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 314 /* SourceFile */ ? true : n.kind === 270 /* ModuleDeclaration */ ? false : "quit")); + const declaration = getDeclarationOfKind(type.aliasSymbol, 271 /* TypeAliasDeclaration */); + return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 317 /* SourceFile */ ? true : n.kind === 273 /* ModuleDeclaration */ ? false : "quit")); } return false; } @@ -63540,7 +63716,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function inferFromSignature(source, target) { const saveBivariant = bivariant; const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - bivariant = bivariant || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 176 /* Constructor */; + bivariant = bivariant || kind === 176 /* MethodDeclaration */ || kind === 175 /* MethodSignature */ || kind === 178 /* Constructor */; applyToParameterTypes(source, target, inferFromContravariantTypesIfStrictFunctionTypes); bivariant = saveBivariant; applyToReturnTypes(source, target, inferFromTypes); @@ -63696,7 +63872,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; } default: - if (node.parent.kind === 306 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 309 /* 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; @@ -63721,7 +63897,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isInTypeQuery(node) { return !!findAncestor( node, - (n) => n.kind === 186 /* TypeQuery */ ? true : n.kind === 79 /* Identifier */ || n.kind === 165 /* QualifiedName */ ? false : "quit" + (n) => n.kind === 188 /* TypeQuery */ ? true : n.kind === 79 /* Identifier */ || n.kind === 166 /* QualifiedName */ ? false : "quit" ); } function getFlowCacheKey(node, declaredType, initialType, flowContainer) { @@ -63733,59 +63909,59 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } case 109 /* ThisKeyword */: return `0|${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`; - case 236 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: const left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer); return left && left + "." + node.right.escapedText; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: const propName = getAccessedPropertyName(node); if (propName !== void 0) { const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); return key && key + "." + propName; } break; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: return `${getNodeId(node)}#${getTypeId(declaredType)}`; } return void 0; } function isMatchingReference(source, target) { switch (target.kind) { - case 217 /* ParenthesizedExpression */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: return isMatchingReference(source, target.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression(target) && target.operatorToken.kind === 27 /* CommaToken */ && isMatchingReference(source, target.right); } switch (source.kind) { - case 237 /* MetaProperty */: - return target.kind === 237 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; + case 239 /* MetaProperty */: + return target.kind === 239 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - return isThisInTypeQuery(source) ? target.kind === 109 /* ThisKeyword */ : target.kind === 79 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (target.kind === 261 /* VariableDeclaration */ || target.kind === 208 /* BindingElement */) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target); + return isThisInTypeQuery(source) ? target.kind === 109 /* ThisKeyword */ : target.kind === 79 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (target.kind === 263 /* VariableDeclaration */ || target.kind === 210 /* BindingElement */) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target); case 109 /* ThisKeyword */: return target.kind === 109 /* ThisKeyword */; case 107 /* SuperKeyword */: return target.kind === 107 /* SuperKeyword */; - case 236 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: return isMatchingReference(source.expression, target); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* 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 165 /* QualifiedName */: + case 166 /* QualifiedName */: return isAccessExpression(target) && source.right.escapedText === getAccessedPropertyName(target) && isMatchingReference(source.left, target.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isBinaryExpression(source) && source.operatorToken.kind === 27 /* CommaToken */ && isMatchingReference(source.right, target); } return false; @@ -63935,7 +64111,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getMatchingUnionConstituentForObjectLiteral(unionType, node) { const keyPropertyName = getKeyPropertyName(unionType); - const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 305 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); + const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 308 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); const propType = propNode && getContextFreeTypeOfExpression(propNode.initializer); return propType && getConstituentTypeForKeyType(unionType, propType); } @@ -63950,7 +64126,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - if (expression.expression.kind === 211 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { + if (expression.expression.kind === 213 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { return true; } return false; @@ -64111,11 +64287,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return createArrayType(checkIteratedTypeOrElementType(65 /* Destructuring */, type, undefinedType, void 0) || errorType); } function getAssignedTypeOfBinaryExpression(node) { - const isDestructuringDefaultAssignment = node.parent.kind === 209 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 305 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); + const isDestructuringDefaultAssignment = node.parent.kind === 211 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 308 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent2) { - return parent2.parent.kind === 227 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 251 /* ForOfStatement */ && parent2.parent.initializer === parent2; + return parent2.parent.kind === 229 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 253 /* ForOfStatement */ && parent2.parent.initializer === parent2; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element)); @@ -64132,21 +64308,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getAssignedType(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return stringType; - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return checkRightHandSideOfForOf(parent2) || errorType; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return getAssignedTypeOfBinaryExpression(parent2); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return undefinedType; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return getAssignedTypeOfArrayLiteralElement(parent2, node); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return getAssignedTypeOfSpreadExpression(parent2); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return getAssignedTypeOfPropertyAssignment(parent2); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return getAssignedTypeOfShorthandPropertyAssignment(parent2); } return errorType; @@ -64154,7 +64330,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getInitialTypeOfBindingElement(node) { const pattern = node.parent; const parentType = getInitialType(pattern.parent); - const type = pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); + const type = pattern.kind === 208 /* 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) { @@ -64165,25 +64341,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 250 /* ForInStatement */) { + if (node.parent.parent.kind === 252 /* ForInStatement */) { return stringType; } - if (node.parent.parent.kind === 251 /* ForOfStatement */) { + if (node.parent.parent.kind === 253 /* ForOfStatement */) { return checkRightHandSideOfForOf(node.parent.parent) || errorType; } return errorType; } function getInitialType(node) { - return node.kind === 261 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); + return node.kind === 263 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function isEmptyArrayAssignment(node) { - return node.kind === 261 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 208 /* BindingElement */ && node.parent.kind === 227 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); + return node.kind === 263 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 210 /* BindingElement */ && node.parent.kind === 229 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return getReferenceCandidate(node.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 75 /* BarBarEqualsToken */: @@ -64198,10 +64374,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getReferenceRoot(node) { const { parent: parent2 } = node; - return parent2.kind === 217 /* ParenthesizedExpression */ || parent2.kind === 227 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */ && parent2.left === node || parent2.kind === 227 /* BinaryExpression */ && parent2.operatorToken.kind === 27 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; + return parent2.kind === 219 /* ParenthesizedExpression */ || parent2.kind === 229 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */ && parent2.left === node || parent2.kind === 229 /* BinaryExpression */ && parent2.operatorToken.kind === 27 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 298 /* CaseClause */) { + if (clause.kind === 301 /* CaseClause */) { return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); } return neverType; @@ -64217,12 +64393,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return links.switchTypes; } function getSwitchClauseTypeOfWitnesses(switchStatement) { - if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 298 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { + if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 301 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { return void 0; } const witnesses = []; for (const clause of switchStatement.caseBlock.clauses) { - const text = clause.kind === 298 /* CaseClause */ ? clause.expression.text : void 0; + const text = clause.kind === 301 /* CaseClause */ ? clause.expression.text : void 0; witnesses.push(text && !contains(witnesses, text) ? text : void 0); } return witnesses; @@ -64372,8 +64548,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isEvolvingArrayOperationTarget(node) { const root = getReferenceRoot(node); const parent2 = root.parent; - const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 213 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); - const isElementAssignment = parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 227 /* 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 === 215 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); + const isElementAssignment = parent2.kind === 214 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 229 /* 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) { @@ -64396,7 +64572,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isDeclarationWithExplicitTypeAnnotation(declaration)) { return getTypeOfSymbol(symbol); } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 251 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 253 /* ForOfStatement */) { const statement = declaration.parent.parent; const expressionType = getTypeOfDottedName(statement.expression, void 0); if (expressionType) { @@ -64420,7 +64596,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getExplicitThisType(node); case 107 /* SuperKeyword */: return checkSuperExpression(node); - case 211 /* PropertyAccessExpression */: { + case 213 /* PropertyAccessExpression */: { const type = getTypeOfDottedName(node.expression, diagnostic); if (type) { const name = node.name; @@ -64437,7 +64613,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } return void 0; } - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return getTypeOfDottedName(node.expression, diagnostic); } } @@ -64447,7 +64623,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let signature = links.effectsSignature; if (signature === void 0) { let funcType; - if (node.parent.kind === 245 /* ExpressionStatement */) { + if (node.parent.kind === 247 /* ExpressionStatement */) { funcType = getTypeOfDottedName(node.expression, void 0); } else if (node.expression.kind !== 107 /* SuperKeyword */) { if (isOptionalChain(node)) { @@ -64489,7 +64665,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isFalseExpression(expr) { const node = skipParentheses(expr, true); - return node.kind === 96 /* FalseKeyword */ || node.kind === 227 /* 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 === 229 /* 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) { @@ -64588,8 +64764,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const symbol = getResolvedSymbol(node); return isConstVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); } - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol); } return false; @@ -64609,7 +64785,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 236 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { + if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 238 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { return declaredType; } return resultType === nonNullUnknownType ? unknownType : resultType; @@ -64678,7 +64854,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { target.antecedents = saveAntecedents; } else if (flags & 2 /* Start */) { const container = flow.node; - if (container && container !== flowContainer && reference.kind !== 211 /* PropertyAccessExpression */ && reference.kind !== 212 /* ElementAccessExpression */ && reference.kind !== 109 /* ThisKeyword */) { + if (container && container !== flowContainer && reference.kind !== 213 /* PropertyAccessExpression */ && reference.kind !== 214 /* ElementAccessExpression */ && reference.kind !== 109 /* ThisKeyword */) { flow = container.flowNode; continue; } @@ -64697,7 +64873,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getInitialOrAssignedType(flow) { const node = flow.node; - return getNarrowableTypeForReference(node.kind === 261 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); + return getNarrowableTypeForReference(node.kind === 263 /* VariableDeclaration */ || node.kind === 210 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); } function getTypeAtFlowAssignment(flow) { const node = flow.node; @@ -64727,13 +64903,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConst(node))) { const init = getDeclaredExpandoInitializer(node); - if (init && (init.kind === 218 /* FunctionExpression */ || init.kind === 219 /* ArrowFunction */)) { + if (init && (init.kind === 220 /* FunctionExpression */ || init.kind === 221 /* ArrowFunction */)) { return getTypeAtFlowNode(flow.antecedent); } } return declaredType; } - if (isVariableDeclaration(node) && node.parent.parent.kind === 250 /* ForInStatement */ && isMatchingReference(reference, node.parent.parent.expression)) { + if (isVariableDeclaration(node) && node.parent.parent.kind === 252 /* ForInStatement */ && isMatchingReference(reference, node.parent.parent.expression)) { return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent)))); } return void 0; @@ -64743,7 +64919,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.kind === 96 /* FalseKeyword */) { return unreachableNeverType; } - if (node.kind === 227 /* BinaryExpression */) { + if (node.kind === 229 /* BinaryExpression */) { if (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); } @@ -64772,13 +64948,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getTypeAtFlowArrayMutation(flow) { if (declaredType === autoType || declaredType === autoArrayType) { const node = flow.node; - const expr = node.kind === 213 /* CallExpression */ ? node.expression.expression : node.left.expression; + const expr = node.kind === 215 /* 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 === 213 /* CallExpression */) { + if (node.kind === 215 /* CallExpression */) { for (const arg of node.arguments) { evolvedType2 = addEvolvingArrayElementType(evolvedType2, arg); } @@ -64815,7 +64991,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let type = getTypeFromFlowType(flowType); if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); - } else if (expr.kind === 222 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { + } else if (expr.kind === 224 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else { if (strictNullChecks) { @@ -64827,7 +65003,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { flow.clauseEnd, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)) ); - } else if (expr.kind === 222 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + } else if (expr.kind === 224 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { type = narrowTypeBySwitchOptionalChainContainment( type, flow.switchStatement, @@ -65076,10 +65252,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const operator = expr.operatorToken.kind; const left = getReferenceCandidate(expr.left); const right = getReferenceCandidate(expr.right); - if (left.kind === 222 /* TypeOfExpression */ && isStringLiteralLike(right)) { + if (left.kind === 224 /* TypeOfExpression */ && isStringLiteralLike(right)) { return narrowTypeByTypeof(type, left, operator, right, assumeTrue); } - if (right.kind === 222 /* TypeOfExpression */ && isStringLiteralLike(left)) { + if (right.kind === 224 /* TypeOfExpression */ && isStringLiteralLike(left)) { return narrowTypeByTypeof(type, right, operator, left, assumeTrue); } if (isMatchingReference(reference, left)) { @@ -65277,7 +65453,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!witnesses) { return type; } - const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 299 /* DefaultClause */); + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 302 /* DefaultClause */); const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; if (hasDefaultClause) { const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); @@ -65430,17 +65606,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } case 109 /* ThisKeyword */: case 107 /* SuperKeyword */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return narrowTypeByCallExpression(type, expr, assumeTrue); - case 217 /* ParenthesizedExpression */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: return narrowType(type, expr.expression, assumeTrue); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: if (expr.operator === 53 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } @@ -65478,7 +65654,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getNonMissingTypeOfSymbol(symbol); } function getControlFlowContainer(node) { - return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 271 /* ModuleBlock */ || node2.kind === 314 /* SourceFile */ || node2.kind === 171 /* PropertyDeclaration */ || node2.kind === 172 /* AnnotationPropertyDeclaration */); + return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 274 /* ModuleBlock */ || node2.kind === 317 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */ || node2.kind === 173 /* AnnotationPropertyDeclaration */); } function isSymbolAssigned(symbol) { if (!symbol.valueDeclaration) { @@ -65514,7 +65690,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function removeOptionalityFromDeclaredType(declaredType, declaration) { if (pushTypeResolution(declaration.symbol, 2 /* DeclaredType */)) { - const annotationIncludesUndefined = strictNullChecks && declaration.kind === 168 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !(getTypeFacts(checkExpression(declaration.initializer)) & 16777216 /* IsUndefined */); + const annotationIncludesUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !(getTypeFacts(checkExpression(declaration.initializer)) & 16777216 /* IsUndefined */); popTypeResolution(); return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; } else { @@ -65524,7 +65700,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isConstraintPosition(type, node) { const parent2 = node.parent; - return parent2.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 165 /* QualifiedName */ || parent2.kind === 213 /* CallExpression */ && parent2.expression === node || parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); + return parent2.kind === 213 /* PropertyAccessExpression */ || parent2.kind === 166 /* QualifiedName */ || parent2.kind === 215 /* CallExpression */ && parent2.expression === node || parent2.kind === 214 /* 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 */)); @@ -65572,14 +65748,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (declaration) { if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) { const parent2 = declaration.parent.parent; - if (parent2.kind === 261 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 168 /* Parameter */) { + if (parent2.kind === 263 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 169 /* Parameter */) { const links = getNodeLinks(parent2); if (!(links.flags & 268435456 /* InCheckIdentifier */)) { links.flags |= 268435456 /* InCheckIdentifier */; const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */); const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType); links.flags &= ~268435456 /* InCheckIdentifier */; - if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 168 /* Parameter */ && isSymbolAssigned(symbol))) { + if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 169 /* Parameter */ && isSymbolAssigned(symbol))) { const pattern = declaration.parent; const narrowedType = getFlowTypeOfReference(pattern, parentTypeConstraint, parentTypeConstraint, void 0, location2.flowNode); if (narrowedType.flags & 131072 /* Never */) { @@ -65622,7 +65798,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const container = getContainingFunction(node); if (languageVersion < 2 /* ES2015 */) { - if (container.kind === 219 /* ArrowFunction */) { + if (container.kind === 221 /* 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); @@ -65643,7 +65819,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let declaration = localOrExportSymbol.valueDeclaration; if (declaration && localOrExportSymbol.flags & 32 /* Class */) { - if (declaration.kind === 264 /* ClassDeclaration */ && nodeIsDecorated(declaration)) { + if (declaration.kind === 266 /* ClassDeclaration */ && nodeIsDecorated(declaration)) { let container = getContainingClass(node); while (container !== void 0) { if (container === declaration && container.name !== node) { @@ -65653,9 +65829,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } container = getContainingClass(container); } - } else if (declaration.kind === 232 /* ClassExpression */) { + } else if (declaration.kind === 234 /* ClassExpression */) { let container = getThisContainer(node, false); - while (container.kind !== 314 /* SourceFile */) { + while (container.kind !== 317 /* SourceFile */) { if (container.parent === declaration) { if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) { getNodeLinks(declaration).flags |= 16777216 /* ClassWithConstructorReference */; @@ -65703,16 +65879,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return type; } type = getNarrowableTypeForReference(type, node, checkMode); - const isParameter2 = getRootDeclaration(declaration).kind === 168 /* Parameter */; + const isParameter2 = getRootDeclaration(declaration).kind === 169 /* 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 === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { + while (flowContainer !== declarationContainer && (flowContainer.kind === 220 /* FunctionExpression */ || flowContainer.kind === 221 /* 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) || node.parent.kind === 284 /* ExportSpecifier */) || node.parent.kind === 236 /* NonNullExpression */ || declaration.kind === 261 /* 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) || node.parent.kind === 287 /* ExportSpecifier */) || node.parent.kind === 238 /* NonNullExpression */ || declaration.kind === 263 /* 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)) { @@ -65762,7 +65938,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return findAncestor(node, (n) => !n || nodeStartsNewLexicalEnvironment(n) ? "quit" : isIterationStatement(n, false)); } function checkNestedBlockScopedBinding(node, symbol) { - if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 301 /* CatchClause */) { + if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 304 /* CatchClause */) { return; } const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); @@ -65772,7 +65948,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isCaptured) { let capturesBlockScopeBindingInLoopBody = true; if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 262 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 264 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container) { const part = getPartOfForStatementContainingNode(node.parent, container); if (part) { @@ -65791,7 +65967,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 262 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 264 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) { getNodeLinks(symbol.valueDeclaration).flags |= 4194304 /* NeedsLoopOutParameter */; } @@ -65808,13 +65984,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isAssignedInBodyOfForStatement(node, container) { let current = node; - while (current.parent.kind === 217 /* ParenthesizedExpression */) { + while (current.parent.kind === 219 /* ParenthesizedExpression */) { current = current.parent; } let isAssigned = false; if (isAssignmentTarget(current)) { isAssigned = true; - } else if (current.parent.kind === 225 /* PrefixUnaryExpression */ || current.parent.kind === 226 /* PostfixUnaryExpression */) { + } else if (current.parent.kind === 227 /* PrefixUnaryExpression */ || current.parent.kind === 228 /* PostfixUnaryExpression */) { const expr = current.parent; isAssigned = expr.operator === 45 /* PlusPlusToken */ || expr.operator === 46 /* MinusMinusToken */; } @@ -65825,7 +66001,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 171 /* PropertyDeclaration */ || container.kind === 176 /* Constructor */) { + if (container.kind === 172 /* PropertyDeclaration */ || container.kind === 178 /* Constructor */) { const classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } else { @@ -65859,27 +66035,27 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const isNodeInTypeQuery = isInTypeQuery(node); let container = getThisContainer(node, true); let capturedByArrowFunction = false; - if (container.kind === 176 /* Constructor */) { + if (container.kind === 178 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } - if (container.kind === 219 /* ArrowFunction */) { + if (container.kind === 221 /* ArrowFunction */) { container = getThisContainer(container, false); capturedByArrowFunction = true; } checkThisInStaticClassFieldInitializerInDecoratedClass(node, container); switch (container.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 176 /* Constructor */: + case 178 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } break; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: error(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); break; } @@ -65953,13 +66129,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getClassNameFromPrototypeMethod(container) { - if (container.kind === 218 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { + if (container.kind === 220 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { return container.parent.left.expression.expression; - } else if (container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 176 /* MethodDeclaration */ && container.parent.kind === 212 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { return container.parent.parent.left.expression; - } else if (container.kind === 218 /* FunctionExpression */ && container.parent.kind === 305 /* PropertyAssignment */ && container.parent.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 220 /* FunctionExpression */ && container.parent.kind === 308 /* PropertyAssignment */ && container.parent.parent.kind === 212 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { return container.parent.parent.parent.left.expression; - } else if (container.kind === 218 /* 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 === 220 /* 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; @@ -65967,7 +66143,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTypeForThisExpressionFromJSDoc(node) { const jsdocType = getJSDocType(node); - if (jsdocType && jsdocType.kind === 326 /* JSDocFunctionType */) { + if (jsdocType && jsdocType.kind === 329 /* 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); @@ -65979,16 +66155,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 168 /* Parameter */ && n.parent === constructorDecl); + return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 169 /* Parameter */ && n.parent === constructorDecl); } function checkSuperExpression(node) { - const isCallExpression2 = node.parent.kind === 213 /* CallExpression */ && node.parent.expression === node; + const isCallExpression2 = node.parent.kind === 215 /* CallExpression */ && node.parent.expression === node; const immediateContainer = getSuperContainer(node, true); let container = immediateContainer; let needToCaptureLexicalThis = false; let inAsyncFunction = false; if (!isCallExpression2) { - while (container && container.kind === 219 /* ArrowFunction */) { + while (container && container.kind === 221 /* ArrowFunction */) { if (hasSyntacticModifier(container, 512 /* Async */)) inAsyncFunction = true; container = getSuperContainer(container, true); @@ -66000,19 +66176,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const canUseSuperExpression = isLegalUsageOfSuperExpression(container); let nodeCheckFlag = 0; if (!canUseSuperExpression) { - const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 166 /* ComputedPropertyName */); - if (current && current.kind === 166 /* ComputedPropertyName */) { + const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 167 /* ComputedPropertyName */); + if (current && current.kind === 167 /* 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 === 210 /* ObjectLiteralExpression */)) { + } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 212 /* 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 === 176 /* Constructor */) { + if (!isCallExpression2 && immediateContainer.kind === 178 /* 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) { @@ -66028,7 +66204,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { nodeCheckFlag = 256 /* SuperInstance */; } getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 174 /* MethodDeclaration */ && inAsyncFunction) { + if (container.kind === 176 /* MethodDeclaration */ && inAsyncFunction) { if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 4096 /* MethodWithSuperPropertyAssignmentInAsync */; } else { @@ -66038,7 +66214,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 210 /* ObjectLiteralExpression */) { + if (container.parent.kind === 212 /* 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; @@ -66056,7 +66232,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!baseClassType) { return errorType; } - if (container.kind === 176 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 178 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return errorType; } @@ -66066,13 +66242,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } if (isCallExpression2) { - return container2.kind === 176 /* Constructor */; + return container2.kind === 178 /* Constructor */; } else { - if (isClassLike(container2.parent) || container2.parent.kind === 210 /* ObjectLiteralExpression */) { + if (isClassLike(container2.parent) || container2.parent.kind === 212 /* ObjectLiteralExpression */) { if (isStatic(container2)) { - return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 171 /* PropertyDeclaration */ || container2.kind === 175 /* ClassStaticBlockDeclaration */; + return container2.kind === 176 /* MethodDeclaration */ || container2.kind === 175 /* MethodSignature */ || container2.kind === 179 /* GetAccessor */ || container2.kind === 180 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 177 /* ClassStaticBlockDeclaration */; } else { - return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 171 /* PropertyDeclaration */ || container2.kind === 170 /* PropertySignature */ || container2.kind === 176 /* Constructor */; + return container2.kind === 176 /* MethodDeclaration */ || container2.kind === 175 /* MethodSignature */ || container2.kind === 179 /* GetAccessor */ || container2.kind === 180 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 171 /* PropertySignature */ || container2.kind === 178 /* Constructor */; } } } @@ -66080,7 +66256,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getContainingObjectLiteral(func) { - return (func.kind === 174 /* MethodDeclaration */ || func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) && func.parent.kind === 210 /* ObjectLiteralExpression */ ? func.parent : func.kind === 218 /* FunctionExpression */ && func.parent.kind === 305 /* PropertyAssignment */ ? func.parent.parent : void 0; + return (func.kind === 176 /* MethodDeclaration */ || func.kind === 179 /* GetAccessor */ || func.kind === 180 /* SetAccessor */) && func.parent.kind === 212 /* ObjectLiteralExpression */ ? func.parent : func.kind === 220 /* FunctionExpression */ && func.parent.kind === 308 /* PropertyAssignment */ ? func.parent.parent : void 0; } function getThisTypeArgument(type) { return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? getTypeArguments(type)[0] : void 0; @@ -66091,7 +66267,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }); } function getContextualThisParameterType(func) { - if (func.kind === 219 /* ArrowFunction */) { + if (func.kind === 221 /* ArrowFunction */) { return void 0; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -66115,7 +66291,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (thisType) { return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); } - if (literal.parent.kind !== 305 /* PropertyAssignment */) { + if (literal.parent.kind !== 308 /* PropertyAssignment */) { break; } literal = literal.parent.parent; @@ -66124,7 +66300,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getWidenedType(contextualType ? getNonNullableType3(contextualType) : checkExpressionCached(containingLiteral)); } const parent2 = walkUpParenthesizedExpressions(func.parent); - if (parent2.kind === 227 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */) { + if (parent2.kind === 229 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */) { const target = parent2.left; if (isAccessExpression(target)) { const { expression } = target; @@ -66171,11 +66347,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getTypeFromTypeNode(typeNode); } switch (declaration.kind) { - case 168 /* Parameter */: + case 169 /* Parameter */: return getContextuallyTypedParameterType(declaration); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return getContextualTypeForBindingElement(declaration, contextFlags); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (isStatic(declaration)) { return getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags); } @@ -66184,10 +66360,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getContextualTypeForBindingElement(declaration, contextFlags) { const parent2 = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 208 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); + const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 210 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0; - if (parent2.name.kind === 207 /* ArrayBindingPattern */) { + if (parent2.name.kind === 209 /* ArrayBindingPattern */) { const index = indexOfNode(declaration.parent.elements, declaration); if (index < 0) return void 0; @@ -66320,7 +66496,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return signatureHasRestParameter(signature) && argIndex >= restIndex ? getIndexedAccessType(getTypeOfSymbol(signature.parameters[restIndex]), getNumberLiteralType(argIndex - restIndex), 256 /* Contextual */) : getTypeAtPosition(signature, argIndex); } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 215 /* TaggedTemplateExpression */) { + if (template.parent.kind === 217 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return void 0; @@ -66579,10 +66755,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: case 157 /* UndefinedKeyword */: return true; - case 211 /* PropertyAccessExpression */: - case 217 /* ParenthesizedExpression */: + case 213 /* PropertyAccessExpression */: + case 219 /* ParenthesizedExpression */: return isPossiblyDiscriminantValue(node.expression); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return !node.expression || isPossiblyDiscriminantValue(node.expression); } return false; @@ -66592,7 +66768,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 305 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), + filter(node.properties, (p) => !!p.symbol && p.kind === 308 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), (prop) => [() => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -66612,7 +66788,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 294 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), + filter(node.properties, (p) => !!p.symbol && p.kind === 297 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), (prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -66669,63 +66845,63 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const { parent: parent2 } = node; switch (parent2.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 208 /* BindingElement */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 210 /* BindingElement */: return getContextualTypeForInitializerExpression(node, contextFlags); - case 219 /* ArrowFunction */: - case 254 /* ReturnStatement */: + case 221 /* ArrowFunction */: + case 256 /* ReturnStatement */: return getContextualTypeForReturnExpression(node, contextFlags); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return getContextualTypeForYieldOperand(parent2, contextFlags); - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return getContextualTypeForAwaitOperand(parent2, contextFlags); - case 213 /* CallExpression */: - case 220 /* EtsComponentExpression */: + case 215 /* CallExpression */: + case 222 /* EtsComponentExpression */: if (isInEtsFile(parent2) && parent2.expression.kind === 101 /* ImportKeyword */) { return stringType; } - case 214 /* NewExpression */: + case 216 /* NewExpression */: return getContextualTypeForArgument(parent2, node); - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: return isConstTypeReference(parent2.type) ? tryFindWhenConstTypeReference(parent2) : getTypeFromTypeNode(parent2.type); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node, contextFlags); - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent2, contextFlags); - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: return getContextualType2(parent2.parent, contextFlags); - case 209 /* ArrayLiteralExpression */: { + case 211 /* ArrayLiteralExpression */: { const arrayLiteral = parent2; const type = getApparentTypeOfContextualType(arrayLiteral, contextFlags); return getContextualTypeForElementExpression(type, indexOfNode(arrayLiteral.elements, node)); } - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node, contextFlags); - case 240 /* TemplateSpan */: - Debug.assert(parent2.parent.kind === 229 /* TemplateExpression */); + case 242 /* TemplateSpan */: + Debug.assert(parent2.parent.kind === 231 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent2.parent, node); - case 217 /* ParenthesizedExpression */: { + case 219 /* ParenthesizedExpression */: { const tag = isInJSFile(parent2) ? getJSDocTypeTag(parent2) : void 0; return !tag ? getContextualType2(parent2, contextFlags) : isJSDocTypeTag(tag) && isConstTypeReference(tag.typeExpression.type) ? tryFindWhenConstTypeReference(parent2) : getTypeFromTypeNode(tag.typeExpression.type); } - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return getContextualType2(parent2, contextFlags); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return getTypeFromTypeNode(parent2.type); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return tryGetTypeFromEffectiveTypeNode(parent2); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return getContextualTypeForJsxExpression(parent2, contextFlags); - case 294 /* JsxAttribute */: - case 296 /* JsxSpreadAttribute */: + case 297 /* JsxAttribute */: + case 299 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent2, contextFlags); - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return getContextualJsxElementAttributesType(parent2, contextFlags); } return void 0; @@ -66947,7 +67123,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return isFunctionExpressionOrArrowFunction(node) || isObjectLiteralMethod(node) ? getContextualSignature(node) : void 0; } function getContextualSignature(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 176 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const typeTagSignature = getSignatureOfTypeTag(node); if (typeTagSignature) { return typeTagSignature; @@ -66988,7 +67164,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return node.isSpread ? getIndexedAccessType(node.type, numberType) : node.type; } function hasDefaultValue(node) { - return node.kind === 208 /* BindingElement */ && !!node.initializer || node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */; + return node.kind === 210 /* BindingElement */ && !!node.initializer || node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */; } function checkArrayLiteral(node, checkMode, forceTuple) { const elements = node.elements; @@ -67001,7 +67177,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let hasOmittedExpression = false; for (let i = 0; i < elementCount; i++) { const e = elements[i]; - if (e.kind === 231 /* SpreadElement */) { + if (e.kind === 233 /* SpreadElement */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */); } @@ -67017,7 +67193,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { elementTypes.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, e.expression)); elementFlags.push(4 /* Rest */); } - } else if (exactOptionalPropertyTypes && e.kind === 233 /* OmittedExpression */) { + } else if (exactOptionalPropertyTypes && e.kind === 235 /* OmittedExpression */) { hasOmittedExpression = true; elementTypes.push(missingType); elementFlags.push(2 /* Optional */); @@ -67054,7 +67230,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isNumericName(name) { switch (name.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return isNumericComputedName(name); case 79 /* Identifier */: return isNumericLiteralName(name.escapedText); @@ -67071,7 +67247,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 102 /* InKeyword */ && node.parent.kind !== 177 /* GetAccessor */ && node.parent.kind !== 178 /* 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 !== 179 /* GetAccessor */ && node.parent.kind !== 180 /* SetAccessor */) { return links.resolvedType = errorType; } links.resolvedType = checkExpression(node.expression); @@ -67130,7 +67306,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let propertiesArray = []; let spread = emptyObjectType; const contextualType = getApparentTypeOfContextualType(node, void 0); - const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 206 /* ObjectBindingPattern */ || contextualType.pattern.kind === 210 /* ObjectLiteralExpression */); + const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 208 /* ObjectBindingPattern */ || contextualType.pattern.kind === 212 /* ObjectLiteralExpression */); const inConstContext = isConstContext(node); const checkFlags = inConstContext ? 8 /* Readonly */ : 0; const isInJavascript = isInJSFile(node) && !isInJsonFile(node); @@ -67149,9 +67325,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let offset = 0; for (const memberDecl of node.properties) { let member = getSymbolOfNode(memberDecl); - const computedNameType = memberDecl.name && memberDecl.name.kind === 166 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; - if (memberDecl.kind === 305 /* PropertyAssignment */ || memberDecl.kind === 306 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { - let type = memberDecl.kind === 305 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : memberDecl.kind === 306 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode); + const computedNameType = memberDecl.name && memberDecl.name.kind === 167 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; + if (memberDecl.kind === 308 /* PropertyAssignment */ || memberDecl.kind === 309 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { + let type = memberDecl.kind === 308 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : memberDecl.kind === 309 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode); if (isInJavascript) { const jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl); if (jsDocType) { @@ -67168,7 +67344,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { prop.nameType = nameType; } if (inDestructuringPattern) { - const isOptional = memberDecl.kind === 305 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 306 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; + const isOptional = memberDecl.kind === 308 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 309 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; if (isOptional) { prop.flags |= 16777216 /* Optional */; } @@ -67194,16 +67370,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { prop.target = member; member = prop; allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop); - if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 305 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { + if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 308 /* PropertyAssignment */ || memberDecl.kind === 176 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { const inferenceContext = getInferenceContext(node); Debug.assert(inferenceContext); - const inferenceNode = memberDecl.kind === 305 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; + const inferenceNode = memberDecl.kind === 308 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; addIntraExpressionInferenceSite(inferenceContext, inferenceNode, type); } if (type.symbol && type.symbol.flags & 268435456 /* Annotation */) { error(memberDecl, Diagnostics.Annotation_cannot_be_used_as_a_value); } - } else if (memberDecl.kind === 307 /* SpreadAssignment */) { + } else if (memberDecl.kind === 310 /* SpreadAssignment */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(memberDecl, 2 /* Assign */); } @@ -67232,7 +67408,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } continue; } else { - Debug.assert(memberDecl.kind === 177 /* GetAccessor */ || memberDecl.kind === 178 /* SetAccessor */); + Debug.assert(memberDecl.kind === 179 /* GetAccessor */ || memberDecl.kind === 180 /* SetAccessor */); checkNodeDeferred(memberDecl); } if (computedNameType && !(computedNameType.flags & 8576 /* StringOrNumberLiteralOrUnique */)) { @@ -67256,13 +67432,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (contextualTypeHasPattern) { const rootPatternParent = findAncestor( contextualType.pattern.parent, - (n) => n.kind === 261 /* VariableDeclaration */ || n.kind === 227 /* BinaryExpression */ || n.kind === 168 /* Parameter */ + (n) => n.kind === 263 /* VariableDeclaration */ || n.kind === 229 /* BinaryExpression */ || n.kind === 169 /* Parameter */ ); const spreadOrOutsideRootObject = findAncestor( node, - (n) => n === rootPatternParent || n.kind === 307 /* SpreadAssignment */ + (n) => n === rootPatternParent || n.kind === 310 /* SpreadAssignment */ ); - if (spreadOrOutsideRootObject.kind !== 307 /* SpreadAssignment */) { + if (spreadOrOutsideRootObject.kind !== 310 /* SpreadAssignment */) { for (const prop of getPropertiesOfType(contextualType)) { if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { @@ -67391,7 +67567,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } else { - Debug.assert(attributeDecl.kind === 296 /* JsxSpreadAttribute */); + Debug.assert(attributeDecl.kind === 299 /* JsxSpreadAttribute */); if (attributesTable.size > 0) { spread = getSpreadType(spread, createJsxAttributesType(), attributes.symbol, objectFlags, false); attributesTable = createSymbolTable(); @@ -67416,7 +67592,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { spread = getSpreadType(spread, createJsxAttributesType(), attributes.symbol, objectFlags, false); } } - const parent2 = openingLikeElement.parent.kind === 287 /* JsxElement */ ? openingLikeElement.parent : void 0; + const parent2 = openingLikeElement.parent.kind === 290 /* JsxElement */ ? openingLikeElement.parent : void 0; if (parent2 && parent2.openingElement === openingLikeElement && parent2.children.length > 0) { const childrenTypes = checkJsxChildren(parent2, checkMode); if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { @@ -67462,7 +67638,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!child.containsOnlyTriviaWhiteSpaces) { childrenTypes.push(stringType); } - } else if (child.kind === 297 /* JsxExpression */ && !child.expression) { + } else if (child.kind === 300 /* JsxExpression */ && !child.expression) { continue; } else { childrenTypes.push(checkExpressionForMutableLocation(child, checkMode)); @@ -67779,7 +67955,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError = true) { - const errorNode = !reportError ? void 0 : node.kind === 165 /* QualifiedName */ ? node.right : node.kind === 205 /* ImportType */ ? node : node.kind === 208 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; + const errorNode = !reportError ? void 0 : node.kind === 166 /* QualifiedName */ ? node.right : node.kind === 207 /* ImportType */ ? node : node.kind === 210 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); } function checkPropertyAccessibilityAtLocation(location2, isSuper, writing, containingType, prop, errorNode) { @@ -67992,7 +68168,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return checkPropertyAccessExpressionOrQualifiedName(node, node.left, leftType, node.right, checkMode); } function isMethodAccessForCall(node) { - while (node.parent.kind === 217 /* ParenthesizedExpression */) { + while (node.parent.kind === 219 /* ParenthesizedExpression */) { node = node.parent; } return isCallOrNewExpression(node.parent) && node.parent.expression === node; @@ -68147,7 +68323,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } return isErrorType(apparentType) ? errorType : apparentType; } - prop = getPropertyOfType(apparentType, right.escapedText, false, node.kind === 165 /* QualifiedName */); + prop = getPropertyOfType(apparentType, right.escapedText, false, node.kind === 166 /* QualifiedName */); if (!prop) { const etsComponentExpressionNode = getEtsComponentExpressionInnerCallExpressionNode(node) || getRootEtsComponentInnerCallExpressionNode(node); const locals = getSourceFileOfNode(node).locals; @@ -68172,7 +68348,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - if (isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 308 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { + if (isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 311 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { markAliasReferenced(parentSymbol, node); } let propType; @@ -68270,7 +68446,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (declaration && isPropertyWithoutInitializer(declaration)) { if (!isStatic(declaration)) { const flowContainer = getControlFlowContainer(node); - if (flowContainer.kind === 176 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { + if (flowContainer.kind === 178 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { assumeUninitialized = true; } } @@ -68314,7 +68490,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!needInitialization && !(hasRequireDecorator && checkStructPropertyPosition(valueDeclaration, node))) { diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); } - } else if (valueDeclaration.kind === 264 /* ClassDeclaration */ && node.parent.kind !== 183 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { + } else if (valueDeclaration.kind === 266 /* ClassDeclaration */ && node.parent.kind !== 185 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { diagnosticMessage = error(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { @@ -68327,25 +68503,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isInPropertyInitializerOrClassStaticBlock(node) { return !!findAncestor(node, (node2) => { switch (node2.kind) { - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return true; - case 305 /* PropertyAssignment */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 307 /* SpreadAssignment */: - case 166 /* ComputedPropertyName */: - case 240 /* TemplateSpan */: - case 297 /* JsxExpression */: - case 294 /* JsxAttribute */: - case 295 /* JsxAttributes */: - case 296 /* JsxSpreadAttribute */: - case 289 /* JsxOpeningElement */: - case 234 /* ExpressionWithTypeArguments */: - case 300 /* HeritageClause */: + case 308 /* PropertyAssignment */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 310 /* SpreadAssignment */: + case 167 /* ComputedPropertyName */: + case 242 /* TemplateSpan */: + case 300 /* JsxExpression */: + case 297 /* JsxAttribute */: + case 298 /* JsxAttributes */: + case 299 /* JsxSpreadAttribute */: + case 292 /* JsxOpeningElement */: + case 236 /* ExpressionWithTypeArguments */: + case 303 /* HeritageClause */: return false; - case 219 /* ArrowFunction */: - case 245 /* ExpressionStatement */: + case 221 /* ArrowFunction */: + case 247 /* ExpressionStatement */: return isBlock(node2.parent) && isClassStaticBlockDeclaration(node2.parent.parent) ? true : "quit"; default: return isExpressionNode(node2) ? false : "quit"; @@ -68580,18 +68756,18 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isValidPropertyAccess(node, propertyName) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return isValidPropertyAccessWithType(node, node.expression.kind === 107 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return isValidPropertyAccessWithType(node, false, propertyName, getWidenedType(checkExpression(node.left))); - case 205 /* ImportType */: + case 207 /* ImportType */: return isValidPropertyAccessWithType(node, false, propertyName, getTypeFromTypeNode(node)); } } function isValidPropertyAccessForCompletions(node, type, property) { return isPropertyAccessible( node, - node.kind === 211 /* PropertyAccessExpression */ && node.expression.kind === 107 /* SuperKeyword */, + node.kind === 213 /* PropertyAccessExpression */ && node.expression.kind === 107 /* SuperKeyword */, false, type, property @@ -68616,7 +68792,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getForInVariableSymbol(node) { const initializer = node.initializer; - if (initializer.kind === 262 /* VariableDeclarationList */) { + if (initializer.kind === 264 /* VariableDeclarationList */) { const variable = initializer.declarations[0]; if (variable && !isBindingPattern(variable.name)) { return getSymbolOfNode(variable); @@ -68637,7 +68813,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let child = expr; let node = expr.parent; while (node) { - if (node.kind === 250 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { + if (node.kind === 252 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { return true; } child = node; @@ -68681,11 +68857,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (callLikeExpressionMayHaveTypeArguments(node)) { forEach(node.typeArguments, checkSourceElement); } - if (node.kind === 215 /* TaggedTemplateExpression */) { + if (node.kind === 217 /* TaggedTemplateExpression */) { checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); - } else if (node.kind !== 169 /* Decorator */) { + } else if (node.kind !== 170 /* Decorator */) { forEach(node.arguments, (argument) => { checkExpression(argument); }); @@ -68730,7 +68906,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function isSpreadArgument(arg) { - return !!arg && (arg.kind === 231 /* SpreadElement */ || arg.kind === 238 /* SyntheticExpression */ && arg.isSpread); + return !!arg && (arg.kind === 233 /* SpreadElement */ || arg.kind === 240 /* SyntheticExpression */ && arg.isSpread); } function getSpreadArgumentIndex(args) { return findIndex(args, isSpreadArgument); @@ -68746,9 +68922,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let callIsIncomplete = false; let effectiveParameterCount = getParameterCount(signature); let effectiveMinimumArguments = getMinArgumentCount(signature); - if (node.kind === 215 /* TaggedTemplateExpression */) { + if (node.kind === 217 /* TaggedTemplateExpression */) { argCount = args.length; - if (node.template.kind === 229 /* TemplateExpression */) { + if (node.template.kind === 231 /* TemplateExpression */) { const lastSpan = last(node.template.templateSpans); callIsIncomplete = nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated; } else { @@ -68756,7 +68932,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { Debug.assert(templateLiteral.kind === 14 /* NoSubstitutionTemplateLiteral */); callIsIncomplete = !!templateLiteral.isUnterminated; } - } else if (node.kind === 169 /* Decorator */) { + } else if (node.kind === 170 /* Decorator */) { argCount = getDecoratorArgumentCount(node, signature); } else if (isJsxOpeningLikeElement(node)) { callIsIncomplete = node.attributes.end === node.end; @@ -68767,7 +68943,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { effectiveParameterCount = args.length === 0 ? effectiveParameterCount : 1; effectiveMinimumArguments = Math.min(effectiveMinimumArguments, 1); } else if (!node.arguments) { - Debug.assert(node.kind === 214 /* NewExpression */); + Debug.assert(node.kind === 216 /* NewExpression */); return getMinArgumentCount(signature) === 0; } else { argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -68848,7 +69024,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isJsxOpeningLikeElement(node)) { return inferJsxTypeArguments(node, signature, checkMode, context); } - if (node.kind !== 169 /* Decorator */) { + if (node.kind !== 170 /* Decorator */) { const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); const contextualType = getContextualType2(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); if (contextualType) { @@ -68885,7 +69061,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 233 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { + if (arg.kind !== 235 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { const paramType = getTypeAtPosition(signature, i); if (couldContainTypeVariables(paramType)) { const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode); @@ -68906,7 +69082,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (index >= argCount - 1) { const arg = args[argCount - 1]; if (isSpreadArgument(arg)) { - return getMutableArrayOrTupleType(arg.kind === 238 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode)); + return getMutableArrayOrTupleType(arg.kind === 240 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode)); } } const types = []; @@ -68915,12 +69091,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { for (let i = index; i < argCount; i++) { const arg = args[i]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 238 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); + const spreadType = arg.kind === 240 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); if (isArrayLikeType2(spreadType)) { types.push(spreadType); flags.push(8 /* Variadic */); } else { - types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 231 /* SpreadElement */ ? arg.expression : arg)); + types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 233 /* SpreadElement */ ? arg.expression : arg)); flags.push(4 /* Rest */); } } else { @@ -68930,7 +69106,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType)); flags.push(1 /* Required */); } - if (arg.kind === 238 /* SyntheticExpression */ && arg.tupleNameSource) { + if (arg.kind === 240 /* SyntheticExpression */ && arg.tupleNameSource) { names.push(arg.tupleNameSource); } } @@ -69073,7 +69249,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return void 0; } const thisType = getThisTypeOfSignature(signature); - if (thisType && thisType !== voidType && node.kind !== 214 /* NewExpression */) { + if (thisType && thisType !== voidType && node.kind !== 216 /* NewExpression */) { const thisArgumentNode = getThisArgumentOfCall(node); const thisArgumentType = getThisArgumentType(thisArgumentNode); const errorNode = reportErrors2 ? thisArgumentNode || node : void 0; @@ -69088,7 +69264,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 233 /* OmittedExpression */) { + if (arg.kind !== 235 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); const argType = checkExpressionWithContextualType(arg, paramType, void 0, checkMode); const checkArgType = checkMode & 4 /* SkipContextSensitive */ ? getRegularTypeOfObjectLiteral(argType) : argType; @@ -69123,7 +69299,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getThisArgumentOfCall(node) { - const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : void 0; + const expression = node.kind === 215 /* CallExpression */ ? node.expression : node.kind === 217 /* TaggedTemplateExpression */ ? node.tag : void 0; if (expression) { const callee = skipOuterExpressions(expression); if (isAccessExpression(callee)) { @@ -69138,17 +69314,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return result; } function getEffectiveCallArguments(node) { - if (node.kind === 215 /* TaggedTemplateExpression */) { + if (node.kind === 217 /* TaggedTemplateExpression */) { const template = node.template; const args2 = [createSyntheticExpression(template, getGlobalTemplateStringsArrayType())]; - if (template.kind === 229 /* TemplateExpression */) { + if (template.kind === 231 /* TemplateExpression */) { forEach(template.templateSpans, (span) => { args2.push(span.expression); }); } return args2; } - if (node.kind === 169 /* Decorator */) { + if (node.kind === 170 /* Decorator */) { return getEffectiveDecoratorArguments(node); } if (isJsxOpeningLikeElement(node)) { @@ -69160,7 +69336,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const effectiveArgs = args.slice(0, spreadIndex); for (let i = spreadIndex; i < args.length; i++) { const arg = args[i]; - const spreadType = arg.kind === 231 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); + const spreadType = arg.kind === 233 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); if (spreadType && isTupleType(spreadType)) { forEach(getTypeArguments(spreadType), (t, i2) => { var _a2; @@ -69185,30 +69361,30 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const parent2 = node.parent; const expr = node.expression; switch (parent2.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: return [ createSyntheticExpression(expr, getTypeOfSymbol(getSymbolOfNode(parent2))) ]; - case 168 /* Parameter */: + case 169 /* Parameter */: const func = parent2.parent; return [ - createSyntheticExpression(expr, parent2.parent.kind === 176 /* Constructor */ ? getTypeOfSymbol(getSymbolOfNode(func)) : errorType), + createSyntheticExpression(expr, parent2.parent.kind === 178 /* Constructor */ ? getTypeOfSymbol(getSymbolOfNode(func)) : errorType), createSyntheticExpression(expr, anyType), createSyntheticExpression(expr, numberType) ]; - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: const hasPropDesc = languageVersion !== 0 /* ES3 */ && (!isPropertyDeclaration(parent2) || hasAccessorModifier(parent2)); return [ createSyntheticExpression(expr, getParentTypeOfClassElement(parent2)), createSyntheticExpression(expr, getClassElementPropertyKeyType(parent2)), createSyntheticExpression(expr, hasPropDesc ? createTypedPropertyDescriptorType(getTypeOfNode(parent2)) : anyType) ]; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: if (isEtsFunctionDecorators(getNameOfDecorator(node), compilerOptions)) { const symbol = getSymbolOfNode(expr); return symbol ? [ @@ -69221,19 +69397,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getDecoratorArgumentCount(node, signature) { switch (node.parent.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: return 1; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return hasAccessorModifier(node.parent) ? 3 : 2; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return languageVersion === 0 /* ES3 */ || signature.parameters.length <= 2 ? 2 : 3; - case 168 /* Parameter */: + case 169 /* Parameter */: return 3; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: if (isEtsFunctionDecorators(getNameOfDecorator(node), compilerOptions)) { return isCallExpression(node.expression) ? 1 : 0; } @@ -69360,10 +69536,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, fallbackError) { - const isTaggedTemplate = node.kind === 215 /* TaggedTemplateExpression */; - const isDecorator2 = node.kind === 169 /* Decorator */; + const isTaggedTemplate = node.kind === 217 /* TaggedTemplateExpression */; + const isDecorator2 = node.kind === 170 /* Decorator */; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); - const isEtsComponentExpression2 = node.kind === 220 /* EtsComponentExpression */; + const isEtsComponentExpression2 = node.kind === 222 /* EtsComponentExpression */; const reportErrors2 = !candidatesOutArray; let typeArguments; let virtual; @@ -69393,7 +69569,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let candidateForArgumentArityError; let candidateForTypeArgumentError; let result; - const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 213 /* CallExpression */ && node.arguments.hasTrailingComma; + const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 215 /* CallExpression */ && node.arguments.hasTrailingComma; if (candidates.length > 1) { result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma); } @@ -69843,7 +70019,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const declaration = signature.declaration; const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */); - if (!modifiers || declaration.kind !== 176 /* Constructor */) { + if (!modifiers || declaration.kind !== 178 /* Constructor */) { return true; } const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(declaration.parent.symbol); @@ -69985,19 +70161,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 168 /* Parameter */: + case 169 /* Parameter */: return Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: const decoratorName = getNameOfDecorator(node); if (isEtsFunctionDecorators(decoratorName, compilerOptions)) { return Diagnostics.Unable_to_resolve_signature_of_function_decorator_when_decorators_are_not_valid; @@ -70157,20 +70333,20 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function resolveSignature(node, candidatesOutArray, checkMode) { switch (node.kind) { - case 213 /* CallExpression */: - case 220 /* EtsComponentExpression */: + case 215 /* CallExpression */: + case 222 /* EtsComponentExpression */: return resolveCallExpression(node, candidatesOutArray, checkMode); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return resolveNewExpression(node, candidatesOutArray, checkMode); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode); - case 169 /* Decorator */: + case 170 /* Decorator */: if (isAnnotation(node)) { return resolveAnnotation(node); } return resolveDecorator(node, candidatesOutArray, checkMode); - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); } } @@ -70275,7 +70451,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } let parent2 = node.parent; - while (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) { + while (parent2 && parent2.kind === 213 /* PropertyAccessExpression */) { parent2 = parent2.parent; } if (parent2 && isBinaryExpression(parent2) && isPrototypeAccess(parent2.left) && parent2.operatorToken.kind === 63 /* EqualsToken */) { @@ -70294,9 +70470,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.expression.kind === 107 /* SuperKeyword */) { return voidType; } - if (node.kind === 214 /* NewExpression */) { + if (node.kind === 216 /* NewExpression */) { const declaration = signature.declaration; - if (declaration && declaration.kind !== 176 /* Constructor */ && declaration.kind !== 180 /* ConstructSignature */ && declaration.kind !== 185 /* ConstructorType */ && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { + if (declaration && declaration.kind !== 178 /* Constructor */ && declaration.kind !== 182 /* ConstructSignature */ && declaration.kind !== 187 /* ConstructorType */ && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { if (noImplicitAny) { error(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } @@ -70310,7 +70486,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (returnType.flags & 12288 /* ESSymbolLike */ && isSymbolOrSymbolForCall(node)) { return getESSymbolLikeTypeForNode(walkUpParenthesizedExpressions(node.parent)); } - if (node.kind === 213 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 245 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { + if (node.kind === 215 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 247 /* 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)) { @@ -70330,7 +70506,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(node.expression, Diagnostics.UI_component_0_cannot_be_used_in_this_place, diagnosticName(node.expression)); } const signatureDeclaration = signature.declaration; - if (node.kind === 213 /* CallExpression */ && signatureDeclaration && !isJSDocSignature(signatureDeclaration) && (isMethodDeclaration(signatureDeclaration) || isMethodSignature(signatureDeclaration) || isFunctionDeclaration(signatureDeclaration))) { + if (node.kind === 215 /* CallExpression */ && signatureDeclaration && !isJSDocSignature(signatureDeclaration) && (isMethodDeclaration(signatureDeclaration) || isMethodSignature(signatureDeclaration) || isFunctionDeclaration(signatureDeclaration))) { if (shouldCheckThrows(signatureDeclaration) && !hasAsyncErrorCallbacks(signatureDeclaration)) { checkThrowableFunction(node); } @@ -70670,20 +70846,20 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getDeprecatedSuggestionNode(node) { node = skipParentheses(node); switch (node.kind) { - case 213 /* CallExpression */: - case 169 /* Decorator */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 170 /* Decorator */: + case 216 /* NewExpression */: return getDeprecatedSuggestionNode(node.expression); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return getDeprecatedSuggestionNode(node.tag); - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return getDeprecatedSuggestionNode(node.tagName); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return node.argumentExpression; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return node.name; - case 183 /* TypeReference */: + case 185 /* TypeReference */: const typeReference = node; return isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference; default: @@ -70792,7 +70968,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (resolvedRequire.flags & 2097152 /* Alias */) { return false; } - const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 263 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 261 /* VariableDeclaration */ : 0 /* Unknown */; + const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 265 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 263 /* VariableDeclaration */ : 0 /* Unknown */; if (targetDeclarationKind !== 0 /* Unknown */) { const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind); return !!decl && !!(decl.flags & 16777216 /* Ambient */); @@ -70810,7 +70986,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getReturnTypeOfSignature(signature); } function checkAssertion(node) { - if (node.kind === 216 /* TypeAssertionExpression */) { + if (node.kind === 218 /* 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); @@ -70826,18 +71002,18 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 9 /* BigIntLiteral */: case 111 /* TrueKeyword */: case 96 /* FalseKeyword */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 229 /* TemplateExpression */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 231 /* TemplateExpression */: return true; - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return isValidConstAssertionArgument(node.expression); - case 225 /* PrefixUnaryExpression */: + case 227 /* 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 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: const expr = node.expression; let symbol = getTypeOfNode(expr).symbol; if (symbol && symbol.flags & 2097152 /* Alias */) { @@ -70883,7 +71059,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkExpressionWithTypeArguments(node) { checkGrammarExpressionWithTypeArguments(node); - const exprType = node.kind === 234 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); + const exprType = node.kind === 236 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); const typeArguments = node.typeArguments; if (exprType === silentNeverType || isErrorType(exprType) || !some(typeArguments)) { return exprType; @@ -70978,7 +71154,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 176 /* Constructor */) { + } else if (container.kind === 178 /* Constructor */) { const symbol = getSymbolOfNode(container.parent); return getTypeOfSymbol(symbol); } else { @@ -71028,7 +71204,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getParameterIdentifierNameAtPosition(signature, pos) { var _a2; - if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 326 /* JSDocFunctionType */) { + if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 329 /* JSDocFunctionType */) { return void 0; } const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -71060,7 +71236,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name); } function isValidDeclarationForTupleLabel(d) { - return d.kind === 202 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); + return d.kind === 204 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); } function getNameableDeclarationAtPosition(signature, pos) { const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -71319,7 +71495,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let yieldType; let nextType; let fallbackReturnType = voidType; - if (func.body.kind !== 242 /* Block */) { + if (func.body.kind !== 244 /* Block */) { returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */); if (isAsync) { returnType = unwrapAwaitedType(checkAwaitedType(returnType, false, func, Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)); @@ -71453,7 +71629,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return links.isExhaustive; } function computeExhaustiveSwitchStatement(node) { - if (node.expression.kind === 222 /* TypeOfExpression */) { + if (node.expression.kind === 224 /* TypeOfExpression */) { const witnesses = getSwitchClauseTypeOfWitnesses(node); if (!witnesses) { return false; @@ -71508,11 +71684,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function mayReturnNever(func) { switch (func.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return true; - case 174 /* MethodDeclaration */: - return func.parent.kind === 210 /* ObjectLiteralExpression */; + case 176 /* MethodDeclaration */: + return func.parent.kind === 212 /* ObjectLiteralExpression */; default: return false; } @@ -71554,7 +71730,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return judgeReturnTypeOfStyles(); } } - if (func.kind === 173 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 242 /* Block */ || !functionHasImplicitReturn(func)) { + if (func.kind === 175 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 244 /* Block */ || !functionHasImplicitReturn(func)) { return; } const hasExplicitReturn = func.flags & 512 /* HasExplicitReturn */; @@ -71590,7 +71766,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 176 /* MethodDeclaration */ || isObjectLiteralMethod(node)); checkNodeDeferred(node); if (isFunctionExpression(node)) { checkCollisionsForDeclarationName(node, node.name); @@ -71613,7 +71789,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return anyFunctionType; } const hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 218 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 220 /* FunctionExpression */) { checkGrammarForGenerator(node); } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -71657,7 +71833,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 176 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const functionFlags = getFunctionFlags(node); const returnType = getReturnTypeFromAnnotation(node); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); @@ -71665,7 +71841,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!getEffectiveReturnTypeNode(node)) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 242 /* Block */) { + if (node.body.kind === 244 /* Block */) { checkSourceElement(node.body); } else { const exprType = checkExpression(node.body); @@ -71731,7 +71907,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isReadonlySymbol(symbol)) { if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 109 /* ThisKeyword */) { const ctor = getContainingFunction(expr); - if (!(ctor && (ctor.kind === 176 /* Constructor */ || isJSConstructor(ctor)))) { + if (!(ctor && (ctor.kind === 178 /* Constructor */ || isJSConstructor(ctor)))) { return true; } if (symbol.valueDeclaration) { @@ -71752,7 +71928,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const symbol2 = getNodeLinks(node).resolvedSymbol; if (symbol2.flags & 2097152 /* Alias */) { const declaration = getDeclarationOfAliasSymbol(symbol2); - return !!declaration && declaration.kind === 277 /* NamespaceImport */; + return !!declaration && declaration.kind === 280 /* NamespaceImport */; } } } @@ -71857,7 +72033,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 176 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { + if (container && container.kind !== 178 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { const relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); } @@ -72050,7 +72226,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkObjectLiteralDestructuringPropertyAssignment(node, objectLiteralType, propertyIndex, allProperties, rightIsThis = false) { const properties = node.properties; const property = properties[propertyIndex]; - if (property.kind === 305 /* PropertyAssignment */ || property.kind === 306 /* ShorthandPropertyAssignment */) { + if (property.kind === 308 /* PropertyAssignment */ || property.kind === 309 /* ShorthandPropertyAssignment */) { const name = property.name; const exprType = getLiteralTypeFromPropertyName(name); if (isTypeUsableAsPropertyName(exprType)) { @@ -72063,8 +72239,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */, name); const type = getFlowTypeOfDestructuring(property, elementType); - return checkDestructuringAssignment(property.kind === 306 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); - } else if (property.kind === 307 /* SpreadAssignment */) { + return checkDestructuringAssignment(property.kind === 309 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); + } else if (property.kind === 310 /* SpreadAssignment */) { if (propertyIndex < properties.length - 1) { error(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { @@ -72096,7 +72272,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let inBoundsType = compilerOptions.noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType; for (let i = 0; i < elements.length; i++) { let type = possiblyOutOfBoundsType; - if (node.elements[i].kind === 231 /* SpreadElement */) { + if (node.elements[i].kind === 233 /* SpreadElement */) { type = inBoundsType = inBoundsType != null ? inBoundsType : checkIteratedTypeOrElementType(65 /* Destructuring */, sourceType, undefinedType, node) || errorType; } checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode); @@ -72106,8 +72282,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { const elements = node.elements; const element = elements[elementIndex]; - if (element.kind !== 233 /* OmittedExpression */) { - if (element.kind !== 231 /* SpreadElement */) { + if (element.kind !== 235 /* OmittedExpression */) { + if (element.kind !== 233 /* SpreadElement */) { const indexType = getNumberLiteralType(elementIndex); if (isArrayLikeType2(sourceType)) { const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(element) ? 16 /* NoTupleBoundsCheck */ : 0); @@ -72122,7 +72298,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { const restExpression = element.expression; - if (restExpression.kind === 227 /* BinaryExpression */ && restExpression.operatorToken.kind === 63 /* EqualsToken */) { + if (restExpression.kind === 229 /* 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); @@ -72135,7 +72311,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) { let target; - if (exprOrAssignment.kind === 306 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 309 /* ShorthandPropertyAssignment */) { const prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) { @@ -72147,25 +72323,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { target = exprOrAssignment; } - if (target.kind === 227 /* BinaryExpression */ && target.operatorToken.kind === 63 /* EqualsToken */) { + if (target.kind === 229 /* BinaryExpression */ && target.operatorToken.kind === 63 /* EqualsToken */) { checkBinaryExpression(target, checkMode); target = target.left; if (strictNullChecks) { sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); } } - if (target.kind === 210 /* ObjectLiteralExpression */) { + if (target.kind === 212 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType, rightIsThis); } - if (target.kind === 209 /* ArrayLiteralExpression */) { + if (target.kind === 211 /* 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 === 307 /* 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 === 307 /* 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 === 310 /* 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 === 310 /* 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); } @@ -72180,8 +72356,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: case 10 /* StringLiteral */: case 13 /* RegularExpressionLiteral */: - case 215 /* TaggedTemplateExpression */: - case 229 /* TemplateExpression */: + case 217 /* TaggedTemplateExpression */: + case 231 /* TemplateExpression */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: @@ -72189,25 +72365,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 96 /* FalseKeyword */: case 105 /* NullKeyword */: case 157 /* UndefinedKeyword */: - case 218 /* FunctionExpression */: - case 232 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 222 /* TypeOfExpression */: - case 236 /* NonNullExpression */: - case 288 /* JsxSelfClosingElement */: - case 287 /* JsxElement */: + case 220 /* FunctionExpression */: + case 234 /* ClassExpression */: + case 221 /* ArrowFunction */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 224 /* TypeOfExpression */: + case 238 /* NonNullExpression */: + case 291 /* JsxSelfClosingElement */: + case 290 /* JsxElement */: return true; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: switch (node.operator) { case 53 /* ExclamationToken */: case 39 /* PlusToken */: @@ -72216,9 +72392,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; } return false; - case 223 /* VoidExpression */: - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 225 /* VoidExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: default: return false; } @@ -72254,7 +72430,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } checkGrammarNullishCoalesceWithLogicalExpression(node); const operator = node.operatorToken.kind; - if (operator === 63 /* EqualsToken */ && (node.left.kind === 210 /* ObjectLiteralExpression */ || node.left.kind === 209 /* ArrayLiteralExpression */)) { + if (operator === 63 /* EqualsToken */ && (node.left.kind === 212 /* ObjectLiteralExpression */ || node.left.kind === 211 /* ArrayLiteralExpression */)) { state.skip = true; setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 109 /* ThisKeyword */)); return state; @@ -72276,7 +72452,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { if (operator === 55 /* AmpersandAmpersandToken */) { let parent2 = node.parent; - while (parent2.kind === 217 /* ParenthesizedExpression */ || isBinaryExpression(parent2) && (parent2.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || parent2.operatorToken.kind === 56 /* BarBarToken */)) { + while (parent2.kind === 219 /* ParenthesizedExpression */ || isBinaryExpression(parent2) && (parent2.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || parent2.operatorToken.kind === 56 /* BarBarToken */)) { parent2 = parent2.parent; } checkTestingKnownTruthyCallableOrAwaitableType(node.left, leftType, isIfStatement(parent2) ? parent2.thenStatement : void 0); @@ -72343,7 +72519,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { const operator = operatorToken.kind; - if (operator === 63 /* EqualsToken */ && (left.kind === 210 /* ObjectLiteralExpression */ || left.kind === 209 /* ArrayLiteralExpression */)) { + if (operator === 63 /* EqualsToken */ && (left.kind === 212 /* ObjectLiteralExpression */ || left.kind === 211 /* ArrayLiteralExpression */)) { return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 109 /* ThisKeyword */); } let leftType; @@ -72781,7 +72957,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return !!(type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */) || type.flags & 58982400 /* InstantiableNonPrimitive */ && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 402653316 /* StringLike */)); } function getContextNode2(node) { - if (node.kind === 295 /* JsxAttributes */ && !isJsxSelfClosingElement(node.parent)) { + if (node.kind === 298 /* JsxAttributes */ && !isJsxSelfClosingElement(node.parent)) { return node.parent.parent; } return node; @@ -72822,12 +72998,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isTypeAssertion3(node) { node = skipParentheses(node, true); - return node.kind === 216 /* TypeAssertionExpression */ || node.kind === 235 /* AsExpression */ || isJSDocTypeAssertion(node); + return node.kind === 218 /* TypeAssertionExpression */ || node.kind === 237 /* AsExpression */ || isJSDocTypeAssertion(node); } function checkDeclarationInitializer(declaration, checkMode, contextualType) { const initializer = getEffectiveInitializer(declaration); const type = getQuickTypeOfExpression(initializer) || (contextualType ? checkExpressionWithContextualType(initializer, contextualType, void 0, checkMode || 0 /* Normal */) : checkExpressionCached(initializer, checkMode)); - return isParameter(declaration) && declaration.name.kind === 207 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; + return isParameter(declaration) && declaration.name.kind === 209 /* 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; @@ -72835,7 +73011,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 208 /* BindingElement */ && e.dotDotDotToken)) { + if (i < patternElements.length - 1 || !(e.kind === 210 /* BindingElement */ && e.dotDotDotToken)) { elementTypes.push(!isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement(e, false, false) : anyType); elementFlags.push(2 /* Optional */); if (!isOmittedExpression(e) && !hasDefaultValue(e)) { @@ -72881,14 +73057,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return isConstContext(node) || isCommonJsExportedExpression(node) ? getRegularTypeOfLiteralType(type) : isTypeAssertion3(node) ? type : getWidenedLiteralLikeTypeForContextualType(type, instantiateContextualType(arguments.length === 2 ? getContextualType2(node, void 0) : contextualType, node, void 0)); } function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); } function checkObjectLiteralMethod(node, checkMode) { checkGrammarMethod(node); - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } const uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -73094,7 +73270,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return type; } function checkConstEnumAccess(node, type) { - const ok = node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 79 /* Identifier */ || node.kind === 165 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 186 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 284 /* ExportSpecifier */; + const ok = node.parent.kind === 213 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 214 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 79 /* Identifier */ || node.kind === 166 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 188 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 287 /* 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); } @@ -73117,9 +73293,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const kind = node.kind; if (cancellationToken) { switch (kind) { - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -73150,87 +73326,87 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return trueType; case 96 /* FalseKeyword */: return falseType; - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: return checkTemplateExpression(node); case 13 /* RegularExpressionLiteral */: return globalRegExpType; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return checkArrayLiteral(node, checkMode, forceTuple); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return checkObjectLiteral(node, checkMode); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node, checkMode); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return checkQualifiedName(node, checkMode); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return checkIndexedAccess(node, checkMode); - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (node.expression.kind === 101 /* ImportKeyword */) { return checkImportCallExpression(node); } - case 214 /* NewExpression */: + case 216 /* NewExpression */: return checkCallExpression(node, checkMode); - case 220 /* EtsComponentExpression */: + case 222 /* EtsComponentExpression */: const newNode = node; if (newNode.body && newNode.body.statements.length) { traverseEtsComponentStatements(newNode.body.statements, checkMode); } return checkCallExpression(node, checkMode); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return checkParenthesizedExpression(node, checkMode); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return checkClassExpression(node); - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 222 /* TypeOfExpression */: + case 224 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: return checkAssertion(node); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return checkNonNullAssertion(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return checkExpressionWithTypeArguments(node); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return checkSatisfiesExpression(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return checkMetaProperty(node); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return checkDeleteExpression(node); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return checkVoidExpression(node); - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return checkAwaitExpression(node); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return checkBinaryExpression(node, checkMode); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return checkConditionalExpression(node, checkMode); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return checkSpreadExpression(node, checkMode); - case 233 /* OmittedExpression */: + case 235 /* OmittedExpression */: return undefinedWideningType; - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return checkYieldExpression(node); - case 238 /* SyntheticExpression */: + case 240 /* SyntheticExpression */: return checkSyntheticExpression(node); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return checkJsxExpression(node, checkMode); - case 287 /* JsxElement */: + case 290 /* JsxElement */: return checkJsxElement(node, checkMode); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node, checkMode); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return checkJsxFragment(node); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return checkJsxAttributes(node, checkMode); - case 289 /* JsxOpeningElement */: + case 292 /* JsxOpeningElement */: Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return errorType; @@ -73315,10 +73491,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkVariableLikeDeclaration(node); const func = getContainingFunction(node); if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { - if (!(func.kind === 176 /* Constructor */ && nodeIsPresent(func.body))) { + if (!(func.kind === 178 /* Constructor */ && nodeIsPresent(func.body))) { error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } - if (func.kind === 176 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { + if (func.kind === 178 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { error(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); } } @@ -73329,13 +73505,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (func.parameters.indexOf(node) !== 0) { error(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); } - if (func.kind === 176 /* Constructor */ || func.kind === 180 /* ConstructSignature */ || func.kind === 185 /* ConstructorType */) { + if (func.kind === 178 /* Constructor */ || func.kind === 182 /* ConstructSignature */ || func.kind === 187 /* ConstructorType */) { error(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); } - if (func.kind === 219 /* ArrowFunction */) { + if (func.kind === 221 /* ArrowFunction */) { error(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); } - if (func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) { + if (func.kind === 179 /* GetAccessor */ || func.kind === 180 /* SetAccessor */) { error(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); } } @@ -73390,13 +73566,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTypePredicateParent(node) { switch (node.parent.kind) { - case 219 /* ArrowFunction */: - case 179 /* CallSignature */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 184 /* FunctionType */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 221 /* ArrowFunction */: + case 181 /* CallSignature */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 186 /* FunctionType */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: const parent2 = node.parent; if (node === parent2.type) { return parent2; @@ -73416,7 +73592,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { predicateVariableName ); return true; - } else if (name.kind === 207 /* ArrayBindingPattern */ || name.kind === 206 /* ObjectBindingPattern */) { + } else if (name.kind === 209 /* ArrayBindingPattern */ || name.kind === 208 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( name, predicateVariableNode, @@ -73428,9 +73604,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkSignatureDeclaration(node) { - if (node.kind === 181 /* IndexSignature */) { + if (node.kind === 183 /* IndexSignature */) { checkGrammarIndexSignature(node); - } else if (node.kind === 184 /* FunctionType */ || node.kind === 263 /* FunctionDeclaration */ || node.kind === 185 /* ConstructorType */ || node.kind === 179 /* CallSignature */ || node.kind === 176 /* Constructor */ || node.kind === 180 /* ConstructSignature */) { + } else if (node.kind === 186 /* FunctionType */ || node.kind === 265 /* FunctionDeclaration */ || node.kind === 187 /* ConstructorType */ || node.kind === 181 /* CallSignature */ || node.kind === 178 /* Constructor */ || node.kind === 182 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } const functionFlags = getFunctionFlags(node); @@ -73457,10 +73633,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const returnTypeNode = getEffectiveReturnTypeNode(node); if (noImplicitAny && !returnTypeNode) { switch (node.kind) { - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: error(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 179 /* CallSignature */: + case 181 /* CallSignature */: error(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -73482,7 +73658,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkAsyncFunctionReturnType(node, returnTypeNode); } } - if (node.kind !== 181 /* IndexSignature */ && node.kind !== 326 /* JSDocFunctionType */) { + if (node.kind !== 183 /* IndexSignature */ && node.kind !== 329 /* JSDocFunctionType */) { registerForUnusedIdentifiersCheck(node); } } @@ -73492,7 +73668,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const staticNames = new Map2(); const privateIdentifiers = new Map2(); for (const member of node.members) { - if (member.kind === 176 /* Constructor */) { + if (member.kind === 178 /* Constructor */) { for (const param of member.parameters) { if (isParameterPropertyDeclaration(param, member) && !isBindingPattern(param.name)) { addName(instanceNames, param.name, param.name.escapedText, 3 /* GetOrSetAccessor */); @@ -73510,19 +73686,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const memberName = name && getPropertyNameForPropertyNameNode(name); if (memberName) { switch (member.kind) { - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: addName(names, name, memberName, 1 /* GetAccessor */ | privateStaticFlags); break; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: addName(names, name, memberName, 2 /* SetAccessor */ | privateStaticFlags); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: addName(names, name, memberName, 8 /* Method */ | privateStaticFlags); break; } @@ -73575,7 +73751,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkObjectTypeForDuplicateDeclarations(node) { const names = new Map2(); for (const member of node.members) { - if (member.kind === 170 /* PropertySignature */) { + if (member.kind === 171 /* PropertySignature */) { let memberName; const name = member.name; switch (name.kind) { @@ -73599,7 +73775,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 267 /* InterfaceDeclaration */) { + if (node.kind === 270 /* InterfaceDeclaration */) { const nodeSymbol = getSymbolOfNode(node); if (nodeSymbol.declarations && nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -73635,7 +73811,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (type.symbol.declarations) { for (const decl of type.symbol.declarations) { - if (decl.kind === 269 /* EnumDeclaration */) { + if (decl.kind === 272 /* EnumDeclaration */) { const members = decl.members; for (let i = 0; i < members.length; ++i) { if (i > 1 && typeof getConstantValue2(members[i - 1]) !== typeof getConstantValue2(members[i])) { @@ -73707,7 +73883,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function evaluateAnnotationPropertyConstantExpression(expr) { switch (expr.kind) { - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: const value = evaluateAnnotationPropertyConstantExpression(expr.operand); if (typeof value === "number" || typeof value === "string" || typeof value === "boolean") { switch (expr.operator) { @@ -73726,7 +73902,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const left = evaluateAnnotationPropertyConstantExpression(expr.left); const right = evaluateAnnotationPropertyConstantExpression(expr.right); if (left !== void 0 && right !== void 0 && typeof left === typeof right) { @@ -73795,7 +73971,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: const elements = expr.elements; const result = new Array(elements.length); for (let i = 0; i < elements.length; ++i) { @@ -73819,7 +73995,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 8 /* NumericLiteral */: checkGrammarNumericLiteral(expr); return +expr.text; - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return evaluateAnnotationPropertyConstantExpression(expr.expression); case 79 /* Identifier */: if (isInfinityOrNaNString(expr.escapedText)) { @@ -73833,7 +74009,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return evaluateAnnotationPropertyConstantExpression(symbol.valueDeclaration.initializer); } break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (isConstantMemberAccess(expr)) { return getConstantValue2(expr); } @@ -73852,7 +74028,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } checkVariableLikeDeclaration(node); setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 171 /* PropertyDeclaration */ && node.initializer) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) { error(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); } if (isAnnotationPropertyDeclaration(node)) { @@ -73943,7 +74119,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 176 /* 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)) { @@ -73991,7 +74167,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isPrivateIdentifierClassElementDeclaration(n)) { return true; } - return n.kind === 171 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; + return n.kind === 172 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; } function checkConstructorDeclarationDiagnostics() { const containingClassDecl = node.parent; @@ -74054,20 +74230,20 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 177 /* GetAccessor */) { + if (node.kind === 179 /* 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 === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { const symbol = getSymbolOfNode(node); - const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); + const getter = getDeclarationOfKind(symbol, 179 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 180 /* SetAccessor */); if (getter && setter && !(getNodeCheckFlags(getter) & 1 /* TypeChecked */)) { getNodeLinks(getter).flags |= 1 /* TypeChecked */; const getterFlags = getEffectiveModifierFlags(getter); @@ -74088,7 +74264,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } const returnType = getTypeOfAccessors(getSymbolOfNode(node)); - if (node.kind === 177 /* GetAccessor */) { + if (node.kind === 179 /* GetAccessor */) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -74143,7 +74319,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkTypeReferenceNode(node) { checkGrammarTypeArguments(node, node.typeArguments); - if (node.kind === 183 /* TypeReference */ && node.typeName.jsdocDotPos !== void 0 && !isInJSFile(node) && !isInJSDoc(node)) { + if (node.kind === 185 /* TypeReference */ && node.typeName.jsdocDotPos !== void 0 && !isInJSFile(node) && !isInJSDoc(node)) { grammarErrorAtPos(node, node.typeName.jsdocDotPos, 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); } forEach(node.typeArguments, checkSourceElement); @@ -74207,7 +74383,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let seenRestElement = false; const hasNamedElement = some(elementTypes, isNamedTupleMember); for (const e of elementTypes) { - if (e.kind !== 202 /* NamedTupleMember */ && hasNamedElement) { + if (e.kind !== 204 /* NamedTupleMember */ && hasNamedElement) { grammarErrorOnNode(e, Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names); break; } @@ -74252,7 +74428,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const objectType = type.objectType; const indexType = type.indexType; if (isTypeAssignableTo(indexType, getIndexType(objectType, false))) { - if (accessNode.kind === 212 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { + if (accessNode.kind === 214 /* 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; @@ -74313,7 +74489,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { forEachChild(node, checkSourceElement); } function checkInferType(node) { - if (!findAncestor(node, (n) => n.parent && n.parent.kind === 194 /* ConditionalType */ && n.parent.extendsType === n)) { + if (!findAncestor(node, (n) => n.parent && n.parent.kind === 196 /* ConditionalType */ && n.parent.extendsType === n)) { grammarErrorOnNode(node, Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type); } checkSourceElement(node.typeParameter); @@ -74323,7 +74499,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!links.typeParametersChecked) { links.typeParametersChecked = true; const typeParameter = getDeclaredTypeOfTypeParameter(symbol); - const declarations = getDeclarationsOfKind(symbol, 167 /* TypeParameter */); + const declarations = getDeclarationsOfKind(symbol, 168 /* TypeParameter */); if (!areTypeParametersIdentical(declarations, [typeParameter], (decl) => [decl])) { const name = symbolToString(symbol); for (const declaration of declarations) { @@ -74361,10 +74537,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.dotDotDotToken && node.questionToken) { grammarErrorOnNode(node, Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest); } - if (node.type.kind === 190 /* OptionalType */) { + if (node.type.kind === 192 /* 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 === 191 /* RestType */) { + if (node.type.kind === 193 /* 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); @@ -74375,7 +74551,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getEffectiveDeclarationFlags(n, flagsToCheck) { let flags = getCombinedModifierFlags(n); - if (n.parent.kind !== 267 /* InterfaceDeclaration */ && n.parent.kind !== 264 /* ClassDeclaration */ && n.parent.kind !== 232 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { + if (n.parent.kind !== 270 /* InterfaceDeclaration */ && n.parent.kind !== 266 /* ClassDeclaration */ && n.parent.kind !== 234 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { if (!(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { flags |= 1 /* Export */; } @@ -74448,7 +74624,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const errorNode2 = subsequentNode.name || subsequentNode; const subsequentName = subsequentNode.name; if (node.name && subsequentName && (isPrivateIdentifier(node.name) && isPrivateIdentifier(subsequentName) && node.name.escapedText === subsequentName.escapedText || isComputedPropertyName(node.name) && isComputedPropertyName(subsequentName) || isPropertyNameLiteral(node.name) && isPropertyNameLiteral(subsequentName) && getEscapedTextOfIdentifierOrLiteral(node.name) === getEscapedTextOfIdentifierOrLiteral(subsequentName))) { - const reportError = (node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); + const reportError = (node.kind === 176 /* MethodDeclaration */ || node.kind === 175 /* 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); @@ -74480,14 +74656,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { for (const current of declarations) { const node = current; const inAmbientContext = node.flags & 16777216 /* Ambient */; - const inAmbientContextOrInterface = node.parent && (node.parent.kind === 267 /* InterfaceDeclaration */ || node.parent.kind === 187 /* TypeLiteral */) || inAmbientContext; + const inAmbientContextOrInterface = node.parent && (node.parent.kind === 270 /* InterfaceDeclaration */ || node.parent.kind === 189 /* TypeLiteral */) || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = void 0; } - if ((node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */) && !inAmbientContext) { + if ((node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */) && !inAmbientContext) { hasNonAmbientClass = true; } - if (node.kind === 263 /* FunctionDeclaration */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 176 /* Constructor */) { + if (node.kind === 265 /* FunctionDeclaration */ || node.kind === 176 /* MethodDeclaration */ || node.kind === 175 /* MethodSignature */ || node.kind === 178 /* Constructor */) { functionDeclarations.push(node); const currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; @@ -74529,9 +74705,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }); } if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 /* Function */ && declarations) { - const relatedDiagnostics = filter(declarations, (d) => d.kind === 264 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); + const relatedDiagnostics = filter(declarations, (d) => d.kind === 266 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); forEach(declarations, (declaration) => { - const diagnostic = declaration.kind === 264 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 263 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; + const diagnostic = declaration.kind === 266 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 265 /* 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)), @@ -74610,43 +74786,43 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getDeclarationSpaces(decl) { let d = decl; switch (d.kind) { - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return 2 /* ExportType */; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return isAmbientModule(d) || getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4 /* ExportNamespace */ | 1 /* ExportValue */ : 4 /* ExportNamespace */; - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; - case 280 /* ExportAssignment */: - case 227 /* BinaryExpression */: + case 283 /* ExportAssignment */: + case 229 /* BinaryExpression */: const node2 = d; const expression = isExportAssignment(node2) ? node2.expression : node2.right; if (!isEntityNameExpression(expression)) { return 1 /* ExportValue */; } d = expression; - case 274 /* ImportEqualsDeclaration */: - case 277 /* NamespaceImport */: - case 276 /* ImportClause */: + case 277 /* ImportEqualsDeclaration */: + case 280 /* NamespaceImport */: + case 279 /* ImportClause */: let result = 0 /* None */; const target = resolveAlias(getSymbolOfNode(d)); forEach(target.declarations, (d2) => { result |= getDeclarationSpaces(d2); }); return result; - case 261 /* VariableDeclaration */: - case 208 /* BindingElement */: - case 263 /* FunctionDeclaration */: - case 279 /* ImportSpecifier */: + case 263 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 265 /* FunctionDeclaration */: + case 282 /* ImportSpecifier */: case 79 /* Identifier */: return 1 /* ExportValue */; default: @@ -74897,21 +75073,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let headMessage; let expectedReturnType; switch (node.parent.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; const classSymbol = getSymbolOfNode(node.parent); const classConstructorType = getTypeOfSymbol(classSymbol); expectedReturnType = getUnionType([classConstructorType, voidType]); break; - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: headMessage = Diagnostics.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any; expectedReturnType = voidType; break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; const methodType = getTypeOfNode(node.parent); const descriptorType = createTypedPropertyDescriptorType(methodType); @@ -74957,15 +75133,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getEntityNameForDecoratorMetadata(node) { if (node) { switch (node.kind) { - case 193 /* IntersectionType */: - case 192 /* UnionType */: + case 195 /* IntersectionType */: + case 194 /* UnionType */: return getEntityNameForDecoratorMetadataFromTypeList(node.types); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return getEntityNameForDecoratorMetadataFromTypeList([node.trueType, node.falseType]); - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: + case 198 /* ParenthesizedType */: + case 204 /* NamedTupleMember */: return getEntityNameForDecoratorMetadata(node.type); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return node.typeName; } } @@ -74973,13 +75149,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getEntityNameForDecoratorMetadataFromTypeList(types) { let commonEntityName; for (let typeNode of types) { - while (typeNode.kind === 196 /* ParenthesizedType */ || typeNode.kind === 202 /* NamedTupleMember */) { + while (typeNode.kind === 198 /* ParenthesizedType */ || typeNode.kind === 204 /* NamedTupleMember */) { typeNode = typeNode.type; } if (typeNode.kind === 145 /* NeverKeyword */) { continue; } - if (!strictNullChecks && (typeNode.kind === 201 /* LiteralType */ && typeNode.literal.kind === 105 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { + if (!strictNullChecks && (typeNode.kind === 203 /* LiteralType */ && typeNode.literal.kind === 105 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { continue; } const individualEntityName = getEntityNameForDecoratorMetadata(typeNode); @@ -75039,9 +75215,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } switch (annotatedDecl.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: const enclosingDecl = annotatedDecl.parent; Debug.assert(isClassDeclaration(enclosingDecl)); if (hasSyntacticModifier(enclosingDecl, 256 /* Abstract */)) { @@ -75072,10 +75248,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: ident = da.expression; break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: ident = da.expression; break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: ident = getIdentifierFromEntityNameExpression(da.expression.expression); break; default: @@ -75130,13 +75306,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */); - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { checkExternalEmitHelpers(firstDecorator, 32 /* Param */); } if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */); switch (node.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: const constructor = getFirstConstructorWithBody(node); if (constructor) { for (const parameter of constructor.parameters) { @@ -75144,22 +75320,22 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - const otherKind = node.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + const otherKind = node.kind === 179 /* GetAccessor */ ? 180 /* SetAccessor */ : 179 /* GetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfNode(node), otherKind); markDecoratorMedataDataTypeNodeAsReferenced(getAnnotatedAccessorTypeNode(node) || otherAccessor && getAnnotatedAccessorTypeNode(otherAccessor)); break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: for (const parameter of node.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(node)); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveTypeAnnotationNode(node)); break; - case 168 /* Parameter */: + case 169 /* Parameter */: markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); const containingSignature = node.parent; for (const parameter of containingSignature.parameters) { @@ -75257,7 +75433,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (node.kind) { case 79 /* Identifier */: return node; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return node.name; default: return void 0; @@ -75268,7 +75444,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkDecorators(node); checkSignatureDeclaration(node); const functionFlags = getFunctionFlags(node); - if (node.name && node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { @@ -75284,7 +75460,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkFunctionOrConstructorSymbol(symbol); } } - const body = node.kind === 173 /* MethodSignature */ ? void 0 : node.body; + const body = node.kind === 175 /* MethodSignature */ ? void 0 : node.body; checkSourceElement(body); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node)); addLazyDiagnostic(checkFunctionOrMethodDeclarationDiagnostics); @@ -75320,43 +75496,43 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) { for (const node of potentiallyUnusedIdentifiers) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: checkUnusedClassMembers(node, addDiagnostic); checkUnusedTypeParameters(node, addDiagnostic); break; - case 314 /* SourceFile */: - case 270 /* ModuleDeclaration */: - case 242 /* Block */: - case 272 /* CaseBlock */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 317 /* SourceFile */: + case 273 /* ModuleDeclaration */: + case 244 /* Block */: + case 275 /* CaseBlock */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: checkUnusedLocalsAndParameters(node, addDiagnostic); break; - case 176 /* Constructor */: - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* Constructor */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: if (node.body) { checkUnusedLocalsAndParameters(node, addDiagnostic); } checkUnusedTypeParameters(node, addDiagnostic); break; - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: checkUnusedTypeParameters(node, addDiagnostic); break; - case 195 /* InferType */: + case 197 /* InferType */: checkUnusedInferTypeParameter(node, addDiagnostic); break; default: @@ -75375,11 +75551,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkUnusedClassMembers(node, addDiagnostic) { for (const member of node.members) { switch (member.kind) { - case 174 /* MethodDeclaration */: - case 171 /* PropertyDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - if (member.kind === 178 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { + case 176 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + if (member.kind === 180 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { break; } const symbol = getSymbolOfNode(member); @@ -75387,16 +75563,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; - case 176 /* Constructor */: + case 178 /* 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 181 /* IndexSignature */: - case 241 /* SemicolonClassElement */: - case 175 /* ClassStaticBlockDeclaration */: + case 183 /* IndexSignature */: + case 243 /* SemicolonClassElement */: + case 177 /* ClassStaticBlockDeclaration */: break; default: Debug.fail("Unexpected class member"); @@ -75420,7 +75596,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue; const name = idText(typeParameter.name); const { parent: parent2 } = typeParameter; - if (parent2.kind !== 195 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { + if (parent2.kind !== 197 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { if (tryAddToSet(seenParentsWithEveryUnused, parent2)) { const sourceFile = getSourceFileOfNode(parent2); const range = isJSDocTemplateTag(parent2) ? rangeOfNode(parent2) : rangeOfTypeParameters(sourceFile, parent2.typeParameters); @@ -75500,7 +75676,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }); unusedImports.forEach(([importClause, unuseds]) => { const importDecl = importClause.parent; - const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 277 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); + const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 280 /* 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 { @@ -75511,7 +75687,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 261 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 262 /* VariableDeclarationList */) { + if (bindingElements.length === 1 && bindingPattern.parent.kind === 263 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 264 /* 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)); @@ -75524,7 +75700,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }); 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 === 244 /* 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 === 246 /* 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))); @@ -75553,21 +75729,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (name.kind) { case 79 /* Identifier */: return idText(name); - case 207 /* ArrayBindingPattern */: - case 206 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: return bindingNameText(cast(first(name.elements), isBindingElement).name); default: return Debug.assertNever(name); } } function isImportedDeclaration(node) { - return node.kind === 276 /* ImportClause */ || node.kind === 279 /* ImportSpecifier */ || node.kind === 277 /* NamespaceImport */; + return node.kind === 279 /* ImportClause */ || node.kind === 282 /* ImportSpecifier */ || node.kind === 280 /* NamespaceImport */; } function importClauseFromImported(decl) { - return decl.kind === 276 /* ImportClause */ ? decl : decl.kind === 277 /* NamespaceImport */ ? decl.parent : decl.parent.parent; + return decl.kind === 279 /* ImportClause */ ? decl : decl.kind === 280 /* NamespaceImport */ ? decl.parent : decl.parent.parent; } function checkBlock(node) { - if (node.kind === 242 /* Block */) { + if (node.kind === 244 /* Block */) { checkGrammarStatementInAmbientContext(node); } if (isFunctionOrModuleBlock(node)) { @@ -75595,7 +75771,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if ((identifier == null ? void 0 : identifier.escapedText) !== name) { return false; } - if (node.kind === 171 /* PropertyDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */ || node.kind === 305 /* PropertyAssignment */) { + if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 176 /* MethodDeclaration */ || node.kind === 175 /* MethodSignature */ || node.kind === 179 /* GetAccessor */ || node.kind === 180 /* SetAccessor */ || node.kind === 308 /* PropertyAssignment */) { return false; } if (node.flags & 16777216 /* Ambient */) { @@ -75651,7 +75827,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 314 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { + if (parent2.kind === 317 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { errorSkippedOn( "noEmit", name, @@ -75669,7 +75845,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 314 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 2048 /* HasAsyncFunctions */) { + if (parent2.kind === 317 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 2048 /* HasAsyncFunctions */) { errorSkippedOn( "noEmit", name, @@ -75751,7 +75927,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if ((getCombinedNodeFlags(node) & 3 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { return; } - if (node.kind === 261 /* VariableDeclaration */ && !node.initializer) { + if (node.kind === 263 /* VariableDeclaration */ && !node.initializer) { return; } const symbol = getSymbolOfNode(node); @@ -75761,9 +75937,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const localDeclarationSymbol = resolveName(node, node.name.escapedText, 3 /* Variable */, void 0, void 0, false); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3 /* BlockScoped */) { - const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 262 /* VariableDeclarationList */); - const container = varDeclList.parent.kind === 244 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; - const namesShareScope = container && (container.kind === 242 /* Block */ && isFunctionLike(container.parent) || container.kind === 271 /* ModuleBlock */ || container.kind === 270 /* ModuleDeclaration */ || container.kind === 314 /* SourceFile */); + const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 264 /* VariableDeclarationList */); + const container = varDeclList.parent.kind === 246 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; + const namesShareScope = container && (container.kind === 244 /* Block */ && isFunctionLike(container.parent) || container.kind === 274 /* ModuleBlock */ || container.kind === 273 /* ModuleDeclaration */ || container.kind === 317 /* 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); @@ -75784,7 +75960,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!node.name) { return; } - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (hasOnlyExpressionInitializer(node) && node.initializer) { checkExpressionCached(node.initializer); @@ -75798,7 +75974,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < 5 /* ES2018 */) { checkExternalEmitHelpers(node, 4 /* Rest */); } - if (node.propertyName && node.propertyName.kind === 166 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } const parent2 = node.parent.parent; @@ -75818,7 +75994,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } if (isBindingPattern(node.name)) { - if (node.name.kind === 207 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { + if (node.name.kind === 209 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512 /* Read */); } forEach(node.name.elements, checkSourceElement); @@ -75828,7 +76004,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } if (isBindingPattern(node.name)) { - const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 250 /* ForInStatement */; + const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 252 /* ForInStatement */; const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression)); if (needCheckInitializer || needCheckWidenedType) { const widenedType = getWidenedTypeForVariableLikeDeclaration(node); @@ -75851,7 +76027,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const symbol = getSymbolOfNode(node); - if (symbol.flags & 2097152 /* Alias */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.kind === 208 /* BindingElement */ ? node.parent.parent : node)) { + if (symbol.flags & 2097152 /* Alias */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.kind === 210 /* BindingElement */ ? node.parent.parent : node)) { checkAliasSymbol(node); return; } @@ -75860,7 +76036,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 250 /* ForInStatement */) { + if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 252 /* ForInStatement */) { checkTypeAssignableToAndOptionallyElaborate(checkExpressionCached(initializer), type, node, initializer, void 0); } } @@ -75881,9 +76057,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } } - if (node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 170 /* PropertySignature */ && node.kind !== 172 /* AnnotationPropertyDeclaration */) { + if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 173 /* AnnotationPropertyDeclaration */) { checkExportsOnMergedDeclarations(node); - if (node.kind === 261 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { + if (node.kind === 263 /* VariableDeclaration */ || node.kind === 210 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionsForDeclarationName(node, node.name); @@ -75891,7 +76067,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) { const nextDeclarationName = getNameOfDeclaration(nextDeclaration); - const message = nextDeclaration.kind === 171 /* PropertyDeclaration */ || nextDeclaration.kind === 170 /* 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 === 172 /* PropertyDeclaration */ || nextDeclaration.kind === 171 /* 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, @@ -75908,7 +76084,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function areDeclarationFlagsIdentical(left, right) { - if (left.kind === 168 /* Parameter */ && right.kind === 261 /* VariableDeclaration */ || left.kind === 261 /* VariableDeclaration */ && right.kind === 168 /* Parameter */) { + if (left.kind === 169 /* Parameter */ && right.kind === 263 /* VariableDeclaration */ || left.kind === 263 /* VariableDeclaration */ && right.kind === 169 /* Parameter */) { return true; } if (hasQuestionToken(left) !== hasQuestionToken(right)) { @@ -75944,7 +76120,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const type = checkTruthinessExpression(node.expression); checkTestingKnownTruthyCallableOrAwaitableType(node.expression, type, node.thenStatement); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 243 /* EmptyStatement */) { + if (node.thenStatement.kind === 245 /* EmptyStatement */) { error(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -76060,12 +76236,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 262 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 264 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 262 /* VariableDeclarationList */) { + if (node.initializer.kind === 264 /* VariableDeclarationList */) { forEach(node.initializer.declarations, checkVariableDeclaration); } else { checkExpression(node.initializer); @@ -76095,12 +76271,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(node, 256 /* ForOfIncludes */); } - if (node.initializer.kind === 262 /* VariableDeclarationList */) { + if (node.initializer.kind === 264 /* VariableDeclarationList */) { checkForInOrForOfVariableDeclaration(node); } else { const varExpr = node.initializer; const iteratedType = checkRightHandSideOfForOf(node); - if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { + if (varExpr.kind === 211 /* ArrayLiteralExpression */ || varExpr.kind === 212 /* ObjectLiteralExpression */) { checkDestructuringAssignment(varExpr, iteratedType || errorType); } else { const leftType = checkExpression(varExpr); @@ -76122,7 +76298,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); const rightType = getNonNullableTypeIfNeeded(checkExpression(node.expression)); - if (node.initializer.kind === 262 /* VariableDeclarationList */) { + if (node.initializer.kind === 264 /* 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); @@ -76131,7 +76307,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { const varExpr = node.initializer; const leftType = checkExpression(varExpr); - if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { + if (varExpr.kind === 211 /* ArrayLiteralExpression */ || varExpr.kind === 212 /* 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); @@ -76688,11 +76864,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const functionFlags = getFunctionFlags(container); if (strictNullChecks || node.expression || returnType.flags & 131072 /* Never */) { const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType; - if (container.kind === 178 /* SetAccessor */) { + if (container.kind === 180 /* SetAccessor */) { if (node.expression) { error(node, Diagnostics.Setters_cannot_return_a_value); } - } else if (container.kind === 176 /* Constructor */) { + } else if (container.kind === 178 /* 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); } @@ -76703,7 +76879,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression); } } - } else if (container.kind !== 176 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) { + } else if (container.kind !== 178 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) { error(node, Diagnostics.Not_all_code_paths_return_a_value); } } @@ -76728,7 +76904,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const expressionType = checkExpression(node.expression); const expressionIsLiteral = isLiteralType3(expressionType); forEach(node.caseBlock.clauses, (clause) => { - if (clause.kind === 299 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 302 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === void 0) { firstDefaultClause = clause; } else { @@ -76736,7 +76912,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { hasDuplicateDefaultClause = true; } } - if (clause.kind === 298 /* CaseClause */) { + if (clause.kind === 301 /* CaseClause */) { addLazyDiagnostic(createLazyCaseClauseDiagnostics(clause)); } forEach(clause.statements, checkSourceElement); @@ -76768,7 +76944,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isFunctionLike(current)) { return "quit"; } - if (current.kind === 257 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { + if (current.kind === 259 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { grammarErrorOnNode(node.label, Diagnostics.Duplicate_label_0, getTextOfNode(node.label)); return true; } @@ -76852,8 +77028,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const indexInfos = getApplicableIndexInfos(type, propNameType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 267 /* InterfaceDeclaration */) : void 0; - const propDeclaration = declaration && declaration.kind === 227 /* BinaryExpression */ || name && name.kind === 166 /* ComputedPropertyName */ ? declaration : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 270 /* InterfaceDeclaration */) : void 0; + const propDeclaration = declaration && declaration.kind === 229 /* BinaryExpression */ || name && name.kind === 167 /* ComputedPropertyName */ ? declaration : void 0; const localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : void 0; for (const info of indexInfos) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : void 0; @@ -76877,7 +77053,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkIndexConstraintForIndexSignature(type, checkInfo) { const declaration = checkInfo.declaration; const indexInfos = getApplicableIndexInfos(type, checkInfo.keyType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 267 /* InterfaceDeclaration */) : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 270 /* InterfaceDeclaration */) : void 0; const localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfNode(declaration)) === type.symbol ? declaration : void 0; for (const info of indexInfos) { if (info === checkInfo) @@ -76982,7 +77158,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkTypeParametersNotReferenced(root, typeParameters, index) { visit(root); function visit(node) { - if (node.kind === 183 /* TypeReference */) { + if (node.kind === 185 /* TypeReference */) { const type = getTypeFromTypeReference(node); if (type.flags & 262144 /* TypeParameter */) { for (let i = index; i < typeParameters.length; i++) { @@ -77409,7 +77585,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getCheckFlags(s) & 1 /* Instantiated */ ? s.target : s; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { - return filter(symbol.declarations, (d) => d.kind === 264 /* ClassDeclaration */ || d.kind === 267 /* InterfaceDeclaration */); + return filter(symbol.declarations, (d) => d.kind === 266 /* ClassDeclaration */ || d.kind === 270 /* InterfaceDeclaration */); } function checkKindsOfPropertyMemberOverrides(type, baseType) { var _a2, _b, _c, _d; @@ -77439,7 +77615,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue basePropertyCheck; } } - if (derivedClassDecl.kind === 232 /* ClassExpression */) { + if (derivedClassDecl.kind === 234 /* ClassExpression */) { error( derivedClassDecl, Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, @@ -77474,7 +77650,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 171 /* PropertyDeclaration */ && !d.initializer); + const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 172 /* 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; @@ -77577,7 +77753,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function isPropertyWithoutInitializer(node) { - return node.kind === 171 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; + return node.kind === 172 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; } function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) { for (const staticBlock of staticBlocks) { @@ -77611,7 +77787,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkExportsOnMergedDeclarations(node); const symbol = getSymbolOfNode(node); checkTypeParameterListsIdentical(symbol); - const firstInterfaceDecl = getDeclarationOfKind(symbol, 267 /* InterfaceDeclaration */); + const firstInterfaceDecl = getDeclarationOfKind(symbol, 270 /* InterfaceDeclaration */); if (node === firstInterfaceDecl) { const type = getDeclaredTypeOfSymbol(symbol); const typeWithThis = getTypeWithThisArgument(type); @@ -77710,7 +77886,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return value; function evaluate(expr) { switch (expr.kind) { - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: const value2 = evaluate(expr.operand); if (typeof value2 === "number") { switch (expr.operator) { @@ -77723,7 +77899,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const left = evaluate(expr.left); const right = evaluate(expr.right); if (typeof left === "number" && typeof right === "number") { @@ -77763,7 +77939,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 8 /* NumericLiteral */: checkGrammarNumericLiteral(expr); return +expr.text; - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return evaluate(expr.expression); case 79 /* Identifier */: const identifier = expr; @@ -77771,13 +77947,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return +identifier.escapedText; } return nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText); - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: if (isConstantMemberAccess(expr)) { const type = getTypeOfExpression(expr.expression); if (type.symbol && type.symbol.flags & 384 /* Enum */) { let name; - if (expr.kind === 211 /* PropertyAccessExpression */) { + if (expr.kind === 213 /* PropertyAccessExpression */) { name = expr.name.escapedText; } else { name = escapeLeadingUnderscores(cast(expr.argumentExpression, isLiteralExpression).text); @@ -77811,7 +77987,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (type === errorType) { return false; } - return node.kind === 79 /* Identifier */ || node.kind === 211 /* PropertyAccessExpression */ && isConstantMemberAccess(node.expression) || node.kind === 212 /* ElementAccessExpression */ && isConstantMemberAccess(node.expression) && isStringLiteralLike(node.argumentExpression); + return node.kind === 79 /* Identifier */ || node.kind === 213 /* PropertyAccessExpression */ && isConstantMemberAccess(node.expression) || node.kind === 214 /* ElementAccessExpression */ && isConstantMemberAccess(node.expression) && isStringLiteralLike(node.argumentExpression); } function checkEnumDeclaration(node) { addLazyDiagnostic(() => checkEnumDeclarationWorker(node)); @@ -77835,7 +78011,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let seenEnumMissingInitialInitializer = false; forEach(enumSymbol.declarations, (declaration) => { - if (declaration.kind !== 269 /* EnumDeclaration */) { + if (declaration.kind !== 272 /* EnumDeclaration */) { return false; } const enumDeclaration = declaration; @@ -77862,7 +78038,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const declarations = symbol.declarations; if (declarations) { for (const declaration of declarations) { - if ((declaration.kind === 264 /* ClassDeclaration */ || declaration.kind === 263 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { + if ((declaration.kind === 266 /* ClassDeclaration */ || declaration.kind === 265 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { return declaration; } } @@ -77918,7 +78094,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 264 /* ClassDeclaration */); + const mergedClass = getDeclarationOfKind(symbol, 266 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 32768 /* LexicalModuleMergesWithClass */; } @@ -77949,21 +78125,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: for (const decl of node.declarationList.declarations) { checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 280 /* ExportAssignment */: - case 281 /* ExportDeclaration */: + case 283 /* ExportAssignment */: + case 284 /* ExportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 274 /* ImportEqualsDeclaration */: - case 275 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 208 /* BindingElement */: - case 261 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 263 /* VariableDeclaration */: const name = node.name; if (isBindingPattern(name)) { for (const el of name.elements) { @@ -77971,12 +78147,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } break; } - case 264 /* ClassDeclaration */: - case 269 /* EnumDeclaration */: - case 263 /* FunctionDeclaration */: - case 267 /* InterfaceDeclaration */: - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 266 /* ClassDeclaration */: + case 272 /* EnumDeclaration */: + case 265 /* FunctionDeclaration */: + case 270 /* InterfaceDeclaration */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: if (isGlobalAugmentation) { return; } @@ -77987,12 +78163,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (node.kind) { case 79 /* Identifier */: return node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.left; } while (node.kind !== 79 /* Identifier */); return node; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: do { if (isModuleExportsAccessExpression(node.expression) && !isPrivateIdentifier(node.name)) { return node.name; @@ -78011,9 +78187,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(moduleName, Diagnostics.String_literal_expected); return false; } - const inAmbientExternalModule = node.parent.kind === 271 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - if (node.parent.kind !== 314 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 281 /* 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 === 274 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + if (node.parent.kind !== 317 /* SourceFile */ && !inAmbientExternalModule) { + error(moduleName, node.kind === 284 /* 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)) { @@ -78042,8 +78218,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 283 /* NamespaceExport */); - if (node.kind === 284 /* ExportSpecifier */) { + Debug.assert(node.kind !== 286 /* NamespaceExport */); + if (node.kind === 287 /* 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) { @@ -78057,7 +78233,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } else { - Debug.assert(node.kind !== 261 /* VariableDeclaration */); + Debug.assert(node.kind !== 263 /* 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); @@ -78073,7 +78249,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 284 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + const message = node.kind === 287 /* 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 (compilerOptions.isolatedModules && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 16777216 /* Ambient */)) { @@ -78081,25 +78257,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const isType3 = !(targetFlags & 111551 /* Value */); if (isType3 || typeOnlyAlias) { switch (node.kind) { - case 276 /* ImportClause */: - case 279 /* ImportSpecifier */: - case 274 /* ImportEqualsDeclaration */: { + case 279 /* ImportClause */: + case 282 /* ImportSpecifier */: + case 277 /* ImportEqualsDeclaration */: { if (compilerOptions.preserveValueImports) { Debug.assertIsDefined(node.name, "An ImportClause with a symbol should have a name"); const message = isType3 ? Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_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 === 279 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); + const name = idText(node.kind === 282 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); addTypeOnlyDeclarationRelatedInfo( error(node, message, name), isType3 ? void 0 : typeOnlyAlias, name ); } - if (isType3 && node.kind === 274 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { + if (isType3 && node.kind === 277 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { error(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided); } break; } - case 284 /* ExportSpecifier */: { + case 287 /* ExportSpecifier */: { if (getSourceFileOfNode(typeOnlyAlias) !== getSourceFileOfNode(node)) { const message = isType3 ? Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isolatedModules_is_enabled; const name = idText(node.propertyName || node.name); @@ -78168,7 +78344,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkImportBinding(node) { checkCollisionsForDeclarationName(node, node.name); checkAliasSymbol(node); - if (node.kind === 279 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (node.kind === 282 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { checkExternalEmitHelpers(node, 131072 /* ImportDefault */); } } @@ -78215,7 +78391,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 277 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 280 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); if (moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && getESModuleInterop(compilerOptions)) { checkExternalEmitHelpers(node, 65536 /* ImportStar */); @@ -78241,7 +78417,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (hasSyntacticModifier(node, 1 /* Export */)) { markExportAsReferenced(node); } - if (node.moduleReference.kind !== 286 /* ExternalModuleReference */) { + if (node.moduleReference.kind !== 289 /* ExternalModuleReference */) { const target = resolveAlias(getSymbolOfNode(node)); if (target !== unknownSymbol) { const targetFlags = getAllSymbolFlags(target); @@ -78279,9 +78455,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause && !isNamespaceExport(node.exportClause)) { forEach(node.exportClause.elements, checkExportSpecifier); - const inAmbientExternalModule = node.parent.kind === 271 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 271 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; - if (node.parent.kind !== 314 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + const inAmbientExternalModule = node.parent.kind === 274 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 274 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; + if (node.parent.kind !== 317 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { error(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } else { @@ -78307,7 +78483,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkGrammarExportDeclaration(node) { var _a2; if (node.isTypeOnly) { - if (((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 282 /* NamedExports */) { + if (((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 285 /* NamedExports */) { return checkGrammarNamedImportsOrExports(node.exportClause); } else { return grammarErrorOnNode(node, Diagnostics.Only_named_exports_may_use_export_type); @@ -78316,7 +78492,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function checkGrammarModuleElementContext(node, errorMessage) { - const isInAppropriateContext = node.parent.kind === 314 /* SourceFile */ || node.parent.kind === 271 /* ModuleBlock */ || node.parent.kind === 270 /* ModuleDeclaration */; + const isInAppropriateContext = node.parent.kind === 317 /* SourceFile */ || node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 273 /* ModuleDeclaration */; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -78389,7 +78565,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: ident = node.expression; break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: ident = node.expression; break; default: @@ -78414,8 +78590,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (checkGrammarModuleElementContext(node, illegalContextMessage)) { return; } - const container = node.parent.kind === 314 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 270 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 317 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 273 /* ModuleDeclaration */ && !isAmbientModule(container)) { if (node.isExportEquals) { error(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } else { @@ -78527,186 +78703,188 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const kind = node.kind; if (cancellationToken) { switch (kind) { - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } - if (kind >= 244 /* FirstStatement */ && kind <= 260 /* LastStatement */ && node.flowNode && !isReachableFlowNode(node.flowNode)) { + if (kind >= 246 /* FirstStatement */ && kind <= 262 /* LastStatement */ && node.flowNode && !isReachableFlowNode(node.flowNode)) { errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected); } switch (kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return checkTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return checkParameter(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return checkPropertyDeclaration(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return checkPropertySignature(node); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return checkPropertyDeclaration(node); - case 185 /* ConstructorType */: - case 184 /* FunctionType */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: + case 187 /* ConstructorType */: + case 186 /* FunctionType */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: return checkSignatureDeclaration(node); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return checkMethodDeclaration(node); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return checkClassStaticBlockDeclaration(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return checkConstructorDeclaration(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return checkAccessorDeclaration(node); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return checkTypeReferenceNode(node); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return checkTypePredicate(node); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return checkTypeQuery(node); - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: return checkTypeLiteral(node); - case 188 /* ArrayType */: + case 190 /* ArrayType */: return checkArrayType(node); - case 189 /* TupleType */: + case 191 /* TupleType */: return checkTupleType(node); - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 196 /* ParenthesizedType */: - case 190 /* OptionalType */: - case 191 /* RestType */: + case 198 /* ParenthesizedType */: + case 192 /* OptionalType */: + case 193 /* RestType */: return checkSourceElement(node.type); - case 197 /* ThisType */: + case 199 /* ThisType */: return checkThisType(node); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return checkTypeOperator(node); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return checkConditionalType(node); - case 195 /* InferType */: + case 197 /* InferType */: return checkInferType(node); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: return checkTemplateLiteralType(node); - case 205 /* ImportType */: + case 207 /* ImportType */: return checkImportType(node); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return checkNamedTupleMember(node); - case 337 /* JSDocAugmentsTag */: + case 340 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 338 /* JSDocImplementsTag */: + case 341 /* JSDocImplementsTag */: return checkJSDocImplementsTag(node); - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 333 /* JSDocLink */: - case 334 /* JSDocLinkCode */: - case 335 /* JSDocLinkPlain */: + case 336 /* JSDocLink */: + case 337 /* JSDocLinkCode */: + case 338 /* JSDocLinkPlain */: return checkJSDocLinkLikeTag(node); - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: return checkJSDocParameterTag(node); - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: return checkJSDocPropertyTag(node); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: checkJSDocFunctionType(node); - case 324 /* JSDocNonNullableType */: - case 323 /* JSDocNullableType */: - case 321 /* JSDocAllType */: - case 322 /* JSDocUnknownType */: - case 331 /* JSDocTypeLiteral */: + case 327 /* JSDocNonNullableType */: + case 326 /* JSDocNullableType */: + case 324 /* JSDocAllType */: + case 325 /* JSDocUnknownType */: + case 334 /* JSDocTypeLiteral */: checkJSDocTypeIsInJsFile(node); forEachChild(node, checkSourceElement); return; - case 327 /* JSDocVariadicType */: + case 330 /* JSDocVariadicType */: checkJSDocVariadicType(node); return; - case 318 /* JSDocTypeExpression */: + case 321 /* JSDocTypeExpression */: return checkSourceElement(node.type); - case 342 /* JSDocPublicTag */: - case 344 /* JSDocProtectedTag */: - case 343 /* JSDocPrivateTag */: + case 345 /* JSDocPublicTag */: + case 347 /* JSDocProtectedTag */: + case 346 /* JSDocPrivateTag */: return checkJSDocAccessibilityModifiers(node); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return checkIndexedAccessType(node); - case 200 /* MappedType */: + case 202 /* MappedType */: return checkMappedType(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 242 /* Block */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 274 /* ModuleBlock */: return checkBlock(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return checkVariableStatement(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return checkExpressionStatement(node); - case 246 /* IfStatement */: + case 248 /* IfStatement */: return checkIfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return checkDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return checkWhileStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return checkForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return checkForInStatement(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return checkForOfStatement(node); - case 252 /* ContinueStatement */: - case 253 /* BreakStatement */: + case 254 /* ContinueStatement */: + case 255 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return checkReturnStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return checkWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return checkSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return checkLabeledStatement(node); - case 258 /* ThrowStatement */: + case 260 /* ThrowStatement */: return checkThrowStatement(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return checkTryStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return checkBindingElement(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return checkClassDeclaration(node); - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return checkStructDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return checkAnnotationDeclaration(node); - case 267 /* InterfaceDeclaration */: + case 269 /* OverloadDeclaration */: + return; + case 270 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return checkImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return checkExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return checkExportAssignment(node); - case 243 /* EmptyStatement */: - case 260 /* DebuggerStatement */: + case 245 /* EmptyStatement */: + case 262 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 285 /* MissingDeclaration */: + case 288 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -78793,33 +78971,33 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { currentNode = node; instantiationCount = 0; switch (node.kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 169 /* Decorator */: - case 289 /* JsxOpeningElement */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 217 /* TaggedTemplateExpression */: + case 170 /* Decorator */: + case 292 /* JsxOpeningElement */: resolveUntypedCall(node); break; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: checkAccessorDeclaration(node); break; - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: checkClassExpressionDeferred(node); break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: checkTypeParameterDeferred(node); break; - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: checkJsxSelfClosingElementDeferred(node); break; - case 287 /* JsxElement */: + case 290 /* JsxElement */: checkJsxElementDeferred(node); break; } @@ -78983,27 +79161,27 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { copySymbols(location2.locals, meaning); } switch (location2.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (!isExternalModule(location2)) break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: copyLocallyVisibleExportSymbols(getSymbolOfNode(location2).exports, meaning & 2623475 /* ModuleMember */); break; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: copySymbols(getSymbolOfNode(location2).exports, meaning & 8 /* EnumMember */); break; - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: const className = location2.name; if (className) { copySymbol(location2.symbol, meaning); } - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: if (!isStaticSymbol) { copySymbols(getMembersOfSymbol(getSymbolOfNode(location2)), meaning & 788968 /* Type */); } break; - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: const funcName = location2.name; if (funcName) { copySymbol(location2.symbol, meaning); @@ -79036,7 +79214,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function copyLocallyVisibleExportSymbols(source, meaning2) { if (meaning2) { source.forEach((symbol) => { - if (!getDeclarationOfKind(symbol, 284 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 283 /* NamespaceExport */)) { + if (!getDeclarationOfKind(symbol, 287 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 286 /* NamespaceExport */)) { copySymbol(symbol, meaning2); } }); @@ -79047,16 +79225,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return name.kind === 79 /* Identifier */ && isTypeDeclaration(name.parent) && getNameOfDeclaration(name.parent) === name; } function isTypeReferenceIdentifier(node) { - while (node.parent.kind === 165 /* QualifiedName */) { + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 183 /* TypeReference */; + return node.parent.kind === 185 /* TypeReference */; } function isHeritageClauseElementIdentifier(node) { - while (node.parent.kind === 211 /* PropertyAccessExpression */) { + while (node.parent.kind === 213 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent.kind === 234 /* ExpressionWithTypeArguments */; + return node.parent.kind === 236 /* ExpressionWithTypeArguments */; } function forEachEnclosingClass(node, callback) { let result; @@ -79083,13 +79261,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return !!forEachEnclosingClass(node, (n) => n === classDeclaration); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 165 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 166 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 274 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 277 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } - if (nodeOnRightSide.parent.kind === 280 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 283 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } return void 0; @@ -79115,7 +79293,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { node = parent2; parent2 = parent2.parent; } - if (parent2 && parent2.kind === 205 /* ImportType */ && parent2.qualifier === node) { + if (parent2 && parent2.kind === 207 /* ImportType */ && parent2.qualifier === node) { return parent2; } return void 0; @@ -79124,7 +79302,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isDeclarationName(name)) { return getSymbolOfNode(name.parent); } - if (isInJSFile(name) && name.parent.kind === 211 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { + if (isInJSFile(name) && name.parent.kind === 213 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { if (!isPrivateIdentifier(name) && !isJSDocMemberName(name)) { const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(name); if (specialPropertyAssignmentSymbol) { @@ -79132,7 +79310,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - if (name.parent.kind === 280 /* ExportAssignment */ && isEntityNameExpression(name)) { + if (name.parent.kind === 283 /* ExportAssignment */ && isEntityNameExpression(name)) { const success = resolveEntityName( name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, @@ -79142,7 +79320,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return success; } } else if (isEntityName(name) && isInRightSideOfImportOrExportAssignment(name)) { - const importEqualsDeclaration = getAncestor(name, 274 /* ImportEqualsDeclaration */); + const importEqualsDeclaration = getAncestor(name, 277 /* ImportEqualsDeclaration */); Debug.assert(importEqualsDeclaration !== void 0); return getSymbolOfPartOfRightHandSideOfImportEquals(name, true); } @@ -79159,7 +79337,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (isHeritageClauseElementIdentifier(name)) { let meaning = 0 /* None */; - if (name.parent.kind === 234 /* ExpressionWithTypeArguments */) { + if (name.parent.kind === 236 /* ExpressionWithTypeArguments */) { meaning = 788968 /* Type */; if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) { meaning |= 111551 /* Value */; @@ -79173,10 +79351,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return entityNameSymbol; } } - if (name.parent.kind === 349 /* JSDocParameterTag */) { + if (name.parent.kind === 352 /* JSDocParameterTag */) { return getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 167 /* TypeParameter */ && name.parent.parent.kind === 353 /* JSDocTemplateTag */) { + if (name.parent.kind === 168 /* TypeParameter */ && name.parent.parent.kind === 356 /* JSDocTemplateTag */) { Debug.assert(!isInJSFile(name)); const typeParameter = getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -79208,12 +79386,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return result; } else if (isPrivateIdentifier(name)) { return getSymbolForPrivateIdentifierExpression(name); - } else if (name.kind === 211 /* PropertyAccessExpression */ || name.kind === 165 /* QualifiedName */) { + } else if (name.kind === 213 /* PropertyAccessExpression */ || name.kind === 166 /* QualifiedName */) { const links = getNodeLinks(name); if (links.resolvedSymbol) { return links.resolvedSymbol; } - if (name.kind === 211 /* PropertyAccessExpression */) { + if (name.kind === 213 /* PropertyAccessExpression */) { checkPropertyAccessExpression(name, 0 /* Normal */); if (!links.resolvedSymbol) { const expressionType = checkExpressionCached(name.expression); @@ -79253,11 +79431,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return resolveJSDocMemberName(name); } } else if (isTypeReferenceIdentifier(name)) { - const meaning = name.parent.kind === 183 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; + const meaning = name.parent.kind === 185 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; const symbol = resolveEntityName(name, meaning, true, true); return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name); } - if (name.parent.kind === 182 /* TypePredicate */) { + if (name.parent.kind === 184 /* TypePredicate */) { return resolveEntityName(name, 1 /* FunctionScopedVariable */, true); } return void 0; @@ -79282,7 +79460,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getSymbolAtLocation(node, ignoreErrors) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { return isExternalModule(node) ? getMergedSymbol(node.symbol) : void 0; } const { parent: parent2 } = node; @@ -79299,7 +79477,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.kind === 79 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); - } else if (parent2.kind === 208 /* BindingElement */ && grandParent.kind === 206 /* ObjectBindingPattern */ && node === parent2.propertyName) { + } else if (parent2.kind === 210 /* BindingElement */ && grandParent.kind === 208 /* ObjectBindingPattern */ && node === parent2.propertyName) { const typeOfPattern = getTypeOfNode(grandParent); const propertyDeclaration = getPropertyOfType(typeOfPattern, node.escapedText); if (propertyDeclaration) { @@ -79318,8 +79496,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (node.kind) { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 211 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: if (!isThisInTypeQuery(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); } @@ -79334,19 +79512,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isInExpressionContext(node)) { return checkExpression(node).symbol; } - case 197 /* ThisType */: + case 199 /* ThisType */: return getTypeFromThisTypeNode(node).symbol; case 107 /* SuperKeyword */: return checkExpression(node).symbol; case 136 /* ConstructorKeyword */: const constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 176 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 178 /* 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 === 275 /* ImportDeclaration */ || node.parent.kind === 281 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && isRequireCall(node.parent, false) || isImportCall(node.parent)) || isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent) { + if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 278 /* ImportDeclaration */ || node.parent.kind === 284 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && isRequireCall(node.parent, false) || isImportCall(node.parent)) || isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent) { return resolveExternalModuleName(node, node, ignoreErrors); } if (isCallExpression(parent2) && isBindableObjectDefinePropertyCall(parent2) && parent2.arguments[1] === node) { @@ -79360,14 +79538,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 38 /* EqualsGreaterThanToken */: case 84 /* ClassKeyword */: return getSymbolOfNode(node.parent); - case 205 /* ImportType */: + case 207 /* ImportType */: return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : void 0; case 94 /* ExportKeyword */: return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0; case 101 /* ImportKeyword */: case 104 /* NewKeyword */: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return checkExpression(node).symbol; default: return void 0; @@ -79383,7 +79561,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return void 0; } function getShorthandAssignmentValueSymbol(location2) { - if (location2 && location2.kind === 306 /* ShorthandPropertyAssignment */) { + if (location2 && location2.kind === 309 /* ShorthandPropertyAssignment */) { return resolveEntityName(location2.name, 111551 /* Value */ | 2097152 /* Alias */, true); } return void 0; @@ -79468,16 +79646,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getTypeOfNode(node); } function getTypeOfAssignmentPattern(expr) { - Debug.assert(expr.kind === 210 /* ObjectLiteralExpression */ || expr.kind === 209 /* ArrayLiteralExpression */); - if (expr.parent.kind === 251 /* ForOfStatement */) { + Debug.assert(expr.kind === 212 /* ObjectLiteralExpression */ || expr.kind === 211 /* ArrayLiteralExpression */); + if (expr.parent.kind === 253 /* ForOfStatement */) { const iteratedType = checkRightHandSideOfForOf(expr.parent); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 227 /* BinaryExpression */) { + if (expr.parent.kind === 229 /* BinaryExpression */) { const iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 305 /* PropertyAssignment */) { + if (expr.parent.kind === 308 /* PropertyAssignment */) { const node2 = cast(expr.parent.parent, isObjectLiteralExpression); const typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node2) || errorType; const propertyIndex = indexOfNode(node2.properties, expr.parent); @@ -79510,7 +79688,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 8 /* NumericLiteral */: case 10 /* StringLiteral */: return getStringLiteralType(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: const nameType = checkComputedPropertyName(name); return isTypeAssignableToKind(nameType, 12288 /* ESSymbolLike */) ? nameType : stringType; default: @@ -79601,7 +79779,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 314 /* SourceFile */) { + if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 317 /* SourceFile */) { const symbolFile = parentSymbol.valueDeclaration; const referenceFile = getSourceFileOfNode(node); const symbolIsUmdExport = symbolFile !== referenceFile; @@ -79626,7 +79804,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return void 0; } function isSymbolOfDestructuredElementOfCatchBinding(symbol) { - return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 301 /* CatchClause */; + return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 304 /* CatchClause */; } function isSymbolOfDeclarationWithCollidingName(symbol) { if (symbol.flags & 418 /* BlockScoped */ && symbol.valueDeclaration && !isSourceFile(symbol.valueDeclaration)) { @@ -79640,7 +79818,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else if (nodeLinks2.flags & 262144 /* CapturedBlockScopedBinding */) { const isDeclaredInLoop = nodeLinks2.flags & 524288 /* BlockScopedBindingInLoop */; const inLoopInitializer = isIterationStatement(container, false); - const inLoopBodyBlock = container.kind === 242 /* Block */ && isIterationStatement(container.parent, false); + const inLoopBodyBlock = container.kind === 244 /* Block */ && isIterationStatement(container.parent, false); links.isDeclarationWithCollidingName = !isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || !inLoopInitializer && !inLoopBodyBlock); } else { links.isDeclarationWithCollidingName = false; @@ -79675,25 +79853,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isValueAliasDeclaration(node) { switch (node.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return isAliasResolvedToValue(getSymbolOfNode(node)); - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: const symbol = getSymbolOfNode(node); return !!symbol && isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: const exportClause = node.exportClause; return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration)); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return node.expression && node.expression.kind === 79 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfNode(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(nodeIn) { const node = getParseTreeNode(nodeIn, isImportEqualsDeclaration); - if (node === void 0 || node.parent.kind !== 314 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { + if (node === void 0 || node.parent.kind !== 317 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { return false; } const isValue = isAliasResolvedToValue(getSymbolOfNode(node)); @@ -79782,15 +79960,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function canHaveConstantValue(node) { switch (node.kind) { - case 308 /* EnumMember */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 311 /* EnumMember */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return true; } return false; } function getConstantValue2(node) { - if (node.kind === 308 /* EnumMember */) { + if (node.kind === 311 /* EnumMember */) { return getEnumMemberValue(node); } const symbol = getNodeLinks(node).resolvedSymbol; @@ -79988,7 +80166,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: ident = node.expression; break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: ident = node.expression; break; default: @@ -80095,12 +80273,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { getJsxFragmentFactoryEntity, getAllAccessorDeclarations(accessor) { accessor = getParseTreeNode(accessor, isGetOrSetAccessorDeclaration); - const otherKind = accessor.kind === 178 /* SetAccessor */ ? 177 /* GetAccessor */ : 178 /* SetAccessor */; + const otherKind = accessor.kind === 180 /* SetAccessor */ ? 179 /* GetAccessor */ : 180 /* SetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfNode(accessor), otherKind); const firstAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? otherAccessor : accessor; const secondAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? accessor : otherAccessor; - const setAccessor = accessor.kind === 178 /* SetAccessor */ ? accessor : otherAccessor; - const getAccessor = accessor.kind === 177 /* GetAccessor */ ? accessor : otherAccessor; + const setAccessor = accessor.kind === 180 /* SetAccessor */ ? accessor : otherAccessor; + const getAccessor = accessor.kind === 179 /* GetAccessor */ ? accessor : otherAccessor; return { firstAccessor, secondAccessor, @@ -80116,7 +80294,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }, getDeclarationStatementsForSourceFile: (node, flags, tracker, bundled) => { const n = getParseTreeNode(node); - Debug.assert(n && n.kind === 314 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); + Debug.assert(n && n.kind === 317 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); const sym = getSymbolOfNode(node); if (!sym) { return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled); @@ -80228,18 +80406,18 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function isInHeritageClause(node) { - return node.parent && node.parent.kind === 234 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 300 /* HeritageClause */; + return node.parent && node.parent.kind === 236 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 303 /* HeritageClause */; } function getTypeReferenceDirectivesForEntityName(node) { if (!fileToDirective) { return void 0; } let meaning; - if (node.parent.kind === 166 /* ComputedPropertyName */) { + if (node.parent.kind === 167 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } else { meaning = 788968 /* Type */ | 1920 /* Namespace */; - if (node.kind === 79 /* Identifier */ && isInTypeQuery(node) || node.kind === 211 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { + if (node.kind === 79 /* Identifier */ && isInTypeQuery(node) || node.kind === 213 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } } @@ -80277,7 +80455,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 314 /* SourceFile */ && current.flags & 512 /* ValueModule */) { + if (current.valueDeclaration && current.valueDeclaration.kind === 317 /* SourceFile */ && current.flags & 512 /* ValueModule */) { return false; } for (const decl of symbol.declarations) { @@ -80302,12 +80480,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getExternalModuleFileFromDeclaration(declaration) { - const specifier = declaration.kind === 270 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); + const specifier = declaration.kind === 273 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); const moduleSymbol = resolveExternalModuleNameWorker(specifier, specifier, void 0); if (!moduleSymbol) { return void 0; } - return getDeclarationOfKind(moduleSymbol, 314 /* SourceFile */); + return getDeclarationOfKind(moduleSymbol, 317 /* SourceFile */); } function initializeTypeChecker() { for (const file of host.getSourceFiles()) { @@ -80536,7 +80714,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; } if (!nodeCanBeDecorated(node, node.parent, node.parent.parent, compilerOptions)) { - const isMethodDeclarationAndNodeIsNotPresent = node.kind === 174 /* MethodDeclaration */ && !nodeIsPresent(node.body); + const isMethodDeclarationAndNodeIsNotPresent = node.kind === 176 /* MethodDeclaration */ && !nodeIsPresent(node.body); const message = isMethodDeclarationAndNodeIsNotPresent ? Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload : Diagnostics.Decorators_are_not_valid_here; for (const decorator of decorators) { if (!grammarErrorOnNode(decorator, message)) { @@ -80544,7 +80722,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } return true; - } else if (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */) { + } else if (node.kind === 179 /* GetAccessor */ || node.kind === 180 /* 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); @@ -80564,21 +80742,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue; } if (modifier.kind !== 147 /* ReadonlyKeyword */) { - if (node.kind === 170 /* PropertySignature */ || node.kind === 173 /* MethodSignature */) { + if (node.kind === 171 /* PropertySignature */ || node.kind === 175 /* MethodSignature */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_member, tokenToString(modifier.kind)); } - if (node.kind === 181 /* IndexSignature */ && (modifier.kind !== 125 /* StaticKeyword */ || !isClassLike(node.parent))) { + if (node.kind === 183 /* 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 !== 102 /* InKeyword */ && modifier.kind !== 146 /* OutKeyword */) { - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_parameter, tokenToString(modifier.kind)); } } switch (modifier.kind) { case 86 /* ConstKeyword */: - if (node.kind !== 269 /* EnumDeclaration */) { + if (node.kind !== 272 /* EnumDeclaration */) { return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(86 /* ConstKeyword */)); } break; @@ -80613,7 +80791,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 271 /* ModuleBlock */ || node.parent.kind === 314 /* SourceFile */) { + } else if (node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 317 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 256 /* Abstract */) { if (modifier.kind === 122 /* PrivateKeyword */) { @@ -80635,9 +80813,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 271 /* ModuleBlock */ || node.parent.kind === 314 /* SourceFile */) { + } else if (node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 317 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* 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"); @@ -80654,7 +80832,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 171 /* PropertyDeclaration */) { + } else if (node.kind !== 172 /* PropertyDeclaration */) { return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); } flags |= 128 /* Accessor */; @@ -80662,7 +80840,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 147 /* ReadonlyKeyword */: if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); - } else if (node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 170 /* PropertySignature */ && node.kind !== 181 /* IndexSignature */ && node.kind !== 168 /* Parameter */) { + } else if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 183 /* IndexSignature */ && node.kind !== 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } flags |= 64 /* Readonly */; @@ -80678,14 +80856,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 1 /* Export */; break; case 89 /* DefaultKeyword */: - const container = node.parent.kind === 314 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 270 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 317 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 273 /* 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"); @@ -80701,9 +80879,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); - } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 271 /* ModuleBlock */) { + } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 274 /* 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"); @@ -80715,11 +80893,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 264 /* ClassDeclaration */ && node.kind !== 185 /* ConstructorType */) { - if (node.kind !== 174 /* MethodDeclaration */ && node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 177 /* GetAccessor */ && node.kind !== 178 /* SetAccessor */) { + if (node.kind !== 266 /* ClassDeclaration */ && node.kind !== 187 /* ConstructorType */) { + if (node.kind !== 176 /* MethodDeclaration */ && node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 179 /* GetAccessor */ && node.kind !== 180 /* SetAccessor */) { return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 264 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { + if (!(node.parent.kind === 266 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { return grammarErrorOnNode(modifier, Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 32 /* Static */) { @@ -80748,7 +80926,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } if (flags & 256 /* Abstract */) { @@ -80761,7 +80939,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 146 /* OutKeyword */: const inOutFlag = modifier.kind === 102 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; const inOutText = modifier.kind === 102 /* InKeyword */ ? "in" : "out"; - if (node.kind !== 167 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { + if (node.kind !== 168 /* 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) { @@ -80774,7 +80952,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { break; } } - if (node.kind === 176 /* Constructor */) { + if (node.kind === 178 /* Constructor */) { if (flags & 32 /* Static */) { return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -80785,11 +80963,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } return false; - } else if ((node.kind === 275 /* ImportDeclaration */ || node.kind === 274 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + } else if ((node.kind === 278 /* ImportDeclaration */ || node.kind === 277 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 168 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { + } else if (node.kind === 169 /* 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 === 168 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { + } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 512 /* Async */) { @@ -80802,49 +80980,51 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function shouldReportBadModifier(node) { switch (node.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 270 /* ModuleDeclaration */: - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 168 /* Parameter */: - case 167 /* TypeParameter */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 178 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* OverloadPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 183 /* IndexSignature */: + case 273 /* ModuleDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 169 /* Parameter */: + case 168 /* TypeParameter */: return false; - case 175 /* ClassStaticBlockDeclaration */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 273 /* NamespaceExportDeclaration */: - case 184 /* FunctionType */: - case 285 /* MissingDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 276 /* NamespaceExportDeclaration */: + case 186 /* FunctionType */: + case 288 /* MissingDeclaration */: return true; default: - if (node.parent.kind === 271 /* ModuleBlock */ || node.parent.kind === 314 /* SourceFile */) { + if (node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 317 /* SourceFile */) { return false; } switch (node.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return nodeHasAnyModifiersExcept(node, 133 /* AsyncKeyword */); - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 185 /* ConstructorType */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 187 /* ConstructorType */: return nodeHasAnyModifiersExcept(node, 127 /* AbstractKeyword */); - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 244 /* VariableStatement */: - case 268 /* TypeAliasDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 246 /* VariableStatement */: + case 271 /* TypeAliasDeclaration */: return true; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return nodeHasAnyModifiersExcept(node, 86 /* ConstKeyword */); default: Debug.assertNever(node); @@ -80862,10 +81042,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return false; } return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -81078,11 +81258,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 166 /* ComputedPropertyName */) { + if (node.kind !== 167 /* ComputedPropertyName */) { return false; } const computedPropertyName = node; - if (computedPropertyName.expression.kind === 227 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 27 /* CommaToken */) { + if (computedPropertyName.expression.kind === 229 /* 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; @@ -81090,7 +81270,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkGrammarForGenerator(node) { if (node.asteriskToken) { Debug.assert( - node.kind === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */ || node.kind === 174 /* MethodDeclaration */ + node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */ || node.kind === 176 /* MethodDeclaration */ ); if (node.flags & 16777216 /* Ambient */) { return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_allowed_in_an_ambient_context); @@ -81109,7 +81289,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkGrammarObjectLiteralExpression(node, inDestructuring) { const seen = new Map2(); for (const prop of node.properties) { - if (prop.kind === 307 /* SpreadAssignment */) { + if (prop.kind === 310 /* SpreadAssignment */) { if (inDestructuring) { const expression = skipParentheses(prop.expression); if (isArrayLiteralExpression(expression) || isObjectLiteralExpression(expression)) { @@ -81119,10 +81299,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue; } const name = prop.name; - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { checkGrammarComputedPropertyName(name); } - if (prop.kind === 306 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 309 /* 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 */) { @@ -81130,7 +81310,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (canHaveModifiers(prop) && prop.modifiers) { for (const mod of prop.modifiers) { - if (isModifier(mod) && (mod.kind !== 133 /* AsyncKeyword */ || prop.kind !== 174 /* MethodDeclaration */)) { + if (isModifier(mod) && (mod.kind !== 133 /* AsyncKeyword */ || prop.kind !== 176 /* MethodDeclaration */)) { grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod)); } } @@ -81141,8 +81321,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let currentKind; switch (prop.kind) { - case 306 /* ShorthandPropertyAssignment */: - case 305 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 308 /* 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 */) { @@ -81150,13 +81330,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } currentKind = 4 /* PropertyAssignment */; break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: currentKind = 8 /* Method */; break; - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: currentKind = 1 /* GetAccessor */; break; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: currentKind = 2 /* SetAccessor */; break; default: @@ -81193,7 +81373,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkGrammarTypeArguments(node, node.typeArguments); const seen = new Map2(); for (const attr of node.attributes.properties) { - if (attr.kind === 296 /* JsxSpreadAttribute */) { + if (attr.kind === 299 /* JsxSpreadAttribute */) { continue; } const { name, initializer } = attr; @@ -81202,7 +81382,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { return grammarErrorOnNode(name, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } - if (initializer && initializer.kind === 297 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 300 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(initializer, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -81237,7 +81417,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 251 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { + if (forInOrOfStatement.kind === 253 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { if (!(forInOrOfStatement.flags & 32768 /* AwaitContext */)) { const sourceFile = getSourceFileOfNode(forInOrOfStatement); if (isInTopLevelContext(forInOrOfStatement)) { @@ -81277,7 +81457,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 176 /* Constructor */) { + if (func && func.kind !== 178 /* 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); @@ -81293,7 +81473,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { grammarErrorOnNode(forInOrOfStatement.initializer, Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async); return false; } - if (forInOrOfStatement.initializer.kind === 262 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 264 /* VariableDeclarationList */) { const variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { const declarations = variableList.declarations; @@ -81301,16 +81481,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } if (declarations.length > 1) { - const diagnostic = forInOrOfStatement.kind === 250 /* 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 === 252 /* 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 === 250 /* 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 === 252 /* 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 === 250 /* 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 === 252 /* 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); } } @@ -81318,7 +81498,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function checkGrammarAccessor(accessor) { - if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 187 /* TypeLiteral */ && accessor.parent.kind !== 267 /* InterfaceDeclaration */) { + if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 189 /* TypeLiteral */ && accessor.parent.kind !== 270 /* InterfaceDeclaration */) { if (languageVersion < 1 /* ES5 */) { return grammarErrorOnNode(accessor.name, Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); } @@ -81333,7 +81513,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (hasSyntacticModifier(accessor, 256 /* Abstract */)) { return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } - if (accessor.parent.kind === 187 /* TypeLiteral */ || accessor.parent.kind === 267 /* InterfaceDeclaration */) { + if (accessor.parent.kind === 189 /* TypeLiteral */ || accessor.parent.kind === 270 /* InterfaceDeclaration */) { return grammarErrorOnNode(accessor.body, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } } @@ -81343,10 +81523,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!doesAccessorHaveCorrectParameterCount(accessor)) { return grammarErrorOnNode( accessor.name, - accessor.kind === 177 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter + accessor.kind === 179 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter ); } - if (accessor.kind === 178 /* SetAccessor */) { + if (accessor.kind === 180 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -81364,10 +81544,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 179 /* GetAccessor */ ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 179 /* GetAccessor */ ? 1 : 2)) { return getThisParameter(accessor); } } @@ -81384,7 +81564,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } switch (parent2.kind) { - case 261 /* VariableDeclaration */: + case 263 /* 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); @@ -81396,12 +81576,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return grammarErrorOnNode(parent2.name, Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const); } break; - case 171 /* PropertyDeclaration */: + case 172 /* 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 170 /* PropertySignature */: + case 171 /* 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); } @@ -81410,7 +81590,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_not_allowed_here); } } else if (node.operator === 147 /* ReadonlyKeyword */) { - if (node.type.kind !== 188 /* ArrayType */ && node.type.kind !== 189 /* TupleType */) { + if (node.type.kind !== 190 /* ArrayType */ && node.type.kind !== 191 /* TupleType */) { return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(154 /* SymbolKeyword */)); } } @@ -81424,8 +81604,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (checkGrammarFunctionLikeDeclaration(node)) { return true; } - if (node.kind === 174 /* MethodDeclaration */) { - if (node.parent.kind === 210 /* ObjectLiteralExpression */) { + if (node.kind === 176 /* MethodDeclaration */) { + if (node.parent.kind === 212 /* 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)) { @@ -81446,12 +81626,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } 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 === 174 /* MethodDeclaration */ && !node.body) { + } else if (node.kind === 176 /* 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 === 267 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 270 /* 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 === 187 /* TypeLiteral */) { + } else if (node.parent.kind === 189 /* 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); } } @@ -81462,17 +81642,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: if (node.label && current.label.escapedText === node.label.escapedText) { - const isMisplacedContinueLabel = node.kind === 252 /* ContinueStatement */ && !isIterationStatement(current.statement, true); + const isMisplacedContinueLabel = node.kind === 254 /* ContinueStatement */ && !isIterationStatement(current.statement, true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); } return false; } break; - case 256 /* SwitchStatement */: - if (node.kind === 253 /* BreakStatement */ && !node.label) { + case 258 /* SwitchStatement */: + if (node.kind === 255 /* BreakStatement */ && !node.label) { return false; } break; @@ -81485,10 +81665,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { current = current.parent; } if (node.label) { - const message = node.kind === 253 /* 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 === 255 /* 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 === 253 /* 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 === 255 /* 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); } } @@ -81508,10 +81688,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function isStringOrNumberLiteralExpression(expr) { - return isStringOrNumericLiteralLike(expr) || expr.kind === 225 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; + return isStringOrNumericLiteralLike(expr) || expr.kind === 227 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; } function isBigIntLiteralExpression(expr) { - return expr.kind === 9 /* BigIntLiteral */ || expr.kind === 225 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 9 /* BigIntLiteral */; + return expr.kind === 9 /* BigIntLiteral */ || expr.kind === 227 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 9 /* BigIntLiteral */; } function isSimpleLiteralEnumReference(expr) { if ((isPropertyAccessExpression(expr) || isElementAccessExpression(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) { @@ -81533,7 +81713,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 250 /* ForInStatement */ && node.parent.parent.kind !== 251 /* ForOfStatement */) { + if (node.parent.parent.kind !== 252 /* ForInStatement */ && node.parent.parent.kind !== 253 /* ForOfStatement */) { if (node.flags & 16777216 /* Ambient */) { checkAmbientInitializer(node); } else if (!node.initializer) { @@ -81545,7 +81725,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - if (node.exclamationToken && (node.parent.parent.kind !== 244 /* VariableStatement */ || !node.type || node.initializer || node.flags & 16777216 /* Ambient */)) { + if (node.exclamationToken && (node.parent.parent.kind !== 246 /* 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); } @@ -81597,15 +81777,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function allowLetAndConstDeclarations(parent2) { switch (parent2.kind) { - case 246 /* IfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 255 /* WithStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 248 /* IfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 257 /* WithStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: return false; - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return allowLetAndConstDeclarations(parent2.parent); } return true; @@ -81707,7 +81887,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) { return true; } - } else if (node.parent.kind === 267 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 270 /* 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; } @@ -81733,14 +81913,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 267 /* InterfaceDeclaration */ || node.kind === 268 /* TypeAliasDeclaration */ || node.kind === 275 /* ImportDeclaration */ || node.kind === 274 /* ImportEqualsDeclaration */ || node.kind === 281 /* ExportDeclaration */ || node.kind === 280 /* ExportAssignment */ || node.kind === 273 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { + if (node.kind === 270 /* InterfaceDeclaration */ || node.kind === 271 /* TypeAliasDeclaration */ || node.kind === 278 /* ImportDeclaration */ || node.kind === 277 /* ImportEqualsDeclaration */ || node.kind === 284 /* ExportDeclaration */ || node.kind === 283 /* ExportAssignment */ || node.kind === 276 /* 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 === 244 /* VariableStatement */) { + if (isDeclaration(decl) || decl.kind === 246 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -81757,7 +81937,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 242 /* Block */ || node.parent.kind === 271 /* ModuleBlock */ || node.parent.kind === 314 /* SourceFile */) { + if (node.parent.kind === 244 /* Block */ || node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 317 /* SourceFile */) { const links2 = getNodeLinks(node.parent); if (!links2.hasReportedStatementInAmbientContext) { return links2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -81772,9 +81952,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 201 /* LiteralType */)) { + } else if (isChildOfNodeWithKind(node, 203 /* LiteralType */)) { diagnosticMessage = Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0; - } else if (isChildOfNodeWithKind(node, 308 /* EnumMember */)) { + } else if (isChildOfNodeWithKind(node, 311 /* EnumMember */)) { diagnosticMessage = Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0; } if (diagnosticMessage) { @@ -81834,7 +82014,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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) === 278 /* NamedImports */) { + if (node.isTypeOnly && ((_a2 = node.namedBindings) == null ? void 0 : _a2.kind) === 281 /* NamedImports */) { return checkGrammarNamedImportsOrExports(node.namedBindings); } return false; @@ -81844,7 +82024,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (specifier.isTypeOnly) { return grammarErrorOnFirstToken( specifier, - specifier.kind === 279 /* 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 === 282 /* 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 ); } }); @@ -81953,12 +82133,12 @@ function isNotAccessor(declaration) { return !isAccessor(declaration); } function isNotOverload(declaration) { - return declaration.kind !== 263 /* FunctionDeclaration */ && declaration.kind !== 174 /* MethodDeclaration */ || !!declaration.body; + return declaration.kind !== 265 /* FunctionDeclaration */ && declaration.kind !== 176 /* MethodDeclaration */ || !!declaration.body; } function isDeclarationNameOrImportPropertyName(name) { switch (name.parent.kind) { - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return isIdentifier(name); default: return isDeclarationName(name); @@ -82236,20 +82416,20 @@ var visitEachChildTable = { nodesVisitor(node.typeArguments, visitor, isTypeNodeOrTypeParameterDeclaration) ); }, - [165 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [166 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateQualifiedName( node, nodeVisitor(node.left, visitor, isEntityName), nodeVisitor(node.right, visitor, isIdentifier) ); }, - [166 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [167 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateComputedPropertyName( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [167 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [168 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82258,7 +82438,7 @@ var visitEachChildTable = { nodeVisitor(node.default, visitor, isTypeNode) ); }, - [168 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [169 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -82269,14 +82449,14 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [169 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [170 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDecorator( node, nodeVisitor(node.expression, visitor, isExpression), node.annotationDeclaration ); }, - [170 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [171 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertySignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82285,7 +82465,16 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [171 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [174 /* OverloadPropertyDeclaration */]: function visitEachChildOfOverloadPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + return context.factory.updateOverloadPropertyDeclaration( + node, + nodesVisitor(node.modifiers, visitor, isModifier), + nodeVisitor(node.name, visitor, isPropertyName), + nodeVisitor(node.questionToken, tokenVisitor, isToken), + nodeVisitor(node.type, visitor, isTypeNode) + ); + }, + [172 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { var _a2; return context.factory.updatePropertyDeclaration( node, @@ -82296,7 +82485,7 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [172 /* AnnotationPropertyDeclaration */]: function visitEachChildOfAnnotationPropertyDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [173 /* AnnotationPropertyDeclaration */]: function visitEachChildOfAnnotationPropertyDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAnnotationPropertyDeclaration( node, nodeVisitor(node.name, visitor, isPropertyName), @@ -82304,7 +82493,7 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [173 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [175 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82315,7 +82504,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [174 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [176 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -82328,7 +82517,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [176 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [178 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82336,7 +82525,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [177 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [179 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { if (context.isLexicalEnvironmentSuspended && context.isLexicalEnvironmentSuspended()) { return context.factory.updateGetAccessorDeclaration( node, @@ -82357,7 +82546,7 @@ var visitEachChildTable = { ); } }, - [178 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [180 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { if (context.isLexicalEnvironmentSuspended && context.isLexicalEnvironmentSuspended()) { return context.factory.updateSetAccessorDeclaration( node, @@ -82376,7 +82565,7 @@ var visitEachChildTable = { ); } }, - [175 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [177 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { context.startLexicalEnvironment(); context.suspendLexicalEnvironment(); return context.factory.updateClassStaticBlockDeclaration( @@ -82384,7 +82573,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [179 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [181 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCallSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -82392,7 +82581,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [180 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [182 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -82400,7 +82589,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [181 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [183 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82408,7 +82597,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [182 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [184 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypePredicateNode( node, nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), @@ -82416,14 +82605,14 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [183 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [185 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeReferenceNode( node, nodeVisitor(node.typeName, visitor, isEntityName), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [184 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [186 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateFunctionTypeNode( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -82431,7 +82620,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [185 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [187 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorTypeNode( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82440,56 +82629,56 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [186 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [188 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeQueryNode( node, nodeVisitor(node.exprName, visitor, isEntityName), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [187 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [189 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTypeLiteralNode( node, nodesVisitor(node.members, visitor, isTypeElement) ); }, - [188 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [190 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateArrayTypeNode( node, nodeVisitor(node.elementType, visitor, isTypeNode) ); }, - [189 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [191 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTupleTypeNode( node, nodesVisitor(node.elements, visitor, isTypeNode) ); }, - [190 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [192 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateOptionalTypeNode( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [191 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [193 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateRestTypeNode( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [192 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [194 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateUnionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [193 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [195 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateIntersectionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [194 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [196 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConditionalTypeNode( node, nodeVisitor(node.checkType, visitor, isTypeNode), @@ -82498,13 +82687,13 @@ var visitEachChildTable = { nodeVisitor(node.falseType, visitor, isTypeNode) ); }, - [195 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [197 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInferTypeNode( node, nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration) ); }, - [205 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [207 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeNode( node, nodeVisitor(node.argument, visitor, isTypeNode), @@ -82514,14 +82703,14 @@ var visitEachChildTable = { node.isTypeOf ); }, - [304 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [307 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeAssertionContainer( node, nodeVisitor(node.assertClause, visitor, isAssertClause), node.multiLine ); }, - [202 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [204 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateNamedTupleMember( node, nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken), @@ -82530,26 +82719,26 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [196 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [198 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedType( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [198 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [200 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOperatorNode( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [199 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [201 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexedAccessTypeNode( node, nodeVisitor(node.objectType, visitor, isTypeNode), nodeVisitor(node.indexType, visitor, isTypeNode) ); }, - [200 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [202 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMappedTypeNode( node, nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken), @@ -82560,39 +82749,39 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [201 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [203 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLiteralTypeNode( node, nodeVisitor(node.literal, visitor, isExpression) ); }, - [203 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [205 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralType( node, nodeVisitor(node.head, visitor, isTemplateHead), nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) ); }, - [204 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [206 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralTypeSpan( node, nodeVisitor(node.type, visitor, isTypeNode), nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail) ); }, - [206 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [208 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectBindingPattern( node, nodesVisitor(node.elements, visitor, isBindingElement) ); }, - [207 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [209 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayBindingPattern( node, nodesVisitor(node.elements, visitor, isArrayBindingElement) ); }, - [208 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [210 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBindingElement( node, nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken), @@ -82601,19 +82790,19 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [209 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [211 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayLiteralExpression( node, nodesVisitor(node.elements, visitor, isExpression) ); }, - [210 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [212 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectLiteralExpression( node, nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) ); }, - [211 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [213 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82625,7 +82814,7 @@ var visitEachChildTable = { nodeVisitor(node.name, visitor, isMemberName) ); }, - [212 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [214 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isElementAccessChain(node) ? context.factory.updateElementAccessChain( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82637,7 +82826,7 @@ var visitEachChildTable = { nodeVisitor(node.argumentExpression, visitor, isExpression) ); }, - [213 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [215 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return isCallChain(node) ? context.factory.updateCallChain( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82651,7 +82840,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [220 /* EtsComponentExpression */]: function visitEachChildOfEtsComponentExpression(node, visitor, context, nodesVisitor, nodeVisitor) { + [222 /* EtsComponentExpression */]: function visitEachChildOfEtsComponentExpression(node, visitor, context, nodesVisitor, nodeVisitor) { return context.factory.updateEtsComponentExpression( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82659,7 +82848,7 @@ var visitEachChildTable = { nodeVisitor(node.body, visitor, isBlock) ); }, - [214 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [216 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNewExpression( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82667,7 +82856,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [215 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [217 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTaggedTemplateExpression( node, nodeVisitor(node.tag, visitor, isExpression), @@ -82675,20 +82864,20 @@ var visitEachChildTable = { nodeVisitor(node.template, visitor, isTemplateLiteral) ); }, - [216 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [218 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAssertion( node, nodeVisitor(node.type, visitor, isTypeNode), nodeVisitor(node.expression, visitor, isExpression) ); }, - [217 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [219 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [218 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [220 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionExpression( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82700,7 +82889,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [219 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [221 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateArrowFunction( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82711,43 +82900,43 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [221 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [223 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDeleteExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [222 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [224 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOfExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [223 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [225 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVoidExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [224 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [226 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAwaitExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [225 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [227 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePrefixUnaryExpression( node, nodeVisitor(node.operand, visitor, isExpression) ); }, - [226 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [228 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePostfixUnaryExpression( node, nodeVisitor(node.operand, visitor, isExpression) ); }, - [227 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [229 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBinaryExpression( node, nodeVisitor(node.left, visitor, isExpression), @@ -82755,7 +82944,7 @@ var visitEachChildTable = { nodeVisitor(node.right, visitor, isExpression) ); }, - [228 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [230 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateConditionalExpression( node, nodeVisitor(node.condition, visitor, isExpression), @@ -82765,27 +82954,27 @@ var visitEachChildTable = { nodeVisitor(node.whenFalse, visitor, isExpression) ); }, - [229 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [231 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateExpression( node, nodeVisitor(node.head, visitor, isTemplateHead), nodesVisitor(node.templateSpans, visitor, isTemplateSpan) ); }, - [230 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [232 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateYieldExpression( node, nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken), nodeVisitor(node.expression, visitor, isExpression) ); }, - [231 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [233 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadElement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [232 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [234 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -82795,28 +82984,28 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [234 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [236 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionWithTypeArguments( node, nodeVisitor(node.expression, visitor, isExpression), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [235 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [237 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAsExpression( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.type, visitor, isTypeNode) ); }, - [239 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [241 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSatisfiesExpression( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.type, visitor, isTypeNode) ); }, - [236 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [238 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return isOptionalChain(node) ? context.factory.updateNonNullChain( node, nodeVisitor(node.expression, visitor, isExpression) @@ -82825,39 +83014,39 @@ var visitEachChildTable = { nodeVisitor(node.expression, visitor, isExpression) ); }, - [237 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [239 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [240 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [242 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateSpan( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail) ); }, - [242 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [244 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [244 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [246 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVariableStatement( node, nodesVisitor(node.modifiers, visitor, isModifier), nodeVisitor(node.declarationList, visitor, isVariableDeclarationList) ); }, - [245 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [247 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [246 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [248 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIfStatement( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82865,21 +83054,21 @@ var visitEachChildTable = { nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) ); }, - [247 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [249 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDoStatement( node, visitIterationBody(node.statement, visitor, context, nodeVisitor), nodeVisitor(node.expression, visitor, isExpression) ); }, - [248 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [250 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWhileStatement( node, nodeVisitor(node.expression, visitor, isExpression), visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [249 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [251 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -82888,7 +83077,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [250 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [252 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForInStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -82896,7 +83085,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [251 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [253 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateForOfStatement( node, nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword), @@ -82905,52 +83094,52 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [252 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [254 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [253 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [255 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [254 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [256 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateReturnStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [255 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [257 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWithStatement( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock) ); }, - [256 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [258 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSwitchStatement( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.caseBlock, visitor, isCaseBlock) ); }, - [257 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [259 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, nodeVisitor(node.label, visitor, isIdentifier), nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock) ); }, - [258 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [260 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateThrowStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [259 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [261 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, nodeVisitor(node.tryBlock, visitor, isBlock), @@ -82958,7 +83147,7 @@ var visitEachChildTable = { nodeVisitor(node.finallyBlock, visitor, isBlock) ); }, - [261 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [263 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateVariableDeclaration( node, nodeVisitor(node.name, visitor, isBindingName), @@ -82967,13 +83156,13 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [262 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [264 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateVariableDeclarationList( node, nodesVisitor(node.declarations, visitor, isVariableDeclaration) ); }, - [263 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [265 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82985,7 +83174,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [264 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [266 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -82995,7 +83184,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [265 /* StructDeclaration */]: function visitEachChildOfStructDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [267 /* StructDeclaration */]: function visitEachChildOfStructDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateStructDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83005,7 +83194,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [266 /* AnnotationDeclaration */]: function visitEachChildOfAnnotationDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [268 /* AnnotationDeclaration */]: function visitEachChildOfAnnotationDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAnnotationDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83013,7 +83202,15 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isAnnotationElement) ); }, - [267 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [269 /* OverloadDeclaration */]: function visitEachChildOfOverloadDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + return context.factory.updateOverloadDeclaration( + node, + nodesVisitor(node.modifiers, visitor, isModifier), + nodeVisitor(node.name, visitor, isIdentifier), + nodesVisitor(node.members, visitor, isOverloadElement) + ); + }, + [270 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83023,7 +83220,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [268 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [271 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83032,7 +83229,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [269 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [272 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83040,7 +83237,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isEnumMember) ); }, - [270 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [273 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateModuleDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83048,25 +83245,25 @@ var visitEachChildTable = { nodeVisitor(node.body, visitor, isModuleBody) ); }, - [271 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [274 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateModuleBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [272 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [275 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCaseBlock( node, nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) ); }, - [273 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [276 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [274 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [277 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportEqualsDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83075,7 +83272,7 @@ var visitEachChildTable = { nodeVisitor(node.moduleReference, visitor, isModuleReference) ); }, - [275 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [278 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83084,21 +83281,21 @@ var visitEachChildTable = { nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [302 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [305 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateAssertClause( node, nodesVisitor(node.elements, visitor, isAssertEntry), node.multiLine ); }, - [303 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [306 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAssertEntry( node, nodeVisitor(node.name, visitor, isAssertionKey), nodeVisitor(node.value, visitor, isExpression) ); }, - [276 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [279 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, node.isTypeOnly, @@ -83106,25 +83303,25 @@ var visitEachChildTable = { nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, - [277 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [280 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [283 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [286 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [278 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [281 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedImports( node, nodesVisitor(node.elements, visitor, isImportSpecifier) ); }, - [279 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [282 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportSpecifier( node, node.isTypeOnly, @@ -83132,14 +83329,14 @@ var visitEachChildTable = { nodeVisitor(node.name, visitor, isIdentifier) ); }, - [280 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [283 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportAssignment( node, nodesVisitor(node.modifiers, visitor, isModifier), nodeVisitor(node.expression, visitor, isExpression) ); }, - [281 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [284 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83149,13 +83346,13 @@ var visitEachChildTable = { nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [282 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [285 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedExports( node, nodesVisitor(node.elements, visitor, isExportSpecifier) ); }, - [284 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [287 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportSpecifier( node, node.isTypeOnly, @@ -83163,13 +83360,13 @@ var visitEachChildTable = { nodeVisitor(node.name, visitor, isIdentifier) ); }, - [286 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [289 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExternalModuleReference( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [287 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [290 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxElement( node, nodeVisitor(node.openingElement, visitor, isJsxOpeningElement), @@ -83177,7 +83374,7 @@ var visitEachChildTable = { nodeVisitor(node.closingElement, visitor, isJsxClosingElement) ); }, - [288 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [291 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSelfClosingElement( node, nodeVisitor(node.tagName, visitor, isJsxTagNameExpression), @@ -83185,7 +83382,7 @@ var visitEachChildTable = { nodeVisitor(node.attributes, visitor, isJsxAttributes) ); }, - [289 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [292 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxOpeningElement( node, nodeVisitor(node.tagName, visitor, isJsxTagNameExpression), @@ -83193,13 +83390,13 @@ var visitEachChildTable = { nodeVisitor(node.attributes, visitor, isJsxAttributes) ); }, - [290 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [293 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxClosingElement( node, nodeVisitor(node.tagName, visitor, isJsxTagNameExpression) ); }, - [291 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [294 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxFragment( node, nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment), @@ -83207,97 +83404,97 @@ var visitEachChildTable = { nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment) ); }, - [294 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [297 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttribute( node, nodeVisitor(node.name, visitor, isIdentifier), nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) ); }, - [295 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [298 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttributes( node, nodesVisitor(node.properties, visitor, isJsxAttributeLike) ); }, - [296 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [299 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSpreadAttribute( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [297 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [300 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [298 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [301 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCaseClause( node, nodeVisitor(node.expression, visitor, isExpression), nodesVisitor(node.statements, visitor, isStatement) ); }, - [299 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [302 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateDefaultClause( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [300 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [303 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateHeritageClause( node, nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) ); }, - [301 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [304 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), nodeVisitor(node.block, visitor, isBlock) ); }, - [305 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [308 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePropertyAssignment( node, nodeVisitor(node.name, visitor, isPropertyName), nodeVisitor(node.initializer, visitor, isExpression) ); }, - [306 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [309 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, nodeVisitor(node.name, visitor, isIdentifier), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, - [307 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [310 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadAssignment( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [308 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [311 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumMember( node, nodeVisitor(node.name, visitor, isPropertyName), nodeVisitor(node.initializer, visitor, isExpression) ); }, - [314 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { + [317 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile( node, visitLexicalEnvironment(node.statements, visitor, context) ); }, - [359 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [362 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePartiallyEmittedExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [360 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [363 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCommaListExpression( node, nodesVisitor(node.elements, visitor, isExpression) @@ -83871,7 +84068,7 @@ function isNamedDefaultReference(e) { function chainBundle(context, transformSourceFile) { return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - return node.kind === 314 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 317 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -83914,7 +84111,7 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption let hasImportDefault = false; for (const node of sourceFile.statements) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: externalImports.push(node); if (!hasImportStar && getImportNeedsImportStarHelper(node)) { hasImportStar = true; @@ -83923,12 +84120,12 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption hasImportDefault = true; } break; - case 274 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 286 /* ExternalModuleReference */) { + case 277 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 289 /* ExternalModuleReference */) { externalImports.push(node); } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { externalImports.push(node); @@ -83951,19 +84148,19 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption addExportedNamesForExportDeclaration(node); } break; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { exportEquals = node; } break; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: if (hasSyntacticModifier(node, 1 /* Export */)) { for (const decl of node.declarationList.declarations) { exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames); } } break; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -83980,7 +84177,7 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption } } break; - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -84124,7 +84321,7 @@ function isStaticPropertyDeclaration(member) { return isPropertyDeclaration(member) && hasStaticModifier(member); } function isInitializedProperty(member) { - return member.kind === 171 /* PropertyDeclaration */ && member.initializer !== void 0; + return member.kind === 172 /* PropertyDeclaration */ && member.initializer !== void 0; } function isNonStaticMethodOrAccessorWithPrivateName(member) { return !isStatic(member) && (isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member)) && isPrivateIdentifier(member.name); @@ -84161,12 +84358,12 @@ function getAllDecoratorsOfClass(node) { } function getAllDecoratorsOfClassElement(member, parent2) { switch (member.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return getAllDecoratorsOfAccessors(member, parent2); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return getAllDecoratorsOfMethod(member); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return getAllDecoratorsOfProperty(member); default: return void 0; @@ -84638,8 +84835,8 @@ function transformTypeScript(context) { const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); + context.enableSubstitution(213 /* PropertyAccessExpression */); + context.enableSubstitution(214 /* ElementAccessExpression */); let currentSourceFile; let currentNamespace; let currentNamespaceContainerName; @@ -84650,14 +84847,14 @@ function transformTypeScript(context) { let applicableSubstitutions; return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - if (node.kind === 315 /* Bundle */) { + if (node.kind === 318 /* Bundle */) { return transformBundle(node); } return transformSourceFile(node); } function transformBundle(node) { return factory2.createBundle(node.sourceFiles.map(transformSourceFile), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 317 /* InputFiles */) { + if (prepend.kind === 320 /* InputFiles */) { return createUnparsedSourceFile(prepend, "js"); } return prepend; @@ -84688,22 +84885,22 @@ function transformTypeScript(context) { } function onBeforeVisitNode(node) { switch (node.kind) { - case 314 /* SourceFile */: - case 272 /* CaseBlock */: - case 271 /* ModuleBlock */: - case 242 /* Block */: + case 317 /* SourceFile */: + case 275 /* CaseBlock */: + case 274 /* ModuleBlock */: + case 244 /* Block */: currentLexicalScope = node; currentScopeFirstDeclarationsOfName = void 0; break; - case 264 /* ClassDeclaration */: - case 263 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 265 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 2 /* Ambient */)) { break; } if (node.name) { recordEmittedDeclarationInScope(node); } else { - Debug.assert(node.kind === 264 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); + Debug.assert(node.kind === 266 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); } break; } @@ -84722,10 +84919,10 @@ function transformTypeScript(context) { } function sourceElementVisitorWorker(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 280 /* ExportAssignment */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 283 /* ExportAssignment */: + case 284 /* ExportDeclaration */: return visitElidableStatement(node); default: return visitorWorker(node); @@ -84743,13 +84940,13 @@ function transformTypeScript(context) { return node; } switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return visitImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return visitExportAssignment(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return visitExportDeclaration(node); default: Debug.fail("Unhandled ellided statement"); @@ -84759,7 +84956,7 @@ function transformTypeScript(context) { return saveStateAndInvoke(node, namespaceElementVisitorWorker); } function namespaceElementVisitorWorker(node) { - if (node.kind === 281 /* ExportDeclaration */ || node.kind === 275 /* ImportDeclaration */ || node.kind === 276 /* ImportClause */ || node.kind === 274 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 286 /* ExternalModuleReference */) { + if (node.kind === 284 /* ExportDeclaration */ || node.kind === 278 /* ImportDeclaration */ || node.kind === 279 /* ImportClause */ || node.kind === 277 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 289 /* ExternalModuleReference */) { return void 0; } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) { return visitTypeScript(node); @@ -84771,21 +84968,21 @@ function transformTypeScript(context) { } function classElementVisitorWorker(node, parent2) { switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: return visitConstructor(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node, parent2); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return visitEachChild(node, visitor, context); - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: return node; - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return; default: return Debug.failBadSyntaxKind(node); @@ -84796,15 +84993,15 @@ function transformTypeScript(context) { } function objectLiteralElementVisitorWorker(node, parent2) { switch (node.kind) { - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 307 /* SpreadAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 310 /* SpreadAssignment */: return visitor(node); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); default: return Debug.failBadSyntaxKind(node); @@ -84839,13 +85036,13 @@ function transformTypeScript(context) { case 147 /* ReadonlyKeyword */: case 102 /* InKeyword */: case 146 /* OutKeyword */: - case 188 /* ArrayType */: - case 189 /* TupleType */: - case 190 /* OptionalType */: - case 191 /* RestType */: - case 187 /* TypeLiteral */: - case 182 /* TypePredicate */: - case 167 /* TypeParameter */: + case 190 /* ArrayType */: + case 191 /* TupleType */: + case 192 /* OptionalType */: + case 193 /* RestType */: + case 189 /* TypeLiteral */: + case 184 /* TypePredicate */: + case 168 /* TypeParameter */: case 132 /* AnyKeyword */: case 159 /* UnknownKeyword */: case 135 /* BooleanKeyword */: @@ -84854,83 +85051,86 @@ function transformTypeScript(context) { case 145 /* NeverKeyword */: case 115 /* VoidKeyword */: case 154 /* SymbolKeyword */: - case 185 /* ConstructorType */: - case 184 /* FunctionType */: - case 186 /* TypeQuery */: - case 183 /* TypeReference */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 194 /* ConditionalType */: - case 196 /* ParenthesizedType */: - case 197 /* ThisType */: - case 198 /* TypeOperator */: - case 199 /* IndexedAccessType */: - case 200 /* MappedType */: - case 201 /* LiteralType */: - case 181 /* IndexSignature */: + case 187 /* ConstructorType */: + case 186 /* FunctionType */: + case 188 /* TypeQuery */: + case 185 /* TypeReference */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: + case 196 /* ConditionalType */: + case 198 /* ParenthesizedType */: + case 199 /* ThisType */: + case 200 /* TypeOperator */: + case 201 /* IndexedAccessType */: + case 202 /* MappedType */: + case 203 /* LiteralType */: + case 183 /* IndexSignature */: return void 0; - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return factory2.createNotEmittedStatement(node); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return void 0; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return factory2.createNotEmittedStatement(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return visitClassExpression(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: + return factory2.createNotEmittedStatement(node); + case 269 /* OverloadDeclaration */: return factory2.createNotEmittedStatement(node); - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return visitHeritageClause(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArguments(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 176 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 177 /* ClassStaticBlockDeclaration */: return Debug.fail("Class and object literal elements must be visited with their respective visitors"); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return visitFunctionExpression(node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return visitArrowFunction(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node); - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: return visitAssertionExpression(node); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return visitSatisfiesExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return visitNewExpression(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return visitNonNullExpression(node); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return visitEnumDeclaration(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return visitModuleDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node); - case 289 /* JsxOpeningElement */: + case 292 /* JsxOpeningElement */: return visitJsxJsxOpeningElement(node); default: return visitEachChild(node, visitor, context); @@ -85162,19 +85362,19 @@ function transformTypeScript(context) { } function shouldAddTypeMetadata(node) { const kind = node.kind; - return kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 171 /* PropertyDeclaration */; + return kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 172 /* PropertyDeclaration */; } function shouldAddReturnTypeMetadata(node) { - return node.kind === 174 /* MethodDeclaration */; + return node.kind === 176 /* MethodDeclaration */; } function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return getFirstConstructorWithBody(node) !== void 0; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return true; } return false; @@ -85707,12 +85907,12 @@ function transformTypeScript(context) { factory2.createVariableDeclaration( factory2.getLocalName(node, false, true) ) - ], currentLexicalScope.kind === 314 /* SourceFile */ ? 0 /* None */ : 1 /* Let */) + ], currentLexicalScope.kind === 317 /* SourceFile */ ? 0 /* None */ : 1 /* Let */) ); setOriginalNode(statement, node); recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 269 /* EnumDeclaration */) { + if (node.kind === 272 /* EnumDeclaration */) { setSourceMapRange(statement.declarationList, node); } else { setSourceMapRange(statement, node); @@ -85794,7 +85994,7 @@ function transformTypeScript(context) { let statementsLocation; let blockLocation; if (node.body) { - if (node.body.kind === 271 /* ModuleBlock */) { + if (node.body.kind === 274 /* ModuleBlock */) { saveStateAndInvoke(node.body, (body) => addRange(statements, visitNodes2(body.statements, namespaceElementVisitor, isStatement))); statementsLocation = node.body.statements; blockLocation = node.body; @@ -85823,13 +86023,13 @@ function transformTypeScript(context) { true ); setTextRange(block, blockLocation); - if (!node.body || node.body.kind !== 271 /* ModuleBlock */) { + if (!node.body || node.body.kind !== 274 /* ModuleBlock */) { setEmitFlags(block, getEmitFlags(block) | 1536 /* NoComments */); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 270 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 273 /* ModuleDeclaration */) { const recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -85857,7 +86057,7 @@ function transformTypeScript(context) { return name || namedBindings ? factory2.updateImportClause(node, false, name, namedBindings) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 277 /* NamespaceImport */) { + if (node.kind === 280 /* NamespaceImport */) { return shouldEmitAliasDeclaration(node) ? node : void 0; } else { const allowEmpty = compilerOptions.preserveValueImports && (compilerOptions.importsNotUsedAsValues === 1 /* Preserve */ || compilerOptions.importsNotUsedAsValues === 2 /* Error */); @@ -86027,15 +86227,15 @@ function transformTypeScript(context) { if ((enabledSubstitutions & 2 /* NamespaceExports */) === 0) { enabledSubstitutions |= 2 /* NamespaceExports */; context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(306 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(270 /* ModuleDeclaration */); + context.enableSubstitution(309 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(273 /* ModuleDeclaration */); } } function isTransformedModuleDeclaration(node) { - return getOriginalNode(node).kind === 270 /* ModuleDeclaration */; + return getOriginalNode(node).kind === 273 /* ModuleDeclaration */; } function isTransformedEnumDeclaration(node) { - return getOriginalNode(node).kind === 269 /* EnumDeclaration */; + return getOriginalNode(node).kind === 272 /* EnumDeclaration */; } function onEmitNode(hint, node, emitCallback) { const savedApplicableSubstitutions = applicableSubstitutions; @@ -86080,9 +86280,9 @@ function transformTypeScript(context) { switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return substituteElementAccessExpression(node); } return node; @@ -86093,8 +86293,8 @@ function transformTypeScript(context) { function trySubstituteNamespaceExportedName(node) { if (enabledSubstitutions & applicableSubstitutions && !isGeneratedIdentifier(node) && !isLocalName(node)) { const container = resolver.getReferencedExportContainer(node, false); - if (container && container.kind !== 314 /* SourceFile */) { - const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 270 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 269 /* EnumDeclaration */; + if (container && container.kind !== 317 /* SourceFile */) { + const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 273 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 272 /* EnumDeclaration */; if (substitute) { return setTextRange( factory2.createPropertyAccessExpression(factory2.getGeneratedNameForNode(container), node), @@ -86196,45 +86396,49 @@ function transformClassFields(context) { switch (node.kind) { case 128 /* AccessorKeyword */: return shouldTransformAutoAccessors ? void 0 : node; - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return void 0; - case 232 /* ClassExpression */: + case 269 /* OverloadDeclaration */: + return void 0; + case 234 /* ClassExpression */: return visitClassExpression(node); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + return void 0; + case 174 /* OverloadPropertyDeclaration */: return void 0; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); case 80 /* PrivateIdentifier */: return visitPrivateIdentifier(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, false); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node, false); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitCallExpression(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node); - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: { + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: { return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( void 0, fallbackVisitor, @@ -86250,10 +86454,10 @@ function transformClassFields(context) { } function discardedValueVisitor(node) { switch (node.kind) { - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, true); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node, true); default: return visitor(node); @@ -86261,9 +86465,9 @@ function transformClassFields(context) { } function heritageClauseVisitor(node) { switch (node.kind) { - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return visitEachChild(node, heritageClauseVisitor, context); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArgumentsInHeritageClause(node); default: return visitor(node); @@ -86271,8 +86475,8 @@ function transformClassFields(context) { } function assignmentTargetVisitor(node) { switch (node.kind) { - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return visitAssignmentPattern(node); default: return visitor(node); @@ -86280,25 +86484,25 @@ function transformClassFields(context) { } function classElementVisitor(node) { switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: return visitConstructorDeclaration(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( void 0, visitMethodOrAccessorDeclaration, node ); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( void 0, visitPropertyDeclaration, node ); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: return node; default: return visitor(node); @@ -86306,10 +86510,10 @@ function transformClassFields(context) { } function accessorFieldResultVisitor(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return transformFieldInitializer(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return classElementVisitor(node); default: Debug.assertMissingNode(node, "Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration"); @@ -87393,14 +87597,14 @@ function transformClassFields(context) { if ((enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */) === 0) { enabledSubstitutions |= 2 /* ClassStaticThisOrSuperReference */; context.enableSubstitution(109 /* ThisKeyword */); - context.enableEmitNotification(263 /* FunctionDeclaration */); - context.enableEmitNotification(218 /* FunctionExpression */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(171 /* PropertyDeclaration */); - context.enableEmitNotification(166 /* ComputedPropertyName */); + context.enableEmitNotification(265 /* FunctionDeclaration */); + context.enableEmitNotification(220 /* FunctionExpression */); + context.enableEmitNotification(178 /* Constructor */); + context.enableEmitNotification(179 /* GetAccessor */); + context.enableEmitNotification(180 /* SetAccessor */); + context.enableEmitNotification(176 /* MethodDeclaration */); + context.enableEmitNotification(172 /* PropertyDeclaration */); + context.enableEmitNotification(167 /* ComputedPropertyName */); } } function addMethodStatements(statements, methods, receiver) { @@ -87442,12 +87646,12 @@ function transformClassFields(context) { } } switch (node.kind) { - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: if (isArrowFunction(original) || getEmitFlags(node) & 262144 /* AsyncFunctionBody */) { break; } - case 263 /* FunctionDeclaration */: - case 176 /* Constructor */: { + case 265 /* FunctionDeclaration */: + case 178 /* Constructor */: { const savedClassLexicalEnvironment = currentClassLexicalEnvironment; const savedCurrentComputedPropertyNameClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment; currentClassLexicalEnvironment = void 0; @@ -87457,10 +87661,10 @@ function transformClassFields(context) { currentComputedPropertyNameClassLexicalEnvironment = savedCurrentComputedPropertyNameClassLexicalEnvironment; return; } - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - case 171 /* PropertyDeclaration */: { + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { const savedClassLexicalEnvironment = currentClassLexicalEnvironment; const savedCurrentComputedPropertyNameClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment; currentComputedPropertyNameClassLexicalEnvironment = currentClassLexicalEnvironment; @@ -87470,7 +87674,7 @@ function transformClassFields(context) { currentComputedPropertyNameClassLexicalEnvironment = savedCurrentComputedPropertyNameClassLexicalEnvironment; return; } - case 166 /* ComputedPropertyName */: { + case 167 /* ComputedPropertyName */: { const savedClassLexicalEnvironment = currentClassLexicalEnvironment; const savedCurrentComputedPropertyNameClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment; currentClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment; @@ -87944,15 +88148,15 @@ function createRuntimeTypeSerializer(context) { } function serializeTypeOfNode(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: return serializeTypeNode(node.type); - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: + case 180 /* SetAccessor */: + case 179 /* GetAccessor */: return serializeTypeNode(getAccessorTypeNode(node)); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 174 /* MethodDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 176 /* MethodDeclaration */: return factory.createIdentifier("Function"); default: return factory.createVoidZero(); @@ -87979,7 +88183,7 @@ function createRuntimeTypeSerializer(context) { return factory.createArrayLiteralExpression(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 177 /* GetAccessor */) { + if (container && node.kind === 179 /* GetAccessor */) { const { setAccessor } = getAllAccessorDeclarations(container.members, node); if (setAccessor) { return setAccessor.parameters; @@ -88005,22 +88209,22 @@ function createRuntimeTypeSerializer(context) { case 157 /* UndefinedKeyword */: case 145 /* NeverKeyword */: return factory.createVoidZero(); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: return factory.createIdentifier("Function"); - case 188 /* ArrayType */: - case 189 /* TupleType */: + case 190 /* ArrayType */: + case 191 /* TupleType */: return factory.createIdentifier("Array"); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return node.assertsModifier ? factory.createVoidZero() : factory.createIdentifier("Boolean"); case 135 /* BooleanKeyword */: return factory.createIdentifier("Boolean"); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: case 153 /* StringKeyword */: return factory.createIdentifier("String"); case 150 /* ObjectKeyword */: return factory.createIdentifier("Object"); - case 201 /* LiteralType */: + case 203 /* LiteralType */: return serializeLiteralOfLiteralTypeNode(node.literal); case 149 /* NumberKeyword */: return factory.createIdentifier("Number"); @@ -88028,37 +88232,37 @@ function createRuntimeTypeSerializer(context) { return getGlobalConstructor("BigInt", 7 /* ES2020 */); case 154 /* SymbolKeyword */: return getGlobalConstructor("Symbol", 2 /* ES2015 */); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return serializeTypeReferenceNode(node); - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return serializeUnionOrIntersectionConstituents(node.types, true); - case 192 /* UnionType */: + case 194 /* UnionType */: return serializeUnionOrIntersectionConstituents(node.types, false); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return serializeUnionOrIntersectionConstituents([node.trueType, node.falseType], false); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: if (node.operator === 147 /* ReadonlyKeyword */) { return serializeTypeNode(node.type); } break; - case 186 /* TypeQuery */: - case 199 /* IndexedAccessType */: - case 200 /* MappedType */: - case 187 /* TypeLiteral */: + case 188 /* TypeQuery */: + case 201 /* IndexedAccessType */: + case 202 /* MappedType */: + case 189 /* TypeLiteral */: case 132 /* AnyKeyword */: case 159 /* UnknownKeyword */: - case 197 /* ThisType */: - case 205 /* ImportType */: + case 199 /* ThisType */: + case 207 /* ImportType */: break; - case 321 /* JSDocAllType */: - case 322 /* JSDocUnknownType */: - case 326 /* JSDocFunctionType */: - case 327 /* JSDocVariadicType */: - case 328 /* JSDocNamepathType */: + case 324 /* JSDocAllType */: + case 325 /* JSDocUnknownType */: + case 329 /* JSDocFunctionType */: + case 330 /* JSDocVariadicType */: + case 331 /* JSDocNamepathType */: break; - case 323 /* JSDocNullableType */: - case 324 /* JSDocNonNullableType */: - case 325 /* JSDocOptionalType */: + case 326 /* JSDocNullableType */: + case 327 /* JSDocNonNullableType */: + case 328 /* JSDocOptionalType */: return serializeTypeNode(node.type); default: return Debug.failBadSyntaxKind(node); @@ -88070,7 +88274,7 @@ function createRuntimeTypeSerializer(context) { case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return factory.createIdentifier("String"); - case 225 /* PrefixUnaryExpression */: { + case 227 /* PrefixUnaryExpression */: { const operand = node.operand; switch (operand.kind) { case 8 /* NumericLiteral */: @@ -88203,7 +88407,7 @@ function createRuntimeTypeSerializer(context) { name.original = void 0; setParent(name, getParseTreeNode(currentLexicalScope)); return name; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return serializeQualifiedNameAsExpression(node); } } @@ -88251,23 +88455,23 @@ function transformLegacyDecorators(context) { return node; } switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return void 0; - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return visitClassExpression(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return visitConstructorDeclaration(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameterDeclaration(node); default: return visitEachChild(node, visitor, context); @@ -88676,34 +88880,34 @@ function transformES2017(context) { switch (node.kind) { case 133 /* AsyncKeyword */: return void 0; - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return visitAwaitExpression(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitMethodDeclaration, node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionDeclaration, node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionExpression, node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return doWithContext(1 /* NonTopLevel */, visitArrowFunction, node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 107 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 107 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitGetAccessorDeclaration, node); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitSetAccessorDeclaration, node); - case 176 /* Constructor */: + case 178 /* Constructor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitConstructorDeclaration, node); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitDefault, node); default: return visitEachChild(node, visitor, context); @@ -88712,27 +88916,27 @@ function transformES2017(context) { function asyncBodyVisitor(node) { if (isNodeWithPossibleHoistedDeclaration(node)) { switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatementInAsyncBody(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatementInAsyncBody(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatementInAsyncBody(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatementInAsyncBody(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClauseInAsyncBody(node); - case 242 /* Block */: - case 256 /* SwitchStatement */: - case 272 /* CaseBlock */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 259 /* TryStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 246 /* IfStatement */: - case 255 /* WithStatement */: - case 257 /* LabeledStatement */: + case 244 /* Block */: + case 258 /* SwitchStatement */: + case 275 /* CaseBlock */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 261 /* TryStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 248 /* IfStatement */: + case 257 /* WithStatement */: + case 259 /* LabeledStatement */: return visitEachChild(node, asyncBodyVisitor, context); default: return Debug.assertNever(node, "Unhandled node."); @@ -88982,7 +89186,7 @@ function transformES2017(context) { const original = getOriginalNode(node, isFunctionLike); const nodeType = original.type; const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0; - const isArrowFunction2 = node.kind === 219 /* ArrowFunction */; + const isArrowFunction2 = node.kind === 221 /* ArrowFunction */; const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192 /* CaptureArguments */) !== 0; const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames; enclosingFunctionParameterNames = new Set2(); @@ -89071,15 +89275,15 @@ function transformES2017(context) { function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); - context.enableEmitNotification(264 /* ClassDeclaration */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(244 /* VariableStatement */); + context.enableSubstitution(215 /* CallExpression */); + context.enableSubstitution(213 /* PropertyAccessExpression */); + context.enableSubstitution(214 /* ElementAccessExpression */); + context.enableEmitNotification(266 /* ClassDeclaration */); + context.enableEmitNotification(176 /* MethodDeclaration */); + context.enableEmitNotification(179 /* GetAccessor */); + context.enableEmitNotification(180 /* SetAccessor */); + context.enableEmitNotification(178 /* Constructor */); + context.enableEmitNotification(246 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -89110,11 +89314,11 @@ function transformES2017(context) { } function substituteExpression(node) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -89157,7 +89361,7 @@ function transformES2017(context) { } function isSuperContainer(node) { const kind = node.kind; - return kind === 264 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 266 /* ClassDeclaration */ || kind === 178 /* Constructor */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location2) { if (enclosingSuperContainerFlags & 4096 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -89364,115 +89568,115 @@ function transformES2018(context) { return node; } switch (node.kind) { - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return visitAwaitExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return visitYieldExpression(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return visitReturnStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return visitLabeledStatement(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClause(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 250 /* ForInStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 252 /* ForInStatement */: return doWithHierarchyFacts( visitDefault, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatement(node, void 0); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return doWithHierarchyFacts( visitForStatement, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return visitVoidExpression(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return doWithHierarchyFacts( visitConstructorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return doWithHierarchyFacts( visitMethodDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return doWithHierarchyFacts( visitGetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return doWithHierarchyFacts( visitSetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return doWithHierarchyFacts( visitFunctionDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return doWithHierarchyFacts( visitFunctionExpression, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return doWithHierarchyFacts( visitArrowFunction, node, 2 /* ArrowFunctionExcludes */, 0 /* ArrowFunctionIncludes */ ); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 107 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 107 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return doWithHierarchyFacts( visitDefault, node, @@ -89550,7 +89754,7 @@ function transformES2018(context) { function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 /* Async */) { const statement = unwrapInnermostStatementOfLabel(node); - if (statement.kind === 251 /* ForOfStatement */ && statement.awaitModifier) { + if (statement.kind === 253 /* ForOfStatement */ && statement.awaitModifier) { return visitForOfStatement(statement, node); } return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node); @@ -89561,7 +89765,7 @@ function transformES2018(context) { let chunkObject; const objects = []; for (const e of elements) { - if (e.kind === 307 /* SpreadAssignment */) { + if (e.kind === 310 /* SpreadAssignment */) { if (chunkObject) { objects.push(factory2.createObjectLiteralExpression(chunkObject)); chunkObject = void 0; @@ -89569,7 +89773,7 @@ function transformES2018(context) { const target = e.expression; objects.push(visitNode(target, visitor, isExpression)); } else { - chunkObject = append(chunkObject, e.kind === 305 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); + chunkObject = append(chunkObject, e.kind === 308 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); } } if (chunkObject) { @@ -89580,7 +89784,7 @@ function transformES2018(context) { function visitObjectLiteralExpression(node) { if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { const objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 210 /* ObjectLiteralExpression */) { + if (objects.length && objects[0].kind !== 212 /* ObjectLiteralExpression */) { objects.unshift(factory2.createObjectLiteralExpression()); } let expression = objects[0]; @@ -90233,15 +90437,15 @@ function transformES2018(context) { function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); - context.enableEmitNotification(264 /* ClassDeclaration */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(244 /* VariableStatement */); + context.enableSubstitution(215 /* CallExpression */); + context.enableSubstitution(213 /* PropertyAccessExpression */); + context.enableSubstitution(214 /* ElementAccessExpression */); + context.enableEmitNotification(266 /* ClassDeclaration */); + context.enableEmitNotification(176 /* MethodDeclaration */); + context.enableEmitNotification(179 /* GetAccessor */); + context.enableEmitNotification(180 /* SetAccessor */); + context.enableEmitNotification(178 /* Constructor */); + context.enableEmitNotification(246 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -90272,11 +90476,11 @@ function transformES2018(context) { } function substituteExpression(node) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -90319,7 +90523,7 @@ function transformES2018(context) { } function isSuperContainer(node) { const kind = node.kind; - return kind === 264 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 266 /* ClassDeclaration */ || kind === 178 /* Constructor */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location2) { if (enclosingSuperContainerFlags & 4096 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -90362,7 +90566,7 @@ function transformES2019(context) { return node; } switch (node.kind) { - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClause(node); default: return visitEachChild(node, visitor, context); @@ -90398,25 +90602,25 @@ function transformES2020(context) { return node; } switch (node.kind) { - case 213 /* CallExpression */: { + case 215 /* CallExpression */: { const updated = visitNonOptionalCallExpression(node, false); Debug.assertNotNode(updated, isSyntheticReference); return updated; } - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: if (isOptionalChain(node)) { const updated = visitOptionalExpression(node, false, false); Debug.assertNotNode(updated, isSyntheticReference); return updated; } return visitEachChild(node, visitor, context); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (node.operatorToken.kind === 60 /* QuestionQuestionToken */) { return transformNullishCoalescingExpression(node); } return visitEachChild(node, visitor, context); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return visitDeleteExpression(node); default: return visitEachChild(node, visitor, context); @@ -90454,7 +90658,7 @@ function transformES2020(context) { thisArg = expression; } } - expression = node.kind === 211 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); + expression = node.kind === 213 /* 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) { @@ -90473,12 +90677,12 @@ function transformES2020(context) { } function visitNonOptionalExpression(node, captureThisArg, isDelete) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return visitNode(node, visitor, isExpression); @@ -90499,8 +90703,8 @@ function transformES2020(context) { for (let i = 0; i < chain.length; i++) { const segment = chain[i]; switch (segment.kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { if (!isSimpleCopiableExpression(rightExpression)) { thisArg = factory2.createTempVariable(hoistVariableDeclaration); @@ -90509,9 +90713,9 @@ function transformES2020(context) { thisArg = rightExpression; } } - rightExpression = segment.kind === 211 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); + rightExpression = segment.kind === 213 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (i === 0 && leftThisArg) { if (!isGeneratedIdentifier(leftThisArg)) { leftThisArg = factory2.cloneNode(leftThisArg); @@ -90590,7 +90794,7 @@ function transformES2021(context) { return node; } switch (node.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const binaryExpression = node; if (isLogicalOrCoalescingAssignmentExpression(binaryExpression)) { return transformLogicalAssignment(binaryExpression); @@ -90768,13 +90972,13 @@ function transformJsx(context) { } function visitorWorker(node) { switch (node.kind) { - case 287 /* JsxElement */: + case 290 /* JsxElement */: return visitJsxElement(node, false); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node, false); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return visitJsxFragment(node, false); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return visitJsxExpression(node); default: return visitEachChild(node, visitor, context); @@ -90784,13 +90988,13 @@ function transformJsx(context) { switch (node.kind) { case 11 /* JsxText */: return visitJsxText(node); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return visitJsxExpression(node); - case 287 /* JsxElement */: + case 290 /* JsxElement */: return visitJsxElement(node, true); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node, true); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return visitJsxFragment(node, true); default: return Debug.failBadSyntaxKind(node); @@ -90985,7 +91189,7 @@ function transformJsx(context) { const literal = factory2.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote); return setTextRange(literal, node); } - if (node.kind === 297 /* JsxExpression */) { + if (node.kind === 300 /* JsxExpression */) { if (node.expression === void 0) { return factory2.createTrue(); } @@ -91047,7 +91251,7 @@ function transformJsx(context) { return decoded === text ? void 0 : decoded; } function getTagName(node) { - if (node.kind === 287 /* JsxElement */) { + if (node.kind === 290 /* JsxElement */) { return getTagName(node.openingElement); } else { const name = node.tagName; @@ -91346,7 +91550,7 @@ function transformES2016(context) { return node; } switch (node.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node); default: return visitEachChild(node, visitor, context); @@ -91474,7 +91678,7 @@ function transformES2015(context) { hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 254 /* ReturnStatement */ && !node.expression; + return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 256 /* 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(node, false) || isBlock(node)); @@ -91514,65 +91718,65 @@ function transformES2015(context) { switch (node.kind) { case 125 /* StaticKeyword */: return void 0; - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return visitClassExpression(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return visitArrowFunction(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return visitFunctionExpression(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return visitVariableDeclaration(node); case 79 /* Identifier */: return visitIdentifier(node); - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return visitVariableDeclarationList(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return visitSwitchStatement(node); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return visitCaseBlock(node); - case 242 /* Block */: + case 244 /* Block */: return visitBlock(node, false); - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: return visitBreakOrContinueStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return visitLabeledStatement(node); - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return visitDoOrWhileStatement(node, void 0); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node, void 0); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatement(node, void 0); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatement(node, void 0); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClause(node); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return visitShorthandPropertyAssignment(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return visitNewExpression(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: @@ -91583,30 +91787,30 @@ function transformES2015(context) { return visitStringLiteral(node); case 8 /* NumericLiteral */: return visitNumericLiteral(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: return visitTemplateExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return visitYieldExpression(node); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return visitSpreadElement(node); case 107 /* SuperKeyword */: return visitSuperKeyword(false); case 109 /* ThisKeyword */: return visitThisKeyword(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return visitMetaProperty(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return visitAccessorDeclaration(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return visitReturnStatement(node); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return visitVoidExpression(node); default: return visitEachChild(node, visitor, context); @@ -91707,13 +91911,13 @@ function transformES2015(context) { } function visitBreakOrContinueStatement(node) { if (convertedLoopState) { - const jump = node.kind === 253 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + const jump = node.kind === 255 /* 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 === 253 /* BreakStatement */) { + if (node.kind === 255 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; labelMarker = "break"; } else { @@ -91721,7 +91925,7 @@ function transformES2015(context) { labelMarker = "continue"; } } else { - if (node.kind === 253 /* BreakStatement */) { + if (node.kind === 255 /* BreakStatement */) { labelMarker = `break-${label.escapedText}`; setLabeledJump(convertedLoopState, true, idText(label), labelMarker); } else { @@ -91965,14 +92169,14 @@ function transformES2015(context) { }; } function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 254 /* ReturnStatement */) { + if (statement.kind === 256 /* ReturnStatement */) { return true; - } else if (statement.kind === 246 /* IfStatement */) { + } else if (statement.kind === 248 /* IfStatement */) { const ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } - } else if (statement.kind === 242 /* Block */) { + } else if (statement.kind === 244 /* Block */) { const lastStatement = lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -92214,7 +92418,7 @@ function transformES2015(context) { return true; } function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) { + if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 221 /* ArrowFunction */) { insertCaptureThisForNode(statements, node, factory2.createThis()); return true; } @@ -92253,21 +92457,21 @@ function transformES2015(context) { if (hierarchyFacts & 32768 /* NewTarget */) { let newTarget; switch (node.kind) { - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return statements; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: newTarget = factory2.createVoidZero(); break; - case 176 /* Constructor */: + case 178 /* Constructor */: newTarget = factory2.createPropertyAccessExpression( setEmitFlags(factory2.createThis(), 4 /* NoSubstitution */), "constructor" ); break; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: newTarget = factory2.createConditionalExpression( factory2.createLogicalAnd( setEmitFlags(factory2.createThis(), 4 /* NoSubstitution */), @@ -92311,21 +92515,21 @@ function transformES2015(context) { function addClassMembers(statements, node) { for (const member of node.members) { switch (member.kind) { - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 176 /* Constructor */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 177 /* ClassStaticBlockDeclaration */: break; default: Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName); @@ -92478,7 +92682,7 @@ function transformES2015(context) { 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 === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { + if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */)) { name = factory2.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); @@ -92524,7 +92728,7 @@ function transformES2015(context) { multiLine = true; } } else { - Debug.assert(node.kind === 219 /* ArrowFunction */); + Debug.assert(node.kind === 221 /* ArrowFunction */); statementsLocation = moveRangeEnd(body, -1); const equalsGreaterThanToken = node.equalsGreaterThanToken; if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { @@ -92727,14 +92931,14 @@ function transformES2015(context) { } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return visitDoOrWhileStatement(node, outermostLabeledStatement); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node, outermostLabeledStatement); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatement(node, outermostLabeledStatement); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -93011,7 +93215,7 @@ function transformES2015(context) { 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 === 166 /* ComputedPropertyName */)) { + if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 167 /* ComputedPropertyName */)) { numInitialProperties = i; break; } @@ -93123,15 +93327,15 @@ function transformES2015(context) { } function convertIterationStatementCore(node, initializerFunction, convertedLoopBody) { switch (node.kind) { - case 249 /* ForStatement */: + case 251 /* ForStatement */: return convertForStatement(node, initializerFunction, convertedLoopBody); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return convertForInStatement(node, convertedLoopBody); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return convertForOfStatement(node, convertedLoopBody); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return convertDoStatement(node, convertedLoopBody); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return convertWhileStatement(node, convertedLoopBody); default: return Debug.failBadSyntaxKind(node, "IterationStatement expected"); @@ -93182,11 +93386,11 @@ function transformES2015(context) { function createConvertedLoopState(node) { let loopInitializer; switch (node.kind) { - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: const initializer = node.initializer; - if (initializer && initializer.kind === 262 /* VariableDeclarationList */) { + if (initializer && initializer.kind === 264 /* VariableDeclarationList */) { loopInitializer = initializer; } break; @@ -93540,20 +93744,20 @@ function transformES2015(context) { for (let i = start2; i < numProperties; i++) { const property = properties[i]; switch (property.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, !!node.multiLine)); } break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -93656,7 +93860,7 @@ function transformES2015(context) { let updated; const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (node.kind === 177 /* GetAccessor */) { + if (node.kind === 179 /* GetAccessor */) { updated = factory2.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body); } else { updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); @@ -93958,13 +94162,13 @@ function transformES2015(context) { if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) { enabledSubstitutions |= 1 /* CapturedThis */; context.enableSubstitution(109 /* ThisKeyword */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(219 /* ArrowFunction */); - context.enableEmitNotification(218 /* FunctionExpression */); - context.enableEmitNotification(263 /* FunctionDeclaration */); + context.enableEmitNotification(178 /* Constructor */); + context.enableEmitNotification(176 /* MethodDeclaration */); + context.enableEmitNotification(179 /* GetAccessor */); + context.enableEmitNotification(180 /* SetAccessor */); + context.enableEmitNotification(221 /* ArrowFunction */); + context.enableEmitNotification(220 /* FunctionExpression */); + context.enableEmitNotification(265 /* FunctionDeclaration */); } } function onSubstituteNode(hint, node) { @@ -93988,10 +94192,10 @@ function transformES2015(context) { } function isNameOfDeclarationWithCollidingName(node) { switch (node.parent.kind) { - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: - case 269 /* EnumDeclaration */: - case 261 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: + case 272 /* EnumDeclaration */: + case 263 /* VariableDeclaration */: return node.parent.name === node && resolver.isDeclarationWithCollidingName(node.parent); } return false; @@ -94048,11 +94252,11 @@ function transformES2015(context) { return false; } const statement = firstOrUndefined(constructor.body.statements); - if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 245 /* ExpressionStatement */) { + if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 247 /* ExpressionStatement */) { return false; } const statementExpression = statement.expression; - if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 213 /* CallExpression */) { + if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 215 /* CallExpression */) { return false; } const callTarget = statementExpression.expression; @@ -94060,7 +94264,7 @@ function transformES2015(context) { return false; } const callArgument = singleOrUndefined(statementExpression.arguments); - if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 231 /* SpreadElement */) { + if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 233 /* SpreadElement */) { return false; } const expression = callArgument.expression; @@ -94077,24 +94281,24 @@ function transformES5(context) { if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(289 /* JsxOpeningElement */); - context.enableEmitNotification(290 /* JsxClosingElement */); - context.enableEmitNotification(288 /* JsxSelfClosingElement */); + context.enableEmitNotification(292 /* JsxOpeningElement */); + context.enableEmitNotification(293 /* JsxClosingElement */); + context.enableEmitNotification(291 /* JsxSelfClosingElement */); noSubstitution = []; } const previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(305 /* PropertyAssignment */); + context.enableSubstitution(213 /* PropertyAccessExpression */); + context.enableSubstitution(308 /* PropertyAssignment */); return chainBundle(context, transformSourceFile); function transformSourceFile(node) { return node; } function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 289 /* JsxOpeningElement */: - case 290 /* JsxClosingElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 293 /* JsxClosingElement */: + case 291 /* JsxSelfClosingElement */: const tagName = node.tagName; noSubstitution[getOriginalNodeId(tagName)] = true; break; @@ -94220,13 +94424,13 @@ function transformGenerators(context) { } function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 247 /* DoStatement */: + case 249 /* DoStatement */: return visitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return visitWhileStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return visitSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -94234,24 +94438,24 @@ function transformGenerators(context) { } function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return visitFunctionExpression(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return visitAccessorDeclaration(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatement(node); - case 253 /* BreakStatement */: + case 255 /* BreakStatement */: return visitBreakStatement(node); - case 252 /* ContinueStatement */: + case 254 /* ContinueStatement */: return visitContinueStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return visitReturnStatement(node); default: if (node.transformFlags & 1048576 /* ContainsYield */) { @@ -94265,23 +94469,23 @@ function transformGenerators(context) { } function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return visitCommaListExpression(node); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return visitConditionalExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return visitYieldExpression(node); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return visitNewExpression(node); default: return visitEachChild(node, visitor, context); @@ -94289,9 +94493,9 @@ function transformGenerators(context) { } function visitGenerator(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return visitFunctionExpression(node); default: return Debug.failBadSyntaxKind(node); @@ -94458,14 +94662,14 @@ function transformGenerators(context) { if (containsYield(right)) { let target; switch (left.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: target = factory2.updatePropertyAccessExpression( left, cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)), left.name ); break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: target = factory2.updateElementAccessExpression( left, cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)), @@ -94737,35 +94941,35 @@ function transformGenerators(context) { } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 242 /* Block */: + case 244 /* Block */: return transformAndEmitBlock(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return transformAndEmitExpressionStatement(node); - case 246 /* IfStatement */: + case 248 /* IfStatement */: return transformAndEmitIfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return transformAndEmitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return transformAndEmitWhileStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return transformAndEmitForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return transformAndEmitForInStatement(node); - case 252 /* ContinueStatement */: + case 254 /* ContinueStatement */: return transformAndEmitContinueStatement(node); - case 253 /* BreakStatement */: + case 255 /* BreakStatement */: return transformAndEmitBreakStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return transformAndEmitReturnStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return transformAndEmitWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return transformAndEmitSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return transformAndEmitLabeledStatement(node); - case 258 /* ThrowStatement */: + case 260 /* ThrowStatement */: return transformAndEmitThrowStatement(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return transformAndEmitTryStatement(node); default: return emitStatement(visitNode(node, visitor, isStatement)); @@ -95090,7 +95294,7 @@ function transformGenerators(context) { for (let i = 0; i < numClauses; i++) { const clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 299 /* DefaultClause */ && defaultClauseIndex === -1) { + if (clause.kind === 302 /* DefaultClause */ && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -95100,7 +95304,7 @@ function transformGenerators(context) { let defaultClausesSkipped = 0; for (let i = clausesWritten; i < numClauses; i++) { const clause = caseBlock.clauses[i]; - if (clause.kind === 298 /* CaseClause */) { + if (clause.kind === 301 /* CaseClause */) { if (containsYield(clause.expression) && pendingClauses.length > 0) { break; } @@ -96025,12 +96229,12 @@ function transformModule(context) { const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(215 /* TaggedTemplateExpression */); + context.enableSubstitution(215 /* CallExpression */); + context.enableSubstitution(217 /* TaggedTemplateExpression */); context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(227 /* BinaryExpression */); - context.enableSubstitution(306 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(314 /* SourceFile */); + context.enableSubstitution(229 /* BinaryExpression */); + context.enableSubstitution(309 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(317 /* SourceFile */); const moduleInfoMap = []; const deferredExports = []; let currentSourceFile; @@ -96338,23 +96542,23 @@ function transformModule(context) { } function topLevelVisitor(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return visitImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return visitExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return visitExportAssignment(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 361 /* MergeDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 362 /* EndOfDeclarationMarker */: + case 365 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return visitor(node); @@ -96365,26 +96569,26 @@ function transformModule(context) { return node; } switch (node.kind) { - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) { return visitImportCallExpression(node); } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -96399,24 +96603,24 @@ function transformModule(context) { if (isObjectLiteralExpression(node)) { for (const elem of node.properties) { switch (elem.kind) { - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (destructuringNeedsFlattening(elem.initializer)) { return true; } break; - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: if (destructuringNeedsFlattening(elem.name)) { return true; } break; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: if (destructuringNeedsFlattening(elem.expression)) { return true; } break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return false; default: Debug.assertNever(elem, "Unhandled object member kind"); @@ -97073,7 +97277,7 @@ function transformModule(context) { } } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 244 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 246 /* VariableStatement */) { const id = getOriginalNodeId(node); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original); } @@ -97105,10 +97309,10 @@ function transformModule(context) { const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 278 /* NamedImports */: + case 281 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding, true); } @@ -97252,7 +97456,7 @@ function transformModule(context) { return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)]; previousOnEmitNode(hint, node, emitCallback); @@ -97290,11 +97494,11 @@ function transformModule(context) { switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return substituteCallExpression(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return substituteTaggedTemplateExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return substituteBinaryExpression(node); } return node; @@ -97345,7 +97549,7 @@ function transformModule(context) { return node; } else if (!(isGeneratedIdentifier(node) && !(node.autoGenerateFlags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) { const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); - if (exportContainer && exportContainer.kind === 314 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 317 /* SourceFile */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createIdentifier("exports"), @@ -97424,10 +97628,10 @@ function transformSystemModule(context) { context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(306 /* ShorthandPropertyAssignment */); - context.enableSubstitution(227 /* BinaryExpression */); - context.enableSubstitution(237 /* MetaProperty */); - context.enableEmitNotification(314 /* SourceFile */); + context.enableSubstitution(309 /* ShorthandPropertyAssignment */); + context.enableSubstitution(229 /* BinaryExpression */); + context.enableSubstitution(239 /* MetaProperty */); + context.enableEmitNotification(317 /* SourceFile */); const moduleInfoMap = []; const deferredExports = []; const exportFunctionsMap = []; @@ -97577,7 +97781,7 @@ function transformSystemModule(context) { if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) { let hasExportDeclarationWithExportClause = false; for (const externalImport of moduleInfo.externalImports) { - if (externalImport.kind === 281 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 284 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -97696,11 +97900,11 @@ function transformSystemModule(context) { for (const entry of group2.externalImports) { const importVariableName = getLocalNameForExternalImport(factory2, entry, currentSourceFile); switch (entry.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: if (!entry.importClause) { break; } - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: Debug.assert(importVariableName !== void 0); statements.push( factory2.createExpressionStatement( @@ -97722,7 +97926,7 @@ function transformSystemModule(context) { ); } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: Debug.assert(importVariableName !== void 0); if (entry.exportClause) { if (isNamedExports(entry.exportClause)) { @@ -97791,13 +97995,13 @@ function transformSystemModule(context) { } function topLevelVisitor(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return visitImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return visitExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return visitExportAssignment(node); default: return topLevelNestedVisitor(node); @@ -97942,7 +98146,7 @@ function transformSystemModule(context) { } } function shouldHoistVariableDeclarationList(node) { - return (getEmitFlags(node) & 2097152 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 314 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); + return (getEmitFlags(node) & 2097152 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 317 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); } function transformInitializedVariable(node, isExportedDeclaration) { const createAssignment3 = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; @@ -97966,7 +98170,7 @@ function transformSystemModule(context) { return isExportedDeclaration ? createExportExpression(name, preventSubstitution(setTextRange(factory2.createAssignment(name, value), location2))) : preventSubstitution(setTextRange(factory2.createAssignment(name, value), location2)); } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 244 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 246 /* VariableStatement */) { const id = getOriginalNodeId(node); const isExportedDeclaration = hasSyntacticModifier(node.original, 1 /* Export */); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration); @@ -98004,10 +98208,10 @@ function transformSystemModule(context) { const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 278 /* NamedImports */: + case 281 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding); } @@ -98102,43 +98306,43 @@ function transformSystemModule(context) { } function topLevelNestedVisitor(node) { switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node, true); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatement(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return visitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return visitWhileStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return visitLabeledStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return visitWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return visitSwitchStatement(node); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return visitCaseBlock(node); - case 298 /* CaseClause */: + case 301 /* CaseClause */: return visitCaseClause(node); - case 299 /* DefaultClause */: + case 302 /* DefaultClause */: return visitDefaultClause(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return visitTryStatement(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClause(node); - case 242 /* Block */: + case 244 /* Block */: return visitBlock(node); - case 361 /* MergeDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 362 /* EndOfDeclarationMarker */: + case 365 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return visitor(node); @@ -98280,26 +98484,26 @@ function transformSystemModule(context) { return node; } switch (node.kind) { - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node, false); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (isImportCall(node)) { return visitImportCallExpression(node); } break; - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -98359,7 +98563,7 @@ function transformSystemModule(context) { return hasExportedReferenceInDestructuringTarget(node.initializer); } else if (isIdentifier(node)) { const container = resolver.getReferencedExportContainer(node); - return container !== void 0 && container.kind === 314 /* SourceFile */; + return container !== void 0 && container.kind === 317 /* SourceFile */; } else { return false; } @@ -98403,7 +98607,7 @@ function transformSystemModule(context) { return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { const id = getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -98437,7 +98641,7 @@ function transformSystemModule(context) { } function substituteUnspecified(node) { switch (node.kind) { - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return substituteShorthandPropertyAssignment(node); } return node; @@ -98479,9 +98683,9 @@ function transformSystemModule(context) { switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return substituteBinaryExpression(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return substituteMetaProperty(node); } return node; @@ -98544,7 +98748,7 @@ function transformSystemModule(context) { const valueDeclaration = resolver.getReferencedImportDeclaration(name) || resolver.getReferencedValueDeclaration(name); if (valueDeclaration) { const exportContainer = resolver.getReferencedExportContainer(name, false); - if (exportContainer && exportContainer.kind === 314 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 317 /* SourceFile */) { exportedNames = append(exportedNames, factory2.getDeclarationName(valueDeclaration)); } exportedNames = addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]); @@ -98577,7 +98781,7 @@ function transformECMAScriptModule(context) { const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(314 /* SourceFile */); + context.enableEmitNotification(317 /* SourceFile */); context.enableSubstitution(79 /* Identifier */); let helperNameSubstitutions; let currentSourceFile; @@ -98628,11 +98832,11 @@ function transformECMAScriptModule(context) { } function visitor(node) { switch (node.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return getEmitModuleKind(compilerOptions) >= 100 /* Node16 */ ? visitImportEqualsDeclaration(node) : void 0; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return visitExportAssignment(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: const exportDecl = node; return visitExportDeclaration(exportDecl); } @@ -98794,8 +98998,8 @@ function transformNodeModule(context) { const cjsOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(314 /* SourceFile */); - context.enableEmitNotification(314 /* SourceFile */); + context.enableSubstitution(317 /* SourceFile */); + context.enableEmitNotification(317 /* SourceFile */); let currentSourceFile; return transformSourceFileOrBundle; function onSubstituteNode(hint, node) { @@ -98838,7 +99042,7 @@ function transformNodeModule(context) { return result; } function transformSourceFileOrBundle(node) { - return node.kind === 314 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 317 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -98868,7 +99072,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.kind === 266 /* 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; @@ -98885,7 +99089,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.kind === 266 /* 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; @@ -98893,7 +99097,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { } } function createGetSymbolAccessibilityDiagnosticForNode(node) { - if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isAnnotationPropertyDeclaration(node) || isPropertyAccessExpression(node) || isBindingElement(node) || isConstructorDeclaration(node)) { + if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isAnnotationPropertyDeclaration(node) || isPropertyAccessExpression(node) || isBindingElement(node) || isConstructorDeclaration(node) || isOverloadPropertyDeclaration(node)) { return getVariableDeclarationTypeVisibilityError; } else if (isSetAccessor(node) || isGetAccessor(node)) { return getAccessorDeclarationTypeVisibilityError; @@ -98916,12 +99120,12 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { 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 === 261 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { + if (node.kind === 263 /* VariableDeclaration */ || node.kind === 210 /* 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 === 171 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 170 /* PropertySignature */ || node.kind === 168 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { + } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 213 /* PropertyAccessExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* 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 === 264 /* ClassDeclaration */ || node.kind === 168 /* Parameter */) { + } else if (node.parent.kind === 266 /* ClassDeclaration */ || node.kind === 169 /* 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; @@ -98938,7 +99142,7 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; - if (node.kind === 178 /* SetAccessor */) { + if (node.kind === 180 /* 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 { @@ -98960,26 +99164,26 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { function getReturnTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; switch (node.kind) { - case 180 /* ConstructSignature */: + case 182 /* 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 179 /* CallSignature */: + case 181 /* 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 181 /* IndexSignature */: + case 183 /* 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 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.kind === 266 /* 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 263 /* FunctionDeclaration */: + case 265 /* 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: @@ -99000,29 +99204,29 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 176 /* Constructor */: + case 178 /* 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 180 /* ConstructSignature */: - case 185 /* ConstructorType */: + case 182 /* ConstructSignature */: + case 187 /* 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 179 /* CallSignature */: + case 181 /* 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 181 /* IndexSignature */: + case 183 /* 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 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 266 /* 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 263 /* FunctionDeclaration */: - case 184 /* FunctionType */: + case 265 /* FunctionDeclaration */: + case 186 /* 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 178 /* SetAccessor */: - case 177 /* GetAccessor */: + case 180 /* SetAccessor */: + case 179 /* 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)}`); @@ -99031,37 +99235,37 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { function getTypeParameterConstraintVisibilityError() { let diagnosticMessage; switch (node.parent.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 200 /* MappedType */: + case 202 /* MappedType */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1; break; - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 187 /* ConstructorType */: + case 182 /* ConstructSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 179 /* CallSignature */: + case 181 /* CallSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 266 /* 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 184 /* FunctionType */: - case 263 /* FunctionDeclaration */: + case 186 /* FunctionType */: + case 265 /* FunctionDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -99114,7 +99318,7 @@ function hasInternalAnnotation(range, currentSourceFile) { } function isInternalDeclaration(node, currentSourceFile) { const parseTreeNode = getParseTreeNode(node); - if (parseTreeNode && parseTreeNode.kind === 168 /* Parameter */) { + if (parseTreeNode && parseTreeNode.kind === 169 /* Parameter */) { const paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode); const previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : void 0; const text = currentSourceFile.text; @@ -99323,10 +99527,10 @@ function transformDeclarations(context) { return result; } function transformRoot(node) { - if (node.kind === 314 /* SourceFile */ && node.isDeclarationFile) { + if (node.kind === 317 /* SourceFile */ && node.isDeclarationFile) { return node; } - if (node.kind === 315 /* Bundle */) { + if (node.kind === 318 /* Bundle */) { isBundledEmit = true; refs = new Map2(); libs2 = new Map2(); @@ -99363,7 +99567,7 @@ function transformDeclarations(context) { return factory2.updateSourceFile(sourceFile, transformAndReplaceLatePaintedStatements(updated2), true, [], [], false, []); } ), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 317 /* InputFiles */) { + if (prepend.kind === 320 /* InputFiles */) { const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; collectReferences(sourceFile, refs); @@ -99505,14 +99709,14 @@ function transformDeclarations(context) { if (name.kind === 79 /* Identifier */) { return name; } else { - if (name.kind === 207 /* ArrayBindingPattern */) { + if (name.kind === 209 /* ArrayBindingPattern */) { return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement)); } else { return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement)); } } function visitBindingElement(elem) { - if (elem.kind === 233 /* OmittedExpression */) { + if (elem.kind === 235 /* OmittedExpression */) { return elem; } if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced) { @@ -99572,14 +99776,14 @@ function transformDeclarations(context) { if (type !== void 0 && isTypeReferenceNode(type) && type.typeName.virtual) { return; } - const shouldUseResolverType = node.kind === 168 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); + const shouldUseResolverType = node.kind === 169 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); if (type && !shouldUseResolverType) { return visitNode(type, visitDeclarationSubtree); } if (!getParseTreeNode(node)) { return type ? visitNode(type, visitDeclarationSubtree) : factory2.createKeywordTypeNode(132 /* AnyKeyword */); } - if (node.kind === 178 /* SetAccessor */) { + if (node.kind === 180 /* SetAccessor */) { return factory2.createKeywordTypeNode(132 /* AnyKeyword */); } errorNameNode = node.name; @@ -99588,10 +99792,10 @@ function transformDeclarations(context) { oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); } - if (node.kind === 261 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { + if (node.kind === 263 /* VariableDeclaration */ || node.kind === 210 /* BindingElement */) { return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); } - if (node.kind === 168 /* Parameter */ || node.kind === 171 /* PropertyDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 172 /* AnnotationPropertyDeclaration */) { + if (node.kind === 169 /* Parameter */ || node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 173 /* AnnotationPropertyDeclaration */ || node.kind === 174 /* OverloadPropertyDeclaration */) { 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)); @@ -99608,23 +99812,23 @@ function transformDeclarations(context) { function isDeclarationAndNotVisible(node) { node = getParseTreeNode(node); switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 270 /* ModuleDeclaration */: - case 267 /* InterfaceDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 266 /* AnnotationDeclaration */: + case 265 /* FunctionDeclaration */: + case 273 /* ModuleDeclaration */: + case 270 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 268 /* AnnotationDeclaration */: return !resolver.isDeclarationVisible(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return !getBindingNameVisible(node); - case 274 /* ImportEqualsDeclaration */: - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: + case 277 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: return false; - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return true; } return false; @@ -99689,7 +99893,7 @@ function transformDeclarations(context) { return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree); } function isEnclosingDeclaration(node) { - return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isStructDeclaration(node) || isAnnotationDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node); + return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isStructDeclaration(node) || isAnnotationDeclaration(node) || isOverloadDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node); } function checkEntityNameVisibility(entityName, enclosingDeclaration2) { const visibilityResult = resolver.isEntityNameVisible(entityName, enclosingDeclaration2); @@ -99705,7 +99909,7 @@ function transformDeclarations(context) { function rewriteModuleSpecifier(parent2, input) { if (!input) return void 0; - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 270 /* ModuleDeclaration */ && parent2.kind !== 205 /* ImportType */; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 273 /* ModuleDeclaration */ && parent2.kind !== 207 /* ImportType */; if (isStringLiteralLike(input)) { if (isBundledEmit) { const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent2); @@ -99724,7 +99928,7 @@ function transformDeclarations(context) { function transformImportEqualsDeclaration(decl) { if (!resolver.isDeclarationVisible(decl)) return; - if (decl.moduleReference.kind === 286 /* ExternalModuleReference */) { + if (decl.moduleReference.kind === 289 /* ExternalModuleReference */) { const specifier = getExternalModuleImportEqualsDeclarationExpression(decl); return factory2.updateImportEqualsDeclaration( decl, @@ -99760,7 +99964,7 @@ function transformDeclarations(context) { void 0 ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); } - if (decl.importClause.namedBindings.kind === 277 /* NamespaceImport */) { + if (decl.importClause.namedBindings.kind === 280 /* NamespaceImport */) { const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : void 0; return visibleDefaultBinding || namedBindings ? factory2.updateImportDeclaration(decl, decl.modifiers, factory2.updateImportClause( decl.importClause, @@ -99871,7 +100075,7 @@ function transformDeclarations(context) { const oldDiag = getSymbolAccessibilityDiagnostic; const canProduceDiagnostic = canProduceDiagnostics(input); const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; - let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 187 /* TypeLiteral */ || input.kind === 200 /* MappedType */) && input.parent.kind !== 268 /* TypeAliasDeclaration */; + let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 189 /* TypeLiteral */ || input.kind === 202 /* MappedType */) && input.parent.kind !== 271 /* TypeAliasDeclaration */; if (isMethodDeclaration(input) || isMethodSignature(input)) { if (hasEffectiveModifier(input, 8 /* Private */)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) @@ -99890,26 +100094,26 @@ function transformDeclarations(context) { } if (isProcessedComponent(input)) { switch (input.kind) { - case 234 /* ExpressionWithTypeArguments */: { + case 236 /* 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 183 /* TypeReference */: { + case 185 /* TypeReference */: { checkEntityNameVisibility(input.typeName, enclosingDeclaration); const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateTypeReferenceNode(node, node.typeName, node.typeArguments)); } - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: return cleanup(factory2.updateConstructSignature( input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type) )); - case 176 /* Constructor */: { + case 178 /* Constructor */: { const ctor = factory2.createConstructorDeclaration( ensureModifiers(input), updateParamsList(input, input.parameters, 0 /* None */), @@ -99917,7 +100121,7 @@ function transformDeclarations(context) { ); return cleanup(ctor); } - case 174 /* MethodDeclaration */: { + case 176 /* MethodDeclaration */: { if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -99935,7 +100139,7 @@ function transformDeclarations(context) { ); return cleanup(sig); } - case 177 /* GetAccessor */: { + case 179 /* GetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -99949,7 +100153,7 @@ function transformDeclarations(context) { void 0 )); } - case 178 /* SetAccessor */: { + case 180 /* SetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -99961,7 +100165,7 @@ function transformDeclarations(context) { void 0 )); } - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -99974,14 +100178,14 @@ function transformDeclarations(context) { ensureType(input, input.type), ensureNoInitializer(input) )); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return cleanup(factory2.updateAnnotationPropertyDeclaration( input, input.name, ensureType(input, input.type), input.initializer )); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -99992,7 +100196,18 @@ function transformDeclarations(context) { input.questionToken, ensureType(input, input.type) )); - case 173 /* MethodSignature */: { + case 174 /* OverloadPropertyDeclaration */: + if (isPrivateIdentifier(input.name)) { + return cleanup(void 0); + } + return cleanup(factory2.updateOverloadPropertyDeclaration( + input, + ensureModifiers(input), + input.name, + input.questionToken, + ensureType(input, input.type) + )); + case 175 /* MethodSignature */: { if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -100006,7 +100221,7 @@ function transformDeclarations(context) { ensureType(input, input.type) )); } - case 179 /* CallSignature */: { + case 181 /* CallSignature */: { return cleanup(factory2.updateCallSignature( input, ensureTypeParams(input, input.typeParameters), @@ -100014,7 +100229,7 @@ function transformDeclarations(context) { ensureType(input, input.type) )); } - case 181 /* IndexSignature */: { + case 183 /* IndexSignature */: { return cleanup(factory2.updateIndexSignature( input, ensureModifiers(input), @@ -100022,7 +100237,7 @@ function transformDeclarations(context) { visitNode(input.type, visitDeclarationSubtree) || factory2.createKeywordTypeNode(132 /* AnyKeyword */) )); } - case 261 /* VariableDeclaration */: { + case 263 /* VariableDeclaration */: { if (isBindingPattern(input.name)) { return recreateBindingPattern(input.name); } @@ -100030,13 +100245,13 @@ function transformDeclarations(context) { suppressNewDiagnosticContexts = true; return cleanup(factory2.updateVariableDeclaration(input, input.name, void 0, ensureType(input, input.type), ensureNoInitializer(input))); } - case 167 /* TypeParameter */: { + case 168 /* TypeParameter */: { if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { return cleanup(factory2.updateTypeParameterDeclaration(input, input.modifiers, input.name, void 0, void 0)); } return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); } - case 194 /* ConditionalType */: { + case 196 /* ConditionalType */: { const checkType = visitNode(input.checkType, visitDeclarationSubtree); const extendsType = visitNode(input.extendsType, visitDeclarationSubtree); const oldEnclosingDecl = enclosingDeclaration; @@ -100046,13 +100261,13 @@ function transformDeclarations(context) { const falseType = visitNode(input.falseType, visitDeclarationSubtree); return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType)); } - case 184 /* FunctionType */: { + case 186 /* FunctionType */: { return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree))); } - case 185 /* ConstructorType */: { + case 187 /* ConstructorType */: { return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree))); } - case 205 /* ImportType */: { + case 207 /* ImportType */: { if (!isLiteralImportTypeNode(input)) return cleanup(input); return cleanup(factory2.updateImportTypeNode( @@ -100092,7 +100307,7 @@ function transformDeclarations(context) { } } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); + return node.parent.kind === 176 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); } function visitDeclarationStatements(input) { if (!isPreservedDeclarationStatement(input)) { @@ -100101,7 +100316,7 @@ function transformDeclarations(context) { if (shouldStripInternal(input)) return; switch (input.kind) { - case 281 /* ExportDeclaration */: { + case 284 /* ExportDeclaration */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -100115,7 +100330,7 @@ function transformDeclarations(context) { getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0 ); } - case 280 /* ExportAssignment */: { + case 283 /* ExportAssignment */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -100157,10 +100372,10 @@ function transformDeclarations(context) { if (shouldStripInternal(input)) return; switch (input.kind) { - case 274 /* ImportEqualsDeclaration */: { + case 277 /* ImportEqualsDeclaration */: { return transformImportEqualsDeclaration(input); } - case 275 /* ImportDeclaration */: { + case 278 /* ImportDeclaration */: { return transformImportDeclaration(input); } } @@ -100180,7 +100395,7 @@ function transformDeclarations(context) { } const previousNeedsDeclare = needsDeclare; switch (input.kind) { - case 268 /* TypeAliasDeclaration */: { + case 271 /* TypeAliasDeclaration */: { needsDeclare = false; const clean2 = cleanup(factory2.updateTypeAliasDeclaration( input, @@ -100195,7 +100410,7 @@ function transformDeclarations(context) { needsDeclare = previousNeedsDeclare; return clean2; } - case 267 /* InterfaceDeclaration */: { + case 270 /* InterfaceDeclaration */: { return cleanup(factory2.updateInterfaceDeclaration( input, ensureModifiers(input), @@ -100205,7 +100420,7 @@ function transformDeclarations(context) { visitNodes2(input.members, visitDeclarationSubtree) )); } - case 263 /* FunctionDeclaration */: { + case 265 /* FunctionDeclaration */: { const clean2 = cleanup(factory2.updateFunctionDeclaration( input, ensureModifiers(input), @@ -100295,10 +100510,10 @@ function transformDeclarations(context) { return clean2; } } - case 270 /* ModuleDeclaration */: { + case 273 /* ModuleDeclaration */: { needsDeclare = false; const inner = input.body; - if (inner && inner.kind === 271 /* ModuleBlock */) { + if (inner && inner.kind === 274 /* ModuleBlock */) { const oldNeedsScopeFix = needsScopeFixMarker; const oldHasScopeFix = resultHasScopeMarker; resultHasScopeMarker = false; @@ -100342,7 +100557,7 @@ function transformDeclarations(context) { )); } } - case 265 /* StructDeclaration */: { + case 267 /* StructDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const decorators = ensureEtsDecorators(input, host); @@ -100359,7 +100574,7 @@ function transformDeclarations(context) { members )); } - case 266 /* AnnotationDeclaration */: { + case 268 /* AnnotationDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -100372,7 +100587,20 @@ function transformDeclarations(context) { members )); } - case 264 /* ClassDeclaration */: { + case 269 /* OverloadDeclaration */: { + errorNameNode = input.name; + errorFallbackNode = input; + const modifiers = factory2.createNodeArray(ensureModifiers(input)); + const memberNodes = visitNodes2(input.members, visitDeclarationSubtree); + const members = factory2.createNodeArray(memberNodes); + return cleanup(factory2.updateOverloadDeclaration( + input, + modifiers, + input.name, + members + )); + } + case 266 /* ClassDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -100475,10 +100703,10 @@ function transformDeclarations(context) { )); } } - case 244 /* VariableStatement */: { + case 246 /* VariableStatement */: { return cleanup(transformVariableStatement(input)); } - case 269 /* EnumDeclaration */: { + case 272 /* EnumDeclaration */: { return cleanup(factory2.updateEnumDeclaration(input, factory2.createNodeArray(ensureModifiers(input)), input.name, factory2.createNodeArray(mapDefined(input.members, (m) => { if (shouldStripInternal(m)) return; @@ -100494,7 +100722,7 @@ function transformDeclarations(context) { if (canProdiceDiagnostic) { getSymbolAccessibilityDiagnostic = oldDiag; } - if (input.kind === 270 /* ModuleDeclaration */) { + if (input.kind === 273 /* ModuleDeclaration */) { needsDeclare = previousNeedsDeclare; } if (node === input) { @@ -100517,7 +100745,7 @@ function transformDeclarations(context) { return flatten(mapDefined(d.elements, (e) => recreateBindingElement(e))); } function recreateBindingElement(e) { - if (e.kind === 233 /* OmittedExpression */) { + if (e.kind === 235 /* OmittedExpression */) { return; } if (e.name) { @@ -100566,7 +100794,7 @@ function transformDeclarations(context) { 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 === 314 /* SourceFile */; + const parentIsFile = node.parent.kind === 317 /* SourceFile */; if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { mask2 ^= 2 /* Ambient */; additions = 0 /* None */; @@ -100592,7 +100820,7 @@ function transformDeclarations(context) { } } function isAlwaysType(node) { - if (node.kind === 267 /* InterfaceDeclaration */) { + if (node.kind === 270 /* InterfaceDeclaration */) { return true; } return false; @@ -100612,60 +100840,62 @@ function maskModifierFlags(node, modifierMask = 258047 /* All */ ^ 4 /* Public * } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 177 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; + return accessor.kind === 179 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; } } function canHaveLiteralInitializer(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return !hasEffectiveModifier(node, 8 /* Private */); - case 168 /* Parameter */: - case 261 /* VariableDeclaration */: + case 169 /* Parameter */: + case 263 /* VariableDeclaration */: return true; } return false; } function isPreservedDeclarationStatement(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 270 /* ModuleDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 267 /* InterfaceDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 244 /* VariableStatement */: - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: + case 265 /* FunctionDeclaration */: + case 273 /* ModuleDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 270 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 246 /* VariableStatement */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: return true; } return false; } function isProcessedComponent(node) { switch (node.kind) { - case 180 /* ConstructSignature */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 181 /* IndexSignature */: - case 261 /* VariableDeclaration */: - case 167 /* TypeParameter */: - case 234 /* ExpressionWithTypeArguments */: - case 183 /* TypeReference */: - case 194 /* ConditionalType */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 205 /* ImportType */: + case 182 /* ConstructSignature */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 171 /* PropertySignature */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 183 /* IndexSignature */: + case 263 /* VariableDeclaration */: + case 168 /* TypeParameter */: + case 236 /* ExpressionWithTypeArguments */: + case 185 /* TypeReference */: + case 196 /* ConditionalType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 207 /* ImportType */: return true; } return false; @@ -100769,7 +100999,7 @@ function noEmitNotification(hint, node, callback) { } function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) { var _a2, _b; - const enabledSyntaxKindFeatures = new Array(364 /* Count */); + const enabledSyntaxKindFeatures = new Array(367 /* Count */); let lexicalEnvironmentVariableDeclarations; let lexicalEnvironmentFunctionDeclarations; let lexicalEnvironmentStatements; @@ -100848,7 +101078,7 @@ function transformNodes(resolver, host, factory2, options, nodes, transformers, state = 1 /* Initialized */; const transformed = []; for (const node of nodes) { - (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Emit, "transformNodes", node.kind === 314 /* 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 === 317 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); PerformanceDotting.start("transformRoot"); transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); PerformanceDotting.stop("transformRoot"); @@ -101165,7 +101395,7 @@ function getOutputPathsForBundle(options, forceDtsPaths) { } function getOutputPathsFor(sourceFile, host, forceDtsPaths) { const options = host.getCompilerOptions(); - if (sourceFile.kind === 315 /* Bundle */) { + if (sourceFile.kind === 318 /* Bundle */) { return getOutputPathsForBundle(options, forceDtsPaths); } else { const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options)); @@ -101538,8 +101768,8 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform2, printer3, mapOptions) { const sourceFileOrBundle = transform2.transformed[0]; - const bundle = sourceFileOrBundle.kind === 315 /* Bundle */ ? sourceFileOrBundle : void 0; - const sourceFile = sourceFileOrBundle.kind === 314 /* SourceFile */ ? sourceFileOrBundle : void 0; + const bundle = sourceFileOrBundle.kind === 318 /* Bundle */ ? sourceFileOrBundle : void 0; + const sourceFile = sourceFileOrBundle.kind === 317 /* SourceFile */ ? sourceFileOrBundle : void 0; const sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; let sourceMapGenerator; if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) { @@ -101593,7 +101823,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla writer.clear(); } function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) { - return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 314 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); + return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 317 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); } function getSourceRoot(mapOptions) { const sourceRoot = normalizeSlashes(mapOptions.sourceRoot || ""); @@ -101944,11 +102174,11 @@ function createPrinter(printerOptions = {}, handlers = {}) { break; } switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: return printFile(node); - case 315 /* Bundle */: + case 318 /* Bundle */: return printBundle(node); - case 316 /* UnparsedSource */: + case 319 /* UnparsedSource */: return printUnparsedSource(node); } writeNode(hint, node, sourceFile, beginPrint()); @@ -102262,300 +102492,304 @@ function createPrinter(printerOptions = {}, handlers = {}) { return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return emitQualifiedName(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return emitTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return emitParameter(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return emitDecorator(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return emitPropertySignature(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return emitPropertyDeclaration(node); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return emitAnnotationPropertyDeclaration(node); - case 173 /* MethodSignature */: + case 174 /* OverloadPropertyDeclaration */: + return emitOverloadPropertyDeclaration(node); + case 175 /* MethodSignature */: return emitMethodSignature(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return emitMethodDeclaration(node); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return emitClassStaticBlockDeclaration(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return emitConstructor(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return emitAccessorDeclaration(node); - case 179 /* CallSignature */: + case 181 /* CallSignature */: return emitCallSignature(node); - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: return emitConstructSignature(node); - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return emitIndexSignature(node); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return emitTypePredicate(node); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return emitTypeReference(node); - case 184 /* FunctionType */: + case 186 /* FunctionType */: return emitFunctionType(node); - case 185 /* ConstructorType */: + case 187 /* ConstructorType */: return emitConstructorType(node); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return emitTypeQuery(node); - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: return emitTypeLiteral(node); - case 188 /* ArrayType */: + case 190 /* ArrayType */: return emitArrayType(node); - case 189 /* TupleType */: + case 191 /* TupleType */: return emitTupleType(node); - case 190 /* OptionalType */: + case 192 /* OptionalType */: return emitOptionalType(node); - case 192 /* UnionType */: + case 194 /* UnionType */: return emitUnionType(node); - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return emitIntersectionType(node); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return emitConditionalType(node); - case 195 /* InferType */: + case 197 /* InferType */: return emitInferType(node); - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return emitParenthesizedType(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 197 /* ThisType */: + case 199 /* ThisType */: return emitThisType(); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return emitTypeOperator(node); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return emitIndexedAccessType(node); - case 200 /* MappedType */: + case 202 /* MappedType */: return emitMappedType(node); - case 201 /* LiteralType */: + case 203 /* LiteralType */: return emitLiteralType(node); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return emitNamedTupleMember(node); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: return emitTemplateType(node); - case 204 /* TemplateLiteralTypeSpan */: + case 206 /* TemplateLiteralTypeSpan */: return emitTemplateTypeSpan(node); - case 205 /* ImportType */: + case 207 /* ImportType */: return emitImportTypeNode(node); - case 206 /* ObjectBindingPattern */: + case 208 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return emitBindingElement(node); - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return emitTemplateSpan(node); - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: return emitSemicolonClassElement(); - case 242 /* Block */: + case 244 /* Block */: return emitBlock(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return emitVariableStatement(node); - case 243 /* EmptyStatement */: + case 245 /* EmptyStatement */: return emitEmptyStatement(false); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return emitExpressionStatement(node); - case 246 /* IfStatement */: + case 248 /* IfStatement */: return emitIfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return emitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return emitWhileStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return emitForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return emitForInStatement(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return emitForOfStatement(node); - case 252 /* ContinueStatement */: + case 254 /* ContinueStatement */: return emitContinueStatement(node); - case 253 /* BreakStatement */: + case 255 /* BreakStatement */: return emitBreakStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return emitReturnStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return emitWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return emitSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return emitLabeledStatement(node); - case 258 /* ThrowStatement */: + case 260 /* ThrowStatement */: return emitThrowStatement(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return emitTryStatement(node); - case 260 /* DebuggerStatement */: + case 262 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return emitVariableDeclarationList(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return emitFunctionDeclaration(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return emitClassOrStructDeclaration(node); - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return emitClassOrStructDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return emitAnnotationDeclaration(node); - case 267 /* InterfaceDeclaration */: + case 269 /* OverloadDeclaration */: + return emitOverloadDeclaration(node); + case 270 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return emitModuleBlock(node); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return emitCaseBlock(node); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return emitNamespaceExportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return emitImportDeclaration(node); - case 276 /* ImportClause */: + case 279 /* ImportClause */: return emitImportClause(node); - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return emitNamespaceImport(node); - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: return emitNamespaceExport(node); - case 278 /* NamedImports */: + case 281 /* NamedImports */: return emitNamedImports(node); - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return emitImportSpecifier(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return emitExportAssignment(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return emitExportDeclaration(node); - case 282 /* NamedExports */: + case 285 /* NamedExports */: return emitNamedExports(node); - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: return emitExportSpecifier(node); - case 302 /* AssertClause */: + case 305 /* AssertClause */: return emitAssertClause(node); - case 303 /* AssertEntry */: + case 306 /* AssertEntry */: return emitAssertEntry(node); - case 285 /* MissingDeclaration */: + case 288 /* MissingDeclaration */: return; - case 286 /* ExternalModuleReference */: + case 289 /* ExternalModuleReference */: return emitExternalModuleReference(node); case 11 /* JsxText */: return emitJsxText(node); - case 289 /* JsxOpeningElement */: - case 292 /* JsxOpeningFragment */: + case 292 /* JsxOpeningElement */: + case 295 /* JsxOpeningFragment */: return emitJsxOpeningElementOrFragment(node); - case 290 /* JsxClosingElement */: - case 293 /* JsxClosingFragment */: + case 293 /* JsxClosingElement */: + case 296 /* JsxClosingFragment */: return emitJsxClosingElementOrFragment(node); - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: return emitJsxAttribute(node); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return emitJsxAttributes(node); - case 296 /* JsxSpreadAttribute */: + case 299 /* JsxSpreadAttribute */: return emitJsxSpreadAttribute(node); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return emitJsxExpression(node); - case 298 /* CaseClause */: + case 301 /* CaseClause */: return emitCaseClause(node); - case 299 /* DefaultClause */: + case 302 /* DefaultClause */: return emitDefaultClause(node); - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return emitHeritageClause(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return emitCatchClause(node); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: return emitSpreadAssignment(node); - case 308 /* EnumMember */: + case 311 /* EnumMember */: return emitEnumMember(node); - case 309 /* UnparsedPrologue */: + case 312 /* UnparsedPrologue */: return writeUnparsedNode(node); - case 316 /* UnparsedSource */: - case 310 /* UnparsedPrepend */: + case 319 /* UnparsedSource */: + case 313 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); - case 311 /* UnparsedText */: - case 312 /* UnparsedInternalText */: + case 314 /* UnparsedText */: + case 315 /* UnparsedInternalText */: return emitUnparsedTextLike(node); - case 313 /* UnparsedSyntheticReference */: + case 316 /* UnparsedSyntheticReference */: return emitUnparsedSyntheticReference(node); - case 314 /* SourceFile */: + case 317 /* SourceFile */: return emitSourceFile(node); - case 315 /* Bundle */: + case 318 /* Bundle */: return Debug.fail("Bundles should be printed using printBundle"); - case 317 /* InputFiles */: + case 320 /* InputFiles */: return Debug.fail("InputFiles should not be printed"); - case 318 /* JSDocTypeExpression */: + case 321 /* JSDocTypeExpression */: return emitJSDocTypeExpression(node); - case 319 /* JSDocNameReference */: + case 322 /* JSDocNameReference */: return emitJSDocNameReference(node); - case 321 /* JSDocAllType */: + case 324 /* JSDocAllType */: return writePunctuation("*"); - case 322 /* JSDocUnknownType */: + case 325 /* JSDocUnknownType */: return writePunctuation("?"); - case 323 /* JSDocNullableType */: + case 326 /* JSDocNullableType */: return emitJSDocNullableType(node); - case 324 /* JSDocNonNullableType */: + case 327 /* JSDocNonNullableType */: return emitJSDocNonNullableType(node); - case 325 /* JSDocOptionalType */: + case 328 /* JSDocOptionalType */: return emitJSDocOptionalType(node); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: return emitJSDocFunctionType(node); - case 191 /* RestType */: - case 327 /* JSDocVariadicType */: + case 193 /* RestType */: + case 330 /* JSDocVariadicType */: return emitRestOrJSDocVariadicType(node); - case 328 /* JSDocNamepathType */: + case 331 /* JSDocNamepathType */: return; - case 329 /* JSDoc */: + case 332 /* JSDoc */: return emitJSDoc(node); - case 331 /* JSDocTypeLiteral */: + case 334 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 332 /* JSDocSignature */: + case 335 /* JSDocSignature */: return emitJSDocSignature(node); - case 336 /* JSDocTag */: - case 341 /* JSDocClassTag */: - case 346 /* JSDocOverrideTag */: + case 339 /* JSDocTag */: + case 344 /* JSDocClassTag */: + case 349 /* JSDocOverrideTag */: return emitJSDocSimpleTag(node); - case 337 /* JSDocAugmentsTag */: - case 338 /* JSDocImplementsTag */: + case 340 /* JSDocAugmentsTag */: + case 341 /* JSDocImplementsTag */: return emitJSDocHeritageTag(node); - case 339 /* JSDocAuthorTag */: - case 340 /* JSDocDeprecatedTag */: + case 342 /* JSDocAuthorTag */: + case 343 /* JSDocDeprecatedTag */: return; - case 342 /* JSDocPublicTag */: - case 343 /* JSDocPrivateTag */: - case 344 /* JSDocProtectedTag */: - case 345 /* JSDocReadonlyTag */: + case 345 /* JSDocPublicTag */: + case 346 /* JSDocPrivateTag */: + case 347 /* JSDocProtectedTag */: + case 348 /* JSDocReadonlyTag */: return; - case 347 /* JSDocCallbackTag */: + case 350 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); - case 349 /* JSDocParameterTag */: - case 356 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: + case 359 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 348 /* JSDocEnumTag */: - case 350 /* JSDocReturnTag */: - case 351 /* JSDocThisTag */: - case 352 /* JSDocTypeTag */: + case 351 /* JSDocEnumTag */: + case 353 /* JSDocReturnTag */: + case 354 /* JSDocThisTag */: + case 355 /* JSDocTypeTag */: return emitJSDocSimpleTypedTag(node); - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 355 /* JSDocSeeTag */: + case 358 /* JSDocSeeTag */: return emitJSDocSeeTag(node); - case 358 /* NotEmittedStatement */: - case 362 /* EndOfDeclarationMarker */: - case 361 /* MergeDeclarationMarker */: + case 361 /* NotEmittedStatement */: + case 365 /* EndOfDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: return; } if (isExpression(node)) { @@ -102584,84 +102818,84 @@ function createPrinter(printerOptions = {}, handlers = {}) { return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return emitArrayLiteralExpression(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return emitObjectLiteralExpression(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return emitPropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return emitElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return emitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return emitNewExpression(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: return emitTypeAssertionExpression(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return emitParenthesizedExpression(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return emitFunctionExpression(node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return emitArrowFunction(node); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return emitDeleteExpression(node); - case 222 /* TypeOfExpression */: + case 224 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return emitVoidExpression(node); - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return emitAwaitExpression(node); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return emitBinaryExpression(node); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return emitConditionalExpression(node); - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: return emitTemplateExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return emitYieldExpression(node); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return emitSpreadElement(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return emitClassExpression(node); - case 233 /* OmittedExpression */: + case 235 /* OmittedExpression */: return; - case 235 /* AsExpression */: + case 237 /* AsExpression */: return emitAsExpression(node); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return emitNonNullExpression(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return emitSatisfiesExpression(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return emitMetaProperty(node); - case 238 /* SyntheticExpression */: + case 240 /* SyntheticExpression */: return Debug.fail("SyntheticExpression should never be printed."); - case 287 /* JsxElement */: + case 290 /* JsxElement */: return emitJsxElement(node); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return emitJsxSelfClosingElement(node); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return emitJsxFragment(node); - case 357 /* SyntaxList */: + case 360 /* SyntaxList */: return Debug.fail("SyntaxList should not be printed"); - case 358 /* NotEmittedStatement */: + case 361 /* NotEmittedStatement */: return; - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return emitCommaList(node); - case 361 /* MergeDeclarationMarker */: - case 362 /* EndOfDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: + case 365 /* EndOfDeclarationMarker */: return; - case 363 /* SyntheticReferenceExpression */: + case 366 /* SyntheticReferenceExpression */: return Debug.fail("SyntheticReferenceExpression should not be printed"); } } @@ -102712,7 +102946,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitHelpers(node) { let helpersEmitted = false; - const bundle = node.kind === 315 /* Bundle */ ? node : void 0; + const bundle = node.kind === 318 /* Bundle */ ? node : void 0; if (bundle && moduleKind === 0 /* None */) { return; } @@ -102783,7 +103017,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { updateOrPushBundleFileTextLike( pos, writer.getTextPos(), - unparsed.kind === 311 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ + unparsed.kind === 314 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ ); } } @@ -102814,7 +103048,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitTabStop(hint, node, snippet) { Debug.assert( - node.kind === 243 /* EmptyStatement */, + node.kind === 245 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` ); Debug.assert( @@ -102870,7 +103104,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emit(node.dotDotDotToken); emitNodeWithWriter(node.name, writeParameter); emit(node.questionToken); - if (node.parent && node.parent.kind === 326 /* JSDocFunctionType */ && !node.name) { + if (node.parent && node.parent.kind === 329 /* JSDocFunctionType */ && !node.name) { emit(node.type); } else { emitTypeAnnotation(node.type); @@ -102888,6 +103122,11 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitTypeAnnotation(node.type); writeTrailingSemicolon(); } + function emitOverloadPropertyDeclaration(node) { + emitModifiers(node, node.modifiers); + emitNodeWithWriter(node.name, writeProperty); + emit(node.questionToken); + } function emitPropertyDeclaration(node) { emitDecoratorsAndModifiers(node, node.modifiers); emit(node.name); @@ -102932,7 +103171,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitAccessorDeclaration(node) { emitDecoratorsAndModifiers(node, node.modifiers); - writeKeyword(node.kind === 177 /* GetAccessor */ ? "get" : "set"); + writeKeyword(node.kind === 179 /* GetAccessor */ ? "get" : "set"); writeSpace(); emit(node.name); emitSignatureAndBody(node, emitSignatureHead); @@ -103361,7 +103600,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function shouldEmitWhitespaceBeforeOperand(node) { const operand = node.operand; - return operand.kind === 225 /* 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 === 227 /* 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); @@ -103557,7 +103796,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (node.elseStatement) { writeLineOrSpace(node, node.thenStatement, node.elseStatement); emitTokenWithComment(92 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); - if (node.elseStatement.kind === 246 /* IfStatement */) { + if (node.elseStatement.kind === 248 /* IfStatement */) { writeSpace(); emit(node.elseStatement); } else { @@ -103618,7 +103857,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(164 /* OfKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(165 /* OfKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); @@ -103626,7 +103865,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitForBinding(node) { if (node !== void 0) { - if (node.kind === 262 /* VariableDeclarationList */) { + if (node.kind === 264 /* VariableDeclarationList */) { emit(node); } else { emitExpression(node); @@ -103662,7 +103901,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } pos = writeTokenText(token, writer2, pos); if (isSimilarNode && contextNode.end !== pos) { - const isJsxExprContext = contextNode.kind === 297 /* JsxExpression */; + const isJsxExprContext = contextNode.kind === 300 /* JsxExpression */; emitTrailingCommentsOfPosition(pos, !isJsxExprContext, isJsxExprContext); } return pos; @@ -103921,6 +104160,25 @@ function createPrinter(printerOptions = {}, handlers = {}) { decreaseIndent(); } } + function emitOverloadDeclaration(node) { + emitDecoratorsAndModifiers(node, node.modifiers); + writeKeyword("overload"); + if (node.name) { + writeSpace(); + emitIdentifierName(node.name); + } + const indentedFlag = getEmitFlags(node) & 65536 /* Indented */; + if (indentedFlag) { + increaseIndent(); + } + writeSpace(); + writePunctuation("{"); + emitList(node, node.members, 145 /* EnumMembers */); + writePunctuation("}"); + if (indentedFlag) { + decreaseIndent(); + } + } function emitTypeAliasDeclaration(node) { if (isSendableFunctionOrType(node, true)) { emitDecorators(node, node.illegalDecorators); @@ -104318,7 +104576,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 352 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 355 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } else { @@ -104362,7 +104620,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { function emitJSDocTypedefTag(tag) { emitJSDocTagName(tag.tagName); if (tag.typeExpression) { - if (tag.typeExpression.kind === 318 /* JSDocTypeExpression */) { + if (tag.typeExpression.kind === 321 /* JSDocTypeExpression */) { emitJSDocTypeExpression(tag.typeExpression); } else { writeSpace(); @@ -104380,7 +104638,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emit(tag.fullName); } emitJSDocComment(tag.comment); - if (tag.typeExpression && tag.typeExpression.kind === 331 /* JSDocTypeLiteral */) { + if (tag.typeExpression && tag.typeExpression.kind === 334 /* JSDocTypeLiteral */) { emitJSDocTypeLiteral(tag.typeExpression); } } @@ -105196,7 +105454,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { return block.statements.length === 0 && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile)); } function skipSynthesizedParentheses(node) { - while (node.kind === 217 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { + while (node.kind === 219 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -105266,84 +105524,84 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (!node) return; switch (node.kind) { - case 242 /* Block */: + case 244 /* Block */: forEach(node.statements, generateNames); break; - case 257 /* LabeledStatement */: - case 255 /* WithStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 259 /* LabeledStatement */: + case 257 /* WithStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: generateNames(node.statement); break; - case 246 /* IfStatement */: + case 248 /* IfStatement */: generateNames(node.thenStatement); generateNames(node.elseStatement); break; - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: - case 250 /* ForInStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: + case 252 /* ForInStatement */: generateNames(node.initializer); generateNames(node.statement); break; - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: generateNames(node.caseBlock); break; - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: forEach(node.clauses, generateNames); break; - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: forEach(node.statements, generateNames); break; - case 259 /* TryStatement */: + case 261 /* TryStatement */: generateNames(node.tryBlock); generateNames(node.catchClause); generateNames(node.finallyBlock); break; - case 301 /* CatchClause */: + case 304 /* CatchClause */: generateNames(node.variableDeclaration); generateNames(node.block); break; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: generateNames(node.declarationList); break; - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: forEach(node.declarations, generateNames); break; - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: generateNameIfNeeded(node.name); break; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: generateNameIfNeeded(node.name); if (getEmitFlags(node) & 524288 /* ReuseTempVariableScope */) { forEach(node.parameters, generateNames); generateNames(node.body); } break; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: forEach(node.elements, generateNames); break; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: generateNames(node.importClause); break; - case 276 /* ImportClause */: + case 279 /* ImportClause */: generateNameIfNeeded(node.name); generateNames(node.namedBindings); break; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: generateNameIfNeeded(node.name); break; - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: generateNameIfNeeded(node.name); break; - case 278 /* NamedImports */: + case 281 /* NamedImports */: forEach(node.elements, generateNames); break; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: generateNameIfNeeded(node.propertyName || node.name); break; } @@ -105352,13 +105610,13 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (!node) return; switch (node.kind) { - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: generateNameIfNeeded(node.name); break; } @@ -105532,27 +105790,27 @@ function createPrinter(printerOptions = {}, handlers = {}) { prefix, suffix ); - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForModuleOrEnum(node); - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForImportOrExportDeclaration(node); - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 280 /* ExportAssignment */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 283 /* ExportAssignment */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForExportDefault(); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForClassExpression(); - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return generateNameForMethodOrAccessor(node, privateName, prefix, suffix); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return makeTempVariableName(TempFlags.Auto, true, privateName, prefix, suffix); default: return makeTempVariableName(TempFlags.Auto, false, privateName, prefix, suffix); @@ -105643,14 +105901,14 @@ function createPrinter(printerOptions = {}, handlers = {}) { const skipTrailingComments = end < 0 || (emitFlags & 1024 /* NoTrailingComments */) !== 0 || node.kind === 11 /* JsxText */; if ((pos > 0 || end > 0) && pos !== end) { if (!skipLeadingComments) { - emitLeadingComments(pos, node.kind !== 358 /* NotEmittedStatement */); + emitLeadingComments(pos, node.kind !== 361 /* NotEmittedStatement */); } if (!skipLeadingComments || pos >= 0 && (emitFlags & 512 /* NoLeadingComments */) !== 0) { containerPos = pos; } if (!skipTrailingComments || end >= 0 && (emitFlags & 1024 /* NoTrailingComments */) !== 0) { containerEnd = end; - if (node.kind === 262 /* VariableDeclarationList */) { + if (node.kind === 264 /* VariableDeclarationList */) { declarationListContainerEnd = end; } } @@ -105666,7 +105924,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { containerPos = savedContainerPos; containerEnd = savedContainerEnd; declarationListContainerEnd = savedDeclarationListContainerEnd; - if (!skipTrailingComments && node.kind !== 358 /* NotEmittedStatement */) { + if (!skipTrailingComments && node.kind !== 361 /* NotEmittedStatement */) { emitTrailingComments(end); } } @@ -105918,7 +106176,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } } else { const source = sourceMapRange.source || sourceMapSource; - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { + if (node.kind !== 361 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos)); } if (emitFlags & 64 /* NoNestedSourceMaps */) { @@ -105933,7 +106191,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (emitFlags & 64 /* NoNestedSourceMaps */) { sourceMapsDisabled = false; } - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { + if (node.kind !== 361 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end); } } @@ -108335,89 +108593,89 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return diagnostics; function walk(node, parent2) { switch (parent2.kind) { - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: if (parent2.questionToken === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); return "skip"; } - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 261 /* VariableDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 221 /* ArrowFunction */: + case 263 /* 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 276 /* ImportClause */: + case 279 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(parent2, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); return "skip"; } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); return "skip"; } break; - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 287 /* 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 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.import_can_only_be_used_in_TypeScript_files)); return "skip"; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.export_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: const heritageClause = node; if (heritageClause.token === 118 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 267 /* InterfaceDeclaration */: + case 270 /* 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 270 /* ModuleDeclaration */: + case 273 /* 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 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); return "skip"; - case 269 /* EnumDeclaration */: + case 272 /* 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 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 235 /* AsExpression */: + case 237 /* AsExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: Debug.fail(); } } @@ -108426,27 +108684,27 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config diagnostics.push(createDiagnosticForNode2(parent2, Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning)); } switch (parent2.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 221 /* ArrowFunction */: if (nodes === parent2.typeParameters) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); return "skip"; } - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: if (nodes === parent2.modifiers) { - checkModifiers(parent2.modifiers, parent2.kind === 244 /* VariableStatement */); + checkModifiers(parent2.modifiers, parent2.kind === 246 /* VariableStatement */); return "skip"; } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (nodes === parent2.modifiers) { for (const modifier of nodes) { if (isModifier(modifier) && modifier.kind !== 125 /* StaticKeyword */ && modifier.kind !== 128 /* AccessorKeyword */) { @@ -108456,18 +108714,18 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return "skip"; } break; - case 168 /* Parameter */: + case 169 /* 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 213 /* CallExpression */: - case 214 /* NewExpression */: - case 234 /* ExpressionWithTypeArguments */: - case 288 /* JsxSelfClosingElement */: - case 289 /* JsxOpeningElement */: - case 215 /* TaggedTemplateExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 236 /* ExpressionWithTypeArguments */: + case 291 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 217 /* TaggedTemplateExpression */: if (nodes === parent2.typeArguments) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); return "skip"; @@ -117816,6 +118074,9 @@ __export(ts_exports3, { isOptionalTypeNode: () => isOptionalTypeNode, isOuterExpression: () => isOuterExpression, isOutermostOptionalChain: () => isOutermostOptionalChain, + isOverloadDeclaration: () => isOverloadDeclaration, + isOverloadElement: () => isOverloadElement, + isOverloadPropertyDeclaration: () => isOverloadPropertyDeclaration, isOverrideModifier: () => isOverrideModifier, isPackedArrayLiteral: () => isPackedArrayLiteral, isParameter: () => isParameter, @@ -118939,39 +119200,39 @@ var SemanticMeaning = /* @__PURE__ */ ((SemanticMeaning3) => { })(SemanticMeaning || {}); function getMeaningFromDeclaration(node) { switch (node.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return isInJSFile(node) && getJSDocEnumTag(node) ? 7 /* All */ : 1 /* Value */; - case 168 /* Parameter */: - case 208 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 301 /* CatchClause */: - case 294 /* JsxAttribute */: + case 169 /* Parameter */: + case 210 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 304 /* CatchClause */: + case 297 /* JsxAttribute */: return 1 /* Value */; - case 167 /* TypeParameter */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 187 /* TypeLiteral */: + case 168 /* TypeParameter */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 189 /* TypeLiteral */: return 2 /* Type */; - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return node.name === void 0 ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */; - case 308 /* EnumMember */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: + case 311 /* EnumMember */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: return 1 /* Value */ | 2 /* Type */; - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return 2 /* Type */; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: if (isAmbientModule(node)) { return 4 /* Namespace */ | 1 /* Value */; } else if (getModuleInstanceState(node) === 1 /* Instantiated */) { @@ -118979,15 +119240,15 @@ function getMeaningFromDeclaration(node) { } else { return 4 /* Namespace */; } - case 269 /* EnumDeclaration */: - case 278 /* NamedImports */: - case 279 /* ImportSpecifier */: - case 274 /* ImportEqualsDeclaration */: - case 275 /* ImportDeclaration */: - case 280 /* ExportAssignment */: - case 281 /* ExportDeclaration */: + case 272 /* EnumDeclaration */: + case 281 /* NamedImports */: + case 282 /* ImportSpecifier */: + case 277 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 283 /* ExportAssignment */: + case 284 /* ExportDeclaration */: return 7 /* All */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return 4 /* Namespace */ | 1 /* Value */; } return 7 /* All */; @@ -118995,7 +119256,7 @@ function getMeaningFromDeclaration(node) { function getMeaningFromLocation(node) { node = getAdjustedReferenceLocation(node); const parent2 = node.parent; - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { return 1 /* Value */; } else if (isExportAssignment(parent2) || isExportSpecifier(parent2) || isExternalModuleReference(parent2) || isImportSpecifier(parent2) || isImportClause(parent2) || isImportEqualsDeclaration(parent2) && node === parent2.name) { return 7 /* All */; @@ -119019,11 +119280,11 @@ function getMeaningFromLocation(node) { } } function getMeaningFromRightHandSideOfImportEquals(node) { - const name = node.kind === 165 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; - return name && name.parent.kind === 274 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; + const name = node.kind === 166 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; + return name && name.parent.kind === 277 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; } function isInRightSideOfInternalImportEqualsDeclaration(node) { - while (node.parent.kind === 165 /* QualifiedName */) { + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } return isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -119034,26 +119295,26 @@ function isNamespaceReference(node) { function isQualifiedNameNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 165 /* QualifiedName */) { - while (root.parent && root.parent.kind === 165 /* QualifiedName */) { + if (root.parent.kind === 166 /* QualifiedName */) { + while (root.parent && root.parent.kind === 166 /* QualifiedName */) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 183 /* TypeReference */ && !isLastClause; + return root.parent.kind === 185 /* TypeReference */ && !isLastClause; } function isPropertyAccessNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 211 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 211 /* PropertyAccessExpression */) { + if (root.parent.kind === 213 /* PropertyAccessExpression */) { + while (root.parent && root.parent.kind === 213 /* PropertyAccessExpression */) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 234 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 300 /* HeritageClause */) { + if (!isLastClause && root.parent.kind === 236 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 303 /* HeritageClause */) { const decl = root.parent.parent.parent; - return (decl.kind === 264 /* ClassDeclaration */ || decl.kind === 265 /* StructDeclaration */) && root.parent.parent.token === 118 /* ImplementsKeyword */ || decl.kind === 267 /* InterfaceDeclaration */ && root.parent.parent.token === 95 /* ExtendsKeyword */; + return (decl.kind === 266 /* ClassDeclaration */ || decl.kind === 267 /* StructDeclaration */) && root.parent.parent.token === 118 /* ImplementsKeyword */ || decl.kind === 270 /* InterfaceDeclaration */ && root.parent.parent.token === 95 /* ExtendsKeyword */; } return false; } @@ -119064,15 +119325,15 @@ function isTypeReference(node) { switch (node.kind) { case 109 /* ThisKeyword */: return !isExpressionNode(node); - case 197 /* ThisType */: + case 199 /* ThisType */: return true; } switch (node.parent.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return true; - case 205 /* ImportType */: + case 207 /* ImportType */: return !node.parent.isTypeOf; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return isPartOfTypeNode(node.parent); } return false; @@ -119119,7 +119380,7 @@ function climbPastPropertyOrElementAccess(node) { } function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 257 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { + if (referenceNode.kind === 259 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -119169,22 +119430,22 @@ function isNameOfFunctionDeclaration(node) { } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { switch (node.parent.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 305 /* PropertyAssignment */: - case 308 /* EnumMember */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 270 /* ModuleDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 308 /* PropertyAssignment */: + case 311 /* EnumMember */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 273 /* ModuleDeclaration */: return getNameOfDeclaration(node.parent) === node; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return node.parent.argumentExpression === node; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return true; - case 201 /* LiteralType */: - return node.parent.parent.kind === 199 /* IndexedAccessType */; + case 203 /* LiteralType */: + return node.parent.parent.kind === 201 /* IndexedAccessType */; default: return false; } @@ -119202,86 +119463,86 @@ function getContainerNode(node) { return void 0; } switch (node.kind) { - case 314 /* SourceFile */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 270 /* ModuleDeclaration */: + case 317 /* SourceFile */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 273 /* ModuleDeclaration */: return node; } } } function getNodeKind(node) { switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: return isExternalModule(node) ? "module" /* moduleElement */ : "script" /* scriptElement */; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return "module" /* moduleElement */; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return "class" /* classElement */; - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return "struct" /* structElement */; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return "interface" /* interfaceElement */; - case 268 /* TypeAliasDeclaration */: - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: + case 271 /* TypeAliasDeclaration */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: return "type" /* typeElement */; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return "enum" /* enumElement */; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return getKindOfVariableDeclaration(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return getKindOfVariableDeclaration(getRootDeclaration(node)); - case 219 /* ArrowFunction */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return "function" /* functionElement */; - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return "getter" /* memberGetAccessorElement */; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return "setter" /* memberSetAccessorElement */; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return "method" /* memberFunctionElement */; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: const { initializer } = node; return isFunctionLike(initializer) ? "method" /* memberFunctionElement */ : "property" /* memberVariableElement */; - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 306 /* ShorthandPropertyAssignment */: - case 307 /* SpreadAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 309 /* ShorthandPropertyAssignment */: + case 310 /* SpreadAssignment */: return "property" /* memberVariableElement */; - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return "index" /* indexSignatureElement */; - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: return "construct" /* constructSignatureElement */; - case 179 /* CallSignature */: + case 181 /* CallSignature */: return "call" /* callSignatureElement */; - case 176 /* Constructor */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 177 /* ClassStaticBlockDeclaration */: return "constructor" /* constructorImplementationElement */; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return "type parameter" /* typeParameterElement */; - case 308 /* EnumMember */: + case 311 /* EnumMember */: return "enum member" /* enumMemberElement */; - case 168 /* Parameter */: + case 169 /* Parameter */: return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) ? "property" /* memberVariableElement */ : "parameter" /* parameterElement */; - case 274 /* ImportEqualsDeclaration */: - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: - case 277 /* NamespaceImport */: - case 283 /* NamespaceExport */: + case 277 /* ImportEqualsDeclaration */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: + case 280 /* NamespaceImport */: + case 286 /* NamespaceExport */: return "alias" /* alias */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const kind = getAssignmentDeclarationKind(node); const { right } = node; switch (kind) { @@ -119309,7 +119570,7 @@ function getNodeKind(node) { } case 79 /* Identifier */: return isImportClause(node.parent) ? "alias" /* alias */ : "" /* unknown */; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: const scriptKind = getNodeKind(node.expression); return scriptKind === "" /* unknown */ ? "const" /* constElement */ : scriptKind; default: @@ -119324,7 +119585,7 @@ function isThis(node) { case 109 /* ThisKeyword */: return true; case 79 /* Identifier */: - return identifierIsThisKeyword(node) && node.parent.kind === 168 /* Parameter */; + return identifierIsThisKeyword(node) && node.parent.kind === 169 /* Parameter */; default: return false; } @@ -119373,42 +119634,42 @@ function isCompletedNode(n, sourceFile) { return false; } switch (n.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 206 /* ObjectBindingPattern */: - case 187 /* TypeLiteral */: - case 242 /* Block */: - case 271 /* ModuleBlock */: - case 272 /* CaseBlock */: - case 278 /* NamedImports */: - case 282 /* NamedExports */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 212 /* ObjectLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 189 /* TypeLiteral */: + case 244 /* Block */: + case 274 /* ModuleBlock */: + case 275 /* CaseBlock */: + case 281 /* NamedImports */: + case 285 /* NamedExports */: return nodeEndsWith(n, 19 /* CloseBraceToken */, sourceFile); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return isCompletedNode(n.block, sourceFile); - case 214 /* NewExpression */: + case 216 /* NewExpression */: if (!n.arguments) { return true; } - case 213 /* CallExpression */: - case 217 /* ParenthesizedExpression */: - case 196 /* ParenthesizedType */: + case 215 /* CallExpression */: + case 219 /* ParenthesizedExpression */: + case 198 /* ParenthesizedType */: return nodeEndsWith(n, 21 /* CloseParenToken */, sourceFile); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: return isCompletedNode(n.type, sourceFile); - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 180 /* ConstructSignature */: - case 179 /* CallSignature */: - case 219 /* ArrowFunction */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 182 /* ConstructSignature */: + case 181 /* CallSignature */: + case 221 /* ArrowFunction */: if (n.body) { return isCompletedNode(n.body, sourceFile); } @@ -119416,60 +119677,60 @@ function isCompletedNode(n, sourceFile) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 21 /* CloseParenToken */, sourceFile); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return !!n.body && isCompletedNode(n.body, sourceFile); - case 246 /* IfStatement */: + case 248 /* IfStatement */: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return isCompletedNode(n.expression, sourceFile) || hasChildOfKind(n, 26 /* SemicolonToken */, sourceFile); - case 209 /* ArrayLiteralExpression */: - case 207 /* ArrayBindingPattern */: - case 212 /* ElementAccessExpression */: - case 166 /* ComputedPropertyName */: - case 189 /* TupleType */: + case 211 /* ArrayLiteralExpression */: + case 209 /* ArrayBindingPattern */: + case 214 /* ElementAccessExpression */: + case 167 /* ComputedPropertyName */: + case 191 /* TupleType */: return nodeEndsWith(n, 23 /* CloseBracketToken */, sourceFile); - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: if (n.type) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 23 /* CloseBracketToken */, sourceFile); - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: return false; - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 248 /* WhileStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 250 /* WhileStatement */: return isCompletedNode(n.statement, sourceFile); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return hasChildOfKind(n, 116 /* WhileKeyword */, sourceFile) ? nodeEndsWith(n, 21 /* CloseParenToken */, sourceFile) : isCompletedNode(n.statement, sourceFile); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return isCompletedNode(n.exprName, sourceFile); - case 222 /* TypeOfExpression */: - case 221 /* DeleteExpression */: - case 223 /* VoidExpression */: - case 230 /* YieldExpression */: - case 231 /* SpreadElement */: + case 224 /* TypeOfExpression */: + case 223 /* DeleteExpression */: + case 225 /* VoidExpression */: + case 232 /* YieldExpression */: + case 233 /* SpreadElement */: const unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return isCompletedNode(n.template, sourceFile); - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: const lastSpan = lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return nodeIsPresent(n.literal); - case 281 /* ExportDeclaration */: - case 275 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: return nodeIsPresent(n.moduleSpecifier); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return isCompletedNode(n.operand, sourceFile); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isCompletedNode(n.right, sourceFile); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -119571,14 +119832,14 @@ function getContextualTypeFromParentOrAncestorTypeNode(node, checker) { function getAdjustedLocationForDeclaration(node, forRename) { if (!forRename) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: return getAdjustedLocationForClass(node); - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return getAdjustedLocationForFunction(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return node; } } @@ -119728,7 +119989,7 @@ function getAdjustedLocation(node, forRename) { if (node.kind === 129 /* AsKeyword */ && isAsExpression(parent2) && isTypeReferenceNode(parent2.type)) { return parent2.type.typeName; } - if (node.kind === 102 /* InKeyword */ && isForInStatement(parent2) || node.kind === 164 /* OfKeyword */ && isForOfStatement(parent2)) { + if (node.kind === 102 /* InKeyword */ && isForInStatement(parent2) || node.kind === 165 /* OfKeyword */ && isForOfStatement(parent2)) { return skipOuterExpressions(parent2.expression); } } @@ -119867,7 +120128,7 @@ function findPrecedingToken(position, sourceFile, startNode2, excludeJsdoc) { } } } - Debug.assert(startNode2 !== void 0 || n.kind === 314 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); + Debug.assert(startNode2 !== void 0 || n.kind === 317 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); const candidate = findRightmostChildNodeWithTokens(children, children.length, sourceFile, n.kind); return candidate && findRightmostToken(candidate, sourceFile); } @@ -119890,7 +120151,7 @@ function findRightmostChildNodeWithTokens(children, exclusiveStartPosition, sour for (let i = exclusiveStartPosition - 1; i >= 0; i--) { const child = children[i]; if (isWhiteSpaceOnlyJsxText(child)) { - if (i === 0 && (parentKind === 11 /* JsxText */ || parentKind === 288 /* JsxSelfClosingElement */)) { + if (i === 0 && (parentKind === 11 /* JsxText */ || parentKind === 291 /* JsxSelfClosingElement */)) { Debug.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`"); } } else if (nodeHasTokens(children[i], sourceFile)) { @@ -119922,13 +120183,13 @@ function isInsideJsxElementOrAttribute(sourceFile, position) { if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 11 /* JsxText */) { return true; } - if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 297 /* JsxExpression */) { + if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 300 /* JsxExpression */) { return true; } - if (token && token.kind === 19 /* CloseBraceToken */ && token.parent.kind === 297 /* JsxExpression */) { + if (token && token.kind === 19 /* CloseBraceToken */ && token.parent.kind === 300 /* JsxExpression */) { return true; } - if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 290 /* JsxClosingElement */) { + if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 293 /* JsxClosingElement */) { return true; } return false; @@ -119956,9 +120217,9 @@ function isInJSXText(sourceFile, position) { function isInsideJsxElement(sourceFile, position) { function isInsideJsxElementTraversal(node) { while (node) { - if (node.kind >= 288 /* JsxSelfClosingElement */ && node.kind <= 297 /* 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 >= 291 /* JsxSelfClosingElement */ && node.kind <= 300 /* 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 === 287 /* JsxElement */) { + } else if (node.kind === 290 /* JsxElement */) { if (position > node.getStart(sourceFile)) return true; node = node.parent; @@ -120119,15 +120380,15 @@ function getNodeModifiers(node, excludeFlags = 0 /* None */) { result.push("deprecated" /* deprecatedModifier */); if (node.flags & 16777216 /* Ambient */) result.push("declare" /* ambientModifier */); - if (node.kind === 280 /* ExportAssignment */) + if (node.kind === 283 /* ExportAssignment */) result.push("export" /* exportedModifier */); return result.length > 0 ? result.join(",") : "" /* none */; } function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 183 /* TypeReference */ || node.kind === 213 /* CallExpression */) { + if (node.kind === 185 /* TypeReference */ || node.kind === 215 /* CallExpression */) { return node.typeArguments; } - if (isFunctionLike(node) || node.kind === 264 /* ClassDeclaration */ || node.kind === 267 /* InterfaceDeclaration */) { + if (isFunctionLike(node) || node.kind === 266 /* ClassDeclaration */ || node.kind === 270 /* InterfaceDeclaration */) { return node.typeParameters; } return void 0; @@ -120162,14 +120423,14 @@ function cloneCompilerOptions(options) { return result; } function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { - if (node.kind === 209 /* ArrayLiteralExpression */ || node.kind === 210 /* ObjectLiteralExpression */) { - if (node.parent.kind === 227 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */) { + if (node.kind === 211 /* ArrayLiteralExpression */ || node.kind === 212 /* ObjectLiteralExpression */) { + if (node.parent.kind === 229 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */) { return true; } - if (node.parent.kind === 251 /* ForOfStatement */ && node.parent.initializer === node) { + if (node.parent.kind === 253 /* ForOfStatement */ && node.parent.initializer === node) { return true; } - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 305 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 308 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { return true; } } @@ -120273,7 +120534,7 @@ function skipConstraint(type) { return type.isTypeParameter() ? type.getConstraint() || type : type; } function getNameFromPropertyName(name) { - return name.kind === 166 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); + return name.kind === 167 /* 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)); @@ -120397,7 +120658,7 @@ function findModifier(node, kind) { } function insertImports(changes, sourceFile, imports, blankLineBetween) { const decl = isArray(imports) ? imports[0] : imports; - const importKindPredicate = decl.kind === 244 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; + const importKindPredicate = decl.kind === 246 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; const existingImportStatements = filter(sourceFile.statements, importKindPredicate); const sortedNewImports = isArray(imports) ? stableSort(imports, ts_OrganizeImports_exports.compareImportsOrRequireStatements) : [imports]; if (!existingImportStatements.length) { @@ -120938,13 +121199,13 @@ function needsParentheses(expression) { function getContextualTypeFromParent(node, checker) { const { parent: parent2 } = node; switch (parent2.kind) { - case 214 /* NewExpression */: + case 216 /* NewExpression */: return checker.getContextualType(parent2); - case 227 /* BinaryExpression */: { + case 229 /* BinaryExpression */: { const { left, operatorToken, right } = parent2; return isEqualityOperatorKind(operatorToken.kind) ? checker.getTypeAtLocation(node === right ? left : right) : checker.getContextualType(node); } - case 298 /* CaseClause */: + case 301 /* CaseClause */: return parent2.expression === node ? getSwitchedType(parent2, checker) : void 0; default: return checker.getContextualType(node); @@ -120970,8 +121231,8 @@ function isStringLiteralOrTemplate(node) { switch (node.kind) { case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 229 /* TemplateExpression */: - case 215 /* TaggedTemplateExpression */: + case 231 /* TemplateExpression */: + case 217 /* TaggedTemplateExpression */: return true; default: return false; @@ -121001,16 +121262,16 @@ function getTypeNodeIfAccessible(type, enclosingScope, program, host) { return typeIsAccessible ? res : void 0; } function syntaxRequiresTrailingCommaOrSemicolonOrASI(kind) { - return kind === 179 /* CallSignature */ || kind === 180 /* ConstructSignature */ || kind === 181 /* IndexSignature */ || kind === 170 /* PropertySignature */ || kind === 173 /* MethodSignature */; + return kind === 181 /* CallSignature */ || kind === 182 /* ConstructSignature */ || kind === 183 /* IndexSignature */ || kind === 171 /* PropertySignature */ || kind === 175 /* MethodSignature */; } function syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) { - return kind === 263 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 265 /* FunctionDeclaration */ || kind === 178 /* Constructor */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) { - return kind === 270 /* ModuleDeclaration */; + return kind === 273 /* ModuleDeclaration */; } function syntaxRequiresTrailingSemicolonOrASI(kind) { - return kind === 244 /* VariableStatement */ || kind === 245 /* ExpressionStatement */ || kind === 247 /* DoStatement */ || kind === 252 /* ContinueStatement */ || kind === 253 /* BreakStatement */ || kind === 254 /* ReturnStatement */ || kind === 258 /* ThrowStatement */ || kind === 260 /* DebuggerStatement */ || kind === 171 /* PropertyDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 281 /* ExportDeclaration */ || kind === 273 /* NamespaceExportDeclaration */ || kind === 280 /* ExportAssignment */; + return kind === 246 /* VariableStatement */ || kind === 247 /* ExpressionStatement */ || kind === 249 /* DoStatement */ || kind === 254 /* ContinueStatement */ || kind === 255 /* BreakStatement */ || kind === 256 /* ReturnStatement */ || kind === 260 /* ThrowStatement */ || kind === 262 /* DebuggerStatement */ || kind === 172 /* PropertyDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 284 /* ExportDeclaration */ || kind === 276 /* NamespaceExportDeclaration */ || kind === 283 /* ExportAssignment */; } var syntaxMayBeASICandidate = or( syntaxRequiresTrailingCommaOrSemicolonOrASI, @@ -121040,7 +121301,7 @@ function nodeIsASICandidate(node, sourceFile) { } else if (!syntaxRequiresTrailingSemicolonOrASI(node.kind)) { return false; } - if (node.kind === 247 /* DoStatement */) { + if (node.kind === 249 /* DoStatement */) { return true; } const topNode = findAncestor(node, (ancestor) => !ancestor.parent); @@ -122202,13 +122463,13 @@ function getSemanticClassifications(typeChecker3, cancellationToken, sourceFile, } function checkForClassificationCancellation(cancellationToken, kind) { switch (kind) { - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -122412,46 +122673,46 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) pos = tag.tagName.end; let commentStart = tag.tagName.end; switch (tag.kind) { - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: const param = tag; processJSDocParameterTag(param); commentStart = param.isNameFirst && ((_a2 = param.typeExpression) == null ? void 0 : _a2.end) || param.name.end; break; - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: const prop = tag; commentStart = prop.isNameFirst && ((_b = prop.typeExpression) == null ? void 0 : _b.end) || prop.name.end; break; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); pos = tag.end; commentStart = tag.typeParameters.end; break; - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: const type = tag; - commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 318 /* 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) === 321 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; break; - case 347 /* JSDocCallbackTag */: + case 350 /* JSDocCallbackTag */: commentStart = tag.typeExpression.end; break; - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = tag.typeExpression.end; break; - case 351 /* JSDocThisTag */: - case 348 /* JSDocEnumTag */: + case 354 /* JSDocThisTag */: + case 351 /* JSDocEnumTag */: commentStart = tag.typeExpression.end; break; - case 350 /* JSDocReturnTag */: + case 353 /* JSDocReturnTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_f = tag.typeExpression) == null ? void 0 : _f.end) || commentStart; break; - case 355 /* JSDocSeeTag */: + case 358 /* JSDocSeeTag */: commentStart = ((_g = tag.name) == null ? void 0 : _g.end) || commentStart; break; - case 337 /* JSDocAugmentsTag */: - case 338 /* JSDocImplementsTag */: + case 340 /* JSDocAugmentsTag */: + case 341 /* JSDocImplementsTag */: commentStart = tag.class.end; break; } @@ -122594,22 +122855,22 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) } function tryClassifyJsxElementName(token) { switch (token.parent && token.parent.kind) { - case 289 /* JsxOpeningElement */: + case 292 /* JsxOpeningElement */: if (token.parent.tagName === token) { return 19 /* jsxOpenTagName */; } break; - case 290 /* JsxClosingElement */: + case 293 /* JsxClosingElement */: if (token.parent.tagName === token) { return 20 /* jsxCloseTagName */; } break; - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: if (token.parent.tagName === token) { return 21 /* jsxSelfClosingTagName */; } break; - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: if (token.parent.name === token) { return 22 /* jsxAttribute */; } @@ -122630,11 +122891,11 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) if (token) { const parent2 = token.parent; if (tokenKind === 63 /* EqualsToken */) { - if (parent2.kind === 261 /* VariableDeclaration */ || parent2.kind === 171 /* PropertyDeclaration */ || parent2.kind === 168 /* Parameter */ || parent2.kind === 294 /* JsxAttribute */) { + if (parent2.kind === 263 /* VariableDeclaration */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 169 /* Parameter */ || parent2.kind === 297 /* JsxAttribute */) { return 5 /* operator */; } } - if (parent2.kind === 227 /* BinaryExpression */ || parent2.kind === 225 /* PrefixUnaryExpression */ || parent2.kind === 226 /* PostfixUnaryExpression */ || parent2.kind === 228 /* ConditionalExpression */) { + if (parent2.kind === 229 /* BinaryExpression */ || parent2.kind === 227 /* PrefixUnaryExpression */ || parent2.kind === 228 /* PostfixUnaryExpression */ || parent2.kind === 230 /* ConditionalExpression */) { return 5 /* operator */; } } @@ -122644,7 +122905,7 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) } else if (tokenKind === 9 /* BigIntLiteral */) { return 25 /* bigintLiteral */; } else if (tokenKind === 10 /* StringLiteral */) { - return token && token.parent.kind === 294 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + return token && token.parent.kind === 297 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 13 /* RegularExpressionLiteral */) { return 6 /* stringLiteral */; } else if (isTemplateLiteralKind(tokenKind)) { @@ -122654,32 +122915,32 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) } else if (tokenKind === 79 /* Identifier */) { if (token) { switch (token.parent.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: if (token.parent.name === token) { return 11 /* className */; } return; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: if (token.parent.name === token) { return 15 /* typeParameterName */; } return; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: if (token.parent.name === token) { return 13 /* interfaceName */; } return; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: if (token.parent.name === token) { return 12 /* enumName */; } return; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: if (token.parent.name === token) { return 14 /* moduleName */; } return; - case 168 /* Parameter */: + case 169 /* Parameter */: if (token.parent.name === token) { return isThisIdentifier(token) ? 3 /* keyword */ : 17 /* parameterName */; } @@ -122822,7 +123083,7 @@ var DocumentHighlights; let child = throwStatement; while (child.parent) { const parent2 = child.parent; - if (isFunctionBlock(parent2) || parent2.kind === 314 /* SourceFile */) { + if (isFunctionBlock(parent2) || parent2.kind === 317 /* SourceFile */) { return parent2; } if (isTryStatement(parent2) && parent2.tryBlock === child && parent2.catchClause) { @@ -122852,15 +123113,15 @@ var DocumentHighlights; function getBreakOrContinueOwner(statement) { return findAncestor(statement, (node) => { switch (node.kind) { - case 256 /* SwitchStatement */: - if (statement.kind === 252 /* ContinueStatement */) { + case 258 /* SwitchStatement */: + if (statement.kind === 254 /* ContinueStatement */) { return false; } - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 248 /* WhileStatement */: - case 247 /* DoStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 250 /* WhileStatement */: + case 249 /* DoStatement */: return !statement.label || isLabeledBy(node, statement.label.escapedText); default: return isFunctionLike(node) && "quit"; @@ -122873,25 +123134,25 @@ var DocumentHighlights; function getNodesToSearchForModifier(declaration, modifierFlag) { const container = declaration.parent; switch (container.kind) { - case 271 /* ModuleBlock */: - case 314 /* SourceFile */: - case 242 /* Block */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 274 /* ModuleBlock */: + case 317 /* SourceFile */: + case 244 /* Block */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: if (modifierFlag & 256 /* Abstract */ && isClassDeclaration(declaration)) { return [...declaration.members, declaration]; } else { return container.statements; } - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 263 /* FunctionDeclaration */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: return [...container.parameters, ...isClassLike(container.parent) ? container.parent.members : []]; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 187 /* TypeLiteral */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 189 /* TypeLiteral */: const nodes = container.members; if (modifierFlag & (28 /* AccessibilityModifier */ | 64 /* Readonly */)) { const constructor = find(container.members, isConstructorDeclaration); @@ -122902,7 +123163,7 @@ var DocumentHighlights; return [...nodes, container]; } return nodes; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return void 0; default: Debug.assertNever(container, "Invalid container kind."); @@ -122918,7 +123179,7 @@ var DocumentHighlights; function getLoopBreakContinueOccurrences(loopNode) { const keywords = []; if (pushKeywordIf(keywords, loopNode.getFirstToken(), 98 /* ForKeyword */, 116 /* WhileKeyword */, 91 /* DoKeyword */)) { - if (loopNode.kind === 247 /* DoStatement */) { + if (loopNode.kind === 249 /* DoStatement */) { const loopTokens = loopNode.getChildren(); for (let i = loopTokens.length - 1; i >= 0; i--) { if (pushKeywordIf(keywords, loopTokens[i], 116 /* WhileKeyword */)) { @@ -122938,13 +123199,13 @@ var DocumentHighlights; const owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return getLoopBreakContinueOccurrences(owner); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return getSwitchCaseDefaultOccurrences(owner); } } @@ -124320,9 +124581,9 @@ function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) { function containsTopLevelCommonjs(sourceFile) { return sourceFile.statements.some((statement) => { switch (statement.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return statement.declarationList.declarations.some((decl) => !!decl.initializer && isRequireCall(propertyAccessLeftHandSide(decl.initializer), true)); - case 245 /* ExpressionStatement */: { + case 247 /* ExpressionStatement */: { const { expression } = statement; if (!isBinaryExpression(expression)) return isRequireCall(expression, true); @@ -124339,10 +124600,10 @@ function propertyAccessLeftHandSide(node) { } function importNameForConvertToDefaultImport(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: const { importClause, moduleSpecifier } = node; - return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 277 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; - case 274 /* ImportEqualsDeclaration */: + return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 280 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; + case 277 /* ImportEqualsDeclaration */: return node.name; default: return void 0; @@ -124406,18 +124667,18 @@ function hasSupportedNumberOfArguments(node) { } function isFixablePromiseArgument(arg, checker) { switch (arg.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: const functionFlags = getFunctionFlags(arg); if (functionFlags & 1 /* Generator */) { return false; } - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: visitedNestedConvertibleFunctions.set(getKeyFromNode(arg), true); case 105 /* NullKeyword */: return true; case 79 /* Identifier */: - case 211 /* PropertyAccessExpression */: { + case 213 /* PropertyAccessExpression */: { const symbol = checker.getSymbolAtLocation(arg); if (!symbol) { return false; @@ -124433,24 +124694,24 @@ function getKeyFromNode(exp) { } function canBeConvertedToClass(node, checker) { var _a2, _b, _c, _d; - if (node.kind === 218 /* FunctionExpression */) { + if (node.kind === 220 /* FunctionExpression */) { if (isVariableDeclaration(node.parent) && ((_a2 = node.symbol.members) == null ? void 0 : _a2.size)) { return true; } const symbol = checker.getSymbolOfExpando(node, false); return !!(symbol && (((_b = symbol.exports) == null ? void 0 : _b.size) || ((_c = symbol.members) == null ? void 0 : _c.size))); } - if (node.kind === 263 /* FunctionDeclaration */) { + if (node.kind === 265 /* FunctionDeclaration */) { return !!((_d = node.symbol.members) == null ? void 0 : _d.size); } return false; } function canBeConvertedToAsync(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return true; default: return false; @@ -124595,9 +124856,9 @@ function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checke } function shouldKeepItem(declaration, checker) { switch (declaration.kind) { - case 276 /* ImportClause */: - case 279 /* ImportSpecifier */: - case 274 /* ImportEqualsDeclaration */: + case 279 /* ImportClause */: + case 282 /* ImportSpecifier */: + case 277 /* ImportEqualsDeclaration */: const importer = checker.getSymbolAtLocation(declaration.name); const imported = checker.getAliasedSymbol(importer); return importer.escapedName !== imported.escapedName; @@ -124607,7 +124868,7 @@ function shouldKeepItem(declaration, checker) { } function tryAddSingleDeclarationName(declaration, containers) { const name = getNameOfDeclaration(declaration); - return !!name && (pushLiteral(name, containers) || name.kind === 166 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); + return !!name && (pushLiteral(name, containers) || name.kind === 167 /* 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); @@ -124618,7 +124879,7 @@ function pushLiteral(node, containers) { function getContainers(declaration) { const containers = []; const name = getNameOfDeclaration(declaration); - if (name && name.kind === 166 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { + if (name && name.kind === 167 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { return emptyArray; } containers.shift(); @@ -124788,7 +125049,7 @@ function addNodeWithRecursiveInitializer(node) { } } function hasNavigationBarName(node) { - return !hasDynamicName(node) || node.kind !== 227 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; + return !hasDynamicName(node) || node.kind !== 229 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; } function addChildrenRecursively(node) { curCancellationToken.throwIfCancellationRequested(); @@ -124796,7 +125057,7 @@ function addChildrenRecursively(node) { return; } switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: const ctr = node; addNodeWithRecursiveChild(ctr, ctr.body); for (const param of ctr.parameters) { @@ -124805,32 +125066,32 @@ function addChildrenRecursively(node) { } } break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 175 /* MethodSignature */: if (hasNavigationBarName(node)) { addNodeWithRecursiveChild(node, node.body); } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (hasNavigationBarName(node)) { addNodeWithRecursiveInitializer(node); } break; - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (hasNavigationBarName(node)) { addLeafNode(node); } break; - case 276 /* ImportClause */: + case 279 /* ImportClause */: const importClause = node; if (importClause.name) { addLeafNode(importClause.name); } const { namedBindings } = importClause; if (namedBindings) { - if (namedBindings.kind === 277 /* NamespaceImport */) { + if (namedBindings.kind === 280 /* NamespaceImport */) { addLeafNode(namedBindings); } else { for (const element of namedBindings.elements) { @@ -124839,16 +125100,16 @@ function addChildrenRecursively(node) { } } break; - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: addNodeWithRecursiveChild(node, node.name); break; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: const { expression } = node; isIdentifier(expression) ? addLeafNode(node, expression) : addLeafNode(node); break; - case 208 /* BindingElement */: - case 305 /* PropertyAssignment */: - case 261 /* VariableDeclaration */: { + case 210 /* BindingElement */: + case 308 /* PropertyAssignment */: + case 263 /* VariableDeclaration */: { const child = node; if (isBindingPattern(child.name)) { addChildrenRecursively(child.name); @@ -124857,18 +125118,18 @@ function addChildrenRecursively(node) { } break; } - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: const nameNode = node.name; if (nameNode && isIdentifier(nameNode)) { addTrackedEs5Class(nameNode.text); } addNodeWithRecursiveChild(node, node.body); break; - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: addNodeWithRecursiveChild(node, node.body); break; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: startNode(node); for (const member of node.members) { if (!isComputedProperty(member)) { @@ -124877,20 +125138,20 @@ function addChildrenRecursively(node) { } endNode(); break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: startNode(node); for (const member of node.members) { addChildrenRecursively(member); } endNode(); break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; - case 280 /* ExportAssignment */: { + case 283 /* ExportAssignment */: { const expression2 = node.expression; const child = isObjectLiteralExpression(expression2) || isCallExpression(expression2) ? expression2 : isArrowFunction(expression2) || isFunctionExpression(expression2) ? expression2.body : void 0; if (child) { @@ -124902,16 +125163,16 @@ function addChildrenRecursively(node) { } break; } - case 284 /* ExportSpecifier */: - case 274 /* ImportEqualsDeclaration */: - case 181 /* IndexSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 268 /* TypeAliasDeclaration */: + case 287 /* ExportSpecifier */: + case 277 /* ImportEqualsDeclaration */: + case 183 /* IndexSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 271 /* TypeAliasDeclaration */: addLeafNode(node); break; - case 213 /* CallExpression */: - case 227 /* BinaryExpression */: { + case 215 /* CallExpression */: + case 229 /* BinaryExpression */: { const special = getAssignmentDeclarationKind(node); switch (special) { case 1 /* ExportsProperty */: @@ -125121,12 +125382,12 @@ function shouldReallyMerge(a, b, parent2) { return false; } switch (a.kind) { - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return isStatic(a) === isStatic(b); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return areSameModule(a, b) && getFullyQualifiedModuleName(a) === getFullyQualifiedModuleName(b); default: return true; @@ -125143,7 +125404,7 @@ function areSameModule(a, b) { if (!a.body || !b.body) { return a.body === b.body; } - return a.body.kind === b.body.kind && (a.body.kind !== 270 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); + return a.body.kind === b.body.kind && (a.body.kind !== 273 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); } function merge(target, source) { target.additionalNodes = target.additionalNodes || []; @@ -125164,7 +125425,7 @@ function compareChildren(child1, child2) { return compareStringsCaseSensitiveUI(tryGetName(child1.node), tryGetName(child2.node)) || compareValues(navigationBarNodeKind(child1), navigationBarNodeKind(child2)); } function tryGetName(node) { - if (node.kind === 270 /* ModuleDeclaration */) { + if (node.kind === 273 /* ModuleDeclaration */) { return getModuleName(node); } const declName = getNameOfDeclaration(node); @@ -125173,16 +125434,16 @@ function tryGetName(node) { return propertyName && unescapeLeadingUnderscores(propertyName); } switch (node.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 232 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 234 /* ClassExpression */: return getFunctionOrClassName(node); default: return void 0; } } function getItemName(node, name) { - if (node.kind === 270 /* ModuleDeclaration */) { + if (node.kind === 273 /* ModuleDeclaration */) { return cleanText(getModuleName(node)); } if (name) { @@ -125192,28 +125453,28 @@ function getItemName(node, name) { } } switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: const sourceFile = node; return isExternalModule(sourceFile) ? `"${escapeString(getBaseFileName(removeFileExtension(normalizePath(sourceFile.fileName))))}"` : ""; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; - case 219 /* ArrowFunction */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 221 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: if (getSyntacticModifierFlags(node) & 1024 /* Default */) { return "default"; } return getFunctionOrClassName(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return "constructor"; - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: return "new()"; - case 179 /* CallSignature */: + case 181 /* CallSignature */: return "()"; - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return "[]"; default: return ""; @@ -125238,20 +125499,20 @@ function primaryNavBarMenuItems(root) { return true; } switch (navigationBarNodeKind(item)) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 269 /* EnumDeclaration */: - case 267 /* InterfaceDeclaration */: - case 270 /* ModuleDeclaration */: - case 314 /* SourceFile */: - case 268 /* TypeAliasDeclaration */: - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 272 /* EnumDeclaration */: + case 270 /* InterfaceDeclaration */: + case 273 /* ModuleDeclaration */: + case 317 /* SourceFile */: + case 271 /* TypeAliasDeclaration */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: return true; - case 219 /* ArrowFunction */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return isTopLevelFunctionDeclaration(item); default: return false; @@ -125261,10 +125522,10 @@ function primaryNavBarMenuItems(root) { return false; } switch (navigationBarNodeKind(item2.parent)) { - case 271 /* ModuleBlock */: - case 314 /* SourceFile */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: + case 274 /* ModuleBlock */: + case 317 /* SourceFile */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: return true; default: return false; @@ -125323,7 +125584,7 @@ function getModuleName(moduleDeclaration) { } function getFullyQualifiedModuleName(moduleDeclaration) { const result = [getTextOfIdentifierOrLiteral(moduleDeclaration.name)]; - while (moduleDeclaration.body && moduleDeclaration.body.kind === 270 /* ModuleDeclaration */) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 273 /* ModuleDeclaration */) { moduleDeclaration = moduleDeclaration.body; result.push(getTextOfIdentifierOrLiteral(moduleDeclaration.name)); } @@ -125333,13 +125594,13 @@ function getInteriorModule(decl) { return decl.body && isModuleDeclaration(decl.body) ? getInteriorModule(decl.body) : decl; } function isComputedProperty(member) { - return !member.name || member.name.kind === 166 /* ComputedPropertyName */; + return !member.name || member.name.kind === 167 /* ComputedPropertyName */; } function getNodeSpan(node) { - return node.kind === 314 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); + return node.kind === 317 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); } function getModifiers2(node) { - if (node.parent && node.parent.kind === 261 /* VariableDeclaration */) { + if (node.parent && node.parent.kind === 263 /* VariableDeclaration */) { node = node.parent; } return getNodeModifiers(node); @@ -125384,9 +125645,9 @@ function getCalledExpressionName(expr) { } function isFunctionOrClassExpression(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 232 /* ClassExpression */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 234 /* ClassExpression */: return true; default: return false; @@ -125472,8 +125733,8 @@ var NodeObject = class { if (!children.length) { return void 0; } - const child = find(children, (kid) => kid.kind < 318 /* FirstJSDocNode */ || kid.kind > 356 /* LastJSDocNode */); - return child.kind < 165 /* FirstNode */ ? child : child.getFirstToken(sourceFile); + const child = find(children, (kid) => kid.kind < 321 /* FirstJSDocNode */ || kid.kind > 359 /* LastJSDocNode */); + return child.kind < 166 /* FirstNode */ ? child : child.getFirstToken(sourceFile); } getLastToken(sourceFile) { this.assertHasRealPosition(); @@ -125482,7 +125743,7 @@ var NodeObject = class { if (!child) { return void 0; } - return child.kind < 165 /* FirstNode */ ? child : child.getLastToken(sourceFile); + return child.kind < 166 /* FirstNode */ ? child : child.getLastToken(sourceFile); } forEachChild(cbNode, cbNodeArray) { return forEachChild(this, cbNode, cbNodeArray); @@ -125545,7 +125806,7 @@ function addSyntheticNodes(nodes, pos, end, parent2) { } } function createSyntaxList(nodes, parent2) { - const list = createNode(357 /* SyntaxList */, nodes.pos, nodes.end, parent2); + const list = createNode(360 /* SyntaxList */, nodes.pos, nodes.end, parent2); list._children = []; let pos = nodes.pos; for (const node of nodes) { @@ -125859,7 +126120,7 @@ function getJsDocTagsOfDeclarations(declarations, checker) { var _a2; if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) { + if (declaration.kind === 179 /* GetAccessor */ || declaration.kind === 180 /* SetAccessor */) { return symbol.getContextualJsDocTags(declaration, checker); } return ((_a2 = symbol.declarations) == null ? void 0 : _a2.length) === 1 ? symbol.getJsDocTags() : void 0; @@ -125882,7 +126143,7 @@ function getDocumentationComment(declarations, checker) { const inheritedDocs = findBaseOfDeclaration(checker, declaration, (symbol) => { if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) { + if (declaration.kind === 179 /* GetAccessor */ || declaration.kind === 180 /* SetAccessor */) { return symbol.getContextualDocumentationComment(declaration, checker); } return symbol.getDocumentationComment(checker); @@ -125896,7 +126157,7 @@ function getDocumentationComment(declarations, checker) { } function findBaseOfDeclaration(checker, declaration, cb) { var _a2; - const classOrInterfaceDeclaration = ((_a2 = declaration.parent) == null ? void 0 : _a2.kind) === 176 /* Constructor */ ? declaration.parent.parent : declaration.parent; + const classOrInterfaceDeclaration = ((_a2 = declaration.parent) == null ? void 0 : _a2.kind) === 178 /* Constructor */ ? declaration.parent.parent : declaration.parent; if (!classOrInterfaceDeclaration) return; const isStaticMember = hasStaticModifier(declaration); @@ -125910,7 +126171,7 @@ function findBaseOfDeclaration(checker, declaration, cb) { var SourceFileObject = class extends NodeObject { constructor(kind, pos, end) { super(kind, pos, end); - this.kind = 314 /* SourceFile */; + this.kind = 317 /* SourceFile */; } update(newText, textChangeRange) { return updateSourceFile(this, newText, textChangeRange); @@ -125966,10 +126227,10 @@ var SourceFileObject = class extends NodeObject { } function visit(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: const functionDeclaration = node; const declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -125985,30 +126246,30 @@ var SourceFileObject = class extends NodeObject { } forEachChild(node, visit); break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 270 /* ModuleDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 284 /* ExportSpecifier */: - case 279 /* ImportSpecifier */: - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 187 /* TypeLiteral */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 273 /* ModuleDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 287 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 189 /* TypeLiteral */: addDeclaration(node); forEachChild(node, visit); break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (!hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { break; } - case 261 /* VariableDeclaration */: - case 208 /* BindingElement */: { + case 263 /* VariableDeclaration */: + case 210 /* BindingElement */: { const decl = node; if (isBindingPattern(decl.name)) { forEachChild(decl.name, visit); @@ -126018,12 +126279,12 @@ var SourceFileObject = class extends NodeObject { visit(decl.initializer); } } - case 308 /* EnumMember */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 311 /* EnumMember */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: addDeclaration(node); break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: const exportDeclaration = node; if (exportDeclaration.exportClause) { if (isNamedExports(exportDeclaration.exportClause)) { @@ -126033,14 +126294,14 @@ var SourceFileObject = class extends NodeObject { } } break; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: const importClause = node.importClause; if (importClause) { if (importClause.name) { addDeclaration(importClause.name); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 277 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 280 /* NamespaceImport */) { addDeclaration(importClause.namedBindings); } else { forEach(importClause.namedBindings.elements, visit); @@ -126048,7 +126309,7 @@ var SourceFileObject = class extends NodeObject { } } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) !== 0 /* None */) { addDeclaration(node); } @@ -126688,15 +126949,15 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h switch (node.kind) { case 79 /* Identifier */: return !isLabelName(node) && !isTagName(node) && !isConstTypeReference(node.parent); - case 211 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: return !isInComment(sourceFile, position); case 109 /* ThisKeyword */: - case 197 /* ThisType */: + case 199 /* ThisType */: case 107 /* SuperKeyword */: - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return true; - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return isImportMeta(node); default: return false; @@ -126806,15 +127067,15 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h return void 0; } switch (node.kind) { - case 211 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: case 10 /* StringLiteral */: case 96 /* FalseKeyword */: case 111 /* TrueKeyword */: case 105 /* NullKeyword */: case 107 /* SuperKeyword */: case 109 /* ThisKeyword */: - case 197 /* ThisType */: + case 199 /* ThisType */: case 79 /* Identifier */: break; default: @@ -126825,7 +127086,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h if (isRightSideOfPropertyAccess(nodeForStartPos) || isRightSideOfQualifiedName(nodeForStartPos)) { nodeForStartPos = nodeForStartPos.parent; } else if (isNameOfModuleDeclaration(nodeForStartPos)) { - if (nodeForStartPos.parent.parent.kind === 270 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { + if (nodeForStartPos.parent.parent.kind === 273 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { nodeForStartPos = nodeForStartPos.parent.parent.name; } else { break; @@ -127442,7 +127703,7 @@ function initializeNameTable(sourceFile) { }); } function literalIsName(node) { - return isDeclarationName(node) || node.parent.kind === 286 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); + return isDeclarationName(node) || node.parent.kind === 289 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); } function getContainingObjectLiteralElement(node) { const element = getContainingObjectLiteralElementWorker(node); @@ -127453,11 +127714,11 @@ function getContainingObjectLiteralElementWorker(node) { case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: - if (node.parent.kind === 166 /* ComputedPropertyName */) { + if (node.parent.kind === 167 /* ComputedPropertyName */) { return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : void 0; } case 79 /* Identifier */: - return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.parent.kind === 295 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; + return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 212 /* ObjectLiteralExpression */ || node.parent.parent.kind === 298 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; } return void 0; } @@ -127492,7 +127753,7 @@ function getPropertySymbolsFromContextualType(node, checker, contextualType, uni return discriminatedPropertySymbols; } function isArgumentOfElementAccessExpression(node) { - return node && node.parent && node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.argumentExpression === node; + return node && node.parent && node.parent.kind === 214 /* ElementAccessExpression */ && node.parent.argumentExpression === node; } function getDefaultLibFilePath(options) { if (sys) { @@ -128414,89 +128675,89 @@ function spanInSourceFileAtLocation(sourceFile, position) { if (node) { const { parent: parent2 } = node; switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 261 /* VariableDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 263 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return spanInVariableDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return spanInParameterDeclaration(node); - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 178 /* Constructor */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return spanInFunctionDeclaration(node); - case 242 /* Block */: + case 244 /* Block */: if (isFunctionBlock(node)) { return spanInFunctionBlock(node); } - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return spanInBlock(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return spanInBlock(node.block); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return textSpan(node.expression); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return textSpan(node.getChildAt(0), node.expression); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return spanInNode(node.statement); - case 260 /* DebuggerStatement */: + case 262 /* DebuggerStatement */: return textSpan(node.getChildAt(0)); - case 246 /* IfStatement */: + case 248 /* IfStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return spanInNode(node.statement); - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: return textSpan(node.getChildAt(0), node.label); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return spanInForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return spanInInitializerOfForLike(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: return spanInNode(node.statements[0]); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return spanInBlock(node.tryBlock); - case 258 /* ThrowStatement */: + case 260 /* ThrowStatement */: return textSpan(node, node.expression); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return textSpan(node, node.expression); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return textSpan(node, node.moduleReference); - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: if (getModuleInstanceState(node) !== 1 /* Instantiated */) { return void 0; } - case 264 /* ClassDeclaration */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: - case 208 /* BindingElement */: + case 266 /* ClassDeclaration */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: + case 210 /* BindingElement */: return textSpan(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return spanInNode(node.statement); - case 169 /* Decorator */: + case 170 /* Decorator */: return spanInNodeArray(parent2.modifiers, node, isDecorator); - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: return spanInBindingPattern(node); - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return void 0; case 26 /* SemicolonToken */: case 1 /* EndOfFileToken */: @@ -128524,16 +128785,16 @@ function spanInSourceFileAtLocation(sourceFile, position) { case 83 /* CatchKeyword */: case 97 /* FinallyKeyword */: return spanInNextNode(node); - case 164 /* OfKeyword */: + case 165 /* OfKeyword */: return spanInOfKeyword(node); default: if (isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); } - if ((node.kind === 79 /* Identifier */ || node.kind === 231 /* SpreadElement */ || node.kind === 305 /* PropertyAssignment */ || node.kind === 306 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { + if ((node.kind === 79 /* Identifier */ || node.kind === 233 /* SpreadElement */ || node.kind === 308 /* PropertyAssignment */ || node.kind === 309 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { return textSpan(node); } - if (node.kind === 227 /* BinaryExpression */) { + if (node.kind === 229 /* BinaryExpression */) { const { left, operatorToken } = node; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern( @@ -128549,19 +128810,19 @@ function spanInSourceFileAtLocation(sourceFile, position) { } if (isExpressionNode(node)) { switch (parent2.kind) { - case 247 /* DoStatement */: + case 249 /* DoStatement */: return spanInPreviousNode(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return spanInNode(node.parent); - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: return textSpan(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (node.parent.operatorToken.kind === 27 /* CommaToken */) { return textSpan(node); } break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: if (node.parent.body === node) { return textSpan(node); } @@ -128569,25 +128830,25 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } switch (node.parent.kind) { - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (node.parent.name === node && !isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } break; - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: if (node.parent.type === node) { return spanInNextNode(node.parent.type); } break; - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: { + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: { const { initializer, type } = node.parent; if (initializer === node || type === node || isAssignmentOperator(node.kind)) { return spanInPreviousNode(node); } break; } - case 227 /* BinaryExpression */: { + case 229 /* BinaryExpression */: { const { left } = node.parent; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left) && node !== left) { return spanInPreviousNode(node); @@ -128610,14 +128871,14 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function spanInVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.parent.kind === 250 /* ForInStatement */) { + if (variableDeclaration.parent.parent.kind === 252 /* 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 === 251 /* ForOfStatement */) { + if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 253 /* ForOfStatement */) { return textSpanFromVariableDeclaration(variableDeclaration); } if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] !== variableDeclaration) { @@ -128644,7 +128905,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 264 /* ClassDeclaration */ && functionDeclaration.kind !== 176 /* Constructor */; + return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 266 /* ClassDeclaration */ && functionDeclaration.kind !== 178 /* Constructor */; } function spanInFunctionDeclaration(functionDeclaration) { if (!functionDeclaration.body) { @@ -128664,22 +128925,22 @@ function spanInSourceFileAtLocation(sourceFile, position) { } function spanInBlock(block) { switch (block.parent.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: if (getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { return void 0; } - case 248 /* WhileStatement */: - case 246 /* IfStatement */: - case 250 /* ForInStatement */: + case 250 /* WhileStatement */: + case 248 /* IfStatement */: + case 252 /* ForInStatement */: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: return spanInNodeIfStartsOnSameLine(findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } return spanInNode(block.statements[0]); } function spanInInitializerOfForLike(forLikeStatement) { - if (forLikeStatement.initializer.kind === 262 /* VariableDeclarationList */) { + if (forLikeStatement.initializer.kind === 264 /* VariableDeclarationList */) { const variableDeclarationList = forLikeStatement.initializer; if (variableDeclarationList.declarations.length > 0) { return spanInNode(variableDeclarationList.declarations[0]); @@ -128702,64 +128963,64 @@ function spanInSourceFileAtLocation(sourceFile, position) { function spanInBindingPattern(bindingPattern) { const firstBindingElement = forEach( bindingPattern.elements, - (element) => element.kind !== 233 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 235 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - if (bindingPattern.parent.kind === 208 /* BindingElement */) { + if (bindingPattern.parent.kind === 210 /* BindingElement */) { return textSpan(bindingPattern.parent); } return textSpanFromVariableDeclaration(bindingPattern.parent); } function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node2) { - Debug.assert(node2.kind !== 207 /* ArrayBindingPattern */ && node2.kind !== 206 /* ObjectBindingPattern */); - const elements = node2.kind === 209 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; + Debug.assert(node2.kind !== 209 /* ArrayBindingPattern */ && node2.kind !== 208 /* ObjectBindingPattern */); + const elements = node2.kind === 211 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; const firstBindingElement = forEach( elements, - (element) => element.kind !== 233 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 235 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - return textSpan(node2.parent.kind === 227 /* BinaryExpression */ ? node2.parent : node2); + return textSpan(node2.parent.kind === 229 /* BinaryExpression */ ? node2.parent : node2); } function spanInOpenBraceToken(node2) { switch (node2.parent.kind) { - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: const enumDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: const classDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return spanInNodeIfStartsOnSameLine(node2.parent.parent, node2.parent.clauses[0]); } return spanInNode(node2.parent); } function spanInCloseBraceToken(node2) { switch (node2.parent.kind) { - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: if (getModuleInstanceState(node2.parent.parent) !== 1 /* Instantiated */) { return void 0; } - case 269 /* EnumDeclaration */: - case 264 /* ClassDeclaration */: + case 272 /* EnumDeclaration */: + case 266 /* ClassDeclaration */: return textSpan(node2); - case 242 /* Block */: + case 244 /* Block */: if (isFunctionBlock(node2.parent)) { return textSpan(node2); } - case 301 /* CatchClause */: + case 304 /* CatchClause */: return spanInNode(lastOrUndefined(node2.parent.statements)); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: const caseBlock = node2.parent; const lastClause = lastOrUndefined(caseBlock.clauses); if (lastClause) { return spanInNode(lastOrUndefined(lastClause.statements)); } return void 0; - case 206 /* ObjectBindingPattern */: + case 208 /* ObjectBindingPattern */: const bindingPattern = node2.parent; return spanInNode(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -128772,7 +129033,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { } function spanInCloseBracketToken(node2) { switch (node2.parent.kind) { - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: const bindingPattern = node2.parent; return textSpan(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -128784,56 +129045,56 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function spanInOpenParenToken(node2) { - if (node2.parent.kind === 247 /* DoStatement */ || node2.parent.kind === 213 /* CallExpression */ || node2.parent.kind === 214 /* NewExpression */) { + if (node2.parent.kind === 249 /* DoStatement */ || node2.parent.kind === 215 /* CallExpression */ || node2.parent.kind === 216 /* NewExpression */) { return spanInPreviousNode(node2); } - if (node2.parent.kind === 217 /* ParenthesizedExpression */) { + if (node2.parent.kind === 219 /* ParenthesizedExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInCloseParenToken(node2) { switch (node2.parent.kind) { - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - case 248 /* WhileStatement */: - case 247 /* DoStatement */: - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 217 /* ParenthesizedExpression */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 178 /* Constructor */: + case 250 /* WhileStatement */: + case 249 /* DoStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 219 /* ParenthesizedExpression */: return spanInPreviousNode(node2); default: return spanInNode(node2.parent); } } function spanInColonToken(node2) { - if (isFunctionLike(node2.parent) || node2.parent.kind === 305 /* PropertyAssignment */ || node2.parent.kind === 168 /* Parameter */) { + if (isFunctionLike(node2.parent) || node2.parent.kind === 308 /* PropertyAssignment */ || node2.parent.kind === 169 /* Parameter */) { return spanInPreviousNode(node2); } return spanInNode(node2.parent); } function spanInGreaterThanOrLessThanToken(node2) { - if (node2.parent.kind === 216 /* TypeAssertionExpression */) { + if (node2.parent.kind === 218 /* TypeAssertionExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInWhileKeyword(node2) { - if (node2.parent.kind === 247 /* DoStatement */) { + if (node2.parent.kind === 249 /* DoStatement */) { return textSpanEndingAtNextToken(node2, node2.parent.expression); } return spanInNode(node2.parent); } function spanInOfKeyword(node2) { - if (node2.parent.kind === 251 /* ForOfStatement */) { + if (node2.parent.kind === 253 /* ForOfStatement */) { return spanInNextNode(node2); } return spanInNode(node2.parent); @@ -128922,17 +129183,17 @@ function getCallHierarchItemContainerName(node) { return; } switch (node.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - if (node.parent.kind === 210 /* ObjectLiteralExpression */) { + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: + if (node.parent.kind === 212 /* ObjectLiteralExpression */) { return (_a2 = getAssignedName(node.parent)) == null ? void 0 : _a2.getText(); } return (_b = getNameOfDeclaration(node.parent)) == null ? void 0 : _b.getText(); - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 270 /* ModuleDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 273 /* ModuleDeclaration */: if (isModuleBlock(node.parent) && isIdentifier(node.parent.parent.name)) { return node.parent.parent.name.getText(); } @@ -129110,55 +129371,55 @@ function createCallSiteCollector(program, callSites) { } switch (node.kind) { case 79 /* Identifier */: - case 274 /* ImportEqualsDeclaration */: - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return; - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: recordCallSite(node); return; - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: collect(node.expression); return; - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: collect(node.name); collect(node.initializer); return; - case 213 /* CallExpression */: + case 215 /* CallExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 214 /* NewExpression */: + case 216 /* NewExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: recordCallSite(node); collect(node.tag); collect(node.template); return; - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: recordCallSite(node); collect(node.tagName); collect(node.attributes); return; - case 169 /* Decorator */: + case 170 /* Decorator */: recordCallSite(node); collect(node.expression); return; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: recordCallSite(node); forEachChild(node, collect); break; - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: collect(node.expression); return; } @@ -129211,26 +129472,26 @@ function collectCallSites(program, node) { const callSites = []; const collect = createCallSiteCollector(program, callSites); switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: collectCallSitesOfSourceFile(node, collect); break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: collectCallSitesOfModuleDeclaration(node, collect); break; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: collectCallSitesOfFunctionLikeDeclaration(program.getTypeChecker(), node, collect); break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: collectCallSitesOfClassLikeDeclaration(node, collect); break; - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: collectCallSitesOfClassStaticBlockDeclaration(node, collect); break; default: @@ -129331,13 +129592,13 @@ function collectTokens(program, sourceFile, span, collector, cancellationToken) let inJSXElement = false; function visit(node) { switch (node.kind) { - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!node || !textSpanIntersectsWith(span, node.pos, node.getFullWidth()) || node.getFullWidth() === 0) { @@ -129477,25 +129738,25 @@ function isRightSideOfQualifiedNameOrPropertyAccess2(node) { return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node; } var tokenFromDeclarationMapping = new Map2([ - [261 /* VariableDeclaration */, 7 /* variable */], - [168 /* Parameter */, 6 /* parameter */], - [171 /* PropertyDeclaration */, 9 /* property */], - [270 /* ModuleDeclaration */, 3 /* namespace */], - [269 /* EnumDeclaration */, 1 /* enum */], - [308 /* EnumMember */, 8 /* enumMember */], - [264 /* ClassDeclaration */, 0 /* class */], - [174 /* MethodDeclaration */, 11 /* member */], - [263 /* FunctionDeclaration */, 10 /* function */], - [218 /* FunctionExpression */, 10 /* function */], - [173 /* MethodSignature */, 11 /* member */], - [177 /* GetAccessor */, 9 /* property */], - [178 /* SetAccessor */, 9 /* property */], - [170 /* PropertySignature */, 9 /* property */], - [267 /* InterfaceDeclaration */, 2 /* interface */], - [268 /* TypeAliasDeclaration */, 5 /* type */], - [167 /* TypeParameter */, 4 /* typeParameter */], - [305 /* PropertyAssignment */, 9 /* property */], - [306 /* ShorthandPropertyAssignment */, 9 /* property */] + [263 /* VariableDeclaration */, 7 /* variable */], + [169 /* Parameter */, 6 /* parameter */], + [172 /* PropertyDeclaration */, 9 /* property */], + [273 /* ModuleDeclaration */, 3 /* namespace */], + [272 /* EnumDeclaration */, 1 /* enum */], + [311 /* EnumMember */, 8 /* enumMember */], + [266 /* ClassDeclaration */, 0 /* class */], + [176 /* MethodDeclaration */, 11 /* member */], + [265 /* FunctionDeclaration */, 10 /* function */], + [220 /* FunctionExpression */, 10 /* function */], + [175 /* MethodSignature */, 11 /* member */], + [179 /* GetAccessor */, 9 /* property */], + [180 /* SetAccessor */, 9 /* property */], + [171 /* PropertySignature */, 9 /* property */], + [270 /* InterfaceDeclaration */, 2 /* interface */], + [271 /* TypeAliasDeclaration */, 5 /* type */], + [168 /* TypeParameter */, 4 /* typeParameter */], + [308 /* PropertyAssignment */, 9 /* property */], + [309 /* ShorthandPropertyAssignment */, 9 /* property */] ]); // src/services/_namespaces/ts.codefix.ts @@ -129842,7 +130103,7 @@ function findAwaitableInitializers(expression, sourceFile, cancellationToken, pr } const declaration = tryCast(symbol.valueDeclaration, isVariableDeclaration); const variableName = declaration && tryCast(declaration.name, isIdentifier); - const variableStatement = getAncestor(declaration, 244 /* VariableStatement */); + const variableStatement = getAncestor(declaration, 246 /* VariableStatement */); if (!declaration || !variableStatement || declaration.type || !declaration.initializer || variableStatement.getSourceFile() !== sourceFile || hasSyntacticModifier(variableStatement, 1 /* Export */) || !variableName || !isInsideAwaitableBody(declaration.initializer)) { isCompleteFix = false; continue; @@ -129894,7 +130155,7 @@ function symbolReferenceIsAlsoMissingAwait(reference, diagnostics, sourceFile, c return diagnostic && contains(errorCodes3, diagnostic.code) || 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 === 263 /* FunctionDeclaration */ || ancestor.parent.kind === 218 /* FunctionExpression */ || ancestor.parent.kind === 219 /* ArrowFunction */ || ancestor.parent.kind === 174 /* MethodDeclaration */)); + return node.kind & 32768 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 265 /* FunctionDeclaration */ || ancestor.parent.kind === 220 /* FunctionExpression */ || ancestor.parent.kind === 221 /* ArrowFunction */ || ancestor.parent.kind === 176 /* MethodDeclaration */)); } function makeChange3(changeTracker, errorCode, sourceFile, checker, insertionSite, fixedDeclarations) { if (isForOfStatement(insertionSite.parent) && !insertionSite.parent.awaitModifier) { @@ -130016,10 +130277,10 @@ function applyChange(changeTracker, initializer, sourceFile, fixedNodes) { function isPossiblyPartOfDestructuring(node) { switch (node.kind) { case 79 /* Identifier */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return true; default: return false; @@ -130032,7 +130293,7 @@ function arrayElementCouldBeVariableDeclaration(expression, checker) { function isPossiblyPartOfCommaSeperatedInitializer(node) { switch (node.kind) { case 79 /* Identifier */: - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: case 27 /* CommaToken */: return true; default: @@ -130074,7 +130335,7 @@ function makeChange5(changeTracker, sourceFile, pos, fixedNodes) { return; } const declaration = token.parent; - if (declaration.kind === 171 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { + if (declaration.kind === 172 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { changeTracker.insertModifierBefore(sourceFile, 137 /* DeclareKeyword */, declaration); } } @@ -130208,7 +130469,7 @@ function addUndefinedToOptionalProperty(changes, toAdd) { const d = add.valueDeclaration; if (d && (isPropertySignature(d) || isPropertyDeclaration(d)) && d.type) { const t = factory.createUnionTypeNode([ - ...d.type.kind === 192 /* UnionType */ ? d.type.types : [d.type], + ...d.type.kind === 194 /* UnionType */ ? d.type.types : [d.type], factory.createTypeReferenceNode("undefined") ]); changes.replaceNode(d.getSourceFile(), d.type, t); @@ -130276,24 +130537,24 @@ function doChange(changes, sourceFile, decl) { } } function isDeclarationWithType(node) { - return isFunctionLikeDeclaration(node) || node.kind === 261 /* VariableDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 171 /* PropertyDeclaration */; + return isFunctionLikeDeclaration(node) || node.kind === 263 /* VariableDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 172 /* PropertyDeclaration */; } function transformJSDocType(node) { switch (node.kind) { - case 321 /* JSDocAllType */: - case 322 /* JSDocUnknownType */: + case 324 /* JSDocAllType */: + case 325 /* JSDocUnknownType */: return factory.createTypeReferenceNode("any", emptyArray); - case 325 /* JSDocOptionalType */: + case 328 /* JSDocOptionalType */: return transformJSDocOptionalType(node); - case 324 /* JSDocNonNullableType */: + case 327 /* JSDocNonNullableType */: return transformJSDocType(node.type); - case 323 /* JSDocNullableType */: + case 326 /* JSDocNullableType */: return transformJSDocNullableType(node); - case 327 /* JSDocVariadicType */: + case 330 /* JSDocVariadicType */: return transformJSDocVariadicType(node); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: return transformJSDocFunctionType(node); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return transformJSDocTypeReference(node); default: const visited = visitEachChild(node, transformJSDocType, nullTransformationContext); @@ -130316,7 +130577,7 @@ function transformJSDocFunctionType(node) { } function transformJSDocParameter(node) { const index = node.parent.parameters.indexOf(node); - const isRest = node.type.kind === 327 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; + const isRest = node.type.kind === 330 /* 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), node.initializer); @@ -130464,7 +130725,7 @@ function doChange2(changes, sourceFile, position, checker, preferences, compiler })) { return; } - const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 245 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; + const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 247 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; changes.delete(sourceFile, nodeToDelete); if (!assignmentExpr) { members.push(factory.createPropertyDeclaration( @@ -130534,7 +130795,7 @@ function doChange2(changes, sourceFile, position, checker, preferences, compiler function createArrowFunctionExpressionMember(members2, arrowFunction, name) { const arrowFunctionBody = arrowFunction.body; let bodyBlock; - if (arrowFunctionBody.kind === 242 /* Block */) { + if (arrowFunctionBody.kind === 244 /* Block */) { bodyBlock = arrowFunctionBody; } else { bodyBlock = factory.createBlock([factory.createReturnStatement(arrowFunctionBody)]); @@ -130981,7 +131242,7 @@ function transformCallbackArgument(func, hasContinuation, continuationArgName, i switch (func.kind) { case 105 /* NullKeyword */: break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: case 79 /* Identifier */: if (!inputArgName) { break; @@ -131001,8 +131262,8 @@ function transformCallbackArgument(func, hasContinuation, continuationArgName, i continuationArgName.types.push(transformer.checker.getAwaitedType(returnType) || returnType); } return varDeclOrAssignment; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: { + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: { const funcBody = func.body; const returnType2 = (_a2 = getLastCallSignature(transformer.checker.getTypeAtLocation(func), transformer.checker)) == null ? void 0 : _a2.getReturnType(); if (isBlock(funcBody)) { @@ -131216,10 +131477,10 @@ function fixImportOfModuleExports(importingFile, exportingFile, changes, quotePr } const importNode = importFromModuleSpecifier(moduleSpecifier); switch (importNode.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: changes.replaceNode(importingFile, importNode, makeImport(importNode.name, void 0, moduleSpecifier, quotePreference)); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (isRequireCall(importNode, false)) { changes.replaceNode(importingFile, importNode, factory.createPropertyAccessExpression(getSynthesizedDeepClone(importNode), "default")); } @@ -131278,19 +131539,19 @@ function forEachExportReference(sourceFile, cb) { } function convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports, useSitesToUnqualify, quotePreference) { switch (statement.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference); return false; - case 245 /* ExpressionStatement */: { + case 247 /* ExpressionStatement */: { const { expression } = statement; switch (expression.kind) { - case 213 /* CallExpression */: { + case 215 /* CallExpression */: { if (isRequireCall(expression, true)) { changes.replaceNode(sourceFile, statement, makeImport(void 0, void 0, expression.arguments[0], quotePreference)); } return false; } - case 227 /* BinaryExpression */: { + case 229 /* BinaryExpression */: { const { operatorToken } = expression; return operatorToken.kind === 63 /* EqualsToken */ && convertAssignment(sourceFile, checker, expression, changes, exports, useSitesToUnqualify); } @@ -131332,8 +131593,8 @@ function convertVariableStatement(sourceFile, statement, changes, checker, ident } function convertPropertyAccessImport(name, propertyName, moduleSpecifier, identifiers, quotePreference) { switch (name.kind) { - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: { + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: { const tmp = makeUniqueName(propertyName, identifiers); return convertedImports([ makeSingleImport(tmp, propertyName, moduleSpecifier, quotePreference), @@ -131372,14 +131633,14 @@ function convertAssignment(sourceFile, checker, assignment, changes, exports, us function tryChangeModuleExportsObject(object, useSitesToUnqualify) { const statements = mapAllOrFail(object.properties, (prop) => { switch (prop.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 306 /* ShorthandPropertyAssignment */: - case 307 /* SpreadAssignment */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 309 /* ShorthandPropertyAssignment */: + case 310 /* SpreadAssignment */: return void 0; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return !isIdentifier(prop.name) ? void 0 : convertExportsDotXEquals_replaceNode(prop.name.text, prop.initializer, useSitesToUnqualify); - case 174 /* MethodDeclaration */: + case 176 /* 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}`); @@ -131434,15 +131695,15 @@ function convertExportsPropertyAssignment({ left, right, parent: parent2 }, sour function convertExportsDotXEquals_replaceNode(name, exported, useSitesToUnqualify) { const modifiers = [factory.createToken(94 /* ExportKeyword */)]; switch (exported.kind) { - case 218 /* FunctionExpression */: { + case 220 /* FunctionExpression */: { const { name: expressionName } = exported; if (expressionName && expressionName.text !== name) { return exportConst(); } } - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return functionExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return classExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); default: return exportConst(); @@ -131457,7 +131718,7 @@ function replaceImportUseSites(nodeOrNodes, useSitesToUnqualify) { } return isArray(nodeOrNodes) ? getSynthesizedDeepClonesWithReplacements(nodeOrNodes, true, replaceNode) : getSynthesizedDeepCloneWithReplacements(nodeOrNodes, true, replaceNode); function replaceNode(original) { - if (original.kind === 211 /* PropertyAccessExpression */) { + if (original.kind === 213 /* PropertyAccessExpression */) { const replacement = useSitesToUnqualify.get(original); useSitesToUnqualify.delete(original); return replacement; @@ -131466,13 +131727,13 @@ function replaceImportUseSites(nodeOrNodes, useSitesToUnqualify) { } function convertSingleImport(name, moduleSpecifier, checker, identifiers, target, quotePreference) { switch (name.kind) { - case 206 /* ObjectBindingPattern */: { + case 208 /* 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(void 0, importSpecifiers, moduleSpecifier, quotePreference)]); } } - case 207 /* ArrayBindingPattern */: { + case 209 /* ArrayBindingPattern */: { const tmp = makeUniqueName(moduleSpecifierToValidIdentifier(moduleSpecifier.text, target), identifiers); return convertedImports([ makeImport(factory.createIdentifier(tmp), void 0, moduleSpecifier, quotePreference), @@ -131543,11 +131804,11 @@ function forEachFreeIdentifier(node, cb) { function isFreeIdentifier(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return parent2.name !== node; - case 208 /* BindingElement */: + case 210 /* BindingElement */: return parent2.propertyName !== node; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return parent2.propertyName !== node; default: return true; @@ -132217,11 +132478,11 @@ function tryUseExistingNamespaceImport(existingImports, symbolName2, position, c function getTargetModuleFromNamespaceLikeImport(declaration, checker) { var _a2; switch (declaration.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return checker.resolveExternalModuleName(declaration.initializer.arguments[0]); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return checker.getAliasedSymbol(declaration.symbol); - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: const namespaceImport = tryCast((_a2 = declaration.importClause) == null ? void 0 : _a2.namedBindings, isNamespaceImport); return namespaceImport && checker.getAliasedSymbol(namespaceImport.symbol); default: @@ -132231,11 +132492,11 @@ function getTargetModuleFromNamespaceLikeImport(declaration, checker) { function getNamespaceLikeImportText(declaration) { var _a2, _b, _c; switch (declaration.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return (_a2 = tryCast(declaration.name, isIdentifier)) == null ? void 0 : _a2.text; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return declaration.name.text; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return (_c = tryCast((_b = declaration.importClause) == null ? void 0 : _b.namedBindings, isNamespaceImport)) == null ? void 0 : _c.name.text; default: return Debug.assertNever(declaration); @@ -132255,11 +132516,11 @@ function getAddAsTypeOnly(isValidTypeOnlyUseSite, isForNewImportDeclaration, sym } function tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker, compilerOptions) { return firstDefined(existingImports, ({ declaration, importKind, symbol, targetFlags }) => { - if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 274 /* ImportEqualsDeclaration */) { + if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 277 /* ImportEqualsDeclaration */) { return void 0; } - if (declaration.kind === 261 /* VariableDeclaration */) { - return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 206 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; + if (declaration.kind === 263 /* VariableDeclaration */) { + return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 208 /* 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)) @@ -132270,7 +132531,7 @@ function tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker const addAsTypeOnly = getAddAsTypeOnly(isValidTypeOnlyUseSite, false, symbol, targetFlags, checker, compilerOptions); if (importKind === 1 /* Default */ && (name || addAsTypeOnly === 2 /* Required */ && namedBindings)) return void 0; - if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 277 /* NamespaceImport */) + if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 280 /* NamespaceImport */) return void 0; return { kind: 2 /* AddToExisting */, @@ -132290,7 +132551,7 @@ function createExistingImportMap(checker, importingFile, compilerOptions) { if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i.parent); } - } else if (i.kind === 275 /* ImportDeclaration */ || i.kind === 274 /* ImportEqualsDeclaration */) { + } else if (i.kind === 278 /* ImportDeclaration */ || i.kind === 277 /* ImportEqualsDeclaration */) { const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier); if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i); @@ -132631,7 +132892,7 @@ function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSy case 4 /* PromoteTypeOnly */: { const { typeOnlyAliasDeclaration } = fix; const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, compilerOptions, sourceFile); - return promotedDeclaration.kind === 279 /* 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 === 282 /* 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}`); @@ -132639,12 +132900,12 @@ function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSy } function getModuleSpecifierText(promotedDeclaration) { var _a2, _b; - return promotedDeclaration.kind === 274 /* 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 === 277 /* 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) { const convertExistingToTypeOnly = compilerOptions.preserveValueImports && compilerOptions.isolatedModules; switch (aliasDeclaration.kind) { - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: if (aliasDeclaration.isTypeOnly) { if (aliasDeclaration.parent.elements.length > 1 && ts_OrganizeImports_exports.importSpecifiersAreSorted(aliasDeclaration.parent.elements)) { changes.delete(sourceFile, aliasDeclaration); @@ -132660,13 +132921,13 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF promoteImportClause(aliasDeclaration.parent.parent); return aliasDeclaration.parent.parent; } - case 276 /* ImportClause */: + case 279 /* ImportClause */: promoteImportClause(aliasDeclaration); return aliasDeclaration; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: promoteImportClause(aliasDeclaration.parent); return aliasDeclaration.parent; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: changes.deleteRange(sourceFile, aliasDeclaration.getChildAt(1)); return aliasDeclaration; default: @@ -132677,7 +132938,7 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF if (convertExistingToTypeOnly) { const namedImports = tryCast(importClause.namedBindings, isNamedImports); if (namedImports && namedImports.elements.length > 1) { - if (ts_OrganizeImports_exports.importSpecifiersAreSorted(namedImports.elements) && aliasDeclaration.kind === 279 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { + if (ts_OrganizeImports_exports.importSpecifiersAreSorted(namedImports.elements) && aliasDeclaration.kind === 282 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { changes.delete(sourceFile, aliasDeclaration); changes.insertImportSpecifierAtIndex(sourceFile, aliasDeclaration, namedImports, 0); } @@ -132692,7 +132953,7 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF } function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, compilerOptions) { var _a2; - if (clause.kind === 206 /* ObjectBindingPattern */) { + if (clause.kind === 208 /* ObjectBindingPattern */) { if (defaultImport) { addElementToBindingPattern(clause, defaultImport.name, "default"); } @@ -133090,13 +133351,13 @@ function doRemoveOverrideModifierChange(changeTracker, sourceFile, pos) { } function isClassElementLikeHasJSDoc(node) { switch (node.kind) { - case 176 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return true; - case 168 /* Parameter */: + case 169 /* Parameter */: return isParameterPropertyDeclaration(node, node.parent); default: return false; @@ -133354,7 +133615,7 @@ registerCodeFix({ }); function getNamedTupleMember(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - return findAncestor(token, (t) => t.kind === 202 /* NamedTupleMember */); + return findAncestor(token, (t) => t.kind === 204 /* NamedTupleMember */); } function doChange8(changes, sourceFile, namedTupleMember) { if (!namedTupleMember) { @@ -133363,10 +133624,10 @@ function doChange8(changes, sourceFile, namedTupleMember) { let unwrappedType = namedTupleMember.type; let sawOptional = false; let sawRest = false; - while (unwrappedType.kind === 190 /* OptionalType */ || unwrappedType.kind === 191 /* RestType */ || unwrappedType.kind === 196 /* ParenthesizedType */) { - if (unwrappedType.kind === 190 /* OptionalType */) { + while (unwrappedType.kind === 192 /* OptionalType */ || unwrappedType.kind === 193 /* RestType */ || unwrappedType.kind === 198 /* ParenthesizedType */) { + if (unwrappedType.kind === 192 /* OptionalType */) { sawOptional = true; - } else if (unwrappedType.kind === 191 /* RestType */) { + } else if (unwrappedType.kind === 193 /* RestType */) { sawRest = true; } unwrappedType = unwrappedType.type; @@ -133668,19 +133929,19 @@ function getInfo6(checker, sourceFile, position, errorCode) { } function getVariableLikeInitializer(declaration) { switch (declaration.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 305 /* PropertyAssignment */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 308 /* PropertyAssignment */: return declaration.initializer; - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: return declaration.initializer && (isJsxExpression(declaration.initializer) ? declaration.initializer.expression : void 0); - case 306 /* ShorthandPropertyAssignment */: - case 170 /* PropertySignature */: - case 308 /* EnumMember */: - case 356 /* JSDocPropertyTag */: - case 349 /* JSDocParameterTag */: + case 309 /* ShorthandPropertyAssignment */: + case 171 /* PropertySignature */: + case 311 /* EnumMember */: + case 359 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: return void 0; } } @@ -133913,7 +134174,7 @@ function createActionForAddMissingMemberInJavascriptFile(context, { parentDeclar function addMissingMemberInJs(changeTracker, sourceFile, classDeclaration, token, makeStatic) { const tokenName = token.text; if (makeStatic) { - if (classDeclaration.kind === 232 /* ClassExpression */) { + if (classDeclaration.kind === 234 /* ClassExpression */) { return; } const className = classDeclaration.name.getText(); @@ -133962,7 +134223,7 @@ function createActionsForAddMissingMemberInTypeScriptFile(context, { parentDecla } function getTypeNode2(checker, node, token) { let typeNode; - if (token.parent.parent.kind === 227 /* BinaryExpression */) { + if (token.parent.parent.kind === 229 /* 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))); @@ -134028,7 +134289,7 @@ function getActionsForMissingMethodDeclaration(context, info) { } function addMethodDeclaration(context, changes, callExpression, name, modifierFlags, parentDeclaration, sourceFile) { const importAdder = createImportAdder(sourceFile, context.program, context.preferences, context.host); - const kind = isClassLike(parentDeclaration) ? 174 /* MethodDeclaration */ : 173 /* MethodSignature */; + const kind = isClassLike(parentDeclaration) ? 176 /* MethodDeclaration */ : 175 /* MethodSignature */; const signatureDeclaration = createSignatureDeclarationFromCallExpression(kind, context, importAdder, callExpression, name, modifierFlags, parentDeclaration); const containingMethodDeclaration = tryGetContainingMethodDeclaration(parentDeclaration, callExpression); if (containingMethodDeclaration) { @@ -134057,7 +134318,7 @@ function addEnumMemberDeclaration(changes, checker, { token, parentDeclaration } 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(263 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature(263 /* FunctionDeclaration */, context, quotePreference, info.signature, createStubbedBody(Diagnostics.Function_not_implemented.message, quotePreference), info.token, void 0, void 0, void 0, importAdder); + const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(265 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature(265 /* FunctionDeclaration */, context, quotePreference, info.signature, createStubbedBody(Diagnostics.Function_not_implemented.message, quotePreference), info.token, void 0, void 0, void 0, importAdder); if (functionDeclaration === void 0) { Debug.fail("fixMissingFunctionDeclaration codefix got unexpected error."); } @@ -134157,7 +134418,7 @@ function tryGetValueFromType(context, checker, importAdder, quotePreference, typ if (signature === void 0) return createUndefined(); const func = createSignatureDeclarationFromSignature( - 218 /* FunctionExpression */, + 220 /* FunctionExpression */, context, quotePreference, signature[0], @@ -134818,7 +135079,7 @@ registerCodeFix({ const importDeclaration = getImportDeclaration(context.sourceFile, context.program, context.span.start); if (!importDeclaration) return; - const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 279 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); + const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 282 /* 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) { @@ -134833,18 +135094,18 @@ registerCodeFix({ }); function getImportDeclaration(sourceFile, program, start2) { const identifier = tryCast(getTokenAtPosition(sourceFile, start2), isIdentifier); - if (!identifier || identifier.parent.kind !== 183 /* TypeReference */) + if (!identifier || identifier.parent.kind !== 185 /* 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 === 274 /* ImportEqualsDeclaration */) { + if (importDeclaration.kind === 277 /* ImportEqualsDeclaration */) { changes.insertModifierBefore(sourceFile, 155 /* TypeKeyword */, importDeclaration.name); return; } - const importClause = importDeclaration.kind === 276 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; + const importClause = importDeclaration.kind === 279 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; if (importClause.name && importClause.namedBindings) { return; } @@ -135002,7 +135263,7 @@ function deleteTypeParameters(changes, sourceFile, token) { changes.delete(sourceFile, Debug.checkDefined(cast(token.parent, isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); } function isImport(token) { - return token.kind === 101 /* ImportKeyword */ || token.kind === 79 /* Identifier */ && (token.parent.kind === 279 /* ImportSpecifier */ || token.parent.kind === 276 /* ImportClause */); + return token.kind === 101 /* ImportKeyword */ || token.kind === 79 /* Identifier */ && (token.parent.kind === 282 /* ImportSpecifier */ || token.parent.kind === 279 /* ImportClause */); } function tryGetFullImport(token) { return token.kind === 101 /* ImportKeyword */ ? tryCast(token.parent, isImportDeclaration) : void 0; @@ -135011,7 +135272,7 @@ 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 === 244 /* VariableStatement */ ? node.parent : node); + changes.delete(sourceFile, node.parent.kind === 246 /* VariableStatement */ ? node.parent : node); } function deleteDestructuringElements(changes, sourceFile, node) { forEach(node.elements, (n) => changes.delete(sourceFile, n)); @@ -135035,14 +135296,14 @@ function tryPrefixDeclaration(changes, errorCode, sourceFile, token) { } function canPrefix(token) { switch (token.parent.kind) { - case 168 /* Parameter */: - case 167 /* TypeParameter */: + case 169 /* Parameter */: + case 168 /* TypeParameter */: return true; - case 261 /* VariableDeclaration */: { + case 263 /* VariableDeclaration */: { const varDecl = token.parent; switch (varDecl.parent.parent.kind) { - case 251 /* ForOfStatement */: - case 250 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 252 /* ForInStatement */: return true; } } @@ -135091,8 +135352,8 @@ function isNotProvidedArguments(parameter, checker, sourceFiles) { function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program, cancellationToken, isFixAll) { const { parent: parent2 } = parameter; switch (parent2.kind) { - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: + case 176 /* MethodDeclaration */: + case 178 /* 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); @@ -135110,18 +135371,18 @@ function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program } } return true; - case 263 /* FunctionDeclaration */: { + case 265 /* FunctionDeclaration */: { if (parent2.name && isCallbackLike(checker, sourceFile, parent2.name)) { return isLastParameter(parent2, parameter, isFixAll); } return true; } - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return isLastParameter(parent2, parameter, isFixAll); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return false; - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return true; default: return Debug.failBadSyntaxKind(parent2); @@ -135171,7 +135432,7 @@ function doChange18(changes, sourceFile, start2, length2, errorCode) { const container = (isBlock(statement.parent) ? statement.parent : statement).parent; if (!isBlock(statement.parent) || statement === first(statement.parent.statements)) { switch (container.kind) { - case 246 /* IfStatement */: + case 248 /* IfStatement */: if (container.elseStatement) { if (isBlock(statement.parent)) { break; @@ -135180,8 +135441,8 @@ function doChange18(changes, sourceFile, start2, length2, errorCode) { } return; } - case 248 /* WhileStatement */: - case 249 /* ForStatement */: + case 250 /* WhileStatement */: + case 251 /* ForStatement */: changes.delete(sourceFile, container); return; } @@ -135240,7 +135501,7 @@ registerCodeFix({ 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 === 323 /* JSDocNullableType */) { + if (typeNode.kind === 326 /* JSDocNullableType */) { actions2.push(fix(checker.getNullableType(type, 32768 /* Undefined */), fixIdNullable, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)); } return actions2; @@ -135258,7 +135519,7 @@ registerCodeFix({ if (!info) return; const { typeNode, type } = info; - const fixedType = typeNode.kind === 323 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; + const fixedType = typeNode.kind === 326 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; doChange20(changes, sourceFile, typeNode, fixedType, checker); }); } @@ -135273,22 +135534,22 @@ function getInfo11(sourceFile, pos, checker) { } function isTypeContainer(node) { switch (node.kind) { - case 235 /* AsExpression */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 263 /* FunctionDeclaration */: - case 177 /* GetAccessor */: - case 181 /* IndexSignature */: - case 200 /* MappedType */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 178 /* SetAccessor */: - case 268 /* TypeAliasDeclaration */: - case 216 /* TypeAssertionExpression */: - case 261 /* VariableDeclaration */: + case 237 /* AsExpression */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 265 /* FunctionDeclaration */: + case 179 /* GetAccessor */: + case 183 /* IndexSignature */: + case 202 /* MappedType */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 180 /* SetAccessor */: + case 271 /* TypeAliasDeclaration */: + case 218 /* TypeAssertionExpression */: + case 263 /* VariableDeclaration */: return true; default: return false; @@ -135379,14 +135640,14 @@ function getNodes3(sourceFile, start2) { } let insertBefore; switch (containingFunction.kind) { - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: insertBefore = containingFunction.name; break; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: insertBefore = findChildOfKind(containingFunction, 99 /* FunctionKeyword */, sourceFile); break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: const kind = containingFunction.typeParameters ? 29 /* LessThanToken */ : 20 /* OpenParenToken */; insertBefore = findChildOfKind(containingFunction, kind, sourceFile) || first(containingFunction.parameters); break; @@ -135681,7 +135942,7 @@ function annotateSetAccessor(changes, importAdder, sourceFile, setAccessorDeclar function annotate(changes, importAdder, sourceFile, declaration, type, program, host) { const typeNode = getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { - if (isInJSFile(sourceFile) && declaration.kind !== 170 /* PropertySignature */) { + if (isInJSFile(sourceFile) && declaration.kind !== 171 /* PropertySignature */) { const parent2 = isVariableDeclaration(declaration) ? tryCast(declaration.parent.parent, isVariableStatement) : declaration; if (!parent2) { return; @@ -135757,17 +136018,17 @@ function inferTypeForParametersFromUsage(func, sourceFile, program, cancellation function getFunctionReferences(containingFunction, sourceFile, program, cancellationToken) { let searchToken; switch (containingFunction.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: searchToken = findChildOfKind(containingFunction, 136 /* ConstructorKeyword */, sourceFile); break; - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: const parent2 = containingFunction.parent; searchToken = (isVariableDeclaration(parent2) || isPropertyDeclaration(parent2)) && isIdentifier(parent2.name) ? parent2.name : containingFunction.name; break; - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: searchToken = containingFunction.name; break; } @@ -135902,44 +136163,44 @@ function inferTypeFromReferences(program, references, cancellationToken) { node = node.parent; } switch (node.parent.kind) { - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: inferTypeFromExpressionStatement(node, usage); break; - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: usage.isNumber = true; break; - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: inferTypeFromPrefixUnaryExpression(node.parent, usage); break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: inferTypeFromBinaryExpression(node, node.parent, usage); break; - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: inferTypeFromSwitchStatementLabel(node.parent, usage); break; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: if (node.parent.expression === node) { inferTypeFromCallExpression(node.parent, usage); } else { inferTypeFromContextualType(node, usage); } break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: inferTypeFromPropertyAccessExpression(node.parent, usage); break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: inferTypeFromPropertyElementExpression(node.parent, node, usage); break; - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: inferTypeFromPropertyAssignment(node.parent, usage); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: inferTypeFromPropertyDeclaration(node.parent, usage); break; - case 261 /* VariableDeclaration */: { + case 263 /* VariableDeclaration */: { const { name, initializer } = node.parent; if (node === name) { if (initializer) { @@ -136036,7 +136297,7 @@ function inferTypeFromReferences(program, references, cancellationToken) { break; case 56 /* BarBarToken */: case 60 /* QuestionQuestionToken */: - if (node === parent2.left && (node.parent.parent.kind === 261 /* VariableDeclaration */ || isAssignmentExpression(node.parent.parent, true))) { + if (node === parent2.left && (node.parent.parent.kind === 263 /* VariableDeclaration */ || isAssignmentExpression(node.parent.parent, true))) { addCandidateType(usage, checker.getTypeAtLocation(parent2.right)); } break; @@ -136060,7 +136321,7 @@ function inferTypeFromReferences(program, references, cancellationToken) { } } calculateUsageOfNode(parent2, call.return_); - if (parent2.kind === 213 /* CallExpression */) { + if (parent2.kind === 215 /* CallExpression */) { (usage.calls || (usage.calls = [])).push(call); } else { (usage.constructs || (usage.constructs = [])).push(call); @@ -136479,7 +136740,7 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con 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 : 170 /* PropertySignature */; + const kind = (_a2 = declaration == null ? void 0 : declaration.kind) != null ? _a2 : 171 /* PropertySignature */; const declarationName = getSynthesizedDeepClone(getNameOfDeclaration(declaration), false); const effectiveModifierFlags = declaration ? getEffectiveModifierFlags(declaration) : 0 /* None */; let modifierFlags = effectiveModifierFlags & 4 /* Public */ ? 4 /* Public */ : effectiveModifierFlags & 16 /* Protected */ ? 16 /* Protected */ : 0 /* None */; @@ -136492,8 +136753,8 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con const ambient = !!(enclosingDeclaration.flags & 16777216 /* Ambient */) || isAmbient; const quotePreference = getQuotePreference(sourceFile, preferences); switch (kind) { - case 170 /* PropertySignature */: - case 171 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 172 /* PropertyDeclaration */: const flags = quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : void 0; let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); if (importAdder) { @@ -136511,8 +136772,8 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con void 0 )); break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: { + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: { Debug.assertIsDefined(declarations); let typeNode2 = checker.typeToTypeNode(type, enclosingDeclaration, void 0, getNoopSymbolTrackerWithResolver(context)); const allAccessors = getAllAccessorDeclarations(declarations, declaration); @@ -136547,8 +136808,8 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con } break; } - case 173 /* MethodSignature */: - case 174 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 176 /* MethodDeclaration */: Debug.assertIsDefined(declarations); const signatures = type.isUnion() ? flatMap(type.types, (t) => t.getCallSignatures()) : type.getCallSignatures(); if (!some(signatures)) { @@ -136575,7 +136836,7 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con break; } function outputMethod(quotePreference2, signature, modifiers2, name, body2) { - const method = createSignatureDeclarationFromSignature(174 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); + const method = createSignatureDeclarationFromSignature(176 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); if (method) addClassElement(method); } @@ -136701,7 +136962,7 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder const parameters = createDummyParameters(args.length, names, argumentTypeNodes, void 0, isJs); const type = isJs || contextualType === void 0 ? void 0 : checker.typeToTypeNode(contextualType, contextNode, void 0, tracker); switch (kind) { - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return factory.createMethodDeclaration( modifiers, asteriskToken, @@ -136712,7 +136973,7 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder type, createStubbedMethodBody(quotePreference) ); - case 173 /* MethodSignature */: + case 175 /* MethodSignature */: return factory.createMethodSignature( modifiers, name, @@ -136721,7 +136982,7 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder parameters, type === void 0 ? factory.createKeywordTypeNode(159 /* UnknownKeyword */) : type ); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return factory.createFunctionDeclaration( modifiers, asteriskToken, @@ -137075,7 +137336,7 @@ function getAccessorConvertiblePropertyAtPosition(file, program, start2, end, co isStatic: hasStaticModifier(declaration), isReadonly: hasEffectiveReadonlyModifier(declaration), type: getDeclarationType(declaration, program), - container: declaration.kind === 168 /* Parameter */ ? declaration.parent.parent : declaration.parent, + container: declaration.kind === 169 /* Parameter */ ? declaration.parent.parent : declaration.parent, originalName: declaration.name.text, declaration, fieldName, @@ -137223,7 +137484,7 @@ registerCodeFix({ }); function getActionsForUsageOfInvalidImport(context) { const sourceFile = context.sourceFile; - const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 213 /* CallExpression */ : 214 /* NewExpression */; + const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 215 /* CallExpression */ : 216 /* NewExpression */; const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), (a) => a.kind === targetKind); if (!node) { return []; @@ -137546,7 +137807,7 @@ registerCodeFix({ function getImportTypeNode(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); Debug.assert(token.kind === 101 /* ImportKeyword */, "This token should be an ImportKeyword"); - Debug.assert(token.parent.kind === 205 /* ImportType */, "Token parent should be an ImportType"); + Debug.assert(token.parent.kind === 207 /* ImportType */, "Token parent should be an ImportType"); return token.parent; } function doChange28(changes, sourceFile, importType) { @@ -138323,12 +138584,12 @@ function isMemberCompletionKind(kind) { function getJsxClosingTagCompletion(location2, sourceFile) { const jsxClosingElement = findAncestor(location2, (node) => { switch (node.kind) { - case 290 /* JsxClosingElement */: + case 293 /* JsxClosingElement */: return true; case 43 /* SlashToken */: case 31 /* GreaterThanToken */: case 79 /* Identifier */: - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return false; default: return "quit"; @@ -138647,10 +138908,10 @@ function createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, pro const quotePreference = getQuotePreference(sourceFile, preferences); const builderFlags = 33554432 /* OmitThisParameter */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */); switch (declaration.kind) { - case 170 /* PropertySignature */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodSignature */: - case 174 /* MethodDeclaration */: { + case 171 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 175 /* MethodSignature */: + case 176 /* 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); @@ -139170,11 +139431,11 @@ function getContextualType(previousToken, position, sourceFile, checker) { return getContextualTypeFromParent(previousToken, checker); case 63 /* EqualsToken */: switch (parent2.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return checker.getContextualType(parent2.initializer); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return checker.getTypeAtLocation(parent2.left); - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: return checker.getContextualTypeForJsxAttribute(parent2); default: return void 0; @@ -139199,7 +139460,7 @@ function getFirstSymbolInChain(symbol, enclosingDeclaration, checker) { } function isModuleSymbol(symbol) { var _a2; - return !!((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d.kind === 314 /* SourceFile */)); + return !!((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d.kind === 317 /* SourceFile */)); } function getCompletionData(program, log, sourceFile, compilerOptions, position, preferences, detailsEntryId, host, formatContext, cancellationToken) { var _a2; @@ -139233,7 +139494,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const typeExpression = tryGetTypeExpressionFromTag(tag); if (typeExpression) { currentToken = getTokenAtPosition(sourceFile, position); - if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 356 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { + if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 359 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression); } } @@ -139291,7 +139552,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, isRightOfDot = contextToken.kind === 24 /* DotToken */; isRightOfQuestionDot = contextToken.kind === 28 /* QuestionDotToken */; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: propertyAccessToConvert = parent2; node = propertyAccessToConvert.expression; const leftmostAccessExpression = getLeftmostAccessExpression(propertyAccessToConvert); @@ -139302,16 +139563,16 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return void 0; } break; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: node = parent2.left; break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: node = parent2.name; break; - case 205 /* ImportType */: + case 207 /* ImportType */: node = parent2; break; - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: node = parent2.getFirstToken(sourceFile); Debug.assert(node.kind === 101 /* ImportKeyword */ || node.kind === 104 /* NewKeyword */); break; @@ -139319,51 +139580,51 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return void 0; } } else if (!importStatementCompletion) { - if (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) { + if (parent2 && parent2.kind === 213 /* PropertyAccessExpression */) { contextToken = parent2; parent2 = parent2.parent; } if (currentToken.parent === location2) { switch (currentToken.kind) { case 31 /* GreaterThanToken */: - if (currentToken.parent.kind === 287 /* JsxElement */ || currentToken.parent.kind === 289 /* JsxOpeningElement */) { + if (currentToken.parent.kind === 290 /* JsxElement */ || currentToken.parent.kind === 292 /* JsxOpeningElement */) { location2 = currentToken; } break; case 43 /* SlashToken */: - if (currentToken.parent.kind === 288 /* JsxSelfClosingElement */) { + if (currentToken.parent.kind === 291 /* JsxSelfClosingElement */) { location2 = currentToken; } break; } } switch (parent2.kind) { - case 290 /* JsxClosingElement */: + case 293 /* JsxClosingElement */: if (contextToken.kind === 43 /* SlashToken */) { isStartingCloseTag = true; location2 = contextToken; } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (!binaryExpressionMayBeOpenTag(parent2)) { break; } - case 288 /* JsxSelfClosingElement */: - case 287 /* JsxElement */: - case 289 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: + case 290 /* JsxElement */: + case 292 /* JsxOpeningElement */: isJsxIdentifierExpected = true; if (contextToken.kind === 29 /* LessThanToken */) { isRightOfOpenTag = true; location2 = contextToken; } break; - case 297 /* JsxExpression */: - case 296 /* JsxSpreadAttribute */: + case 300 /* JsxExpression */: + case 299 /* JsxSpreadAttribute */: if (previousToken.kind === 19 /* CloseBraceToken */ && currentToken.kind === 31 /* GreaterThanToken */) { isJsxIdentifierExpected = true; } break; - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: if (parent2.initializer === previousToken && previousToken.end < position) { isJsxIdentifierExpected = true; break; @@ -139467,13 +139728,13 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, }; function isTagWithTypeExpression(tag) { switch (tag.kind) { - case 349 /* JSDocParameterTag */: - case 356 /* JSDocPropertyTag */: - case 350 /* JSDocReturnTag */: - case 352 /* JSDocTypeTag */: - case 354 /* JSDocTypedefTag */: + case 352 /* JSDocParameterTag */: + case 359 /* JSDocPropertyTag */: + case 353 /* JSDocReturnTag */: + case 355 /* JSDocTypeTag */: + case 357 /* JSDocTypedefTag */: return true; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return !!tag.constraint; default: return false; @@ -139482,7 +139743,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, function tryGetTypeExpressionFromTag(tag) { if (isTagWithTypeExpression(tag)) { const typeExpression = isJSDocTemplateTag(tag) ? tag.constraint : tag.typeExpression; - return typeExpression && typeExpression.kind === 318 /* JSDocTypeExpression */ ? typeExpression : void 0; + return typeExpression && typeExpression.kind === 321 /* JSDocTypeExpression */ ? typeExpression : void 0; } return void 0; } @@ -139512,7 +139773,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, symbols.push(exportedSymbol); } } - if (!isTypeLocation && symbol.declarations && symbol.declarations.some((d) => d.kind !== 314 /* SourceFile */ && d.kind !== 270 /* ModuleDeclaration */ && d.kind !== 269 /* EnumDeclaration */)) { + if (!isTypeLocation && symbol.declarations && symbol.declarations.some((d) => d.kind !== 317 /* SourceFile */ && d.kind !== 273 /* ModuleDeclaration */ && d.kind !== 272 /* EnumDeclaration */)) { let type = typeChecker3.getTypeOfSymbolAtLocation(symbol, node).getNonOptionalType(); let insertQuestionDot = false; if (type.isNullableType()) { @@ -139551,7 +139812,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (isRightOfQuestionDot && some(type.getCallSignatures())) { isNewIdentifierLocation = true; } - const propertyAccess = node.kind === 205 /* ImportType */ ? node : node.parent; + const propertyAccess = node.kind === 207 /* ImportType */ ? node : node.parent; if (inCheckedFile) { const typeSymbols = type.getApparentProperties(); for (const symbol of typeSymbols) { @@ -139787,7 +140048,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } } } - if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 314 /* SourceFile */) { + if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 317 /* SourceFile */) { const thisType = typeChecker3.tryGetThisTypeAt(scopeNode, false, isClassLike(scopeNode.parent) ? scopeNode : void 0); if (thisType && !isProbablyGlobalType(thisType, sourceFile, typeChecker3)) { for (const symbol of getPropertiesForCompletion(thisType, typeChecker3)) { @@ -139817,10 +140078,10 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } function isSnippetScope(scopeNode) { switch (scopeNode.kind) { - case 314 /* SourceFile */: - case 229 /* TemplateExpression */: - case 297 /* JsxExpression */: - case 242 /* Block */: + case 317 /* SourceFile */: + case 231 /* TemplateExpression */: + case 300 /* JsxExpression */: + case 244 /* Block */: return true; default: return isStatement(scopeNode); @@ -139830,24 +140091,24 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return insideJsDocTagTypeExpression || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location2.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker3) || isPartOfTypeNode(location2) || isContextTokenTypeLocation(contextToken)); } function isContextTokenValueLocation(contextToken2) { - return contextToken2 && (contextToken2.kind === 113 /* TypeOfKeyword */ && (contextToken2.parent.kind === 186 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 130 /* AssertsKeyword */ && contextToken2.parent.kind === 182 /* TypePredicate */); + return contextToken2 && (contextToken2.kind === 113 /* TypeOfKeyword */ && (contextToken2.parent.kind === 188 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 130 /* AssertsKeyword */ && contextToken2.parent.kind === 184 /* TypePredicate */); } function isContextTokenTypeLocation(contextToken2) { if (contextToken2) { const parentKind = contextToken2.parent.kind; switch (contextToken2.kind) { case 58 /* ColonToken */: - return parentKind === 171 /* PropertyDeclaration */ || parentKind === 170 /* PropertySignature */ || parentKind === 168 /* Parameter */ || parentKind === 261 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); + return parentKind === 172 /* PropertyDeclaration */ || parentKind === 171 /* PropertySignature */ || parentKind === 169 /* Parameter */ || parentKind === 263 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); case 63 /* EqualsToken */: - return parentKind === 268 /* TypeAliasDeclaration */; + return parentKind === 271 /* TypeAliasDeclaration */; case 129 /* AsKeyword */: - return parentKind === 235 /* AsExpression */; + return parentKind === 237 /* AsExpression */; case 29 /* LessThanToken */: - return parentKind === 183 /* TypeReference */ || parentKind === 216 /* TypeAssertionExpression */; + return parentKind === 185 /* TypeReference */ || parentKind === 218 /* TypeAssertionExpression */; case 95 /* ExtendsKeyword */: - return parentKind === 167 /* TypeParameter */; + return parentKind === 168 /* TypeParameter */; case 151 /* SatisfiesKeyword */: - return parentKind === 239 /* SatisfiesExpression */; + return parentKind === 241 /* SatisfiesExpression */; } } return false; @@ -140022,14 +140283,14 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return true; } if (contextToken2.kind === 31 /* GreaterThanToken */ && contextToken2.parent) { - if (location2 === contextToken2.parent && (location2.kind === 289 /* JsxOpeningElement */ || location2.kind === 288 /* JsxSelfClosingElement */)) { + if (location2 === contextToken2.parent && (location2.kind === 292 /* JsxOpeningElement */ || location2.kind === 291 /* JsxSelfClosingElement */)) { return false; } - if (contextToken2.parent.kind === 289 /* JsxOpeningElement */) { - return location2.parent.kind !== 289 /* JsxOpeningElement */; + if (contextToken2.parent.kind === 292 /* JsxOpeningElement */) { + return location2.parent.kind !== 292 /* JsxOpeningElement */; } - if (contextToken2.parent.kind === 290 /* JsxClosingElement */ || contextToken2.parent.kind === 288 /* JsxSelfClosingElement */) { - return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 287 /* JsxElement */; + if (contextToken2.parent.kind === 293 /* JsxClosingElement */ || contextToken2.parent.kind === 291 /* JsxSelfClosingElement */) { + return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 290 /* JsxElement */; } } return false; @@ -140040,29 +140301,29 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const tokenKind = keywordForNode(contextToken); switch (tokenKind) { case 27 /* CommaToken */: - return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 227 /* BinaryExpression */ || containingNodeKind === 184 /* FunctionType */ || containingNodeKind === 210 /* ObjectLiteralExpression */; + return containingNodeKind === 215 /* CallExpression */ || containingNodeKind === 178 /* Constructor */ || containingNodeKind === 216 /* NewExpression */ || containingNodeKind === 211 /* ArrayLiteralExpression */ || containingNodeKind === 229 /* BinaryExpression */ || containingNodeKind === 186 /* FunctionType */ || containingNodeKind === 212 /* ObjectLiteralExpression */; case 20 /* OpenParenToken */: - return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 217 /* ParenthesizedExpression */ || containingNodeKind === 196 /* ParenthesizedType */; + return containingNodeKind === 215 /* CallExpression */ || containingNodeKind === 178 /* Constructor */ || containingNodeKind === 216 /* NewExpression */ || containingNodeKind === 219 /* ParenthesizedExpression */ || containingNodeKind === 198 /* ParenthesizedType */; case 22 /* OpenBracketToken */: - return containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 181 /* IndexSignature */ || containingNodeKind === 166 /* ComputedPropertyName */; + return containingNodeKind === 211 /* ArrayLiteralExpression */ || containingNodeKind === 183 /* IndexSignature */ || containingNodeKind === 167 /* ComputedPropertyName */; case 143 /* ModuleKeyword */: case 144 /* NamespaceKeyword */: case 101 /* ImportKeyword */: return true; case 24 /* DotToken */: - return containingNodeKind === 270 /* ModuleDeclaration */; + return containingNodeKind === 273 /* ModuleDeclaration */; case 18 /* OpenBraceToken */: - return containingNodeKind === 264 /* ClassDeclaration */ || containingNodeKind === 265 /* StructDeclaration */ || containingNodeKind === 210 /* ObjectLiteralExpression */; + return containingNodeKind === 266 /* ClassDeclaration */ || containingNodeKind === 267 /* StructDeclaration */ || containingNodeKind === 212 /* ObjectLiteralExpression */; case 63 /* EqualsToken */: - return containingNodeKind === 261 /* VariableDeclaration */ || containingNodeKind === 227 /* BinaryExpression */; + return containingNodeKind === 263 /* VariableDeclaration */ || containingNodeKind === 229 /* BinaryExpression */; case 15 /* TemplateHead */: - return containingNodeKind === 229 /* TemplateExpression */; + return containingNodeKind === 231 /* TemplateExpression */; case 16 /* TemplateMiddle */: - return containingNodeKind === 240 /* TemplateSpan */; + return containingNodeKind === 242 /* TemplateSpan */; case 133 /* AsyncKeyword */: - return containingNodeKind === 174 /* MethodDeclaration */ || containingNodeKind === 306 /* ShorthandPropertyAssignment */; + return containingNodeKind === 176 /* MethodDeclaration */ || containingNodeKind === 309 /* ShorthandPropertyAssignment */; case 41 /* AsteriskToken */: - return containingNodeKind === 174 /* MethodDeclaration */; + return containingNodeKind === 176 /* MethodDeclaration */; } if (isClassMemberCompletionKeyword(tokenKind)) { return true; @@ -140100,7 +140361,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, completionKind = 0 /* ObjectPropertyDeclaration */; let typeMembers; let existingMembers; - if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */) { + if (objectLikeContainer.kind === 212 /* ObjectLiteralExpression */) { const instantiatedType = tryGetObjectLiteralContextualType(objectLikeContainer, typeChecker3); if (instantiatedType === void 0) { if (objectLikeContainer.flags & 33554432 /* InWithStatement */) { @@ -140122,16 +140383,16 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } } } else { - Debug.assert(objectLikeContainer.kind === 206 /* ObjectBindingPattern */); + Debug.assert(objectLikeContainer.kind === 208 /* 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 === 251 /* ForOfStatement */; - if (!canGetType && rootDeclaration.kind === 168 /* Parameter */) { + let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 253 /* ForOfStatement */; + if (!canGetType && rootDeclaration.kind === 169 /* Parameter */) { if (isExpression(rootDeclaration.parent)) { canGetType = !!typeChecker3.getContextualType(rootDeclaration.parent); - } else if (rootDeclaration.parent.kind === 174 /* MethodDeclaration */ || rootDeclaration.parent.kind === 178 /* SetAccessor */) { + } else if (rootDeclaration.parent.kind === 176 /* MethodDeclaration */ || rootDeclaration.parent.kind === 180 /* SetAccessor */) { canGetType = isExpression(rootDeclaration.parent.parent) && !!typeChecker3.getContextualType(rootDeclaration.parent.parent); } } @@ -140149,7 +140410,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const filteredMembers = filterObjectMembersList(typeMembers, Debug.checkDefined(existingMembers)); symbols = concatenate(symbols, filteredMembers); setSortTextToOptionalMember(); - if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { + if (objectLikeContainer.kind === 212 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { transformObjectLiteralMembersSortText(symbolsStartIndex); collectObjectLiteralMethodSymbols(filteredMembers, objectLikeContainer); } @@ -140165,10 +140426,10 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (!isTypeKeywordTokenOrIdentifier(contextToken)) { keywordFilters = 8 /* TypeKeyword */; } - const { moduleSpecifier } = namedImportsOrExports.kind === 278 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; + const { moduleSpecifier } = namedImportsOrExports.kind === 281 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; if (!moduleSpecifier) { isNewIdentifierLocation = true; - return namedImportsOrExports.kind === 278 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; + return namedImportsOrExports.kind === 281 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; } const moduleSpecifierSymbol = typeChecker3.getSymbolAtLocation(moduleSpecifier); if (!moduleSpecifierSymbol) { @@ -140283,31 +140544,31 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, case 30 /* LessThanSlashToken */: case 43 /* SlashToken */: case 79 /* Identifier */: - case 211 /* PropertyAccessExpression */: - case 295 /* JsxAttributes */: - case 294 /* JsxAttribute */: - case 296 /* JsxSpreadAttribute */: - if (parent2 && (parent2.kind === 288 /* JsxSelfClosingElement */ || parent2.kind === 289 /* JsxOpeningElement */)) { + case 213 /* PropertyAccessExpression */: + case 298 /* JsxAttributes */: + case 297 /* JsxAttribute */: + case 299 /* JsxSpreadAttribute */: + if (parent2 && (parent2.kind === 291 /* JsxSelfClosingElement */ || parent2.kind === 292 /* JsxOpeningElement */)) { if (contextToken2.kind === 31 /* GreaterThanToken */) { const precedingToken = findPrecedingToken(contextToken2.pos, sourceFile, void 0); if (!parent2.typeArguments || precedingToken && precedingToken.kind === 43 /* SlashToken */) break; } return parent2; - } else if (parent2.kind === 294 /* JsxAttribute */) { + } else if (parent2.kind === 297 /* JsxAttribute */) { return parent2.parent.parent; } break; case 10 /* StringLiteral */: - if (parent2 && (parent2.kind === 294 /* JsxAttribute */ || parent2.kind === 296 /* JsxSpreadAttribute */)) { + if (parent2 && (parent2.kind === 297 /* JsxAttribute */ || parent2.kind === 299 /* JsxSpreadAttribute */)) { return parent2.parent.parent; } break; case 19 /* CloseBraceToken */: - if (parent2 && parent2.kind === 297 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 294 /* JsxAttribute */) { + if (parent2 && parent2.kind === 300 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 297 /* JsxAttribute */) { return parent2.parent.parent.parent; } - if (parent2 && parent2.kind === 296 /* JsxSpreadAttribute */) { + if (parent2 && parent2.kind === 299 /* JsxSpreadAttribute */) { return parent2.parent.parent; } break; @@ -140320,34 +140581,34 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const containingNodeKind = parent2.kind; switch (contextToken2.kind) { case 27 /* CommaToken */: - return containingNodeKind === 261 /* VariableDeclaration */ || isVariableDeclarationListButNotTypeArgument(contextToken2) || containingNodeKind === 244 /* VariableStatement */ || containingNodeKind === 269 /* EnumDeclaration */ || isFunctionLikeButNotConstructor(containingNodeKind) || containingNodeKind === 267 /* InterfaceDeclaration */ || containingNodeKind === 207 /* ArrayBindingPattern */ || containingNodeKind === 268 /* TypeAliasDeclaration */ || isClassLike(parent2) && !!parent2.typeParameters && parent2.typeParameters.end >= contextToken2.pos; + return containingNodeKind === 263 /* VariableDeclaration */ || isVariableDeclarationListButNotTypeArgument(contextToken2) || containingNodeKind === 246 /* VariableStatement */ || containingNodeKind === 272 /* EnumDeclaration */ || isFunctionLikeButNotConstructor(containingNodeKind) || containingNodeKind === 270 /* InterfaceDeclaration */ || containingNodeKind === 209 /* ArrayBindingPattern */ || containingNodeKind === 271 /* TypeAliasDeclaration */ || isClassLike(parent2) && !!parent2.typeParameters && parent2.typeParameters.end >= contextToken2.pos; case 24 /* DotToken */: - return containingNodeKind === 207 /* ArrayBindingPattern */; + return containingNodeKind === 209 /* ArrayBindingPattern */; case 58 /* ColonToken */: - return containingNodeKind === 208 /* BindingElement */; + return containingNodeKind === 210 /* BindingElement */; case 22 /* OpenBracketToken */: - return containingNodeKind === 207 /* ArrayBindingPattern */; + return containingNodeKind === 209 /* ArrayBindingPattern */; case 20 /* OpenParenToken */: - return containingNodeKind === 301 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); + return containingNodeKind === 304 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); case 18 /* OpenBraceToken */: - return containingNodeKind === 269 /* EnumDeclaration */; + return containingNodeKind === 272 /* EnumDeclaration */; case 29 /* LessThanToken */: - return containingNodeKind === 264 /* ClassDeclaration */ || containingNodeKind === 232 /* ClassExpression */ || containingNodeKind === 267 /* InterfaceDeclaration */ || containingNodeKind === 268 /* TypeAliasDeclaration */ || isFunctionLikeKind(containingNodeKind); + return containingNodeKind === 266 /* ClassDeclaration */ || containingNodeKind === 234 /* ClassExpression */ || containingNodeKind === 270 /* InterfaceDeclaration */ || containingNodeKind === 271 /* TypeAliasDeclaration */ || isFunctionLikeKind(containingNodeKind); case 125 /* StaticKeyword */: - return containingNodeKind === 171 /* PropertyDeclaration */ && !isClassLike(parent2.parent); + return containingNodeKind === 172 /* PropertyDeclaration */ && !isClassLike(parent2.parent); case 25 /* DotDotDotToken */: - return containingNodeKind === 168 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 207 /* ArrayBindingPattern */; + return containingNodeKind === 169 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 209 /* ArrayBindingPattern */; case 124 /* PublicKeyword */: case 122 /* PrivateKeyword */: case 123 /* ProtectedKeyword */: - return containingNodeKind === 168 /* Parameter */ && !isConstructorDeclaration(parent2.parent); + return containingNodeKind === 169 /* Parameter */ && !isConstructorDeclaration(parent2.parent); case 129 /* AsKeyword */: - return containingNodeKind === 279 /* ImportSpecifier */ || containingNodeKind === 284 /* ExportSpecifier */ || containingNodeKind === 277 /* NamespaceImport */; + return containingNodeKind === 282 /* ImportSpecifier */ || containingNodeKind === 287 /* ExportSpecifier */ || containingNodeKind === 280 /* NamespaceImport */; case 138 /* GetKeyword */: case 152 /* SetKeyword */: return !isFromObjectTypeDeclaration(contextToken2); case 79 /* Identifier */: - if (containingNodeKind === 279 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { + if (containingNodeKind === 282 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { return false; } break; @@ -140363,7 +140624,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, case 139 /* InferKeyword */: return true; case 155 /* TypeKeyword */: - return containingNodeKind !== 279 /* ImportSpecifier */; + return containingNodeKind !== 282 /* ImportSpecifier */; case 41 /* AsteriskToken */: return isFunctionLike(contextToken2.parent) && !isMethodDeclaration(contextToken2.parent); } @@ -140398,7 +140659,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (ancestorClassLike && contextToken2 === previousToken && isPreviousPropertyDeclarationTerminated(contextToken2, position)) { return false; } - const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 171 /* PropertyDeclaration */); + const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 172 /* PropertyDeclaration */); if (ancestorPropertyDeclaraion && contextToken2 !== previousToken && isClassLike(previousToken.parent.parent) && position <= previousToken.end) { if (isPreviousPropertyDeclarationTerminated(contextToken2, previousToken.end)) { return false; @@ -140412,7 +140673,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return contextToken2.kind !== 63 /* EqualsToken */ && (contextToken2.kind === 26 /* SemicolonToken */ || !positionsAreOnSameLine(contextToken2.end, position2, sourceFile)); } function isFunctionLikeButNotConstructor(kind) { - return isFunctionLikeKind(kind) && kind !== 176 /* Constructor */; + return isFunctionLikeKind(kind) && kind !== 178 /* Constructor */; } function isDotOfNumericLiteral(contextToken2) { if (contextToken2.kind === 8 /* NumericLiteral */) { @@ -140422,7 +140683,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return false; } function isVariableDeclarationListButNotTypeArgument(node2) { - return node2.parent.kind === 262 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker3); + return node2.parent.kind === 264 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker3); } function filterObjectMembersList(contextualMemberSymbols, existingMembers) { if (existingMembers.length === 0) { @@ -140431,7 +140692,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const membersDeclaredBySpreadAssignment = new Set2(); const existingMemberNames = new Set2(); for (const m of existingMembers) { - if (m.kind !== 305 /* PropertyAssignment */ && m.kind !== 306 /* ShorthandPropertyAssignment */ && m.kind !== 208 /* BindingElement */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */ && m.kind !== 307 /* SpreadAssignment */) { + if (m.kind !== 308 /* PropertyAssignment */ && m.kind !== 309 /* ShorthandPropertyAssignment */ && m.kind !== 210 /* BindingElement */ && m.kind !== 176 /* MethodDeclaration */ && m.kind !== 179 /* GetAccessor */ && m.kind !== 180 /* SetAccessor */ && m.kind !== 310 /* SpreadAssignment */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -140510,7 +140771,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, function filterClassMembersList(baseSymbols, existingMembers, currentClassElementModifierFlags) { const existingMemberNames = new Set2(); for (const m of existingMembers) { - if (m.kind !== 171 /* PropertyDeclaration */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */) { + if (m.kind !== 172 /* PropertyDeclaration */ && m.kind !== 176 /* MethodDeclaration */ && m.kind !== 179 /* GetAccessor */ && m.kind !== 180 /* SetAccessor */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -140536,7 +140797,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (isCurrentlyEditingNode(attr)) { continue; } - if (attr.kind === 294 /* JsxAttribute */) { + if (attr.kind === 297 /* JsxAttribute */) { seenNames.add(attr.name.escapedText); } else if (isJsxSpreadAttribute(attr)) { setMembersDeclaredBySpreadAssignment(attr, membersDeclaredBySpreadAssignment); @@ -140616,7 +140877,7 @@ function getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind, js var _keywordCompletions = []; var allKeywordsCompletions = memoize(() => { const res = []; - for (let i = 81 /* FirstKeyword */; i <= 164 /* LastKeyword */; i++) { + for (let i = 81 /* FirstKeyword */; i <= 165 /* LastKeyword */; i++) { res.push({ name: tokenToString(i), kind: "keyword" /* keyword */, @@ -140762,7 +141023,7 @@ function getPropertiesForCompletion(type, checker) { } function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location2, position) { switch (location2.kind) { - case 357 /* SyntaxList */: + case 360 /* SyntaxList */: return tryCast(location2.parent, isObjectTypeDeclaration); case 1 /* EndOfFileToken */: const cls = tryCast(lastOrUndefined(cast(location2.parent, isSourceFile).statements), isObjectTypeDeclaration); @@ -140821,7 +141082,7 @@ function tryGetTypeLiteralNode(node) { case 26 /* SemicolonToken */: case 27 /* CommaToken */: case 79 /* Identifier */: - if (parent2.kind === 170 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { + if (parent2.kind === 171 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { return parent2.parent; } break; @@ -140838,11 +141099,11 @@ function getConstraintOfTypeArgumentProperty(node, checker) { if (!t) return void 0; switch (node.kind) { - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return checker.getTypeOfPropertyOfContextualType(t, node.symbol.escapedName); - case 193 /* IntersectionType */: - case 187 /* TypeLiteral */: - case 192 /* UnionType */: + case 195 /* IntersectionType */: + case 189 /* TypeLiteral */: + case 194 /* UnionType */: return t; } } @@ -140865,7 +141126,7 @@ function isValidTrigger(sourceFile, triggerCharacter, contextToken, position) { case "/": return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 43 /* SlashToken */ && isJsxClosingElement(contextToken.parent)); case " ": - return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 314 /* SourceFile */; + return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 317 /* SourceFile */; default: return Debug.assertNever(triggerCharacter); } @@ -140961,8 +141222,8 @@ function getSingleLineReplacementSpanForImportCompletionNode(node) { if (rangeIsOnSingleLine(top, sourceFile)) { return createTextSpanFromNode(top, sourceFile); } - Debug.assert(top.kind !== 101 /* ImportKeyword */ && top.kind !== 279 /* ImportSpecifier */); - const potentialSplitPoint = top.kind === 275 /* 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 !== 282 /* ImportSpecifier */); + const potentialSplitPoint = top.kind === 278 /* 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 @@ -141205,26 +141466,26 @@ var StringLiteralCompletionKind = /* @__PURE__ */ ((StringLiteralCompletionKind2 function getStringLiteralCompletionEntries(sourceFile, node, position, typeChecker3, compilerOptions, host, preferences) { const parent2 = walkUpParentheses(node.parent); switch (parent2.kind) { - case 201 /* LiteralType */: { + case 203 /* LiteralType */: { const grandParent = walkUpParentheses(parent2.parent); switch (grandParent.kind) { - case 234 /* ExpressionWithTypeArguments */: - case 183 /* TypeReference */: { + case 236 /* ExpressionWithTypeArguments */: + case 185 /* TypeReference */: { const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent); if (typeArgument) { return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker3.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false }; } return void 0; } - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: const { indexType, objectType } = grandParent; if (!rangeContainsPosition(indexType, position)) { return void 0; } return stringLiteralCompletionsFromProperties(typeChecker3.getTypeFromTypeNode(objectType)); - case 205 /* ImportType */: + case 207 /* ImportType */: return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker3, preferences) }; - case 192 /* UnionType */: { + case 194 /* UnionType */: { if (!isTypeReferenceNode(grandParent.parent)) { return void 0; } @@ -141236,28 +141497,28 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, typeCheck return void 0; } } - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (isObjectLiteralExpression(parent2.parent) && parent2.name === node) { return stringLiteralCompletionsForObjectLiteral(typeChecker3, parent2.parent); } return fromContextualType(); - case 212 /* ElementAccessExpression */: { + case 214 /* ElementAccessExpression */: { const { expression, argumentExpression } = parent2; if (node === skipParentheses(argumentExpression)) { return stringLiteralCompletionsFromProperties(typeChecker3.getTypeAtLocation(expression)); } return void 0; } - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 294 /* JsxAttribute */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 297 /* JsxAttribute */: if (!isRequireCallArgument(node) && !isImportCall(parent2)) { - const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 294 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); + const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 297 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker3) || fromContextualType(); } - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: - case 286 /* ExternalModuleReference */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 289 /* ExternalModuleReference */: return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker3, preferences) }; default: return fromContextualType(); @@ -141268,9 +141529,9 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, typeCheck } function walkUpParentheses(node) { switch (node.kind) { - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return walkUpParenthesizedTypes(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return walkUpParenthesizedExpressions(node); default: return node; @@ -141848,14 +142109,14 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { if (cancellationToken) cancellationToken.throwIfCancellationRequested(); switch (direct.kind) { - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (isImportCall(direct)) { handleImportCall(direct); break; } if (!isAvailableThroughGlobal) { const parent2 = direct.parent; - if (exportKind === 2 /* ExportEquals */ && parent2.kind === 261 /* VariableDeclaration */) { + if (exportKind === 2 /* ExportEquals */ && parent2.kind === 263 /* VariableDeclaration */) { const { name } = parent2; if (name.kind === 79 /* Identifier */) { directImports.push(name); @@ -141866,28 +142127,28 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { break; case 79 /* Identifier */: break; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: handleNamespaceImport(direct, direct.name, hasSyntacticModifier(direct, 1 /* Export */), false); break; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: directImports.push(direct); const namedBindings = direct.importClause && direct.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 277 /* NamespaceImport */) { + if (namedBindings && namedBindings.kind === 280 /* NamespaceImport */) { handleNamespaceImport(direct, namedBindings.name, false, true); } else if (!isAvailableThroughGlobal && isDefaultImport(direct)) { addIndirectUser(getSourceFileLikeForImportDeclaration(direct)); } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: if (!direct.exportClause) { handleDirectImports(getContainingModuleSymbol(direct, checker)); - } else if (direct.exportClause.kind === 283 /* NamespaceExport */) { + } else if (direct.exportClause.kind === 286 /* NamespaceExport */) { addIndirectUser(getSourceFileLikeForImportDeclaration(direct), true); } else { directImports.push(direct); } break; - case 205 /* ImportType */: + case 207 /* ImportType */: if (!isAvailableThroughGlobal && direct.isTypeOf && !direct.qualifier && isExported2(direct)) { addIndirectUser(direct.getSourceFile(), true); } @@ -141916,7 +142177,7 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { directImports.push(importDeclaration); } else if (!isAvailableThroughGlobal) { const sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration); - Debug.assert(sourceFileLike.kind === 314 /* SourceFile */ || sourceFileLike.kind === 270 /* ModuleDeclaration */); + Debug.assert(sourceFileLike.kind === 317 /* SourceFile */ || sourceFileLike.kind === 273 /* ModuleDeclaration */); if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) { addIndirectUser(sourceFileLike, true); } else { @@ -141962,7 +142223,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c } return { importSearches, singleReferences }; function handleImport(decl) { - if (decl.kind === 274 /* ImportEqualsDeclaration */) { + if (decl.kind === 277 /* ImportEqualsDeclaration */) { if (isExternalModuleImportEquals(decl)) { handleNamespaceImportLike(decl.name); } @@ -141972,7 +142233,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c handleNamespaceImportLike(decl); return; } - if (decl.kind === 205 /* ImportType */) { + if (decl.kind === 207 /* ImportType */) { if (decl.qualifier) { const firstIdentifier = getFirstIdentifier(decl.qualifier); if (firstIdentifier.escapedText === symbolName(exportSymbol)) { @@ -141986,7 +142247,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c if (decl.moduleSpecifier.kind !== 10 /* StringLiteral */) { return; } - if (decl.kind === 281 /* ExportDeclaration */) { + if (decl.kind === 284 /* ExportDeclaration */) { if (decl.exportClause && isNamedExports(decl.exportClause)) { searchForNamedImport(decl.exportClause); } @@ -141995,10 +142256,10 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c const { name, namedBindings } = decl.importClause || { name: void 0, namedBindings: void 0 }; if (namedBindings) { switch (namedBindings.kind) { - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: handleNamespaceImportLike(namedBindings.name); break; - case 278 /* NamedImports */: + case 281 /* NamedImports */: if (exportKind === 0 /* Named */ || exportKind === 1 /* Default */) { searchForNamedImport(namedBindings); } @@ -142032,7 +142293,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c addSearch(name, checker.getSymbolAtLocation(name)); } } else { - const localSymbol = element.kind === 284 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); + const localSymbol = element.kind === 287 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); addSearch(name, localSymbol); } } @@ -142055,7 +142316,7 @@ function findModuleReferences(program, sourceFiles, searchModuleSymbol) { const checker = program.getTypeChecker(); for (const referencingFile of sourceFiles) { const searchSourceFile = searchModuleSymbol.valueDeclaration; - if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 314 /* SourceFile */) { + if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 317 /* SourceFile */) { for (const ref of referencingFile.referencedFiles) { if (program.getSourceFileFromReference(referencingFile, ref) === searchSourceFile) { refs.push({ kind: "reference", referencingFile, ref }); @@ -142097,7 +142358,7 @@ function getDirectImportsMap(sourceFiles, checker, cancellationToken) { return map2; } function forEachPossibleImportOrExportStatement(sourceFileLike, action) { - return forEach(sourceFileLike.kind === 314 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action)); + return forEach(sourceFileLike.kind === 317 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action)); } function forEachImport(sourceFile, action) { if (sourceFile.externalModuleIndicator || sourceFile.imports !== void 0) { @@ -142107,15 +142368,15 @@ function forEachImport(sourceFile, action) { } else { forEachPossibleImportOrExportStatement(sourceFile, (statement) => { switch (statement.kind) { - case 281 /* ExportDeclaration */: - case 275 /* ImportDeclaration */: { + case 284 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: { const decl = statement; if (decl.moduleSpecifier && isStringLiteral(decl.moduleSpecifier)) { action(decl, decl.moduleSpecifier); } break; } - case 274 /* ImportEqualsDeclaration */: { + case 277 /* ImportEqualsDeclaration */: { const decl = statement; if (isExternalModuleImportEquals(decl)) { action(decl, decl.moduleReference.expression); @@ -142133,7 +142394,7 @@ function getImportOrExportSymbol(node, symbol, checker, comingFromExport) { const { parent: parent2 } = node; const grandparent = parent2.parent; if (symbol.exportSymbol) { - if (parent2.kind === 211 /* PropertyAccessExpression */) { + if (parent2.kind === 213 /* PropertyAccessExpression */) { return ((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d === parent2)) && isBinaryExpression(grandparent) ? getSpecialPropertyExport(grandparent, false) : void 0; } else { return exportInfo(symbol.exportSymbol, getExportKindForDeclaration(parent2)); @@ -142237,15 +142498,15 @@ function getExportNode(parent2, node) { function isNodeImport(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return parent2.name === node && isExternalModuleImportEquals(parent2); - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return !parent2.propertyName; - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: Debug.assert(parent2.name === node); return true; - case 208 /* BindingElement */: + case 210 /* BindingElement */: return isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(parent2.parent.parent); default: return false; @@ -142276,21 +142537,21 @@ function getContainingModuleSymbol(importer, checker) { return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol); } function getSourceFileLikeForImportDeclaration(node) { - if (node.kind === 213 /* CallExpression */) { + if (node.kind === 215 /* CallExpression */) { return node.getSourceFile(); } const { parent: parent2 } = node; - if (parent2.kind === 314 /* SourceFile */) { + if (parent2.kind === 317 /* SourceFile */) { return parent2; } - Debug.assert(parent2.kind === 271 /* ModuleBlock */); + Debug.assert(parent2.kind === 274 /* ModuleBlock */); return cast(parent2.parent, isAmbientModuleDeclaration); } function isAmbientModuleDeclaration(node) { - return node.kind === 270 /* ModuleDeclaration */ && node.name.kind === 10 /* StringLiteral */; + return node.kind === 273 /* ModuleDeclaration */ && node.name.kind === 10 /* StringLiteral */; } function isExternalModuleImportEquals(eq) { - return eq.moduleReference.kind === 286 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 10 /* StringLiteral */; + return eq.moduleReference.kind === 289 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 10 /* StringLiteral */; } // src/services/findAllReferences.ts @@ -142360,28 +142621,28 @@ function getContextNode(node) { if (!node) return void 0; switch (node.kind) { - case 261 /* VariableDeclaration */: + case 263 /* 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 208 /* BindingElement */: + case 210 /* BindingElement */: return getContextNode(node.parent.parent); - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return node.parent.parent.parent; - case 284 /* ExportSpecifier */: - case 277 /* NamespaceImport */: + case 287 /* ExportSpecifier */: + case 280 /* NamespaceImport */: return node.parent.parent; - case 276 /* ImportClause */: - case 283 /* NamespaceExport */: + case 279 /* ImportClause */: + case 286 /* NamespaceExport */: return node.parent; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isExpressionStatement(node.parent) ? node.parent : node; - case 251 /* ForOfStatement */: - case 250 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 252 /* ForInStatement */: return { start: node.initializer, end: node.expression }; - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent) ? getContextNode( findAncestor( node.parent, @@ -142423,7 +142684,7 @@ function getImplementationsAtPosition(program, cancellationToken, sourceFiles, s const node = getTouchingPropertyName(sourceFile, position); let referenceEntries; const entries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position); - if (node.parent.kind === 211 /* PropertyAccessExpression */ || node.parent.kind === 208 /* BindingElement */ || node.parent.kind === 212 /* ElementAccessExpression */ || node.kind === 107 /* SuperKeyword */) { + if (node.parent.kind === 213 /* PropertyAccessExpression */ || node.parent.kind === 210 /* BindingElement */ || node.parent.kind === 214 /* ElementAccessExpression */ || node.kind === 107 /* SuperKeyword */) { referenceEntries = entries && [...entries]; } else if (entries) { const queue = createQueue(entries); @@ -142444,11 +142705,11 @@ function getImplementationsAtPosition(program, cancellationToken, sourceFiles, s return map(referenceEntries, (entry) => toImplementationLocation(entry, checker)); } function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { return void 0; } const checker = program.getTypeChecker(); - if (node.parent.kind === 306 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 309 /* ShorthandPropertyAssignment */) { const result = []; Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, (node2) => result.push(nodeEntry(node2))); return result; @@ -142639,12 +142900,12 @@ function implementationKindDisplayParts(node, checker) { const symbol = checker.getSymbolAtLocation(isDeclaration(node) && node.name ? node.name : node); if (symbol) { return getDefinitionKindAndDisplayParts(symbol, checker, node); - } else if (node.kind === 210 /* ObjectLiteralExpression */) { + } else if (node.kind === 212 /* ObjectLiteralExpression */) { return { kind: "interface" /* interfaceElement */, displayParts: [punctuationPart(20 /* OpenParenToken */), textPart("object literal"), punctuationPart(21 /* CloseParenToken */)] }; - } else if (node.kind === 232 /* ClassExpression */) { + } else if (node.kind === 234 /* ClassExpression */) { return { kind: "local class" /* localClassElement */, displayParts: [punctuationPart(20 /* OpenParenToken */), textPart("anonymous local class"), punctuationPart(21 /* CloseParenToken */)] @@ -142702,47 +142963,47 @@ function declarationIsWriteAccess(decl) { if (!!(decl.flags & 16777216 /* Ambient */)) return true; switch (decl.kind) { - case 227 /* BinaryExpression */: - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 229 /* BinaryExpression */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: case 89 /* DefaultKeyword */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: - case 284 /* ExportSpecifier */: - case 276 /* ImportClause */: - case 274 /* ImportEqualsDeclaration */: - case 279 /* ImportSpecifier */: - case 267 /* InterfaceDeclaration */: - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: - case 294 /* JsxAttribute */: - case 270 /* ModuleDeclaration */: - case 273 /* NamespaceExportDeclaration */: - case 277 /* NamespaceImport */: - case 283 /* NamespaceExport */: - case 168 /* Parameter */: - case 306 /* ShorthandPropertyAssignment */: - case 268 /* TypeAliasDeclaration */: - case 167 /* TypeParameter */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: + case 287 /* ExportSpecifier */: + case 279 /* ImportClause */: + case 277 /* ImportEqualsDeclaration */: + case 282 /* ImportSpecifier */: + case 270 /* InterfaceDeclaration */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: + case 297 /* JsxAttribute */: + case 273 /* ModuleDeclaration */: + case 276 /* NamespaceExportDeclaration */: + case 280 /* NamespaceImport */: + case 286 /* NamespaceExport */: + case 169 /* Parameter */: + case 309 /* ShorthandPropertyAssignment */: + case 271 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: return true; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return !isArrayLiteralOrObjectLiteralDestructuringPattern(decl.parent); - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return !!decl.body; - case 261 /* VariableDeclaration */: - case 171 /* PropertyDeclaration */: + case 263 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: return !!decl.initializer || isCatchClause(decl.parent); - case 173 /* MethodSignature */: - case 170 /* PropertySignature */: - case 356 /* JSDocPropertyTag */: - case 349 /* JSDocParameterTag */: + case 175 /* MethodSignature */: + case 171 /* PropertySignature */: + case 359 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: return false; default: return Debug.failBadSyntaxKind(decl); @@ -142931,9 +143192,9 @@ var Core; if (symbol.declarations) { for (const decl of symbol.declarations) { switch (decl.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: if (sourceFilesSet.has(decl.getSourceFile().fileName)) { references.push(nodeEntry(decl.name)); } @@ -143023,7 +143284,7 @@ var Core; } function getSpecialSearchKind(node) { switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: case 136 /* ConstructorKeyword */: return SpecialSearchKind.Constructor; case 79 /* Identifier */: @@ -143199,7 +143460,7 @@ var Core; } function getSymbolScope(symbol) { const { declarations, flags, parent: parent2, valueDeclaration } = symbol; - if (valueDeclaration && (valueDeclaration.kind === 218 /* FunctionExpression */ || valueDeclaration.kind === 232 /* ClassExpression */)) { + if (valueDeclaration && (valueDeclaration.kind === 220 /* FunctionExpression */ || valueDeclaration.kind === 234 /* ClassExpression */)) { return valueDeclaration; } if (!declarations) { @@ -143208,7 +143469,7 @@ var Core; if (flags & (4 /* Property */ | 8192 /* Method */)) { const privateDeclaration = find(declarations, (d) => hasEffectiveModifier(d, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(d)); if (privateDeclaration) { - return getAncestor(privateDeclaration, 264 /* ClassDeclaration */); + return getAncestor(privateDeclaration, 266 /* ClassDeclaration */); } return void 0; } @@ -143225,7 +143486,7 @@ var Core; if (scope && scope !== container) { return void 0; } - if (!container || container.kind === 314 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { + if (!container || container.kind === 317 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { return void 0; } scope = container; @@ -143432,7 +143693,7 @@ var Core; default: Debug.assertNever(state.specialSearchKind); } - if (isInJSFile(referenceLocation) && referenceLocation.parent.kind === 208 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(referenceLocation.parent.parent.parent)) { + if (isInJSFile(referenceLocation) && referenceLocation.parent.kind === 210 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(referenceLocation.parent.parent.parent)) { referenceSymbol = referenceLocation.parent.symbol; if (!referenceSymbol) return; @@ -143569,14 +143830,14 @@ var Core; if (constructorSymbol && constructorSymbol.declarations) { for (const decl of constructorSymbol.declarations) { const ctrKeyword = findChildOfKind(decl, 136 /* ConstructorKeyword */, sourceFile); - Debug.assert(decl.kind === 176 /* Constructor */ && !!ctrKeyword); + Debug.assert(decl.kind === 178 /* Constructor */ && !!ctrKeyword); addNode(ctrKeyword); } } if (classSymbol.exports) { classSymbol.exports.forEach((member) => { const decl = member.valueDeclaration; - if (decl && decl.kind === 174 /* MethodDeclaration */) { + if (decl && decl.kind === 176 /* MethodDeclaration */) { const body = decl.body; if (body) { forEachDescendantOfKind(body, 109 /* ThisKeyword */, (thisKeyword) => { @@ -143598,7 +143859,7 @@ var Core; return; } for (const decl of constructor.declarations) { - Debug.assert(decl.kind === 176 /* Constructor */); + Debug.assert(decl.kind === 178 /* Constructor */); const body = decl.body; if (body) { forEachDescendantOfKind(body, 107 /* SuperKeyword */, (node) => { @@ -143627,7 +143888,7 @@ var Core; if (refNode.kind !== 79 /* Identifier */) { return; } - if (refNode.parent.kind === 306 /* ShorthandPropertyAssignment */) { + if (refNode.parent.kind === 309 /* ShorthandPropertyAssignment */) { getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference2); } const containingClass = getContainingClassIfInHeritageClause(refNode); @@ -143642,7 +143903,7 @@ var Core; addIfImplementation(typeHavingNode.initializer); } else if (isFunctionLike(typeHavingNode) && typeHavingNode.body) { const body = typeHavingNode.body; - if (body.kind === 242 /* Block */) { + if (body.kind === 244 /* Block */) { forEachReturnStatement(body, (returnStatement) => { if (returnStatement.expression) addIfImplementation(returnStatement.expression); @@ -143664,13 +143925,13 @@ var Core; } function isImplementationExpression(node) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return isImplementationExpression(node.expression); - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 210 /* ObjectLiteralExpression */: - case 232 /* ClassExpression */: - case 209 /* ArrayLiteralExpression */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 212 /* ObjectLiteralExpression */: + case 234 /* ClassExpression */: + case 211 /* ArrayLiteralExpression */: return true; default: return false; @@ -143700,13 +143961,13 @@ var Core; } let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; @@ -143724,38 +143985,38 @@ var Core; return [{ definition: { type: 0 /* Symbol */, symbol: searchSpaceNode.symbol }, references }]; } function isParameterName(node) { - return node.kind === 79 /* Identifier */ && node.parent.kind === 168 /* Parameter */ && node.parent.name === node; + return node.kind === 79 /* Identifier */ && node.parent.kind === 169 /* Parameter */ && node.parent.name === node; } function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) { let searchSpaceNode = getThisContainer(thisOrSuperKeyword, false); let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: if (isObjectLiteralMethod(searchSpaceNode)) { staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; } - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (isExternalModule(searchSpaceNode) || isParameterName(thisOrSuperKeyword)) { return void 0; } - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: break; default: return void 0; } - const references = flatMap(searchSpaceNode.kind === 314 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { + const references = flatMap(searchSpaceNode.kind === 317 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { cancellationToken.throwIfCancellationRequested(); return getPossibleSymbolReferenceNodes(sourceFile, "this", isSourceFile(searchSpaceNode) ? sourceFile : searchSpaceNode).filter((node) => { if (!isThis(node)) { @@ -143763,19 +144024,19 @@ var Core; } const container = getThisContainer(node, false); switch (searchSpaceNode.kind) { - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: return searchSpaceNode.symbol === container.symbol; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol; - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 265 /* StructDeclaration */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 212 /* ObjectLiteralExpression */: + case 267 /* StructDeclaration */: return container.parent && searchSpaceNode.symbol === container.parent.symbol && isStatic(container) === !!staticFlag; - case 314 /* SourceFile */: - return container.kind === 314 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); + case 317 /* SourceFile */: + return container.kind === 317 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); } }); }).map((n) => nodeEntry(n)); @@ -143863,7 +144124,7 @@ var Core; 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, 284 /* ExportSpecifier */); + const exportSpecifier = getDeclarationOfKind(symbol, 287 /* ExportSpecifier */); if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) { const localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); if (localSymbol) { @@ -143891,7 +144152,7 @@ var Core; return firstDefined(checker.getRootSymbols(sym), (rootSymbol) => cbSymbol(sym, rootSymbol, void 0, kind) || (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, 208 /* BindingElement */); + const bindingElement = getDeclarationOfKind(symbol2, 210 /* BindingElement */); if (bindingElement && isObjectBindingElementWithoutPropertyName(bindingElement)) { return getPropertySymbolFromBindingElement(checker2, bindingElement); } @@ -144069,9 +144330,9 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles } if (searchOtherFilesOnly && every(symbol.declarations, (d) => d.getSourceFile().fileName === sourceFile.fileName)) return void 0; - if (parent2.kind === 213 /* CallExpression */ || parent2.kind === 220 /* EtsComponentExpression */ && isCalledStructDeclaration(symbol.getDeclarations())) { + if (parent2.kind === 215 /* CallExpression */ || parent2.kind === 222 /* EtsComponentExpression */ && isCalledStructDeclaration(symbol.getDeclarations())) { const declarations = symbol.getDeclarations(); - if ((declarations == null ? void 0 : declarations.length) && declarations[0].kind === 265 /* StructDeclaration */) { + if ((declarations == null ? void 0 : declarations.length) && declarations[0].kind === 267 /* StructDeclaration */) { return getDefinitionFromSymbol(typeChecker3, symbol, node); } } @@ -144091,7 +144352,7 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles return node.kind === 107 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo]; } } - if (node.parent.kind === 306 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 309 /* ShorthandPropertyAssignment */) { const shorthandSymbol = typeChecker3.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); const definitions = (shorthandSymbol == null ? void 0 : shorthandSymbol.declarations) ? shorthandSymbol.declarations.map((decl) => createDefinitionInfo(decl, typeChecker3, shorthandSymbol, node, false, failedAliasResolution)) : emptyArray; return concatenate(definitions, getDefinitionFromObjectLiteralElement(typeChecker3, node) || emptyArray); @@ -144239,7 +144500,7 @@ function shouldSkipAlias(node, declaration) { if (node.parent === declaration) { return true; } - if (declaration.kind === 277 /* NamespaceImport */) { + if (declaration.kind === 280 /* NamespaceImport */) { return false; } return true; @@ -144317,19 +144578,19 @@ function isDefinitionVisible(checker, declaration) { if (hasInitializer(declaration.parent) && declaration.parent.initializer === declaration) return isDefinitionVisible(checker, declaration.parent); switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: if (hasEffectiveModifier(declaration, 8 /* Private */)) return false; - case 176 /* Constructor */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 210 /* ObjectLiteralExpression */: - case 232 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: + case 178 /* Constructor */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 212 /* ObjectLiteralExpression */: + case 234 /* ClassExpression */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: return isDefinitionVisible(checker, declaration.parent); default: return false; @@ -144364,9 +144625,9 @@ function tryGetSignatureDeclaration(typeChecker3, node) { } function isConstructorLike(node) { switch (node.kind) { - case 176 /* Constructor */: - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 178 /* Constructor */: + case 187 /* ConstructorType */: + case 182 /* ConstructSignature */: return true; default: return false; @@ -144403,14 +144664,14 @@ function provideInlayHints(context) { return; } switch (node.kind) { - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 219 /* ArrowFunction */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 221 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!textSpanIntersectsWith(span, node.pos, node.getFullWidth())) { @@ -144550,7 +144811,7 @@ function provideInlayHints(context) { } function isHintableLiteral(node) { switch (node.kind) { - case 225 /* PrefixUnaryExpression */: { + case 227 /* PrefixUnaryExpression */: { const operand = node.operand; return isLiteralExpression(operand) || isIdentifier(operand) && isInfinityOrNaNString(operand.escapedText); } @@ -144558,7 +144819,7 @@ function provideInlayHints(context) { case 96 /* FalseKeyword */: case 105 /* NullKeyword */: case 14 /* NoSubstitutionTemplateLiteral */: - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: return true; case 79 /* Identifier */: { const name = node.escapedText; @@ -144758,8 +145019,8 @@ function getJsDocCommentsFromDeclarations(declarations, checker) { const parts = []; forEachUnique(declarations, (declaration) => { for (const jsdoc of getCommentHavingNodes(declaration)) { - const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 336 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); - if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 354 /* JSDocTypedefTag */ && declaration.kind !== 347 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 354 /* JSDocTypedefTag */ || t.kind === 347 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 349 /* JSDocParameterTag */ || t.kind === 350 /* JSDocReturnTag */)) { + const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 339 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); + if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 357 /* JSDocTypedefTag */ && declaration.kind !== 350 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 357 /* JSDocTypedefTag */ || t.kind === 350 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 352 /* JSDocParameterTag */ || t.kind === 353 /* JSDocReturnTag */)) { continue; } let newparts = jsdoc.comment ? getDisplayPartsFromComment(jsdoc.comment, checker) : []; @@ -144778,11 +145039,11 @@ function isIdenticalListOfDisplayParts(parts1, parts2) { } function getCommentHavingNodes(declaration) { switch (declaration.kind) { - case 349 /* JSDocParameterTag */: - case 356 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: + case 359 /* JSDocPropertyTag */: return [declaration]; - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: return [declaration, declaration.parent]; default: return getJSDocCommentsAndTags(declaration); @@ -144792,7 +145053,7 @@ function getJsDocTagsFromDeclarations(declarations, checker) { const infos = []; forEachUnique(declarations, (declaration) => { const tags = getJSDocTags(declaration); - if (tags.some((t) => t.kind === 354 /* JSDocTypedefTag */ || t.kind === 347 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 349 /* JSDocParameterTag */ || t.kind === 350 /* JSDocReturnTag */)) { + if (tags.some((t) => t.kind === 357 /* JSDocTypedefTag */ || t.kind === 350 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 352 /* JSDocParameterTag */ || t.kind === 353 /* JSDocReturnTag */)) { return; } for (const tag of tags) { @@ -144807,18 +145068,18 @@ function getDisplayPartsFromComment(comment, checker) { } return flatMap( comment, - (node) => node.kind === 330 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) + (node) => node.kind === 333 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) ); } function getCommentDisplayParts(tag, checker) { const { comment, kind } = tag; const namePart = getTagNameDisplayPart(kind); switch (kind) { - case 338 /* JSDocImplementsTag */: + case 341 /* JSDocImplementsTag */: return withNode(tag.class); - case 337 /* JSDocAugmentsTag */: + case 340 /* JSDocAugmentsTag */: return withNode(tag.class); - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: const templateTag = tag; const displayParts = []; if (templateTag.constraint) { @@ -144840,13 +145101,13 @@ function getCommentDisplayParts(tag, checker) { displayParts.push(...[spacePart(), ...getDisplayPartsFromComment(comment, checker)]); } return displayParts; - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: return withNode(tag.typeExpression); - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 356 /* JSDocPropertyTag */: - case 349 /* JSDocParameterTag */: - case 355 /* JSDocSeeTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 359 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: + case 358 /* JSDocSeeTag */: const { name } = tag; return name ? withNode(name) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); default: @@ -144869,14 +145130,14 @@ function getCommentDisplayParts(tag, checker) { } function getTagNameDisplayPart(kind) { switch (kind) { - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: return parameterNamePart; - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: return propertyNamePart; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return typeParameterNamePart; - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: return typeAliasNamePart; default: return textPart; @@ -145001,47 +145262,47 @@ function getCommentOwnerInfo(tokenAtPos, options) { } function getCommentOwnerInfoWorker(commentOwner, options) { switch (commentOwner.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 173 /* MethodSignature */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 175 /* MethodSignature */: + case 221 /* ArrowFunction */: const host = commentOwner; return { commentOwner, parameters: host.parameters, hasReturn: hasReturn(host, options) }; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return getCommentOwnerInfoWorker(commentOwner.initializer, options); - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: - case 268 /* TypeAliasDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: + case 271 /* TypeAliasDeclaration */: return { commentOwner }; - case 170 /* PropertySignature */: { + case 171 /* PropertySignature */: { const host2 = commentOwner; return host2.type && isFunctionTypeNode(host2.type) ? { commentOwner, parameters: host2.type.parameters, hasReturn: hasReturn(host2.type, options) } : { commentOwner }; } - case 244 /* VariableStatement */: { + case 246 /* 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 314 /* SourceFile */: + case 317 /* SourceFile */: return "quit"; - case 270 /* ModuleDeclaration */: - return commentOwner.parent.kind === 270 /* ModuleDeclaration */ ? void 0 : { commentOwner }; - case 245 /* ExpressionStatement */: + case 273 /* ModuleDeclaration */: + return commentOwner.parent.kind === 273 /* ModuleDeclaration */ ? void 0 : { commentOwner }; + case 247 /* ExpressionStatement */: return getCommentOwnerInfoWorker(commentOwner.expression, options); - case 227 /* BinaryExpression */: { + case 229 /* 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 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: const init = commentOwner.initializer; if (init && (isFunctionExpression(init) || isArrowFunction(init))) { return { commentOwner, parameters: init.parameters, hasReturn: hasReturn(init, options) }; @@ -145052,14 +145313,14 @@ function hasReturn(node, options) { 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 === 217 /* ParenthesizedExpression */) { + while (rightHandSide.kind === 219 /* ParenthesizedExpression */) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return rightHandSide; - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return find(rightHandSide.members, isConstructorDeclaration); } } @@ -145383,11 +145644,11 @@ function compareIdentifiers(s1, s2) { function getModuleSpecifierExpression(declaration) { var _a2; switch (declaration.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return (_a2 = tryCast(declaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a2.expression; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return declaration.moduleSpecifier; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return declaration.declarationList.declarations[0].initializer.arguments[0]; } } @@ -145414,19 +145675,19 @@ function compareImportKind(s1, s2) { function getImportKindOrder(s1) { var _a2; switch (s1.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: if (!s1.importClause) return 0; if (s1.importClause.isTypeOnly) return 1; - if (((_a2 = s1.importClause.namedBindings) == null ? void 0 : _a2.kind) === 277 /* NamespaceImport */) + if (((_a2 = s1.importClause.namedBindings) == null ? void 0 : _a2.kind) === 280 /* NamespaceImport */) return 2; if (s1.importClause.name) return 3; return 4; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return 5; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return 6; } } @@ -145600,21 +145861,21 @@ function createOutliningSpanFromBounds(pos, end, kind) { } function getOutliningSpanForNode(n, sourceFile) { switch (n.kind) { - case 242 /* Block */: + case 244 /* Block */: if (isFunctionLike(n.parent)) { return functionSpan(n.parent, n, sourceFile); } switch (n.parent.kind) { - case 247 /* DoStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 249 /* ForStatement */: - case 246 /* IfStatement */: - case 248 /* WhileStatement */: - case 255 /* WithStatement */: - case 301 /* CatchClause */: + case 249 /* DoStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 251 /* ForStatement */: + case 248 /* IfStatement */: + case 250 /* WhileStatement */: + case 257 /* WithStatement */: + case 304 /* CatchClause */: return spanForNode(n.parent); - case 259 /* TryStatement */: + case 261 /* TryStatement */: const tryStatement = n.parent; if (tryStatement.tryBlock === n) { return spanForNode(n.parent); @@ -145626,43 +145887,43 @@ function getOutliningSpanForNode(n, sourceFile) { default: return createOutliningSpan(createTextSpanFromNode(n, sourceFile), "code" /* Code */); } - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return spanForNode(n.parent); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 272 /* CaseBlock */: - case 187 /* TypeLiteral */: - case 206 /* ObjectBindingPattern */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 275 /* CaseBlock */: + case 189 /* TypeLiteral */: + case 208 /* ObjectBindingPattern */: return spanForNode(n); - case 189 /* TupleType */: + case 191 /* TupleType */: return spanForNode(n, false, !isTupleTypeNode(n.parent), 22 /* OpenBracketToken */); - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: return spanForNodeArray(n.statements); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return spanForObjectOrArrayLiteral(n); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return spanForObjectOrArrayLiteral(n, 22 /* OpenBracketToken */); - case 287 /* JsxElement */: + case 290 /* JsxElement */: return spanForJSXElement(n); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return spanForJSXFragment(n); - case 288 /* JsxSelfClosingElement */: - case 289 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: return spanForJSXAttributes(n.attributes); - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: case 14 /* NoSubstitutionTemplateLiteral */: return spanForTemplateLiteral(n); - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: return spanForNode(n, false, !isBindingElement(n.parent), 22 /* OpenBracketToken */); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return spanForArrowFunction(n); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return spanForCallExpression(n); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return spanForParenthesizedExpression(n); } function spanForCallExpression(node) { @@ -145727,7 +145988,7 @@ function getOutliningSpanForNode(n, sourceFile) { function functionSpan(node, body, sourceFile) { const openToken = tryGetFunctionOpenToken(node, body, sourceFile); const closeToken = findChildOfKind(body, 19 /* CloseBraceToken */, sourceFile); - return openToken && closeToken && spanBetweenTokens(openToken, closeToken, node, sourceFile, node.kind !== 219 /* ArrowFunction */); + return openToken && closeToken && spanBetweenTokens(openToken, closeToken, node, sourceFile, node.kind !== 221 /* ArrowFunction */); } function spanBetweenTokens(openToken, closeToken, hintSpanNode, sourceFile, autoCollapse = false, useFullStart = true) { const textSpan = createTextSpanFromBounds(useFullStart ? openToken.getFullStart() : openToken.getStart(sourceFile), closeToken.getEnd()); @@ -145841,18 +146102,18 @@ function getInfo19(context, considerPartialSpans = true) { } const noSymbolError = (id) => isIdentifier(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) }; switch (exportNode.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 270 /* ModuleDeclaration */: { + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 273 /* ModuleDeclaration */: { const node = exportNode; if (!node.name) return void 0; return noSymbolError(node.name) || { exportNode: node, exportName: node.name, wasDefault, exportingModuleSymbol }; } - case 244 /* VariableStatement */: { + case 246 /* VariableStatement */: { const vs = exportNode; if (!(vs.declarationList.flags & 2 /* Const */) || vs.declarationList.declarations.length !== 1) { return void 0; @@ -145863,7 +146124,7 @@ function getInfo19(context, considerPartialSpans = true) { Debug.assert(!wasDefault, "Can't have a default flag here"); return noSymbolError(decl.name) || { exportNode: vs, exportName: decl.name, wasDefault, exportingModuleSymbol }; } - case 280 /* ExportAssignment */: { + case 283 /* ExportAssignment */: { const node = exportNode; if (node.isExportEquals) return void 0; @@ -145889,20 +146150,20 @@ function changeExport(exportingSourceFile, { wasDefault, exportNode, exportName } else { const exportKeyword = Debug.checkDefined(findModifier(exportNode, 94 /* ExportKeyword */), "Should find an export keyword in modifier list"); switch (exportNode.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: changes.insertNodeAfter(exportingSourceFile, exportKeyword, factory.createToken(89 /* DefaultKeyword */)); break; - case 244 /* VariableStatement */: + case 246 /* 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 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 270 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 273 /* ModuleDeclaration */: changes.deleteModifier(exportingSourceFile, exportKeyword); changes.insertNodeAfter(exportingSourceFile, exportNode, factory.createExportDefault(factory.createIdentifier(exportName.text))); break; @@ -145928,23 +146189,23 @@ function changeImports(program, { wasDefault, exportName, exportingModuleSymbol function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportName) { const { parent: parent2 } = ref; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier(exportName)); break; - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: { + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: { const spec = parent2; changes.replaceNode(importingSourceFile, spec, makeImportSpecifier2(exportName, spec.name.text)); break; } - case 276 /* ImportClause */: { + case 279 /* 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 === 277 /* NamespaceImport */) { + } else if (namedBindings.kind === 280 /* 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(void 0, [makeImportSpecifier2(exportName, ref.text)], clause.parent.moduleSpecifier, quotePreference); @@ -145955,7 +146216,7 @@ function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportNam } break; } - case 205 /* ImportType */: + case 207 /* ImportType */: const importTypeNode = parent2; changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.assertions, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf)); break; @@ -145966,10 +146227,10 @@ function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportNam function changeNamedToDefaultImport(importingSourceFile, ref, changes) { const parent2 = ref.parent; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier("default")); break; - case 279 /* ImportSpecifier */: { + case 282 /* ImportSpecifier */: { const defaultImport = factory.createIdentifier(parent2.name.text); if (parent2.parent.elements.length === 1) { changes.replaceNode(importingSourceFile, parent2.parent, defaultImport); @@ -145979,7 +146240,7 @@ function changeNamedToDefaultImport(importingSourceFile, ref, changes) { } break; } - case 284 /* ExportSpecifier */: { + case 287 /* ExportSpecifier */: { changes.replaceNode(importingSourceFile, parent2, makeExportSpecifier("default", parent2.name.text)); break; } @@ -146069,7 +146330,7 @@ function getImportConversionInfo(context, considerPartialSpans = true) { if (!importClause.namedBindings) { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_namespace_import_or_named_imports) }; } - if (importClause.namedBindings.kind === 277 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 280 /* NamespaceImport */) { return { convertTo: 0 /* Named */, import: importClause.namedBindings }; } const shouldUseDefault = getShouldUseDefault(context.program, importClause); @@ -146490,11 +146751,11 @@ function isAllowedStatementToMove(statement) { } function isPureImport(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return true; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return !hasSyntacticModifier(node, 1 /* Export */); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return node.declarationList.declarations.every((d) => !!d.initializer && isRequireCall(d.initializer, true)); default: return false; @@ -146583,11 +146844,11 @@ function updateImportsInOtherFiles(changes, program, oldFile, movedSymbols, newM } function getNamespaceLikeImport(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 277 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; - case 274 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 280 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; + case 277 /* ImportEqualsDeclaration */: return node.name; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return tryCast(node.name, isIdentifier); default: return Debug.assertNever(node, `Unexpected node kind ${node.kind}`); @@ -146617,23 +146878,23 @@ function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifie const newNamespaceId = factory.createIdentifier(newNamespaceName); const newModuleString = factory.createStringLiteral(newModuleSpecifier); switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return factory.createImportDeclaration( void 0, factory.createImportClause(false, void 0, factory.createNamespaceImport(newNamespaceId)), newModuleString, void 0 ); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return factory.createImportEqualsDeclaration(void 0, false, newNamespaceId, factory.createExternalModuleReference(newModuleString)); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return factory.createVariableDeclaration(newNamespaceId, void 0, void 0, createRequireCall(newModuleString)); default: return Debug.assertNever(node, `Unexpected node kind ${node.kind}`); } } function moduleSpecifierFromImport(i) { - return i.kind === 275 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 274 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; + return i.kind === 278 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 277 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; } function forEachImportInStatement(statement, cb) { if (isImportDeclaration(statement)) { @@ -146692,15 +146953,15 @@ function addExports(sourceFile, toMove, needExport, useEs6Exports) { } function deleteUnusedImports(sourceFile, importDecl, changes, isUnused) { switch (importDecl.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused); break; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: if (isUnused(importDecl.name)) { changes.delete(sourceFile, importDecl); } break; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused); break; default: @@ -146712,7 +146973,7 @@ function deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnu return; const { name, namedBindings } = importDecl.importClause; const defaultUnused = !name || isUnused(name); - const namedBindingsUnused = !namedBindings || (namedBindings.kind === 277 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); + const namedBindingsUnused = !namedBindings || (namedBindings.kind === 280 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); if (defaultUnused && namedBindingsUnused) { changes.delete(sourceFile, importDecl); } else { @@ -146726,7 +146987,7 @@ function deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnu importDecl.importClause, factory.updateImportClause(importDecl.importClause, importDecl.importClause.isTypeOnly, name, void 0) ); - } else if (namedBindings.kind === 278 /* NamedImports */) { + } else if (namedBindings.kind === 281 /* NamedImports */) { for (const element of namedBindings.elements) { if (isUnused(element.name)) changes.delete(sourceFile, element); @@ -146750,9 +147011,9 @@ function deleteUnusedImportsInVariableDeclaration(sourceFile, varDecl, changes, } } break; - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: break; - case 206 /* ObjectBindingPattern */: + case 208 /* ObjectBindingPattern */: if (name.elements.every((e) => isIdentifier(e.name) && isUnused(e.name))) { changes.delete( sourceFile, @@ -146867,14 +147128,14 @@ function getUsageInfo(oldFile, toMove, checker) { } function isInImport(decl) { switch (decl.kind) { - case 274 /* ImportEqualsDeclaration */: - case 279 /* ImportSpecifier */: - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: + case 277 /* ImportEqualsDeclaration */: + case 282 /* ImportSpecifier */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: return true; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return isVariableDeclarationInImport(decl); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return isVariableDeclaration(decl.parent.parent) && isVariableDeclarationInImport(decl.parent.parent); default: return false; @@ -146885,7 +147146,7 @@ function isVariableDeclarationInImport(decl) { } function filterImport(i, moduleSpecifier, keep) { switch (i.kind) { - case 275 /* ImportDeclaration */: { + case 278 /* ImportDeclaration */: { const clause = i.importClause; if (!clause) return void 0; @@ -146893,9 +147154,9 @@ function filterImport(i, moduleSpecifier, keep) { const namedBindings = clause.namedBindings && filterNamedBindings(clause.namedBindings, keep); return defaultImport || namedBindings ? factory.createImportDeclaration(void 0, factory.createImportClause(false, defaultImport, namedBindings), moduleSpecifier, void 0) : void 0; } - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return keep(i.name) ? i : void 0; - case 261 /* VariableDeclaration */: { + case 263 /* VariableDeclaration */: { const name = filterBindingName(i.name, keep); return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : void 0; } @@ -146904,7 +147165,7 @@ function filterImport(i, moduleSpecifier, keep) { } } function filterNamedBindings(namedBindings, keep) { - if (namedBindings.kind === 277 /* NamespaceImport */) { + if (namedBindings.kind === 280 /* NamespaceImport */) { return keep(namedBindings.name) ? namedBindings : void 0; } else { const newElements = namedBindings.elements.filter((e) => keep(e.name)); @@ -146915,9 +147176,9 @@ function filterBindingName(name, keep) { switch (name.kind) { case 79 /* Identifier */: return keep(name) ? name : void 0; - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: return name; - case 206 /* ObjectBindingPattern */: { + case 208 /* ObjectBindingPattern */: { const newElements = name.elements.filter((prop) => prop.propertyName || !isIdentifier(prop.name) || keep(prop.name)); return newElements.length ? factory.createObjectBindingPattern(newElements) : void 0; } @@ -146974,13 +147235,13 @@ function isTopLevelDeclarationStatement(node) { } function isNonVariableTopLevelDeclaration(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 277 /* ImportEqualsDeclaration */: return true; default: return false; @@ -146988,17 +147249,17 @@ function isNonVariableTopLevelDeclaration(node) { } function forEachTopLevelDeclaration(statement, cb) { switch (statement.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 277 /* ImportEqualsDeclaration */: return cb(statement); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return firstDefined(statement.declarationList.declarations, (decl) => forEachTopLevelDeclarationInBindingName(decl.name, cb)); - case 245 /* ExpressionStatement */: { + case 247 /* ExpressionStatement */: { const { expression } = statement; return isBinaryExpression(expression) && getAssignmentDeclarationKind(expression) === 1 /* ExportsProperty */ ? cb(statement) : void 0; } @@ -147008,8 +147269,8 @@ function forEachTopLevelDeclarationInBindingName(name, cb) { switch (name.kind) { case 79 /* Identifier */: return cb(cast(name.parent, (x) => isVariableDeclaration(x) || isBindingElement(x))); - case 207 /* ArrayBindingPattern */: - case 206 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: return firstDefined(name.elements, (em) => isOmittedExpression(em) ? void 0 : forEachTopLevelDeclarationInBindingName(em.name, cb)); default: return Debug.assertNever(name, `Unexpected name kind ${name.kind}`); @@ -147020,9 +147281,9 @@ function nameOfTopLevelDeclaration(d) { } function getTopLevelDeclarationStatement(d) { switch (d.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return d.parent.parent; - case 208 /* BindingElement */: + case 210 /* BindingElement */: return getTopLevelDeclarationStatement( cast(d.parent.parent, (p) => isVariableDeclaration(p) || isBindingElement(p)) ); @@ -147055,24 +147316,24 @@ function addExport(decl, useEs6Exports) { function addEs6Export(d) { const modifiers = canHaveModifiers(d) ? concatenate([factory.createModifier(94 /* ExportKeyword */)], getModifiers(d)) : void 0; switch (d.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return factory.updateFunctionDeclaration(d, modifiers, d.asteriskToken, d.name, d.typeParameters, d.parameters, d.type, d.body); - case 264 /* ClassDeclaration */: + case 266 /* 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 244 /* VariableStatement */: + case 246 /* VariableStatement */: return factory.updateVariableStatement(d, modifiers, d.declarationList); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return factory.updateModuleDeclaration(d, modifiers, d.name, d.body); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return factory.updateEnumDeclaration(d, modifiers, d.name, d.members); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return factory.updateTypeAliasDeclaration(d, modifiers, d.name, d.typeParameters, d.type); - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return factory.updateInterfaceDeclaration(d, modifiers, d.name, d.typeParameters, d.heritageClauses, d.members); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return factory.updateImportEqualsDeclaration(d, modifiers, d.isTypeOnly, d.name, d.moduleReference); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return Debug.fail(); default: return Debug.assertNever(d, `Unexpected declaration kind ${d.kind}`); @@ -147083,18 +147344,18 @@ function addCommonjsExport(decl) { } function getNamesToExportInCommonJS(decl) { switch (decl.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: return [decl.name.text]; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return mapDefined(decl.declarationList.declarations, (d) => isIdentifier(d.name) ? d.name.text : void 0); - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 277 /* ImportEqualsDeclaration */: return emptyArray; - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return Debug.fail("Can't export an ExpressionStatement"); default: return Debug.assertNever(decl, `Unexpected decl kind ${decl.kind}`); @@ -147146,7 +147407,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { const lastDeclaration = signatureDecls[signatureDecls.length - 1]; let updated = lastDeclaration; switch (lastDeclaration.kind) { - case 173 /* MethodSignature */: { + case 175 /* MethodSignature */: { updated = factory.updateMethodSignature( lastDeclaration, lastDeclaration.modifiers, @@ -147158,7 +147419,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 174 /* MethodDeclaration */: { + case 176 /* MethodDeclaration */: { updated = factory.updateMethodDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -147172,7 +147433,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 179 /* CallSignature */: { + case 181 /* CallSignature */: { updated = factory.updateCallSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -147181,7 +147442,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 176 /* Constructor */: { + case 178 /* Constructor */: { updated = factory.updateConstructorDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -147190,7 +147451,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 180 /* ConstructSignature */: { + case 182 /* ConstructSignature */: { updated = factory.updateConstructSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -147199,7 +147460,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 263 /* FunctionDeclaration */: { + case 265 /* FunctionDeclaration */: { updated = factory.updateFunctionDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -147270,12 +147531,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isConvertableSignatureDeclaration(d) { switch (d.kind) { - case 173 /* MethodSignature */: - case 174 /* MethodDeclaration */: - case 179 /* CallSignature */: - case 176 /* Constructor */: - case 180 /* ConstructSignature */: - case 263 /* FunctionDeclaration */: + case 175 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 181 /* CallSignature */: + case 178 /* Constructor */: + case 182 /* ConstructSignature */: + case 265 /* FunctionDeclaration */: return true; } return false; @@ -147822,14 +148083,14 @@ function entryToFunctionCall(entry) { const functionReference = entry.node; const parent2 = functionReference.parent; switch (parent2.kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: const callOrNewExpression = tryCast(parent2, isCallOrNewExpression); if (callOrNewExpression && callOrNewExpression.expression === functionReference) { return callOrNewExpression; } break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.parent && propertyAccessExpression.name === functionReference) { const callOrNewExpression2 = tryCast(propertyAccessExpression.parent, isCallOrNewExpression); @@ -147838,7 +148099,7 @@ function entryToFunctionCall(entry) { } } break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.parent && elementAccessExpression.argumentExpression === functionReference) { const callOrNewExpression2 = tryCast(elementAccessExpression.parent, isCallOrNewExpression); @@ -147856,13 +148117,13 @@ function entryToAccessExpression(entry) { const reference = entry.node; const parent2 = reference.parent; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.expression === reference) { return propertyAccessExpression; } break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.expression === reference) { return elementAccessExpression; @@ -147904,22 +148165,22 @@ function isValidFunctionDeclaration(functionDeclaration, checker) { if (!isValidParameterNodeArray(functionDeclaration.parameters, checker)) return false; switch (functionDeclaration.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return hasNameOrDefault(functionDeclaration) && isSingleImplementation(functionDeclaration, checker); - case 174 /* MethodDeclaration */: + case 176 /* 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 176 /* Constructor */: + case 178 /* Constructor */: if (isClassDeclaration(functionDeclaration.parent)) { return hasNameOrDefault(functionDeclaration.parent) && isSingleImplementation(functionDeclaration, checker); } else { return isValidVariableDeclaration(functionDeclaration.parent.parent) && isSingleImplementation(functionDeclaration, checker); } - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return isValidVariableDeclaration(functionDeclaration.parent); } return false; @@ -148079,7 +148340,7 @@ function getParameterName(paramDeclaration) { } function getClassNames(constructorDeclaration) { switch (constructorDeclaration.parent.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: const classDeclaration = constructorDeclaration.parent; if (classDeclaration.name) return [classDeclaration.name]; @@ -148088,7 +148349,7 @@ function getClassNames(constructorDeclaration) { "Nameless class declaration should be a default export" ); return [defaultModifier]; - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: const classExpression = constructorDeclaration.parent; const variableDeclaration = constructorDeclaration.parent.parent; const className = classExpression.name; @@ -148099,7 +148360,7 @@ function getClassNames(constructorDeclaration) { } function getFunctionNames(functionDeclaration) { switch (functionDeclaration.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: if (functionDeclaration.name) return [functionDeclaration.name]; const defaultModifier = Debug.checkDefined( @@ -148107,21 +148368,21 @@ function getFunctionNames(functionDeclaration) { "Nameless function declaration should be a default export" ); return [defaultModifier]; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return [functionDeclaration.name]; - case 176 /* Constructor */: + case 178 /* Constructor */: const ctrKeyword = Debug.checkDefined( findChildOfKind(functionDeclaration, 136 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword" ); - if (functionDeclaration.parent.kind === 232 /* ClassExpression */) { + if (functionDeclaration.parent.kind === 234 /* ClassExpression */) { const variableDeclaration = functionDeclaration.parent.parent; return [variableDeclaration.name, ctrKeyword]; } return [ctrKeyword]; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return [functionDeclaration.parent.name]; - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: if (functionDeclaration.name) return [functionDeclaration.name, functionDeclaration.parent.name]; return [functionDeclaration.parent.name]; @@ -148204,11 +148465,11 @@ function isNotEqualsOperator(node) { function getParentBinaryExpression(expr) { const container = findAncestor(expr.parent, (n) => { switch (n.kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return false; - case 229 /* TemplateExpression */: - case 227 /* BinaryExpression */: + case 231 /* TemplateExpression */: + case 229 /* BinaryExpression */: return !(isBinaryExpression(n.parent) && isNotEqualsOperator(n.parent)); default: return "quit"; @@ -148828,18 +149089,18 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { function checkForStaticContext(nodeToCheck, containingClass) { let current = nodeToCheck; while (current !== containingClass) { - if (current.kind === 171 /* PropertyDeclaration */) { + if (current.kind === 172 /* PropertyDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 168 /* Parameter */) { + } else if (current.kind === 169 /* Parameter */) { const ctorOrMethod = getContainingFunction(current); - if (ctorOrMethod.kind === 176 /* Constructor */) { + if (ctorOrMethod.kind === 178 /* Constructor */) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 174 /* MethodDeclaration */) { + } else if (current.kind === 176 /* MethodDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } @@ -148873,7 +149134,7 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { visit(nodeToCheck); if (rangeFacts & 8 /* UsesThis */) { const container = getThisContainer(nodeToCheck, false); - if (container.kind === 263 /* FunctionDeclaration */ || container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ || container.kind === 218 /* FunctionExpression */) { + if (container.kind === 265 /* FunctionDeclaration */ || container.kind === 176 /* MethodDeclaration */ && container.parent.kind === 212 /* ObjectLiteralExpression */ || container.kind === 220 /* FunctionExpression */) { rangeFacts |= 16 /* UsesThisInFunction */; } } @@ -148883,21 +149144,21 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { return true; } if (isDeclaration(node2)) { - const declaringNode = node2.kind === 261 /* VariableDeclaration */ ? node2.parent.parent : node2; + const declaringNode = node2.kind === 263 /* VariableDeclaration */ ? node2.parent.parent : node2; if (hasSyntacticModifier(declaringNode, 1 /* Export */)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; } } switch (node2.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractImport)); return true; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; case 107 /* SuperKeyword */: - if (node2.parent.kind === 213 /* CallExpression */) { + if (node2.parent.kind === 215 /* 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)); @@ -148908,7 +149169,7 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { thisNode = node2; } break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: forEachChild(node2, function check(n) { if (isThis(n)) { rangeFacts |= 8 /* UsesThis */; @@ -148919,34 +149180,34 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { forEachChild(n, check); } }); - case 264 /* ClassDeclaration */: - case 263 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 265 /* FunctionDeclaration */: if (isSourceFile(node2.parent) && node2.parent.externalModuleIndicator === void 0) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.functionWillNotBeVisibleInTheNewScope)); } - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return false; } const savedPermittedJumps = permittedJumps; switch (node2.kind) { - case 246 /* IfStatement */: + case 248 /* IfStatement */: permittedJumps &= ~4 /* Return */; break; - case 259 /* TryStatement */: + case 261 /* TryStatement */: permittedJumps = 0 /* None */; break; - case 242 /* Block */: - if (node2.parent && node2.parent.kind === 259 /* TryStatement */ && node2.parent.finallyBlock === node2) { + case 244 /* Block */: + if (node2.parent && node2.parent.kind === 261 /* TryStatement */ && node2.parent.finallyBlock === node2) { permittedJumps = 4 /* Return */; } break; - case 299 /* DefaultClause */: - case 298 /* CaseClause */: + case 302 /* DefaultClause */: + case 301 /* CaseClause */: permittedJumps |= 1 /* Break */; break; default: @@ -148956,39 +149217,39 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { break; } switch (node2.kind) { - case 197 /* ThisType */: + case 199 /* ThisType */: case 109 /* ThisKeyword */: rangeFacts |= 8 /* UsesThis */; thisNode = node2; break; - case 257 /* LabeledStatement */: { + case 259 /* LabeledStatement */: { const label = node2.label; (seenLabels || (seenLabels = [])).push(label.escapedText); forEachChild(node2, visit); seenLabels.pop(); break; } - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: { + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: { const label = node2.label; if (label) { if (!contains(seenLabels, label.escapedText)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)); } } else { - if (!(permittedJumps & (node2.kind === 253 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { + if (!(permittedJumps & (node2.kind === 255 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingConditionalBreakOrContinueStatements)); } } break; } - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: rangeFacts |= 4 /* IsAsyncFunction */; break; - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: rangeFacts |= 2 /* IsGenerator */; break; - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: if (permittedJumps & 4 /* Return */) { rangeFacts |= 1 /* HasReturn */; } else { @@ -149038,12 +149299,12 @@ function collectEnclosingScopes(range) { const scopes = []; while (true) { current = current.parent; - if (current.kind === 168 /* Parameter */) { + if (current.kind === 169 /* Parameter */) { current = findAncestor(current, (parent2) => isFunctionLikeDeclaration(parent2)).parent; } if (isScope(current)) { scopes.push(current); - if (current.kind === 314 /* SourceFile */) { + if (current.kind === 317 /* SourceFile */) { return scopes; } } @@ -149119,28 +149380,28 @@ function getDescriptionForConstantInScope(scope) { } function getDescriptionForFunctionLikeDeclaration(scope) { switch (scope.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: return "constructor"; - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: return scope.name ? `function '${scope.name.text}'` : ANONYMOUS; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return "arrow function"; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return `method '${scope.name.getText()}'`; - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return `'get ${scope.name.getText()}'`; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return `'set ${scope.name.getText()}'`; default: throw Debug.assertNever(scope, `Unexpected scope kind ${scope.kind}`); } } function getDescriptionForClassLikeDeclaration(scope) { - return scope.kind === 264 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; + return scope.kind === 266 /* 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 === 271 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? SpecialScope.Module : SpecialScope.Global; + return scope.kind === 274 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? SpecialScope.Module : SpecialScope.Global; } var SpecialScope = /* @__PURE__ */ ((SpecialScope2) => { SpecialScope2[SpecialScope2["Module"] = 0] = "Module"; @@ -149436,7 +149697,7 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont changeTracker.insertNodeBefore(context.file, oldVariableDeclaration, newVariableDeclaration); const localReference = factory.createIdentifier(localNameText); changeTracker.replaceNode(context.file, node, localReference); - } else if (node.parent.kind === 245 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { + } else if (node.parent.kind === 247 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { const newVariableStatement = factory.createVariableStatement( void 0, factory.createVariableDeclarationList([newVariableDeclaration], 2 /* Const */) @@ -149453,7 +149714,7 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont } else { changeTracker.insertNodeBefore(context.file, nodeToInsertBefore, newVariableStatement, false); } - if (node.parent.kind === 245 /* ExpressionStatement */) { + if (node.parent.kind === 247 /* ExpressionStatement */) { changeTracker.delete(context.file, node.parent); } else { let localReference = factory.createIdentifier(localNameText); @@ -149974,27 +150235,27 @@ function getExtractableParent(node) { function isExtractableExpression(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 308 /* EnumMember */: + case 311 /* EnumMember */: return false; } switch (node.kind) { case 10 /* StringLiteral */: - return parent2.kind !== 275 /* ImportDeclaration */ && parent2.kind !== 279 /* ImportSpecifier */; - case 231 /* SpreadElement */: - case 206 /* ObjectBindingPattern */: - case 208 /* BindingElement */: + return parent2.kind !== 278 /* ImportDeclaration */ && parent2.kind !== 282 /* ImportSpecifier */; + case 233 /* SpreadElement */: + case 208 /* ObjectBindingPattern */: + case 210 /* BindingElement */: return false; case 79 /* Identifier */: - return parent2.kind !== 208 /* BindingElement */ && parent2.kind !== 279 /* ImportSpecifier */ && parent2.kind !== 284 /* ExportSpecifier */; + return parent2.kind !== 210 /* BindingElement */ && parent2.kind !== 282 /* ImportSpecifier */ && parent2.kind !== 287 /* ExportSpecifier */; } return true; } function isBlockLike(node) { switch (node.kind) { - case 242 /* Block */: - case 314 /* SourceFile */: - case 271 /* ModuleBlock */: - case 298 /* CaseClause */: + case 244 /* Block */: + case 317 /* SourceFile */: + case 274 /* ModuleBlock */: + case 301 /* CaseClause */: return true; default: return false; @@ -150134,10 +150395,10 @@ function getInfo21(context) { } function isConvertibleDeclaration(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: return true; default: return false; @@ -150205,7 +150466,7 @@ function getRenameInfoForNode(node, typeChecker3, sourceFile, program, preferenc return getRenameInfoError(wouldRenameNodeModules); } const kind = ts_SymbolDisplay_exports.getSymbolKind(typeChecker3, symbol, node); - const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 166 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; + const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; const displayName = specifierName || typeChecker3.symbolToString(symbol); const fullDisplayName = specifierName || typeChecker3.getFullyQualifiedName(symbol); return getRenameInfoSuccess(displayName, fullDisplayName, kind, ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker3, symbol), node, sourceFile); @@ -150468,10 +150729,10 @@ function getImmediatelyContainingArgumentInfo(node, position, sourceFile) { return getArgumentListInfoForTemplate(parent2, 0, sourceFile); } return void 0; - } else if (isTemplateHead(node) && parent2.parent.kind === 215 /* TaggedTemplateExpression */) { + } else if (isTemplateHead(node) && parent2.parent.kind === 217 /* TaggedTemplateExpression */) { const templateExpression = parent2; const tagExpression = templateExpression.parent; - Debug.assert(templateExpression.kind === 229 /* TemplateExpression */); + Debug.assert(templateExpression.kind === 231 /* TemplateExpression */); const argumentIndex = isInsideTemplateLiteral(node, position, sourceFile) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); } else if (isTemplateSpan(parent2) && isTaggedTemplateExpression(parent2.parent.parent)) { @@ -150533,17 +150794,17 @@ function getContextualSignatureLocationInfo(startingToken, sourceFile, position, return void 0; const { parent: parent2 } = startingToken; switch (parent2.kind) { - case 217 /* ParenthesizedExpression */: - case 174 /* MethodDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 219 /* ParenthesizedExpression */: + case 176 /* MethodDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* 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 227 /* BinaryExpression */: { + case 229 /* BinaryExpression */: { const highestBinary = getHighestBinary(parent2); const contextualType2 = checker.getContextualType(highestBinary); const argumentIndex2 = startingToken.kind === 20 /* OpenParenToken */ ? 0 : countBinaryExpressionParameters(parent2) - 1; @@ -150609,7 +150870,7 @@ function getApplicableSpanForTaggedTemplate(taggedTemplate, sourceFile) { const template = taggedTemplate.template; const applicableSpanStart = template.getStart(); let applicableSpanEnd = template.getEnd(); - if (template.kind === 229 /* TemplateExpression */) { + if (template.kind === 231 /* TemplateExpression */) { const lastSpan = last(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = skipTrivia(sourceFile.text, applicableSpanEnd, false); @@ -150876,7 +151137,7 @@ function getSelectionChildren(node) { 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 === 167 /* TypeParameter */ || kind === 23 /* CloseBracketToken */ + ({ kind }) => kind === 22 /* OpenBracketToken */ || kind === 168 /* TypeParameter */ || kind === 23 /* CloseBracketToken */ ); return [ openBraceToken, @@ -150886,7 +151147,7 @@ function getSelectionChildren(node) { } 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) === 329 /* JSDoc */ ? children[0] : void 0; + const firstJSDocChild = ((_a2 = children[0]) == null ? void 0 : _a2.kind) === 332 /* 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; @@ -150947,19 +151208,19 @@ function createSyntaxList2(children) { } function isListOpener(token) { const kind = token && token.kind; - return kind === 18 /* OpenBraceToken */ || kind === 22 /* OpenBracketToken */ || kind === 20 /* OpenParenToken */ || kind === 289 /* JsxOpeningElement */; + return kind === 18 /* OpenBraceToken */ || kind === 22 /* OpenBracketToken */ || kind === 20 /* OpenParenToken */ || kind === 292 /* JsxOpeningElement */; } function isListCloser(token) { const kind = token && token.kind; - return kind === 19 /* CloseBraceToken */ || kind === 23 /* CloseBracketToken */ || kind === 21 /* CloseParenToken */ || kind === 290 /* JsxClosingElement */; + return kind === 19 /* CloseBraceToken */ || kind === 23 /* CloseBracketToken */ || kind === 21 /* CloseParenToken */ || kind === 293 /* JsxClosingElement */; } function getEndPos(sourceFile, node) { switch (node.kind) { - case 349 /* JSDocParameterTag */: - case 347 /* JSDocCallbackTag */: - case 356 /* JSDocPropertyTag */: - case 354 /* JSDocTypedefTag */: - case 351 /* JSDocThisTag */: + case 352 /* JSDocParameterTag */: + case 350 /* JSDocCallbackTag */: + case 359 /* JSDocPropertyTag */: + case 357 /* JSDocTypedefTag */: + case 354 /* JSDocThisTag */: return sourceFile.getLineEndOfPosition(node.getStart()); default: return node.getEnd(); @@ -150983,7 +151244,7 @@ function getSymbolKind(typeChecker3, symbol, location2) { } const flags = getCombinedLocalAndExportSymbolFlags(symbol); if (flags & 32 /* Class */) { - return getDeclarationOfKind(symbol, 232 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; + return getDeclarationOfKind(symbol, 234 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; } if (flags & 384 /* Enum */) return "enum" /* enumElement */; @@ -151109,13 +151370,13 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s const declaration = find(symbol.declarations, (declaration2) => declaration2.name === location2); if (declaration) { switch (declaration.kind) { - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: symbolKind = "getter" /* memberGetAccessorElement */; break; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: symbolKind = "setter" /* memberSetAccessorElement */; break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: symbolKind = "accessor" /* memberAccessorVariableElement */; break; default: @@ -151127,7 +151388,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s } let signature; type = isThisExpression ? typeChecker3.getTypeAtLocation(location2) : typeChecker3.getTypeOfSymbolAtLocation(symbol, location2); - if (location2.parent && location2.parent.kind === 211 /* PropertyAccessExpression */) { + if (location2.parent && location2.parent.kind === 213 /* PropertyAccessExpression */) { const right = location2.parent.name; if (right === location2 || right && right.getFullWidth() === 0) { location2 = location2.parent; @@ -151143,7 +151404,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s } if (callExpressionLike) { signature = typeChecker3.getResolvedSignature(callExpressionLike); - const useConstructSignatures = callExpressionLike.kind === 214 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 107 /* SuperKeyword */; + const useConstructSignatures = callExpressionLike.kind === 216 /* 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; @@ -151198,21 +151459,21 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s hasAddedSymbolInfo = true; hasMultipleSignatures = allSignatures.length > 1; } - } else if (isNameOfFunctionDeclaration(location2) && !(symbolFlags & 98304 /* Accessor */) || location2.kind === 136 /* ConstructorKeyword */ && location2.parent.kind === 176 /* Constructor */) { + } else if (isNameOfFunctionDeclaration(location2) && !(symbolFlags & 98304 /* Accessor */) || location2.kind === 136 /* ConstructorKeyword */ && location2.parent.kind === 178 /* Constructor */) { const functionDeclaration = location2.parent; const locationIsSymbolDeclaration = symbol.declarations && find(symbol.declarations, (declaration) => declaration === (location2.kind === 136 /* ConstructorKeyword */ ? functionDeclaration.parent : functionDeclaration)); if (locationIsSymbolDeclaration) { - const allSignatures = functionDeclaration.kind === 176 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); + const allSignatures = functionDeclaration.kind === 178 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); if (!typeChecker3.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker3.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 176 /* Constructor */) { + if (functionDeclaration.kind === 178 /* Constructor */) { symbolKind = "constructor" /* constructorImplementationElement */; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 179 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 181 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); } if (signature) { addSignatureDisplayParts(signature, allSignatures); @@ -151224,9 +151485,9 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s } if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) { addAliasPrefixIfNecessary(); - if (getDeclarationOfKind(symbol, 232 /* ClassExpression */)) { + if (getDeclarationOfKind(symbol, 234 /* ClassExpression */)) { pushSymbolKind("local class" /* localClassElement */); - } else if (getDeclarationOfKind(symbol, 265 /* StructDeclaration */)) { + } else if (getDeclarationOfKind(symbol, 267 /* StructDeclaration */)) { displayParts.push(keywordPart(85 /* StructKeyword */)); } else { displayParts.push(keywordPart(84 /* ClassKeyword */)); @@ -151265,7 +151526,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s } if (symbolFlags & 1536 /* Module */ && !isThisExpression) { prefixNextMeaning(); - const declaration = getDeclarationOfKind(symbol, 270 /* ModuleDeclaration */); + const declaration = getDeclarationOfKind(symbol, 273 /* ModuleDeclaration */); const isNamespace = declaration && declaration.name && declaration.name.kind === 79 /* Identifier */; displayParts.push(keywordPart(isNamespace ? 144 /* NamespaceKeyword */ : 143 /* ModuleKeyword */)); displayParts.push(spacePart()); @@ -151283,7 +151544,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s addFullSymbolName(symbol.parent, enclosingDeclaration); writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration); } else { - const decl = getDeclarationOfKind(symbol, 167 /* TypeParameter */); + const decl = getDeclarationOfKind(symbol, 168 /* TypeParameter */); if (decl === void 0) return Debug.fail(); const declaration = decl.parent; @@ -151291,14 +151552,14 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s if (isFunctionLikeKind(declaration.kind)) { addInPrefix(); const signature = typeChecker3.getSignatureFromDeclaration(declaration); - if (declaration.kind === 180 /* ConstructSignature */) { + if (declaration.kind === 182 /* ConstructSignature */) { displayParts.push(keywordPart(104 /* NewKeyword */)); displayParts.push(spacePart()); - } else if (declaration.kind !== 179 /* CallSignature */ && declaration.name) { + } else if (declaration.kind !== 181 /* CallSignature */ && declaration.name) { addFullSymbolName(declaration.symbol); } addRange(displayParts, signatureToDisplayParts(typeChecker3, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); - } else if (declaration.kind === 268 /* TypeAliasDeclaration */) { + } else if (declaration.kind === 271 /* TypeAliasDeclaration */) { addInPrefix(); displayParts.push(keywordPart(155 /* TypeKeyword */)); displayParts.push(spacePart()); @@ -151312,7 +151573,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s 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) === 308 /* EnumMember */) { + if ((declaration == null ? void 0 : declaration.kind) === 311 /* EnumMember */) { const constantValue = typeChecker3.getConstantValue(declaration); if (constantValue !== void 0) { displayParts.push(spacePart()); @@ -151356,17 +151617,17 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s } if (symbol.declarations) { switch (symbol.declarations[0].kind) { - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: displayParts.push(keywordPart(94 /* ExportKeyword */)); displayParts.push(spacePart()); displayParts.push(keywordPart(144 /* NamespaceKeyword */)); break; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: displayParts.push(keywordPart(94 /* ExportKeyword */)); displayParts.push(spacePart()); displayParts.push(keywordPart(symbol.declarations[0].isExportEquals ? 63 /* EqualsToken */ : 89 /* DefaultKeyword */)); break; - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: displayParts.push(keywordPart(94 /* ExportKeyword */)); break; default: @@ -151376,7 +151637,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s displayParts.push(spacePart()); addFullSymbolName(symbol); forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 274 /* ImportEqualsDeclaration */) { + if (declaration.kind === 277 /* ImportEqualsDeclaration */) { const importEqualsDeclaration = declaration; if (isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(spacePart()); @@ -151444,9 +151705,9 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s documentation = symbol.getContextualDocumentationComment(enclosingDeclaration, typeChecker3); } if (documentation.length === 0 && symbolFlags & 4 /* Property */) { - if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 314 /* SourceFile */)) { + if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 317 /* SourceFile */)) { for (const declaration of symbol.declarations) { - if (!declaration.parent || declaration.parent.kind !== 227 /* BinaryExpression */) { + if (!declaration.parent || declaration.parent.kind !== 229 /* BinaryExpression */) { continue; } const rhsSymbol = typeChecker3.getSymbolAtLocation(declaration.parent.right); @@ -151597,14 +151858,14 @@ function isLocalVariableOrFunction(symbol) { return false; } return forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 218 /* FunctionExpression */) { + if (declaration.kind === 220 /* FunctionExpression */) { return true; } - if (declaration.kind !== 261 /* VariableDeclaration */ && declaration.kind !== 263 /* FunctionDeclaration */) { + if (declaration.kind !== 263 /* VariableDeclaration */ && declaration.kind !== 265 /* FunctionDeclaration */) { return false; } for (let parent2 = declaration.parent; !isFunctionBlock(parent2); parent2 = parent2.parent) { - if (parent2.kind === 314 /* SourceFile */ || parent2.kind === 271 /* ModuleBlock */) { + if (parent2.kind === 317 /* SourceFile */ || parent2.kind === 274 /* ModuleBlock */) { return false; } } @@ -151762,7 +152023,7 @@ function getAdjustedEndPosition(sourceFile, node, options) { 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 === 210 /* ObjectLiteralExpression */); + return !!candidate && !!node.parent && (candidate.kind === 27 /* CommaToken */ || candidate.kind === 26 /* SemicolonToken */ && node.parent.kind === 212 /* ObjectLiteralExpression */); } function isThisTypeAnnotatable(containingFunction) { return isFunctionExpression(containingFunction) || isFunctionDeclaration(containingFunction); @@ -151959,7 +152220,7 @@ var ChangeTracker = class { endNode2 = first(node.parameters); } } else { - endNode2 = (_a2 = node.kind === 261 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) != null ? _a2 : node.name; + endNode2 = (_a2 = node.kind === 263 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) != null ? _a2 : node.name; } this.insertNodeAt(sourceFile, endNode2.end, type, { prefix: ": " }); return true; @@ -152101,19 +152362,19 @@ ${options.prefix}` : "\n" : options.prefix } getInsertNodeAfterOptionsWorker(node) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 270 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 273 /* ModuleDeclaration */: return { prefix: this.newLineCharacter, suffix: this.newLineCharacter }; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: case 10 /* StringLiteral */: case 79 /* Identifier */: return { prefix: ", " }; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return { suffix: "," + this.newLineCharacter }; case 94 /* ExportKeyword */: return { prefix: " " }; - case 168 /* Parameter */: + case 169 /* Parameter */: return {}; default: Debug.assert(isStatement(node) || isClassOrTypeElement(node)); @@ -152122,7 +152383,7 @@ ${options.prefix}` : "\n" : options.prefix } insertName(sourceFile, node, name) { Debug.assert(!node.name); - if (node.kind === 219 /* ArrowFunction */) { + if (node.kind === 221 /* ArrowFunction */) { const arrow = findChildOfKind(node, 38 /* EqualsGreaterThanToken */, sourceFile); const lparen = findChildOfKind(node, 20 /* OpenParenToken */, sourceFile); if (lparen) { @@ -152132,12 +152393,12 @@ ${options.prefix}` : "\n" : options.prefix this.insertText(sourceFile, first(node.parameters).getStart(sourceFile), `function ${name}(`); this.replaceRange(sourceFile, arrow, factory.createToken(21 /* CloseParenToken */)); } - if (node.body.kind !== 242 /* Block */) { + if (node.body.kind !== 244 /* 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 === 218 /* FunctionExpression */ ? 99 /* FunctionKeyword */ : 84 /* ClassKeyword */, sourceFile).end; + const pos = findChildOfKind(node, node.kind === 220 /* FunctionExpression */ ? 99 /* FunctionKeyword */ : 84 /* ClassKeyword */, sourceFile).end; this.insertNodeAt(sourceFile, pos, factory.createIdentifier(name), { prefix: " " }); } } @@ -152258,10 +152519,10 @@ ${options.prefix}` : "\n" : options.prefix } }; function updateJSDocHost(parent2) { - if (parent2.kind !== 219 /* ArrowFunction */) { + if (parent2.kind !== 221 /* ArrowFunction */) { return parent2; } - const jsDocNode = parent2.parent.kind === 171 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; + const jsDocNode = parent2.parent.kind === 172 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; jsDocNode.jsDoc = parent2.jsDoc; jsDocNode.jsDocCache = parent2.jsDocCache; return jsDocNode; @@ -152271,14 +152532,14 @@ function tryMergeJsdocTags(oldTag, newTag) { return void 0; } switch (oldTag.kind) { - case 349 /* JSDocParameterTag */: { + case 352 /* JSDocParameterTag */: { const oldParam = oldTag; const newParam = newTag; return isIdentifier(oldParam.name) && isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? factory.createJSDocParameterTag(void 0, newParam.name, false, newParam.typeExpression, newParam.isNameFirst, oldParam.comment) : void 0; } - case 350 /* JSDocReturnTag */: + case 353 /* JSDocReturnTag */: return factory.createJSDocReturnTag(void 0, newTag.typeExpression, oldTag.comment); - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: return factory.createJSDocTypeTag(void 0, newTag.typeExpression, oldTag.comment); } } @@ -152659,13 +152920,13 @@ function isValidLocationToAddComment(sourceFile, position) { 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 === 166 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); + return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 167 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); } var deleteDeclaration; ((_deleteDeclaration) => { function deleteDeclaration2(changes, deletedNodesInLists, sourceFile, node) { switch (node.kind) { - case 168 /* Parameter */: { + case 169 /* Parameter */: { const oldFunction = node.parent; if (isArrowFunction(oldFunction) && oldFunction.parameters.length === 1 && !findChildOfKind(oldFunction, 20 /* OpenParenToken */, sourceFile)) { changes.replaceNodeWithText(sourceFile, node, "()"); @@ -152674,29 +152935,29 @@ var deleteDeclaration; } break; } - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* 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 208 /* BindingElement */: + case 210 /* BindingElement */: const pattern = node.parent; - const preserveComma = pattern.kind === 207 /* ArrayBindingPattern */ && node !== last(pattern.elements); + const preserveComma = pattern.kind === 209 /* ArrayBindingPattern */ && node !== last(pattern.elements); if (preserveComma) { deleteNode(changes, sourceFile, node); } else { deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node); break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); break; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: const namedImports = node.parent; if (namedImports.elements.length === 1) { deleteImportBinding(changes, sourceFile, namedImports); @@ -152704,7 +152965,7 @@ var deleteDeclaration; deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: deleteImportBinding(changes, sourceFile, node); break; case 26 /* SemicolonToken */: @@ -152713,9 +152974,9 @@ var deleteDeclaration; case 99 /* FunctionKeyword */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: 0 /* Exclude */ }); break; - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 263 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 265 /* FunctionDeclaration */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -152750,13 +153011,13 @@ var deleteDeclaration; const previousToken = Debug.checkDefined(getTokenAtPosition(sourceFile, node.pos - 1)); changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end }); } else { - const importDecl = getAncestor(node, 275 /* ImportDeclaration */); + const importDecl = getAncestor(node, 278 /* ImportDeclaration */); deleteNode(changes, sourceFile, importDecl); } } function deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node) { const { parent: parent2 } = node; - if (parent2.kind === 301 /* CatchClause */) { + if (parent2.kind === 304 /* CatchClause */) { changes.deleteNodeRange(sourceFile, findChildOfKind(parent2, 20 /* OpenParenToken */, sourceFile), findChildOfKind(parent2, 21 /* CloseParenToken */, sourceFile)); return; } @@ -152766,14 +153027,14 @@ var deleteDeclaration; } const gp = parent2.parent; switch (gp.kind) { - case 251 /* ForOfStatement */: - case 250 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 252 /* ForInStatement */: changes.replaceNode(sourceFile, node, factory.createObjectLiteralExpression()); break; - case 249 /* ForStatement */: + case 251 /* ForStatement */: deleteNode(changes, sourceFile, parent2); break; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: deleteNode(changes, sourceFile, gp, { leadingTriviaOption: hasJSDocNodes(gp) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -152975,10 +153236,10 @@ function getFormattingScanner(text, languageVariant, startPos, endPos, cb) { function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { - case 294 /* JsxAttribute */: - case 289 /* JsxOpeningElement */: - case 290 /* JsxClosingElement */: - case 288 /* JsxSelfClosingElement */: + case 297 /* JsxAttribute */: + case 292 /* JsxOpeningElement */: + case 293 /* JsxClosingElement */: + case 291 /* JsxSelfClosingElement */: return isKeyword(node.kind) || node.kind === 79 /* Identifier */; } } @@ -153145,7 +153406,7 @@ var RuleFlags = /* @__PURE__ */ ((RuleFlags2) => { // src/services/formatting/rules.ts function getAllRules() { const allTokens = []; - for (let token = 0 /* FirstToken */; token <= 164 /* LastToken */; token++) { + for (let token = 0 /* FirstToken */; token <= 165 /* LastToken */; token++) { if (token !== 1 /* EndOfFileToken */) { allTokens.push(token); } @@ -153156,9 +153417,9 @@ function getAllRules() { const anyToken = { tokens: allTokens, isSpecific: false }; const anyTokenIncludingMultilineComments = tokenRangeFrom([...allTokens, 3 /* MultiLineCommentTrivia */]); const anyTokenIncludingEOF = tokenRangeFrom([...allTokens, 1 /* EndOfFileToken */]); - const keywords = tokenRangeFromRange(81 /* FirstKeyword */, 164 /* LastKeyword */); + const keywords = tokenRangeFromRange(81 /* FirstKeyword */, 165 /* LastKeyword */); const binaryOperators = tokenRangeFromRange(29 /* FirstBinaryOperator */, 78 /* LastBinaryOperator */); - const binaryKeywordOperators = [102 /* InKeyword */, 103 /* InstanceOfKeyword */, 164 /* OfKeyword */, 129 /* AsKeyword */, 141 /* IsKeyword */]; + const binaryKeywordOperators = [102 /* InKeyword */, 103 /* InstanceOfKeyword */, 165 /* OfKeyword */, 129 /* AsKeyword */, 141 /* IsKeyword */]; const unaryPrefixOperators = [45 /* PlusPlusToken */, 46 /* MinusMinusToken */, 54 /* TildeToken */, 53 /* ExclamationToken */]; const unaryPrefixExpressions = [ 8 /* NumericLiteral */, @@ -153431,40 +153692,40 @@ function isOptionEnabledOrUndefined(optionName) { return (context) => !context.options || !hasProperty(context.options, optionName) || !!context.options[optionName]; } function isForContext(context) { - return context.contextNode.kind === 249 /* ForStatement */; + return context.contextNode.kind === 251 /* ForStatement */; } function isNotForContext(context) { return !isForContext(context); } function isBinaryOpContext(context) { switch (context.contextNode.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return context.contextNode.operatorToken.kind !== 27 /* CommaToken */; - case 228 /* ConditionalExpression */: - case 194 /* ConditionalType */: - case 235 /* AsExpression */: - case 284 /* ExportSpecifier */: - case 279 /* ImportSpecifier */: - case 182 /* TypePredicate */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 239 /* SatisfiesExpression */: + case 230 /* ConditionalExpression */: + case 196 /* ConditionalType */: + case 237 /* AsExpression */: + case 287 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 184 /* TypePredicate */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: + case 241 /* SatisfiesExpression */: return true; - case 208 /* BindingElement */: - case 268 /* TypeAliasDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 280 /* ExportAssignment */: - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 308 /* EnumMember */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 210 /* BindingElement */: + case 271 /* TypeAliasDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 283 /* ExportAssignment */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 311 /* EnumMember */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return context.currentTokenSpan.kind === 63 /* EqualsToken */ || context.nextTokenSpan.kind === 63 /* EqualsToken */; - case 250 /* ForInStatement */: - case 167 /* TypeParameter */: + case 252 /* ForInStatement */: + case 168 /* TypeParameter */: return context.currentTokenSpan.kind === 102 /* InKeyword */ || context.nextTokenSpan.kind === 102 /* InKeyword */ || context.currentTokenSpan.kind === 63 /* EqualsToken */ || context.nextTokenSpan.kind === 63 /* EqualsToken */; - case 251 /* ForOfStatement */: - return context.currentTokenSpan.kind === 164 /* OfKeyword */ || context.nextTokenSpan.kind === 164 /* OfKeyword */; + case 253 /* ForOfStatement */: + return context.currentTokenSpan.kind === 165 /* OfKeyword */ || context.nextTokenSpan.kind === 165 /* OfKeyword */; } return false; } @@ -153476,16 +153737,16 @@ function isNotTypeAnnotationContext(context) { } function isTypeAnnotationContext(context) { const contextKind = context.contextNode.kind; - return contextKind === 171 /* PropertyDeclaration */ || contextKind === 170 /* PropertySignature */ || contextKind === 168 /* Parameter */ || contextKind === 261 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); + return contextKind === 172 /* PropertyDeclaration */ || contextKind === 171 /* PropertySignature */ || contextKind === 169 /* Parameter */ || contextKind === 263 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); } function isConditionalOperatorContext(context) { - return context.contextNode.kind === 228 /* ConditionalExpression */ || context.contextNode.kind === 194 /* ConditionalType */; + return context.contextNode.kind === 230 /* ConditionalExpression */ || context.contextNode.kind === 196 /* ConditionalType */; } function isSameLineTokenOrBeforeBlockContext(context) { return context.TokensAreOnSameLine() || isBeforeBlockContext(context); } function isBraceWrappedContext(context) { - return context.contextNode.kind === 206 /* ObjectBindingPattern */ || context.contextNode.kind === 200 /* MappedType */ || isSingleLineBlockContext(context); + return context.contextNode.kind === 208 /* ObjectBindingPattern */ || context.contextNode.kind === 202 /* MappedType */ || isSingleLineBlockContext(context); } function isBeforeMultilineBlockContext(context) { return isBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); @@ -153507,26 +153768,26 @@ function nodeIsBlockContext(node) { return true; } switch (node.kind) { - case 242 /* Block */: - case 272 /* CaseBlock */: - case 210 /* ObjectLiteralExpression */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 275 /* CaseBlock */: + case 212 /* ObjectLiteralExpression */: + case 274 /* ModuleBlock */: return true; } return false; } function isFunctionDeclContext(context) { switch (context.contextNode.kind) { - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 179 /* CallSignature */: - case 218 /* FunctionExpression */: - case 176 /* Constructor */: - case 219 /* ArrowFunction */: - case 267 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 181 /* CallSignature */: + case 220 /* FunctionExpression */: + case 178 /* Constructor */: + case 221 /* ArrowFunction */: + case 270 /* InterfaceDeclaration */: return true; } return false; @@ -153535,41 +153796,41 @@ function isNotFunctionDeclContext(context) { return !isFunctionDeclContext(context); } function isFunctionDeclarationOrFunctionExpressionContext(context) { - return context.contextNode.kind === 263 /* FunctionDeclaration */ || context.contextNode.kind === 218 /* FunctionExpression */; + return context.contextNode.kind === 265 /* FunctionDeclaration */ || context.contextNode.kind === 220 /* FunctionExpression */; } function isTypeScriptDeclWithBlockContext(context) { return nodeIsTypeScriptDeclWithBlockContext(context.contextNode); } function nodeIsTypeScriptDeclWithBlockContext(node) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 187 /* TypeLiteral */: - case 270 /* ModuleDeclaration */: - case 281 /* ExportDeclaration */: - case 282 /* NamedExports */: - case 275 /* ImportDeclaration */: - case 278 /* NamedImports */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 189 /* TypeLiteral */: + case 273 /* ModuleDeclaration */: + case 284 /* ExportDeclaration */: + case 285 /* NamedExports */: + case 278 /* ImportDeclaration */: + case 281 /* NamedImports */: return true; } return false; } function isAfterCodeBlockContext(context) { switch (context.currentTokenParent.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 301 /* CatchClause */: - case 271 /* ModuleBlock */: - case 256 /* SwitchStatement */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 304 /* CatchClause */: + case 274 /* ModuleBlock */: + case 258 /* SwitchStatement */: return true; - case 242 /* Block */: { + case 244 /* Block */: { const blockParent = context.currentTokenParent.parent; - if (!blockParent || blockParent.kind !== 219 /* ArrowFunction */ && blockParent.kind !== 218 /* FunctionExpression */) { + if (!blockParent || blockParent.kind !== 221 /* ArrowFunction */ && blockParent.kind !== 220 /* FunctionExpression */) { return true; } } @@ -153578,29 +153839,29 @@ function isAfterCodeBlockContext(context) { } function isControlDeclContext(context) { switch (context.contextNode.kind) { - case 246 /* IfStatement */: - case 256 /* SwitchStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 248 /* WhileStatement */: - case 259 /* TryStatement */: - case 247 /* DoStatement */: - case 255 /* WithStatement */: - case 301 /* CatchClause */: + case 248 /* IfStatement */: + case 258 /* SwitchStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 250 /* WhileStatement */: + case 261 /* TryStatement */: + case 249 /* DoStatement */: + case 257 /* WithStatement */: + case 304 /* CatchClause */: return true; default: return false; } } function isObjectContext(context) { - return context.contextNode.kind === 210 /* ObjectLiteralExpression */; + return context.contextNode.kind === 212 /* ObjectLiteralExpression */; } function isFunctionCallContext(context) { - return context.contextNode.kind === 213 /* CallExpression */; + return context.contextNode.kind === 215 /* CallExpression */; } function isNewContext(context) { - return context.contextNode.kind === 214 /* NewExpression */; + return context.contextNode.kind === 216 /* NewExpression */; } function isFunctionCallOrNewContext(context) { return isFunctionCallContext(context) || isNewContext(context); @@ -153615,10 +153876,10 @@ function isNextTokenNotCloseParen(context) { return context.nextTokenSpan.kind !== 21 /* CloseParenToken */; } function isArrowFunctionContext(context) { - return context.contextNode.kind === 219 /* ArrowFunction */; + return context.contextNode.kind === 221 /* ArrowFunction */; } function isImportTypeContext(context) { - return context.contextNode.kind === 205 /* ImportType */; + return context.contextNode.kind === 207 /* ImportType */; } function isNonJsxSameLineTokenContext(context) { return context.TokensAreOnSameLine() && context.contextNode.kind !== 11 /* JsxText */; @@ -153627,19 +153888,19 @@ function isNonJsxTextContext(context) { return context.contextNode.kind !== 11 /* JsxText */; } function isNonJsxElementOrFragmentContext(context) { - return context.contextNode.kind !== 287 /* JsxElement */ && context.contextNode.kind !== 291 /* JsxFragment */; + return context.contextNode.kind !== 290 /* JsxElement */ && context.contextNode.kind !== 294 /* JsxFragment */; } function isJsxExpressionContext(context) { - return context.contextNode.kind === 297 /* JsxExpression */ || context.contextNode.kind === 296 /* JsxSpreadAttribute */; + return context.contextNode.kind === 300 /* JsxExpression */ || context.contextNode.kind === 299 /* JsxSpreadAttribute */; } function isNextTokenParentJsxAttribute(context) { - return context.nextTokenParent.kind === 294 /* JsxAttribute */; + return context.nextTokenParent.kind === 297 /* JsxAttribute */; } function isJsxAttributeContext(context) { - return context.contextNode.kind === 294 /* JsxAttribute */; + return context.contextNode.kind === 297 /* JsxAttribute */; } function isJsxSelfClosingElementContext(context) { - return context.contextNode.kind === 288 /* JsxSelfClosingElement */; + return context.contextNode.kind === 291 /* JsxSelfClosingElement */; } function isNotBeforeBlockInFunctionDeclarationContext(context) { return !isFunctionDeclContext(context) && !isBeforeBlockContext(context); @@ -153651,45 +153912,45 @@ function nodeIsInDecoratorContext(node) { while (node && isExpression(node)) { node = node.parent; } - return node && node.kind === 169 /* Decorator */; + return node && node.kind === 170 /* Decorator */; } function isStartOfVariableDeclarationList(context) { - return context.currentTokenParent.kind === 262 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; + return context.currentTokenParent.kind === 264 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; } function isNotFormatOnEnter(context) { return context.formattingRequestKind !== 2 /* FormatOnEnter */; } function isModuleDeclContext(context) { - return context.contextNode.kind === 270 /* ModuleDeclaration */; + return context.contextNode.kind === 273 /* ModuleDeclaration */; } function isObjectTypeContext(context) { - return context.contextNode.kind === 187 /* TypeLiteral */; + return context.contextNode.kind === 189 /* TypeLiteral */; } function isConstructorSignatureContext(context) { - return context.contextNode.kind === 180 /* ConstructSignature */; + return context.contextNode.kind === 182 /* ConstructSignature */; } function isTypeArgumentOrParameterOrAssertion(token, parent2) { if (token.kind !== 29 /* LessThanToken */ && token.kind !== 31 /* GreaterThanToken */) { return false; } switch (parent2.kind) { - case 183 /* TypeReference */: - case 216 /* TypeAssertionExpression */: - case 268 /* TypeAliasDeclaration */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 234 /* ExpressionWithTypeArguments */: + case 185 /* TypeReference */: + case 218 /* TypeAssertionExpression */: + case 271 /* TypeAliasDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 236 /* ExpressionWithTypeArguments */: return true; default: return false; @@ -153699,28 +153960,28 @@ function isTypeArgumentOrParameterOrAssertionContext(context) { return isTypeArgumentOrParameterOrAssertion(context.currentTokenSpan, context.currentTokenParent) || isTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); } function isTypeAssertionContext(context) { - return context.contextNode.kind === 216 /* TypeAssertionExpression */; + return context.contextNode.kind === 218 /* TypeAssertionExpression */; } function isVoidOpContext(context) { - return context.currentTokenSpan.kind === 115 /* VoidKeyword */ && context.currentTokenParent.kind === 223 /* VoidExpression */; + return context.currentTokenSpan.kind === 115 /* VoidKeyword */ && context.currentTokenParent.kind === 225 /* VoidExpression */; } function isYieldOrYieldStarWithOperand(context) { - return context.contextNode.kind === 230 /* YieldExpression */ && context.contextNode.expression !== void 0; + return context.contextNode.kind === 232 /* YieldExpression */ && context.contextNode.expression !== void 0; } function isNonNullAssertionContext(context) { - return context.contextNode.kind === 236 /* NonNullExpression */; + return context.contextNode.kind === 238 /* NonNullExpression */; } function isNotStatementConditionContext(context) { return !isStatementConditionContext(context); } function isStatementConditionContext(context) { switch (context.contextNode.kind) { - case 246 /* IfStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 248 /* IfStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return true; default: return false; @@ -153746,16 +154007,16 @@ function isSemicolonDeletionContext(context) { if (startLine === endLine) { return nextTokenKind === 19 /* CloseBraceToken */ || nextTokenKind === 1 /* EndOfFileToken */; } - if (nextTokenKind === 241 /* SemicolonClassElement */ || nextTokenKind === 26 /* SemicolonToken */) { + if (nextTokenKind === 243 /* SemicolonClassElement */ || nextTokenKind === 26 /* SemicolonToken */) { return false; } - if (context.contextNode.kind === 267 /* InterfaceDeclaration */ || context.contextNode.kind === 268 /* TypeAliasDeclaration */) { + if (context.contextNode.kind === 270 /* InterfaceDeclaration */ || context.contextNode.kind === 271 /* TypeAliasDeclaration */) { return !isPropertySignature(context.currentTokenParent) || !!context.currentTokenParent.type || nextTokenKind !== 20 /* OpenParenToken */; } if (isPropertyDeclaration(context.currentTokenParent)) { return !context.currentTokenParent.initializer; } - return context.currentTokenParent.kind !== 249 /* ForStatement */ && context.currentTokenParent.kind !== 243 /* EmptyStatement */ && context.currentTokenParent.kind !== 241 /* SemicolonClassElement */ && nextTokenKind !== 22 /* OpenBracketToken */ && nextTokenKind !== 20 /* OpenParenToken */ && nextTokenKind !== 39 /* PlusToken */ && nextTokenKind !== 40 /* MinusToken */ && nextTokenKind !== 43 /* SlashToken */ && nextTokenKind !== 13 /* RegularExpressionLiteral */ && nextTokenKind !== 27 /* CommaToken */ && nextTokenKind !== 229 /* TemplateExpression */ && nextTokenKind !== 15 /* TemplateHead */ && nextTokenKind !== 14 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 24 /* DotToken */; + return context.currentTokenParent.kind !== 251 /* ForStatement */ && context.currentTokenParent.kind !== 245 /* EmptyStatement */ && context.currentTokenParent.kind !== 243 /* SemicolonClassElement */ && nextTokenKind !== 22 /* OpenBracketToken */ && nextTokenKind !== 20 /* OpenParenToken */ && nextTokenKind !== 39 /* PlusToken */ && nextTokenKind !== 40 /* MinusToken */ && nextTokenKind !== 43 /* SlashToken */ && nextTokenKind !== 13 /* RegularExpressionLiteral */ && nextTokenKind !== 27 /* CommaToken */ && nextTokenKind !== 231 /* TemplateExpression */ && nextTokenKind !== 15 /* TemplateHead */ && nextTokenKind !== 14 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 24 /* DotToken */; } function isSemicolonInsertionContext(context) { return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile); @@ -153830,12 +154091,12 @@ function buildMap(rules) { return map2; } function getRuleBucketIndex(row, column) { - Debug.assert(row <= 164 /* LastKeyword */ && column <= 164 /* LastKeyword */, "Must compute formatting context from tokens"); + Debug.assert(row <= 165 /* LastKeyword */ && column <= 165 /* LastKeyword */, "Must compute formatting context from tokens"); return row * mapRowLength + column; } var maskBitSize = 5; var mask = 31; -var mapRowLength = 164 /* LastToken */ + 1; +var mapRowLength = 165 /* LastToken */ + 1; var RulesPosition = ((RulesPosition2) => { RulesPosition2[RulesPosition2["StopRulesSpecific"] = 0] = "StopRulesSpecific"; RulesPosition2[RulesPosition2["StopRulesAny"] = maskBitSize * 1] = "StopRulesAny"; @@ -153941,18 +154202,18 @@ function findOutermostNodeWithinListLevel(node) { } function isListElement(parent2, node) { switch (parent2.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: return rangeContainsRange(parent2.members, node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: const body = parent2.body; - return !!body && body.kind === 271 /* ModuleBlock */ && rangeContainsRange(body.statements, node); - case 314 /* SourceFile */: - case 242 /* Block */: - case 271 /* ModuleBlock */: + return !!body && body.kind === 274 /* ModuleBlock */ && rangeContainsRange(body.statements, node); + case 317 /* SourceFile */: + case 244 /* Block */: + case 274 /* ModuleBlock */: return rangeContainsRange(parent2.statements, node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return rangeContainsRange(parent2.block.statements, node); } return false; @@ -154166,26 +154427,26 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt return modifier.kind; } switch (node.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return 84 /* ClassKeyword */; - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return 85 /* StructKeyword */; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return 119 /* InterfaceKeyword */; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return 99 /* FunctionKeyword */; - case 269 /* EnumDeclaration */: - return 269 /* EnumDeclaration */; - case 177 /* GetAccessor */: + case 272 /* EnumDeclaration */: + return 272 /* EnumDeclaration */; + case 179 /* GetAccessor */: return 138 /* GetKeyword */; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return 152 /* SetKeyword */; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: if (node.asteriskToken) { return 41 /* AsteriskToken */; } - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: const name = getNameOfDeclaration(node); if (name) { return name.kind; @@ -154225,15 +154486,15 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt case 43 /* SlashToken */: case 31 /* GreaterThanToken */: switch (container.kind) { - case 289 /* JsxOpeningElement */: - case 290 /* JsxClosingElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 293 /* JsxClosingElement */: + case 291 /* JsxSelfClosingElement */: return false; } break; case 22 /* OpenBracketToken */: case 23 /* CloseBracketToken */: - if (container.kind !== 200 /* MappedType */) { + if (container.kind !== 202 /* MappedType */) { return false; } break; @@ -154317,11 +154578,11 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt return inheritedIndentation; } } - const effectiveParentStartLine = child.kind === 169 /* Decorator */ ? childStartLine : undecoratedParentStartLine; + const effectiveParentStartLine = child.kind === 170 /* 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 === 209 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { + if (isFirstListItem && parent2.kind === 211 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { inheritedIndentation = childIndentation.indentation; } return inheritedIndentation; @@ -154694,50 +154955,50 @@ function getRangeOfEnclosingComment(sourceFile, position, precedingToken, tokenA } function getOpenTokenForList(node, list) { switch (node.kind) { - case 176 /* Constructor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 219 /* ArrowFunction */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* Constructor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 221 /* ArrowFunction */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: if (node.typeParameters === list) { return 29 /* LessThanToken */; } else if (node.parameters === list) { return 20 /* OpenParenToken */; } break; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: if (node.typeArguments === list) { return 29 /* LessThanToken */; } else if (node.arguments === list) { return 20 /* OpenParenToken */; } break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: if (node.typeParameters === list) { return 29 /* LessThanToken */; } break; - case 183 /* TypeReference */: - case 215 /* TaggedTemplateExpression */: - case 186 /* TypeQuery */: - case 234 /* ExpressionWithTypeArguments */: - case 205 /* ImportType */: + case 185 /* TypeReference */: + case 217 /* TaggedTemplateExpression */: + case 188 /* TypeQuery */: + case 236 /* ExpressionWithTypeArguments */: + case 207 /* ImportType */: if (node.typeArguments === list) { return 29 /* LessThanToken */; } break; - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: return 18 /* OpenBraceToken */; } return 0 /* Unknown */; @@ -154820,11 +155081,11 @@ var SmartIndenter; } const lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line; const currentToken = getTokenAtPosition(sourceFile, position); - const isObjectLiteral = currentToken.kind === 18 /* OpenBraceToken */ && currentToken.parent.kind === 210 /* ObjectLiteralExpression */; + const isObjectLiteral = currentToken.kind === 18 /* OpenBraceToken */ && currentToken.parent.kind === 212 /* ObjectLiteralExpression */; if (options.indentStyle === 1 /* Block */ || isObjectLiteral) { return getBlockIndent(sourceFile, position, options); } - if (precedingToken.kind === 27 /* CommaToken */ && precedingToken.parent.kind !== 227 /* BinaryExpression */) { + if (precedingToken.kind === 27 /* CommaToken */ && precedingToken.parent.kind !== 229 /* BinaryExpression */) { const actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1 /* Unknown */) { return actualIndentation; @@ -154832,7 +155093,7 @@ var SmartIndenter; } const containerList = getListByPosition(position, precedingToken.parent, sourceFile); if (containerList && !rangeContainsRange(containerList, precedingToken)) { - const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; + const useTheSameBaseIndentation = [220 /* FunctionExpression */, 221 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize; return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize; } @@ -154941,7 +155202,7 @@ var SmartIndenter; } } function getActualIndentationForNode(current, parent2, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { - const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 314 /* SourceFile */ || !parentAndChildShareLine); + const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 317 /* SourceFile */ || !parentAndChildShareLine); if (!useActualIndentation) { return -1 /* Unknown */; } @@ -154979,7 +155240,7 @@ var SmartIndenter; } SmartIndenter2.isArgumentAndStartLineOverlapsExpressionBeingCalled = isArgumentAndStartLineOverlapsExpressionBeingCalled; function childStartsOnTheSameLineWithElseInIfStatement(parent2, child, childStartLine, sourceFile) { - if (parent2.kind === 246 /* IfStatement */ && parent2.elseStatement === child) { + if (parent2.kind === 248 /* IfStatement */ && parent2.elseStatement === child) { const elseKeyword = findChildOfKind(parent2, 92 /* ElseKeyword */, sourceFile); Debug.assert(elseKeyword !== void 0); const elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; @@ -155030,43 +155291,43 @@ var SmartIndenter; } function getListByRange(start2, end, node, sourceFile) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return getList(node.typeArguments); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return getList(node.properties); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return getList(node.elements); - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: return getList(node.members); - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 176 /* Constructor */: - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 178 /* Constructor */: + case 187 /* ConstructorType */: + case 182 /* ConstructSignature */: return getList(node.typeParameters) || getList(node.parameters); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return getList(node.parameters); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 353 /* JSDocTemplateTag */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 356 /* JSDocTemplateTag */: return getList(node.typeParameters); - case 214 /* NewExpression */: - case 213 /* CallExpression */: + case 216 /* NewExpression */: + case 215 /* CallExpression */: return getList(node.typeArguments) || getList(node.arguments); - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return getList(node.declarations); - case 278 /* NamedImports */: - case 282 /* NamedExports */: + case 281 /* NamedImports */: + case 285 /* NamedExports */: return getList(node.elements); - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: return getList(node.elements); } function getList(list) { @@ -155089,7 +155350,7 @@ var SmartIndenter; return findColumnForFirstNonWhitespaceCharacterInLine(sourceFile.getLineAndCharacterOfPosition(list.pos), sourceFile, options); } function getActualIndentationForListItem(node, sourceFile, options, listIndentsChild) { - if (node.parent && node.parent.kind === 262 /* VariableDeclarationList */) { + if (node.parent && node.parent.kind === 264 /* VariableDeclarationList */) { return -1 /* Unknown */; } const containingList = getContainingList(node, sourceFile); @@ -155150,96 +155411,96 @@ var SmartIndenter; function nodeWillIndentChild(settings, parent2, child, sourceFile, indentByDefault) { const childKind = child ? child.kind : 0 /* Unknown */; switch (parent2.kind) { - case 245 /* ExpressionStatement */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 209 /* ArrayLiteralExpression */: - case 242 /* Block */: - case 271 /* ModuleBlock */: - case 210 /* ObjectLiteralExpression */: - case 187 /* TypeLiteral */: - case 200 /* MappedType */: - case 189 /* TupleType */: - case 272 /* CaseBlock */: - case 299 /* DefaultClause */: - case 298 /* CaseClause */: - case 217 /* ParenthesizedExpression */: - case 211 /* PropertyAccessExpression */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 244 /* VariableStatement */: - case 280 /* ExportAssignment */: - case 254 /* ReturnStatement */: - case 228 /* ConditionalExpression */: - case 207 /* ArrayBindingPattern */: - case 206 /* ObjectBindingPattern */: - case 289 /* JsxOpeningElement */: - case 292 /* JsxOpeningFragment */: - case 288 /* JsxSelfClosingElement */: - case 297 /* JsxExpression */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 168 /* Parameter */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 196 /* ParenthesizedType */: - case 215 /* TaggedTemplateExpression */: - case 224 /* AwaitExpression */: - case 282 /* NamedExports */: - case 278 /* NamedImports */: - case 284 /* ExportSpecifier */: - case 279 /* ImportSpecifier */: - case 171 /* PropertyDeclaration */: + case 247 /* ExpressionStatement */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 211 /* ArrayLiteralExpression */: + case 244 /* Block */: + case 274 /* ModuleBlock */: + case 212 /* ObjectLiteralExpression */: + case 189 /* TypeLiteral */: + case 202 /* MappedType */: + case 191 /* TupleType */: + case 275 /* CaseBlock */: + case 302 /* DefaultClause */: + case 301 /* CaseClause */: + case 219 /* ParenthesizedExpression */: + case 213 /* PropertyAccessExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 246 /* VariableStatement */: + case 283 /* ExportAssignment */: + case 256 /* ReturnStatement */: + case 230 /* ConditionalExpression */: + case 209 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 292 /* JsxOpeningElement */: + case 295 /* JsxOpeningFragment */: + case 291 /* JsxSelfClosingElement */: + case 300 /* JsxExpression */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 169 /* Parameter */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 198 /* ParenthesizedType */: + case 217 /* TaggedTemplateExpression */: + case 226 /* AwaitExpression */: + case 285 /* NamedExports */: + case 281 /* NamedImports */: + case 287 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 172 /* PropertyDeclaration */: return true; - case 261 /* VariableDeclaration */: - case 305 /* PropertyAssignment */: - case 227 /* BinaryExpression */: - if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 210 /* ObjectLiteralExpression */) { + case 263 /* VariableDeclaration */: + case 308 /* PropertyAssignment */: + case 229 /* BinaryExpression */: + if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 212 /* ObjectLiteralExpression */) { return rangeIsOnOneLine(sourceFile, child); } - if (parent2.kind === 227 /* BinaryExpression */ && sourceFile && child && childKind === 287 /* JsxElement */) { + if (parent2.kind === 229 /* BinaryExpression */ && sourceFile && child && childKind === 290 /* 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 !== 227 /* BinaryExpression */) { + if (parent2.kind !== 229 /* BinaryExpression */) { return true; } break; - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 249 /* ForStatement */: - case 246 /* IfStatement */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return childKind !== 242 /* Block */; - case 219 /* ArrowFunction */: - if (sourceFile && childKind === 217 /* ParenthesizedExpression */) { + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 251 /* ForStatement */: + case 248 /* IfStatement */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + return childKind !== 244 /* Block */; + case 221 /* ArrowFunction */: + if (sourceFile && childKind === 219 /* ParenthesizedExpression */) { return rangeIsOnOneLine(sourceFile, child); } - return childKind !== 242 /* Block */; - case 281 /* ExportDeclaration */: - return childKind !== 282 /* NamedExports */; - case 275 /* ImportDeclaration */: - return childKind !== 276 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 278 /* NamedImports */; - case 287 /* JsxElement */: - return childKind !== 290 /* JsxClosingElement */; - case 291 /* JsxFragment */: - return childKind !== 293 /* JsxClosingFragment */; - case 193 /* IntersectionType */: - case 192 /* UnionType */: - if (childKind === 187 /* TypeLiteral */ || childKind === 189 /* TupleType */) { + return childKind !== 244 /* Block */; + case 284 /* ExportDeclaration */: + return childKind !== 285 /* NamedExports */; + case 278 /* ImportDeclaration */: + return childKind !== 279 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 281 /* NamedImports */; + case 290 /* JsxElement */: + return childKind !== 293 /* JsxClosingElement */; + case 294 /* JsxFragment */: + return childKind !== 296 /* JsxClosingFragment */; + case 195 /* IntersectionType */: + case 194 /* UnionType */: + if (childKind === 189 /* TypeLiteral */ || childKind === 191 /* TupleType */) { return false; } break; @@ -155249,11 +155510,11 @@ var SmartIndenter; SmartIndenter2.nodeWillIndentChild = nodeWillIndentChild; function isControlFlowEndingStatement(kind, parent2) { switch (kind) { - case 254 /* ReturnStatement */: - case 258 /* ThrowStatement */: - case 252 /* ContinueStatement */: - case 253 /* BreakStatement */: - return parent2.kind !== 242 /* Block */; + case 256 /* ReturnStatement */: + case 260 /* ThrowStatement */: + case 254 /* ContinueStatement */: + case 255 /* BreakStatement */: + return parent2.kind !== 244 /* Block */; default: return false; } @@ -155802,7 +156063,7 @@ var createLogicalNot = Debug.deprecate(function createLogicalNot2(operand) { }, factoryDeprecation); var createNode2 = Debug.deprecate(function createNode3(kind, pos = 0, end = 0) { return setTextRangePosEnd( - kind === 314 /* SourceFile */ ? parseBaseNodeFactory.createBaseSourceFileNode(kind) : kind === 79 /* Identifier */ ? parseBaseNodeFactory.createBaseIdentifierNode(kind) : kind === 80 /* PrivateIdentifier */ ? parseBaseNodeFactory.createBasePrivateIdentifierNode(kind) : !isNodeKind(kind) ? parseBaseNodeFactory.createBaseTokenNode(kind) : parseBaseNodeFactory.createBaseNode(kind), + kind === 317 /* SourceFile */ ? parseBaseNodeFactory.createBaseSourceFileNode(kind) : kind === 79 /* Identifier */ ? parseBaseNodeFactory.createBaseIdentifierNode(kind) : kind === 80 /* PrivateIdentifier */ ? parseBaseNodeFactory.createBasePrivateIdentifierNode(kind) : !isNodeKind(kind) ? parseBaseNodeFactory.createBaseTokenNode(kind) : parseBaseNodeFactory.createBaseNode(kind), pos, end ); @@ -155816,7 +156077,7 @@ var getMutableClone = Debug.deprecate(function getMutableClone2(node) { // src/deprecatedCompat/4.0/renamedNodeTests.ts var isTypeAssertion = Debug.deprecate(function isTypeAssertion2(node) { - return node.kind === 216 /* TypeAssertionExpression */; + return node.kind === 218 /* TypeAssertionExpression */; }, { since: "4.0", warnAfter: "4.1", @@ -163905,7 +164166,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter } const initialNode = getTouchingPropertyName(program.getSourceFile(file), position); const symbol = program.getTypeChecker().getSymbolAtLocation(initialNode); - const importSpecifier = symbol && getDeclarationOfKind(symbol, 279 /* ImportSpecifier */); + const importSpecifier = symbol && getDeclarationOfKind(symbol, 282 /* ImportSpecifier */); if (!importSpecifier) return void 0; const nameToSearch = ((_a3 = importSpecifier.propertyName) == null ? void 0 : _a3.text) || importSpecifier.name.text; @@ -166697,7 +166958,7 @@ function unwrapParenthesizedType(tsType) { function findParentIf(asExpr) { let node = asExpr.parent; while (node) { - if (node.kind === 246 /* IfStatement */) { + if (node.kind === 248 /* IfStatement */) { return node; } node = node.parent; @@ -166773,14 +167034,14 @@ function clearTrueSymbolAtLocationCache() { trueSymbolAtLocationCache.clear(); } function isTypeDeclSyntaxKind(kind) { - return isStructDeclarationKind(kind) || kind === 269 /* EnumDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */; + return isStructDeclarationKind(kind) || kind === 272 /* EnumDeclaration */ || kind === 266 /* ClassDeclaration */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */; } function symbolHasDuplicateName(symbol, tsDeclKind) { const symbolDecls = symbol == null ? void 0 : symbol.getDeclarations(); if (symbolDecls) { for (const symDecl of symbolDecls) { const declKind = symDecl.kind; - const isNamespaceTypeCollision = isTypeDeclSyntaxKind(declKind) && tsDeclKind === 270 /* ModuleDeclaration */ || isTypeDeclSyntaxKind(tsDeclKind) && declKind === 270 /* ModuleDeclaration */; + const isNamespaceTypeCollision = isTypeDeclSyntaxKind(declKind) && tsDeclKind === 273 /* ModuleDeclaration */ || isTypeDeclSyntaxKind(tsDeclKind) && declKind === 273 /* ModuleDeclaration */; if (declKind !== 79 /* Identifier */ && declKind !== tsDeclKind && !isNamespaceTypeCollision) return true; } @@ -166892,12 +167153,12 @@ function isCompileTimeExpression(tsExpr) { return isCompileTimeExpression(tsExpr.expression); } switch (tsExpr.kind) { - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return isPrefixUnaryExprValidEnumMemberInit(tsExpr); - case 217 /* ParenthesizedExpression */: - case 227 /* BinaryExpression */: + case 219 /* ParenthesizedExpression */: + case 229 /* BinaryExpression */: return isBinaryExprValidEnumMemberInit(tsExpr); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isConditionalExprValidEnumMemberInit(tsExpr); case 79 /* Identifier */: return isIdentifierValidEnumMemberInit(tsExpr); @@ -166905,7 +167166,7 @@ function isCompileTimeExpression(tsExpr) { return true; case 10 /* StringLiteral */: return true; - case 211 /* PropertyAccessExpression */: { + case 213 /* PropertyAccessExpression */: { const propertyAccess = tsExpr; if (isNumberConstantValue(propertyAccess)) { return true; @@ -166936,7 +167197,7 @@ function isConditionalExprValidEnumMemberInit(tsExpr) { function isIdentifierValidEnumMemberInit(tsExpr) { const tsSymbol = typeChecker.getSymbolAtLocation(tsExpr); const tsDecl = getDeclaration2(tsSymbol); - return !!tsDecl && (isVarDeclaration(tsDecl) && isConst(tsDecl.parent) || tsDecl.kind === 308 /* EnumMember */); + return !!tsDecl && (isVarDeclaration(tsDecl) && isConst(tsDecl.parent) || tsDecl.kind === 311 /* EnumMember */); } function isUnaryOpAllowedForEnumMemberInit(tsPrefixUnaryOp) { return tsPrefixUnaryOp === 39 /* PlusToken */ || tsPrefixUnaryOp === 40 /* MinusToken */ || tsPrefixUnaryOp === 54 /* TildeToken */; @@ -167113,7 +167374,7 @@ function validateObjectLiteralType(type) { return type !== void 0 && type.isClassOrInterface() && hasDefaultCtor(type) && !hasReadonlyFields(type) && !isAbstractClass(type); } function isStructDeclarationKind(kind) { - return kind === 265 /* StructDeclaration */; + return kind === 267 /* StructDeclaration */; } function isStructDeclaration2(node) { return isStructDeclarationKind(node.kind); @@ -167282,7 +167543,7 @@ function validateFields(type, objectLiteral) { return true; } function isSupportedTypeNodeKind(kind) { - return kind !== 132 /* AnyKeyword */ && kind !== 159 /* UnknownKeyword */ && kind !== 154 /* SymbolKeyword */ && kind !== 199 /* IndexedAccessType */ && kind !== 194 /* ConditionalType */ && kind !== 200 /* MappedType */ && kind !== 195 /* InferType */; + return kind !== 132 /* AnyKeyword */ && kind !== 159 /* UnknownKeyword */ && kind !== 154 /* SymbolKeyword */ && kind !== 201 /* IndexedAccessType */ && kind !== 196 /* ConditionalType */ && kind !== 202 /* MappedType */ && kind !== 197 /* InferType */; } function isSupportedType(typeNode) { if (isParenthesizedTypeNode(typeNode)) @@ -168283,28 +168544,28 @@ LinterConfig.terminalTokens = new Set2([ LinterConfig.incrementOnlyTokens = new Map2([ [132 /* AnyKeyword */, 0 /* AnyType */], [154 /* SymbolKeyword */, 1 /* SymbolType */], - [197 /* ThisType */, 56 /* ThisType */], - [186 /* TypeQuery */, 6 /* TypeQuery */], - [221 /* DeleteExpression */, 33 /* DeleteOperator */], + [199 /* ThisType */, 56 /* ThisType */], + [188 /* TypeQuery */, 6 /* TypeQuery */], + [223 /* DeleteExpression */, 33 /* DeleteOperator */], [13 /* RegularExpressionLiteral */, 7 /* RegexLiteral */], - [182 /* TypePredicate */, 8 /* IsOperator */], - [230 /* YieldExpression */, 10 /* YieldExpression */], - [181 /* IndexSignature */, 14 /* IndexMember */], - [255 /* WithStatement */, 15 /* WithStatement */], - [199 /* IndexedAccessType */, 17 /* IndexedAccessType */], + [184 /* TypePredicate */, 8 /* IsOperator */], + [232 /* YieldExpression */, 10 /* YieldExpression */], + [183 /* IndexSignature */, 14 /* IndexMember */], + [257 /* WithStatement */, 15 /* WithStatement */], + [201 /* IndexedAccessType */, 17 /* IndexedAccessType */], [159 /* UnknownKeyword */, 18 /* UnknownType */], [102 /* InKeyword */, 20 /* InOperator */], - [179 /* CallSignature */, 39 /* CallSignature */], - [193 /* IntersectionType */, 23 /* IntersectionType */], - [187 /* TypeLiteral */, 24 /* ObjectTypeLiteral */], - [185 /* ConstructorType */, 38 /* ConstructorFuncs */], + [181 /* CallSignature */, 39 /* CallSignature */], + [195 /* IntersectionType */, 23 /* IntersectionType */], + [189 /* TypeLiteral */, 24 /* ObjectTypeLiteral */], + [187 /* ConstructorType */, 38 /* ConstructorFuncs */], [80 /* PrivateIdentifier */, 41 /* PrivateIdentifier */], - [194 /* ConditionalType */, 43 /* ConditionalType */], - [200 /* MappedType */, 44 /* MappedType */], - [287 /* JsxElement */, 51 /* JsxElement */], - [288 /* JsxSelfClosingElement */, 51 /* JsxElement */], - [274 /* ImportEqualsDeclaration */, 61 /* ImportAssignment */], - [273 /* NamespaceExportDeclaration */, 67 /* UMDModuleDefinition */] + [196 /* ConditionalType */, 43 /* ConditionalType */], + [202 /* MappedType */, 44 /* MappedType */], + [290 /* JsxElement */, 51 /* JsxElement */], + [291 /* JsxSelfClosingElement */, 51 /* JsxElement */], + [277 /* ImportEqualsDeclaration */, 61 /* ImportAssignment */], + [276 /* NamespaceExportDeclaration */, 67 /* UMDModuleDefinition */] ]); // src/linter/ArkTSLinter_1_0/TypeScriptLinter.ts @@ -168313,53 +168574,53 @@ var _TypeScriptLinter = class { this.sourceFile = sourceFile; this.tscStrictDiagnostics = tscStrictDiagnostics; this.handlersMap = new Map2([ - [210 /* ObjectLiteralExpression */, this.handleObjectLiteralExpression], - [209 /* ArrayLiteralExpression */, this.handleArrayLiteralExpression], - [168 /* Parameter */, this.handleParameter], - [269 /* EnumDeclaration */, this.handleEnumDeclaration], - [267 /* InterfaceDeclaration */, this.handleInterfaceDeclaration], - [258 /* ThrowStatement */, this.handleThrowStatement], - [276 /* ImportClause */, this.handleImportClause], - [249 /* ForStatement */, this.handleForStatement], - [250 /* ForInStatement */, this.handleForInStatement], - [251 /* ForOfStatement */, this.handleForOfStatement], - [275 /* ImportDeclaration */, this.handleImportDeclaration], - [211 /* PropertyAccessExpression */, this.handlePropertyAccessExpression], - [171 /* PropertyDeclaration */, this.handlePropertyAssignmentOrDeclaration], - [305 /* PropertyAssignment */, this.handlePropertyAssignmentOrDeclaration], - [218 /* FunctionExpression */, this.handleFunctionExpression], - [219 /* ArrowFunction */, this.handleArrowFunction], - [232 /* ClassExpression */, this.handleClassExpression], - [301 /* CatchClause */, this.handleCatchClause], - [263 /* FunctionDeclaration */, this.handleFunctionDeclaration], - [225 /* PrefixUnaryExpression */, this.handlePrefixUnaryExpression], - [227 /* BinaryExpression */, this.handleBinaryExpression], - [262 /* VariableDeclarationList */, this.handleVariableDeclarationList], - [261 /* VariableDeclaration */, this.handleVariableDeclaration], - [264 /* ClassDeclaration */, this.handleClassDeclaration], - [270 /* ModuleDeclaration */, this.handleModuleDeclaration], - [268 /* TypeAliasDeclaration */, this.handleTypeAliasDeclaration], - [279 /* ImportSpecifier */, this.handleImportSpecifier], - [277 /* NamespaceImport */, this.handleNamespaceImport], - [216 /* TypeAssertionExpression */, this.handleTypeAssertionExpression], - [174 /* MethodDeclaration */, this.handleMethodDeclaration], + [212 /* ObjectLiteralExpression */, this.handleObjectLiteralExpression], + [211 /* ArrayLiteralExpression */, this.handleArrayLiteralExpression], + [169 /* Parameter */, this.handleParameter], + [272 /* EnumDeclaration */, this.handleEnumDeclaration], + [270 /* InterfaceDeclaration */, this.handleInterfaceDeclaration], + [260 /* ThrowStatement */, this.handleThrowStatement], + [279 /* ImportClause */, this.handleImportClause], + [251 /* ForStatement */, this.handleForStatement], + [252 /* ForInStatement */, this.handleForInStatement], + [253 /* ForOfStatement */, this.handleForOfStatement], + [278 /* ImportDeclaration */, this.handleImportDeclaration], + [213 /* PropertyAccessExpression */, this.handlePropertyAccessExpression], + [172 /* PropertyDeclaration */, this.handlePropertyAssignmentOrDeclaration], + [308 /* PropertyAssignment */, this.handlePropertyAssignmentOrDeclaration], + [220 /* FunctionExpression */, this.handleFunctionExpression], + [221 /* ArrowFunction */, this.handleArrowFunction], + [234 /* ClassExpression */, this.handleClassExpression], + [304 /* CatchClause */, this.handleCatchClause], + [265 /* FunctionDeclaration */, this.handleFunctionDeclaration], + [227 /* PrefixUnaryExpression */, this.handlePrefixUnaryExpression], + [229 /* BinaryExpression */, this.handleBinaryExpression], + [264 /* VariableDeclarationList */, this.handleVariableDeclarationList], + [263 /* VariableDeclaration */, this.handleVariableDeclaration], + [266 /* ClassDeclaration */, this.handleClassDeclaration], + [273 /* ModuleDeclaration */, this.handleModuleDeclaration], + [271 /* TypeAliasDeclaration */, this.handleTypeAliasDeclaration], + [282 /* ImportSpecifier */, this.handleImportSpecifier], + [280 /* NamespaceImport */, this.handleNamespaceImport], + [218 /* TypeAssertionExpression */, this.handleTypeAssertionExpression], + [176 /* MethodDeclaration */, this.handleMethodDeclaration], [79 /* Identifier */, this.handleIdentifier], - [212 /* ElementAccessExpression */, this.handleElementAccessExpression], - [308 /* EnumMember */, this.handleEnumMember], - [183 /* TypeReference */, this.handleTypeReference], - [280 /* ExportAssignment */, this.handleExportAssignment], - [213 /* CallExpression */, this.handleCallExpression], - [237 /* MetaProperty */, this.handleMetaProperty], - [214 /* NewExpression */, this.handleNewExpression], - [235 /* AsExpression */, this.handleAsExpression], - [231 /* SpreadElement */, this.handleSpreadOp], - [307 /* SpreadAssignment */, this.handleSpreadOp], - [177 /* GetAccessor */, this.handleGetAccessor], - [178 /* SetAccessor */, this.handleSetAccessor], - [180 /* ConstructSignature */, this.handleConstructSignature], - [234 /* ExpressionWithTypeArguments */, this.handleExpressionWithTypeArguments], - [166 /* ComputedPropertyName */, this.handleComputedPropertyName], - [175 /* ClassStaticBlockDeclaration */, this.handleClassStaticBlockDeclaration] + [214 /* ElementAccessExpression */, this.handleElementAccessExpression], + [311 /* EnumMember */, this.handleEnumMember], + [185 /* TypeReference */, this.handleTypeReference], + [283 /* ExportAssignment */, this.handleExportAssignment], + [215 /* CallExpression */, this.handleCallExpression], + [239 /* MetaProperty */, this.handleMetaProperty], + [216 /* NewExpression */, this.handleNewExpression], + [237 /* AsExpression */, this.handleAsExpression], + [233 /* SpreadElement */, this.handleSpreadOp], + [310 /* SpreadAssignment */, this.handleSpreadOp], + [179 /* GetAccessor */, this.handleGetAccessor], + [180 /* SetAccessor */, this.handleSetAccessor], + [182 /* ConstructSignature */, this.handleConstructSignature], + [236 /* ExpressionWithTypeArguments */, this.handleExpressionWithTypeArguments], + [167 /* ComputedPropertyName */, this.handleComputedPropertyName], + [177 /* ClassStaticBlockDeclaration */, this.handleClassStaticBlockDeclaration] ]); this.validatedTypesSet = new Set2(); _TypeScriptLinter.tsTypeChecker = tsProgram.getLinterTypeChecker(); @@ -168588,28 +168849,28 @@ var _TypeScriptLinter = class { if (!p.declarations) continue; const decl = p.declarations[0]; - if (decl.kind === 173 /* MethodSignature */) { + if (decl.kind === 175 /* MethodSignature */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 174 /* MethodDeclaration */) { + } else if (decl.kind === 176 /* MethodDeclaration */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 171 /* PropertyDeclaration */) { + } else if (decl.kind === 172 /* PropertyDeclaration */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 170 /* PropertySignature */) { + } else if (decl.kind === 171 /* PropertySignature */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, @@ -168637,7 +168898,7 @@ var _TypeScriptLinter = class { let noContextTypeForArrayLiteral = false; const arrayLitElements = arrayLitNode.elements; for (const element of arrayLitElements) { - if (element.kind === 210 /* ObjectLiteralExpression */) { + if (element.kind === 212 /* ObjectLiteralExpression */) { const objectLiteralType = _TypeScriptLinter.tsTypeChecker.getContextualType(element); if (!isDynamicLiteralInitializer(arrayLitNode) && !isExpressionAssignableToType(objectLiteralType, element)) { noContextTypeForArrayLiteral = true; @@ -168672,7 +168933,7 @@ var _TypeScriptLinter = class { return; let enumDeclCount = 0; for (const decl of enumDecls) { - if (decl.kind === 269 /* EnumDeclaration */) + if (decl.kind === 272 /* EnumDeclaration */) enumDeclCount++; } if (enumDeclCount > 1) @@ -168685,7 +168946,7 @@ var _TypeScriptLinter = class { if (iDecls) { let iDeclCount = 0; for (const decl of iDecls) { - if (decl.kind === 267 /* InterfaceDeclaration */) + if (decl.kind === 270 /* InterfaceDeclaration */) iDeclCount++; } if (iDeclCount > 1) @@ -169031,11 +169292,11 @@ var _TypeScriptLinter = class { } else if (tsBinaryExpr.operatorToken.kind === 27 /* CommaToken */) { let tsExprNode = tsBinaryExpr; let tsParentNode = tsExprNode.parent; - while (tsParentNode && tsParentNode.kind === 227 /* BinaryExpression */) { + while (tsParentNode && tsParentNode.kind === 229 /* BinaryExpression */) { tsExprNode = tsParentNode; tsParentNode = tsExprNode.parent; } - if (tsParentNode && tsParentNode.kind === 249 /* ForStatement */) { + if (tsParentNode && tsParentNode.kind === 251 /* ForStatement */) { const tsForNode = tsParentNode; if (tsExprNode === tsForNode.initializer || tsExprNode === tsForNode.incrementor) return; @@ -169174,15 +169435,15 @@ var _TypeScriptLinter = class { if (isModuleBlock(tsModuleBody)) { for (const tsModuleStmt of tsModuleBody.statements) { switch (tsModuleStmt.kind) { - case 244 /* VariableStatement */: - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 281 /* ExportDeclaration */: + case 246 /* VariableStatement */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 284 /* ExportDeclaration */: break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: break; default: this.incrementCounters(tsModuleStmt, 47 /* NonDeclarationInNamespace */); @@ -169304,7 +169565,7 @@ var _TypeScriptLinter = class { handleRestrictedValues(tsIdentifier, tsIdentSym) { const illegalValues = 128 /* ConstEnum */ | 256 /* RegularEnum */ | 512 /* ValueModule */ | 32 /* Class */; if ((tsIdentSym.flags & 512 /* ValueModule */) !== 0) { - if (!!tsIdentSym && symbolHasDuplicateName(tsIdentSym, 270 /* ModuleDeclaration */)) { + if (!!tsIdentSym && symbolHasDuplicateName(tsIdentSym, 273 /* ModuleDeclaration */)) { return; } } @@ -169430,7 +169691,7 @@ var _TypeScriptLinter = class { } handleGenericCallWithNoTypeArgs(callLikeExpr, callSignature) { var _a2, _b; - const tsSyntaxKind = isNewExpression(callLikeExpr) ? 176 /* Constructor */ : 263 /* FunctionDeclaration */; + const tsSyntaxKind = isNewExpression(callLikeExpr) ? 178 /* Constructor */ : 265 /* FunctionDeclaration */; const signDecl = _TypeScriptLinter.tsTypeChecker.signatureToSignatureDeclaration( callSignature, tsSyntaxKind, @@ -169623,10 +169884,10 @@ var _TypeScriptLinter = class { } handleConstructSignature(node) { switch (node.parent.kind) { - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: this.incrementCounters(node, 36 /* ConstructorType */); break; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: this.incrementCounters(node, 37 /* ConstructorIface */); break; default: @@ -170948,13 +171209,13 @@ var SENDABLE_DECORATOR = "Sendable"; var SENDABLE_INTERFACE = "ISendable"; var PROMISE = "Promise"; var SENDABLE_DECORATOR_NODES = [ - 264 /* ClassDeclaration */, - 263 /* FunctionDeclaration */, - 268 /* TypeAliasDeclaration */ + 266 /* ClassDeclaration */, + 265 /* FunctionDeclaration */, + 271 /* TypeAliasDeclaration */ ]; var SENDABLE_CLOSURE_DECLS = [ - 264 /* ClassDeclaration */, - 263 /* FunctionDeclaration */ + 266 /* ClassDeclaration */, + 265 /* FunctionDeclaration */ ]; var ARKTS_COLLECTIONS_D_ETS = "@arkts.collections.d.ets"; var COLLECTIONS_NAMESPACE = "collections"; @@ -171040,7 +171301,7 @@ function getInstanceofUnsupportedHighlightRange(nodeOrComment) { return getKeywordHighlightRange(nodeOrComment.operatorToken, "instanceof"); } function getConstAssertionHighlightRange(nodeOrComment) { - if (nodeOrComment.kind === 235 /* AsExpression */) { + if (nodeOrComment.kind === 237 /* AsExpression */) { return [ nodeOrComment.expression.getEnd() + 1, nodeOrComment.type.getStart() - 1 @@ -171053,11 +171314,11 @@ function getConstAssertionHighlightRange(nodeOrComment) { } function getLimitedReturnTypeInferenceHighlightRange(nodeOrComment) { let node; - if (nodeOrComment.kind === 218 /* FunctionExpression */) { + if (nodeOrComment.kind === 220 /* FunctionExpression */) { node = nodeOrComment.type; - } else if (nodeOrComment.kind === 263 /* FunctionDeclaration */) { + } else if (nodeOrComment.kind === 265 /* FunctionDeclaration */) { node = nodeOrComment.name; - } else if (nodeOrComment.kind === 174 /* MethodDeclaration */) { + } else if (nodeOrComment.kind === 176 /* MethodDeclaration */) { node = nodeOrComment.name; } if (node !== void 0) { @@ -171156,7 +171417,7 @@ function unwrapParenthesizedType2(tsType) { function findParentIf2(asExpr) { let node = asExpr.parent; while (node) { - if (node.kind === 246 /* IfStatement */) { + if (node.kind === 248 /* IfStatement */) { return node; } node = node.parent; @@ -171234,14 +171495,14 @@ function clearTrueSymbolAtLocationCache2() { trueSymbolAtLocationCache2.clear(); } function isTypeDeclSyntaxKind2(kind) { - return isStructDeclarationKind2(kind) || kind === 269 /* EnumDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */; + return isStructDeclarationKind2(kind) || kind === 272 /* EnumDeclaration */ || kind === 266 /* ClassDeclaration */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */; } function symbolHasDuplicateName2(symbol, tsDeclKind) { const symbolDecls = symbol == null ? void 0 : symbol.getDeclarations(); if (symbolDecls) { for (const symDecl of symbolDecls) { const declKind = symDecl.kind; - const isNamespaceTypeCollision = isTypeDeclSyntaxKind2(declKind) && tsDeclKind === 270 /* ModuleDeclaration */ || isTypeDeclSyntaxKind2(tsDeclKind) && declKind === 270 /* ModuleDeclaration */; + const isNamespaceTypeCollision = isTypeDeclSyntaxKind2(declKind) && tsDeclKind === 273 /* ModuleDeclaration */ || isTypeDeclSyntaxKind2(tsDeclKind) && declKind === 273 /* ModuleDeclaration */; if (declKind !== 79 /* Identifier */ && declKind !== tsDeclKind && !isNamespaceTypeCollision) return true; } @@ -171404,12 +171665,12 @@ function isCompileTimeExpression2(tsExpr) { return isCompileTimeExpression2(tsExpr.expression); } switch (tsExpr.kind) { - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return isPrefixUnaryExprValidEnumMemberInit2(tsExpr); - case 217 /* ParenthesizedExpression */: - case 227 /* BinaryExpression */: + case 219 /* ParenthesizedExpression */: + case 229 /* BinaryExpression */: return isBinaryExprValidEnumMemberInit2(tsExpr); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isConditionalExprValidEnumMemberInit2(tsExpr); case 79 /* Identifier */: return isIdentifierValidEnumMemberInit2(tsExpr); @@ -171417,7 +171678,7 @@ function isCompileTimeExpression2(tsExpr) { return true; case 10 /* StringLiteral */: return true; - case 211 /* PropertyAccessExpression */: { + case 213 /* PropertyAccessExpression */: { const propertyAccess = tsExpr; if (isNumberConstantValue2(propertyAccess)) { return true; @@ -171448,7 +171709,7 @@ function isConditionalExprValidEnumMemberInit2(tsExpr) { function isIdentifierValidEnumMemberInit2(tsExpr) { const tsSymbol = typeChecker2.getSymbolAtLocation(tsExpr); const tsDecl = getDeclaration3(tsSymbol); - return !!tsDecl && (isVarDeclaration2(tsDecl) && isConst2(tsDecl.parent) || tsDecl.kind === 308 /* EnumMember */); + return !!tsDecl && (isVarDeclaration2(tsDecl) && isConst2(tsDecl.parent) || tsDecl.kind === 311 /* EnumMember */); } function isUnaryOpAllowedForEnumMemberInit2(tsPrefixUnaryOp) { return tsPrefixUnaryOp === 39 /* PlusToken */ || tsPrefixUnaryOp === 40 /* MinusToken */ || tsPrefixUnaryOp === 54 /* TildeToken */; @@ -171691,7 +171952,7 @@ function validateObjectLiteralType2(type) { return type !== void 0 && type.isClassOrInterface() && hasDefaultCtor2(type) && !hasReadonlyFields2(type) && !isAbstractClass2(type); } function isStructDeclarationKind2(kind) { - return kind === 265 /* StructDeclaration */; + return kind === 267 /* StructDeclaration */; } function isStructDeclaration3(node) { return isStructDeclarationKind2(node.kind); @@ -171828,7 +172089,7 @@ function validateField(type, prop) { return true; } function isSupportedTypeNodeKind2(kind) { - return kind !== 132 /* AnyKeyword */ && kind !== 159 /* UnknownKeyword */ && kind !== 154 /* SymbolKeyword */ && kind !== 199 /* IndexedAccessType */ && kind !== 194 /* ConditionalType */ && kind !== 200 /* MappedType */ && kind !== 195 /* InferType */; + return kind !== 132 /* AnyKeyword */ && kind !== 159 /* UnknownKeyword */ && kind !== 154 /* SymbolKeyword */ && kind !== 201 /* IndexedAccessType */ && kind !== 196 /* ConditionalType */ && kind !== 202 /* MappedType */ && kind !== 197 /* InferType */; } function isSupportedType2(typeNode) { if (isParenthesizedTypeNode(typeNode)) @@ -172596,7 +172857,7 @@ function getDecoratorsIfInSendableClass(declaration) { return getDecorators(declaration); } function getClassNodeFromDeclaration(declaration) { - if (declaration.kind === 168 /* Parameter */) { + if (declaration.kind === 169 /* Parameter */) { return isClassDeclaration(declaration.parent.parent) ? declaration.parent.parent : void 0; } return isClassDeclaration(declaration.parent) ? declaration.parent : void 0; @@ -173172,26 +173433,26 @@ LinterConfig2.terminalTokens = new Set2([ LinterConfig2.incrementOnlyTokens = new Map2([ [132 /* AnyKeyword */, 0 /* AnyType */], [154 /* SymbolKeyword */, 1 /* SymbolType */], - [197 /* ThisType */, 53 /* ThisType */], - [186 /* TypeQuery */, 6 /* TypeQuery */], - [221 /* DeleteExpression */, 30 /* DeleteOperator */], - [182 /* TypePredicate */, 7 /* IsOperator */], - [230 /* YieldExpression */, 9 /* YieldExpression */], - [255 /* WithStatement */, 14 /* WithStatement */], - [199 /* IndexedAccessType */, 16 /* IndexedAccessType */], + [199 /* ThisType */, 53 /* ThisType */], + [188 /* TypeQuery */, 6 /* TypeQuery */], + [223 /* DeleteExpression */, 30 /* DeleteOperator */], + [184 /* TypePredicate */, 7 /* IsOperator */], + [232 /* YieldExpression */, 9 /* YieldExpression */], + [257 /* WithStatement */, 14 /* WithStatement */], + [201 /* IndexedAccessType */, 16 /* IndexedAccessType */], [159 /* UnknownKeyword */, 17 /* UnknownType */], - [179 /* CallSignature */, 36 /* CallSignature */], - [193 /* IntersectionType */, 21 /* IntersectionType */], - [187 /* TypeLiteral */, 22 /* ObjectTypeLiteral */], - [185 /* ConstructorType */, 35 /* ConstructorFuncs */], + [181 /* CallSignature */, 36 /* CallSignature */], + [195 /* IntersectionType */, 21 /* IntersectionType */], + [189 /* TypeLiteral */, 22 /* ObjectTypeLiteral */], + [187 /* ConstructorType */, 35 /* ConstructorFuncs */], [80 /* PrivateIdentifier */, 38 /* PrivateIdentifier */], - [194 /* ConditionalType */, 40 /* ConditionalType */], - [200 /* MappedType */, 41 /* MappedType */], - [287 /* JsxElement */, 48 /* JsxElement */], - [288 /* JsxSelfClosingElement */, 48 /* JsxElement */], - [274 /* ImportEqualsDeclaration */, 57 /* ImportAssignment */], - [273 /* NamespaceExportDeclaration */, 63 /* UMDModuleDefinition */], - [232 /* ClassExpression */, 25 /* ClassExpression */] + [196 /* ConditionalType */, 40 /* ConditionalType */], + [202 /* MappedType */, 41 /* MappedType */], + [290 /* JsxElement */, 48 /* JsxElement */], + [291 /* JsxSelfClosingElement */, 48 /* JsxElement */], + [277 /* ImportEqualsDeclaration */, 57 /* ImportAssignment */], + [276 /* NamespaceExportDeclaration */, 63 /* UMDModuleDefinition */], + [234 /* ClassExpression */, 25 /* ClassExpression */] ]); // src/linter/ArkTSLinter_1_1/TypeScriptLinter.ts @@ -173202,60 +173463,60 @@ var _TypeScriptLinter2 = class { this.compatibleSdkVersionStage = "beta1"; this.compatibleSdkVersion = 12; this.handlersMap = new Map2([ - [210 /* ObjectLiteralExpression */, { handler: this.handleObjectLiteralExpression, name: "handleObjectLiteralExpression" }], - [209 /* ArrayLiteralExpression */, { handler: this.handleArrayLiteralExpression, name: "handleArrayLiteralExpression" }], - [168 /* Parameter */, { handler: this.handleParameter, name: "handleParameter" }], - [269 /* EnumDeclaration */, { handler: this.handleEnumDeclaration, name: "handleEnumDeclaration" }], - [267 /* InterfaceDeclaration */, { handler: this.handleInterfaceDeclaration, name: "handleInterfaceDeclaration" }], - [258 /* ThrowStatement */, { handler: this.handleThrowStatement, name: "handleThrowStatement" }], - [276 /* ImportClause */, { handler: this.handleImportClause, name: "handleImportClause" }], - [249 /* ForStatement */, { handler: this.handleForStatement, name: "handleForStatement" }], - [250 /* ForInStatement */, { handler: this.handleForInStatement, name: "handleForInStatement" }], - [251 /* ForOfStatement */, { handler: this.handleForOfStatement, name: "handleForOfStatement" }], - [275 /* ImportDeclaration */, { handler: this.handleImportDeclaration, name: "handleImportDeclaration" }], - [211 /* PropertyAccessExpression */, { handler: this.handlePropertyAccessExpression, name: "handlePropertyAccessExpression" }], - [171 /* PropertyDeclaration */, { handler: this.handlePropertyDeclaration, name: "handlePropertyDeclaration" }], - [305 /* PropertyAssignment */, { handler: this.handlePropertyAssignment, name: "handlePropertyAssignment" }], - [170 /* PropertySignature */, { handler: this.handlePropertySignature, name: "handlePropertySignature" }], - [218 /* FunctionExpression */, { handler: this.handleFunctionExpression, name: "handleFunctionExpression" }], - [219 /* ArrowFunction */, { handler: this.handleArrowFunction, name: "handleArrowFunction" }], - [301 /* CatchClause */, { handler: this.handleCatchClause, name: "handleCatchClause" }], - [263 /* FunctionDeclaration */, { handler: this.handleFunctionDeclaration, name: "handleFunctionDeclaration" }], - [225 /* PrefixUnaryExpression */, { handler: this.handlePrefixUnaryExpression, name: "handlePrefixUnaryExpression" }], - [227 /* BinaryExpression */, { handler: this.handleBinaryExpression, name: "handleBinaryExpression" }], - [262 /* VariableDeclarationList */, { handler: this.handleVariableDeclarationList, name: "handleVariableDeclarationList" }], - [261 /* VariableDeclaration */, { handler: this.handleVariableDeclaration, name: "handleVariableDeclaration" }], - [264 /* ClassDeclaration */, { handler: this.handleClassDeclaration, name: "handleClassDeclaration" }], - [270 /* ModuleDeclaration */, { handler: this.handleModuleDeclaration, name: "handleModuleDeclaration" }], - [268 /* TypeAliasDeclaration */, { handler: this.handleTypeAliasDeclaration, name: "handleTypeAliasDeclaration" }], - [279 /* ImportSpecifier */, { handler: this.handleImportSpecifier, name: "handleImportSpecifier" }], - [277 /* NamespaceImport */, { handler: this.handleNamespaceImport, name: "handleNamespaceImport" }], - [216 /* TypeAssertionExpression */, { handler: this.handleTypeAssertionExpression, name: "handleTypeAssertionExpression" }], - [174 /* MethodDeclaration */, { handler: this.handleMethodDeclaration, name: "handleMethodDeclaration" }], - [173 /* MethodSignature */, { handler: this.handleMethodSignature, name: "handleMethodSignature" }], + [212 /* ObjectLiteralExpression */, { handler: this.handleObjectLiteralExpression, name: "handleObjectLiteralExpression" }], + [211 /* ArrayLiteralExpression */, { handler: this.handleArrayLiteralExpression, name: "handleArrayLiteralExpression" }], + [169 /* Parameter */, { handler: this.handleParameter, name: "handleParameter" }], + [272 /* EnumDeclaration */, { handler: this.handleEnumDeclaration, name: "handleEnumDeclaration" }], + [270 /* InterfaceDeclaration */, { handler: this.handleInterfaceDeclaration, name: "handleInterfaceDeclaration" }], + [260 /* ThrowStatement */, { handler: this.handleThrowStatement, name: "handleThrowStatement" }], + [279 /* ImportClause */, { handler: this.handleImportClause, name: "handleImportClause" }], + [251 /* ForStatement */, { handler: this.handleForStatement, name: "handleForStatement" }], + [252 /* ForInStatement */, { handler: this.handleForInStatement, name: "handleForInStatement" }], + [253 /* ForOfStatement */, { handler: this.handleForOfStatement, name: "handleForOfStatement" }], + [278 /* ImportDeclaration */, { handler: this.handleImportDeclaration, name: "handleImportDeclaration" }], + [213 /* PropertyAccessExpression */, { handler: this.handlePropertyAccessExpression, name: "handlePropertyAccessExpression" }], + [172 /* PropertyDeclaration */, { handler: this.handlePropertyDeclaration, name: "handlePropertyDeclaration" }], + [308 /* PropertyAssignment */, { handler: this.handlePropertyAssignment, name: "handlePropertyAssignment" }], + [171 /* PropertySignature */, { handler: this.handlePropertySignature, name: "handlePropertySignature" }], + [220 /* FunctionExpression */, { handler: this.handleFunctionExpression, name: "handleFunctionExpression" }], + [221 /* ArrowFunction */, { handler: this.handleArrowFunction, name: "handleArrowFunction" }], + [304 /* CatchClause */, { handler: this.handleCatchClause, name: "handleCatchClause" }], + [265 /* FunctionDeclaration */, { handler: this.handleFunctionDeclaration, name: "handleFunctionDeclaration" }], + [227 /* PrefixUnaryExpression */, { handler: this.handlePrefixUnaryExpression, name: "handlePrefixUnaryExpression" }], + [229 /* BinaryExpression */, { handler: this.handleBinaryExpression, name: "handleBinaryExpression" }], + [264 /* VariableDeclarationList */, { handler: this.handleVariableDeclarationList, name: "handleVariableDeclarationList" }], + [263 /* VariableDeclaration */, { handler: this.handleVariableDeclaration, name: "handleVariableDeclaration" }], + [266 /* ClassDeclaration */, { handler: this.handleClassDeclaration, name: "handleClassDeclaration" }], + [273 /* ModuleDeclaration */, { handler: this.handleModuleDeclaration, name: "handleModuleDeclaration" }], + [271 /* TypeAliasDeclaration */, { handler: this.handleTypeAliasDeclaration, name: "handleTypeAliasDeclaration" }], + [282 /* ImportSpecifier */, { handler: this.handleImportSpecifier, name: "handleImportSpecifier" }], + [280 /* NamespaceImport */, { handler: this.handleNamespaceImport, name: "handleNamespaceImport" }], + [218 /* TypeAssertionExpression */, { handler: this.handleTypeAssertionExpression, name: "handleTypeAssertionExpression" }], + [176 /* MethodDeclaration */, { handler: this.handleMethodDeclaration, name: "handleMethodDeclaration" }], + [175 /* MethodSignature */, { handler: this.handleMethodSignature, name: "handleMethodSignature" }], [79 /* Identifier */, { handler: this.handleIdentifier, name: "handleIdentifier" }], - [212 /* ElementAccessExpression */, { handler: this.handleElementAccessExpression, name: "handleElementAccessExpression" }], - [308 /* EnumMember */, { handler: this.handleEnumMember, name: "handleEnumMember" }], - [183 /* TypeReference */, { handler: this.handleTypeReference, name: "handleTypeReference" }], - [280 /* ExportAssignment */, { handler: this.handleExportAssignment, name: "handleExportAssignment" }], - [213 /* CallExpression */, { handler: this.handleCallExpression, name: "handleCallExpression" }], - [237 /* MetaProperty */, { handler: this.handleMetaProperty, name: "handleMetaProperty" }], - [214 /* NewExpression */, { handler: this.handleNewExpression, name: "handleNewExpression" }], - [235 /* AsExpression */, { handler: this.handleAsExpression, name: "handleAsExpression" }], - [231 /* SpreadElement */, { handler: this.handleSpreadOp, name: "handleSpreadOp" }], - [307 /* SpreadAssignment */, { handler: this.handleSpreadOp, name: "handleSpreadOp" }], - [177 /* GetAccessor */, { handler: this.handleGetAccessor, name: "handleGetAccessor" }], - [178 /* SetAccessor */, { handler: this.handleSetAccessor, name: "handleSetAccessor" }], - [180 /* ConstructSignature */, { handler: this.handleConstructSignature, name: "handleConstructSignature" }], - [234 /* ExpressionWithTypeArguments */, { handler: this.handleExpressionWithTypeArguments, name: "handleExpressionWithTypeArguments" }], - [166 /* ComputedPropertyName */, { handler: this.handleComputedPropertyName, name: "handleComputedPropertyName" }], - [220 /* EtsComponentExpression */, { handler: this.handleEtsComponentExpression, name: "handleEtsComponentExpression" }], - [175 /* ClassStaticBlockDeclaration */, { handler: this.handleClassStaticBlockDeclaration, name: "handleClassStaticBlockDeclaration" }], - [181 /* IndexSignature */, { handler: this.handleIndexSignature, name: "handleIndexSignature" }], + [214 /* ElementAccessExpression */, { handler: this.handleElementAccessExpression, name: "handleElementAccessExpression" }], + [311 /* EnumMember */, { handler: this.handleEnumMember, name: "handleEnumMember" }], + [185 /* TypeReference */, { handler: this.handleTypeReference, name: "handleTypeReference" }], + [283 /* ExportAssignment */, { handler: this.handleExportAssignment, name: "handleExportAssignment" }], + [215 /* CallExpression */, { handler: this.handleCallExpression, name: "handleCallExpression" }], + [239 /* MetaProperty */, { handler: this.handleMetaProperty, name: "handleMetaProperty" }], + [216 /* NewExpression */, { handler: this.handleNewExpression, name: "handleNewExpression" }], + [237 /* AsExpression */, { handler: this.handleAsExpression, name: "handleAsExpression" }], + [233 /* SpreadElement */, { handler: this.handleSpreadOp, name: "handleSpreadOp" }], + [310 /* SpreadAssignment */, { handler: this.handleSpreadOp, name: "handleSpreadOp" }], + [179 /* GetAccessor */, { handler: this.handleGetAccessor, name: "handleGetAccessor" }], + [180 /* SetAccessor */, { handler: this.handleSetAccessor, name: "handleSetAccessor" }], + [182 /* ConstructSignature */, { handler: this.handleConstructSignature, name: "handleConstructSignature" }], + [236 /* ExpressionWithTypeArguments */, { handler: this.handleExpressionWithTypeArguments, name: "handleExpressionWithTypeArguments" }], + [167 /* ComputedPropertyName */, { handler: this.handleComputedPropertyName, name: "handleComputedPropertyName" }], + [222 /* EtsComponentExpression */, { handler: this.handleEtsComponentExpression, name: "handleEtsComponentExpression" }], + [177 /* ClassStaticBlockDeclaration */, { handler: this.handleClassStaticBlockDeclaration, name: "handleClassStaticBlockDeclaration" }], + [183 /* IndexSignature */, { handler: this.handleIndexSignature, name: "handleIndexSignature" }], [94 /* ExportKeyword */, { handler: this.handleExportKeyword, name: "handleExportKeyword" }], - [281 /* ExportDeclaration */, { handler: this.handleExportDeclaration, name: "handleExportDeclaration" }], - [254 /* ReturnStatement */, { handler: this.handleReturnStatement, name: "handleReturnStatement" }], - [169 /* Decorator */, { handler: this.handleDecorator, name: "handleDecorator" }] + [284 /* ExportDeclaration */, { handler: this.handleExportDeclaration, name: "handleExportDeclaration" }], + [256 /* ReturnStatement */, { handler: this.handleReturnStatement, name: "handleReturnStatement" }], + [170 /* Decorator */, { handler: this.handleDecorator, name: "handleDecorator" }] ]); this.validatedTypesSet = new Set2(); _TypeScriptLinter2.tsTypeChecker = tsProgram.getLinterTypeChecker(); @@ -173512,28 +173773,28 @@ var _TypeScriptLinter2 = class { if (!p.declarations) continue; const decl = p.declarations[0]; - if (decl.kind === 173 /* MethodSignature */) { + if (decl.kind === 175 /* MethodSignature */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 174 /* MethodDeclaration */) { + } else if (decl.kind === 176 /* MethodDeclaration */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 171 /* PropertyDeclaration */) { + } else if (decl.kind === 172 /* PropertyDeclaration */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 170 /* PropertySignature */) { + } else if (decl.kind === 171 /* PropertySignature */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, @@ -173569,7 +173830,7 @@ var _TypeScriptLinter2 = class { const arrayLitElements = arrayLitNode.elements; for (const element of arrayLitElements) { const elementContextType = _TypeScriptLinter2.tsTypeChecker.getContextualType(element); - if (element.kind === 210 /* ObjectLiteralExpression */) { + if (element.kind === 212 /* ObjectLiteralExpression */) { if (!isDynamicLiteralInitializer2(arrayLitNode) && !isObjectLiteralAssignable2(elementContextType, element)) { noContextTypeForArrayLiteral = true; break; @@ -173609,7 +173870,7 @@ var _TypeScriptLinter2 = class { return; let enumDeclCount = 0; for (const decl of enumDecls) { - if (decl.kind === 269 /* EnumDeclaration */) + if (decl.kind === 272 /* EnumDeclaration */) enumDeclCount++; } if (enumDeclCount > 1) @@ -173622,7 +173883,7 @@ var _TypeScriptLinter2 = class { if (iDecls) { let iDeclCount = 0; for (const decl of iDecls) { - if (decl.kind === 267 /* InterfaceDeclaration */) + if (decl.kind === 270 /* InterfaceDeclaration */) iDeclCount++; } if (iDeclCount > 1) @@ -174074,11 +174335,11 @@ var _TypeScriptLinter2 = class { } else if (tsBinaryExpr.operatorToken.kind === 27 /* CommaToken */) { let tsExprNode = tsBinaryExpr; let tsParentNode = tsExprNode.parent; - while (tsParentNode && tsParentNode.kind === 227 /* BinaryExpression */) { + while (tsParentNode && tsParentNode.kind === 229 /* BinaryExpression */) { tsExprNode = tsParentNode; tsParentNode = tsExprNode.parent; } - if (tsParentNode && tsParentNode.kind === 249 /* ForStatement */) { + if (tsParentNode && tsParentNode.kind === 251 /* ForStatement */) { const tsForNode = tsParentNode; if (tsExprNode === tsForNode.initializer || tsExprNode === tsForNode.incrementor) return; @@ -174343,15 +174604,15 @@ var _TypeScriptLinter2 = class { if (isModuleBlock(tsModuleBody)) { for (const tsModuleStmt of tsModuleBody.statements) { switch (tsModuleStmt.kind) { - case 244 /* VariableStatement */: - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 281 /* ExportDeclaration */: + case 246 /* VariableStatement */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 284 /* ExportDeclaration */: break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: break; default: this.incrementCounters(tsModuleStmt, 44 /* NonDeclarationInNamespace */); @@ -174478,7 +174739,7 @@ var _TypeScriptLinter2 = class { handleRestrictedValues(tsIdentifier, tsIdentSym) { const illegalValues = 128 /* ConstEnum */ | 256 /* RegularEnum */ | 512 /* ValueModule */ | 32 /* Class */; if ((tsIdentSym.flags & 512 /* ValueModule */) !== 0) { - if (!!tsIdentSym && symbolHasDuplicateName2(tsIdentSym, 270 /* ModuleDeclaration */)) { + if (!!tsIdentSym && symbolHasDuplicateName2(tsIdentSym, 273 /* ModuleDeclaration */)) { return; } } @@ -174774,25 +175035,25 @@ var _TypeScriptLinter2 = class { } isEsObjectPossiblyAllowed(typeRef) { switch (typeRef.parent.kind) { - case 261 /* VariableDeclaration */: - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: - case 184 /* FunctionType */: - case 170 /* PropertySignature */: - case 188 /* ArrayType */: - case 214 /* NewExpression */: + case 263 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: + case 186 /* FunctionType */: + case 171 /* PropertySignature */: + case 190 /* ArrayType */: + case 216 /* NewExpression */: return true; - case 219 /* ArrowFunction */: - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: + case 221 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: return this.isObjectLiteralFromFunc(typeRef.parent); - case 183 /* TypeReference */: + case 185 /* TypeReference */: const promiseType = typeRef.parent; if (promiseType.typeName.getText() === PROMISE) { return this.isObjectLiteralFromFunc(typeRef.parent.parent, true); } return true; - case 235 /* AsExpression */: + case 237 /* AsExpression */: return !isObjectLiteralExpression(typeRef.parent.expression); default: return false; @@ -174871,10 +175132,10 @@ var _TypeScriptLinter2 = class { } handleConstructSignature(node) { switch (node.parent.kind) { - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: this.incrementCounters(node, 33 /* ConstructorType */); break; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: this.incrementCounters(node, 34 /* ConstructorIface */); break; default: @@ -174951,9 +175212,9 @@ var _TypeScriptLinter2 = class { if (decl.exclamationToken === void 0) { return; } - if (decl.kind === 171 /* PropertyDeclaration */) { + if (decl.kind === 172 /* PropertyDeclaration */) { const parentDecl = decl.parent; - if (parentDecl.kind === 264 /* ClassDeclaration */ && hasSendableDecorator(parentDecl)) { + if (parentDecl.kind === 266 /* ClassDeclaration */ && hasSendableDecorator(parentDecl)) { this.incrementCounters(decl, 82 /* SendableDefiniteAssignment */); return; } @@ -175084,28 +175345,28 @@ var _TypeScriptLinter2 = class { return; } switch (parentNode.kind) { - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: if (isConstEnum(parentNode.symbol)) { break; } else { this.incrementCounters((_a2 = parentNode.name) != null ? _a2 : parentNode, 90 /* SharedModuleExports */); } return; - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: if (!isShareableType(_TypeScriptLinter2.tsTypeChecker.getTypeAtLocation(parentNode))) { this.incrementCounters((_b = parentNode.name) != null ? _b : parentNode, 90 /* SharedModuleExports */); } return; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: for (const variableDeclaration of parentNode.declarationList.declarations) { if (!isShareableEntity(variableDeclaration.name)) { this.incrementCounters(variableDeclaration.name, 90 /* SharedModuleExports */); } } return; - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: if (!isShareableEntity(parentNode)) { this.incrementCounters(parentNode, 108 /* SharedModuleExportsWarning */); } @@ -175214,15 +175475,15 @@ var _InteropTypescriptLinter = class { this.D_ETS = ".d.ets"; this.ETS = ".ets"; this.handlersMap = new Map2([ - [275 /* ImportDeclaration */, this.handleImportDeclaration], - [267 /* InterfaceDeclaration */, this.handleInterfaceDeclaration], - [264 /* ClassDeclaration */, this.handleClassDeclaration], - [214 /* NewExpression */, this.handleNewExpression], - [210 /* ObjectLiteralExpression */, this.handleObjectLiteralExpression], - [209 /* ArrayLiteralExpression */, this.handleArrayLiteralExpression], - [235 /* AsExpression */, this.handleAsExpression], - [281 /* ExportDeclaration */, this.handleExportDeclaration], - [280 /* ExportAssignment */, this.handleExportAssignment] + [278 /* ImportDeclaration */, this.handleImportDeclaration], + [270 /* InterfaceDeclaration */, this.handleInterfaceDeclaration], + [266 /* ClassDeclaration */, this.handleClassDeclaration], + [216 /* NewExpression */, this.handleNewExpression], + [212 /* ObjectLiteralExpression */, this.handleObjectLiteralExpression], + [211 /* ArrayLiteralExpression */, this.handleArrayLiteralExpression], + [237 /* AsExpression */, this.handleAsExpression], + [284 /* ExportDeclaration */, this.handleExportDeclaration], + [283 /* ExportAssignment */, this.handleExportAssignment] ]); _InteropTypescriptLinter.tsTypeChecker = tsProgram.getLinterTypeChecker(); _InteropTypescriptLinter.etsLoaderPath = tsProgram.getCompilerOptions().etsLoaderPath; @@ -178486,6 +178747,9 @@ if (typeof process !== "undefined") { isOptionalTypeNode, isOuterExpression, isOutermostOptionalChain, + isOverloadDeclaration, + isOverloadElement, + isOverloadPropertyDeclaration, isOverrideModifier, isPackedArrayLiteral, isParameter, diff --git a/lib/tsserverlibrary.d.ts b/lib/tsserverlibrary.d.ts index f348416a30..c56fccbe42 100644 --- a/lib/tsserverlibrary.d.ts +++ b/lib/tsserverlibrary.d.ts @@ -4313,209 +4313,212 @@ declare namespace ts { GlobalKeyword = 161, BigIntKeyword = 162, OverrideKeyword = 163, - OfKeyword = 164, - QualifiedName = 165, - ComputedPropertyName = 166, - TypeParameter = 167, - Parameter = 168, - Decorator = 169, - PropertySignature = 170, - PropertyDeclaration = 171, - AnnotationPropertyDeclaration = 172, - MethodSignature = 173, - MethodDeclaration = 174, - ClassStaticBlockDeclaration = 175, - Constructor = 176, - GetAccessor = 177, - SetAccessor = 178, - CallSignature = 179, - ConstructSignature = 180, - IndexSignature = 181, - TypePredicate = 182, - TypeReference = 183, - FunctionType = 184, - ConstructorType = 185, - TypeQuery = 186, - TypeLiteral = 187, - ArrayType = 188, - TupleType = 189, - OptionalType = 190, - RestType = 191, - UnionType = 192, - IntersectionType = 193, - ConditionalType = 194, - InferType = 195, - ParenthesizedType = 196, - ThisType = 197, - TypeOperator = 198, - IndexedAccessType = 199, - MappedType = 200, - LiteralType = 201, - NamedTupleMember = 202, - TemplateLiteralType = 203, - TemplateLiteralTypeSpan = 204, - ImportType = 205, - ObjectBindingPattern = 206, - ArrayBindingPattern = 207, - BindingElement = 208, - ArrayLiteralExpression = 209, - ObjectLiteralExpression = 210, - PropertyAccessExpression = 211, - ElementAccessExpression = 212, - CallExpression = 213, - NewExpression = 214, - TaggedTemplateExpression = 215, - TypeAssertionExpression = 216, - ParenthesizedExpression = 217, - FunctionExpression = 218, - ArrowFunction = 219, - EtsComponentExpression = 220, - DeleteExpression = 221, - TypeOfExpression = 222, - VoidExpression = 223, - AwaitExpression = 224, - PrefixUnaryExpression = 225, - PostfixUnaryExpression = 226, - BinaryExpression = 227, - ConditionalExpression = 228, - TemplateExpression = 229, - YieldExpression = 230, - SpreadElement = 231, - ClassExpression = 232, - OmittedExpression = 233, - ExpressionWithTypeArguments = 234, - AsExpression = 235, - NonNullExpression = 236, - MetaProperty = 237, - SyntheticExpression = 238, - SatisfiesExpression = 239, - TemplateSpan = 240, - SemicolonClassElement = 241, - Block = 242, - EmptyStatement = 243, - VariableStatement = 244, - ExpressionStatement = 245, - IfStatement = 246, - DoStatement = 247, - WhileStatement = 248, - ForStatement = 249, - ForInStatement = 250, - ForOfStatement = 251, - ContinueStatement = 252, - BreakStatement = 253, - ReturnStatement = 254, - WithStatement = 255, - SwitchStatement = 256, - LabeledStatement = 257, - ThrowStatement = 258, - TryStatement = 259, - DebuggerStatement = 260, - VariableDeclaration = 261, - VariableDeclarationList = 262, - FunctionDeclaration = 263, - ClassDeclaration = 264, - StructDeclaration = 265, - AnnotationDeclaration = 266, - InterfaceDeclaration = 267, - TypeAliasDeclaration = 268, - EnumDeclaration = 269, - ModuleDeclaration = 270, - ModuleBlock = 271, - CaseBlock = 272, - NamespaceExportDeclaration = 273, - ImportEqualsDeclaration = 274, - ImportDeclaration = 275, - ImportClause = 276, - NamespaceImport = 277, - NamedImports = 278, - ImportSpecifier = 279, - ExportAssignment = 280, - ExportDeclaration = 281, - NamedExports = 282, - NamespaceExport = 283, - ExportSpecifier = 284, - MissingDeclaration = 285, - ExternalModuleReference = 286, - JsxElement = 287, - JsxSelfClosingElement = 288, - JsxOpeningElement = 289, - JsxClosingElement = 290, - JsxFragment = 291, - JsxOpeningFragment = 292, - JsxClosingFragment = 293, - JsxAttribute = 294, - JsxAttributes = 295, - JsxSpreadAttribute = 296, - JsxExpression = 297, - CaseClause = 298, - DefaultClause = 299, - HeritageClause = 300, - CatchClause = 301, - AssertClause = 302, - AssertEntry = 303, - ImportTypeAssertionContainer = 304, - PropertyAssignment = 305, - ShorthandPropertyAssignment = 306, - SpreadAssignment = 307, - EnumMember = 308, - UnparsedPrologue = 309, - UnparsedPrepend = 310, - UnparsedText = 311, - UnparsedInternalText = 312, - UnparsedSyntheticReference = 313, - SourceFile = 314, - Bundle = 315, - UnparsedSource = 316, - InputFiles = 317, - JSDocTypeExpression = 318, - JSDocNameReference = 319, - JSDocMemberName = 320, - JSDocAllType = 321, - JSDocUnknownType = 322, - JSDocNullableType = 323, - JSDocNonNullableType = 324, - JSDocOptionalType = 325, - JSDocFunctionType = 326, - JSDocVariadicType = 327, - JSDocNamepathType = 328, - JSDoc = 329, + OverloadKeyword = 164, + OfKeyword = 165, + QualifiedName = 166, + ComputedPropertyName = 167, + TypeParameter = 168, + Parameter = 169, + Decorator = 170, + PropertySignature = 171, + PropertyDeclaration = 172, + AnnotationPropertyDeclaration = 173, + OverloadPropertyDeclaration = 174, + MethodSignature = 175, + MethodDeclaration = 176, + ClassStaticBlockDeclaration = 177, + Constructor = 178, + GetAccessor = 179, + SetAccessor = 180, + CallSignature = 181, + ConstructSignature = 182, + IndexSignature = 183, + TypePredicate = 184, + TypeReference = 185, + FunctionType = 186, + ConstructorType = 187, + TypeQuery = 188, + TypeLiteral = 189, + ArrayType = 190, + TupleType = 191, + OptionalType = 192, + RestType = 193, + UnionType = 194, + IntersectionType = 195, + ConditionalType = 196, + InferType = 197, + ParenthesizedType = 198, + ThisType = 199, + TypeOperator = 200, + IndexedAccessType = 201, + MappedType = 202, + LiteralType = 203, + NamedTupleMember = 204, + TemplateLiteralType = 205, + TemplateLiteralTypeSpan = 206, + ImportType = 207, + ObjectBindingPattern = 208, + ArrayBindingPattern = 209, + BindingElement = 210, + ArrayLiteralExpression = 211, + ObjectLiteralExpression = 212, + PropertyAccessExpression = 213, + ElementAccessExpression = 214, + CallExpression = 215, + NewExpression = 216, + TaggedTemplateExpression = 217, + TypeAssertionExpression = 218, + ParenthesizedExpression = 219, + FunctionExpression = 220, + ArrowFunction = 221, + EtsComponentExpression = 222, + DeleteExpression = 223, + TypeOfExpression = 224, + VoidExpression = 225, + AwaitExpression = 226, + PrefixUnaryExpression = 227, + PostfixUnaryExpression = 228, + BinaryExpression = 229, + ConditionalExpression = 230, + TemplateExpression = 231, + YieldExpression = 232, + SpreadElement = 233, + ClassExpression = 234, + OmittedExpression = 235, + ExpressionWithTypeArguments = 236, + AsExpression = 237, + NonNullExpression = 238, + MetaProperty = 239, + SyntheticExpression = 240, + SatisfiesExpression = 241, + TemplateSpan = 242, + SemicolonClassElement = 243, + Block = 244, + EmptyStatement = 245, + VariableStatement = 246, + ExpressionStatement = 247, + IfStatement = 248, + DoStatement = 249, + WhileStatement = 250, + ForStatement = 251, + ForInStatement = 252, + ForOfStatement = 253, + ContinueStatement = 254, + BreakStatement = 255, + ReturnStatement = 256, + WithStatement = 257, + SwitchStatement = 258, + LabeledStatement = 259, + ThrowStatement = 260, + TryStatement = 261, + DebuggerStatement = 262, + VariableDeclaration = 263, + VariableDeclarationList = 264, + FunctionDeclaration = 265, + ClassDeclaration = 266, + StructDeclaration = 267, + AnnotationDeclaration = 268, + OverloadDeclaration = 269, + InterfaceDeclaration = 270, + TypeAliasDeclaration = 271, + EnumDeclaration = 272, + ModuleDeclaration = 273, + ModuleBlock = 274, + CaseBlock = 275, + NamespaceExportDeclaration = 276, + ImportEqualsDeclaration = 277, + ImportDeclaration = 278, + ImportClause = 279, + NamespaceImport = 280, + NamedImports = 281, + ImportSpecifier = 282, + ExportAssignment = 283, + ExportDeclaration = 284, + NamedExports = 285, + NamespaceExport = 286, + ExportSpecifier = 287, + MissingDeclaration = 288, + ExternalModuleReference = 289, + JsxElement = 290, + JsxSelfClosingElement = 291, + JsxOpeningElement = 292, + JsxClosingElement = 293, + JsxFragment = 294, + JsxOpeningFragment = 295, + JsxClosingFragment = 296, + JsxAttribute = 297, + JsxAttributes = 298, + JsxSpreadAttribute = 299, + JsxExpression = 300, + CaseClause = 301, + DefaultClause = 302, + HeritageClause = 303, + CatchClause = 304, + AssertClause = 305, + AssertEntry = 306, + ImportTypeAssertionContainer = 307, + PropertyAssignment = 308, + ShorthandPropertyAssignment = 309, + SpreadAssignment = 310, + EnumMember = 311, + UnparsedPrologue = 312, + UnparsedPrepend = 313, + UnparsedText = 314, + UnparsedInternalText = 315, + UnparsedSyntheticReference = 316, + SourceFile = 317, + Bundle = 318, + UnparsedSource = 319, + InputFiles = 320, + JSDocTypeExpression = 321, + JSDocNameReference = 322, + JSDocMemberName = 323, + JSDocAllType = 324, + JSDocUnknownType = 325, + JSDocNullableType = 326, + JSDocNonNullableType = 327, + JSDocOptionalType = 328, + JSDocFunctionType = 329, + JSDocVariadicType = 330, + JSDocNamepathType = 331, + JSDoc = 332, /** @deprecated Use SyntaxKind.JSDoc */ - JSDocComment = 329, - JSDocText = 330, - JSDocTypeLiteral = 331, - JSDocSignature = 332, - JSDocLink = 333, - JSDocLinkCode = 334, - JSDocLinkPlain = 335, - JSDocTag = 336, - JSDocAugmentsTag = 337, - JSDocImplementsTag = 338, - JSDocAuthorTag = 339, - JSDocDeprecatedTag = 340, - JSDocClassTag = 341, - JSDocPublicTag = 342, - JSDocPrivateTag = 343, - JSDocProtectedTag = 344, - JSDocReadonlyTag = 345, - JSDocOverrideTag = 346, - JSDocCallbackTag = 347, - JSDocEnumTag = 348, - JSDocParameterTag = 349, - JSDocReturnTag = 350, - JSDocThisTag = 351, - JSDocTypeTag = 352, - JSDocTemplateTag = 353, - JSDocTypedefTag = 354, - JSDocSeeTag = 355, - JSDocPropertyTag = 356, - SyntaxList = 357, - NotEmittedStatement = 358, - PartiallyEmittedExpression = 359, - CommaListExpression = 360, - MergeDeclarationMarker = 361, - EndOfDeclarationMarker = 362, - SyntheticReferenceExpression = 363, - Count = 364, + JSDocComment = 332, + JSDocText = 333, + JSDocTypeLiteral = 334, + JSDocSignature = 335, + JSDocLink = 336, + JSDocLinkCode = 337, + JSDocLinkPlain = 338, + JSDocTag = 339, + JSDocAugmentsTag = 340, + JSDocImplementsTag = 341, + JSDocAuthorTag = 342, + JSDocDeprecatedTag = 343, + JSDocClassTag = 344, + JSDocPublicTag = 345, + JSDocPrivateTag = 346, + JSDocProtectedTag = 347, + JSDocReadonlyTag = 348, + JSDocOverrideTag = 349, + JSDocCallbackTag = 350, + JSDocEnumTag = 351, + JSDocParameterTag = 352, + JSDocReturnTag = 353, + JSDocThisTag = 354, + JSDocTypeTag = 355, + JSDocTemplateTag = 356, + JSDocTypedefTag = 357, + JSDocSeeTag = 358, + JSDocPropertyTag = 359, + SyntaxList = 360, + NotEmittedStatement = 361, + PartiallyEmittedExpression = 362, + CommaListExpression = 363, + MergeDeclarationMarker = 364, + EndOfDeclarationMarker = 365, + SyntheticReferenceExpression = 366, + Count = 367, FirstAssignment = 63, LastAssignment = 78, FirstCompoundAssignment = 64, @@ -4523,15 +4526,15 @@ declare namespace ts { FirstReservedWord = 81, LastReservedWord = 117, FirstKeyword = 81, - LastKeyword = 164, + LastKeyword = 165, FirstFutureReservedWord = 118, LastFutureReservedWord = 126, - FirstTypeNode = 182, - LastTypeNode = 205, + FirstTypeNode = 184, + LastTypeNode = 207, FirstPunctuation = 18, LastPunctuation = 78, FirstToken = 0, - LastToken = 164, + LastToken = 165, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 8, @@ -4540,19 +4543,19 @@ declare namespace ts { LastTemplateToken = 17, FirstBinaryOperator = 29, LastBinaryOperator = 78, - FirstStatement = 244, - LastStatement = 260, - FirstNode = 165, - FirstJSDocNode = 318, - LastJSDocNode = 356, - FirstJSDocTagNode = 336, - LastJSDocTagNode = 356 + FirstStatement = 246, + LastStatement = 262, + FirstNode = 166, + FirstJSDocNode = 321, + LastJSDocNode = 359, + FirstJSDocTagNode = 339, + LastJSDocTagNode = 359 } 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; type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail; type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken; - type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.StructKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.LazyKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; + type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.StructKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.OverloadKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.LazyKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.InKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword; type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword; type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind; @@ -4693,14 +4696,14 @@ declare namespace ts { } interface JSDocContainer { } - type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AnnotationPropertyDeclaration | AnnotationDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | ExportSpecifier | CaseClause | EndOfFileToken; - type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | AnnotationPropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType; + type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AnnotationPropertyDeclaration | OverloadPropertyDeclaration | AnnotationDeclaration | OverloadDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | ExportSpecifier | CaseClause | EndOfFileToken; + type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | AnnotationPropertyDeclaration | OverloadPropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType; type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement; type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute; type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | AnnotationPropertyDeclaration | PropertyAssignment | EnumMember; type HasDecorators = ParameterDeclaration | PropertyDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ClassExpression | ClassDeclaration | StructDeclaration | FunctionDeclaration; type HasIllegalDecorators = PropertyAssignment | ShorthandPropertyAssignment | FunctionDeclaration | ConstructorDeclaration | IndexSignatureDeclaration | ClassStaticBlockDeclaration | MissingDeclaration | VariableStatement | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportDeclaration | ExportAssignment; - type HasModifiers = TypeParameterDeclaration | ParameterDeclaration | ConstructorTypeNode | PropertySignature | PropertyDeclaration | MethodSignature | MethodDeclaration | ConstructorDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | IndexSignatureDeclaration | FunctionExpression | ArrowFunction | ClassExpression | VariableStatement | FunctionDeclaration | ClassDeclaration | StructDeclaration | AnnotationDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | ExportAssignment | ExportDeclaration; + type HasModifiers = TypeParameterDeclaration | ParameterDeclaration | ConstructorTypeNode | PropertySignature | PropertyDeclaration | MethodSignature | MethodDeclaration | ConstructorDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | IndexSignatureDeclaration | FunctionExpression | ArrowFunction | ClassExpression | VariableStatement | FunctionDeclaration | ClassDeclaration | StructDeclaration | AnnotationDeclaration | OverloadDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | ExportAssignment | ExportDeclaration | OverloadPropertyDeclaration; interface NodeArray extends ReadonlyArray, ReadonlyTextRange { readonly hasTrailingComma: boolean; } @@ -4941,7 +4944,7 @@ declare namespace ts { readonly parent: ObjectLiteralExpression; readonly expression: Expression; } - type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | AnnotationPropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag; + type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | AnnotationPropertyDeclaration | OverloadPropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag; interface PropertyLikeDeclaration extends NamedDeclaration { readonly name: PropertyName; } @@ -5733,7 +5736,7 @@ declare namespace ts { type DeclarationWithTypeParameters = DeclarationWithTypeParameterChildren | JSDocTypedefTag | JSDocCallbackTag | JSDocSignature; type DeclarationWithTypeParameterChildren = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag; interface ClassLikeDeclarationBase extends NamedDeclaration, JSDocContainer { - readonly kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression | SyntaxKind.StructDeclaration | SyntaxKind.AnnotationDeclaration; + readonly kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression | SyntaxKind.StructDeclaration | SyntaxKind.AnnotationDeclaration | SyntaxKind.OverloadDeclaration; readonly name?: Identifier; readonly typeParameters?: NodeArray; readonly heritageClauses?: NodeArray; @@ -5757,6 +5760,12 @@ declare namespace ts { readonly name: Identifier; readonly members: NodeArray; } + interface OverloadDeclaration extends DeclarationStatement { + readonly kind: SyntaxKind.OverloadDeclaration; + readonly modifiers?: NodeArray; + readonly name: Identifier; + readonly members: NodeArray; + } interface ClassExpression extends ClassLikeDeclarationBase, PrimaryExpression { readonly kind: SyntaxKind.ClassExpression; readonly modifiers?: NodeArray; @@ -5770,6 +5779,16 @@ declare namespace ts { _annnotationElementBrand: any; readonly name: PropertyName; } + interface OverloadElement extends NamedDeclaration { + readonly name: PropertyName; + } + interface OverloadPropertyDeclaration extends OverloadElement, JSDocContainer { + readonly kind: SyntaxKind.OverloadPropertyDeclaration; + readonly modifiers?: NodeArray; + readonly name: PropertyName; + readonly questionToken?: QuestionToken; + readonly type?: TypeNode; + } interface TypeElement extends NamedDeclaration { _typeElementBrand: any; readonly name?: PropertyName; @@ -7891,6 +7910,8 @@ declare namespace ts { updatePropertyDeclaration(node: PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; createAnnotationPropertyDeclaration(name: string | PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): AnnotationPropertyDeclaration; updateAnnotationPropertyDeclaration(node: AnnotationPropertyDeclaration, name: string | PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): AnnotationPropertyDeclaration; + createOverloadPropertyDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined): OverloadPropertyDeclaration; + updateOverloadPropertyDeclaration(node: OverloadPropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined): OverloadPropertyDeclaration; createMethodSignature(modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): MethodSignature; updateMethodSignature(node: MethodSignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode | undefined): MethodSignature; createMethodDeclaration(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration; @@ -8090,6 +8111,8 @@ declare namespace ts { updateStructDeclaration(node: StructDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): StructDeclaration; createAnnotationDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, members: readonly AnnotationElement[]): AnnotationDeclaration; updateAnnotationDeclaration(node: AnnotationDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, members: readonly AnnotationElement[]): AnnotationDeclaration; + createOverloadDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, members: readonly OverloadElement[]): OverloadDeclaration; + updateOverloadDeclaration(node: OverloadDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, members: readonly OverloadElement[]): OverloadDeclaration; createInterfaceDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; updateInterfaceDeclaration(node: InterfaceDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; createTypeAliasDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; @@ -9270,6 +9293,7 @@ declare namespace ts { function isBindingName(node: Node): node is BindingName; function isFunctionLike(node: Node | undefined): node is SignatureDeclaration; function isAnnotationElement(node: Node): node is AnnotationElement; + function isOverloadElement(node: Node): node is OverloadElement; function isClassElement(node: Node): node is ClassElement; function isClassLike(node: Node): node is ClassLikeDeclaration; function isStruct(node: Node): node is StructDeclaration; @@ -9440,6 +9464,7 @@ declare namespace ts { function isDecorator(node: Node): node is Decorator; function isAnnotation(node: Node): node is Annotation; function isPropertySignature(node: Node): node is PropertySignature; + function isOverloadPropertyDeclaration(node: Node): node is OverloadPropertyDeclaration; function isPropertyDeclaration(node: Node): node is PropertyDeclaration; function isAnnotationPropertyDeclaration(node: Node): node is AnnotationPropertyDeclaration; function isMethodSignature(node: Node): node is MethodSignature; @@ -9538,6 +9563,7 @@ declare namespace ts { function isClassDeclaration(node: Node): node is ClassDeclaration; function isStructDeclaration(node: Node): node is StructDeclaration; function isAnnotationDeclaration(node: Node): node is AnnotationDeclaration; + function isOverloadDeclaration(node: Node): node is OverloadDeclaration; function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration; function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration; function isEnumDeclaration(node: Node): node is EnumDeclaration; diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js index 97c82046d6..f8643e0c6b 100644 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -1822,6 +1822,9 @@ __export(tsserverlibrary_exports, { isOptionalTypeNode: () => isOptionalTypeNode, isOuterExpression: () => isOuterExpression, isOutermostOptionalChain: () => isOutermostOptionalChain, + isOverloadDeclaration: () => isOverloadDeclaration, + isOverloadElement: () => isOverloadElement, + isOverloadPropertyDeclaration: () => isOverloadPropertyDeclaration, isOverrideModifier: () => isOverrideModifier, isPackedArrayLiteral: () => isPackedArrayLiteral, isParameter: () => isParameter, @@ -6457,208 +6460,211 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => { SyntaxKind5[SyntaxKind5["GlobalKeyword"] = 161] = "GlobalKeyword"; SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 162] = "BigIntKeyword"; SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 163] = "OverrideKeyword"; - SyntaxKind5[SyntaxKind5["OfKeyword"] = 164] = "OfKeyword"; - SyntaxKind5[SyntaxKind5["QualifiedName"] = 165] = "QualifiedName"; - SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 166] = "ComputedPropertyName"; - SyntaxKind5[SyntaxKind5["TypeParameter"] = 167] = "TypeParameter"; - SyntaxKind5[SyntaxKind5["Parameter"] = 168] = "Parameter"; - SyntaxKind5[SyntaxKind5["Decorator"] = 169] = "Decorator"; - SyntaxKind5[SyntaxKind5["PropertySignature"] = 170] = "PropertySignature"; - SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 171] = "PropertyDeclaration"; - SyntaxKind5[SyntaxKind5["AnnotationPropertyDeclaration"] = 172] = "AnnotationPropertyDeclaration"; - SyntaxKind5[SyntaxKind5["MethodSignature"] = 173] = "MethodSignature"; - SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 174] = "MethodDeclaration"; - SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 175] = "ClassStaticBlockDeclaration"; - SyntaxKind5[SyntaxKind5["Constructor"] = 176] = "Constructor"; - SyntaxKind5[SyntaxKind5["GetAccessor"] = 177] = "GetAccessor"; - SyntaxKind5[SyntaxKind5["SetAccessor"] = 178] = "SetAccessor"; - SyntaxKind5[SyntaxKind5["CallSignature"] = 179] = "CallSignature"; - SyntaxKind5[SyntaxKind5["ConstructSignature"] = 180] = "ConstructSignature"; - SyntaxKind5[SyntaxKind5["IndexSignature"] = 181] = "IndexSignature"; - SyntaxKind5[SyntaxKind5["TypePredicate"] = 182] = "TypePredicate"; - SyntaxKind5[SyntaxKind5["TypeReference"] = 183] = "TypeReference"; - SyntaxKind5[SyntaxKind5["FunctionType"] = 184] = "FunctionType"; - SyntaxKind5[SyntaxKind5["ConstructorType"] = 185] = "ConstructorType"; - SyntaxKind5[SyntaxKind5["TypeQuery"] = 186] = "TypeQuery"; - SyntaxKind5[SyntaxKind5["TypeLiteral"] = 187] = "TypeLiteral"; - SyntaxKind5[SyntaxKind5["ArrayType"] = 188] = "ArrayType"; - SyntaxKind5[SyntaxKind5["TupleType"] = 189] = "TupleType"; - SyntaxKind5[SyntaxKind5["OptionalType"] = 190] = "OptionalType"; - SyntaxKind5[SyntaxKind5["RestType"] = 191] = "RestType"; - SyntaxKind5[SyntaxKind5["UnionType"] = 192] = "UnionType"; - SyntaxKind5[SyntaxKind5["IntersectionType"] = 193] = "IntersectionType"; - SyntaxKind5[SyntaxKind5["ConditionalType"] = 194] = "ConditionalType"; - SyntaxKind5[SyntaxKind5["InferType"] = 195] = "InferType"; - SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 196] = "ParenthesizedType"; - SyntaxKind5[SyntaxKind5["ThisType"] = 197] = "ThisType"; - SyntaxKind5[SyntaxKind5["TypeOperator"] = 198] = "TypeOperator"; - SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 199] = "IndexedAccessType"; - SyntaxKind5[SyntaxKind5["MappedType"] = 200] = "MappedType"; - SyntaxKind5[SyntaxKind5["LiteralType"] = 201] = "LiteralType"; - SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 202] = "NamedTupleMember"; - SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 203] = "TemplateLiteralType"; - SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 204] = "TemplateLiteralTypeSpan"; - SyntaxKind5[SyntaxKind5["ImportType"] = 205] = "ImportType"; - SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 206] = "ObjectBindingPattern"; - SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 207] = "ArrayBindingPattern"; - SyntaxKind5[SyntaxKind5["BindingElement"] = 208] = "BindingElement"; - SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 209] = "ArrayLiteralExpression"; - SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 210] = "ObjectLiteralExpression"; - SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 211] = "PropertyAccessExpression"; - SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 212] = "ElementAccessExpression"; - SyntaxKind5[SyntaxKind5["CallExpression"] = 213] = "CallExpression"; - SyntaxKind5[SyntaxKind5["NewExpression"] = 214] = "NewExpression"; - SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 215] = "TaggedTemplateExpression"; - SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 216] = "TypeAssertionExpression"; - SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 217] = "ParenthesizedExpression"; - SyntaxKind5[SyntaxKind5["FunctionExpression"] = 218] = "FunctionExpression"; - SyntaxKind5[SyntaxKind5["ArrowFunction"] = 219] = "ArrowFunction"; - SyntaxKind5[SyntaxKind5["EtsComponentExpression"] = 220] = "EtsComponentExpression"; - SyntaxKind5[SyntaxKind5["DeleteExpression"] = 221] = "DeleteExpression"; - SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 222] = "TypeOfExpression"; - SyntaxKind5[SyntaxKind5["VoidExpression"] = 223] = "VoidExpression"; - SyntaxKind5[SyntaxKind5["AwaitExpression"] = 224] = "AwaitExpression"; - SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 225] = "PrefixUnaryExpression"; - SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 226] = "PostfixUnaryExpression"; - SyntaxKind5[SyntaxKind5["BinaryExpression"] = 227] = "BinaryExpression"; - SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 228] = "ConditionalExpression"; - SyntaxKind5[SyntaxKind5["TemplateExpression"] = 229] = "TemplateExpression"; - SyntaxKind5[SyntaxKind5["YieldExpression"] = 230] = "YieldExpression"; - SyntaxKind5[SyntaxKind5["SpreadElement"] = 231] = "SpreadElement"; - SyntaxKind5[SyntaxKind5["ClassExpression"] = 232] = "ClassExpression"; - SyntaxKind5[SyntaxKind5["OmittedExpression"] = 233] = "OmittedExpression"; - SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 234] = "ExpressionWithTypeArguments"; - SyntaxKind5[SyntaxKind5["AsExpression"] = 235] = "AsExpression"; - SyntaxKind5[SyntaxKind5["NonNullExpression"] = 236] = "NonNullExpression"; - SyntaxKind5[SyntaxKind5["MetaProperty"] = 237] = "MetaProperty"; - SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 238] = "SyntheticExpression"; - SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 239] = "SatisfiesExpression"; - SyntaxKind5[SyntaxKind5["TemplateSpan"] = 240] = "TemplateSpan"; - SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 241] = "SemicolonClassElement"; - SyntaxKind5[SyntaxKind5["Block"] = 242] = "Block"; - SyntaxKind5[SyntaxKind5["EmptyStatement"] = 243] = "EmptyStatement"; - SyntaxKind5[SyntaxKind5["VariableStatement"] = 244] = "VariableStatement"; - SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 245] = "ExpressionStatement"; - SyntaxKind5[SyntaxKind5["IfStatement"] = 246] = "IfStatement"; - SyntaxKind5[SyntaxKind5["DoStatement"] = 247] = "DoStatement"; - SyntaxKind5[SyntaxKind5["WhileStatement"] = 248] = "WhileStatement"; - SyntaxKind5[SyntaxKind5["ForStatement"] = 249] = "ForStatement"; - SyntaxKind5[SyntaxKind5["ForInStatement"] = 250] = "ForInStatement"; - SyntaxKind5[SyntaxKind5["ForOfStatement"] = 251] = "ForOfStatement"; - SyntaxKind5[SyntaxKind5["ContinueStatement"] = 252] = "ContinueStatement"; - SyntaxKind5[SyntaxKind5["BreakStatement"] = 253] = "BreakStatement"; - SyntaxKind5[SyntaxKind5["ReturnStatement"] = 254] = "ReturnStatement"; - SyntaxKind5[SyntaxKind5["WithStatement"] = 255] = "WithStatement"; - SyntaxKind5[SyntaxKind5["SwitchStatement"] = 256] = "SwitchStatement"; - SyntaxKind5[SyntaxKind5["LabeledStatement"] = 257] = "LabeledStatement"; - SyntaxKind5[SyntaxKind5["ThrowStatement"] = 258] = "ThrowStatement"; - SyntaxKind5[SyntaxKind5["TryStatement"] = 259] = "TryStatement"; - SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 260] = "DebuggerStatement"; - SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 261] = "VariableDeclaration"; - SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 262] = "VariableDeclarationList"; - SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 263] = "FunctionDeclaration"; - SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 264] = "ClassDeclaration"; - SyntaxKind5[SyntaxKind5["StructDeclaration"] = 265] = "StructDeclaration"; - SyntaxKind5[SyntaxKind5["AnnotationDeclaration"] = 266] = "AnnotationDeclaration"; - SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 267] = "InterfaceDeclaration"; - SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 268] = "TypeAliasDeclaration"; - SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 269] = "EnumDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 270] = "ModuleDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleBlock"] = 271] = "ModuleBlock"; - SyntaxKind5[SyntaxKind5["CaseBlock"] = 272] = "CaseBlock"; - SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 273] = "NamespaceExportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 274] = "ImportEqualsDeclaration"; - SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 275] = "ImportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportClause"] = 276] = "ImportClause"; - SyntaxKind5[SyntaxKind5["NamespaceImport"] = 277] = "NamespaceImport"; - SyntaxKind5[SyntaxKind5["NamedImports"] = 278] = "NamedImports"; - SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 279] = "ImportSpecifier"; - SyntaxKind5[SyntaxKind5["ExportAssignment"] = 280] = "ExportAssignment"; - SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 281] = "ExportDeclaration"; - SyntaxKind5[SyntaxKind5["NamedExports"] = 282] = "NamedExports"; - SyntaxKind5[SyntaxKind5["NamespaceExport"] = 283] = "NamespaceExport"; - SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 284] = "ExportSpecifier"; - SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 285] = "MissingDeclaration"; - SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 286] = "ExternalModuleReference"; - SyntaxKind5[SyntaxKind5["JsxElement"] = 287] = "JsxElement"; - SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 288] = "JsxSelfClosingElement"; - SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 289] = "JsxOpeningElement"; - SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 290] = "JsxClosingElement"; - SyntaxKind5[SyntaxKind5["JsxFragment"] = 291] = "JsxFragment"; - SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 292] = "JsxOpeningFragment"; - SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 293] = "JsxClosingFragment"; - SyntaxKind5[SyntaxKind5["JsxAttribute"] = 294] = "JsxAttribute"; - SyntaxKind5[SyntaxKind5["JsxAttributes"] = 295] = "JsxAttributes"; - SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 296] = "JsxSpreadAttribute"; - SyntaxKind5[SyntaxKind5["JsxExpression"] = 297] = "JsxExpression"; - SyntaxKind5[SyntaxKind5["CaseClause"] = 298] = "CaseClause"; - SyntaxKind5[SyntaxKind5["DefaultClause"] = 299] = "DefaultClause"; - SyntaxKind5[SyntaxKind5["HeritageClause"] = 300] = "HeritageClause"; - SyntaxKind5[SyntaxKind5["CatchClause"] = 301] = "CatchClause"; - SyntaxKind5[SyntaxKind5["AssertClause"] = 302] = "AssertClause"; - SyntaxKind5[SyntaxKind5["AssertEntry"] = 303] = "AssertEntry"; - SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 304] = "ImportTypeAssertionContainer"; - SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 305] = "PropertyAssignment"; - SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 306] = "ShorthandPropertyAssignment"; - SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 307] = "SpreadAssignment"; - SyntaxKind5[SyntaxKind5["EnumMember"] = 308] = "EnumMember"; - SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 309] = "UnparsedPrologue"; - SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 310] = "UnparsedPrepend"; - SyntaxKind5[SyntaxKind5["UnparsedText"] = 311] = "UnparsedText"; - SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 312] = "UnparsedInternalText"; - SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 313] = "UnparsedSyntheticReference"; - SyntaxKind5[SyntaxKind5["SourceFile"] = 314] = "SourceFile"; - SyntaxKind5[SyntaxKind5["Bundle"] = 315] = "Bundle"; - SyntaxKind5[SyntaxKind5["UnparsedSource"] = 316] = "UnparsedSource"; - SyntaxKind5[SyntaxKind5["InputFiles"] = 317] = "InputFiles"; - SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 318] = "JSDocTypeExpression"; - SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 319] = "JSDocNameReference"; - SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 320] = "JSDocMemberName"; - SyntaxKind5[SyntaxKind5["JSDocAllType"] = 321] = "JSDocAllType"; - SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 322] = "JSDocUnknownType"; - SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 323] = "JSDocNullableType"; - SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 324] = "JSDocNonNullableType"; - SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 325] = "JSDocOptionalType"; - SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 326] = "JSDocFunctionType"; - SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 327] = "JSDocVariadicType"; - SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 328] = "JSDocNamepathType"; - SyntaxKind5[SyntaxKind5["JSDoc"] = 329] = "JSDoc"; - SyntaxKind5[SyntaxKind5["JSDocComment"] = 329 /* JSDoc */] = "JSDocComment"; - SyntaxKind5[SyntaxKind5["JSDocText"] = 330] = "JSDocText"; - SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 331] = "JSDocTypeLiteral"; - SyntaxKind5[SyntaxKind5["JSDocSignature"] = 332] = "JSDocSignature"; - SyntaxKind5[SyntaxKind5["JSDocLink"] = 333] = "JSDocLink"; - SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 334] = "JSDocLinkCode"; - SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 335] = "JSDocLinkPlain"; - SyntaxKind5[SyntaxKind5["JSDocTag"] = 336] = "JSDocTag"; - SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 337] = "JSDocAugmentsTag"; - SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 338] = "JSDocImplementsTag"; - SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 339] = "JSDocAuthorTag"; - SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 340] = "JSDocDeprecatedTag"; - SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 341] = "JSDocClassTag"; - SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 342] = "JSDocPublicTag"; - SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 343] = "JSDocPrivateTag"; - SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 344] = "JSDocProtectedTag"; - SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 345] = "JSDocReadonlyTag"; - SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 346] = "JSDocOverrideTag"; - SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 347] = "JSDocCallbackTag"; - SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 348] = "JSDocEnumTag"; - SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 349] = "JSDocParameterTag"; - SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 350] = "JSDocReturnTag"; - SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 351] = "JSDocThisTag"; - SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 352] = "JSDocTypeTag"; - SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 353] = "JSDocTemplateTag"; - SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 354] = "JSDocTypedefTag"; - SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 355] = "JSDocSeeTag"; - SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 356] = "JSDocPropertyTag"; - SyntaxKind5[SyntaxKind5["SyntaxList"] = 357] = "SyntaxList"; - SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 358] = "NotEmittedStatement"; - SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 359] = "PartiallyEmittedExpression"; - SyntaxKind5[SyntaxKind5["CommaListExpression"] = 360] = "CommaListExpression"; - SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 361] = "MergeDeclarationMarker"; - SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 362] = "EndOfDeclarationMarker"; - SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 363] = "SyntheticReferenceExpression"; - SyntaxKind5[SyntaxKind5["Count"] = 364] = "Count"; + SyntaxKind5[SyntaxKind5["OverloadKeyword"] = 164] = "OverloadKeyword"; + SyntaxKind5[SyntaxKind5["OfKeyword"] = 165] = "OfKeyword"; + SyntaxKind5[SyntaxKind5["QualifiedName"] = 166] = "QualifiedName"; + SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 167] = "ComputedPropertyName"; + SyntaxKind5[SyntaxKind5["TypeParameter"] = 168] = "TypeParameter"; + SyntaxKind5[SyntaxKind5["Parameter"] = 169] = "Parameter"; + SyntaxKind5[SyntaxKind5["Decorator"] = 170] = "Decorator"; + SyntaxKind5[SyntaxKind5["PropertySignature"] = 171] = "PropertySignature"; + SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 172] = "PropertyDeclaration"; + SyntaxKind5[SyntaxKind5["AnnotationPropertyDeclaration"] = 173] = "AnnotationPropertyDeclaration"; + SyntaxKind5[SyntaxKind5["OverloadPropertyDeclaration"] = 174] = "OverloadPropertyDeclaration"; + SyntaxKind5[SyntaxKind5["MethodSignature"] = 175] = "MethodSignature"; + SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 176] = "MethodDeclaration"; + SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 177] = "ClassStaticBlockDeclaration"; + SyntaxKind5[SyntaxKind5["Constructor"] = 178] = "Constructor"; + SyntaxKind5[SyntaxKind5["GetAccessor"] = 179] = "GetAccessor"; + SyntaxKind5[SyntaxKind5["SetAccessor"] = 180] = "SetAccessor"; + SyntaxKind5[SyntaxKind5["CallSignature"] = 181] = "CallSignature"; + SyntaxKind5[SyntaxKind5["ConstructSignature"] = 182] = "ConstructSignature"; + SyntaxKind5[SyntaxKind5["IndexSignature"] = 183] = "IndexSignature"; + SyntaxKind5[SyntaxKind5["TypePredicate"] = 184] = "TypePredicate"; + SyntaxKind5[SyntaxKind5["TypeReference"] = 185] = "TypeReference"; + SyntaxKind5[SyntaxKind5["FunctionType"] = 186] = "FunctionType"; + SyntaxKind5[SyntaxKind5["ConstructorType"] = 187] = "ConstructorType"; + SyntaxKind5[SyntaxKind5["TypeQuery"] = 188] = "TypeQuery"; + SyntaxKind5[SyntaxKind5["TypeLiteral"] = 189] = "TypeLiteral"; + SyntaxKind5[SyntaxKind5["ArrayType"] = 190] = "ArrayType"; + SyntaxKind5[SyntaxKind5["TupleType"] = 191] = "TupleType"; + SyntaxKind5[SyntaxKind5["OptionalType"] = 192] = "OptionalType"; + SyntaxKind5[SyntaxKind5["RestType"] = 193] = "RestType"; + SyntaxKind5[SyntaxKind5["UnionType"] = 194] = "UnionType"; + SyntaxKind5[SyntaxKind5["IntersectionType"] = 195] = "IntersectionType"; + SyntaxKind5[SyntaxKind5["ConditionalType"] = 196] = "ConditionalType"; + SyntaxKind5[SyntaxKind5["InferType"] = 197] = "InferType"; + SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 198] = "ParenthesizedType"; + SyntaxKind5[SyntaxKind5["ThisType"] = 199] = "ThisType"; + SyntaxKind5[SyntaxKind5["TypeOperator"] = 200] = "TypeOperator"; + SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 201] = "IndexedAccessType"; + SyntaxKind5[SyntaxKind5["MappedType"] = 202] = "MappedType"; + SyntaxKind5[SyntaxKind5["LiteralType"] = 203] = "LiteralType"; + SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 204] = "NamedTupleMember"; + SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 205] = "TemplateLiteralType"; + SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 206] = "TemplateLiteralTypeSpan"; + SyntaxKind5[SyntaxKind5["ImportType"] = 207] = "ImportType"; + SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 208] = "ObjectBindingPattern"; + SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 209] = "ArrayBindingPattern"; + SyntaxKind5[SyntaxKind5["BindingElement"] = 210] = "BindingElement"; + SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 211] = "ArrayLiteralExpression"; + SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 212] = "ObjectLiteralExpression"; + SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 213] = "PropertyAccessExpression"; + SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 214] = "ElementAccessExpression"; + SyntaxKind5[SyntaxKind5["CallExpression"] = 215] = "CallExpression"; + SyntaxKind5[SyntaxKind5["NewExpression"] = 216] = "NewExpression"; + SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 217] = "TaggedTemplateExpression"; + SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 218] = "TypeAssertionExpression"; + SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 219] = "ParenthesizedExpression"; + SyntaxKind5[SyntaxKind5["FunctionExpression"] = 220] = "FunctionExpression"; + SyntaxKind5[SyntaxKind5["ArrowFunction"] = 221] = "ArrowFunction"; + SyntaxKind5[SyntaxKind5["EtsComponentExpression"] = 222] = "EtsComponentExpression"; + SyntaxKind5[SyntaxKind5["DeleteExpression"] = 223] = "DeleteExpression"; + SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 224] = "TypeOfExpression"; + SyntaxKind5[SyntaxKind5["VoidExpression"] = 225] = "VoidExpression"; + SyntaxKind5[SyntaxKind5["AwaitExpression"] = 226] = "AwaitExpression"; + SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 227] = "PrefixUnaryExpression"; + SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 228] = "PostfixUnaryExpression"; + SyntaxKind5[SyntaxKind5["BinaryExpression"] = 229] = "BinaryExpression"; + SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 230] = "ConditionalExpression"; + SyntaxKind5[SyntaxKind5["TemplateExpression"] = 231] = "TemplateExpression"; + SyntaxKind5[SyntaxKind5["YieldExpression"] = 232] = "YieldExpression"; + SyntaxKind5[SyntaxKind5["SpreadElement"] = 233] = "SpreadElement"; + SyntaxKind5[SyntaxKind5["ClassExpression"] = 234] = "ClassExpression"; + SyntaxKind5[SyntaxKind5["OmittedExpression"] = 235] = "OmittedExpression"; + SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 236] = "ExpressionWithTypeArguments"; + SyntaxKind5[SyntaxKind5["AsExpression"] = 237] = "AsExpression"; + SyntaxKind5[SyntaxKind5["NonNullExpression"] = 238] = "NonNullExpression"; + SyntaxKind5[SyntaxKind5["MetaProperty"] = 239] = "MetaProperty"; + SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 240] = "SyntheticExpression"; + SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 241] = "SatisfiesExpression"; + SyntaxKind5[SyntaxKind5["TemplateSpan"] = 242] = "TemplateSpan"; + SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 243] = "SemicolonClassElement"; + SyntaxKind5[SyntaxKind5["Block"] = 244] = "Block"; + SyntaxKind5[SyntaxKind5["EmptyStatement"] = 245] = "EmptyStatement"; + SyntaxKind5[SyntaxKind5["VariableStatement"] = 246] = "VariableStatement"; + SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 247] = "ExpressionStatement"; + SyntaxKind5[SyntaxKind5["IfStatement"] = 248] = "IfStatement"; + SyntaxKind5[SyntaxKind5["DoStatement"] = 249] = "DoStatement"; + SyntaxKind5[SyntaxKind5["WhileStatement"] = 250] = "WhileStatement"; + SyntaxKind5[SyntaxKind5["ForStatement"] = 251] = "ForStatement"; + SyntaxKind5[SyntaxKind5["ForInStatement"] = 252] = "ForInStatement"; + SyntaxKind5[SyntaxKind5["ForOfStatement"] = 253] = "ForOfStatement"; + SyntaxKind5[SyntaxKind5["ContinueStatement"] = 254] = "ContinueStatement"; + SyntaxKind5[SyntaxKind5["BreakStatement"] = 255] = "BreakStatement"; + SyntaxKind5[SyntaxKind5["ReturnStatement"] = 256] = "ReturnStatement"; + SyntaxKind5[SyntaxKind5["WithStatement"] = 257] = "WithStatement"; + SyntaxKind5[SyntaxKind5["SwitchStatement"] = 258] = "SwitchStatement"; + SyntaxKind5[SyntaxKind5["LabeledStatement"] = 259] = "LabeledStatement"; + SyntaxKind5[SyntaxKind5["ThrowStatement"] = 260] = "ThrowStatement"; + SyntaxKind5[SyntaxKind5["TryStatement"] = 261] = "TryStatement"; + SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 262] = "DebuggerStatement"; + SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 263] = "VariableDeclaration"; + SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 264] = "VariableDeclarationList"; + SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 265] = "FunctionDeclaration"; + SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 266] = "ClassDeclaration"; + SyntaxKind5[SyntaxKind5["StructDeclaration"] = 267] = "StructDeclaration"; + SyntaxKind5[SyntaxKind5["AnnotationDeclaration"] = 268] = "AnnotationDeclaration"; + SyntaxKind5[SyntaxKind5["OverloadDeclaration"] = 269] = "OverloadDeclaration"; + SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 270] = "InterfaceDeclaration"; + SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 271] = "TypeAliasDeclaration"; + SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 272] = "EnumDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 273] = "ModuleDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleBlock"] = 274] = "ModuleBlock"; + SyntaxKind5[SyntaxKind5["CaseBlock"] = 275] = "CaseBlock"; + SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 276] = "NamespaceExportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 277] = "ImportEqualsDeclaration"; + SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 278] = "ImportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportClause"] = 279] = "ImportClause"; + SyntaxKind5[SyntaxKind5["NamespaceImport"] = 280] = "NamespaceImport"; + SyntaxKind5[SyntaxKind5["NamedImports"] = 281] = "NamedImports"; + SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 282] = "ImportSpecifier"; + SyntaxKind5[SyntaxKind5["ExportAssignment"] = 283] = "ExportAssignment"; + SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 284] = "ExportDeclaration"; + SyntaxKind5[SyntaxKind5["NamedExports"] = 285] = "NamedExports"; + SyntaxKind5[SyntaxKind5["NamespaceExport"] = 286] = "NamespaceExport"; + SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 287] = "ExportSpecifier"; + SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 288] = "MissingDeclaration"; + SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 289] = "ExternalModuleReference"; + SyntaxKind5[SyntaxKind5["JsxElement"] = 290] = "JsxElement"; + SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 291] = "JsxSelfClosingElement"; + SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 292] = "JsxOpeningElement"; + SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 293] = "JsxClosingElement"; + SyntaxKind5[SyntaxKind5["JsxFragment"] = 294] = "JsxFragment"; + SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 295] = "JsxOpeningFragment"; + SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 296] = "JsxClosingFragment"; + SyntaxKind5[SyntaxKind5["JsxAttribute"] = 297] = "JsxAttribute"; + SyntaxKind5[SyntaxKind5["JsxAttributes"] = 298] = "JsxAttributes"; + SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 299] = "JsxSpreadAttribute"; + SyntaxKind5[SyntaxKind5["JsxExpression"] = 300] = "JsxExpression"; + SyntaxKind5[SyntaxKind5["CaseClause"] = 301] = "CaseClause"; + SyntaxKind5[SyntaxKind5["DefaultClause"] = 302] = "DefaultClause"; + SyntaxKind5[SyntaxKind5["HeritageClause"] = 303] = "HeritageClause"; + SyntaxKind5[SyntaxKind5["CatchClause"] = 304] = "CatchClause"; + SyntaxKind5[SyntaxKind5["AssertClause"] = 305] = "AssertClause"; + SyntaxKind5[SyntaxKind5["AssertEntry"] = 306] = "AssertEntry"; + SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 307] = "ImportTypeAssertionContainer"; + SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 308] = "PropertyAssignment"; + SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 309] = "ShorthandPropertyAssignment"; + SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 310] = "SpreadAssignment"; + SyntaxKind5[SyntaxKind5["EnumMember"] = 311] = "EnumMember"; + SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 312] = "UnparsedPrologue"; + SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 313] = "UnparsedPrepend"; + SyntaxKind5[SyntaxKind5["UnparsedText"] = 314] = "UnparsedText"; + SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 315] = "UnparsedInternalText"; + SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 316] = "UnparsedSyntheticReference"; + SyntaxKind5[SyntaxKind5["SourceFile"] = 317] = "SourceFile"; + SyntaxKind5[SyntaxKind5["Bundle"] = 318] = "Bundle"; + SyntaxKind5[SyntaxKind5["UnparsedSource"] = 319] = "UnparsedSource"; + SyntaxKind5[SyntaxKind5["InputFiles"] = 320] = "InputFiles"; + SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 321] = "JSDocTypeExpression"; + SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 322] = "JSDocNameReference"; + SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 323] = "JSDocMemberName"; + SyntaxKind5[SyntaxKind5["JSDocAllType"] = 324] = "JSDocAllType"; + SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 325] = "JSDocUnknownType"; + SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 326] = "JSDocNullableType"; + SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 327] = "JSDocNonNullableType"; + SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 328] = "JSDocOptionalType"; + SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 329] = "JSDocFunctionType"; + SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 330] = "JSDocVariadicType"; + SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 331] = "JSDocNamepathType"; + SyntaxKind5[SyntaxKind5["JSDoc"] = 332] = "JSDoc"; + SyntaxKind5[SyntaxKind5["JSDocComment"] = 332 /* JSDoc */] = "JSDocComment"; + SyntaxKind5[SyntaxKind5["JSDocText"] = 333] = "JSDocText"; + SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 334] = "JSDocTypeLiteral"; + SyntaxKind5[SyntaxKind5["JSDocSignature"] = 335] = "JSDocSignature"; + SyntaxKind5[SyntaxKind5["JSDocLink"] = 336] = "JSDocLink"; + SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 337] = "JSDocLinkCode"; + SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 338] = "JSDocLinkPlain"; + SyntaxKind5[SyntaxKind5["JSDocTag"] = 339] = "JSDocTag"; + SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 340] = "JSDocAugmentsTag"; + SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 341] = "JSDocImplementsTag"; + SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 342] = "JSDocAuthorTag"; + SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 343] = "JSDocDeprecatedTag"; + SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 344] = "JSDocClassTag"; + SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 345] = "JSDocPublicTag"; + SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 346] = "JSDocPrivateTag"; + SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 347] = "JSDocProtectedTag"; + SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 348] = "JSDocReadonlyTag"; + SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 349] = "JSDocOverrideTag"; + SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 350] = "JSDocCallbackTag"; + SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 351] = "JSDocEnumTag"; + SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 352] = "JSDocParameterTag"; + SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 353] = "JSDocReturnTag"; + SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 354] = "JSDocThisTag"; + SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 355] = "JSDocTypeTag"; + SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 356] = "JSDocTemplateTag"; + SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 357] = "JSDocTypedefTag"; + SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 358] = "JSDocSeeTag"; + SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 359] = "JSDocPropertyTag"; + SyntaxKind5[SyntaxKind5["SyntaxList"] = 360] = "SyntaxList"; + SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 361] = "NotEmittedStatement"; + SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 362] = "PartiallyEmittedExpression"; + SyntaxKind5[SyntaxKind5["CommaListExpression"] = 363] = "CommaListExpression"; + SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 364] = "MergeDeclarationMarker"; + SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 365] = "EndOfDeclarationMarker"; + SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 366] = "SyntheticReferenceExpression"; + SyntaxKind5[SyntaxKind5["Count"] = 367] = "Count"; SyntaxKind5[SyntaxKind5["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment"; SyntaxKind5[SyntaxKind5["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment"; SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment"; @@ -6666,15 +6672,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => { SyntaxKind5[SyntaxKind5["FirstReservedWord"] = 81 /* BreakKeyword */] = "FirstReservedWord"; SyntaxKind5[SyntaxKind5["LastReservedWord"] = 117 /* WithKeyword */] = "LastReservedWord"; SyntaxKind5[SyntaxKind5["FirstKeyword"] = 81 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind5[SyntaxKind5["LastKeyword"] = 164 /* OfKeyword */] = "LastKeyword"; + SyntaxKind5[SyntaxKind5["LastKeyword"] = 165 /* OfKeyword */] = "LastKeyword"; SyntaxKind5[SyntaxKind5["FirstFutureReservedWord"] = 118 /* ImplementsKeyword */] = "FirstFutureReservedWord"; SyntaxKind5[SyntaxKind5["LastFutureReservedWord"] = 126 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 182 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind5[SyntaxKind5["LastTypeNode"] = 205 /* ImportType */] = "LastTypeNode"; + SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 184 /* TypePredicate */] = "FirstTypeNode"; + SyntaxKind5[SyntaxKind5["LastTypeNode"] = 207 /* ImportType */] = "LastTypeNode"; SyntaxKind5[SyntaxKind5["FirstPunctuation"] = 18 /* OpenBraceToken */] = "FirstPunctuation"; SyntaxKind5[SyntaxKind5["LastPunctuation"] = 78 /* CaretEqualsToken */] = "LastPunctuation"; SyntaxKind5[SyntaxKind5["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind5[SyntaxKind5["LastToken"] = 164 /* LastKeyword */] = "LastToken"; + SyntaxKind5[SyntaxKind5["LastToken"] = 165 /* LastKeyword */] = "LastToken"; SyntaxKind5[SyntaxKind5["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; SyntaxKind5[SyntaxKind5["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; SyntaxKind5[SyntaxKind5["FirstLiteralToken"] = 8 /* NumericLiteral */] = "FirstLiteralToken"; @@ -6683,15 +6689,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => { SyntaxKind5[SyntaxKind5["LastTemplateToken"] = 17 /* TemplateTail */] = "LastTemplateToken"; SyntaxKind5[SyntaxKind5["FirstBinaryOperator"] = 29 /* LessThanToken */] = "FirstBinaryOperator"; SyntaxKind5[SyntaxKind5["LastBinaryOperator"] = 78 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind5[SyntaxKind5["FirstStatement"] = 244 /* VariableStatement */] = "FirstStatement"; - SyntaxKind5[SyntaxKind5["LastStatement"] = 260 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind5[SyntaxKind5["FirstNode"] = 165 /* QualifiedName */] = "FirstNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 318 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 356 /* JSDocPropertyTag */] = "LastJSDocNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 336 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 356 /* JSDocPropertyTag */] = "LastJSDocTagNode"; + SyntaxKind5[SyntaxKind5["FirstStatement"] = 246 /* VariableStatement */] = "FirstStatement"; + SyntaxKind5[SyntaxKind5["LastStatement"] = 262 /* DebuggerStatement */] = "LastStatement"; + SyntaxKind5[SyntaxKind5["FirstNode"] = 166 /* QualifiedName */] = "FirstNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 321 /* JSDocTypeExpression */] = "FirstJSDocNode"; + SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 359 /* JSDocPropertyTag */] = "LastJSDocNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 339 /* JSDocTag */] = "FirstJSDocTagNode"; + SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 359 /* JSDocPropertyTag */] = "LastJSDocTagNode"; SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 127 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 164 /* OfKeyword */] = "LastContextualKeyword"; + SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 165 /* OfKeyword */] = "LastContextualKeyword"; return SyntaxKind5; })(SyntaxKind || {}); var NodeFlags = /* @__PURE__ */ ((NodeFlags4) => { @@ -11709,6 +11715,7 @@ var textToKeywordObj = { protected: 123 /* ProtectedKeyword */, public: 124 /* PublicKeyword */, override: 163 /* OverrideKeyword */, + overload: 164 /* OverloadKeyword */, out: 146 /* OutKeyword */, readonly: 147 /* ReadonlyKeyword */, require: 148 /* RequireKeyword */, @@ -11739,7 +11746,7 @@ var textToKeywordObj = { yield: 126 /* YieldKeyword */, async: 133 /* AsyncKeyword */, await: 134 /* AwaitKeyword */, - of: 164 /* OfKeyword */ + of: 165 /* OfKeyword */ }; var textToKeyword = new Map2(getEntries(textToKeywordObj)); var textToToken = new Map2(getEntries({ @@ -13814,16 +13821,16 @@ function collapseTextChangeRangesAcrossMultipleVersions(changes) { return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN); } function getTypeParameterOwner(d) { - if (d && d.kind === 167 /* TypeParameter */) { + if (d && d.kind === 168 /* TypeParameter */) { for (let current = d; current; current = current.parent) { - if (isFunctionLike(current) || isClassLike(current) || current.kind === 267 /* InterfaceDeclaration */) { + if (isFunctionLike(current) || isClassLike(current) || current.kind === 270 /* InterfaceDeclaration */) { return current; } } } } function isParameterPropertyDeclaration(node, parent2) { - return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 176 /* Constructor */; + return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 178 /* Constructor */; } function isEmptyBindingPattern(node) { if (isBindingPattern(node)) { @@ -13849,14 +13856,14 @@ function getCombinedFlags(node, getFlags) { node = walkUpBindingElementsAndPatterns(node); } let flags = getFlags(node); - if (node.kind === 261 /* VariableDeclaration */) { + if (node.kind === 263 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 262 /* VariableDeclarationList */) { + if (node && node.kind === 264 /* VariableDeclarationList */) { flags |= getFlags(node); node = node.parent; } - if (node && node.kind === 244 /* VariableStatement */) { + if (node && node.kind === 246 /* VariableStatement */) { flags |= getFlags(node); } return flags; @@ -13977,30 +13984,30 @@ function nameForNamelessJSDocTypedef(declaration) { return getDeclarationIdentifier(hostNode); } switch (hostNode.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); } break; - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: let expr = hostNode.expression; - if (expr.kind === 227 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { + if (expr.kind === 229 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { expr = expr.left; } switch (expr.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return expr.name; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: const arg = expr.argumentExpression; if (isIdentifier(arg)) { return arg; } } break; - case 217 /* ParenthesizedExpression */: { + case 219 /* ParenthesizedExpression */: { return getDeclarationIdentifier(hostNode.expression); } - case 257 /* LabeledStatement */: { + case 259 /* LabeledStatement */: { if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { return getDeclarationIdentifier(hostNode.statement); } @@ -14031,16 +14038,16 @@ function getNonAssignedNameOfDeclaration(declaration) { switch (declaration.kind) { case 79 /* Identifier */: return declaration; - case 356 /* JSDocPropertyTag */: - case 349 /* JSDocParameterTag */: { + case 359 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: { const { name } = declaration; - if (name.kind === 165 /* QualifiedName */) { + if (name.kind === 166 /* QualifiedName */) { return name.right; } break; } - case 213 /* CallExpression */: - case 227 /* BinaryExpression */: { + case 215 /* CallExpression */: + case 229 /* BinaryExpression */: { const expr2 = declaration; switch (getAssignmentDeclarationKind(expr2)) { case 1 /* ExportsProperty */: @@ -14056,15 +14063,15 @@ function getNonAssignedNameOfDeclaration(declaration) { return void 0; } } - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 348 /* JSDocEnumTag */: + case 351 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); - case 280 /* ExportAssignment */: { + case 283 /* ExportAssignment */: { const { expression } = declaration; return isIdentifier(expression) ? expression : void 0; } - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: const expr = declaration; if (isBindableStaticElementAccessExpression(expr)) { return expr.argumentExpression; @@ -14278,10 +14285,10 @@ function getAllJSDocTagsOfKind(node, kind) { 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 === 330 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); + return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 333 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); } function formatJSDocLink(link) { - const kind = link.kind === 333 /* JSDocLink */ ? "link" : link.kind === 334 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; + const kind = link.kind === 336 /* JSDocLink */ ? "link" : link.kind === 337 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; const name = link.name ? entityNameToString(link.name) : ""; const space = link.name && link.text.startsWith("://") ? "" : " "; return `{@${kind} ${name}${space}${link.text}}`; @@ -14291,7 +14298,7 @@ function getEffectiveTypeParameterDeclarations(node) { return emptyArray; } if (isJSDocTypeAlias(node)) { - Debug.assert(node.parent.kind === 329 /* JSDoc */); + Debug.assert(node.parent.kind === 332 /* JSDoc */); return flatMap(node.parent.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0); } if (node.typeParameters) { @@ -14319,7 +14326,7 @@ function isMemberName(node) { return node.kind === 79 /* Identifier */ || node.kind === 80 /* PrivateIdentifier */; } function isGetOrSetAccessorDeclaration(node) { - return node.kind === 178 /* SetAccessor */ || node.kind === 177 /* GetAccessor */; + return node.kind === 180 /* SetAccessor */ || node.kind === 179 /* GetAccessor */; } function isPropertyAccessChain(node) { return isPropertyAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); @@ -14332,7 +14339,7 @@ function isCallChain(node) { } function isOptionalChain(node) { const kind = node.kind; - return !!(node.flags & 32 /* OptionalChain */) && (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */ || kind === 213 /* CallExpression */ || kind === 236 /* NonNullExpression */); + return !!(node.flags & 32 /* OptionalChain */) && (kind === 213 /* PropertyAccessExpression */ || kind === 214 /* ElementAccessExpression */ || kind === 215 /* CallExpression */ || kind === 238 /* NonNullExpression */); } function isOptionalChainRoot(node) { return isOptionalChain(node) && !isNonNullExpression(node) && !!node.questionDotToken; @@ -14344,7 +14351,7 @@ function isOutermostOptionalChain(node) { return !isOptionalChain(node.parent) || isOptionalChainRoot(node.parent) || node !== node.parent.expression; } function isNullishCoalesce(node) { - return node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; + return node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; } function isConstTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "const" && !node.typeArguments; @@ -14356,34 +14363,34 @@ function isNonNullChain(node) { return isNonNullExpression(node) && !!(node.flags & 32 /* OptionalChain */); } function isBreakOrContinueStatement(node) { - return node.kind === 253 /* BreakStatement */ || node.kind === 252 /* ContinueStatement */; + return node.kind === 255 /* BreakStatement */ || node.kind === 254 /* ContinueStatement */; } function isNamedExportBindings(node) { - return node.kind === 283 /* NamespaceExport */ || node.kind === 282 /* NamedExports */; + return node.kind === 286 /* NamespaceExport */ || node.kind === 285 /* NamedExports */; } function isUnparsedTextLike(node) { switch (node.kind) { - case 311 /* UnparsedText */: - case 312 /* UnparsedInternalText */: + case 314 /* UnparsedText */: + case 315 /* UnparsedInternalText */: return true; default: return false; } } function isUnparsedNode(node) { - return isUnparsedTextLike(node) || node.kind === 309 /* UnparsedPrologue */ || node.kind === 313 /* UnparsedSyntheticReference */; + return isUnparsedTextLike(node) || node.kind === 312 /* UnparsedPrologue */ || node.kind === 316 /* UnparsedSyntheticReference */; } function isJSDocPropertyLikeTag(node) { - return node.kind === 356 /* JSDocPropertyTag */ || node.kind === 349 /* JSDocParameterTag */; + return node.kind === 359 /* JSDocPropertyTag */ || node.kind === 352 /* JSDocParameterTag */; } function isNode(node) { return isNodeKind(node.kind); } function isNodeKind(kind) { - return kind >= 165 /* FirstNode */; + return kind >= 166 /* FirstNode */; } function isTokenKind(kind) { - return kind >= 0 /* FirstToken */ && kind <= 164 /* LastToken */; + return kind >= 0 /* FirstToken */ && kind <= 165 /* LastToken */; } function isToken(n) { return isTokenKind(n.kind); @@ -14399,11 +14406,11 @@ function isLiteralExpression(node) { } function isLiteralExpressionOfObject(node) { switch (node.kind) { - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 211 /* ArrayLiteralExpression */: case 13 /* RegularExpressionLiteral */: - case 218 /* FunctionExpression */: - case 232 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 234 /* ClassExpression */: return true; } return false; @@ -14423,13 +14430,13 @@ function isImportOrExportSpecifier(node) { } function isTypeOnlyImportOrExportDeclaration(node) { switch (node.kind) { - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return node.parent.isTypeOnly; - case 276 /* ImportClause */: - case 274 /* ImportEqualsDeclaration */: + case 279 /* ImportClause */: + case 277 /* ImportEqualsDeclaration */: return node.isTypeOnly; default: return false; @@ -14485,15 +14492,15 @@ function isModifier(node) { } function isEntityName(node) { const kind = node.kind; - return kind === 165 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 166 /* 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 === 166 /* ComputedPropertyName */; + return kind === 79 /* Identifier */ || kind === 80 /* PrivateIdentifier */ || kind === 10 /* StringLiteral */ || kind === 8 /* NumericLiteral */ || kind === 167 /* ComputedPropertyName */; } function isBindingName(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 206 /* ObjectBindingPattern */ || kind === 207 /* ArrayBindingPattern */; + return kind === 79 /* Identifier */ || kind === 208 /* ObjectBindingPattern */ || kind === 209 /* ArrayBindingPattern */; } function isFunctionLike(node) { return !!node && isFunctionLikeKind(node.kind); @@ -14509,13 +14516,13 @@ function isBooleanLiteral(node) { } function isFunctionLikeDeclarationKind(kind) { switch (kind) { - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return true; default: return false; @@ -14523,14 +14530,14 @@ function isFunctionLikeDeclarationKind(kind) { } function isFunctionLikeKind(kind) { switch (kind) { - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 332 /* JSDocSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 184 /* FunctionType */: - case 326 /* JSDocFunctionType */: - case 185 /* ConstructorType */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 335 /* JSDocSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: + case 186 /* FunctionType */: + case 329 /* JSDocFunctionType */: + case 187 /* ConstructorType */: return true; default: return isFunctionLikeDeclarationKind(kind); @@ -14541,29 +14548,33 @@ function isFunctionOrModuleBlock(node) { } function isAnnotationElement(node) { const kind = node.kind; - return kind === 172 /* AnnotationPropertyDeclaration */; + return kind === 173 /* AnnotationPropertyDeclaration */; +} +function isOverloadElement(node) { + const kind = node.kind; + return kind === 174 /* OverloadPropertyDeclaration */; } function isClassElement(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 171 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 241 /* SemicolonClassElement */; + return kind === 178 /* Constructor */ || kind === 172 /* PropertyDeclaration */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 183 /* IndexSignature */ || kind === 177 /* ClassStaticBlockDeclaration */ || kind === 243 /* SemicolonClassElement */; } function isClassLike(node) { - return node && (node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */ || node.kind === 265 /* StructDeclaration */); + return node && (node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */ || node.kind === 267 /* StructDeclaration */); } function isStruct(node) { - return node && node.kind === 265 /* StructDeclaration */; + return node && node.kind === 267 /* StructDeclaration */; } function isAccessor(node) { - return node && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */); + return node && (node.kind === 179 /* GetAccessor */ || node.kind === 180 /* SetAccessor */); } function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); } function isMethodOrAccessor(node) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return true; default: return false; @@ -14571,10 +14582,10 @@ function isMethodOrAccessor(node) { } function isNamedClassElement(node) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 171 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 172 /* PropertyDeclaration */: return true; default: return false; @@ -14585,22 +14596,22 @@ function isModifierLike(node) { } function isTypeElement(node) { const kind = node.kind; - return kind === 180 /* ConstructSignature */ || kind === 179 /* CallSignature */ || kind === 170 /* PropertySignature */ || kind === 173 /* MethodSignature */ || kind === 181 /* IndexSignature */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 182 /* ConstructSignature */ || kind === 181 /* CallSignature */ || kind === 171 /* PropertySignature */ || kind === 175 /* MethodSignature */ || kind === 183 /* IndexSignature */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function isClassOrTypeElement(node) { return isTypeElement(node) || isClassElement(node); } function isObjectLiteralElementLike(node) { const kind = node.kind; - return kind === 305 /* PropertyAssignment */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 307 /* SpreadAssignment */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 308 /* PropertyAssignment */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 310 /* SpreadAssignment */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } function isFunctionOrConstructorTypeNode(node) { switch (node.kind) { - case 184 /* FunctionType */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: return true; } return false; @@ -14608,23 +14619,23 @@ function isFunctionOrConstructorTypeNode(node) { function isBindingPattern(node) { if (node) { const kind = node.kind; - return kind === 207 /* ArrayBindingPattern */ || kind === 206 /* ObjectBindingPattern */; + return kind === 209 /* ArrayBindingPattern */ || kind === 208 /* ObjectBindingPattern */; } return false; } function isAssignmentPattern(node) { const kind = node.kind; - return kind === 209 /* ArrayLiteralExpression */ || kind === 210 /* ObjectLiteralExpression */; + return kind === 211 /* ArrayLiteralExpression */ || kind === 212 /* ObjectLiteralExpression */; } function isArrayBindingElement(node) { const kind = node.kind; - return kind === 208 /* BindingElement */ || kind === 233 /* OmittedExpression */; + return kind === 210 /* BindingElement */ || kind === 235 /* OmittedExpression */; } function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: return true; } return false; @@ -14634,78 +14645,78 @@ function isBindingOrAssignmentPattern(node) { } function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 206 /* ObjectBindingPattern */: - case 210 /* ObjectLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 212 /* ObjectLiteralExpression */: return true; } return false; } function isObjectBindingOrAssignmentElement(node) { switch (node.kind) { - case 208 /* BindingElement */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 307 /* SpreadAssignment */: + case 210 /* BindingElement */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 310 /* SpreadAssignment */: return true; } return false; } function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 209 /* ArrayBindingPattern */: + case 211 /* ArrayLiteralExpression */: return true; } return false; } function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) { const kind = node.kind; - return kind === 211 /* PropertyAccessExpression */ || kind === 165 /* QualifiedName */ || kind === 205 /* ImportType */; + return kind === 213 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */ || kind === 207 /* ImportType */; } function isPropertyAccessOrQualifiedName(node) { const kind = node.kind; - return kind === 211 /* PropertyAccessExpression */ || kind === 165 /* QualifiedName */; + return kind === 213 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */; } function isCallLikeExpression(node) { switch (node.kind) { - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 169 /* Decorator */: - case 220 /* EtsComponentExpression */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 217 /* TaggedTemplateExpression */: + case 170 /* Decorator */: + case 222 /* EtsComponentExpression */: return true; default: return false; } } function isCallOrNewExpression(node) { - return node.kind === 213 /* CallExpression */ || node.kind === 214 /* NewExpression */; + return node.kind === 215 /* CallExpression */ || node.kind === 216 /* NewExpression */; } function isTemplateLiteral(node) { const kind = node.kind; - return kind === 229 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; + return kind === 231 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); } function isLeftHandSideExpressionKind(kind) { switch (kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 214 /* NewExpression */: - case 213 /* CallExpression */: - case 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: - case 215 /* TaggedTemplateExpression */: - case 209 /* ArrayLiteralExpression */: - case 217 /* ParenthesizedExpression */: - case 210 /* ObjectLiteralExpression */: - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 220 /* EtsComponentExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 216 /* NewExpression */: + case 215 /* CallExpression */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: + case 217 /* TaggedTemplateExpression */: + case 211 /* ArrayLiteralExpression */: + case 219 /* ParenthesizedExpression */: + case 212 /* ObjectLiteralExpression */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 222 /* EtsComponentExpression */: case 79 /* Identifier */: case 80 /* PrivateIdentifier */: case 13 /* RegularExpressionLiteral */: @@ -14713,15 +14724,15 @@ function isLeftHandSideExpressionKind(kind) { case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: case 96 /* FalseKeyword */: case 105 /* NullKeyword */: case 109 /* ThisKeyword */: case 111 /* TrueKeyword */: case 107 /* SuperKeyword */: - case 236 /* NonNullExpression */: - case 234 /* ExpressionWithTypeArguments */: - case 237 /* MetaProperty */: + case 238 /* NonNullExpression */: + case 236 /* ExpressionWithTypeArguments */: + case 239 /* MetaProperty */: case 101 /* ImportKeyword */: return true; default: @@ -14733,13 +14744,13 @@ function isUnaryExpression(node) { } function isUnaryExpressionKind(kind) { switch (kind) { - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: - case 221 /* DeleteExpression */: - case 222 /* TypeOfExpression */: - case 223 /* VoidExpression */: - case 224 /* AwaitExpression */: - case 216 /* TypeAssertionExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: + case 223 /* DeleteExpression */: + case 224 /* TypeOfExpression */: + case 225 /* VoidExpression */: + case 226 /* AwaitExpression */: + case 218 /* TypeAssertionExpression */: return true; default: return isLeftHandSideExpressionKind(kind); @@ -14747,9 +14758,9 @@ function isUnaryExpressionKind(kind) { } function isUnaryExpressionWithWrite(expr) { switch (expr.kind) { - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return true; - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return expr.operator === 45 /* PlusPlusToken */ || expr.operator === 46 /* MinusMinusToken */; default: return false; @@ -14760,16 +14771,16 @@ function isExpression(node) { } function isExpressionKind(kind) { switch (kind) { - case 228 /* ConditionalExpression */: - case 230 /* YieldExpression */: - case 219 /* ArrowFunction */: - case 227 /* BinaryExpression */: - case 231 /* SpreadElement */: - case 235 /* AsExpression */: - case 233 /* OmittedExpression */: - case 360 /* CommaListExpression */: - case 359 /* PartiallyEmittedExpression */: - case 239 /* SatisfiesExpression */: + case 230 /* ConditionalExpression */: + case 232 /* YieldExpression */: + case 221 /* ArrowFunction */: + case 229 /* BinaryExpression */: + case 233 /* SpreadElement */: + case 237 /* AsExpression */: + case 235 /* OmittedExpression */: + case 363 /* CommaListExpression */: + case 362 /* PartiallyEmittedExpression */: + case 241 /* SatisfiesExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -14777,20 +14788,20 @@ function isExpressionKind(kind) { } function isAssertionExpression(node) { const kind = node.kind; - return kind === 216 /* TypeAssertionExpression */ || kind === 235 /* AsExpression */; + return kind === 218 /* TypeAssertionExpression */ || kind === 237 /* AsExpression */; } function isNotEmittedOrPartiallyEmittedNode(node) { return isNotEmittedStatement(node) || isPartiallyEmittedExpression(node); } function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return true; - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -14849,7 +14860,7 @@ function allImportsAreAnnotations(imports, resolver) { }); } function isForInOrOfStatement(node) { - return node.kind === 250 /* ForInStatement */ || node.kind === 251 /* ForOfStatement */; + return node.kind === 252 /* ForInStatement */ || node.kind === 253 /* ForOfStatement */; } function isConciseBody(node) { return isBlock(node) || isExpression(node); @@ -14862,35 +14873,35 @@ function isForInitializer(node) { } function isModuleBody(node) { const kind = node.kind; - return kind === 271 /* ModuleBlock */ || kind === 270 /* ModuleDeclaration */ || kind === 79 /* Identifier */; + return kind === 274 /* ModuleBlock */ || kind === 273 /* ModuleDeclaration */ || kind === 79 /* Identifier */; } function isNamespaceBody(node) { const kind = node.kind; - return kind === 271 /* ModuleBlock */ || kind === 270 /* ModuleDeclaration */; + return kind === 274 /* ModuleBlock */ || kind === 273 /* ModuleDeclaration */; } function isJSDocNamespaceBody(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 270 /* ModuleDeclaration */; + return kind === 79 /* Identifier */ || kind === 273 /* ModuleDeclaration */; } function isNamedImportBindings(node) { const kind = node.kind; - return kind === 278 /* NamedImports */ || kind === 277 /* NamespaceImport */; + return kind === 281 /* NamedImports */ || kind === 280 /* NamespaceImport */; } function isModuleOrEnumDeclaration(node) { - return node.kind === 270 /* ModuleDeclaration */ || node.kind === 269 /* EnumDeclaration */; + return node.kind === 273 /* ModuleDeclaration */ || node.kind === 272 /* EnumDeclaration */; } function isDeclarationKind(kind) { - return kind === 219 /* ArrowFunction */ || kind === 208 /* BindingElement */ || kind === 264 /* ClassDeclaration */ || kind === 232 /* ClassExpression */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 265 /* StructDeclaration */ || kind === 266 /* AnnotationDeclaration */ || kind === 176 /* Constructor */ || kind === 269 /* EnumDeclaration */ || kind === 308 /* EnumMember */ || kind === 284 /* ExportSpecifier */ || kind === 263 /* FunctionDeclaration */ || kind === 218 /* FunctionExpression */ || kind === 177 /* GetAccessor */ || kind === 276 /* ImportClause */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 279 /* ImportSpecifier */ || kind === 267 /* InterfaceDeclaration */ || kind === 294 /* JsxAttribute */ || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 270 /* ModuleDeclaration */ || kind === 273 /* NamespaceExportDeclaration */ || kind === 277 /* NamespaceImport */ || kind === 283 /* NamespaceExport */ || kind === 168 /* Parameter */ || kind === 305 /* PropertyAssignment */ || kind === 171 /* PropertyDeclaration */ || kind === 172 /* AnnotationPropertyDeclaration */ || kind === 170 /* PropertySignature */ || kind === 178 /* SetAccessor */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 268 /* TypeAliasDeclaration */ || kind === 167 /* TypeParameter */ || kind === 261 /* VariableDeclaration */ || kind === 354 /* JSDocTypedefTag */ || kind === 347 /* JSDocCallbackTag */ || kind === 356 /* JSDocPropertyTag */; + return kind === 221 /* ArrowFunction */ || kind === 210 /* BindingElement */ || kind === 266 /* ClassDeclaration */ || kind === 234 /* ClassExpression */ || kind === 177 /* ClassStaticBlockDeclaration */ || kind === 267 /* StructDeclaration */ || kind === 268 /* AnnotationDeclaration */ || kind === 174 /* OverloadPropertyDeclaration */ || kind === 178 /* Constructor */ || kind === 272 /* EnumDeclaration */ || kind === 311 /* EnumMember */ || kind === 287 /* ExportSpecifier */ || kind === 265 /* FunctionDeclaration */ || kind === 220 /* FunctionExpression */ || kind === 179 /* GetAccessor */ || kind === 279 /* ImportClause */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 282 /* ImportSpecifier */ || kind === 270 /* InterfaceDeclaration */ || kind === 297 /* JsxAttribute */ || kind === 176 /* MethodDeclaration */ || kind === 175 /* MethodSignature */ || kind === 273 /* ModuleDeclaration */ || kind === 276 /* NamespaceExportDeclaration */ || kind === 280 /* NamespaceImport */ || kind === 286 /* NamespaceExport */ || kind === 169 /* Parameter */ || kind === 308 /* PropertyAssignment */ || kind === 172 /* PropertyDeclaration */ || kind === 173 /* AnnotationPropertyDeclaration */ || kind === 171 /* PropertySignature */ || kind === 180 /* SetAccessor */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 271 /* TypeAliasDeclaration */ || kind === 168 /* TypeParameter */ || kind === 263 /* VariableDeclaration */ || kind === 357 /* JSDocTypedefTag */ || kind === 350 /* JSDocCallbackTag */ || kind === 359 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { - return kind === 263 /* FunctionDeclaration */ || kind === 285 /* MissingDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 265 /* StructDeclaration */ || kind === 266 /* AnnotationDeclaration */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 269 /* EnumDeclaration */ || kind === 270 /* ModuleDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 281 /* ExportDeclaration */ || kind === 280 /* ExportAssignment */ || kind === 273 /* NamespaceExportDeclaration */; + return kind === 265 /* FunctionDeclaration */ || kind === 288 /* MissingDeclaration */ || kind === 266 /* ClassDeclaration */ || kind === 267 /* StructDeclaration */ || kind === 268 /* AnnotationDeclaration */ || kind === 269 /* OverloadDeclaration */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 272 /* EnumDeclaration */ || kind === 273 /* ModuleDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 284 /* ExportDeclaration */ || kind === 283 /* ExportAssignment */ || kind === 276 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 253 /* BreakStatement */ || kind === 252 /* ContinueStatement */ || kind === 260 /* DebuggerStatement */ || kind === 247 /* DoStatement */ || kind === 245 /* ExpressionStatement */ || kind === 243 /* EmptyStatement */ || kind === 250 /* ForInStatement */ || kind === 251 /* ForOfStatement */ || kind === 249 /* ForStatement */ || kind === 246 /* IfStatement */ || kind === 257 /* LabeledStatement */ || kind === 254 /* ReturnStatement */ || kind === 256 /* SwitchStatement */ || kind === 258 /* ThrowStatement */ || kind === 259 /* TryStatement */ || kind === 244 /* VariableStatement */ || kind === 248 /* WhileStatement */ || kind === 255 /* WithStatement */ || kind === 358 /* NotEmittedStatement */ || kind === 362 /* EndOfDeclarationMarker */ || kind === 361 /* MergeDeclarationMarker */; + return kind === 255 /* BreakStatement */ || kind === 254 /* ContinueStatement */ || kind === 262 /* DebuggerStatement */ || kind === 249 /* DoStatement */ || kind === 247 /* ExpressionStatement */ || kind === 245 /* EmptyStatement */ || kind === 252 /* ForInStatement */ || kind === 253 /* ForOfStatement */ || kind === 251 /* ForStatement */ || kind === 248 /* IfStatement */ || kind === 259 /* LabeledStatement */ || kind === 256 /* ReturnStatement */ || kind === 258 /* SwitchStatement */ || kind === 260 /* ThrowStatement */ || kind === 261 /* TryStatement */ || kind === 246 /* VariableStatement */ || kind === 250 /* WhileStatement */ || kind === 257 /* WithStatement */ || kind === 361 /* NotEmittedStatement */ || kind === 365 /* EndOfDeclarationMarker */ || kind === 364 /* MergeDeclarationMarker */; } function isDeclaration(node) { - if (node.kind === 167 /* TypeParameter */) { - return node.parent && node.parent.kind !== 353 /* JSDocTemplateTag */ || isInJSFile(node); + if (node.kind === 168 /* TypeParameter */) { + return node.parent && node.parent.kind !== 356 /* JSDocTemplateTag */ || isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -14905,10 +14916,10 @@ function isStatement(node) { return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); } function isBlockStatement(node) { - if (node.kind !== 242 /* Block */) + if (node.kind !== 244 /* Block */) return false; if (node.parent !== void 0) { - if (node.parent.kind === 259 /* TryStatement */ || node.parent.kind === 301 /* CatchClause */) { + if (node.parent.kind === 261 /* TryStatement */ || node.parent.kind === 304 /* CatchClause */) { return false; } } @@ -14916,50 +14927,50 @@ function isBlockStatement(node) { } function isStatementOrBlock(node) { const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 242 /* Block */; + return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 244 /* Block */; } function isModuleReference(node) { const kind = node.kind; - return kind === 286 /* ExternalModuleReference */ || kind === 165 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 289 /* ExternalModuleReference */ || kind === 166 /* QualifiedName */ || kind === 79 /* Identifier */; } function isJsxTagNameExpression(node) { const kind = node.kind; - return kind === 109 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 211 /* PropertyAccessExpression */; + return kind === 109 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 213 /* PropertyAccessExpression */; } function isJsxChild(node) { const kind = node.kind; - return kind === 287 /* JsxElement */ || kind === 297 /* JsxExpression */ || kind === 288 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 291 /* JsxFragment */; + return kind === 290 /* JsxElement */ || kind === 300 /* JsxExpression */ || kind === 291 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 294 /* JsxFragment */; } function isJsxAttributeLike(node) { const kind = node.kind; - return kind === 294 /* JsxAttribute */ || kind === 296 /* JsxSpreadAttribute */; + return kind === 297 /* JsxAttribute */ || kind === 299 /* JsxSpreadAttribute */; } function isStringLiteralOrJsxExpression(node) { const kind = node.kind; - return kind === 10 /* StringLiteral */ || kind === 297 /* JsxExpression */; + return kind === 10 /* StringLiteral */ || kind === 300 /* JsxExpression */; } function isJsxOpeningLikeElement(node) { const kind = node.kind; - return kind === 289 /* JsxOpeningElement */ || kind === 288 /* JsxSelfClosingElement */; + return kind === 292 /* JsxOpeningElement */ || kind === 291 /* JsxSelfClosingElement */; } function isCaseOrDefaultClause(node) { const kind = node.kind; - return kind === 298 /* CaseClause */ || kind === 299 /* DefaultClause */; + return kind === 301 /* CaseClause */ || kind === 302 /* DefaultClause */; } function isJSDocNode(node) { - return node.kind >= 318 /* FirstJSDocNode */ && node.kind <= 356 /* LastJSDocNode */; + return node.kind >= 321 /* FirstJSDocNode */ && node.kind <= 359 /* LastJSDocNode */; } function isJSDocCommentContainingNode(node) { - return node.kind === 329 /* JSDoc */ || node.kind === 328 /* JSDocNamepathType */ || node.kind === 330 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 332 /* JSDoc */ || node.kind === 331 /* JSDocNamepathType */ || node.kind === 333 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } function isJSDocTag(node) { - return node.kind >= 336 /* FirstJSDocTagNode */ && node.kind <= 356 /* LastJSDocTagNode */; + return node.kind >= 339 /* FirstJSDocTagNode */ && node.kind <= 359 /* LastJSDocTagNode */; } function isSetAccessor(node) { - return node.kind === 178 /* SetAccessor */; + return node.kind === 180 /* SetAccessor */; } function isGetAccessor(node) { - return node.kind === 177 /* GetAccessor */; + return node.kind === 179 /* GetAccessor */; } function hasJSDocNodes(node) { const { jsDoc } = node; @@ -14973,23 +14984,23 @@ function hasInitializer(node) { } function hasOnlyExpressionInitializer(node) { switch (node.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 305 /* PropertyAssignment */: - case 308 /* EnumMember */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 308 /* PropertyAssignment */: + case 311 /* EnumMember */: return true; default: return false; } } function isObjectLiteralElement(node) { - return node.kind === 294 /* JsxAttribute */ || node.kind === 296 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); + return node.kind === 297 /* JsxAttribute */ || node.kind === 299 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); } function isTypeReferenceType(node) { - return node.kind === 183 /* TypeReference */ || node.kind === 234 /* ExpressionWithTypeArguments */; + return node.kind === 185 /* TypeReference */ || node.kind === 236 /* ExpressionWithTypeArguments */; } var MAX_SMI_X86 = 1073741823; function guessIndentation(lines) { @@ -15017,7 +15028,7 @@ function isStringLiteralLike(node) { return node.kind === 10 /* StringLiteral */ || node.kind === 14 /* NoSubstitutionTemplateLiteral */; } function isJSDocLinkLike(node) { - return node.kind === 333 /* JSDocLink */ || node.kind === 334 /* JSDocLinkCode */ || node.kind === 335 /* JSDocLinkPlain */; + return node.kind === 336 /* JSDocLink */ || node.kind === 337 /* JSDocLinkCode */ || node.kind === 338 /* JSDocLinkPlain */; } function hasRestParameter(s) { const last2 = lastOrUndefined(s.parameters); @@ -15025,7 +15036,7 @@ function hasRestParameter(s) { } function isRestParameter(node) { const type = isJSDocParameterTag(node) ? node.typeExpression && node.typeExpression.type : node.type; - return node.dotDotDotToken !== void 0 || !!type && type.kind === 327 /* JSDocVariadicType */; + return node.dotDotDotToken !== void 0 || !!type && type.kind === 330 /* JSDocVariadicType */; } var _MemoryUtils = class { static tryGC() { @@ -15249,7 +15260,7 @@ function aggregateChildData(node) { } } function getSourceFileOfNode(node) { - while (node && node.kind !== 314 /* SourceFile */) { + while (node && node.kind !== 317 /* SourceFile */) { node = node.parent; } return node; @@ -15262,11 +15273,11 @@ function isPlainJsFile(file, checkJs) { } function isStatementWithLocals(node) { switch (node.kind) { - case 242 /* Block */: - case 272 /* CaseBlock */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 244 /* Block */: + case 275 /* CaseBlock */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: return true; } return false; @@ -15423,7 +15434,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) { if (includeJsDoc && hasJSDocNodes(node)) { return getTokenPosOfNode(node.jsDoc[0], sourceFile); } - if (node.kind === 357 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 360 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return node.virtual ? node.pos : skipTrivia( @@ -15626,7 +15637,7 @@ function isBlockOrCatchScoped(declaration) { } function isCatchClauseVariableDeclarationOrBindingElement(declaration) { const node = getRootDeclaration(declaration); - return node.kind === 261 /* VariableDeclaration */ && node.parent.kind === 301 /* CatchClause */; + return node.kind === 263 /* VariableDeclaration */ && node.parent.kind === 304 /* CatchClause */; } function isAmbientModule(node) { return isModuleDeclaration(node) && (node.name.kind === 10 /* StringLiteral */ || isGlobalScopeAugmentation(node)); @@ -15644,10 +15655,10 @@ function isShorthandAmbientModuleSymbol(moduleSymbol) { return isShorthandAmbientModule(moduleSymbol.valueDeclaration); } function isShorthandAmbientModule(node) { - return !!node && node.kind === 270 /* ModuleDeclaration */ && !node.body; + return !!node && node.kind === 273 /* ModuleDeclaration */ && !node.body; } function isBlockScopedContainerTopLevel(node) { - return node.kind === 314 /* SourceFile */ || node.kind === 270 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); + return node.kind === 317 /* SourceFile */ || node.kind === 273 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); } function isGlobalScopeAugmentation(module2) { return !!(module2.flags & 1024 /* GlobalAugmentation */); @@ -15657,9 +15668,9 @@ function isExternalModuleAugmentation(node) { } function isModuleAugmentationExternal(node) { switch (node.parent.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: return isExternalModule(node.parent); - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); } return false; @@ -15707,34 +15718,34 @@ function isAmbientPropertyDeclaration(node) { } function isBlockScope(node, parentNode) { switch (node.kind) { - case 314 /* SourceFile */: - case 272 /* CaseBlock */: - case 301 /* CatchClause */: - case 270 /* ModuleDeclaration */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 175 /* ClassStaticBlockDeclaration */: + case 317 /* SourceFile */: + case 275 /* CaseBlock */: + case 304 /* CatchClause */: + case 273 /* ModuleDeclaration */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return true; - case 242 /* Block */: + case 244 /* Block */: return !isFunctionLikeOrClassStaticBlockDeclaration(parentNode); } return false; } function isDeclarationWithTypeParameters(node) { switch (node.kind) { - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: - case 332 /* JSDocSignature */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: + case 335 /* JSDocSignature */: return true; default: assertType(node); @@ -15743,26 +15754,26 @@ function isDeclarationWithTypeParameters(node) { } function isDeclarationWithTypeParameterChildren(node) { switch (node.kind) { - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 326 /* JSDocFunctionType */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 353 /* JSDocTemplateTag */: - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 175 /* MethodSignature */: + case 183 /* IndexSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 329 /* JSDocFunctionType */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 356 /* JSDocTemplateTag */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return true; default: assertType(node); @@ -15771,8 +15782,8 @@ function isDeclarationWithTypeParameterChildren(node) { } function isAnyImportSyntax(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: return true; default: return false; @@ -15783,17 +15794,18 @@ function isAnyImportOrBareOrAccessedRequire(node) { } function isLateVisibilityPaintedStatement(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 244 /* VariableStatement */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 263 /* FunctionDeclaration */: - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 246 /* VariableStatement */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 265 /* FunctionDeclaration */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: return true; default: return false; @@ -15826,7 +15838,7 @@ function getNameFromIndexInfo(info) { return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : void 0; } function isComputedNonLiteralName(name) { - return name.kind === 166 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); + return name.kind === 167 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); } function tryGetTextOfPropertyName(name) { switch (name.kind) { @@ -15837,7 +15849,7 @@ function tryGetTextOfPropertyName(name) { case 8 /* NumericLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return void 0; @@ -15855,15 +15867,15 @@ function entityNameToString(name) { case 80 /* PrivateIdentifier */: case 79 /* Identifier */: return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { return Debug.assertNever(name.name); } - case 320 /* JSDocMemberName */: + case 323 /* JSDocMemberName */: return entityNameToString(name.left) + entityNameToString(name.right); default: return Debug.assertNever(name); @@ -15943,7 +15955,7 @@ function getSpanOfTokenAtPosition(sourceFile, pos) { } function getErrorSpanForArrowFunction(sourceFile, node) { const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 242 /* Block */) { + if (node.body && node.body.kind === 244 /* Block */) { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { @@ -15955,37 +15967,37 @@ function getErrorSpanForArrowFunction(sourceFile, node) { function getErrorSpanForNode(sourceFile, node) { let errorNode = node; switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: const pos2 = skipTrivia(sourceFile.text, 0, false); if (pos2 === sourceFile.text.length) { return createTextSpan(0, 0); } return getSpanOfTokenAtPosition(sourceFile, pos2); - case 261 /* VariableDeclaration */: - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 268 /* TypeAliasDeclaration */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: - case 277 /* NamespaceImport */: + case 263 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 271 /* TypeAliasDeclaration */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 171 /* PropertySignature */: + case 280 /* NamespaceImport */: errorNode = node.name; break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: const start = skipTrivia(sourceFile.text, node.pos); const end = node.statements.length > 0 ? node.statements[0].pos : node.end; return createTextSpanFromBounds(start, end); @@ -16027,10 +16039,10 @@ function isLet(node) { return !!(getCombinedNodeFlags(node) & 1 /* Let */); } function isSuperCall(n) { - return n.kind === 213 /* CallExpression */ && n.expression.kind === 107 /* SuperKeyword */; + return n.kind === 215 /* CallExpression */ && n.expression.kind === 107 /* SuperKeyword */; } function isImportCall(n) { - return n.kind === 213 /* CallExpression */ && n.expression.kind === 101 /* ImportKeyword */; + return n.kind === 215 /* CallExpression */ && n.expression.kind === 101 /* ImportKeyword */; } function isImportMeta(n) { return isMetaProperty(n) && n.keywordToken === 101 /* ImportKeyword */ && n.name.escapedText === "meta"; @@ -16039,7 +16051,7 @@ function isLiteralImportTypeNode(n) { return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); } function isPrologueDirective(node) { - return node.kind === 245 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; + return node.kind === 247 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; } function isCustomPrologue(node) { return !!(getEmitFlags(node) & 1048576 /* CustomPrologue */); @@ -16054,7 +16066,7 @@ function isHoistedVariableStatement(node) { return isCustomPrologue(node) && isVariableStatement(node) && every(node.declarationList.declarations, isHoistedVariable); } function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 168 /* Parameter */ || node.kind === 167 /* TypeParameter */ || node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */ || node.kind === 217 /* ParenthesizedExpression */ || node.kind === 261 /* VariableDeclaration */ || node.kind === 284 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); + const commentRanges = node.kind === 169 /* Parameter */ || node.kind === 168 /* TypeParameter */ || node.kind === 220 /* FunctionExpression */ || node.kind === 221 /* ArrowFunction */ || node.kind === 219 /* ParenthesizedExpression */ || node.kind === 263 /* VariableDeclaration */ || node.kind === 287 /* 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*/; @@ -16062,7 +16074,7 @@ var fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*/; var defaultLibReferenceRegEx = /^(\/\/\/\s*/; function isPartOfTypeNode(node) { - if (182 /* FirstTypeNode */ <= node.kind && node.kind <= 205 /* LastTypeNode */) { + if (184 /* FirstTypeNode */ <= node.kind && node.kind <= 207 /* LastTypeNode */) { return true; } switch (node.kind) { @@ -16078,65 +16090,65 @@ function isPartOfTypeNode(node) { case 145 /* NeverKeyword */: return true; case 115 /* VoidKeyword */: - return node.parent.kind !== 223 /* VoidExpression */; - case 234 /* ExpressionWithTypeArguments */: + return node.parent.kind !== 225 /* VoidExpression */; + case 236 /* ExpressionWithTypeArguments */: return isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 167 /* TypeParameter */: - return node.parent.kind === 200 /* MappedType */ || node.parent.kind === 195 /* InferType */; + case 168 /* TypeParameter */: + return node.parent.kind === 202 /* MappedType */ || node.parent.kind === 197 /* InferType */; case 79 /* Identifier */: - if (node.parent.kind === 165 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node) { node = node.parent; - } else if (node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node) { + } else if (node.parent.kind === 213 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } Debug.assert( - node.kind === 79 /* Identifier */ || node.kind === 165 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, + node.kind === 79 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 213 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'." ); - case 165 /* QualifiedName */: - case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: case 109 /* ThisKeyword */: { const { parent: parent2 } = node; - if (parent2.kind === 186 /* TypeQuery */) { + if (parent2.kind === 188 /* TypeQuery */) { return false; } - if (parent2.kind === 205 /* ImportType */) { + if (parent2.kind === 207 /* ImportType */) { return !parent2.isTypeOf; } - if (182 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 205 /* LastTypeNode */) { + if (184 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 207 /* LastTypeNode */) { return true; } switch (parent2.kind) { - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return isHeritageClause(parent2.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent2); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return node === parent2.constraint; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return node === parent2.constraint; - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 168 /* Parameter */: - case 261 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 169 /* Parameter */: + case 263 /* VariableDeclaration */: return node === parent2.type; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return node === parent2.type; - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: return node === parent2.type; - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: return node === parent2.type; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: return contains(parent2.typeArguments, node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return false; } } @@ -16156,23 +16168,23 @@ function forEachReturnStatement(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return visitor(node); - case 272 /* CaseBlock */: - case 242 /* Block */: - case 246 /* IfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 255 /* WithStatement */: - case 256 /* SwitchStatement */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 257 /* LabeledStatement */: - case 259 /* TryStatement */: - case 301 /* CatchClause */: + case 275 /* CaseBlock */: + case 244 /* Block */: + case 248 /* IfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 257 /* WithStatement */: + case 258 /* SwitchStatement */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 259 /* LabeledStatement */: + case 261 /* TryStatement */: + case 304 /* CatchClause */: return forEachChild(node, traverse); } } @@ -16181,21 +16193,21 @@ function forEachYieldExpression(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: visitor(node); const operand = node.expression; if (operand) { traverse(operand); } return; - case 269 /* EnumDeclaration */: - case 267 /* InterfaceDeclaration */: - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 270 /* InterfaceDeclaration */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: return; default: if (isFunctionLike(node)) { - if (node.name && node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { traverse(node.name.expression); return; } @@ -16206,9 +16218,9 @@ function forEachYieldExpression(body, visitor) { } } function getRestParameterElementType(node) { - if (node && node.kind === 188 /* ArrayType */) { + if (node && node.kind === 190 /* ArrayType */) { return node.elementType; - } else if (node && node.kind === 183 /* TypeReference */) { + } else if (node && node.kind === 185 /* TypeReference */) { return singleOrUndefined(node.typeArguments); } else { return void 0; @@ -16216,27 +16228,27 @@ function getRestParameterElementType(node) { } function getMembersOfDeclaration(node) { switch (node.kind) { - case 267 /* InterfaceDeclaration */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 187 /* TypeLiteral */: + case 270 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 189 /* TypeLiteral */: return node.members; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return node.properties; } } function isVariableLike(node) { if (node) { switch (node.kind) { - case 208 /* BindingElement */: - case 308 /* EnumMember */: - case 168 /* Parameter */: - case 305 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 306 /* ShorthandPropertyAssignment */: - case 261 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 311 /* EnumMember */: + case 169 /* Parameter */: + case 308 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 309 /* ShorthandPropertyAssignment */: + case 263 /* VariableDeclaration */: return true; } } @@ -16246,7 +16258,7 @@ function isVariableLikeOrAccessor(node) { return isVariableLike(node) || isAccessor(node); } function isVariableDeclarationInVariableStatement(node) { - return node.parent.kind === 262 /* VariableDeclarationList */ && node.parent.parent.kind === 244 /* VariableStatement */; + return node.parent.kind === 264 /* VariableDeclarationList */ && node.parent.parent.kind === 246 /* VariableStatement */; } function isCommonJsExportedExpression(node) { if (!isInJSFile(node)) @@ -16263,13 +16275,13 @@ function isValidESSymbolDeclaration(node) { } function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return true; } return false; @@ -16279,20 +16291,20 @@ function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) { if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 257 /* LabeledStatement */) { + if (node.statement.kind !== 259 /* LabeledStatement */) { return node.statement; } node = node.statement; } } function isFunctionBlock(node) { - return node && node.kind === 242 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 244 /* Block */ && isFunctionLike(node.parent); } function isObjectLiteralMethod(node) { - return node && node.kind === 174 /* MethodDeclaration */ && node.parent.kind === 210 /* ObjectLiteralExpression */; + return node && node.kind === 176 /* MethodDeclaration */ && node.parent.kind === 212 /* ObjectLiteralExpression */; } function isObjectLiteralOrClassExpressionMethodOrAccessor(node) { - return (node.kind === 174 /* MethodDeclaration */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */) && (node.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.kind === 232 /* ClassExpression */); + return (node.kind === 176 /* MethodDeclaration */ || node.kind === 179 /* GetAccessor */ || node.kind === 180 /* SetAccessor */) && (node.parent.kind === 212 /* ObjectLiteralExpression */ || node.parent.kind === 234 /* ClassExpression */); } function isIdentifierTypePredicate(predicate) { return predicate && predicate.kind === 1 /* Identifier */; @@ -16302,7 +16314,7 @@ function isThisTypePredicate(predicate) { } function getPropertyAssignment(objectLiteral, key, key2) { return objectLiteral.properties.filter((property) => { - if (property.kind === 305 /* PropertyAssignment */) { + if (property.kind === 308 /* PropertyAssignment */) { const propName = tryGetTextOfPropertyName(property.name); return key === propName || !!key2 && key2 === propName; } @@ -16352,63 +16364,63 @@ function getContainingStruct(node) { return findAncestor(node.parent, isStruct); } function getThisContainer(node, includeArrowFunctions) { - Debug.assert(node.kind !== 314 /* SourceFile */); + Debug.assert(node.kind !== 317 /* SourceFile */); while (true) { node = node.parent; if (!node) { return Debug.fail(); } switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (isClassLike(node.parent.parent)) { return node; } node = node.parent; break; - case 169 /* Decorator */: - if (node.parent.kind === 168 /* Parameter */ && isClassElement(node.parent.parent)) { + case 170 /* Decorator */: + if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 270 /* ModuleDeclaration */: - case 175 /* ClassStaticBlockDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 269 /* EnumDeclaration */: - case 314 /* SourceFile */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 273 /* ModuleDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: + case 272 /* EnumDeclaration */: + case 317 /* SourceFile */: return node; } } } function isThisContainerOrFunctionBlock(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 171 /* PropertyDeclaration */: + case 221 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 172 /* PropertyDeclaration */: return true; - case 242 /* Block */: + case 244 /* Block */: switch (node.parent.kind) { - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return true; default: return false; @@ -16428,9 +16440,9 @@ function getNewTargetContainer(node) { const container = getThisContainer(node, false); if (container) { switch (container.kind) { - case 176 /* Constructor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 178 /* Constructor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return container; } } @@ -16443,26 +16455,26 @@ function getSuperContainer(node, stopOnFunctions) { return node; } switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: node = node.parent; break; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: if (!stopOnFunctions) { continue; } - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 177 /* ClassStaticBlockDeclaration */: return node; - case 169 /* Decorator */: - if (node.parent.kind === 168 /* Parameter */ && isClassElement(node.parent.parent)) { + case 170 /* Decorator */: + if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; @@ -16472,14 +16484,14 @@ function getSuperContainer(node, stopOnFunctions) { } } function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 218 /* FunctionExpression */ || func.kind === 219 /* ArrowFunction */) { + if (func.kind === 220 /* FunctionExpression */ || func.kind === 221 /* ArrowFunction */) { let prev = func; let parent2 = func.parent; - while (parent2.kind === 217 /* ParenthesizedExpression */) { + while (parent2.kind === 219 /* ParenthesizedExpression */) { prev = parent2; parent2 = parent2.parent; } - if (parent2.kind === 213 /* CallExpression */ && parent2.expression === prev) { + if (parent2.kind === 215 /* CallExpression */ && parent2.expression === prev) { return parent2; } } @@ -16489,11 +16501,11 @@ function isSuperOrSuperProperty(node) { } function isSuperProperty(node) { const kind = node.kind; - return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 107 /* SuperKeyword */; + return (kind === 213 /* PropertyAccessExpression */ || kind === 214 /* ElementAccessExpression */) && node.expression.kind === 107 /* SuperKeyword */; } function isThisProperty(node) { const kind = node.kind; - return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 109 /* ThisKeyword */; + return (kind === 213 /* PropertyAccessExpression */ || kind === 214 /* ElementAccessExpression */) && node.expression.kind === 109 /* ThisKeyword */; } function isThisInitializedDeclaration(node) { var _a2; @@ -16504,22 +16516,22 @@ function isThisInitializedObjectBindingExpression(node) { } function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return node.typeName; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return isEntityNameExpression(node.expression) ? node.expression : void 0; case 79 /* Identifier */: - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return node; } return void 0; } function getInvokedExpression(node) { switch (node.kind) { - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return node.tag; - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return node.tagName; default: return node.expression; @@ -16530,20 +16542,20 @@ function nodeCanBeDecorated(node, parent2, grandparent, compilerOptions) { return false; } switch (node.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: return true; - case 171 /* PropertyDeclaration */: - return parent2.kind === 264 /* ClassDeclaration */ || parent2.kind === 265 /* StructDeclaration */; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - return node.body !== void 0 && (parent2.kind === 264 /* ClassDeclaration */ || parent2.kind === 265 /* StructDeclaration */); - case 168 /* Parameter */: - return parent2.body !== void 0 && (parent2.kind === 176 /* Constructor */ || parent2.kind === 174 /* MethodDeclaration */ || parent2.kind === 178 /* SetAccessor */) && (grandparent.kind === 264 /* ClassDeclaration */ || grandparent.kind === 265 /* StructDeclaration */); - case 263 /* FunctionDeclaration */: + case 172 /* PropertyDeclaration */: + return parent2.kind === 266 /* ClassDeclaration */ || parent2.kind === 267 /* StructDeclaration */; + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: + return node.body !== void 0 && (parent2.kind === 266 /* ClassDeclaration */ || parent2.kind === 267 /* StructDeclaration */); + case 169 /* Parameter */: + return parent2.body !== void 0 && (parent2.kind === 178 /* Constructor */ || parent2.kind === 176 /* MethodDeclaration */ || parent2.kind === 180 /* SetAccessor */) && (grandparent.kind === 266 /* ClassDeclaration */ || grandparent.kind === 267 /* StructDeclaration */); + case 265 /* FunctionDeclaration */: return isArkTsDecorator(node, compilerOptions) || isSendableFunctionOrType(node); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return isSendableFunctionOrType(node); } return false; @@ -16556,13 +16568,13 @@ function nodeOrChildIsDecorated(node, parent2, grandparent) { } function childIsDecorated(node, parent2) { switch (node.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(m, node, parent2)); - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(m, node, parent2)); - case 174 /* MethodDeclaration */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: + case 176 /* MethodDeclaration */: + case 180 /* SetAccessor */: + case 178 /* Constructor */: return some(node.parameters, (p) => nodeIsDecorated(p, node, parent2)); default: return false; @@ -16576,7 +16588,7 @@ function classOrConstructorParameterIsDecorated(node) { } function isJSXTagName(node) { const { parent: parent2 } = node; - if (parent2.kind === 289 /* JsxOpeningElement */ || parent2.kind === 288 /* JsxSelfClosingElement */ || parent2.kind === 290 /* JsxClosingElement */) { + if (parent2.kind === 292 /* JsxOpeningElement */ || parent2.kind === 291 /* JsxSelfClosingElement */ || parent2.kind === 293 /* JsxClosingElement */) { return parent2.tagName === node; } return false; @@ -16588,55 +16600,55 @@ function isExpressionNode(node) { case 111 /* TrueKeyword */: case 96 /* FalseKeyword */: case 13 /* RegularExpressionLiteral */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 211 /* PropertyAccessExpression */: - case 220 /* EtsComponentExpression */: - case 212 /* ElementAccessExpression */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 235 /* AsExpression */: - case 216 /* TypeAssertionExpression */: - case 239 /* SatisfiesExpression */: - case 236 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: - case 218 /* FunctionExpression */: - case 232 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 223 /* VoidExpression */: - case 221 /* DeleteExpression */: - case 222 /* TypeOfExpression */: - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: - case 227 /* BinaryExpression */: - case 228 /* ConditionalExpression */: - case 231 /* SpreadElement */: - case 229 /* TemplateExpression */: - case 233 /* OmittedExpression */: - case 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: - case 230 /* YieldExpression */: - case 224 /* AwaitExpression */: - case 237 /* MetaProperty */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 213 /* PropertyAccessExpression */: + case 222 /* EtsComponentExpression */: + case 214 /* ElementAccessExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 217 /* TaggedTemplateExpression */: + case 237 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 241 /* SatisfiesExpression */: + case 238 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 220 /* FunctionExpression */: + case 234 /* ClassExpression */: + case 221 /* ArrowFunction */: + case 225 /* VoidExpression */: + case 223 /* DeleteExpression */: + case 224 /* TypeOfExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: + case 229 /* BinaryExpression */: + case 230 /* ConditionalExpression */: + case 233 /* SpreadElement */: + case 231 /* TemplateExpression */: + case 235 /* OmittedExpression */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: + case 232 /* YieldExpression */: + case 226 /* AwaitExpression */: + case 239 /* MetaProperty */: return true; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return !isHeritageClause(node.parent); - case 165 /* QualifiedName */: - while (node.parent.kind === 165 /* QualifiedName */) { + case 166 /* QualifiedName */: + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); - case 320 /* JSDocMemberName */: + return node.parent.kind === 188 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + case 323 /* JSDocMemberName */: while (isJSDocMemberName(node.parent)) { node = node.parent; } - return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + return node.parent.kind === 188 /* 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 === 102 /* InKeyword */; case 79 /* Identifier */: - if (node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { + if (node.parent.kind === 188 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { return true; } case 8 /* NumericLiteral */: @@ -16652,64 +16664,64 @@ function isExpressionNode(node) { function isInExpressionContext(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 308 /* EnumMember */: - case 305 /* PropertyAssignment */: - case 208 /* BindingElement */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 311 /* EnumMember */: + case 308 /* PropertyAssignment */: + case 210 /* BindingElement */: return parent2.initializer === node; - case 245 /* ExpressionStatement */: - case 246 /* IfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 254 /* ReturnStatement */: - case 255 /* WithStatement */: - case 256 /* SwitchStatement */: - case 298 /* CaseClause */: - case 258 /* ThrowStatement */: + case 247 /* ExpressionStatement */: + case 248 /* IfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 256 /* ReturnStatement */: + case 257 /* WithStatement */: + case 258 /* SwitchStatement */: + case 301 /* CaseClause */: + case 260 /* ThrowStatement */: return parent2.expression === node; - case 249 /* ForStatement */: + case 251 /* ForStatement */: const forStatement = parent2; - return forStatement.initializer === node && forStatement.initializer.kind !== 262 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + return forStatement.initializer === node && forStatement.initializer.kind !== 264 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: const forInStatement = parent2; - return forInStatement.initializer === node && forInStatement.initializer.kind !== 262 /* VariableDeclarationList */ || forInStatement.expression === node; - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + return forInStatement.initializer === node && forInStatement.initializer.kind !== 264 /* VariableDeclarationList */ || forInStatement.expression === node; + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: return node === parent2.expression; - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return node === parent2.expression; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return node === parent2.expression; - case 169 /* Decorator */: - case 297 /* JsxExpression */: - case 296 /* JsxSpreadAttribute */: - case 307 /* SpreadAssignment */: + case 170 /* Decorator */: + case 300 /* JsxExpression */: + case 299 /* JsxSpreadAttribute */: + case 310 /* SpreadAssignment */: return true; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return parent2.expression === node && !isPartOfTypeNode(parent2); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return parent2.objectAssignmentInitializer === node; - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return node === parent2.expression; default: return isExpressionNode(parent2); } } function isPartOfTypeQuery(node) { - while (node.kind === 165 /* QualifiedName */ || node.kind === 79 /* Identifier */) { + while (node.kind === 166 /* QualifiedName */ || node.kind === 79 /* Identifier */) { node = node.parent; } - return node.kind === 186 /* TypeQuery */; + return node.kind === 188 /* TypeQuery */; } function isNamespaceReexportDeclaration(node) { return isNamespaceExport(node) && !!node.parent.moduleSpecifier; } function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 274 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 286 /* ExternalModuleReference */; + return node.kind === 277 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 289 /* ExternalModuleReference */; } function getExternalModuleImportEqualsDeclarationExpression(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node)); @@ -16719,7 +16731,7 @@ function getExternalModuleRequireArgument(node) { return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0]; } function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 274 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 286 /* ExternalModuleReference */; + return node.kind === 277 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 289 /* ExternalModuleReference */; } function isSourceFileJS(file) { return isInJSFile(file); @@ -16778,7 +16790,7 @@ function isInStruct(node) { return !!container && isStruct(container); } function isRequireCall(callExpression, requireStringLiteralLikeArgument) { - if (callExpression.kind !== 213 /* CallExpression */) { + if (callExpression.kind !== 215 /* CallExpression */) { return false; } const { expression, arguments: args } = callExpression; @@ -16840,9 +16852,9 @@ function getAssignedExpandoInitializer(node) { function getExpandoInitializer(initializer, isPrototypeAssignment) { if (isCallExpression(initializer)) { const e = skipParentheses(initializer.expression); - return e.kind === 218 /* FunctionExpression */ || e.kind === 219 /* ArrowFunction */ ? initializer : void 0; + return e.kind === 220 /* FunctionExpression */ || e.kind === 221 /* ArrowFunction */ ? initializer : void 0; } - if (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 232 /* ClassExpression */ || initializer.kind === 219 /* ArrowFunction */) { + if (initializer.kind === 220 /* FunctionExpression */ || initializer.kind === 234 /* ClassExpression */ || initializer.kind === 221 /* ArrowFunction */) { return initializer; } if (isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAssignment)) { @@ -17004,7 +17016,7 @@ function isPrototypePropertyAssignment(node) { return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 3 /* PrototypeProperty */; } function isSpecialPropertyDeclaration(expr) { - return isInJSFile(expr) && expr.parent && expr.parent.kind === 245 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); + return isInJSFile(expr) && expr.parent && expr.parent.kind === 247 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); } function setValueDeclaration(symbol, node) { const { valueDeclaration } = symbol; @@ -17017,16 +17029,16 @@ function isFunctionSymbol(symbol) { return false; } const decl = symbol.valueDeclaration; - return decl.kind === 263 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); + return decl.kind === 265 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); } function tryGetModuleSpecifierFromDeclaration(node) { var _a2, _b; switch (node.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return (_a2 = findAncestor(node.initializer, (node2) => isRequireCall(node2, true))) == null ? void 0 : _a2.arguments[0]; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return tryCast(node.moduleSpecifier, isStringLiteralLike); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); default: Debug.assertNever(node); @@ -17037,14 +17049,14 @@ function importFromModuleSpecifier(node) { } function tryGetImportFromModuleSpecifier(node) { switch (node.parent.kind) { - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: return node.parent; - case 286 /* ExternalModuleReference */: + case 289 /* ExternalModuleReference */: return node.parent.parent; - case 213 /* CallExpression */: + case 215 /* CallExpression */: return isImportCall(node.parent) || isRequireCall(node.parent, false) ? node.parent : void 0; - case 201 /* LiteralType */: + case 203 /* LiteralType */: Debug.assert(isStringLiteral(node)); return tryCast(node.parent.parent, isImportTypeNode); default: @@ -17053,16 +17065,16 @@ function tryGetImportFromModuleSpecifier(node) { } function getExternalModuleName(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: return node.moduleSpecifier; - case 274 /* ImportEqualsDeclaration */: - return node.moduleReference.kind === 286 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; - case 205 /* ImportType */: + case 277 /* ImportEqualsDeclaration */: + return node.moduleReference.kind === 289 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; + case 207 /* ImportType */: return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; - case 213 /* CallExpression */: + case 215 /* CallExpression */: return node.arguments[0]; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return node.name.kind === 10 /* StringLiteral */ ? node.name : void 0; default: return Debug.assertNever(node); @@ -17070,18 +17082,18 @@ function getExternalModuleName(node) { } function getNamespaceDeclarationNode(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return node; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return node.exportClause && tryCast(node.exportClause, isNamespaceExport); default: return Debug.assertNever(node); } } function isDefaultImport(node) { - return node.kind === 275 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; + return node.kind === 278 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } function forEachImportClauseDeclaration(node, action) { if (node.name) { @@ -17098,13 +17110,13 @@ function forEachImportClauseDeclaration(node, action) { function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 168 /* Parameter */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 306 /* ShorthandPropertyAssignment */: - case 305 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 169 /* Parameter */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 309 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return node.questionToken !== void 0; } } @@ -17116,7 +17128,7 @@ function isJSDocConstructSignature(node) { return !!name && name.escapedText === "new"; } function isJSDocTypeAlias(node) { - return node.kind === 354 /* JSDocTypedefTag */ || node.kind === 347 /* JSDocCallbackTag */ || node.kind === 348 /* JSDocEnumTag */; + return node.kind === 357 /* JSDocTypedefTag */ || node.kind === 350 /* JSDocCallbackTag */ || node.kind === 351 /* JSDocEnumTag */; } function isTypeAlias(node) { return isJSDocTypeAlias(node) || isTypeAliasDeclaration(node); @@ -17129,14 +17141,14 @@ function getSourceOfDefaultedAssignment(node) { } function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: const v = getSingleVariableOfVariableStatement(node); return v && v.initializer; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer; - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return node.initializer; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return node.initializer; } } @@ -17144,7 +17156,7 @@ function getSingleVariableOfVariableStatement(node) { return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; } function getNestedModuleDeclaration(node) { - return isModuleDeclaration(node) && node.body && node.body.kind === 270 /* ModuleDeclaration */ ? node.body : void 0; + return isModuleDeclaration(node) && node.body && node.body.kind === 273 /* ModuleDeclaration */ ? node.body : void 0; } function getJSDocCommentsAndTags(hostNode, noCache) { let result; @@ -17156,11 +17168,11 @@ function getJSDocCommentsAndTags(hostNode, noCache) { if (hasJSDocNodes(node)) { result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc))); } - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node)); break; } - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node)); break; } @@ -17180,7 +17192,7 @@ function ownsJSDocTag(hostNode, tag) { } function getNextJSDocCommentLocation(node) { const parent2 = node.parent; - if (parent2.kind === 305 /* PropertyAssignment */ || parent2.kind === 280 /* ExportAssignment */ || parent2.kind === 171 /* PropertyDeclaration */ || parent2.kind === 245 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 254 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 63 /* EqualsToken */) { + if (parent2.kind === 308 /* PropertyAssignment */ || parent2.kind === 283 /* ExportAssignment */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 247 /* ExpressionStatement */ && node.kind === 213 /* PropertyAccessExpression */ || parent2.kind === 256 /* 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; @@ -17256,32 +17268,32 @@ function getAssignmentTargetKind(node) { let parent2 = node.parent; while (true) { switch (parent2.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const binaryOperator = parent2.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent2.left === node ? binaryOperator === 63 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: const unaryOperator = parent2.operator; return unaryOperator === 45 /* PlusPlusToken */ || unaryOperator === 46 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: return parent2.initializer === node ? 1 /* Definite */ : 0 /* None */; - case 217 /* ParenthesizedExpression */: - case 209 /* ArrayLiteralExpression */: - case 231 /* SpreadElement */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 211 /* ArrayLiteralExpression */: + case 233 /* SpreadElement */: + case 238 /* NonNullExpression */: node = parent2; break; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: node = parent2.parent; break; - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: if (parent2.name !== node) { return 0 /* None */; } node = parent2.parent; break; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (parent2.name === node) { return 0 /* None */; } @@ -17298,22 +17310,22 @@ function isAssignmentTarget(node) { } function isNodeWithPossibleHoistedDeclaration(node) { switch (node.kind) { - case 242 /* Block */: - case 244 /* VariableStatement */: - case 255 /* WithStatement */: - case 246 /* IfStatement */: - case 256 /* SwitchStatement */: - case 272 /* CaseBlock */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 257 /* LabeledStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 259 /* TryStatement */: - case 301 /* CatchClause */: + case 244 /* Block */: + case 246 /* VariableStatement */: + case 257 /* WithStatement */: + case 248 /* IfStatement */: + case 258 /* SwitchStatement */: + case 275 /* CaseBlock */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 259 /* LabeledStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 261 /* TryStatement */: + case 304 /* CatchClause */: return true; } return false; @@ -17328,14 +17340,14 @@ function walkUp(node, kind) { return node; } function walkUpParenthesizedTypes(node) { - return walkUp(node, 196 /* ParenthesizedType */); + return walkUp(node, 198 /* ParenthesizedType */); } function walkUpParenthesizedExpressions(node) { - return walkUp(node, 217 /* ParenthesizedExpression */); + return walkUp(node, 219 /* ParenthesizedExpression */); } function walkUpParenthesizedTypesAndGetParentAndChild(node) { let child; - while (node && node.kind === 196 /* ParenthesizedType */) { + while (node && node.kind === 198 /* ParenthesizedType */) { child = node; node = node.parent; } @@ -17351,11 +17363,11 @@ function skipParentheses(node, excludeJSDocTypeAssertions) { return skipOuterExpressions(node, flags); } function isDeleteTarget(node) { - if (node.kind !== 211 /* PropertyAccessExpression */ && node.kind !== 212 /* ElementAccessExpression */) { + if (node.kind !== 213 /* PropertyAccessExpression */ && node.kind !== 214 /* ElementAccessExpression */) { return false; } node = walkUpParenthesizedExpressions(node.parent); - return node && node.kind === 221 /* DeleteExpression */; + return node && node.kind === 223 /* DeleteExpression */; } function isNodeDescendantOf(node, ancestor) { while (node) { @@ -17393,56 +17405,56 @@ function getDeclarationFromName(name) { } } function isLiteralComputedPropertyDeclarationName(node) { - return isStringOrNumericLiteralLike(node) && node.parent.kind === 166 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); + return isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); } function isIdentifierName(node) { const parent2 = node.parent; switch (parent2.kind) { - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 308 /* EnumMember */: - case 305 /* PropertyAssignment */: - case 211 /* PropertyAccessExpression */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 311 /* EnumMember */: + case 308 /* PropertyAssignment */: + case 213 /* PropertyAccessExpression */: return parent2.name === node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return parent2.right === node; - case 208 /* BindingElement */: - case 279 /* ImportSpecifier */: + case 210 /* BindingElement */: + case 282 /* ImportSpecifier */: return parent2.propertyName === node; - case 284 /* ExportSpecifier */: - case 294 /* JsxAttribute */: - case 288 /* JsxSelfClosingElement */: - case 289 /* JsxOpeningElement */: - case 290 /* JsxClosingElement */: + case 287 /* ExportSpecifier */: + case 297 /* JsxAttribute */: + case 291 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 293 /* JsxClosingElement */: return true; } return false; } function isAliasSymbolDeclaration(node) { - if (node.kind === 274 /* ImportEqualsDeclaration */ || node.kind === 273 /* NamespaceExportDeclaration */ || node.kind === 276 /* ImportClause */ && !!node.name || node.kind === 277 /* NamespaceImport */ || node.kind === 283 /* NamespaceExport */ || node.kind === 279 /* ImportSpecifier */ || node.kind === 284 /* ExportSpecifier */ || node.kind === 280 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { + if (node.kind === 277 /* ImportEqualsDeclaration */ || node.kind === 276 /* NamespaceExportDeclaration */ || node.kind === 279 /* ImportClause */ && !!node.name || node.kind === 280 /* NamespaceImport */ || node.kind === 286 /* NamespaceExport */ || node.kind === 282 /* ImportSpecifier */ || node.kind === 287 /* ExportSpecifier */ || node.kind === 283 /* 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 276 /* ImportClause */: - case 279 /* ImportSpecifier */: - case 277 /* NamespaceImport */: - case 284 /* ExportSpecifier */: - case 280 /* ExportAssignment */: - case 274 /* ImportEqualsDeclaration */: - case 283 /* NamespaceExport */: + case 279 /* ImportClause */: + case 282 /* ImportSpecifier */: + case 280 /* NamespaceImport */: + case 287 /* ExportSpecifier */: + case 283 /* ExportAssignment */: + case 277 /* ImportEqualsDeclaration */: + case 286 /* NamespaceExport */: return node.parent; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.parent; - } while (node.parent.kind === 165 /* QualifiedName */); + } while (node.parent.kind === 166 /* QualifiedName */); return getAliasDeclarationFromName(node); } } @@ -17457,7 +17469,7 @@ function getExportAssignmentExpression(node) { return isExportAssignment(node) ? node.expression : node.right; } function getPropertyAssignmentAliasLikeExpression(node) { - return node.kind === 306 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 305 /* PropertyAssignment */ ? node.initializer : node.parent.right; + return node.kind === 309 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 308 /* PropertyAssignment */ ? node.initializer : node.parent.right; } function getEffectiveBaseTypeNode(node) { const baseType = getClassExtendsHeritageElement(node); @@ -17542,10 +17554,10 @@ function getVirtualEtsComponent(node) { return void 0; } function isKeyword(token) { - return 81 /* FirstKeyword */ <= token && token <= 164 /* LastKeyword */; + return 81 /* FirstKeyword */ <= token && token <= 165 /* LastKeyword */; } function isContextualKeyword(token) { - return 127 /* FirstContextualKeyword */ <= token && token <= 164 /* LastContextualKeyword */; + return 127 /* FirstContextualKeyword */ <= token && token <= 165 /* LastContextualKeyword */; } function isNonContextualKeyword(token) { return isKeyword(token) && !isContextualKeyword(token); @@ -17581,13 +17593,13 @@ function getFunctionFlags(node) { } let flags = 0 /* Normal */; switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: if (node.asteriskToken) { flags |= 1 /* Generator */; } - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: if (hasSyntacticModifier(node, 512 /* Async */)) { flags |= 2 /* Async */; } @@ -17600,10 +17612,10 @@ function getFunctionFlags(node) { } function isAsyncFunction(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */); } return false; @@ -17619,7 +17631,7 @@ function hasDynamicName(declaration) { return !!name && isDynamicName(name); } function isDynamicName(name) { - if (!(name.kind === 166 /* ComputedPropertyName */ || name.kind === 212 /* ElementAccessExpression */)) { + if (!(name.kind === 167 /* ComputedPropertyName */ || name.kind === 214 /* ElementAccessExpression */)) { return false; } const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; @@ -17633,7 +17645,7 @@ function getPropertyNameForPropertyNameNode(name) { case 10 /* StringLiteral */: case 8 /* NumericLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -17685,17 +17697,17 @@ function isPushOrUnshiftIdentifier(node) { } function isParameterDeclaration(node) { const root = getRootDeclaration(node); - return root.kind === 168 /* Parameter */; + return root.kind === 169 /* Parameter */; } function getRootDeclaration(node) { - while (node.kind === 208 /* BindingElement */) { + while (node.kind === 210 /* BindingElement */) { node = node.parent.parent; } return node; } function nodeStartsNewLexicalEnvironment(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 218 /* FunctionExpression */ || kind === 263 /* FunctionDeclaration */ || kind === 219 /* ArrowFunction */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 270 /* ModuleDeclaration */ || kind === 314 /* SourceFile */; + return kind === 178 /* Constructor */ || kind === 220 /* FunctionExpression */ || kind === 265 /* FunctionDeclaration */ || kind === 221 /* ArrowFunction */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 273 /* ModuleDeclaration */ || kind === 317 /* SourceFile */; } function nodeIsSynthesized(range) { return positionIsSynthesized(range.pos) || positionIsSynthesized(range.end); @@ -17710,22 +17722,22 @@ var Associativity = /* @__PURE__ */ ((Associativity2) => { })(Associativity || {}); function getExpressionAssociativity(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 216 /* NewExpression */ && expression.arguments !== void 0; return getOperatorAssociativity(expression.kind, operator, hasArguments); } function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 214 /* NewExpression */: + case 216 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 225 /* PrefixUnaryExpression */: - case 222 /* TypeOfExpression */: - case 223 /* VoidExpression */: - case 221 /* DeleteExpression */: - case 224 /* AwaitExpression */: - case 228 /* ConditionalExpression */: - case 230 /* YieldExpression */: + case 227 /* PrefixUnaryExpression */: + case 224 /* TypeOfExpression */: + case 225 /* VoidExpression */: + case 223 /* DeleteExpression */: + case 226 /* AwaitExpression */: + case 230 /* ConditionalExpression */: + case 232 /* YieldExpression */: return 1 /* Right */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (operator) { case 42 /* AsteriskAsteriskToken */: case 63 /* EqualsToken */: @@ -17751,13 +17763,13 @@ function getOperatorAssociativity(kind, operator, hasArguments) { } function getExpressionPrecedence(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 216 /* NewExpression */ && expression.arguments !== void 0; return getOperatorPrecedence(expression.kind, operator, hasArguments); } function getOperator(expression) { - if (expression.kind === 227 /* BinaryExpression */) { + if (expression.kind === 229 /* BinaryExpression */) { return expression.operatorToken.kind; - } else if (expression.kind === 225 /* PrefixUnaryExpression */ || expression.kind === 226 /* PostfixUnaryExpression */) { + } else if (expression.kind === 227 /* PrefixUnaryExpression */ || expression.kind === 228 /* PostfixUnaryExpression */) { return expression.operator; } else { return expression.kind; @@ -17793,15 +17805,15 @@ var OperatorPrecedence = /* @__PURE__ */ ((OperatorPrecedence2) => { })(OperatorPrecedence || {}); function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return 0 /* Comma */; - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return 1 /* Spread */; - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return 2 /* Yield */; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return 4 /* Conditional */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (operatorKind) { case 27 /* CommaToken */: return 0 /* Comma */; @@ -17825,27 +17837,27 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { default: return getBinaryOperatorPrecedence(operatorKind); } - case 216 /* TypeAssertionExpression */: - case 236 /* NonNullExpression */: - case 225 /* PrefixUnaryExpression */: - case 222 /* TypeOfExpression */: - case 223 /* VoidExpression */: - case 221 /* DeleteExpression */: - case 224 /* AwaitExpression */: + case 218 /* TypeAssertionExpression */: + case 238 /* NonNullExpression */: + case 227 /* PrefixUnaryExpression */: + case 224 /* TypeOfExpression */: + case 225 /* VoidExpression */: + case 223 /* DeleteExpression */: + case 226 /* AwaitExpression */: return 16 /* Unary */; - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return 17 /* Update */; - case 213 /* CallExpression */: + case 215 /* CallExpression */: return 18 /* LeftHandSide */; - case 214 /* NewExpression */: + case 216 /* NewExpression */: return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */; - case 215 /* TaggedTemplateExpression */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 237 /* MetaProperty */: + case 217 /* TaggedTemplateExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 239 /* MetaProperty */: return 19 /* Member */; - case 235 /* AsExpression */: - case 239 /* SatisfiesExpression */: + case 237 /* AsExpression */: + case 241 /* SatisfiesExpression */: return 11 /* Relational */; case 109 /* ThisKeyword */: case 107 /* SuperKeyword */: @@ -17857,19 +17869,19 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 232 /* ClassExpression */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 234 /* ClassExpression */: case 13 /* RegularExpressionLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 229 /* TemplateExpression */: - case 217 /* ParenthesizedExpression */: - case 233 /* OmittedExpression */: - case 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: + case 231 /* TemplateExpression */: + case 219 /* ParenthesizedExpression */: + case 235 /* OmittedExpression */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: return 20 /* Primary */; default: return -1 /* Invalid */; @@ -17922,7 +17934,7 @@ function getBinaryOperatorPrecedence(kind) { function getSemanticJsxChildren(children) { return filter(children, (i) => { switch (i.kind) { - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return !!i.expression; case 11 /* JsxText */: return !i.containsOnlyTriviaWhiteSpaces; @@ -18313,7 +18325,7 @@ function isThisInTypeQuery(node) { while (isQualifiedName(node.parent) && node.parent.left === node) { node = node.parent; } - return node.parent.kind === 186 /* TypeQuery */; + return node.parent.kind === 188 /* TypeQuery */; } function identifierIsThisKeyword(id) { return id.originalKeywordKind === 109 /* ThisKeyword */; @@ -18325,9 +18337,9 @@ function getAllAccessorDeclarations(declarations, accessor) { let setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 177 /* GetAccessor */) { + if (accessor.kind === 179 /* GetAccessor */) { getAccessor = accessor; - } else if (accessor.kind === 178 /* SetAccessor */) { + } else if (accessor.kind === 180 /* SetAccessor */) { setAccessor = accessor; } else { Debug.fail("Accessor has wrong kind"); @@ -18343,10 +18355,10 @@ function getAllAccessorDeclarations(declarations, accessor) { } else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 177 /* GetAccessor */ && !getAccessor) { + if (member.kind === 179 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 178 /* SetAccessor */ && !setAccessor) { + if (member.kind === 180 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -18378,7 +18390,7 @@ function getJSDocTypeParameterDeclarations(node) { return flatMap(getJSDocTags(node), (tag) => isNonTypeAliasTemplate(tag) ? tag.typeParameters : void 0); } function isNonTypeAliasTemplate(tag) { - return isJSDocTemplateTag(tag) && !(tag.parent.kind === 329 /* JSDoc */ && tag.parent.tags.some(isJSDocTypeAlias)); + return isJSDocTemplateTag(tag) && !(tag.parent.kind === 332 /* JSDoc */ && tag.parent.tags.some(isJSDocTypeAlias)); } function getEffectiveSetAccessorTypeAnnotationNode(node) { const parameter = getSetAccessorValueParameter(node); @@ -18563,7 +18575,7 @@ function getSelectedSyntacticModifierFlags(node, flags) { return getSyntacticModifierFlags(node) & flags; } function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { - if (node.kind >= 0 /* FirstToken */ && node.kind <= 164 /* LastToken */) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 165 /* LastToken */) { return 0 /* None */; } if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { @@ -18654,7 +18666,7 @@ function modifierToFlag(token) { return 32768 /* In */; case 146 /* OutKeyword */: return 65536 /* Out */; - case 169 /* Decorator */: + case 170 /* Decorator */: return 131072 /* Decorator */; } return 0 /* None */; @@ -18687,7 +18699,7 @@ function isLeftHandSideOfAssignment(node) { function isDestructuringAssignment(node) { if (isAssignmentExpression(node, true)) { const kind = node.left.kind; - return kind === 210 /* ObjectLiteralExpression */ || kind === 209 /* ArrayLiteralExpression */; + return kind === 212 /* ObjectLiteralExpression */ || kind === 211 /* ArrayLiteralExpression */; } return false; } @@ -18701,12 +18713,12 @@ function getFirstIdentifier(node) { switch (node.kind) { case 79 /* Identifier */: return node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.left; } while (node.kind !== 79 /* Identifier */); return node; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: do { node = node.expression; } while (node.kind !== 79 /* Identifier */); @@ -18714,7 +18726,7 @@ function getFirstIdentifier(node) { } } function isDottedName(node) { - return node.kind === 79 /* Identifier */ || node.kind === 109 /* ThisKeyword */ || node.kind === 107 /* SuperKeyword */ || node.kind === 237 /* MetaProperty */ || node.kind === 211 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 217 /* ParenthesizedExpression */ && isDottedName(node.expression); + return node.kind === 79 /* Identifier */ || node.kind === 109 /* ThisKeyword */ || node.kind === 107 /* SuperKeyword */ || node.kind === 239 /* MetaProperty */ || node.kind === 213 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 219 /* ParenthesizedExpression */ && isDottedName(node.expression); } function isPropertyAccessEntityNameExpression(node) { return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); @@ -18739,7 +18751,7 @@ function isPrototypeAccess(node) { return isBindableStaticAccessExpression(node) && getElementOrPropertyAccessName(node) === "prototype"; } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return node.parent.kind === 165 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node; + return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 213 /* PropertyAccessExpression */ && node.parent.name === node; } function isRightSideOfAccessExpression(node) { return isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node; @@ -18748,10 +18760,10 @@ 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 === 210 /* ObjectLiteralExpression */ && expression.properties.length === 0; + return expression.kind === 212 /* ObjectLiteralExpression */ && expression.properties.length === 0; } function isEmptyArrayLiteral(expression) { - return expression.kind === 209 /* ArrayLiteralExpression */ && expression.elements.length === 0; + return expression.kind === 211 /* ArrayLiteralExpression */ && expression.elements.length === 0; } function getLocalSymbolForExportDefault(symbol) { if (!isExportDefaultSymbol(symbol) || !symbol.declarations) @@ -18979,8 +18991,8 @@ function isDeclarationNameOfEnumOrNamespace(node) { const parseNode = getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 269 /* EnumDeclaration */: - case 270 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 273 /* ModuleDeclaration */: return parseNode === parseNode.parent.name; } } @@ -19041,30 +19053,30 @@ function accessKind(node) { if (!parent2) return 0 /* Read */; switch (parent2.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return accessKind(parent2); - case 226 /* PostfixUnaryExpression */: - case 225 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: const { operator } = parent2; return operator === 45 /* PlusPlusToken */ || operator === 46 /* MinusMinusToken */ ? writeOrReadWrite() : 0 /* Read */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const { left, operatorToken } = parent2; return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 63 /* EqualsToken */ ? 1 /* Write */ : writeOrReadWrite() : 0 /* Read */; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return parent2.name !== node ? 0 /* Read */ : accessKind(parent2); - case 305 /* PropertyAssignment */: { + case 308 /* PropertyAssignment */: { const parentAccess = accessKind(parent2.parent); return node === parent2.name ? reverseAccessKind(parentAccess) : parentAccess; } - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return node === parent2.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent2.parent); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return accessKind(parent2); default: return 0 /* Read */; } function writeOrReadWrite() { - return parent2.parent && walkUpParenthesizedExpressions(parent2.parent).kind === 245 /* ExpressionStatement */ ? 1 /* Write */ : 2 /* ReadWrite */; + return parent2.parent && walkUpParenthesizedExpressions(parent2.parent).kind === 247 /* ExpressionStatement */ ? 1 /* Write */ : 2 /* ReadWrite */; } } function reverseAccessKind(a) { @@ -19177,16 +19189,16 @@ function isObjectTypeDeclaration(node) { return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node); } function isTypeNodeKind(kind) { - return kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */ || kind === 132 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 149 /* NumberKeyword */ || kind === 162 /* BigIntKeyword */ || kind === 150 /* ObjectKeyword */ || kind === 135 /* BooleanKeyword */ || kind === 153 /* StringKeyword */ || kind === 154 /* SymbolKeyword */ || kind === 115 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 145 /* NeverKeyword */ || kind === 234 /* ExpressionWithTypeArguments */ || kind === 321 /* JSDocAllType */ || kind === 322 /* JSDocUnknownType */ || kind === 323 /* JSDocNullableType */ || kind === 324 /* JSDocNonNullableType */ || kind === 325 /* JSDocOptionalType */ || kind === 326 /* JSDocFunctionType */ || kind === 327 /* JSDocVariadicType */; + return kind >= 184 /* FirstTypeNode */ && kind <= 207 /* LastTypeNode */ || kind === 132 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 149 /* NumberKeyword */ || kind === 162 /* BigIntKeyword */ || kind === 150 /* ObjectKeyword */ || kind === 135 /* BooleanKeyword */ || kind === 153 /* StringKeyword */ || kind === 154 /* SymbolKeyword */ || kind === 115 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 145 /* NeverKeyword */ || kind === 236 /* ExpressionWithTypeArguments */ || kind === 324 /* JSDocAllType */ || kind === 325 /* JSDocUnknownType */ || kind === 326 /* JSDocNullableType */ || kind === 327 /* JSDocNonNullableType */ || kind === 328 /* JSDocOptionalType */ || kind === 329 /* JSDocFunctionType */ || kind === 330 /* JSDocVariadicType */; } function isAccessExpression(node) { - return node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */; + return node.kind === 213 /* PropertyAccessExpression */ || node.kind === 214 /* ElementAccessExpression */; } function getNameOfAccessExpression(node) { - if (node.kind === 211 /* PropertyAccessExpression */) { + if (node.kind === 213 /* PropertyAccessExpression */) { return node.name; } - Debug.assert(node.kind === 212 /* ElementAccessExpression */); + Debug.assert(node.kind === 214 /* ElementAccessExpression */); return node.argumentExpression; } function isBundleFileTextLike(section) { @@ -19199,7 +19211,7 @@ function isBundleFileTextLike(section) { } } function isNamedImportsOrExports(node) { - return node.kind === 278 /* NamedImports */ || node.kind === 282 /* NamedExports */; + return node.kind === 281 /* NamedImports */ || node.kind === 285 /* NamedExports */; } function getLeftmostAccessExpression(expr) { while (isAccessExpression(expr)) { @@ -19212,12 +19224,12 @@ function forEachNameInAccessChainWalkingLeft(name, action) { return walkAccessExpression(name.parent); } function walkAccessExpression(access) { - if (access.kind === 211 /* PropertyAccessExpression */) { + if (access.kind === 213 /* PropertyAccessExpression */) { const res = action(access.name); if (res !== void 0) { return res; } - } else if (access.kind === 212 /* ElementAccessExpression */) { + } else if (access.kind === 214 /* ElementAccessExpression */) { if (isIdentifier(access.argumentExpression) || isStringLiteralLike(access.argumentExpression)) { const res = action(access.argumentExpression); if (res !== void 0) { @@ -19239,28 +19251,28 @@ function forEachNameInAccessChainWalkingLeft(name, action) { function getLeftmostExpression(node, stopAtCallExpressions) { while (true) { switch (node.kind) { - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: node = node.operand; continue; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: node = node.left; continue; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: node = node.condition; continue; - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: node = node.tag; continue; - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (stopAtCallExpressions) { return node; } - case 235 /* AsExpression */: - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: - case 236 /* NonNullExpression */: - case 359 /* PartiallyEmittedExpression */: - case 239 /* SatisfiesExpression */: + case 237 /* AsExpression */: + case 214 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 238 /* NonNullExpression */: + case 362 /* PartiallyEmittedExpression */: + case 241 /* SatisfiesExpression */: node = node.expression; continue; } @@ -20224,33 +20236,33 @@ function isShorthandPropertyNameUseSite(useSite) { return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite; } function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { - while (node.kind === 79 /* Identifier */ || node.kind === 211 /* PropertyAccessExpression */) { + while (node.kind === 79 /* Identifier */ || node.kind === 213 /* PropertyAccessExpression */) { node = node.parent; } - if (node.kind !== 166 /* ComputedPropertyName */) { + if (node.kind !== 167 /* ComputedPropertyName */) { return false; } if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) { return true; } const containerKind = node.parent.parent.kind; - return containerKind === 267 /* InterfaceDeclaration */ || containerKind === 187 /* TypeLiteral */; + return containerKind === 270 /* InterfaceDeclaration */ || containerKind === 189 /* TypeLiteral */; } function isIdentifierInNonEmittingHeritageClause(node) { if (node.kind !== 79 /* Identifier */) return false; const heritageClause = findAncestor(node.parent, (parent2) => { switch (parent2.kind) { - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return true; - case 211 /* PropertyAccessExpression */: - case 234 /* ExpressionWithTypeArguments */: + case 213 /* PropertyAccessExpression */: + case 236 /* ExpressionWithTypeArguments */: return false; default: return "quit"; } }); - return (heritageClause == null ? void 0 : heritageClause.token) === 118 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 267 /* InterfaceDeclaration */; + return (heritageClause == null ? void 0 : heritageClause.token) === 118 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 270 /* InterfaceDeclaration */; } function isIdentifierTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName); @@ -20339,20 +20351,20 @@ function getContainingNodeArray(node) { if (!node.parent) return void 0; switch (node.kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: const { parent: parent3 } = node; - return parent3.kind === 195 /* InferType */ ? void 0 : parent3.typeParameters; - case 168 /* Parameter */: + return parent3.kind === 197 /* InferType */ ? void 0 : parent3.typeParameters; + case 169 /* Parameter */: return node.parent.parameters; - case 204 /* TemplateLiteralTypeSpan */: + case 206 /* TemplateLiteralTypeSpan */: return node.parent.templateSpans; - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return node.parent.templateSpans; - case 169 /* Decorator */: { + case 170 /* Decorator */: { const { parent: parent4 } = node; return canHaveDecorators(parent4) ? parent4.modifiers : canHaveIllegalDecorators(parent4) ? parent4.illegalDecorators : void 0; } - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return node.parent.heritageClauses; } const { parent: parent2 } = node; @@ -20360,43 +20372,43 @@ function getContainingNodeArray(node) { return isJSDocTypeLiteral(node.parent) ? void 0 : node.parent.tags; } switch (parent2.kind) { - case 187 /* TypeLiteral */: - case 267 /* InterfaceDeclaration */: + case 189 /* TypeLiteral */: + case 270 /* InterfaceDeclaration */: return isTypeElement(node) ? parent2.members : void 0; - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return parent2.types; - case 189 /* TupleType */: - case 209 /* ArrayLiteralExpression */: - case 360 /* CommaListExpression */: - case 278 /* NamedImports */: - case 282 /* NamedExports */: + case 191 /* TupleType */: + case 211 /* ArrayLiteralExpression */: + case 363 /* CommaListExpression */: + case 281 /* NamedImports */: + case 285 /* NamedExports */: return parent2.elements; - case 210 /* ObjectLiteralExpression */: - case 295 /* JsxAttributes */: + case 212 /* ObjectLiteralExpression */: + case 298 /* JsxAttributes */: return parent2.properties; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: return isTypeNode(node) ? parent2.typeArguments : parent2.expression === node ? void 0 : parent2.arguments; - case 287 /* JsxElement */: - case 291 /* JsxFragment */: + case 290 /* JsxElement */: + case 294 /* JsxFragment */: return isJsxChild(node) ? parent2.children : void 0; - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return isTypeNode(node) ? parent2.typeArguments : void 0; - case 242 /* Block */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 274 /* ModuleBlock */: return parent2.statements; - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return parent2.clauses; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return isClassElement(node) ? parent2.members : void 0; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return isEnumMember(node) ? parent2.members : void 0; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return parent2.statements; } } @@ -20405,7 +20417,7 @@ function hasContextSensitiveParameters(node) { if (some(node.parameters, (p) => !getEffectiveTypeAnnotationNode(p))) { return true; } - if (node.kind !== 219 /* ArrowFunction */) { + if (node.kind !== 221 /* ArrowFunction */) { const parameter = firstOrUndefined(node.parameters); if (!(parameter && parameterIsThisKeyword(parameter))) { return true; @@ -20418,14 +20430,14 @@ function isInfinityOrNaNString(name) { return name === "Infinity" || name === "-Infinity" || name === "NaN"; } function isCatchClauseVariableDeclaration(node) { - return node.kind === 261 /* VariableDeclaration */ && node.parent.kind === 301 /* CatchClause */; + return node.kind === 263 /* VariableDeclaration */ && node.parent.kind === 304 /* CatchClause */; } function isParameterOrCatchClauseVariable(symbol) { const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration); return !!declaration && (isParameter(declaration) || isCatchClauseVariableDeclaration(declaration)); } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */; + return node.kind === 220 /* FunctionExpression */ || node.kind === 221 /* ArrowFunction */; } function escapeSnippetText(text) { return text.replace(/\$/gm, () => "\\$"); @@ -20488,23 +20500,23 @@ function getNodeModulePathParts(fullPath, modulePathPart) { } function getParameterTypeNode(parameter) { var _a2; - return parameter.kind === 349 /* JSDocParameterTag */ ? (_a2 = parameter.typeExpression) == null ? void 0 : _a2.type : parameter.type; + return parameter.kind === 352 /* JSDocParameterTag */ ? (_a2 = parameter.typeExpression) == null ? void 0 : _a2.type : parameter.type; } function isTypeDeclaration(node) { switch (node.kind) { - case 167 /* TypeParameter */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 168 /* TypeParameter */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return true; - case 276 /* ImportClause */: + case 279 /* ImportClause */: return node.isTypeOnly; - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return node.parent.parent.isTypeOnly; default: return false; @@ -20517,7 +20529,7 @@ function isCalledStructDeclaration(declarations) { if (!declarations) { return false; } - return declarations.some((declaration) => declaration.kind === 265 /* StructDeclaration */); + return declarations.some((declaration) => declaration.kind === 267 /* StructDeclaration */); } function getNameOfDecorator(node) { const expression = node.expression; @@ -20749,16 +20761,16 @@ function createParenthesizerRules(factory2) { return parenthesizerRule; } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(227 /* BinaryExpression */, binaryOperator); + const binaryOperatorPrecedence = getOperatorPrecedence(229 /* BinaryExpression */, binaryOperator); + const binaryOperatorAssociativity = getOperatorAssociativity(229 /* BinaryExpression */, binaryOperator); const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 219 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { + if (!isLeftSideOfBinary && operand.kind === 221 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { return true; } const operandPrecedence = getExpressionPrecedence(emittedOperand); switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 230 /* YieldExpression */) { + if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 232 /* YieldExpression */) { return false; } return true; @@ -20792,7 +20804,7 @@ function createParenthesizerRules(factory2) { if (isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { + if (node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { if (node.cachedLiteralKind !== void 0) { return node.cachedLiteralKind; } @@ -20805,7 +20817,7 @@ function createParenthesizerRules(factory2) { } function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 217 /* ParenthesizedExpression */) { + if (skipped.kind === 219 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; @@ -20820,7 +20832,7 @@ function createParenthesizerRules(factory2) { return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; } function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(228 /* ConditionalExpression */, 57 /* QuestionToken */); + const conditionalPrecedence = getOperatorPrecedence(230 /* ConditionalExpression */, 57 /* QuestionToken */); const emittedCondition = skipPartiallyEmittedExpressions(condition); const conditionPrecedence = getExpressionPrecedence(emittedCondition); if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { @@ -20837,8 +20849,8 @@ function createParenthesizerRules(factory2) { let needsParens = isCommaSequence(check); if (!needsParens) { switch (getLeftmostExpression(check, false).kind) { - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: needsParens = true; } } @@ -20847,16 +20859,16 @@ function createParenthesizerRules(factory2) { function parenthesizeExpressionOfNew(expression) { const leftmostExpr = getLeftmostExpression(expression, true); switch (leftmostExpr.kind) { - case 213 /* CallExpression */: + case 215 /* CallExpression */: return factory2.createParenthesizedExpression(expression); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; } return parenthesizeLeftSideOfAccess(expression); } function parenthesizeLeftSideOfAccess(expression, optionalChain) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 214 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { + if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 216 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { return expression; } return setTextRange(factory2.createParenthesizedExpression(expression), expression); @@ -20874,7 +20886,7 @@ function createParenthesizerRules(factory2) { function parenthesizeExpressionForDisallowedComma(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, 27 /* CommaToken */); + const commaPrecedence = getOperatorPrecedence(229 /* BinaryExpression */, 27 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); } function parenthesizeExpressionOfExpressionStatement(expression) { @@ -20882,7 +20894,7 @@ function createParenthesizerRules(factory2) { if (isCallExpression(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */) { + if (kind === 220 /* FunctionExpression */ || kind === 221 /* ArrowFunction */) { const updated = factory2.updateCallExpression( emittedExpression, setTextRange(factory2.createParenthesizedExpression(callee), callee), @@ -20893,37 +20905,37 @@ function createParenthesizerRules(factory2) { } } const leftmostExpressionKind = getLeftmostExpression(emittedExpression, false).kind; - if (leftmostExpressionKind === 210 /* ObjectLiteralExpression */ || leftmostExpressionKind === 218 /* FunctionExpression */) { + if (leftmostExpressionKind === 212 /* ObjectLiteralExpression */ || leftmostExpressionKind === 220 /* FunctionExpression */) { return setTextRange(factory2.createParenthesizedExpression(expression), expression); } return expression; } function parenthesizeConciseBodyOfArrowFunction(body) { - if (!isBlock(body) && (isCommaSequence(body) || getLeftmostExpression(body, false).kind === 210 /* ObjectLiteralExpression */)) { + if (!isBlock(body) && (isCommaSequence(body) || getLeftmostExpression(body, false).kind === 212 /* ObjectLiteralExpression */)) { return setTextRange(factory2.createParenthesizedExpression(body), body); } return body; } function parenthesizeCheckTypeOfConditionalType(checkType) { switch (checkType.kind) { - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 194 /* ConditionalType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 196 /* ConditionalType */: return factory2.createParenthesizedType(checkType); } return checkType; } function parenthesizeExtendsTypeOfConditionalType(extendsType) { switch (extendsType.kind) { - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return factory2.createParenthesizedType(extendsType); } return extendsType; } function parenthesizeConstituentTypeOfUnionType(type) { switch (type.kind) { - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeCheckTypeOfConditionalType(type); @@ -20933,8 +20945,8 @@ function createParenthesizerRules(factory2) { } function parenthesizeConstituentTypeOfIntersectionType(type) { switch (type.kind) { - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfUnionType(type); @@ -20944,23 +20956,23 @@ function createParenthesizerRules(factory2) { } function parenthesizeOperandOfTypeOperator(type) { switch (type.kind) { - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } function parenthesizeOperandOfReadonlyTypeOperator(type) { switch (type.kind) { - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } function parenthesizeNonArrayTypeOfPostfixType(type) { switch (type.kind) { - case 195 /* InferType */: - case 198 /* TypeOperator */: - case 186 /* TypeQuery */: + case 197 /* InferType */: + case 200 /* TypeOperator */: + case 188 /* TypeQuery */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); @@ -21114,11 +21126,11 @@ function createNodeConverters(factory2) { } function convertToAssignmentPattern(node) { switch (node.kind) { - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 209 /* ArrayBindingPattern */: + case 211 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 206 /* ObjectBindingPattern */: - case 210 /* ObjectLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 212 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -21243,6 +21255,8 @@ function createNodeFactory(flags, baseFactory2) { updatePropertyDeclaration: updatePropertyDeclaration2, createAnnotationPropertyDeclaration, updateAnnotationPropertyDeclaration, + createOverloadPropertyDeclaration, + updateOverloadPropertyDeclaration, createMethodSignature: createMethodSignature3, updateMethodSignature: updateMethodSignature3, createMethodDeclaration, @@ -21438,6 +21452,8 @@ function createNodeFactory(flags, baseFactory2) { updateStructDeclaration, createAnnotationDeclaration, updateAnnotationDeclaration, + createOverloadDeclaration, + updateOverloadDeclaration, createInterfaceDeclaration: createInterfaceDeclaration2, updateInterfaceDeclaration: updateInterfaceDeclaration2, createTypeAliasDeclaration: createTypeAliasDeclaration2, @@ -21484,40 +21500,40 @@ function createNodeFactory(flags, baseFactory2) { createExternalModuleReference: createExternalModuleReference2, updateExternalModuleReference: updateExternalModuleReference2, get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(321 /* JSDocAllType */); + return getJSDocPrimaryTypeCreateFunction(324 /* JSDocAllType */); }, get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(322 /* JSDocUnknownType */); + return getJSDocPrimaryTypeCreateFunction(325 /* JSDocUnknownType */); }, get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(324 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(327 /* JSDocNonNullableType */); }, get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(324 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(327 /* JSDocNonNullableType */); }, get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(323 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(326 /* JSDocNullableType */); }, get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(323 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(326 /* JSDocNullableType */); }, get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(325 /* JSDocOptionalType */); + return getJSDocUnaryTypeCreateFunction(328 /* JSDocOptionalType */); }, get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(325 /* JSDocOptionalType */); + return getJSDocUnaryTypeUpdateFunction(328 /* JSDocOptionalType */); }, get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(327 /* JSDocVariadicType */); + return getJSDocUnaryTypeCreateFunction(330 /* JSDocVariadicType */); }, get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(327 /* JSDocVariadicType */); + return getJSDocUnaryTypeUpdateFunction(330 /* JSDocVariadicType */); }, get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(328 /* JSDocNamepathType */); + return getJSDocUnaryTypeCreateFunction(331 /* JSDocNamepathType */); }, get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(328 /* JSDocNamepathType */); + return getJSDocUnaryTypeUpdateFunction(331 /* JSDocNamepathType */); }, createJSDocFunctionType, updateJSDocFunctionType, @@ -21554,76 +21570,76 @@ function createNodeFactory(flags, baseFactory2) { createJSDocLinkPlain, updateJSDocLinkPlain, get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(352 /* JSDocTypeTag */); + return getJSDocTypeLikeTagCreateFunction(355 /* JSDocTypeTag */); }, get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocTypeTag */); + return getJSDocTypeLikeTagUpdateFunction(355 /* JSDocTypeTag */); }, get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(350 /* JSDocReturnTag */); + return getJSDocTypeLikeTagCreateFunction(353 /* JSDocReturnTag */); }, get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocReturnTag */); + return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocReturnTag */); }, get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(351 /* JSDocThisTag */); + return getJSDocTypeLikeTagCreateFunction(354 /* JSDocThisTag */); }, get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocThisTag */); + return getJSDocTypeLikeTagUpdateFunction(354 /* JSDocThisTag */); }, get createJSDocEnumTag() { - return getJSDocTypeLikeTagCreateFunction(348 /* JSDocEnumTag */); + return getJSDocTypeLikeTagCreateFunction(351 /* JSDocEnumTag */); }, get updateJSDocEnumTag() { - return getJSDocTypeLikeTagUpdateFunction(348 /* JSDocEnumTag */); + return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocEnumTag */); }, get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(339 /* JSDocAuthorTag */); + return getJSDocSimpleTagCreateFunction(342 /* JSDocAuthorTag */); }, get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(339 /* JSDocAuthorTag */); + return getJSDocSimpleTagUpdateFunction(342 /* JSDocAuthorTag */); }, get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(341 /* JSDocClassTag */); + return getJSDocSimpleTagCreateFunction(344 /* JSDocClassTag */); }, get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(341 /* JSDocClassTag */); + return getJSDocSimpleTagUpdateFunction(344 /* JSDocClassTag */); }, get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(342 /* JSDocPublicTag */); + return getJSDocSimpleTagCreateFunction(345 /* JSDocPublicTag */); }, get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(342 /* JSDocPublicTag */); + return getJSDocSimpleTagUpdateFunction(345 /* JSDocPublicTag */); }, get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(343 /* JSDocPrivateTag */); + return getJSDocSimpleTagCreateFunction(346 /* JSDocPrivateTag */); }, get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(343 /* JSDocPrivateTag */); + return getJSDocSimpleTagUpdateFunction(346 /* JSDocPrivateTag */); }, get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(344 /* JSDocProtectedTag */); + return getJSDocSimpleTagCreateFunction(347 /* JSDocProtectedTag */); }, get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(344 /* JSDocProtectedTag */); + return getJSDocSimpleTagUpdateFunction(347 /* JSDocProtectedTag */); }, get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(345 /* JSDocReadonlyTag */); + return getJSDocSimpleTagCreateFunction(348 /* JSDocReadonlyTag */); }, get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(345 /* JSDocReadonlyTag */); + return getJSDocSimpleTagUpdateFunction(348 /* JSDocReadonlyTag */); }, get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(346 /* JSDocOverrideTag */); + return getJSDocSimpleTagCreateFunction(349 /* JSDocOverrideTag */); }, get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(346 /* JSDocOverrideTag */); + return getJSDocSimpleTagUpdateFunction(349 /* JSDocOverrideTag */); }, get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(340 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagCreateFunction(343 /* JSDocDeprecatedTag */); }, get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(340 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagUpdateFunction(343 /* JSDocDeprecatedTag */); }, createJSDocUnknownTag, updateJSDocUnknownTag, @@ -21874,12 +21890,13 @@ function createNodeFactory(flags, baseFactory2) { } if (name) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 305 /* PropertyAssignment */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 308 /* PropertyAssignment */: if (isIdentifier(name)) { node.transformFlags |= propagateIdentifierNameFlags(name); break; @@ -22146,7 +22163,7 @@ function createNodeFactory(flags, baseFactory2) { return baseFactory2.createBaseTokenNode(kind); } function createToken3(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 164 /* LastToken */, "Invalid token"); + Debug.assert(token >= 0 /* FirstToken */ && token <= 165 /* 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"); @@ -22250,7 +22267,7 @@ function createNodeFactory(flags, baseFactory2) { return result.length ? result : void 0; } function createQualifiedName2(left, right) { - const node = createBaseNode(165 /* QualifiedName */); + const node = createBaseNode(166 /* QualifiedName */); node.left = left; node.right = asName(right); node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); @@ -22260,7 +22277,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createQualifiedName2(left, right), node) : node; } function createComputedPropertyName2(expression) { - const node = createBaseNode(166 /* ComputedPropertyName */); + const node = createBaseNode(167 /* ComputedPropertyName */); node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; return node; @@ -22270,7 +22287,7 @@ function createNodeFactory(flags, baseFactory2) { } function createTypeParameterDeclaration2(modifiers, name, constraint, defaultType) { const node = createBaseNamedDeclaration( - 167 /* TypeParameter */, + 168 /* TypeParameter */, modifiers, name ); @@ -22284,7 +22301,7 @@ function createNodeFactory(flags, baseFactory2) { } function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { const node = createBaseVariableLikeDeclaration( - 168 /* Parameter */, + 169 /* Parameter */, modifiers, name, type, @@ -22309,7 +22326,7 @@ function createNodeFactory(flags, baseFactory2) { 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 createDecorator2(expression, annotationDeclaration) { - const node = createBaseNode(169 /* Decorator */); + const node = createBaseNode(170 /* Decorator */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.annotationDeclaration = annotationDeclaration; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */ | 8192 /* ContainsTypeScriptClassSyntax */ | 33554432 /* ContainsDecorators */; @@ -22320,7 +22337,7 @@ function createNodeFactory(flags, baseFactory2) { } function createPropertySignature3(modifiers, name, questionToken, type) { const node = createBaseNamedDeclaration( - 170 /* PropertySignature */, + 171 /* PropertySignature */, modifiers, name ); @@ -22333,6 +22350,21 @@ function createNodeFactory(flags, baseFactory2) { function updatePropertySignature3(node, modifiers, name, questionToken, type) { return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.type !== type ? finishUpdatePropertySignature(createPropertySignature3(modifiers, name, questionToken, type), node) : node; } + function createOverloadPropertyDeclaration(modifiers, name, questionToken, type) { + const node = createBaseNamedDeclaration( + 174 /* OverloadPropertyDeclaration */, + modifiers, + name + ); + node.type = type; + node.questionToken = questionToken; + node.transformFlags = 1 /* ContainsTypeScript */; + node.initializer = void 0; + return node; + } + function updateOverloadPropertyDeclaration(node, modifiers, name, questionToken, type) { + return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createOverloadPropertyDeclaration(modifiers, name, questionToken, type), node) : node; + } function finishUpdatePropertySignature(updated, original) { if (updated !== original) { updated.initializer = original.initializer; @@ -22341,7 +22373,7 @@ function createNodeFactory(flags, baseFactory2) { } function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { const node = createBaseVariableLikeDeclaration( - 171 /* PropertyDeclaration */, + 172 /* PropertyDeclaration */, modifiers, name, type, @@ -22363,7 +22395,7 @@ function createNodeFactory(flags, baseFactory2) { } function createAnnotationPropertyDeclaration(name, type, initializer) { const node = createBaseVariableLikeDeclaration( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, void 0, name, type, @@ -22377,7 +22409,7 @@ function createNodeFactory(flags, baseFactory2) { } function createMethodSignature3(modifiers, name, questionToken, typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 173 /* MethodSignature */, + 175 /* MethodSignature */, modifiers, name, typeParameters, @@ -22393,7 +22425,7 @@ function createNodeFactory(flags, baseFactory2) { } function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 174 /* MethodDeclaration */, + 176 /* MethodDeclaration */, modifiers, name, typeParameters, @@ -22430,7 +22462,7 @@ function createNodeFactory(flags, baseFactory2) { } function createClassStaticBlockDeclaration(body) { const node = createBaseGenericNamedDeclaration( - 175 /* ClassStaticBlockDeclaration */, + 177 /* ClassStaticBlockDeclaration */, void 0, void 0, void 0 @@ -22453,7 +22485,7 @@ function createNodeFactory(flags, baseFactory2) { } function createConstructorDeclaration(modifiers, parameters, body) { const node = createBaseFunctionLikeDeclaration( - 176 /* Constructor */, + 178 /* Constructor */, modifiers, void 0, void 0, @@ -22480,7 +22512,7 @@ function createNodeFactory(flags, baseFactory2) { } function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 177 /* GetAccessor */, + 179 /* GetAccessor */, modifiers, name, void 0, @@ -22502,7 +22534,7 @@ function createNodeFactory(flags, baseFactory2) { } function createSetAccessorDeclaration(modifiers, name, parameters, body) { const node = createBaseFunctionLikeDeclaration( - 178 /* SetAccessor */, + 180 /* SetAccessor */, modifiers, name, void 0, @@ -22526,7 +22558,7 @@ function createNodeFactory(flags, baseFactory2) { } function createCallSignature2(typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 179 /* CallSignature */, + 181 /* CallSignature */, void 0, void 0, typeParameters, @@ -22541,7 +22573,7 @@ function createNodeFactory(flags, baseFactory2) { } function createConstructSignature2(typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 180 /* ConstructSignature */, + 182 /* ConstructSignature */, void 0, void 0, typeParameters, @@ -22556,7 +22588,7 @@ function createNodeFactory(flags, baseFactory2) { } function createIndexSignature3(modifiers, parameters, type) { const node = createBaseSignatureDeclaration( - 181 /* IndexSignature */, + 183 /* IndexSignature */, modifiers, void 0, void 0, @@ -22570,7 +22602,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature3(modifiers, parameters, type), node) : node; } function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(204 /* TemplateLiteralTypeSpan */); + const node = createBaseNode(206 /* TemplateLiteralTypeSpan */); node.type = type; node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; @@ -22583,7 +22615,7 @@ function createNodeFactory(flags, baseFactory2) { return createToken3(kind); } function createTypePredicateNode3(assertsModifier, parameterName, type) { - const node = createBaseNode(182 /* TypePredicate */); + const node = createBaseNode(184 /* TypePredicate */); node.assertsModifier = assertsModifier; node.parameterName = asName(parameterName); node.type = type; @@ -22594,7 +22626,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode3(assertsModifier, parameterName, type), node) : node; } function createTypeReferenceNode2(typeName, typeArguments) { - const node = createBaseNode(183 /* TypeReference */); + const node = createBaseNode(185 /* TypeReference */); node.typeName = asName(typeName); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray2(typeArguments)); node.transformFlags = 1 /* ContainsTypeScript */; @@ -22605,7 +22637,7 @@ function createNodeFactory(flags, baseFactory2) { } function createFunctionTypeNode2(typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 184 /* FunctionType */, + 186 /* FunctionType */, void 0, void 0, typeParameters, @@ -22630,7 +22662,7 @@ function createNodeFactory(flags, baseFactory2) { } function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 185 /* ConstructorType */, + 187 /* ConstructorType */, modifiers, void 0, typeParameters, @@ -22653,7 +22685,7 @@ function createNodeFactory(flags, baseFactory2) { return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); } function createTypeQueryNode2(exprName, typeArguments) { - const node = createBaseNode(186 /* TypeQuery */); + const node = createBaseNode(188 /* TypeQuery */); node.exprName = exprName; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags = 1 /* ContainsTypeScript */; @@ -22663,7 +22695,7 @@ function createNodeFactory(flags, baseFactory2) { return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode2(exprName, typeArguments), node) : node; } function createTypeLiteralNode2(members) { - const node = createBaseNode(187 /* TypeLiteral */); + const node = createBaseNode(189 /* TypeLiteral */); node.members = createNodeArray2(members); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22672,7 +22704,7 @@ function createNodeFactory(flags, baseFactory2) { return node.members !== members ? update(createTypeLiteralNode2(members), node) : node; } function createArrayTypeNode2(elementType) { - const node = createBaseNode(188 /* ArrayType */); + const node = createBaseNode(190 /* ArrayType */); node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22681,7 +22713,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elementType !== elementType ? update(createArrayTypeNode2(elementType), node) : node; } function createTupleTypeNode2(elements) { - const node = createBaseNode(189 /* TupleType */); + const node = createBaseNode(191 /* TupleType */); node.elements = createNodeArray2(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22690,7 +22722,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createTupleTypeNode2(elements), node) : node; } function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseNode(202 /* NamedTupleMember */); + const node = createBaseNode(204 /* NamedTupleMember */); node.dotDotDotToken = dotDotDotToken; node.name = name; node.questionToken = questionToken; @@ -22702,7 +22734,7 @@ function createNodeFactory(flags, baseFactory2) { return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createNamedTupleMember(dotDotDotToken, name, questionToken, type), node) : node; } function createOptionalTypeNode2(type) { - const node = createBaseNode(190 /* OptionalType */); + const node = createBaseNode(192 /* OptionalType */); node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22711,7 +22743,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createOptionalTypeNode2(type), node) : node; } function createRestTypeNode2(type) { - const node = createBaseNode(191 /* RestType */); + const node = createBaseNode(193 /* RestType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22729,19 +22761,19 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; } function createUnionTypeNode2(types) { - return createUnionOrIntersectionTypeNode(192 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); + return createUnionOrIntersectionTypeNode(194 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function updateUnionTypeNode2(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function createIntersectionTypeNode2(types) { - return createUnionOrIntersectionTypeNode(193 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); + return createUnionOrIntersectionTypeNode(195 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function updateIntersectionTypeNode2(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function createConditionalTypeNode2(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(194 /* ConditionalType */); + const node = createBaseNode(196 /* ConditionalType */); node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); node.trueType = trueType; @@ -22753,7 +22785,7 @@ function createNodeFactory(flags, baseFactory2) { return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? update(createConditionalTypeNode2(checkType, extendsType, trueType, falseType), node) : node; } function createInferTypeNode2(typeParameter) { - const node = createBaseNode(195 /* InferType */); + const node = createBaseNode(197 /* InferType */); node.typeParameter = typeParameter; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22762,7 +22794,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameter !== typeParameter ? update(createInferTypeNode2(typeParameter), node) : node; } function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(203 /* TemplateLiteralType */); + const node = createBaseNode(205 /* TemplateLiteralType */); node.head = head; node.templateSpans = createNodeArray2(templateSpans); node.transformFlags = 1 /* ContainsTypeScript */; @@ -22772,7 +22804,7 @@ function createNodeFactory(flags, baseFactory2) { return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } function createImportTypeNode2(argument, assertions, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(205 /* ImportType */); + const node = createBaseNode(207 /* ImportType */); node.argument = argument; node.assertions = assertions; node.qualifier = qualifier; @@ -22785,7 +22817,7 @@ function createNodeFactory(flags, baseFactory2) { return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode2(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType2(type) { - const node = createBaseNode(196 /* ParenthesizedType */); + const node = createBaseNode(198 /* ParenthesizedType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22794,12 +22826,12 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createParenthesizedType2(type), node) : node; } function createThisTypeNode2() { - const node = createBaseNode(197 /* ThisType */); + const node = createBaseNode(199 /* ThisType */); node.transformFlags = 1 /* ContainsTypeScript */; return node; } function createTypeOperatorNode3(operator, type) { - const node = createBaseNode(198 /* TypeOperator */); + const node = createBaseNode(200 /* TypeOperator */); node.operator = operator; node.type = operator === 147 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); node.transformFlags = 1 /* ContainsTypeScript */; @@ -22809,7 +22841,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createTypeOperatorNode3(node.operator, type), node) : node; } function createIndexedAccessTypeNode2(objectType, indexType) { - const node = createBaseNode(199 /* IndexedAccessType */); + const node = createBaseNode(201 /* IndexedAccessType */); node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); node.indexType = indexType; node.transformFlags = 1 /* ContainsTypeScript */; @@ -22819,7 +22851,7 @@ function createNodeFactory(flags, baseFactory2) { return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode2(objectType, indexType), node) : node; } function createMappedTypeNode2(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseNode(200 /* MappedType */); + const node = createBaseNode(202 /* MappedType */); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; node.nameType = nameType; @@ -22833,7 +22865,7 @@ function createNodeFactory(flags, baseFactory2) { return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? update(createMappedTypeNode2(readonlyToken, typeParameter, nameType, questionToken, type, members), node) : node; } function createLiteralTypeNode2(literal) { - const node = createBaseNode(201 /* LiteralType */); + const node = createBaseNode(203 /* LiteralType */); node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22842,7 +22874,7 @@ function createNodeFactory(flags, baseFactory2) { return node.literal !== literal ? update(createLiteralTypeNode2(literal), node) : node; } function createObjectBindingPattern2(elements) { - const node = createBaseNode(206 /* ObjectBindingPattern */); + const node = createBaseNode(208 /* ObjectBindingPattern */); node.elements = createNodeArray2(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { @@ -22854,7 +22886,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createObjectBindingPattern2(elements), node) : node; } function createArrayBindingPattern2(elements) { - const node = createBaseNode(207 /* ArrayBindingPattern */); + const node = createBaseNode(209 /* ArrayBindingPattern */); node.elements = createNodeArray2(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; return node; @@ -22864,7 +22896,7 @@ function createNodeFactory(flags, baseFactory2) { } function createBindingElement2(dotDotDotToken, propertyName, name, initializer) { const node = createBaseBindingLikeDeclaration( - 208 /* BindingElement */, + 210 /* BindingElement */, void 0, name, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer) @@ -22887,7 +22919,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseExpression(209 /* ArrayLiteralExpression */); + const node = createBaseExpression(211 /* ArrayLiteralExpression */); const lastElement = elements && lastOrUndefined(elements); const elementsArray = createNodeArray2(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); @@ -22899,7 +22931,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; } function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseExpression(210 /* ObjectLiteralExpression */); + const node = createBaseExpression(212 /* ObjectLiteralExpression */); node.properties = createNodeArray2(properties); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.properties); @@ -22909,7 +22941,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; } function createPropertyAccessExpression(expression, name) { - const node = createBaseExpression(211 /* PropertyAccessExpression */); + const node = createBaseExpression(213 /* PropertyAccessExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.name = asName(name); node.transformFlags = propagateChildFlags(node.expression) | (isIdentifier(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912 /* ContainsPrivateIdentifierInExpression */); @@ -22925,7 +22957,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.name !== name ? update(createPropertyAccessExpression(expression, name), node) : node; } function createPropertyAccessChain2(expression, questionDotToken, name) { - const node = createBaseExpression(211 /* PropertyAccessExpression */); + const node = createBaseExpression(213 /* PropertyAccessExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.questionDotToken = questionDotToken; @@ -22938,7 +22970,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain2(expression, questionDotToken, name), node) : node; } function createElementAccessExpression(expression, index) { - const node = createBaseExpression(212 /* ElementAccessExpression */); + const node = createBaseExpression(214 /* ElementAccessExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.argumentExpression = asExpression(index); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.argumentExpression); @@ -22954,7 +22986,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.argumentExpression !== argumentExpression ? update(createElementAccessExpression(expression, argumentExpression), node) : node; } function createElementAccessChain2(expression, questionDotToken, index) { - const node = createBaseExpression(212 /* ElementAccessExpression */); + const node = createBaseExpression(214 /* ElementAccessExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.questionDotToken = questionDotToken; @@ -22967,7 +22999,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain2(expression, questionDotToken, argumentExpression), node) : node; } function createCallExpression(expression, typeArguments, argumentsArray) { - const node = createBaseExpression(213 /* CallExpression */); + const node = createBaseExpression(215 /* CallExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.typeArguments = asNodeArray(typeArguments); node.arguments = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray2(argumentsArray)); @@ -22989,7 +23021,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallExpression(expression, typeArguments, argumentsArray), node) : node; } function createCallChain2(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseExpression(213 /* CallExpression */); + const node = createBaseExpression(215 /* CallExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.questionDotToken = questionDotToken; @@ -23009,7 +23041,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain2(expression, questionDotToken, typeArguments, argumentsArray), node) : node; } function createNewExpression(expression, typeArguments, argumentsArray) { - const node = createBaseExpression(214 /* NewExpression */); + const node = createBaseExpression(216 /* NewExpression */); node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; @@ -23023,7 +23055,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; } function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseExpression(215 /* TaggedTemplateExpression */); + const node = createBaseExpression(217 /* TaggedTemplateExpression */); node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess(tag, false); node.typeArguments = asNodeArray(typeArguments); node.template = template; @@ -23040,7 +23072,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; } function createTypeAssertion2(type, expression) { - const node = createBaseExpression(216 /* TypeAssertionExpression */); + const node = createBaseExpression(218 /* TypeAssertionExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -23050,7 +23082,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type || node.expression !== expression ? update(createTypeAssertion2(type, expression), node) : node; } function createParenthesizedExpression(expression) { - const node = createBaseExpression(217 /* ParenthesizedExpression */); + const node = createBaseExpression(219 /* ParenthesizedExpression */); node.expression = expression; node.transformFlags = propagateChildFlags(node.expression); return node; @@ -23060,7 +23092,7 @@ function createNodeFactory(flags, baseFactory2) { } function createFunctionExpression2(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 218 /* FunctionExpression */, + 220 /* FunctionExpression */, modifiers, name, typeParameters, @@ -23088,7 +23120,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression2(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node; } function createEtsComponentExpression(name, argumentsArray, body) { - const node = createBaseExpression(220 /* EtsComponentExpression */); + const node = createBaseExpression(222 /* EtsComponentExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(name); node.arguments = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray2(argumentsArray)); node.body = body; @@ -23099,7 +23131,7 @@ function createNodeFactory(flags, baseFactory2) { } function createArrowFunction3(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { const node = createBaseFunctionLikeDeclaration( - 219 /* ArrowFunction */, + 221 /* ArrowFunction */, modifiers, void 0, typeParameters, @@ -23118,7 +23150,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction3(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node; } function createDeleteExpression(expression) { - const node = createBaseExpression(221 /* DeleteExpression */); + const node = createBaseExpression(223 /* DeleteExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23127,7 +23159,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; } function createTypeOfExpression(expression) { - const node = createBaseExpression(222 /* TypeOfExpression */); + const node = createBaseExpression(224 /* TypeOfExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23136,7 +23168,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; } function createVoidExpression(expression) { - const node = createBaseExpression(223 /* VoidExpression */); + const node = createBaseExpression(225 /* VoidExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23145,7 +23177,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createVoidExpression(expression), node) : node; } function createAwaitExpression(expression) { - const node = createBaseExpression(224 /* AwaitExpression */); + const node = createBaseExpression(226 /* AwaitExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; return node; @@ -23154,7 +23186,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; } function createPrefixUnaryExpression(operator, operand) { - const node = createBaseExpression(225 /* PrefixUnaryExpression */); + const node = createBaseExpression(227 /* PrefixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -23167,7 +23199,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; } function createPostfixUnaryExpression(operand, operator) { - const node = createBaseExpression(226 /* PostfixUnaryExpression */); + const node = createBaseExpression(228 /* PostfixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -23180,7 +23212,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; } function createBinaryExpression(left, operator, right) { - const node = createBaseExpression(227 /* BinaryExpression */); + const node = createBaseExpression(229 /* BinaryExpression */); const operatorToken = asToken(operator); const operatorKind = operatorToken.kind; node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); @@ -23229,7 +23261,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseExpression(228 /* ConditionalExpression */); + const node = createBaseExpression(230 /* ConditionalExpression */); node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); node.questionToken = questionToken != null ? questionToken : createToken3(57 /* QuestionToken */); node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); @@ -23242,7 +23274,7 @@ function createNodeFactory(flags, baseFactory2) { 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 createTemplateExpression2(head, templateSpans) { - const node = createBaseExpression(229 /* TemplateExpression */); + const node = createBaseExpression(231 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray2(templateSpans); node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; @@ -23295,7 +23327,7 @@ function createNodeFactory(flags, baseFactory2) { } function createYieldExpression(asteriskToken, expression) { Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseExpression(230 /* YieldExpression */); + const node = createBaseExpression(232 /* YieldExpression */); node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.asteriskToken = asteriskToken; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; @@ -23305,7 +23337,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; } function createSpreadElement(expression) { - const node = createBaseExpression(231 /* SpreadElement */); + const node = createBaseExpression(233 /* SpreadElement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; return node; @@ -23315,7 +23347,7 @@ function createNodeFactory(flags, baseFactory2) { } function createClassExpression3(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseClassLikeDeclaration( - 232 /* ClassExpression */, + 234 /* ClassExpression */, modifiers, name, typeParameters, @@ -23329,10 +23361,10 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression3(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createOmittedExpression2() { - return createBaseExpression(233 /* OmittedExpression */); + return createBaseExpression(235 /* OmittedExpression */); } function createExpressionWithTypeArguments3(expression, typeArguments) { - const node = createBaseNode(234 /* ExpressionWithTypeArguments */); + const node = createBaseNode(236 /* ExpressionWithTypeArguments */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.typeArguments) | 1024 /* ContainsES2015 */; @@ -23342,7 +23374,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments3(expression, typeArguments), node) : node; } function createAsExpression2(expression, type) { - const node = createBaseExpression(235 /* AsExpression */); + const node = createBaseExpression(237 /* AsExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -23352,7 +23384,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createAsExpression2(expression, type), node) : node; } function createNonNullExpression2(expression) { - const node = createBaseExpression(236 /* NonNullExpression */); + const node = createBaseExpression(238 /* NonNullExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; return node; @@ -23364,7 +23396,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createNonNullExpression2(expression), node) : node; } function createSatisfiesExpression(expression, type) { - const node = createBaseExpression(239 /* SatisfiesExpression */); + const node = createBaseExpression(241 /* SatisfiesExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -23374,7 +23406,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; } function createNonNullChain2(expression) { - const node = createBaseExpression(236 /* NonNullExpression */); + const node = createBaseExpression(238 /* NonNullExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -23385,7 +23417,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createNonNullChain2(expression), node) : node; } function createMetaProperty2(keywordToken, name) { - const node = createBaseExpression(237 /* MetaProperty */); + const node = createBaseExpression(239 /* MetaProperty */); node.keywordToken = keywordToken; node.name = name; node.transformFlags |= propagateChildFlags(node.name); @@ -23405,7 +23437,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createMetaProperty2(node.keywordToken, name), node) : node; } function createTemplateSpan2(expression, literal) { - const node = createBaseNode(240 /* TemplateSpan */); + const node = createBaseNode(242 /* TemplateSpan */); node.expression = expression; node.literal = literal; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; @@ -23415,12 +23447,12 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan2(expression, literal), node) : node; } function createSemicolonClassElement2() { - const node = createBaseNode(241 /* SemicolonClassElement */); + const node = createBaseNode(243 /* SemicolonClassElement */); node.transformFlags |= 1024 /* ContainsES2015 */; return node; } function createBlock2(statements, multiLine) { - const node = createBaseNode(242 /* Block */); + const node = createBaseNode(244 /* Block */); node.statements = createNodeArray2(statements); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.statements); @@ -23430,7 +23462,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createBlock2(statements, node.multiLine), node) : node; } function createVariableStatement2(modifiers, declarationList) { - const node = createBaseDeclaration(244 /* VariableStatement */); + const node = createBaseDeclaration(246 /* VariableStatement */); node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList2(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); @@ -23443,10 +23475,10 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement2(modifiers, declarationList), node) : node; } function createEmptyStatement2() { - return createBaseNode(243 /* EmptyStatement */); + return createBaseNode(245 /* EmptyStatement */); } function createExpressionStatement2(expression) { - const node = createBaseNode(245 /* ExpressionStatement */); + const node = createBaseNode(247 /* ExpressionStatement */); node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23455,7 +23487,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createExpressionStatement2(expression), node) : node; } function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(246 /* IfStatement */); + const node = createBaseNode(248 /* IfStatement */); node.expression = expression; node.thenStatement = asEmbeddedStatement(thenStatement); node.elseStatement = asEmbeddedStatement(elseStatement); @@ -23466,7 +23498,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; } function createDoStatement(statement, expression) { - const node = createBaseNode(247 /* DoStatement */); + const node = createBaseNode(249 /* DoStatement */); node.statement = asEmbeddedStatement(statement); node.expression = expression; node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); @@ -23476,7 +23508,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; } function createWhileStatement(expression, statement) { - const node = createBaseNode(248 /* WhileStatement */); + const node = createBaseNode(250 /* WhileStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -23486,7 +23518,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; } function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(249 /* ForStatement */); + const node = createBaseNode(251 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -23498,7 +23530,7 @@ function createNodeFactory(flags, baseFactory2) { 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(250 /* ForInStatement */); + const node = createBaseNode(252 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = asEmbeddedStatement(statement); @@ -23509,7 +23541,7 @@ function createNodeFactory(flags, baseFactory2) { 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(251 /* ForOfStatement */); + const node = createBaseNode(253 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); @@ -23523,7 +23555,7 @@ function createNodeFactory(flags, baseFactory2) { 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(252 /* ContinueStatement */); + const node = createBaseNode(254 /* ContinueStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; return node; @@ -23532,7 +23564,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createContinueStatement(label), node) : node; } function createBreakStatement(label) { - const node = createBaseNode(253 /* BreakStatement */); + const node = createBaseNode(255 /* BreakStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; return node; @@ -23541,7 +23573,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createBreakStatement(label), node) : node; } function createReturnStatement(expression) { - const node = createBaseNode(254 /* ReturnStatement */); + const node = createBaseNode(256 /* ReturnStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; return node; @@ -23550,7 +23582,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createReturnStatement(expression), node) : node; } function createWithStatement(expression, statement) { - const node = createBaseNode(255 /* WithStatement */); + const node = createBaseNode(257 /* WithStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -23560,7 +23592,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; } function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(256 /* SwitchStatement */); + const node = createBaseNode(258 /* SwitchStatement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.caseBlock = caseBlock; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); @@ -23570,7 +23602,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; } function createLabeledStatement(label, statement) { - const node = createBaseNode(257 /* LabeledStatement */); + const node = createBaseNode(259 /* LabeledStatement */); node.label = asName(label); node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); @@ -23580,7 +23612,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; } function createThrowStatement(expression) { - const node = createBaseNode(258 /* ThrowStatement */); + const node = createBaseNode(260 /* ThrowStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23589,7 +23621,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createThrowStatement(expression), node) : node; } function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(259 /* TryStatement */); + const node = createBaseNode(261 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -23600,11 +23632,11 @@ function createNodeFactory(flags, baseFactory2) { return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; } function createDebuggerStatement2() { - return createBaseNode(260 /* DebuggerStatement */); + return createBaseNode(262 /* DebuggerStatement */); } function createVariableDeclaration3(name, exclamationToken, type, initializer) { const node = createBaseVariableLikeDeclaration( - 261 /* VariableDeclaration */, + 263 /* VariableDeclaration */, void 0, name, type, @@ -23621,7 +23653,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.type !== type || node.exclamationToken !== exclamationToken || node.initializer !== initializer ? update(createVariableDeclaration3(name, exclamationToken, type, initializer), node) : node; } function createVariableDeclarationList2(declarations, flags2 = 0 /* None */) { - const node = createBaseNode(262 /* VariableDeclarationList */); + const node = createBaseNode(264 /* VariableDeclarationList */); node.flags |= flags2 & 3 /* BlockScoped */; node.declarations = createNodeArray2(declarations); node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -23635,7 +23667,7 @@ function createNodeFactory(flags, baseFactory2) { } function createFunctionDeclaration2(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 263 /* FunctionDeclaration */, + 265 /* FunctionDeclaration */, modifiers, name, typeParameters, @@ -23672,7 +23704,7 @@ function createNodeFactory(flags, baseFactory2) { } function createClassDeclaration2(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseClassLikeDeclaration( - 264 /* ClassDeclaration */, + 266 /* ClassDeclaration */, modifiers, name, typeParameters, @@ -23694,7 +23726,7 @@ function createNodeFactory(flags, baseFactory2) { } function createStructDeclaration(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseClassLikeDeclaration( - 265 /* StructDeclaration */, + 267 /* StructDeclaration */, modifiers, name, typeParameters, @@ -23716,7 +23748,7 @@ function createNodeFactory(flags, baseFactory2) { } function createAnnotationDeclaration(modifiers, name, members) { const node = createBaseNamedDeclaration( - 266 /* AnnotationDeclaration */, + 268 /* AnnotationDeclaration */, modifiers, name ); @@ -23733,9 +23765,28 @@ function createNodeFactory(flags, baseFactory2) { function updateAnnotationDeclaration(node, modifiers, name, members) { return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createAnnotationDeclaration(modifiers, name, members), node) : node; } + function createOverloadDeclaration(modifiers, name, members) { + const node = createBaseNamedDeclaration( + 269 /* OverloadDeclaration */, + modifiers, + name + ); + node.members = createNodeArray2(members); + node.transformFlags |= propagateChildrenFlags(node.members); + if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + node.transformFlags = 1 /* ContainsTypeScript */; + } else { + node.transformFlags |= 1024 /* ContainsES2015 */; + node.transformFlags |= 1 /* ContainsTypeScript */; + } + return node; + } + function updateOverloadDeclaration(node, modifiers, name, members) { + return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createOverloadDeclaration(modifiers, name, members), node) : node; + } function createInterfaceDeclaration2(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseInterfaceOrClassLikeDeclaration( - 267 /* InterfaceDeclaration */, + 270 /* InterfaceDeclaration */, modifiers, name, typeParameters, @@ -23757,7 +23808,7 @@ function createNodeFactory(flags, baseFactory2) { } function createTypeAliasDeclaration2(modifiers, name, typeParameters, type) { const node = createBaseGenericNamedDeclaration( - 268 /* TypeAliasDeclaration */, + 271 /* TypeAliasDeclaration */, modifiers, name, typeParameters @@ -23778,7 +23829,7 @@ function createNodeFactory(flags, baseFactory2) { } function createEnumDeclaration2(modifiers, name, members) { const node = createBaseNamedDeclaration( - 269 /* EnumDeclaration */, + 272 /* EnumDeclaration */, modifiers, name ); @@ -23798,7 +23849,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createModuleDeclaration2(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(270 /* ModuleDeclaration */); + const node = createBaseDeclaration(273 /* ModuleDeclaration */); node.modifiers = asNodeArray(modifiers); node.flags |= flags2 & (16 /* Namespace */ | 4 /* NestedNamespace */ | 1024 /* GlobalAugmentation */); node.name = name; @@ -23822,7 +23873,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createModuleBlock2(statements) { - const node = createBaseNode(271 /* ModuleBlock */); + const node = createBaseNode(274 /* ModuleBlock */); node.statements = createNodeArray2(statements); node.transformFlags |= propagateChildrenFlags(node.statements); return node; @@ -23831,7 +23882,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createModuleBlock2(statements), node) : node; } function createCaseBlock2(clauses) { - const node = createBaseNode(272 /* CaseBlock */); + const node = createBaseNode(275 /* CaseBlock */); node.clauses = createNodeArray2(clauses); node.transformFlags |= propagateChildrenFlags(node.clauses); return node; @@ -23841,7 +23892,7 @@ function createNodeFactory(flags, baseFactory2) { } function createNamespaceExportDeclaration2(name) { const node = createBaseNamedDeclaration( - 273 /* NamespaceExportDeclaration */, + 276 /* NamespaceExportDeclaration */, void 0, name ); @@ -23862,7 +23913,7 @@ function createNodeFactory(flags, baseFactory2) { } function createImportEqualsDeclaration2(modifiers, isTypeOnly, name, moduleReference) { const node = createBaseNamedDeclaration( - 274 /* ImportEqualsDeclaration */, + 277 /* ImportEqualsDeclaration */, modifiers, name ); @@ -23885,7 +23936,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createImportDeclaration2(modifiers, importClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(275 /* ImportDeclaration */); + const node = createBaseDeclaration(278 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; @@ -23905,7 +23956,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createImportClause3(isTypeOnly, name, namedBindings) { - const node = createBaseNode(276 /* ImportClause */); + const node = createBaseNode(279 /* ImportClause */); node.isTypeOnly = isTypeOnly; node.name = name; node.namedBindings = namedBindings; @@ -23927,7 +23978,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createAssertClause(elements, multiLine) { - const node = createBaseNode(302 /* AssertClause */); + const node = createBaseNode(305 /* AssertClause */); node.elements = createNodeArray2(elements); node.multiLine = multiLine; node.transformFlags |= 4 /* ContainsESNext */; @@ -23937,7 +23988,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; } function createAssertEntry(name, value) { - const node = createBaseNode(303 /* AssertEntry */); + const node = createBaseNode(306 /* AssertEntry */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -23947,7 +23998,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; } function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(304 /* ImportTypeAssertionContainer */); + const node = createBaseNode(307 /* ImportTypeAssertionContainer */); node.assertClause = clause; node.multiLine = multiLine; return node; @@ -23956,7 +24007,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } function createNamespaceImport2(name) { - const node = createBaseNode(277 /* NamespaceImport */); + const node = createBaseNode(280 /* NamespaceImport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -23966,7 +24017,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceImport2(name), node) : node; } function createNamespaceExport2(name) { - const node = createBaseNode(283 /* NamespaceExport */); + const node = createBaseNode(286 /* NamespaceExport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name) | 4 /* ContainsESNext */; node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -23976,7 +24027,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceExport2(name), node) : node; } function createNamedImports2(elements) { - const node = createBaseNode(278 /* NamedImports */); + const node = createBaseNode(281 /* NamedImports */); node.elements = createNodeArray2(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -23986,7 +24037,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedImports2(elements), node) : node; } function createImportSpecifier2(isTypeOnly, propertyName, name) { - const node = createBaseNode(279 /* ImportSpecifier */); + const node = createBaseNode(282 /* ImportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = propertyName; node.name = name; @@ -23998,7 +24049,7 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createImportSpecifier2(isTypeOnly, propertyName, name), node) : node; } function createExportAssignment3(modifiers, isExportEquals, expression) { - const node = createBaseDeclaration(280 /* ExportAssignment */); + const node = createBaseDeclaration(283 /* ExportAssignment */); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary(63 /* EqualsToken */, void 0, expression) : parenthesizerRules().parenthesizeExpressionOfExportDefault(expression); @@ -24017,7 +24068,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createExportDeclaration3(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(281 /* ExportDeclaration */); + const node = createBaseDeclaration(284 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; @@ -24038,7 +24089,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createNamedExports2(elements) { - const node = createBaseNode(282 /* NamedExports */); + const node = createBaseNode(285 /* NamedExports */); node.elements = createNodeArray2(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24048,7 +24099,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedExports2(elements), node) : node; } function createExportSpecifier2(isTypeOnly, propertyName, name) { - const node = createBaseNode(284 /* ExportSpecifier */); + const node = createBaseNode(287 /* ExportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = asName(propertyName); node.name = asName(name); @@ -24060,11 +24111,11 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier2(isTypeOnly, propertyName, name), node) : node; } function createMissingDeclaration() { - const node = createBaseDeclaration(285 /* MissingDeclaration */); + const node = createBaseDeclaration(288 /* MissingDeclaration */); return node; } function createExternalModuleReference2(expression) { - const node = createBaseNode(286 /* ExternalModuleReference */); + const node = createBaseNode(289 /* ExternalModuleReference */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24097,7 +24148,7 @@ function createNodeFactory(flags, baseFactory2) { } function createJSDocFunctionType(parameters, type) { const node = createBaseSignatureDeclaration( - 326 /* JSDocFunctionType */, + 329 /* JSDocFunctionType */, void 0, void 0, void 0, @@ -24110,7 +24161,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; } function createJSDocTypeLiteral2(propertyTags, isArrayType = false) { - const node = createBaseNode(331 /* JSDocTypeLiteral */); + const node = createBaseNode(334 /* JSDocTypeLiteral */); node.jsDocPropertyTags = asNodeArray(propertyTags); node.isArrayType = isArrayType; return node; @@ -24119,7 +24170,7 @@ function createNodeFactory(flags, baseFactory2) { return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral2(propertyTags, isArrayType), node) : node; } function createJSDocTypeExpression2(type) { - const node = createBaseNode(318 /* JSDocTypeExpression */); + const node = createBaseNode(321 /* JSDocTypeExpression */); node.type = type; return node; } @@ -24127,7 +24178,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createJSDocTypeExpression2(type), node) : node; } function createJSDocSignature2(typeParameters, parameters, type) { - const node = createBaseNode(332 /* JSDocSignature */); + const node = createBaseNode(335 /* JSDocSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray2(parameters); node.type = type; @@ -24147,7 +24198,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createJSDocTemplateTag2(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(353 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier3("template"), comment); + const node = createBaseJSDocTag(356 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier3("template"), comment); node.constraint = constraint; node.typeParameters = createNodeArray2(typeParameters); return node; @@ -24156,7 +24207,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag2(tagName, constraint, typeParameters, comment), node) : node; } function createJSDocTypedefTag2(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTag(354 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier3("typedef"), comment); + const node = createBaseJSDocTag(357 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier3("typedef"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -24166,7 +24217,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag2(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocParameterTag2(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTag(349 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier3("param"), comment); + const node = createBaseJSDocTag(352 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier3("param"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -24177,7 +24228,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag2(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocPropertyTag2(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTag(356 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier3("prop"), comment); + const node = createBaseJSDocTag(359 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier3("prop"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -24188,7 +24239,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag2(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocCallbackTag2(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTag(347 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier3("callback"), comment); + const node = createBaseJSDocTag(350 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier3("callback"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -24198,7 +24249,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag2(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocAugmentsTag2(tagName, className, comment) { - const node = createBaseJSDocTag(337 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier3("augments"), comment); + const node = createBaseJSDocTag(340 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier3("augments"), comment); node.class = className; return node; } @@ -24206,12 +24257,12 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocAugmentsTag2(tagName, className, comment), node) : node; } function createJSDocImplementsTag2(tagName, className, comment) { - const node = createBaseJSDocTag(338 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier3("implements"), comment); + const node = createBaseJSDocTag(341 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier3("implements"), comment); node.class = className; return node; } function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(355 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier3("see"), comment); + const node = createBaseJSDocTag(358 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier3("see"), comment); node.name = name; return node; } @@ -24219,7 +24270,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; } function createJSDocNameReference(name) { - const node = createBaseNode(319 /* JSDocNameReference */); + const node = createBaseNode(322 /* JSDocNameReference */); node.name = name; return node; } @@ -24227,7 +24278,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocNameReference(name), node) : node; } function createJSDocMemberName(left, right) { - const node = createBaseNode(320 /* JSDocMemberName */); + const node = createBaseNode(323 /* JSDocMemberName */); node.left = left; node.right = right; node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); @@ -24237,7 +24288,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; } function createJSDocLink(name, text) { - const node = createBaseNode(333 /* JSDocLink */); + const node = createBaseNode(336 /* JSDocLink */); node.name = name; node.text = text; return node; @@ -24246,7 +24297,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLink(name, text), node) : node; } function createJSDocLinkCode(name, text) { - const node = createBaseNode(334 /* JSDocLinkCode */); + const node = createBaseNode(337 /* JSDocLinkCode */); node.name = name; node.text = text; return node; @@ -24255,7 +24306,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; } function createJSDocLinkPlain(name, text) { - const node = createBaseNode(335 /* JSDocLinkPlain */); + const node = createBaseNode(338 /* JSDocLinkPlain */); node.name = name; node.text = text; return node; @@ -24282,14 +24333,14 @@ function createNodeFactory(flags, baseFactory2) { 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(336 /* JSDocTag */, tagName, comment); + const node = createBaseJSDocTag(339 /* JSDocTag */, tagName, comment); return node; } function updateJSDocUnknownTag(node, tagName, comment) { return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; } function createJSDocText(text) { - const node = createBaseNode(330 /* JSDocText */); + const node = createBaseNode(333 /* JSDocText */); node.text = text; return node; } @@ -24297,7 +24348,7 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text ? update(createJSDocText(text), node) : node; } function createJSDocComment2(comment, tags) { - const node = createBaseNode(329 /* JSDoc */); + const node = createBaseNode(332 /* JSDoc */); node.comment = comment; node.tags = asNodeArray(tags); return node; @@ -24306,7 +24357,7 @@ function createNodeFactory(flags, baseFactory2) { return node.comment !== comment || node.tags !== tags ? update(createJSDocComment2(comment, tags), node) : node; } function createJsxElement2(openingElement, children, closingElement) { - const node = createBaseNode(287 /* JsxElement */); + const node = createBaseNode(290 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray2(children); node.closingElement = closingElement; @@ -24317,7 +24368,7 @@ function createNodeFactory(flags, baseFactory2) { return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? update(createJsxElement2(openingElement, children, closingElement), node) : node; } function createJsxSelfClosingElement2(tagName, typeArguments, attributes) { - const node = createBaseNode(288 /* JsxSelfClosingElement */); + const node = createBaseNode(291 /* JsxSelfClosingElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -24331,7 +24382,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxSelfClosingElement2(tagName, typeArguments, attributes), node) : node; } function createJsxOpeningElement2(tagName, typeArguments, attributes) { - const node = createBaseNode(289 /* JsxOpeningElement */); + const node = createBaseNode(292 /* JsxOpeningElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -24345,7 +24396,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement2(tagName, typeArguments, attributes), node) : node; } function createJsxClosingElement2(tagName) { - const node = createBaseNode(290 /* JsxClosingElement */); + const node = createBaseNode(293 /* JsxClosingElement */); node.tagName = tagName; node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; return node; @@ -24354,7 +24405,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName ? update(createJsxClosingElement2(tagName), node) : node; } function createJsxFragment2(openingFragment, children, closingFragment) { - const node = createBaseNode(291 /* JsxFragment */); + const node = createBaseNode(294 /* JsxFragment */); node.openingFragment = openingFragment; node.children = createNodeArray2(children); node.closingFragment = closingFragment; @@ -24375,17 +24426,17 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText2(text, containsOnlyTriviaWhiteSpaces), node) : node; } function createJsxOpeningFragment2() { - const node = createBaseNode(292 /* JsxOpeningFragment */); + const node = createBaseNode(295 /* JsxOpeningFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxJsxClosingFragment2() { - const node = createBaseNode(293 /* JsxClosingFragment */); + const node = createBaseNode(296 /* JsxClosingFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxAttribute2(name, initializer) { - const node = createBaseNode(294 /* JsxAttribute */); + const node = createBaseNode(297 /* JsxAttribute */); node.name = name; node.initializer = initializer; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; @@ -24395,7 +24446,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute2(name, initializer), node) : node; } function createJsxAttributes2(properties) { - const node = createBaseNode(295 /* JsxAttributes */); + const node = createBaseNode(298 /* JsxAttributes */); node.properties = createNodeArray2(properties); node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; return node; @@ -24404,7 +24455,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createJsxAttributes2(properties), node) : node; } function createJsxSpreadAttribute2(expression) { - const node = createBaseNode(296 /* JsxSpreadAttribute */); + const node = createBaseNode(299 /* JsxSpreadAttribute */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; return node; @@ -24413,7 +24464,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxSpreadAttribute2(expression), node) : node; } function createJsxExpression2(dotDotDotToken, expression) { - const node = createBaseNode(297 /* JsxExpression */); + const node = createBaseNode(300 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; @@ -24423,7 +24474,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxExpression2(node.dotDotDotToken, expression), node) : node; } function createCaseClause2(expression, statements) { - const node = createBaseNode(298 /* CaseClause */); + const node = createBaseNode(301 /* CaseClause */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.statements = createNodeArray2(statements); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); @@ -24433,7 +24484,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statements !== statements ? update(createCaseClause2(expression, statements), node) : node; } function createDefaultClause2(statements) { - const node = createBaseNode(299 /* DefaultClause */); + const node = createBaseNode(302 /* DefaultClause */); node.statements = createNodeArray2(statements); node.transformFlags = propagateChildrenFlags(node.statements); return node; @@ -24442,7 +24493,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createDefaultClause2(statements), node) : node; } function createHeritageClause2(token, types) { - const node = createBaseNode(300 /* HeritageClause */); + const node = createBaseNode(303 /* HeritageClause */); node.token = token; node.types = createNodeArray2(types); node.transformFlags |= propagateChildrenFlags(node.types); @@ -24462,7 +24513,7 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createHeritageClause2(node.token, types), node) : node; } function createCatchClause2(variableDeclaration, block) { - const node = createBaseNode(301 /* CatchClause */); + const node = createBaseNode(304 /* CatchClause */); if (typeof variableDeclaration === "string" || variableDeclaration && !isVariableDeclaration(variableDeclaration)) { variableDeclaration = createVariableDeclaration3( variableDeclaration, @@ -24483,7 +24534,7 @@ function createNodeFactory(flags, baseFactory2) { } function createPropertyAssignment2(name, initializer) { const node = createBaseNamedDeclaration( - 305 /* PropertyAssignment */, + 308 /* PropertyAssignment */, void 0, name ); @@ -24509,7 +24560,7 @@ function createNodeFactory(flags, baseFactory2) { } function createShorthandPropertyAssignment2(name, objectAssignmentInitializer) { const node = createBaseNamedDeclaration( - 306 /* ShorthandPropertyAssignment */, + 309 /* ShorthandPropertyAssignment */, void 0, name ); @@ -24536,7 +24587,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createSpreadAssignment2(expression) { - const node = createBaseNode(307 /* SpreadAssignment */); + const node = createBaseNode(310 /* SpreadAssignment */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; return node; @@ -24545,7 +24596,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createSpreadAssignment2(expression), node) : node; } function createEnumMember2(name, initializer) { - const node = createBaseNode(308 /* EnumMember */); + const node = createBaseNode(311 /* EnumMember */); node.name = asName(name); node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; @@ -24555,7 +24606,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createEnumMember2(name, initializer), node) : node; } function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(314 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(317 /* SourceFile */); node.statements = createNodeArray2(statements); node.endOfFileToken = endOfFileToken; node.flags |= flags2; @@ -24570,7 +24621,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) { - const node = source.redirectInfo ? Object.create(source.redirectInfo.redirectTarget) : baseFactory2.createBaseSourceFileNode(314 /* SourceFile */); + const node = source.redirectInfo ? Object.create(source.redirectInfo.redirectTarget) : baseFactory2.createBaseSourceFileNode(317 /* SourceFile */); for (const p in source) { if (p === "emitNode" || hasProperty(node, p) || !hasProperty(source, p)) continue; @@ -24592,7 +24643,7 @@ function createNodeFactory(flags, baseFactory2) { 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 createBundle2(sourceFiles, prepends = emptyArray) { - const node = createBaseNode(315 /* Bundle */); + const node = createBaseNode(318 /* Bundle */); node.prepends = prepends; node.sourceFiles = sourceFiles; return node; @@ -24601,7 +24652,7 @@ function createNodeFactory(flags, baseFactory2) { return node.sourceFiles !== sourceFiles || node.prepends !== prepends ? update(createBundle2(sourceFiles, prepends), node) : node; } function createUnparsedSource(prologues, syntheticReferences, texts) { - const node = createBaseNode(316 /* UnparsedSource */); + const node = createBaseNode(319 /* UnparsedSource */); node.prologues = prologues; node.syntheticReferences = syntheticReferences; node.texts = texts; @@ -24618,48 +24669,48 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createUnparsedPrologue(data) { - return createBaseUnparsedNode(309 /* UnparsedPrologue */, data); + return createBaseUnparsedNode(312 /* UnparsedPrologue */, data); } function createUnparsedPrepend(data, texts) { - const node = createBaseUnparsedNode(310 /* UnparsedPrepend */, data); + const node = createBaseUnparsedNode(313 /* UnparsedPrepend */, data); node.texts = texts; return node; } function createUnparsedTextLike(data, internal) { - return createBaseUnparsedNode(internal ? 312 /* UnparsedInternalText */ : 311 /* UnparsedText */, data); + return createBaseUnparsedNode(internal ? 315 /* UnparsedInternalText */ : 314 /* UnparsedText */, data); } function createUnparsedSyntheticReference(section) { - const node = createBaseNode(313 /* UnparsedSyntheticReference */); + const node = createBaseNode(316 /* UnparsedSyntheticReference */); node.data = section.data; node.section = section; return node; } function createInputFiles2() { - const node = createBaseNode(317 /* InputFiles */); + const node = createBaseNode(320 /* InputFiles */); node.javascriptText = ""; node.declarationText = ""; return node; } function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(238 /* SyntheticExpression */); + const node = createBaseNode(240 /* SyntheticExpression */); node.type = type; node.isSpread = isSpread; node.tupleNameSource = tupleNameSource; return node; } function createSyntaxList3(children) { - const node = createBaseNode(357 /* SyntaxList */); + const node = createBaseNode(360 /* SyntaxList */); node._children = children; return node; } function createNotEmittedStatement2(original) { - const node = createBaseNode(358 /* NotEmittedStatement */); + const node = createBaseNode(361 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; } function createPartiallyEmittedExpression2(expression, original) { - const node = createBaseNode(359 /* PartiallyEmittedExpression */); + const node = createBaseNode(362 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -24681,7 +24732,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createCommaListExpression(elements) { - const node = createBaseNode(360 /* CommaListExpression */); + const node = createBaseNode(363 /* CommaListExpression */); node.elements = createNodeArray2(sameFlatMap(elements, flattenCommaElements)); node.transformFlags |= propagateChildrenFlags(node.elements); return node; @@ -24690,19 +24741,19 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; } function createEndOfDeclarationMarker(original) { - const node = createBaseNode(362 /* EndOfDeclarationMarker */); + const node = createBaseNode(365 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createMergeDeclarationMarker(original) { - const node = createBaseNode(361 /* MergeDeclarationMarker */); + const node = createBaseNode(364 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(363 /* SyntheticReferenceExpression */); + const node = createBaseNode(366 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); @@ -24715,7 +24766,7 @@ function createNodeFactory(flags, baseFactory2) { if (node === void 0) { return node; } - const clone2 = isSourceFile(node) ? baseFactory2.createBaseSourceFileNode(314 /* SourceFile */) : isIdentifier(node) ? baseFactory2.createBaseIdentifierNode(79 /* Identifier */) : isPrivateIdentifier(node) ? baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */) : !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind); + const clone2 = isSourceFile(node) ? baseFactory2.createBaseSourceFileNode(317 /* SourceFile */) : isIdentifier(node) ? baseFactory2.createBaseIdentifierNode(79 /* Identifier */) : isPrivateIdentifier(node) ? baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */) : !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind); clone2.flags |= node.flags & ~8 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); @@ -24840,17 +24891,17 @@ function createNodeFactory(flags, baseFactory2) { } function updateOuterExpression(outerExpression, expression) { switch (outerExpression.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return updateParenthesizedExpression(outerExpression, expression); - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: return updateTypeAssertion2(outerExpression, outerExpression.type, expression); - case 235 /* AsExpression */: + case 237 /* AsExpression */: return updateAsExpression2(outerExpression, expression, outerExpression.type); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return updateNonNullExpression2(outerExpression, expression); - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression2(outerExpression, expression); } } @@ -24890,13 +24941,13 @@ function createNodeFactory(flags, baseFactory2) { case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: return false; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: const elements = target.elements; if (elements.length === 0) { return false; } return true; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -25143,7 +25194,7 @@ function createNodeFactory(flags, baseFactory2) { } else { modifierArray = modifiers; } - return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration2(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature3(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, (_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature3(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature2(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression2(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction3(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression3(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isStructDeclaration(node) ? updateStructDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isAnnotationDeclaration(node) ? updateAnnotationDeclaration(node, modifierArray, node.name, node.members) : isVariableStatement(node) ? updateVariableStatement2(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration2(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration2(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration2(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration2(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration2(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration2(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration2(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration2(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment2(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration3(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); + return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration2(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature3(node, modifierArray, node.name, node.questionToken, node.type) : isOverloadPropertyDeclaration(node) ? updateOverloadPropertyDeclaration(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, (_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature3(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature2(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression2(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction3(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression3(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isStructDeclaration(node) ? updateStructDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isAnnotationDeclaration(node) ? updateAnnotationDeclaration(node, modifierArray, node.name, node.members) : isOverloadDeclaration(node) ? updateOverloadDeclaration(node, modifierArray, node.name, node.members) : isVariableStatement(node) ? updateVariableStatement2(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration2(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration2(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration2(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration2(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration2(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration2(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration2(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration2(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment2(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration3(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); } function asNodeArray(array) { return array ? createNodeArray2(array) : void 0; @@ -25176,41 +25227,41 @@ function updateWithOriginal(updated, original) { } function getDefaultTagNameForKind(kind) { switch (kind) { - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: return "type"; - case 350 /* JSDocReturnTag */: + case 353 /* JSDocReturnTag */: return "returns"; - case 351 /* JSDocThisTag */: + case 354 /* JSDocThisTag */: return "this"; - case 348 /* JSDocEnumTag */: + case 351 /* JSDocEnumTag */: return "enum"; - case 339 /* JSDocAuthorTag */: + case 342 /* JSDocAuthorTag */: return "author"; - case 341 /* JSDocClassTag */: + case 344 /* JSDocClassTag */: return "class"; - case 342 /* JSDocPublicTag */: + case 345 /* JSDocPublicTag */: return "public"; - case 343 /* JSDocPrivateTag */: + case 346 /* JSDocPrivateTag */: return "private"; - case 344 /* JSDocProtectedTag */: + case 347 /* JSDocProtectedTag */: return "protected"; - case 345 /* JSDocReadonlyTag */: + case 348 /* JSDocReadonlyTag */: return "readonly"; - case 346 /* JSDocOverrideTag */: + case 349 /* JSDocOverrideTag */: return "override"; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return "template"; - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return "typedef"; - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: return "param"; - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: return "prop"; - case 347 /* JSDocCallbackTag */: + case 350 /* JSDocCallbackTag */: return "callback"; - case 337 /* JSDocAugmentsTag */: + case 340 /* JSDocAugmentsTag */: return "augments"; - case 338 /* JSDocImplementsTag */: + case 341 /* JSDocImplementsTag */: return "implements"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); @@ -25283,35 +25334,35 @@ function aggregateChildrenFlags(children) { children.transformFlags = subtreeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */) { + if (kind >= 184 /* FirstTypeNode */ && kind <= 207 /* LastTypeNode */) { return -2 /* TypeExcludes */; } switch (kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 209 /* ArrayLiteralExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 211 /* ArrayLiteralExpression */: return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return -1941676032 /* ModuleExcludes */; - case 168 /* Parameter */: + case 169 /* Parameter */: return -2147483648 /* ParameterExcludes */; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return -2072174592 /* ArrowFunctionExcludes */; - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: return -1937940480 /* FunctionExcludes */; - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return -2146893824 /* VariableDeclarationListExcludes */; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return -2147344384 /* ClassExcludes */; - case 176 /* Constructor */: + case 178 /* Constructor */: return -1937948672 /* ConstructorExcludes */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return -2013249536 /* PropertyExcludes */; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return -2005057536 /* MethodOrAccessorExcludes */; case 132 /* AnyKeyword */: case 149 /* NumberKeyword */: @@ -25322,31 +25373,31 @@ function getTransformFlagsSubtreeExclusions(kind) { case 135 /* BooleanKeyword */: case 154 /* SymbolKeyword */: case 115 /* VoidKeyword */: - case 167 /* TypeParameter */: - case 170 /* PropertySignature */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: + case 171 /* PropertySignature */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return -2 /* TypeExcludes */; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return -2147278848 /* ObjectLiteralExcludes */; - case 301 /* CatchClause */: + case 304 /* CatchClause */: return -2147418112 /* CatchClauseExcludes */; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: return -2147450880 /* BindingPatternExcludes */; - case 216 /* TypeAssertionExpression */: - case 239 /* SatisfiesExpression */: - case 235 /* AsExpression */: - case 359 /* PartiallyEmittedExpression */: - case 217 /* ParenthesizedExpression */: + case 218 /* TypeAssertionExpression */: + case 241 /* SatisfiesExpression */: + case 237 /* AsExpression */: + case 362 /* PartiallyEmittedExpression */: + case 219 /* ParenthesizedExpression */: case 107 /* SuperKeyword */: return -2147483648 /* OuterExpressionExcludes */; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return -2147483648 /* PropertyAccessExcludes */; default: return -2147483648 /* NodeExcludes */; @@ -25647,7 +25698,7 @@ function getOrCreateEmitNode(node) { var _a2; if (!node.emitNode) { if (isParseTreeNode(node)) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } const sourceFile = (_a2 = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node)))) != null ? _a2 : Debug.fail("Could not determine parsed source file."); @@ -26646,589 +26697,595 @@ function isImportKeyword(node) { return node.kind === 101 /* ImportKeyword */; } function isQualifiedName(node) { - return node.kind === 165 /* QualifiedName */; + return node.kind === 166 /* QualifiedName */; } function isComputedPropertyName(node) { - return node.kind === 166 /* ComputedPropertyName */; + return node.kind === 167 /* ComputedPropertyName */; } function isTypeParameterDeclaration(node) { - return node.kind === 167 /* TypeParameter */; + return node.kind === 168 /* TypeParameter */; } function isParameter(node) { - return node.kind === 168 /* Parameter */; + return node.kind === 169 /* Parameter */; } function isDecoratorOrAnnotation(node) { - return node.kind === 169 /* Decorator */; + return node.kind === 170 /* Decorator */; } function isDecorator(node) { - return node.kind === 169 /* Decorator */ && node.annotationDeclaration === void 0; + return node.kind === 170 /* Decorator */ && node.annotationDeclaration === void 0; } function isAnnotation(node) { - return node.kind === 169 /* Decorator */ && node.annotationDeclaration !== void 0; + return node.kind === 170 /* Decorator */ && node.annotationDeclaration !== void 0; } function isPropertySignature(node) { - return node.kind === 170 /* PropertySignature */; + return node.kind === 171 /* PropertySignature */; +} +function isOverloadPropertyDeclaration(node) { + return node.kind === 174 /* OverloadPropertyDeclaration */; } function isPropertyDeclaration(node) { - return node.kind === 171 /* PropertyDeclaration */; + return node.kind === 172 /* PropertyDeclaration */; } function isAnnotationPropertyDeclaration(node) { - return node.kind === 172 /* AnnotationPropertyDeclaration */; + return node.kind === 173 /* AnnotationPropertyDeclaration */; } function isMethodSignature(node) { - return node.kind === 173 /* MethodSignature */; + return node.kind === 175 /* MethodSignature */; } function isMethodDeclaration(node) { - return node.kind === 174 /* MethodDeclaration */; + return node.kind === 176 /* MethodDeclaration */; } function isClassStaticBlockDeclaration(node) { - return node.kind === 175 /* ClassStaticBlockDeclaration */; + return node.kind === 177 /* ClassStaticBlockDeclaration */; } function isConstructorDeclaration(node) { - return node.kind === 176 /* Constructor */; + return node.kind === 178 /* Constructor */; } function isGetAccessorDeclaration(node) { - return node.kind === 177 /* GetAccessor */; + return node.kind === 179 /* GetAccessor */; } function isSetAccessorDeclaration(node) { - return node.kind === 178 /* SetAccessor */; + return node.kind === 180 /* SetAccessor */; } function isCallSignatureDeclaration(node) { - return node.kind === 179 /* CallSignature */; + return node.kind === 181 /* CallSignature */; } function isConstructSignatureDeclaration(node) { - return node.kind === 180 /* ConstructSignature */; + return node.kind === 182 /* ConstructSignature */; } function isIndexSignatureDeclaration(node) { - return node.kind === 181 /* IndexSignature */; + return node.kind === 183 /* IndexSignature */; } function isTypePredicateNode(node) { - return node.kind === 182 /* TypePredicate */; + return node.kind === 184 /* TypePredicate */; } function isTypeReferenceNode(node) { - return node.kind === 183 /* TypeReference */; + return node.kind === 185 /* TypeReference */; } function isFunctionTypeNode(node) { - return node.kind === 184 /* FunctionType */; + return node.kind === 186 /* FunctionType */; } function isConstructorTypeNode(node) { - return node.kind === 185 /* ConstructorType */; + return node.kind === 187 /* ConstructorType */; } function isTypeQueryNode(node) { - return node.kind === 186 /* TypeQuery */; + return node.kind === 188 /* TypeQuery */; } function isTypeLiteralNode(node) { - return node.kind === 187 /* TypeLiteral */; + return node.kind === 189 /* TypeLiteral */; } function isArrayTypeNode(node) { - return node.kind === 188 /* ArrayType */; + return node.kind === 190 /* ArrayType */; } function isTupleTypeNode(node) { - return node.kind === 189 /* TupleType */; + return node.kind === 191 /* TupleType */; } function isNamedTupleMember(node) { - return node.kind === 202 /* NamedTupleMember */; + return node.kind === 204 /* NamedTupleMember */; } function isOptionalTypeNode(node) { - return node.kind === 190 /* OptionalType */; + return node.kind === 192 /* OptionalType */; } function isRestTypeNode(node) { - return node.kind === 191 /* RestType */; + return node.kind === 193 /* RestType */; } function isUnionTypeNode(node) { - return node.kind === 192 /* UnionType */; + return node.kind === 194 /* UnionType */; } function isIntersectionTypeNode(node) { - return node.kind === 193 /* IntersectionType */; + return node.kind === 195 /* IntersectionType */; } function isConditionalTypeNode(node) { - return node.kind === 194 /* ConditionalType */; + return node.kind === 196 /* ConditionalType */; } function isInferTypeNode(node) { - return node.kind === 195 /* InferType */; + return node.kind === 197 /* InferType */; } function isParenthesizedTypeNode(node) { - return node.kind === 196 /* ParenthesizedType */; + return node.kind === 198 /* ParenthesizedType */; } function isThisTypeNode(node) { - return node.kind === 197 /* ThisType */; + return node.kind === 199 /* ThisType */; } function isTypeOperatorNode(node) { - return node.kind === 198 /* TypeOperator */; + return node.kind === 200 /* TypeOperator */; } function isIndexedAccessTypeNode(node) { - return node.kind === 199 /* IndexedAccessType */; + return node.kind === 201 /* IndexedAccessType */; } function isMappedTypeNode(node) { - return node.kind === 200 /* MappedType */; + return node.kind === 202 /* MappedType */; } function isLiteralTypeNode(node) { - return node.kind === 201 /* LiteralType */; + return node.kind === 203 /* LiteralType */; } function isImportTypeNode(node) { - return node.kind === 205 /* ImportType */; + return node.kind === 207 /* ImportType */; } function isTemplateLiteralTypeSpan(node) { - return node.kind === 204 /* TemplateLiteralTypeSpan */; + return node.kind === 206 /* TemplateLiteralTypeSpan */; } function isTemplateLiteralTypeNode(node) { - return node.kind === 203 /* TemplateLiteralType */; + return node.kind === 205 /* TemplateLiteralType */; } function isObjectBindingPattern(node) { - return node.kind === 206 /* ObjectBindingPattern */; + return node.kind === 208 /* ObjectBindingPattern */; } function isArrayBindingPattern(node) { - return node.kind === 207 /* ArrayBindingPattern */; + return node.kind === 209 /* ArrayBindingPattern */; } function isBindingElement(node) { - return node.kind === 208 /* BindingElement */; + return node.kind === 210 /* BindingElement */; } function isArrayLiteralExpression(node) { - return node.kind === 209 /* ArrayLiteralExpression */; + return node.kind === 211 /* ArrayLiteralExpression */; } function isObjectLiteralExpression(node) { - return node.kind === 210 /* ObjectLiteralExpression */; + return node.kind === 212 /* ObjectLiteralExpression */; } function isPropertyAccessExpression(node) { - return node.kind === 211 /* PropertyAccessExpression */; + return node.kind === 213 /* PropertyAccessExpression */; } function isElementAccessExpression(node) { - return node.kind === 212 /* ElementAccessExpression */; + return node.kind === 214 /* ElementAccessExpression */; } function isCallExpression(node) { - return node.kind === 213 /* CallExpression */; + return node.kind === 215 /* CallExpression */; } function isNewExpression(node) { - return node.kind === 214 /* NewExpression */; + return node.kind === 216 /* NewExpression */; } function isTaggedTemplateExpression(node) { - return node.kind === 215 /* TaggedTemplateExpression */; + return node.kind === 217 /* TaggedTemplateExpression */; } function isTypeAssertionExpression(node) { - return node.kind === 216 /* TypeAssertionExpression */; + return node.kind === 218 /* TypeAssertionExpression */; } function isParenthesizedExpression(node) { - return node.kind === 217 /* ParenthesizedExpression */; + return node.kind === 219 /* ParenthesizedExpression */; } function isFunctionExpression(node) { - return node.kind === 218 /* FunctionExpression */; + return node.kind === 220 /* FunctionExpression */; } function isEtsComponentExpression(node) { - return node.kind === 220 /* EtsComponentExpression */; + return node.kind === 222 /* EtsComponentExpression */; } function isArrowFunction(node) { - return node.kind === 219 /* ArrowFunction */; + return node.kind === 221 /* ArrowFunction */; } function isDeleteExpression(node) { - return node.kind === 221 /* DeleteExpression */; + return node.kind === 223 /* DeleteExpression */; } function isTypeOfExpression(node) { - return node.kind === 222 /* TypeOfExpression */; + return node.kind === 224 /* TypeOfExpression */; } function isVoidExpression(node) { - return node.kind === 223 /* VoidExpression */; + return node.kind === 225 /* VoidExpression */; } function isAwaitExpression(node) { - return node.kind === 224 /* AwaitExpression */; + return node.kind === 226 /* AwaitExpression */; } function isPrefixUnaryExpression(node) { - return node.kind === 225 /* PrefixUnaryExpression */; + return node.kind === 227 /* PrefixUnaryExpression */; } function isPostfixUnaryExpression(node) { - return node.kind === 226 /* PostfixUnaryExpression */; + return node.kind === 228 /* PostfixUnaryExpression */; } function isBinaryExpression(node) { - return node.kind === 227 /* BinaryExpression */; + return node.kind === 229 /* BinaryExpression */; } function isConditionalExpression(node) { - return node.kind === 228 /* ConditionalExpression */; + return node.kind === 230 /* ConditionalExpression */; } function isTemplateExpression(node) { - return node.kind === 229 /* TemplateExpression */; + return node.kind === 231 /* TemplateExpression */; } function isYieldExpression(node) { - return node.kind === 230 /* YieldExpression */; + return node.kind === 232 /* YieldExpression */; } function isSpreadElement(node) { - return node.kind === 231 /* SpreadElement */; + return node.kind === 233 /* SpreadElement */; } function isClassExpression(node) { - return node.kind === 232 /* ClassExpression */; + return node.kind === 234 /* ClassExpression */; } function isOmittedExpression(node) { - return node.kind === 233 /* OmittedExpression */; + return node.kind === 235 /* OmittedExpression */; } function isExpressionWithTypeArguments(node) { - return node.kind === 234 /* ExpressionWithTypeArguments */; + return node.kind === 236 /* ExpressionWithTypeArguments */; } function isAsExpression(node) { - return node.kind === 235 /* AsExpression */; + return node.kind === 237 /* AsExpression */; } function isSatisfiesExpression(node) { - return node.kind === 239 /* SatisfiesExpression */; + return node.kind === 241 /* SatisfiesExpression */; } function isNonNullExpression(node) { - return node.kind === 236 /* NonNullExpression */; + return node.kind === 238 /* NonNullExpression */; } function isMetaProperty(node) { - return node.kind === 237 /* MetaProperty */; + return node.kind === 239 /* MetaProperty */; } function isSyntheticExpression(node) { - return node.kind === 238 /* SyntheticExpression */; + return node.kind === 240 /* SyntheticExpression */; } function isPartiallyEmittedExpression(node) { - return node.kind === 359 /* PartiallyEmittedExpression */; + return node.kind === 362 /* PartiallyEmittedExpression */; } function isCommaListExpression(node) { - return node.kind === 360 /* CommaListExpression */; + return node.kind === 363 /* CommaListExpression */; } function isTemplateSpan(node) { - return node.kind === 240 /* TemplateSpan */; + return node.kind === 242 /* TemplateSpan */; } function isSemicolonClassElement(node) { - return node.kind === 241 /* SemicolonClassElement */; + return node.kind === 243 /* SemicolonClassElement */; } function isBlock(node) { - return node.kind === 242 /* Block */; + return node.kind === 244 /* Block */; } function isVariableStatement(node) { - return node.kind === 244 /* VariableStatement */; + return node.kind === 246 /* VariableStatement */; } function isEmptyStatement(node) { - return node.kind === 243 /* EmptyStatement */; + return node.kind === 245 /* EmptyStatement */; } function isExpressionStatement(node) { - return node.kind === 245 /* ExpressionStatement */; + return node.kind === 247 /* ExpressionStatement */; } function isIfStatement(node) { - return node.kind === 246 /* IfStatement */; + return node.kind === 248 /* IfStatement */; } function isDoStatement(node) { - return node.kind === 247 /* DoStatement */; + return node.kind === 249 /* DoStatement */; } function isWhileStatement(node) { - return node.kind === 248 /* WhileStatement */; + return node.kind === 250 /* WhileStatement */; } function isForStatement(node) { - return node.kind === 249 /* ForStatement */; + return node.kind === 251 /* ForStatement */; } function isForInStatement(node) { - return node.kind === 250 /* ForInStatement */; + return node.kind === 252 /* ForInStatement */; } function isForOfStatement(node) { - return node.kind === 251 /* ForOfStatement */; + return node.kind === 253 /* ForOfStatement */; } function isContinueStatement(node) { - return node.kind === 252 /* ContinueStatement */; + return node.kind === 254 /* ContinueStatement */; } function isBreakStatement(node) { - return node.kind === 253 /* BreakStatement */; + return node.kind === 255 /* BreakStatement */; } function isReturnStatement(node) { - return node.kind === 254 /* ReturnStatement */; + return node.kind === 256 /* ReturnStatement */; } function isWithStatement(node) { - return node.kind === 255 /* WithStatement */; + return node.kind === 257 /* WithStatement */; } function isSwitchStatement(node) { - return node.kind === 256 /* SwitchStatement */; + return node.kind === 258 /* SwitchStatement */; } function isLabeledStatement(node) { - return node.kind === 257 /* LabeledStatement */; + return node.kind === 259 /* LabeledStatement */; } function isThrowStatement(node) { - return node.kind === 258 /* ThrowStatement */; + return node.kind === 260 /* ThrowStatement */; } function isTryStatement(node) { - return node.kind === 259 /* TryStatement */; + return node.kind === 261 /* TryStatement */; } function isDebuggerStatement(node) { - return node.kind === 260 /* DebuggerStatement */; + return node.kind === 262 /* DebuggerStatement */; } function isVariableDeclaration(node) { - return node.kind === 261 /* VariableDeclaration */; + return node.kind === 263 /* VariableDeclaration */; } function isVariableDeclarationList(node) { - return node.kind === 262 /* VariableDeclarationList */; + return node.kind === 264 /* VariableDeclarationList */; } function isFunctionDeclaration(node) { - return node.kind === 263 /* FunctionDeclaration */; + return node.kind === 265 /* FunctionDeclaration */; } function isClassDeclaration(node) { - return node.kind === 264 /* ClassDeclaration */; + return node.kind === 266 /* ClassDeclaration */; } function isStructDeclaration(node) { - return node.kind === 265 /* StructDeclaration */; + return node.kind === 267 /* StructDeclaration */; } function isAnnotationDeclaration(node) { - return node.kind === 266 /* AnnotationDeclaration */; + return node.kind === 268 /* AnnotationDeclaration */; +} +function isOverloadDeclaration(node) { + return node.kind === 269 /* OverloadDeclaration */; } function isInterfaceDeclaration(node) { - return node.kind === 267 /* InterfaceDeclaration */; + return node.kind === 270 /* InterfaceDeclaration */; } function isTypeAliasDeclaration(node) { - return node.kind === 268 /* TypeAliasDeclaration */; + return node.kind === 271 /* TypeAliasDeclaration */; } function isEnumDeclaration(node) { - return node.kind === 269 /* EnumDeclaration */; + return node.kind === 272 /* EnumDeclaration */; } function isModuleDeclaration(node) { - return node.kind === 270 /* ModuleDeclaration */; + return node.kind === 273 /* ModuleDeclaration */; } function isModuleBlock(node) { - return node.kind === 271 /* ModuleBlock */; + return node.kind === 274 /* ModuleBlock */; } function isCaseBlock(node) { - return node.kind === 272 /* CaseBlock */; + return node.kind === 275 /* CaseBlock */; } function isNamespaceExportDeclaration(node) { - return node.kind === 273 /* NamespaceExportDeclaration */; + return node.kind === 276 /* NamespaceExportDeclaration */; } function isImportEqualsDeclaration(node) { - return node.kind === 274 /* ImportEqualsDeclaration */; + return node.kind === 277 /* ImportEqualsDeclaration */; } function isImportDeclaration(node) { - return node.kind === 275 /* ImportDeclaration */; + return node.kind === 278 /* ImportDeclaration */; } function isImportClause(node) { - return node.kind === 276 /* ImportClause */; + return node.kind === 279 /* ImportClause */; } function isImportTypeAssertionContainer(node) { - return node.kind === 304 /* ImportTypeAssertionContainer */; + return node.kind === 307 /* ImportTypeAssertionContainer */; } function isAssertClause(node) { - return node.kind === 302 /* AssertClause */; + return node.kind === 305 /* AssertClause */; } function isAssertEntry(node) { - return node.kind === 303 /* AssertEntry */; + return node.kind === 306 /* AssertEntry */; } function isNamespaceImport(node) { - return node.kind === 277 /* NamespaceImport */; + return node.kind === 280 /* NamespaceImport */; } function isNamespaceExport(node) { - return node.kind === 283 /* NamespaceExport */; + return node.kind === 286 /* NamespaceExport */; } function isNamedImports(node) { - return node.kind === 278 /* NamedImports */; + return node.kind === 281 /* NamedImports */; } function isImportSpecifier(node) { - return node.kind === 279 /* ImportSpecifier */; + return node.kind === 282 /* ImportSpecifier */; } function isExportAssignment(node) { - return node.kind === 280 /* ExportAssignment */; + return node.kind === 283 /* ExportAssignment */; } function isExportDeclaration(node) { - return node.kind === 281 /* ExportDeclaration */; + return node.kind === 284 /* ExportDeclaration */; } function isNamedExports(node) { - return node.kind === 282 /* NamedExports */; + return node.kind === 285 /* NamedExports */; } function isExportSpecifier(node) { - return node.kind === 284 /* ExportSpecifier */; + return node.kind === 287 /* ExportSpecifier */; } function isMissingDeclaration(node) { - return node.kind === 285 /* MissingDeclaration */; + return node.kind === 288 /* MissingDeclaration */; } function isNotEmittedStatement(node) { - return node.kind === 358 /* NotEmittedStatement */; + return node.kind === 361 /* NotEmittedStatement */; } function isSyntheticReference(node) { - return node.kind === 363 /* SyntheticReferenceExpression */; + return node.kind === 366 /* SyntheticReferenceExpression */; } function isMergeDeclarationMarker(node) { - return node.kind === 361 /* MergeDeclarationMarker */; + return node.kind === 364 /* MergeDeclarationMarker */; } function isEndOfDeclarationMarker(node) { - return node.kind === 362 /* EndOfDeclarationMarker */; + return node.kind === 365 /* EndOfDeclarationMarker */; } function isExternalModuleReference(node) { - return node.kind === 286 /* ExternalModuleReference */; + return node.kind === 289 /* ExternalModuleReference */; } function isJsxElement(node) { - return node.kind === 287 /* JsxElement */; + return node.kind === 290 /* JsxElement */; } function isJsxSelfClosingElement(node) { - return node.kind === 288 /* JsxSelfClosingElement */; + return node.kind === 291 /* JsxSelfClosingElement */; } function isJsxOpeningElement(node) { - return node.kind === 289 /* JsxOpeningElement */; + return node.kind === 292 /* JsxOpeningElement */; } function isJsxClosingElement(node) { - return node.kind === 290 /* JsxClosingElement */; + return node.kind === 293 /* JsxClosingElement */; } function isJsxFragment(node) { - return node.kind === 291 /* JsxFragment */; + return node.kind === 294 /* JsxFragment */; } function isJsxOpeningFragment(node) { - return node.kind === 292 /* JsxOpeningFragment */; + return node.kind === 295 /* JsxOpeningFragment */; } function isJsxClosingFragment(node) { - return node.kind === 293 /* JsxClosingFragment */; + return node.kind === 296 /* JsxClosingFragment */; } function isJsxAttribute(node) { - return node.kind === 294 /* JsxAttribute */; + return node.kind === 297 /* JsxAttribute */; } function isJsxAttributes(node) { - return node.kind === 295 /* JsxAttributes */; + return node.kind === 298 /* JsxAttributes */; } function isJsxSpreadAttribute(node) { - return node.kind === 296 /* JsxSpreadAttribute */; + return node.kind === 299 /* JsxSpreadAttribute */; } function isJsxExpression(node) { - return node.kind === 297 /* JsxExpression */; + return node.kind === 300 /* JsxExpression */; } function isCaseClause(node) { - return node.kind === 298 /* CaseClause */; + return node.kind === 301 /* CaseClause */; } function isDefaultClause(node) { - return node.kind === 299 /* DefaultClause */; + return node.kind === 302 /* DefaultClause */; } function isHeritageClause(node) { - return node.kind === 300 /* HeritageClause */; + return node.kind === 303 /* HeritageClause */; } function isCatchClause(node) { - return node.kind === 301 /* CatchClause */; + return node.kind === 304 /* CatchClause */; } function isPropertyAssignment(node) { - return node.kind === 305 /* PropertyAssignment */; + return node.kind === 308 /* PropertyAssignment */; } function isShorthandPropertyAssignment(node) { - return node.kind === 306 /* ShorthandPropertyAssignment */; + return node.kind === 309 /* ShorthandPropertyAssignment */; } function isSpreadAssignment(node) { - return node.kind === 307 /* SpreadAssignment */; + return node.kind === 310 /* SpreadAssignment */; } function isEnumMember(node) { - return node.kind === 308 /* EnumMember */; + return node.kind === 311 /* EnumMember */; } function isUnparsedPrepend(node) { - return node.kind === 310 /* UnparsedPrepend */; + return node.kind === 313 /* UnparsedPrepend */; } function isSourceFile(node) { - return node.kind === 314 /* SourceFile */; + return node.kind === 317 /* SourceFile */; } function isBundle(node) { - return node.kind === 315 /* Bundle */; + return node.kind === 318 /* Bundle */; } function isUnparsedSource(node) { - return node.kind === 316 /* UnparsedSource */; + return node.kind === 319 /* UnparsedSource */; } function isJSDocTypeExpression(node) { - return node.kind === 318 /* JSDocTypeExpression */; + return node.kind === 321 /* JSDocTypeExpression */; } function isJSDocNameReference(node) { - return node.kind === 319 /* JSDocNameReference */; + return node.kind === 322 /* JSDocNameReference */; } function isJSDocMemberName(node) { - return node.kind === 320 /* JSDocMemberName */; + return node.kind === 323 /* JSDocMemberName */; } function isJSDocLink(node) { - return node.kind === 333 /* JSDocLink */; + return node.kind === 336 /* JSDocLink */; } function isJSDocLinkCode(node) { - return node.kind === 334 /* JSDocLinkCode */; + return node.kind === 337 /* JSDocLinkCode */; } function isJSDocLinkPlain(node) { - return node.kind === 335 /* JSDocLinkPlain */; + return node.kind === 338 /* JSDocLinkPlain */; } function isJSDocAllType(node) { - return node.kind === 321 /* JSDocAllType */; + return node.kind === 324 /* JSDocAllType */; } function isJSDocUnknownType(node) { - return node.kind === 322 /* JSDocUnknownType */; + return node.kind === 325 /* JSDocUnknownType */; } function isJSDocNullableType(node) { - return node.kind === 323 /* JSDocNullableType */; + return node.kind === 326 /* JSDocNullableType */; } function isJSDocNonNullableType(node) { - return node.kind === 324 /* JSDocNonNullableType */; + return node.kind === 327 /* JSDocNonNullableType */; } function isJSDocOptionalType(node) { - return node.kind === 325 /* JSDocOptionalType */; + return node.kind === 328 /* JSDocOptionalType */; } function isJSDocFunctionType(node) { - return node.kind === 326 /* JSDocFunctionType */; + return node.kind === 329 /* JSDocFunctionType */; } function isJSDocVariadicType(node) { - return node.kind === 327 /* JSDocVariadicType */; + return node.kind === 330 /* JSDocVariadicType */; } function isJSDocNamepathType(node) { - return node.kind === 328 /* JSDocNamepathType */; + return node.kind === 331 /* JSDocNamepathType */; } function isJSDoc(node) { - return node.kind === 329 /* JSDoc */; + return node.kind === 332 /* JSDoc */; } function isJSDocTypeLiteral(node) { - return node.kind === 331 /* JSDocTypeLiteral */; + return node.kind === 334 /* JSDocTypeLiteral */; } function isJSDocSignature(node) { - return node.kind === 332 /* JSDocSignature */; + return node.kind === 335 /* JSDocSignature */; } function isJSDocAugmentsTag(node) { - return node.kind === 337 /* JSDocAugmentsTag */; + return node.kind === 340 /* JSDocAugmentsTag */; } function isJSDocAuthorTag(node) { - return node.kind === 339 /* JSDocAuthorTag */; + return node.kind === 342 /* JSDocAuthorTag */; } function isJSDocClassTag(node) { - return node.kind === 341 /* JSDocClassTag */; + return node.kind === 344 /* JSDocClassTag */; } function isJSDocCallbackTag(node) { - return node.kind === 347 /* JSDocCallbackTag */; + return node.kind === 350 /* JSDocCallbackTag */; } function isJSDocPublicTag(node) { - return node.kind === 342 /* JSDocPublicTag */; + return node.kind === 345 /* JSDocPublicTag */; } function isJSDocPrivateTag(node) { - return node.kind === 343 /* JSDocPrivateTag */; + return node.kind === 346 /* JSDocPrivateTag */; } function isJSDocProtectedTag(node) { - return node.kind === 344 /* JSDocProtectedTag */; + return node.kind === 347 /* JSDocProtectedTag */; } function isJSDocReadonlyTag(node) { - return node.kind === 345 /* JSDocReadonlyTag */; + return node.kind === 348 /* JSDocReadonlyTag */; } function isJSDocOverrideTag(node) { - return node.kind === 346 /* JSDocOverrideTag */; + return node.kind === 349 /* JSDocOverrideTag */; } function isJSDocDeprecatedTag(node) { - return node.kind === 340 /* JSDocDeprecatedTag */; + return node.kind === 343 /* JSDocDeprecatedTag */; } function isJSDocSeeTag(node) { - return node.kind === 355 /* JSDocSeeTag */; + return node.kind === 358 /* JSDocSeeTag */; } function isJSDocEnumTag(node) { - return node.kind === 348 /* JSDocEnumTag */; + return node.kind === 351 /* JSDocEnumTag */; } function isJSDocParameterTag(node) { - return node.kind === 349 /* JSDocParameterTag */; + return node.kind === 352 /* JSDocParameterTag */; } function isJSDocReturnTag(node) { - return node.kind === 350 /* JSDocReturnTag */; + return node.kind === 353 /* JSDocReturnTag */; } function isJSDocThisTag(node) { - return node.kind === 351 /* JSDocThisTag */; + return node.kind === 354 /* JSDocThisTag */; } function isJSDocTypeTag(node) { - return node.kind === 352 /* JSDocTypeTag */; + return node.kind === 355 /* JSDocTypeTag */; } function isJSDocTemplateTag(node) { - return node.kind === 353 /* JSDocTemplateTag */; + return node.kind === 356 /* JSDocTemplateTag */; } function isJSDocTypedefTag(node) { - return node.kind === 354 /* JSDocTypedefTag */; + return node.kind === 357 /* JSDocTypedefTag */; } function isJSDocUnknownTag(node) { - return node.kind === 336 /* JSDocTag */; + return node.kind === 339 /* JSDocTag */; } function isJSDocPropertyTag(node) { - return node.kind === 356 /* JSDocPropertyTag */; + return node.kind === 359 /* JSDocPropertyTag */; } function isJSDocImplementsTag(node) { - return node.kind === 338 /* JSDocImplementsTag */; + return node.kind === 341 /* JSDocImplementsTag */; } function isSyntaxList(n) { - return n.kind === 357 /* SyntaxList */; + return n.kind === 360 /* SyntaxList */; } // src/compiler/factory/utilities.ts @@ -27472,14 +27529,14 @@ function createExpressionForObjectLiteralElementLike(factory2, node, property, r Debug.failBadSyntaxKind(property.name, "Private identifiers are not allowed in object literals."); } switch (property.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return createExpressionForAccessorDeclaration(factory2, node.properties, property, receiver, !!node.multiLine); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return createExpressionForPropertyAssignment(factory2, property, receiver); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return createExpressionForShorthandPropertyAssignment(factory2, property, receiver); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return createExpressionForMethodDeclaration(factory2, property, receiver); } } @@ -27532,7 +27589,7 @@ function startsWithUseStrict(statements) { return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement); } function isCommaSequence(node) { - return node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 360 /* CommaListExpression */; + return node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 363 /* CommaListExpression */; } function isJSDocTypeAssertion(node) { return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node); @@ -27544,18 +27601,18 @@ function getJSDocTypeAssertionType(node) { } function isOuterExpression(node, kinds = 15 /* All */) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { return false; } return (kinds & 1 /* Parentheses */) !== 0; - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: - case 239 /* SatisfiesExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: + case 241 /* SatisfiesExpression */: return (kinds & 2 /* TypeAssertions */) !== 0; - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return (kinds & 4 /* NonNullAssertions */) !== 0; - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -27661,10 +27718,10 @@ function getLocalNameForExternalImport(factory2, node, sourceFile) { const name = namespaceDeclaration.name; return isGeneratedIdentifier(name) ? name : factory2.createIdentifier(getSourceTextOfNodeFromSourceFile(sourceFile, name) || idText(name)); } - if (node.kind === 275 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 278 /* ImportDeclaration */ && node.importClause) { return factory2.getGeneratedNameForNode(node); } - if (node.kind === 281 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 284 /* ExportDeclaration */ && node.moduleSpecifier) { return factory2.getGeneratedNameForNode(node); } return void 0; @@ -27719,11 +27776,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } if (isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return bindingElement.name; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } } @@ -27737,11 +27794,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 168 /* Parameter */: - case 208 /* BindingElement */: + case 169 /* Parameter */: + case 210 /* BindingElement */: return bindingElement.dotDotDotToken; - case 231 /* SpreadElement */: - case 307 /* SpreadAssignment */: + case 233 /* SpreadElement */: + case 310 /* SpreadAssignment */: return bindingElement; } return void 0; @@ -27753,7 +27810,7 @@ function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { } function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 208 /* BindingElement */: + case 210 /* BindingElement */: if (bindingElement.propertyName) { const propertyName = bindingElement.propertyName; if (isPrivateIdentifier(propertyName)) { @@ -27762,7 +27819,7 @@ function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (bindingElement.name) { const propertyName = bindingElement.name; if (isPrivateIdentifier(propertyName)) { @@ -27771,7 +27828,7 @@ function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: if (bindingElement.name && isPrivateIdentifier(bindingElement.name)) { return Debug.failBadSyntaxKind(bindingElement.name); } @@ -27788,11 +27845,11 @@ function isStringOrNumericLiteral(node) { } function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: + case 211 /* ArrayLiteralExpression */: return name.elements; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return name.properties; } } @@ -27809,19 +27866,19 @@ function getJSDocTypeAliasName(fullName) { } function canHaveIllegalType(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 178 /* SetAccessor */; + return kind === 178 /* Constructor */ || kind === 180 /* SetAccessor */; } function canHaveIllegalTypeParameters(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 178 /* Constructor */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function canHaveIllegalDecorators(node) { const kind = node.kind; - return kind === 305 /* PropertyAssignment */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 263 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 285 /* MissingDeclaration */ || kind === 244 /* VariableStatement */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 269 /* EnumDeclaration */ || kind === 270 /* ModuleDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 273 /* NamespaceExportDeclaration */ || kind === 281 /* ExportDeclaration */ || kind === 280 /* ExportAssignment */; + return kind === 308 /* PropertyAssignment */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 265 /* FunctionDeclaration */ || kind === 178 /* Constructor */ || kind === 183 /* IndexSignature */ || kind === 177 /* ClassStaticBlockDeclaration */ || kind === 288 /* MissingDeclaration */ || kind === 246 /* VariableStatement */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 272 /* EnumDeclaration */ || kind === 273 /* ModuleDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 276 /* NamespaceExportDeclaration */ || kind === 284 /* ExportDeclaration */ || kind === 283 /* ExportAssignment */; } function canHaveIllegalModifiers(node) { const kind = node.kind; - return kind === 175 /* ClassStaticBlockDeclaration */ || kind === 305 /* PropertyAssignment */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 184 /* FunctionType */ || kind === 285 /* MissingDeclaration */ || kind === 273 /* NamespaceExportDeclaration */; + return kind === 177 /* ClassStaticBlockDeclaration */ || kind === 308 /* PropertyAssignment */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 186 /* FunctionType */ || kind === 288 /* MissingDeclaration */ || kind === 276 /* NamespaceExportDeclaration */; } var isTypeNodeOrTypeParameterDeclaration = or(isTypeNode, isTypeParameterDeclaration); var isQuestionOrExclamationToken = or(isQuestionToken, isExclamationToken); @@ -28107,11 +28164,11 @@ function setTextRange(range, location) { } function canHaveModifiers(node) { const kind = node.kind; - return kind === 167 /* TypeParameter */ || kind === 168 /* Parameter */ || kind === 170 /* PropertySignature */ || kind === 171 /* PropertyDeclaration */ || kind === 173 /* MethodSignature */ || kind === 174 /* MethodDeclaration */ || kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 185 /* ConstructorType */ || kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || kind === 232 /* ClassExpression */ || kind === 265 /* StructDeclaration */ || kind === 266 /* AnnotationDeclaration */ || kind === 244 /* VariableStatement */ || kind === 263 /* FunctionDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 269 /* EnumDeclaration */ || kind === 270 /* ModuleDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 280 /* ExportAssignment */ || kind === 281 /* ExportDeclaration */; + return kind === 168 /* TypeParameter */ || kind === 169 /* Parameter */ || kind === 171 /* PropertySignature */ || kind === 172 /* PropertyDeclaration */ || kind === 175 /* MethodSignature */ || kind === 176 /* MethodDeclaration */ || kind === 178 /* Constructor */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 183 /* IndexSignature */ || kind === 187 /* ConstructorType */ || kind === 220 /* FunctionExpression */ || kind === 221 /* ArrowFunction */ || kind === 234 /* ClassExpression */ || kind === 267 /* StructDeclaration */ || kind === 268 /* AnnotationDeclaration */ || kind === 246 /* VariableStatement */ || kind === 265 /* FunctionDeclaration */ || kind === 266 /* ClassDeclaration */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 272 /* EnumDeclaration */ || kind === 273 /* ModuleDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 283 /* ExportAssignment */ || kind === 284 /* ExportDeclaration */; } function canHaveDecorators(node) { const kind = node.kind; - return kind === 168 /* Parameter */ || kind === 171 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 232 /* ClassExpression */ || kind === 264 /* ClassDeclaration */ || kind === 265 /* StructDeclaration */; + return kind === 169 /* Parameter */ || kind === 172 /* PropertyDeclaration */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 234 /* ClassExpression */ || kind === 266 /* ClassDeclaration */ || kind === 267 /* StructDeclaration */; } // src/compiler/parser.ts @@ -28166,430 +28223,434 @@ function isImportMeta2(node) { return isMetaProperty(node) && node.keywordToken === 101 /* ImportKeyword */ && node.name.escapedText === "meta"; } var forEachChildTable = { - [165 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { + [166 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [167 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { + [168 /* 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); }, - [306 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { + [309 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || 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); }, - [307 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { + [310 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [168 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { + [169 /* 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); }, - [171 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { + [172 /* 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); }, - [172 /* AnnotationPropertyDeclaration */]: function forEachChildInAnnotationPropertyDeclaration(node, cbNode, _cbNodes) { + [173 /* AnnotationPropertyDeclaration */]: function forEachChildInAnnotationPropertyDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [170 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { + [171 /* 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); + }, + [174 /* OverloadPropertyDeclaration */]: function forEachChildInOverloadPropertyDeclaration(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); }, - [305 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { + [308 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); }, - [261 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { + [263 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [208 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { + [210 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [181 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { + [183 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [185 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { + [187 /* 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); }, - [184 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { + [186 /* 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); }, - [179 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [180 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [220 /* EtsComponentExpression */]: function forEachChildInEtsComponentExpression(node, cbNode, cbNodes) { + [181 /* CallSignature */]: forEachChildInCallOrConstructSignature, + [182 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, + [222 /* EtsComponentExpression */]: function forEachChildInEtsComponentExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.arguments) || visitNode2(cbNode, node.body); }, - [174 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { + [176 /* 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); }, - [173 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { + [175 /* 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); }, - [176 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { + [178 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || 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); }, - [177 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { + [179 /* 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); }, - [178 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { + [180 /* 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); }, - [263 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { + [265 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || 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); }, - [218 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { + [220 /* 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); }, - [219 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { + [221 /* 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); }, - [175 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { + [177 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); }, - [183 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { + [185 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [182 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { + [184 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); }, - [186 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { + [188 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [187 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { + [189 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.members); }, - [188 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { + [190 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.elementType); }, - [189 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { + [191 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [192 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [193 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [194 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { + [194 /* UnionType */]: forEachChildInUnionOrIntersectionType, + [195 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, + [196 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); }, - [195 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { + [197 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.typeParameter); }, - [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { + [207 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [304 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { + [307 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); }, - [196 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [198 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [199 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { + [198 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, + [200 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, + [201 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); }, - [200 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { + [202 /* 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); }, - [201 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { + [203 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.literal); }, - [202 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { + [204 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); }, - [206 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [207 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [209 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { + [208 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [209 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [211 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [210 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { + [212 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [211 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { + [213 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); }, - [212 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { + [214 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); }, - [213 /* CallExpression */]: forEachChildInCallOrNewExpression, - [214 /* NewExpression */]: forEachChildInCallOrNewExpression, - [215 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { + [215 /* CallExpression */]: forEachChildInCallOrNewExpression, + [216 /* NewExpression */]: forEachChildInCallOrNewExpression, + [217 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); }, - [216 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { + [218 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); }, - [217 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { + [219 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [221 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { + [223 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [222 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { + [224 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [223 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { + [225 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [225 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { + [227 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [230 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { + [232 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); }, - [224 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { + [226 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [226 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { + [228 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [227 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { + [229 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); }, - [235 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { + [237 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [236 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { + [238 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [239 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { + [241 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [237 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { + [239 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [228 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { + [230 /* 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); }, - [231 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { + [233 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [242 /* Block */]: forEachChildInBlock, - [271 /* ModuleBlock */]: forEachChildInBlock, - [314 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { + [244 /* Block */]: forEachChildInBlock, + [274 /* ModuleBlock */]: forEachChildInBlock, + [317 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); }, - [244 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { + [246 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); }, - [262 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { + [264 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.declarations); }, - [245 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { + [247 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [246 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { + [248 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); }, - [247 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { + [249 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); }, - [248 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { + [250 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [249 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { + [251 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); }, - [250 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { + [252 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [251 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { + [253 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [252 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [253 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [254 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { + [254 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, + [255 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, + [256 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [255 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { + [257 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [256 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { + [258 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); }, - [272 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { + [275 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.clauses); }, - [298 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { + [301 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); }, - [299 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { + [302 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements); }, - [257 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { + [259 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); }, - [258 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { + [260 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [259 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { + [261 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); }, - [301 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { + [304 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); }, - [169 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { + [170 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [264 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [232 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [265 /* StructDeclaration */]: forEachChildInClassDeclarationOrExpression, - [266 /* AnnotationDeclaration */]: forEachChildInAnnotationDeclaration, - [267 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { + [266 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, + [234 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, + [267 /* StructDeclaration */]: forEachChildInClassDeclarationOrExpression, + [268 /* AnnotationDeclaration */]: forEachChildInAnnotationDeclaration, + [269 /* OverloadDeclaration */]: forEachChildInOverloadDeclaration, + [270 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); }, - [268 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { + [271 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); }, - [269 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { + [272 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); }, - [308 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { + [311 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [270 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { + [273 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); }, - [274 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { + [277 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, - [275 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { + [278 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [276 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { + [279 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [302 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [305 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [303 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [306 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, - [273 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { + [276 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNode2(cbNode, node.name); }, - [277 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { + [280 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [283 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { + [286 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [278 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [282 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [281 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { + [281 /* NamedImports */]: forEachChildInNamedImportsOrExports, + [285 /* NamedExports */]: forEachChildInNamedImportsOrExports, + [284 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [279 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [284 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [280 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { + [282 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, + [287 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, + [283 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); }, - [229 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { + [231 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [240 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { + [242 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); }, - [203 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { + [205 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [204 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { + [206 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); }, - [166 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { + [167 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [300 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { + [303 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.types); }, - [234 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { + [236 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [286 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { + [289 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [285 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { + [288 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers); }, - [360 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { + [363 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [287 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { + [290 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); }, - [291 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { + [294 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); }, - [288 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [289 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [295 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { + [291 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [292 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [298 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [294 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { + [297 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [296 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { + [299 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [297 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { + [300 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); }, - [290 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { + [293 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tagName); }, - [190 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [191 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [318 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [324 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [323 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [325 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [327 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [326 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { + [192 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [193 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [321 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [327 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [326 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [328 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [330 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [329 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [329 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { + [332 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); }, - [355 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { + [358 /* 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)); }, - [319 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { + [322 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [320 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { + [323 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [349 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [356 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [339 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { + [352 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, + [359 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, + [342 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [338 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { + [341 /* 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)); }, - [337 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { + [340 /* 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)); }, - [353 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { + [356 /* 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)); }, - [354 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 318 /* 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))); + [357 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { + return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 321 /* 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))); }, - [347 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { + [350 /* 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)); }, - [350 /* JSDocReturnTag */]: forEachChildInJSDocReturnTag, - [352 /* JSDocTypeTag */]: forEachChildInJSDocReturnTag, - [351 /* JSDocThisTag */]: forEachChildInJSDocReturnTag, - [348 /* JSDocEnumTag */]: forEachChildInJSDocReturnTag, - [332 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { + [353 /* JSDocReturnTag */]: forEachChildInJSDocReturnTag, + [355 /* JSDocTypeTag */]: forEachChildInJSDocReturnTag, + [354 /* JSDocThisTag */]: forEachChildInJSDocReturnTag, + [351 /* JSDocEnumTag */]: forEachChildInJSDocReturnTag, + [335 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); }, - [333 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [334 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [335 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [331 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { + [336 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, + [337 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, + [338 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, + [334 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { return forEach(node.jsDocPropertyTags, cbNode); }, - [336 /* JSDocTag */]: forEachChildInJSDocTag, - [341 /* JSDocClassTag */]: forEachChildInJSDocTag, - [342 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [343 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [344 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [345 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [340 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [346 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [359 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression + [339 /* JSDocTag */]: forEachChildInJSDocTag, + [344 /* JSDocClassTag */]: forEachChildInJSDocTag, + [345 /* JSDocPublicTag */]: forEachChildInJSDocTag, + [346 /* JSDocPrivateTag */]: forEachChildInJSDocTag, + [347 /* JSDocProtectedTag */]: forEachChildInJSDocTag, + [348 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, + [343 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, + [349 /* JSDocOverrideTag */]: forEachChildInJSDocTag, + [362 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression }; function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); @@ -28618,6 +28679,9 @@ function forEachChildInClassDeclarationOrExpression(node, cbNode, cbNodes) { function forEachChildInAnnotationDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); } +function forEachChildInOverloadDeclaration(node, cbNode, cbNodes) { + return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); +} function forEachChildInNamedImportsOrExports(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); } @@ -28646,7 +28710,7 @@ function forEachChildInPartiallyEmittedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); } function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 164 /* LastToken */) { + if (node === void 0 || node.kind <= 165 /* LastToken */) { return; } const fn = forEachChildTable[node.kind]; @@ -28681,7 +28745,7 @@ function forEachChildRecursively(rootNode, cbNode, cbNodes) { continue; return res; } - if (current.kind >= 165 /* FirstNode */) { + if (current.kind >= 166 /* FirstNode */) { for (const child of gatherPossibleChildren(current)) { queue.push(child); parents.push(current); @@ -29653,7 +29717,7 @@ var Parser; parseErrorAtCurrentToken(diagnosticMessage, arg0); } const pos = getNodePos(); - const result = kind === 79 /* Identifier */ ? factory2.createIdentifier("", void 0, void 0) : isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(kind, "", "", void 0) : kind === 8 /* NumericLiteral */ ? factory2.createNumericLiteral("", void 0) : kind === 10 /* StringLiteral */ ? factory2.createStringLiteral("", void 0) : kind === 285 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factory2.createToken(kind); + const result = kind === 79 /* Identifier */ ? factory2.createIdentifier("", void 0, void 0) : isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(kind, "", "", void 0) : kind === 8 /* NumericLiteral */ ? factory2.createNumericLiteral("", void 0) : kind === 10 /* StringLiteral */ ? factory2.createStringLiteral("", void 0) : kind === 288 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factory2.createToken(kind); return finishNode(result, pos); } function internIdentifier(text) { @@ -29778,6 +29842,9 @@ var Parser; if (inAllowAnnotationContext() && token() === 59 /* AtToken */) { return lookAhead(() => nextToken() === 119 /* InterfaceKeyword */); } + if (token() === 164 /* OverloadKeyword */) { + return true; + } return canFollowExportModifier(); case 89 /* DefaultKeyword */: return nextTokenCanFollowDefaultKeyword(); @@ -29802,7 +29869,7 @@ var Parser; return isModifierKind(token()) && tryParse(nextTokenCanFollowModifier); } function canFollowModifier() { - return token() === 22 /* OpenBracketToken */ || token() === 18 /* OpenBraceToken */ || token() === 41 /* AsteriskToken */ || token() === 25 /* DotDotDotToken */ || token() === 59 /* AtToken */ && inAllowAnnotationContext() && lookAhead(() => nextToken() === 119 /* InterfaceKeyword */) || isLiteralPropertyName(); + return token() === 22 /* OpenBracketToken */ || token() === 18 /* OpenBraceToken */ || token() === 41 /* AsteriskToken */ || token() === 25 /* DotDotDotToken */ || token() === 59 /* AtToken */ && inAllowAnnotationContext() && lookAhead(() => nextToken() === 119 /* InterfaceKeyword */) || token() === 164 /* OverloadKeyword */ || isLiteralPropertyName(); } function nextTokenCanFollowDefaultKeyword() { nextToken(); @@ -30077,15 +30144,15 @@ var Parser; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 176 /* Constructor */: - case 181 /* IndexSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 241 /* SemicolonClassElement */: + case 178 /* Constructor */: + case 183 /* IndexSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 243 /* SemicolonClassElement */: return true; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return !inStructContext(); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: const methodDeclaration = node; const nameIsConstructor = methodDeclaration.name.kind === 79 /* Identifier */ && methodDeclaration.name.originalKeywordKind === 136 /* ConstructorKeyword */; return !nameIsConstructor; @@ -30096,8 +30163,8 @@ var Parser; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: return true; } } @@ -30106,66 +30173,66 @@ var Parser; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 244 /* VariableStatement */: - case 242 /* Block */: - case 246 /* IfStatement */: - case 245 /* ExpressionStatement */: - case 258 /* ThrowStatement */: - case 254 /* ReturnStatement */: - case 256 /* SwitchStatement */: - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 249 /* ForStatement */: - case 248 /* WhileStatement */: - case 255 /* WithStatement */: - case 243 /* EmptyStatement */: - case 259 /* TryStatement */: - case 257 /* LabeledStatement */: - case 247 /* DoStatement */: - case 260 /* DebuggerStatement */: - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 265 /* FunctionDeclaration */: + case 246 /* VariableStatement */: + case 244 /* Block */: + case 248 /* IfStatement */: + case 247 /* ExpressionStatement */: + case 260 /* ThrowStatement */: + case 256 /* ReturnStatement */: + case 258 /* SwitchStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 251 /* ForStatement */: + case 250 /* WhileStatement */: + case 257 /* WithStatement */: + case 245 /* EmptyStatement */: + case 261 /* TryStatement */: + case 259 /* LabeledStatement */: + case 249 /* DoStatement */: + case 262 /* DebuggerStatement */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 308 /* EnumMember */; + return node.kind === 311 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 170 /* PropertySignature */: - case 179 /* CallSignature */: + case 182 /* ConstructSignature */: + case 175 /* MethodSignature */: + case 183 /* IndexSignature */: + case 171 /* PropertySignature */: + case 181 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 261 /* VariableDeclaration */) { + if (node.kind !== 263 /* VariableDeclaration */) { return false; } const variableDeclarator = node; return variableDeclarator.initializer === void 0; } function isReusableParameter(node) { - if (node.kind !== 168 /* Parameter */) { + if (node.kind !== 169 /* Parameter */) { return false; } const parameter = node; @@ -30456,14 +30523,14 @@ var Parser; } function typeHasArrowFunctionBlockingParseError(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return nodeIsMissing(node.typeName); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: { + case 186 /* FunctionType */: + case 187 /* ConstructorType */: { const { parameters, type } = node; return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); } - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return typeHasArrowFunctionBlockingParseError(node.type); default: return false; @@ -30704,14 +30771,14 @@ var Parser; function parseSignatureMember(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 180 /* ConstructSignature */) { + if (kind === 182 /* ConstructSignature */) { parseExpected(104 /* NewKeyword */); } const typeParameters = parseTypeParameters(); const parameters = parseParameters(4 /* Type */); const type = parseReturnType(58 /* ColonToken */, true); parseTypeMemberSemicolon(); - const node = kind === 179 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); + const node = kind === 181 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } function isIndexSignature() { @@ -30749,6 +30816,17 @@ var Parser; node.illegalDecorators = decorators; return withJSDoc(finishNode(node, pos), hasJSDoc); } + function parseOverloadPropertyDeclaration(pos, hasJSDoc, modifiers) { + const name = parsePropertyName(); + const questionToken = parseOptionalToken(57 /* QuestionToken */); + let node; + const type = parseTypeAnnotation(); + node = factory2.createOverloadPropertyDeclaration(modifiers, name, questionToken, type); + if (token() === 63 /* EqualsToken */) + node.initializer = parseInitializer(); + parseTypeMemberSemicolon(); + return withJSDoc(finishNode(node, pos), hasJSDoc); + } function parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers) { const name = parsePropertyName(); const questionToken = parseOptionalToken(57 /* QuestionToken */); @@ -30790,19 +30868,19 @@ var Parser; } function parseTypeMember() { if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */) { - return parseSignatureMember(179 /* CallSignature */); + return parseSignatureMember(181 /* CallSignature */); } if (token() === 104 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(180 /* ConstructSignature */); + return parseSignatureMember(182 /* ConstructSignature */); } const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); const modifiers = parseModifiers(); if (parseContextualModifier(138 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 177 /* GetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 179 /* GetAccessor */, 4 /* Type */); } if (parseContextualModifier(152 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 178 /* SetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 180 /* SetAccessor */, 4 /* Type */); } if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, void 0, modifiers); @@ -31678,7 +31756,7 @@ var Parser; return void 0; } let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 196 /* ParenthesizedType */) { + while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 198 /* ParenthesizedType */) { unwrappedType = unwrappedType.type; } const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); @@ -31741,7 +31819,7 @@ var Parser; return parseBinaryExpressionRest(precedence, leftOperand, pos); } function isInOrOfKeyword(t) { - return t === 102 /* InKeyword */ || t === 164 /* OfKeyword */; + return t === 102 /* InKeyword */ || t === 165 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand, pos) { while (true) { @@ -31823,7 +31901,7 @@ var Parser; if (token() === 42 /* AsteriskAsteriskToken */) { const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 216 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 218 /* 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)); @@ -31946,11 +32024,11 @@ var Parser; const pos = getNodePos(); const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); let result; - if (opening.kind === 289 /* JsxOpeningElement */) { + if (opening.kind === 292 /* JsxOpeningElement */) { let children = parseJsxChildren(opening); let closingElement; const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 287 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { + if ((lastChild == null ? void 0 : lastChild.kind) === 290 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { const end = lastChild.children.end; const newLast = finishNode( factory2.createJsxElement( @@ -31974,10 +32052,10 @@ var Parser; } } result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 292 /* JsxOpeningFragment */) { + } else if (opening.kind === 295 /* JsxOpeningFragment */) { result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { - Debug.assert(opening.kind === 288 /* JsxSelfClosingElement */); + Debug.assert(opening.kind === 291 /* JsxSelfClosingElement */); result = opening; } if (inExpressionContext && token() === 29 /* LessThanToken */) { @@ -32033,7 +32111,7 @@ var Parser; if (!child) break; list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 287 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { + if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 290 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { break; } } @@ -32241,7 +32319,7 @@ var Parser; continue; } if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 234 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest(pos, expression, questionDotToken, void 0); + expression = !questionDotToken && expression.kind === 236 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest(pos, expression, questionDotToken, void 0); continue; } if (!questionDotToken) { @@ -32289,7 +32367,7 @@ var Parser; } } if (typeArguments || token() === 20 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 234 /* ExpressionWithTypeArguments */) { + if (!questionDotToken && expression.kind === 236 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -32516,10 +32594,10 @@ var Parser; const decorators = parseDecorators(); const modifiers = parseModifiers(); if (parseContextualModifier(138 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 177 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 179 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(152 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 178 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 180 /* SetAccessor */, 0 /* None */); } const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const tokenIsIdentifier = isIdentifier2(); @@ -32589,7 +32667,7 @@ var Parser; const expressionPos = getNodePos(); let expression = parseMemberExpressionRest(expressionPos, parsePrimaryExpression(), false); let typeArguments; - if (expression.kind === 234 /* ExpressionWithTypeArguments */) { + if (expression.kind === 236 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -32697,7 +32775,7 @@ var Parser; } } let node; - if (awaitToken ? parseExpected(164 /* OfKeyword */) : parseOptional(164 /* OfKeyword */)) { + if (awaitToken ? parseExpected(165 /* OfKeyword */) : parseOptional(165 /* OfKeyword */)) { const expression = allowInAnd(() => parseAssignmentExpressionOrHigher(true)); parseExpected(21 /* CloseParenToken */); node = factory2.createForOfStatement(awaitToken, initializer, expression, parseStatement()); @@ -32718,10 +32796,10 @@ var Parser; function parseBreakOrContinueStatement(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 253 /* BreakStatement */ ? 81 /* BreakKeyword */ : 87 /* ContinueKeyword */); + parseExpected(kind === 255 /* BreakStatement */ ? 81 /* BreakKeyword */ : 87 /* ContinueKeyword */); const label = canParseSemicolon() ? void 0 : parseIdentifier(); parseSemicolon(); - const node = kind === 253 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); + const node = kind === 255 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseReturnStatement() { @@ -32875,6 +32953,8 @@ var Parser; return inEtsContext(); case 59 /* AtToken */: return inAllowAnnotationContext() && nextToken() === 119 /* InterfaceKeyword */; + case 164 /* OverloadKeyword */: + return nextTokenIsIdentifierOnSameLine(); case 119 /* InterfaceKeyword */: case 155 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); @@ -33009,9 +33089,9 @@ var Parser; case 98 /* ForKeyword */: return parseForOrForInOrForOfStatement(); case 87 /* ContinueKeyword */: - return parseBreakOrContinueStatement(252 /* ContinueStatement */); + return parseBreakOrContinueStatement(254 /* ContinueStatement */); case 81 /* BreakKeyword */: - return parseBreakOrContinueStatement(253 /* BreakStatement */); + return parseBreakOrContinueStatement(255 /* BreakStatement */); case 106 /* ReturnKeyword */: return parseReturnStatement(); case 117 /* WithKeyword */: @@ -33027,6 +33107,7 @@ var Parser; case 88 /* DebuggerKeyword */: return parseDebuggerStatement(); case 59 /* AtToken */: + case 164 /* OverloadKeyword */: return parseDeclaration(); case 133 /* AsyncKeyword */: case 119 /* InterfaceKeyword */: @@ -33075,6 +33156,19 @@ var Parser; const node = factory2.createAnnotationDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } + function parseOverloadDeclaration(pos, hasJSDoc, decorators, modifiers) { + parseExpected(164 /* OverloadKeyword */); + const name = createIdentifier3(isBindingIdentifier()); + let members; + if (parseExpected(18 /* OpenBraceToken */)) { + members = parseOverloadMembers(); + parseExpected(19 /* CloseBraceToken */); + } else { + members = createMissingList(); + } + const node = factory2.createOverloadDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, members); + return withJSDoc(finishNode(node, pos), hasJSDoc); + } function parseDeclaration() { var _a2, _b; const pos = getNodePos(); @@ -33144,6 +33238,8 @@ var Parser; return parseAnnotationDeclaration(pos, hasJSDoc, decorators, modifiers); } return parseDeclarationDefault(pos, decorators, modifiers); + case 164 /* OverloadKeyword */: + return parseOverloadDeclaration(pos, hasJSDoc, decorators, modifiers); case 119 /* InterfaceKeyword */: return parseInterfaceDeclaration(pos, hasJSDoc, decorators, modifiers); case 155 /* TypeKeyword */: @@ -33173,7 +33269,7 @@ var Parser; } function parseDeclarationDefault(pos, decorators, modifiers) { if (decorators || modifiers) { - const missing = createMissingNode(285 /* MissingDeclaration */, true, Diagnostics.Declaration_expected); + const missing = createMissingNode(288 /* MissingDeclaration */, true, Diagnostics.Declaration_expected); setTextRangePos(missing, pos); missing.illegalDecorators = decorators; missing.modifiers = modifiers; @@ -33283,7 +33379,7 @@ var Parser; } nextToken(); let declarations; - if (token() === 164 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 165 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { declarations = createMissingList(); } else { const savedDisallowIn = inDisallowInContext(); @@ -33313,7 +33409,7 @@ var Parser; const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const name = modifierFlags & 1024 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); if (name && hasEtsStylesDecoratorNames(decorators, sourceFileCompilerOptions)) { - fileStylesComponents.set(name.escapedText.toString(), 263 /* FunctionDeclaration */); + fileStylesComponents.set(name.escapedText.toString(), 265 /* FunctionDeclaration */); } const originalUICallbackContext = inUICallbackContext(); setEtsBuilderContext(hasEtsBuilderDecoratorNames(decorators, sourceFileCompilerOptions)); @@ -33417,7 +33513,7 @@ var Parser; setUICallbackContext(inBuildContext() || inBuilderContext()); if (inStructContext() && hasEtsStylesDecoratorNames(decorators, sourceFileCompilerOptions)) { if (methodName && currentStructName) { - structStylesComponents.set(methodName, { structName: currentStructName, kind: 174 /* MethodDeclaration */ }); + structStylesComponents.set(methodName, { structName: currentStructName, kind: 176 /* MethodDeclaration */ }); } const stylesEtsComponentDecoratorNames = getEtsStylesDecoratorComponentNames(decorators, sourceFileCompilerOptions); if (stylesEtsComponentDecoratorNames.length > 0) { @@ -33506,7 +33602,7 @@ var Parser; const parameters = parseParameters(0 /* None */); const type = parseReturnType(58 /* ColonToken */, false); const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 177 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, type, body) : factory2.createSetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, body); + const node = kind === 179 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, type, body) : factory2.createSetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, body); node.typeParameters = typeParameters; if (isSetAccessorDeclaration(node)) node.type = type; @@ -33718,10 +33814,10 @@ var Parser; return parseClassStaticBlockDeclaration(pos, hasJSDoc, decorators, modifiers); } if (parseContextualModifier(138 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 177 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 179 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(152 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 178 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 180 /* SetAccessor */, 0 /* None */); } if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, decorators, modifiers); @@ -33757,35 +33853,35 @@ var Parser; const hasJSDoc = hasPrecedingJSDocComment(); if (token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (parseContextualModifier(138 /* GetKeyword */)) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (parseContextualModifier(152 /* SetKeyword */)) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (isIndexSignature()) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); @@ -33796,11 +33892,66 @@ var Parser; } return Debug.fail("Should not have attempted to parse annotation member declaration."); } + function parseOverloadElement() { + const pos = getNodePos(); + if (token() === 26 /* SemicolonToken */) { + parseErrorAt(pos, pos, Diagnostics.Unexpected_keyword_or_identifier); + } + const hasJSDoc = hasPrecedingJSDocComment(); + if (token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (parseContextualModifier(138 /* GetKeyword */)) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (parseContextualModifier(152 /* SetKeyword */)) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (isIndexSignature()) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (tokenIsIdentifierOrKeyword(token())) { + const modifiers = parseModifiers(); + let overloadPropertyDeclaration = parseOverloadPropertyDeclaration(pos, hasJSDoc, modifiers); + if (overloadPropertyDeclaration.kind === 174 /* OverloadPropertyDeclaration */) { + return overloadPropertyDeclaration; + } + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + return Debug.fail("Should not have attempted to parse annotation member declaration."); + } function parseClassExpression() { - return parseClassDeclarationOrExpression(getNodePos(), hasPrecedingJSDocComment(), void 0, void 0, 232 /* ClassExpression */); + return parseClassDeclarationOrExpression(getNodePos(), hasPrecedingJSDocComment(), void 0, void 0, 234 /* ClassExpression */); } function parseClassDeclaration(pos, hasJSDoc, decorators, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers, 264 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers, 266 /* ClassDeclaration */); } function parseStructDeclaration(pos, hasJSDoc, decorators, modifiers) { return parseStructDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers); @@ -33821,7 +33972,7 @@ var Parser; members = createMissingList(); } setAwaitContext(savedAwaitContext); - const node = kind === 264 /* ClassDeclaration */ ? factory2.createClassDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members) : factory2.createClassExpression(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members); + const node = kind === 266 /* ClassDeclaration */ ? factory2.createClassDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members) : factory2.createClassExpression(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseStructDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers) { @@ -33885,7 +34036,7 @@ var Parser; function parseExpressionWithTypeArguments() { const pos = getNodePos(); const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 234 /* ExpressionWithTypeArguments */) { + if (expression.kind === 236 /* ExpressionWithTypeArguments */) { return expression; } const typeArguments = tryParseTypeArguments(); @@ -33903,13 +34054,16 @@ var Parser; function parseAnnotationMembers() { return parseList(ParsingContext.AnnotationMembers, parseAnnotationElement); } + function parseOverloadMembers() { + return parseList(ParsingContext.TypeMembers, parseOverloadElement); + } function parseStructMembers(pos) { const structMembers = parseList(ParsingContext.ClassMembers, parseClassElement); const virtualStructMembers = []; const virtualParameterProperties = []; structMembers.forEach((member) => { virtualStructMembers.push(member); - if (member.kind === 171 /* PropertyDeclaration */) { + if (member.kind === 172 /* PropertyDeclaration */) { const property = member; virtualParameterProperties.push( finishVirtualNode( @@ -34156,7 +34310,7 @@ var Parser; function parseImportClause(identifier, pos, isTypeOnly) { let namedBindings; if (!identifier || parseOptional(27 /* CommaToken */)) { - namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(278 /* NamedImports */); + namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(281 /* NamedImports */); } return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); } @@ -34189,15 +34343,15 @@ var Parser; } function parseNamedImportsOrExports(kind) { const pos = getNodePos(); - const node = kind === 278 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); + const node = kind === 281 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); return finishNode(node, pos); } function parseExportSpecifier() { const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(284 /* ExportSpecifier */), hasJSDoc); + return withJSDoc(parseImportOrExportSpecifier(287 /* ExportSpecifier */), hasJSDoc); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(279 /* ImportSpecifier */); + return parseImportOrExportSpecifier(282 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { const pos = getNodePos(); @@ -34241,10 +34395,10 @@ var Parser; parseExpected(129 /* AsKeyword */); name = parseNameWithKeywordCheck(); } - if (kind === 279 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 282 /* ImportSpecifier */ && checkIdentifierIsKeyword) { parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); } - const node = kind === 279 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); + const node = kind === 282 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); return finishNode(node, pos); function parseNameWithKeywordCheck() { checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); @@ -34271,7 +34425,7 @@ var Parser; parseExpected(160 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } else { - exportClause = parseNamedImportsOrExports(282 /* NamedExports */); + exportClause = parseNamedImportsOrExports(285 /* NamedExports */); if (token() === 160 /* FromKeyword */ || token() === 10 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { parseExpected(160 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); @@ -34845,7 +34999,7 @@ var Parser; switch (node.kind) { case 150 /* ObjectKeyword */: return true; - case 188 /* ArrayType */: + case 190 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; @@ -34875,12 +35029,12 @@ var Parser; let child; let children; while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent3, name))) { - if (child.kind === 349 /* JSDocParameterTag */ || child.kind === 356 /* JSDocPropertyTag */) { + if (child.kind === 352 /* JSDocParameterTag */ || child.kind === 359 /* JSDocPropertyTag */) { children = append(children, child); } } if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 188 /* ArrayType */), pos); + const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 190 /* ArrayType */), pos); return finishNode(factory2.createJSDocTypeExpression(literal), pos); } } @@ -34993,7 +35147,7 @@ var Parser; let hasChildren = false; while (child = tryParse(() => parseChildPropertyTag(indent3))) { hasChildren = true; - if (child.kind === 352 /* JSDocTypeTag */) { + if (child.kind === 355 /* JSDocTypeTag */) { if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { @@ -35008,7 +35162,7 @@ var Parser; } } if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 188 /* ArrayType */; + const isArrayType = typeExpression && typeExpression.type.kind === 190 /* ArrayType */; const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start2); end2 = typeExpression.end; @@ -35059,7 +35213,7 @@ var Parser; const returnTag = tryParse(() => { if (parseOptionalJsdoc(59 /* AtToken */)) { const tag = parseTag(indent3); - if (tag && tag.kind === 350 /* JSDocReturnTag */) { + if (tag && tag.kind === 353 /* JSDocReturnTag */) { return tag; } } @@ -35093,7 +35247,7 @@ var Parser; case 59 /* AtToken */: if (canParseTag) { const child = tryParseChildTag(target, indent3); - if (child && (child.kind === 349 /* JSDocParameterTag */ || child.kind === 356 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 352 /* JSDocParameterTag */ || child.kind === 359 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -37613,7 +37767,7 @@ function convertConfigFileToObject(sourceFile, errors, reportOptionsErrors, opti var _a2; const rootExpression = (_a2 = sourceFile.statements[0]) == null ? void 0 : _a2.expression; const knownRootOptions = reportOptionsErrors ? getTsconfigRootOptionsMap() : void 0; - if (rootExpression && rootExpression.kind !== 210 /* ObjectLiteralExpression */) { + if (rootExpression && rootExpression.kind !== 212 /* ObjectLiteralExpression */) { errors.push(createDiagnosticForNodeInSourceFile( sourceFile, rootExpression, @@ -37645,7 +37799,7 @@ function convertToObjectWorker(sourceFile, rootExpression, errors, returnValue, function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) { const result = returnValue ? {} : void 0; for (const element of node.properties) { - if (element.kind !== 305 /* PropertyAssignment */) { + if (element.kind !== 308 /* PropertyAssignment */) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); continue; } @@ -37733,13 +37887,13 @@ function convertToObjectWorker(sourceFile, rootExpression, errors, returnValue, case 8 /* NumericLiteral */: reportInvalidOptionValue(option && option.type !== "number"); return validateValue(Number(valueExpression.text)); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: if (valueExpression.operator !== 40 /* MinusToken */ || valueExpression.operand.kind !== 8 /* NumericLiteral */) { break; } reportInvalidOptionValue(option && option.type !== "number"); return validateValue(-Number(valueExpression.operand.text)); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: reportInvalidOptionValue(option && option.type !== "object"); const objectLiteralExpression = valueExpression; if (option) { @@ -37758,7 +37912,7 @@ function convertToObjectWorker(sourceFile, rootExpression, errors, returnValue, void 0 )); } - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: reportInvalidOptionValue(option && option.type !== "list"); return validateValue(convertArrayLiteralExpressionToJson( valueExpression.elements, @@ -40802,7 +40956,7 @@ function getReservedDecoratorsOfEtsFile(node, host) { } function getReservedDecoratorsOfStructDeclaration(node, host) { let reservedDecorators; - if (node.parent.kind === 265 /* StructDeclaration */) { + if (node.parent.kind === 267 /* StructDeclaration */) { reservedDecorators = ensureEtsDecorators(node, host); } return reservedDecorators; @@ -41019,10 +41173,10 @@ function isTokenInsideBuilder(decorators, compilerOptions) { return false; } function getEtsComponentExpressionInnerCallExpressionNode(node) { - while (node && node.kind !== 220 /* EtsComponentExpression */) { - if (node.kind === 213 /* CallExpression */) { + while (node && node.kind !== 222 /* EtsComponentExpression */) { + if (node.kind === 215 /* CallExpression */) { node = node.expression; - } else if (node.kind === 211 /* PropertyAccessExpression */) { + } else if (node.kind === 213 /* PropertyAccessExpression */) { node = node.expression; } else { node = void 0; @@ -41035,7 +41189,7 @@ function getRootEtsComponentInnerCallExpressionNode(node) { return node; } while (node) { - const ancestor = getAncestor(isCallExpression(node) ? node.parent : node, 213 /* CallExpression */); + const ancestor = getAncestor(isCallExpression(node) ? node.parent : node, 215 /* CallExpression */); const target = getRootEtsComponent(ancestor); if (target && isInStateStylesObject(node)) { return target; @@ -41064,7 +41218,7 @@ function getEtsComponentExpressionInnerExpressionStatementNode(node) { return void 0; } function isInStateStylesObject(node) { - const ancestor = getAncestor(node, 210 /* ObjectLiteralExpression */); + const ancestor = getAncestor(node, 212 /* ObjectLiteralExpression */); return ancestor !== void 0 && ancestor.parent !== void 0 && isPropertyAssignment(ancestor.parent); } function getEtsExtendDecoratorsComponentNames(decorators, compilerOptions) { @@ -41072,7 +41226,7 @@ function getEtsExtendDecoratorsComponentNames(decorators, compilerOptions) { const extendComponents = []; const extendDecorator = (_c = (_b = (_a2 = compilerOptions.ets) == null ? void 0 : _a2.extend) == null ? void 0 : _b.decorator) != null ? _c : "Extend"; decorators == null ? void 0 : decorators.forEach((decorator) => { - if (decorator.expression.kind === 213 /* CallExpression */) { + if (decorator.expression.kind === 215 /* CallExpression */) { const identifier = decorator.expression.expression; const args = decorator.expression.arguments; if (identifier.kind === 79 /* Identifier */ && (extendDecorator == null ? void 0 : extendDecorator.includes(identifier.escapedText.toString())) && args.length) { @@ -41089,7 +41243,7 @@ function getEtsStylesDecoratorComponentNames(decorators, compilerOptions) { const stylesComponents = []; const stylesDecorator = (_c = (_b = (_a2 = compilerOptions.ets) == null ? void 0 : _a2.styles) == null ? void 0 : _b.decorator) != null ? _c : "Styles"; decorators == null ? void 0 : decorators.forEach((decorator) => { - if (decorator.kind === 169 /* Decorator */ && decorator.expression.kind === 79 /* Identifier */) { + if (decorator.kind === 170 /* Decorator */ && decorator.expression.kind === 79 /* Identifier */) { const identifier = decorator.expression; if (identifier.kind === 79 /* Identifier */ && identifier.escapedText === stylesDecorator) { stylesComponents.push(identifier.escapedText); @@ -41135,7 +41289,7 @@ function transformAnnotation(context) { } function visitAnnotationsDeclarations(node) { switch (node.kind) { - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return visitAnnotationDeclaration(node); default: return visitEachChild(node, visitAnnotationsDeclarations, context); @@ -41143,9 +41297,9 @@ function transformAnnotation(context) { } function visitAnnotations(node) { switch (node.kind) { - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return visitImportSpecifier(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return visitAnnotation(node); default: return visitEachChild(node, visitAnnotations, context); @@ -41185,14 +41339,14 @@ function transformAnnotation(context) { return factory.createIdentifier( annotationMagicNamePrefix + expr.escapedText ); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: const propAccessExpr = expr; return factory.updatePropertyAccessExpression( propAccessExpr, propAccessExpr.expression, addMagicPrefixToAnnotationNameIdentifier(propAccessExpr.name) ); - case 213 /* CallExpression */: + case 215 /* CallExpression */: const callExpr = expr; return factory.updateCallExpression( callExpr, @@ -41273,16 +41427,16 @@ function transformTypeExportImportAndConstEnumInTypeScript(context) { } function visitImportExportAndConstEnumMember(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return visitImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return visitExportDeclaration(node); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return visitConstEnum(node); - case 308 /* EnumMember */: + case 311 /* EnumMember */: return visitEnumMember(node); default: return visitEachChild(node, visitImportExportAndConstEnumMember, context); @@ -41328,7 +41482,7 @@ function transformTypeExportImportAndConstEnumInTypeScript(context) { return name || namedBindings ? factory.updateImportClause(node, false, name, namedBindings) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 277 /* NamespaceImport */) { + if (node.kind === 280 /* NamespaceImport */) { if (resolver.isReferencedAliasDeclaration(node)) { return node; } @@ -41914,23 +42068,23 @@ function getModuleInstanceStateCached(node, visited = new Map2()) { } function getModuleInstanceStateWorker(node, visited) { switch (node.kind) { - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return 0 /* NonInstantiated */; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: if (isEnumConst(node)) { return 2 /* ConstEnumOnly */; } break; - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: if (!hasSyntacticModifier(node, 1 /* Export */)) { return 0 /* NonInstantiated */; } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: const exportDeclaration = node; - if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 282 /* NamedExports */) { + if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 285 /* NamedExports */) { let state = 0 /* NonInstantiated */; for (const specifier of exportDeclaration.exportClause.elements) { const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); @@ -41944,7 +42098,7 @@ function getModuleInstanceStateWorker(node, visited) { return state; } break; - case 271 /* ModuleBlock */: { + case 274 /* ModuleBlock */: { let state = 0 /* NonInstantiated */; forEachChild(node, (n) => { const childState = getModuleInstanceStateCached(n, visited); @@ -41963,7 +42117,7 @@ function getModuleInstanceStateWorker(node, visited) { }); return state; } - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return getModuleInstanceState(node, visited); case 79 /* Identifier */: if (node.isInJSDocNamespace) { @@ -42123,7 +42277,7 @@ function createBinder() { } } function getDeclarationName(node) { - if (node.kind === 280 /* ExportAssignment */) { + if (node.kind === 283 /* ExportAssignment */) { return node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; } const name = getNameOfDeclaration(node); @@ -42132,7 +42286,7 @@ function createBinder() { const moduleName = getTextOfIdentifierOrLiteral(name); return isGlobalScopeAugmentation(node) ? "__global" : `"${moduleName}"`; } - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -42154,30 +42308,30 @@ function createBinder() { return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0; } switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: return "__constructor" /* Constructor */; - case 184 /* FunctionType */: - case 179 /* CallSignature */: - case 332 /* JSDocSignature */: + case 186 /* FunctionType */: + case 181 /* CallSignature */: + case 335 /* JSDocSignature */: return "__call" /* Call */; - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 187 /* ConstructorType */: + case 182 /* ConstructSignature */: return "__new" /* New */; - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return "__index" /* Index */; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return "__export" /* ExportStar */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return "export=" /* ExportEquals */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) === 2 /* ModuleExports */) { return "export=" /* ExportEquals */; } Debug.fail("Unknown binary declaration kind"); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: return isJSDocConstructSignature(node) ? "__new" /* New */ : "__call" /* Call */; - case 168 /* Parameter */: - Debug.assert(node.parent.kind === 326 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); + case 169 /* Parameter */: + Debug.assert(node.parent.kind === 329 /* 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; @@ -42224,7 +42378,7 @@ function createBinder() { messageNeedsName = false; multipleDefaultExports = true; } else { - if (symbol.declarations && symbol.declarations.length && (node.kind === 280 /* ExportAssignment */ && !node.isExportEquals)) { + if (symbol.declarations && symbol.declarations.length && (node.kind === 283 /* ExportAssignment */ && !node.isExportEquals)) { message = Diagnostics.A_module_cannot_have_multiple_default_exports; messageNeedsName = false; multipleDefaultExports = true; @@ -42263,7 +42417,7 @@ function createBinder() { function declareModuleMember(node, symbolFlags, symbolExcludes) { const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { - if (node.kind === 284 /* ExportSpecifier */ || node.kind === 274 /* ImportEqualsDeclaration */ && hasExportModifier) { + if (node.kind === 287 /* ExportSpecifier */ || node.kind === 277 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { return declareSymbol(container.locals, void 0, node, symbolFlags, symbolExcludes); @@ -42307,7 +42461,7 @@ function createBinder() { const saveThisParentContainer = thisParentContainer; const savedBlockScopeContainer = blockScopeContainer; if (containerFlags & 1 /* IsContainer */) { - if (node.kind !== 219 /* ArrowFunction */) { + if (node.kind !== 221 /* ArrowFunction */) { thisParentContainer = container; } container = blockScopeContainer = node; @@ -42327,14 +42481,14 @@ function createBinder() { const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 177 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { currentFlow.node = node; } } - currentReturnTarget = isImmediatelyInvoked || node.kind === 176 /* Constructor */ || isInJSFile(node) && (node.kind === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */) ? createBranchLabel() : void 0; + currentReturnTarget = isImmediatelyInvoked || node.kind === 178 /* Constructor */ || isInJSFile(node) && (node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */) ? createBranchLabel() : void 0; currentExceptionTarget = void 0; currentBreakTarget = void 0; currentContinueTarget = void 0; @@ -42348,14 +42502,14 @@ function createBinder() { node.flags |= 512 /* HasExplicitReturn */; node.endFlowNode = currentFlow; } - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { node.flags |= emitFlags; node.endFlowNode = currentFlow; } if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); currentFlow = finishFlowLabel(currentReturnTarget); - if (node.kind === 176 /* Constructor */ || node.kind === 175 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { + if (node.kind === 178 /* Constructor */ || node.kind === 177 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */)) { node.returnFlowNode = currentFlow; } } @@ -42380,8 +42534,8 @@ function createBinder() { blockScopeContainer = savedBlockScopeContainer; } function bindEachFunctionsFirst(nodes) { - bindEach(nodes, (n) => n.kind === 263 /* FunctionDeclaration */ ? bind(n) : void 0); - bindEach(nodes, (n) => n.kind !== 263 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind === 265 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind !== 265 /* FunctionDeclaration */ ? bind(n) : void 0); } function bindEach(nodes, bindFunction = bind) { if (nodes === void 0) { @@ -42401,59 +42555,59 @@ function createBinder() { inAssignmentPattern = saveInAssignmentPattern; return; } - if (node.kind >= 244 /* FirstStatement */ && node.kind <= 260 /* LastStatement */ && !options.allowUnreachableCode) { + if (node.kind >= 246 /* FirstStatement */ && node.kind <= 262 /* LastStatement */ && !options.allowUnreachableCode) { node.flowNode = currentFlow; } switch (node.kind) { - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: bindWhileStatement(node); break; - case 247 /* DoStatement */: + case 249 /* DoStatement */: bindDoStatement(node); break; - case 249 /* ForStatement */: + case 251 /* ForStatement */: bindForStatement(node); break; - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 246 /* IfStatement */: + case 248 /* IfStatement */: bindIfStatement(node); break; - case 254 /* ReturnStatement */: - case 258 /* ThrowStatement */: + case 256 /* ReturnStatement */: + case 260 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 259 /* TryStatement */: + case 261 /* TryStatement */: bindTryStatement(node); break; - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: bindSwitchStatement(node); break; - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: bindCaseBlock(node); break; - case 298 /* CaseClause */: + case 301 /* CaseClause */: bindCaseClause(node); break; - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: bindExpressionStatement(node); break; - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: bindLabeledStatement(node); break; - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: bindPrefixUnaryExpressionFlow(node); break; - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: bindPostfixUnaryExpressionFlow(node); break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isDestructuringAssignment(node)) { inAssignmentPattern = saveInAssignmentPattern; bindDestructuringAssignmentFlow(node); @@ -42461,49 +42615,49 @@ function createBinder() { } bindBinaryExpressionFlow(node); break; - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: bindDeleteExpressionFlow(node); break; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: bindConditionalExpressionFlow(node); break; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: bindVariableDeclarationFlow(node); break; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: bindAccessExpressionFlow(node); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: bindCallExpressionFlow(node); break; - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: bindNonNullExpressionFlow(node); break; - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 314 /* SourceFile */: { + case 317 /* SourceFile */: { bindEachFunctionsFirst(node.statements); bind(node.endOfFileToken); break; } - case 242 /* Block */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 274 /* ModuleBlock */: bindEachFunctionsFirst(node.statements); break; - case 208 /* BindingElement */: + case 210 /* BindingElement */: bindBindingElementFlow(node); break; - case 168 /* Parameter */: + case 169 /* Parameter */: bindParameterFlow(node); break; - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: - case 305 /* PropertyAssignment */: - case 231 /* SpreadElement */: + case 212 /* ObjectLiteralExpression */: + case 211 /* ArrayLiteralExpression */: + case 308 /* PropertyAssignment */: + case 233 /* SpreadElement */: inAssignmentPattern = saveInAssignmentPattern; default: bindEachChild(node); @@ -42517,19 +42671,19 @@ function createBinder() { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: case 109 /* ThisKeyword */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return containsNarrowableReference(expr); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return hasNarrowableArgument(expr); - case 217 /* ParenthesizedExpression */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: return isNarrowingExpression(expr.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isNarrowingBinaryExpression(expr); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return expr.operator === 53 /* ExclamationToken */ && isNarrowingExpression(expr.operand); - case 222 /* TypeOfExpression */: + case 224 /* TypeOfExpression */: return isNarrowingExpression(expr.expression); } return false; @@ -42548,7 +42702,7 @@ function createBinder() { } } } - if (expr.expression.kind === 211 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { + if (expr.expression.kind === 213 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { return true; } return false; @@ -42579,9 +42733,9 @@ function createBinder() { } function isNarrowableOperand(expr) { switch (expr.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return isNarrowableOperand(expr.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (expr.operatorToken.kind) { case 63 /* EqualsToken */: return isNarrowableOperand(expr.left); @@ -42654,24 +42808,24 @@ function createBinder() { function isStatementCondition(node) { const parent3 = node.parent; switch (parent3.kind) { - case 246 /* IfStatement */: - case 248 /* WhileStatement */: - case 247 /* DoStatement */: + case 248 /* IfStatement */: + case 250 /* WhileStatement */: + case 249 /* DoStatement */: return parent3.expression === node; - case 249 /* ForStatement */: - case 228 /* ConditionalExpression */: + case 251 /* ForStatement */: + case 230 /* ConditionalExpression */: return parent3.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 217 /* ParenthesizedExpression */) { + if (node.kind === 219 /* ParenthesizedExpression */) { node = node.expression; - } else if (node.kind === 225 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { + } else if (node.kind === 227 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { node = node.operand; } else { - return node.kind === 227 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */); + return node.kind === 229 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */); } } } @@ -42712,7 +42866,7 @@ function createBinder() { } function setContinueTarget(node, target) { let label = activeLabelList; - while (label && node.parent.kind === 257 /* LabeledStatement */) { + while (label && node.parent.kind === 259 /* LabeledStatement */) { label.continueTarget = target; label = label.next; node = node.parent; @@ -42763,12 +42917,12 @@ function createBinder() { bind(node.expression); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 251 /* ForOfStatement */) { + if (node.kind === 253 /* ForOfStatement */) { bind(node.awaitModifier); } addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 262 /* VariableDeclarationList */) { + if (node.initializer.kind !== 264 /* VariableDeclarationList */) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -42790,7 +42944,7 @@ function createBinder() { } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 254 /* ReturnStatement */) { + if (node.kind === 256 /* ReturnStatement */) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -42807,7 +42961,7 @@ function createBinder() { return void 0; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - const flowLabel = node.kind === 253 /* BreakStatement */ ? breakTarget : continueTarget; + const flowLabel = node.kind === 255 /* BreakStatement */ ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -42877,7 +43031,7 @@ function createBinder() { preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 299 /* DefaultClause */); + const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 302 /* DefaultClause */); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -42920,7 +43074,7 @@ function createBinder() { maybeBindExpressionFlowIfCall(node.expression); } function maybeBindExpressionFlowIfCall(node) { - if (node.kind === 213 /* CallExpression */) { + if (node.kind === 215 /* CallExpression */) { const call = node; if (call.expression.kind !== 107 /* SuperKeyword */ && isDottedName(call.expression)) { currentFlow = createFlowCall(currentFlow, call); @@ -42946,7 +43100,7 @@ function createBinder() { currentFlow = finishFlowLabel(postStatementLabel); } function bindDestructuringTargetFlow(node) { - if (node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { + if (node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { bindAssignmentTargetFlow(node.left); } else { bindAssignmentTargetFlow(node); @@ -42955,21 +43109,21 @@ function createBinder() { function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); - } else if (node.kind === 209 /* ArrayLiteralExpression */) { + } else if (node.kind === 211 /* ArrayLiteralExpression */) { for (const e of node.elements) { - if (e.kind === 231 /* SpreadElement */) { + if (e.kind === 233 /* SpreadElement */) { bindAssignmentTargetFlow(e.expression); } else { bindDestructuringTargetFlow(e); } } - } else if (node.kind === 210 /* ObjectLiteralExpression */) { + } else if (node.kind === 212 /* ObjectLiteralExpression */) { for (const p of node.properties) { - if (p.kind === 305 /* PropertyAssignment */) { + if (p.kind === 308 /* PropertyAssignment */) { bindDestructuringTargetFlow(p.initializer); - } else if (p.kind === 306 /* ShorthandPropertyAssignment */) { + } else if (p.kind === 309 /* ShorthandPropertyAssignment */) { bindAssignmentTargetFlow(p.name); - } else if (p.kind === 307 /* SpreadAssignment */) { + } else if (p.kind === 310 /* SpreadAssignment */) { bindAssignmentTargetFlow(p.expression); } } @@ -43092,7 +43246,7 @@ function createBinder() { const operator = node.operatorToken.kind; if (isAssignmentOperator(operator) && !isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 63 /* EqualsToken */ && node.left.kind === 212 /* ElementAccessExpression */) { + if (operator === 63 /* EqualsToken */ && node.left.kind === 214 /* ElementAccessExpression */) { const elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -43120,7 +43274,7 @@ function createBinder() { } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 211 /* PropertyAccessExpression */) { + if (node.expression.kind === 213 /* PropertyAccessExpression */) { bindAssignmentTargetFlow(node.expression); } } @@ -43185,7 +43339,7 @@ function createBinder() { } function bindJSDocTypeAlias(node) { bind(node.tagName); - if (node.kind !== 348 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 351 /* JSDocEnumTag */ && node.fullName) { setParent(node.fullName, node); setParentRecursive(node.fullName, false); } @@ -43196,7 +43350,7 @@ function createBinder() { function bindJSDocClassTag(node) { bindEachChild(node); const host = getHostSignatureFromJSDoc(node); - if (host && host.kind !== 174 /* MethodDeclaration */) { + if (host && host.kind !== 176 /* MethodDeclaration */) { addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } @@ -43209,15 +43363,15 @@ function createBinder() { } function bindOptionalChainRest(node) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: bind(node.questionDotToken); bind(node.name); break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: bind(node.questionDotToken); bind(node.argumentExpression); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: bind(node.questionDotToken); bindEach(node.typeArguments); bindEach(node.arguments); @@ -43264,7 +43418,7 @@ function createBinder() { bindOptionalChainFlow(node); } else { const expr = skipParentheses(node.expression); - if (expr.kind === 218 /* FunctionExpression */ || expr.kind === 219 /* ArrowFunction */) { + if (expr.kind === 220 /* FunctionExpression */ || expr.kind === 221 /* ArrowFunction */) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); @@ -43275,7 +43429,7 @@ function createBinder() { } } } - if (node.expression.kind === 211 /* PropertyAccessExpression */) { + if (node.expression.kind === 213 /* PropertyAccessExpression */) { const propertyAccess = node.expression; if (isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -43284,58 +43438,60 @@ function createBinder() { } function getContainerFlags(node) { switch (node.kind) { - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 269 /* EnumDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 295 /* JsxAttributes */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 272 /* EnumDeclaration */: + case 212 /* ObjectLiteralExpression */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 298 /* JsxAttributes */: return 1 /* IsContainer */; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return 1 /* IsContainer */ | 64 /* IsInterface */; - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 200 /* MappedType */: - case 181 /* IndexSignature */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 202 /* MappedType */: + case 183 /* IndexSignature */: return 1 /* IsContainer */ | 32 /* HasLocals */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */; } - case 176 /* Constructor */: - case 263 /* FunctionDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 332 /* JSDocSignature */: - case 326 /* JSDocFunctionType */: - case 184 /* FunctionType */: - case 180 /* ConstructSignature */: - case 185 /* ConstructorType */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 265 /* FunctionDeclaration */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 335 /* JSDocSignature */: + case 329 /* JSDocFunctionType */: + case 186 /* FunctionType */: + case 182 /* ConstructSignature */: + case 187 /* ConstructorType */: + case 177 /* ClassStaticBlockDeclaration */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return 4 /* IsControlFlowContainer */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 301 /* CatchClause */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 272 /* CaseBlock */: + case 304 /* CatchClause */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 275 /* CaseBlock */: return 2 /* IsBlockScopedContainer */; - case 242 /* Block */: + case 244 /* Block */: return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */; } return 0 /* None */; @@ -43348,43 +43504,44 @@ function createBinder() { } function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 314 /* SourceFile */: + case 317 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 210 /* ObjectLiteralExpression */: - case 267 /* InterfaceDeclaration */: - case 295 /* JsxAttributes */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 212 /* ObjectLiteralExpression */: + case 270 /* InterfaceDeclaration */: + case 298 /* JsxAttributes */: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 332 /* JSDocSignature */: - case 181 /* IndexSignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 326 /* JSDocFunctionType */: - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 175 /* ClassStaticBlockDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 200 /* MappedType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 335 /* JSDocSignature */: + case 183 /* IndexSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 329 /* JSDocFunctionType */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 177 /* ClassStaticBlockDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 202 /* MappedType */: return declareSymbol(container.locals, void 0, node, symbolFlags, symbolExcludes); } } @@ -43470,10 +43627,10 @@ function createBinder() { } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (isExternalOrCommonJsModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -43663,7 +43820,7 @@ function createBinder() { } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2 /* ES2015 */) { - if (blockScopeContainer.kind !== 314 /* SourceFile */ && blockScopeContainer.kind !== 270 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { + if (blockScopeContainer.kind !== 317 /* SourceFile */ && blockScopeContainer.kind !== 273 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); file.bindDiagnostics.push(createFileDiagnostic( file, @@ -43730,7 +43887,7 @@ function createBinder() { node.tracingPath = file.path; const saveInStrictMode = inStrictMode; bindWorker(node); - if (node.kind > 164 /* LastToken */) { + if (node.kind > 165 /* LastToken */) { const saveParent = parent2; parent2 = node; const containerFlags = getContainerFlags(node); @@ -43792,23 +43949,23 @@ function createBinder() { break; } case 109 /* ThisKeyword */: - if (currentFlow && (isExpression(node) || parent2.kind === 306 /* ShorthandPropertyAssignment */)) { + if (currentFlow && (isExpression(node) || parent2.kind === 309 /* ShorthandPropertyAssignment */)) { node.flowNode = currentFlow; } return checkContextualIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: if (currentFlow && isPartOfTypeQuery(node)) { node.flowNode = currentFlow; } break; - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: case 107 /* SuperKeyword */: node.flowNode = currentFlow; break; case 80 /* PrivateIdentifier */: return checkPrivateIdentifier(node); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: const expr = node; if (currentFlow && isNarrowableReference(expr)) { expr.flowNode = currentFlow; @@ -43826,7 +43983,7 @@ function createBinder() { ); } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const specialKind = getAssignmentDeclarationKind(node); switch (specialKind) { case 1 /* ExportsProperty */: @@ -43861,79 +44018,80 @@ function createBinder() { Debug.fail("Unknown binary expression special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return checkStrictModeCatchClause(node); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); case 8 /* NumericLiteral */: return checkStrictModeNumericLiteral(node); - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return checkStrictModeWithStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return checkStrictModeLabeledStatement(node); - case 197 /* ThisType */: + case 199 /* ThisType */: seenThisKeyword = true; return; - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return bindTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return bindParameter(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return bindVariableDeclarationOrBindingElement(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: node.flowNode = currentFlow; return bindVariableDeclarationOrBindingElement(node); - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* OverloadPropertyDeclaration */: return bindPropertyWorker(node); - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 308 /* EnumMember */: + case 311 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return bindPropertyOrMethodOrAccessor( node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ ); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, 0 /* None */); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */); - case 184 /* FunctionType */: - case 326 /* JSDocFunctionType */: - case 332 /* JSDocSignature */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 329 /* JSDocFunctionType */: + case 335 /* JSDocSignature */: + case 187 /* ConstructorType */: return bindFunctionOrConstructorType(node); - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 200 /* MappedType */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 202 /* MappedType */: return bindAnonymousTypeWorker(node); - case 341 /* JSDocClassTag */: + case 344 /* JSDocClassTag */: return bindJSDocClassTag(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return bindFunctionExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: const assignmentKind = getAssignmentDeclarationKind(node); switch (assignmentKind) { case 7 /* ObjectDefinePropertyValue */: @@ -43951,61 +44109,63 @@ function createBinder() { bindCallExpression(node); } break; - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: inStrictMode = true; return bindClassLikeDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return bindAnnotationDeclaration(node); - case 267 /* InterfaceDeclaration */: + case 269 /* OverloadDeclaration */: + return bindOverloadDeclaration(node); + case 270 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return bindModuleDeclaration(node); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return bindJsxAttributes(node); - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 274 /* ImportEqualsDeclaration */: - case 277 /* NamespaceImport */: - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 277 /* ImportEqualsDeclaration */: + case 280 /* NamespaceImport */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return bindNamespaceExportDeclaration(node); - case 276 /* ImportClause */: + case 279 /* ImportClause */: return bindImportClause(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return bindExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return bindExportAssignment(node); - case 314 /* SourceFile */: + case 317 /* SourceFile */: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 242 /* Block */: + case 244 /* Block */: if (!isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) { return; } - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 349 /* JSDocParameterTag */: - if (node.parent.kind === 332 /* JSDocSignature */) { + case 352 /* JSDocParameterTag */: + if (node.parent.kind === 335 /* JSDocSignature */) { return bindParameter(node); } - if (node.parent.kind !== 331 /* JSDocTypeLiteral */) { + if (node.parent.kind !== 334 /* JSDocTypeLiteral */) { break; } - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: const propTag = node; - const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 325 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; + const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 328 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); } } @@ -44143,8 +44303,8 @@ function createBinder() { } const thisContainer = getThisContainer(node, false); switch (thisContainer.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: let constructorSymbol = thisContainer.symbol; if (isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 63 /* EqualsToken */) { const l = thisContainer.parent.left; @@ -44162,13 +44322,14 @@ function createBinder() { addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32 /* Class */); } break; - case 176 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 177 /* ClassStaticBlockDeclaration */: const containingClass = thisContainer.parent; const symbolTable = isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members; if (hasDynamicName(node)) { @@ -44177,7 +44338,7 @@ function createBinder() { declareSymbol(symbolTable, containingClass.symbol, node, 4 /* Property */ | 67108864 /* Assignment */, 0 /* None */, true); } break; - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (hasDynamicName(node)) { break; } else if (thisContainer.commonJsModuleIndicator) { @@ -44202,7 +44363,7 @@ function createBinder() { function bindSpecialPropertyDeclaration(node) { if (node.expression.kind === 109 /* ThisKeyword */) { bindThisPropertyAssignment(node); - } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 314 /* SourceFile */) { + } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 317 /* SourceFile */) { if (isPrototypeAccess(node.expression)) { bindPrototypePropertyAssignment(node, node.parent); } else { @@ -44232,7 +44393,7 @@ function createBinder() { } function bindObjectDefinePropertyAssignment(node) { let namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]); - const isToplevel = node.parent.parent.kind === 314 /* SourceFile */; + const isToplevel = node.parent.parent.kind === 317 /* SourceFile */; namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, node.arguments[0], isToplevel, false, false); bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, false); } @@ -44318,7 +44479,7 @@ function createBinder() { declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */); } function isTopLevelNamespaceAssignment(propertyAccess) { - return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 314 /* SourceFile */ : propertyAccess.parent.parent.kind === 314 /* SourceFile */; + return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 317 /* SourceFile */ : propertyAccess.parent.parent.kind === 317 /* SourceFile */; } function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) { let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer); @@ -44376,7 +44537,7 @@ function createBinder() { } } function bindClassLikeDeclaration(node) { - if (node.kind === 264 /* ClassDeclaration */ || node.kind === 265 /* StructDeclaration */) { + if (node.kind === 266 /* ClassDeclaration */ || node.kind === 267 /* StructDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); } else { const bindingName = node.name ? node.name.escapedText : "__class" /* Class */; @@ -44398,7 +44559,7 @@ function createBinder() { prototypeSymbol.parent = symbol; } function bindAnnotationDeclaration(node) { - Debug.assert(node.kind === 266 /* AnnotationDeclaration */); + Debug.assert(node.kind === 268 /* AnnotationDeclaration */); bindBlockScopedDeclaration(node, 32 /* Class */ | 268435456 /* Annotation */, 899503 /* ClassExcludes */); const { symbol } = node; const prototypeSymbol = createSymbol(4 /* Property */ | 4194304 /* Prototype */, "prototype"); @@ -44412,6 +44573,21 @@ function createBinder() { symbol.exports.set(prototypeSymbol.escapedName, prototypeSymbol); prototypeSymbol.parent = symbol; } + function bindOverloadDeclaration(node) { + Debug.assert(node.kind === 269 /* OverloadDeclaration */); + bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); + const { symbol } = node; + const prototypeSymbol = createSymbol(4 /* Property */ | 4194304 /* Prototype */, "prototype"); + const symbolExport = symbol.exports.get(prototypeSymbol.escapedName); + if (symbolExport) { + if (node.name) { + setParent(node.name, node); + } + file.bindDiagnostics.push(createDiagnosticForNode2(symbolExport.declarations[0], Diagnostics.Duplicate_identifier_0, symbolName(prototypeSymbol))); + } + symbol.exports.set(prototypeSymbol.escapedName, prototypeSymbol); + prototypeSymbol.parent = symbol; + } function bindEnumDeclaration(node) { return isEnumConst(node) ? bindBlockScopedDeclaration(node, 128 /* ConstEnum */, 899967 /* ConstEnumExcludes */) : bindBlockScopedDeclaration(node, 256 /* RegularEnum */, 899327 /* RegularEnumExcludes */); } @@ -44420,7 +44596,7 @@ function createBinder() { checkStrictModeEvalOrArguments(node, node.name); } if (!isBindingPattern(node.name)) { - const possibleVariableDecl = node.kind === 261 /* VariableDeclaration */ ? node : node.parent.parent; + const possibleVariableDecl = node.kind === 263 /* VariableDeclaration */ ? node : node.parent.parent; if (isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { @@ -44433,7 +44609,7 @@ function createBinder() { } } function bindParameter(node) { - if (node.kind === 349 /* JSDocParameterTag */ && container.kind !== 332 /* JSDocSignature */) { + if (node.kind === 352 /* JSDocParameterTag */ && container.kind !== 335 /* JSDocSignature */) { return; } if (inStrictMode && !(node.flags & 16777216 /* Ambient */)) { @@ -44500,7 +44676,7 @@ function createBinder() { } else { declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } - } else if (node.parent.kind === 195 /* InferType */) { + } else if (node.parent.kind === 197 /* InferType */) { const container2 = getInferTypeContainer(node.parent); if (container2) { if (!container2.locals) { @@ -44523,7 +44699,7 @@ function createBinder() { return false; } if (currentFlow === unreachableFlow) { - const reportError = isStatementButNotDeclaration(node) && node.kind !== 243 /* EmptyStatement */ || node.kind === 264 /* ClassDeclaration */ || node.kind === 270 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node); + const reportError = isStatementButNotDeclaration(node) && node.kind !== 245 /* EmptyStatement */ || node.kind === 266 /* ClassDeclaration */ || node.kind === 273 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node); if (reportError) { currentFlow = reportedUnreachableFlow; if (!options.allowUnreachableCode) { @@ -44549,12 +44725,12 @@ function isExecutableStatement(s) { } function isPurelyTypeDeclaration(s) { switch (s.kind) { - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return true; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return getModuleInstanceState(s) !== 1 /* Instantiated */; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return hasSyntacticModifier(s, 2048 /* Const */); default: return false; @@ -44736,7 +44912,7 @@ function createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignatu symbol.exports.forEach(visitSymbol); } forEach(symbol.declarations, (d) => { - if (d.type && d.type.kind === 186 /* TypeQuery */) { + if (d.type && d.type.kind === 188 /* TypeQuery */) { const query = d.type; const entity = getResolvedSymbol(getFirstIdentifier2(query.exprName)); visitSymbol(entity); @@ -46669,7 +46845,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks()); } function isGlobalSourceFile(node) { - return node.kind === 314 /* SourceFile */ && !isExternalOrCommonJsModule(node); + return node.kind === 317 /* SourceFile */ && !isExternalOrCommonJsModule(node); } function isValidFromLibs(symbol, node) { var _a2; @@ -46746,13 +46922,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile); } if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { - if (declaration.kind === 208 /* BindingElement */) { - const errorBindingElement = getAncestor(usage, 208 /* BindingElement */); + if (declaration.kind === 210 /* BindingElement */) { + const errorBindingElement = getAncestor(usage, 210 /* BindingElement */); if (errorBindingElement) { return findAncestor(errorBindingElement, isBindingElement) !== findAncestor(declaration, isBindingElement) || declaration.pos < errorBindingElement.pos; } - return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 261 /* VariableDeclaration */), usage); - } else if (declaration.kind === 261 /* VariableDeclaration */) { + return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 263 /* VariableDeclaration */), usage); + } else if (declaration.kind === 263 /* VariableDeclaration */) { return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } else if (isClassDeclaration(declaration)) { return !findAncestor(usage, (n) => isComputedPropertyName(n) && n.parent.parent === declaration); @@ -46763,10 +46939,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } return true; } - if (usage.parent.kind === 284 /* ExportSpecifier */ || usage.parent.kind === 280 /* ExportAssignment */ && usage.parent.isExportEquals) { + if (usage.parent.kind === 287 /* ExportSpecifier */ || usage.parent.kind === 283 /* ExportAssignment */ && usage.parent.isExportEquals) { return true; } - if (usage.kind === 280 /* ExportAssignment */ && usage.isExportEquals) { + if (usage.kind === 283 /* ExportAssignment */ && usage.isExportEquals) { return true; } if (!!(usage.flags & 8388608 /* JSDoc */) || isInTypeQuery(usage) || usageInTypeDeclaration()) { @@ -46785,9 +46961,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration2, usage2) { switch (declaration2.parent.parent.kind) { - case 244 /* VariableStatement */: - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: + case 246 /* VariableStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) { return true; } @@ -46812,7 +46988,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const initializerOfProperty = propertyDeclaration.initializer === current; if (initializerOfProperty) { if (isStatic(current.parent)) { - if (declaration2.kind === 174 /* MethodDeclaration */) { + if (declaration2.kind === 176 /* MethodDeclaration */) { return true; } if (isPropertyDeclaration(declaration2) && getContainingClass(usage2) === getContainingClass(declaration2)) { @@ -46826,7 +47002,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } else { - const isDeclarationInstanceProperty = declaration2.kind === 171 /* PropertyDeclaration */ && !isStatic(declaration2); + const isDeclarationInstanceProperty = declaration2.kind === 172 /* PropertyDeclaration */ && !isStatic(declaration2); if (!isDeclarationInstanceProperty || getContainingClass(usage2) !== getContainingClass(declaration2)) { return true; } @@ -46845,15 +47021,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return "quit"; } switch (node.kind) { - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return true; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return stopAtAnyPropertyDeclaration && (isPropertyDeclaration(declaration2) && node.parent === declaration2.parent || isParameterPropertyDeclaration(declaration2, declaration2.parent) && node.parent === declaration2.parent.parent) ? "quit" : true; - case 242 /* Block */: + case 244 /* Block */: switch (node.parent.kind) { - case 177 /* GetAccessor */: - case 174 /* MethodDeclaration */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 176 /* MethodDeclaration */: + case 180 /* SetAccessor */: return true; default: return false; @@ -46883,22 +47059,22 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function requiresScopeChangeWorker(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 176 /* Constructor */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 178 /* Constructor */: return false; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 305 /* PropertyAssignment */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 308 /* PropertyAssignment */: return requiresScopeChangeWorker(node.name); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (hasStaticModifier(node)) { return target < 99 /* ESNext */ || !useDefineForClassFields; } return requiresScopeChangeWorker(node.name); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return requiresScopeChangeWorker(node.name); default: if (isNullishCoalesce(node) || isOptionalChain(node)) { @@ -46940,17 +47116,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 329 /* JSDoc */) { - useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 168 /* Parameter */ || lastLocation.kind === 349 /* JSDocParameterTag */ || lastLocation.kind === 350 /* JSDocReturnTag */ || lastLocation.kind === 167 /* TypeParameter */ : false; + if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 332 /* JSDoc */) { + useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 169 /* Parameter */ || lastLocation.kind === 352 /* JSDocParameterTag */ || lastLocation.kind === 353 /* JSDocReturnTag */ || lastLocation.kind === 168 /* TypeParameter */ : false; } if (meaning & result.flags & 3 /* Variable */) { if (useOuterVariableScopeInParameter(result, location, lastLocation)) { useResult = false; } else if (result.flags & 1 /* FunctionScopedVariable */) { - useResult = lastLocation.kind === 168 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); + useResult = lastLocation.kind === 169 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); } } - } else if (location.kind === 194 /* ConditionalType */) { + } else if (location.kind === 196 /* ConditionalType */) { useResult = lastLocation === location.trueType; } if (useResult) { @@ -46962,13 +47138,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation); switch (location.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) break; isInExternalModule = true; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: const moduleExports = getSymbolOfNode(location) ? ((_a2 = getSymbolOfNode(location)) == null ? void 0 : _a2.exports) || emptySymbols : emptySymbols; - if (location.kind === 314 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location)) { + if (location.kind === 317 /* 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) { @@ -46977,7 +47153,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { result = void 0; } const moduleExport = moduleExports.get(name); - if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 284 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 283 /* NamespaceExport */))) { + if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 287 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 286 /* NamespaceExport */))) { break; } } @@ -46989,12 +47165,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: if (result = lookup(((_c = getSymbolOfNode(location)) == null ? void 0 : _c.exports) || emptySymbols, name, meaning & 8 /* EnumMember */)) { break loop; } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (!isStatic(location)) { const ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -47005,9 +47181,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: if (result = lookup(getSymbolOfNode(location).members || emptySymbols, name, meaning & 788968 /* Type */)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { result = void 0; @@ -47021,7 +47197,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } break loop; } - if (location.kind === 232 /* ClassExpression */ && meaning & 32 /* Class */) { + if (location.kind === 234 /* ClassExpression */ && meaning & 32 /* Class */) { const className = location.name; if (className && name === className.escapedText) { result = location.symbol; @@ -47029,7 +47205,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: if (lastLocation === location.expression && location.parent.token === 95 /* ExtendsKeyword */) { const container = location.parent.parent; if (isClassLike(container) && (result = lookup(getSymbolOfNode(container).members, name, meaning & 788968 /* Type */))) { @@ -47040,9 +47216,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (isClassLike(grandparent) || grandparent.kind === 267 /* InterfaceDeclaration */) { + if (isClassLike(grandparent) || grandparent.kind === 270 /* InterfaceDeclaration */) { if (result = lookup(getSymbolOfNode(grandparent).members, name, meaning & 788968 /* Type */)) { if (nameNotFoundMessage) { error(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); @@ -47051,21 +47227,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: if (getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */) { break; } - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -47078,37 +47254,37 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 169 /* Decorator */: - if (location.parent && location.parent.kind === 168 /* Parameter */) { + case 170 /* Decorator */: + if (location.parent && location.parent.kind === 169 /* Parameter */) { location = location.parent; } - if (location.parent && (isClassElement(location.parent) || location.parent.kind === 264 /* ClassDeclaration */)) { + if (location.parent && (isClassElement(location.parent) || location.parent.kind === 266 /* ClassDeclaration */)) { location = location.parent; } break; - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: const root = getJSDocRoot(location); if (root) { location = root.parent; } break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (!associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 208 /* BindingElement */: + case 210 /* BindingElement */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (isParameterDeclaration(location) && !associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 195 /* InferType */: + case 197 /* InferType */: if (meaning & 262144 /* TypeParameter */) { const parameterName = location.typeParameter.name; if (parameterName && name === parameterName.escapedText) { @@ -47129,7 +47305,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (!result) { if (lastLocation) { - Debug.assert(lastLocation.kind === 314 /* SourceFile */); + Debug.assert(lastLocation.kind === 317 /* SourceFile */); if (lastLocation.commonJsModuleIndicator && name === "exports" && meaning & lastLocation.symbol.flags) { return lastLocation.symbol; } @@ -47226,7 +47402,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 284 /* ExportSpecifier */ ? 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 === 287 /* ExportSpecifier */ ? 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), @@ -47246,14 +47422,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { diagnostic, createDiagnosticForNode( typeOnlyDeclaration, - typeOnlyDeclaration.kind === 284 /* ExportSpecifier */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, + typeOnlyDeclaration.kind === 287 /* ExportSpecifier */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, unescapedName ) ); } function getIsDeferredContext(location, lastLocation) { - if (location.kind !== 219 /* ArrowFunction */ && location.kind !== 218 /* FunctionExpression */) { - return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 171 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); + if (location.kind !== 221 /* ArrowFunction */ && location.kind !== 220 /* FunctionExpression */) { + return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 172 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); } if (lastLocation && lastLocation === location.name) { return false; @@ -47265,12 +47441,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isSelfReferenceLocation(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 270 /* ModuleDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 273 /* ModuleDeclaration */: return true; default: return false; @@ -47282,7 +47458,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isTypeParameterSymbolDeclaredInContainer(symbol, container) { if (symbol.declarations) { for (const decl of symbol.declarations) { - if (decl.kind === 167 /* TypeParameter */) { + if (decl.kind === 168 /* TypeParameter */) { const parent2 = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent; if (parent2 === container) { return !(isJSDocTemplateTag(decl.parent) && find(decl.parent.parent.tags, isJSDocTypeAlias)); @@ -47332,9 +47508,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getEntityNameForExtendingInterface(node) { switch (node.kind) { case 79 /* Identifier */: - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : void 0; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: if (isEntityNameExpression(node.expression)) { return node.expression; } @@ -47382,7 +47558,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; } function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { - if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 284 /* ExportSpecifier */) { + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 287 /* ExportSpecifier */) { error(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); return true; } @@ -47471,7 +47647,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const declaration = (_a2 = result.declarations) == null ? void 0 : _a2.find( - (d) => isBlockOrCatchScoped(d) || isClassLike(d) || isAnnotationDeclaration(d) || d.kind === 269 /* EnumDeclaration */ + (d) => isBlockOrCatchScoped(d) || isClassLike(d) || isAnnotationDeclaration(d) || d.kind === 272 /* EnumDeclaration */ ); if (declaration === void 0) return Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration"); @@ -47505,13 +47681,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getAnyImportSyntax(node) { switch (node.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return node; - case 276 /* ImportClause */: + case 279 /* ImportClause */: return node.parent; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return node.parent.parent; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return node.parent.parent.parent; default: return void 0; @@ -47521,7 +47697,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration2); } function isAliasSymbolDeclaration2(node) { - return node.kind === 274 /* ImportEqualsDeclaration */ || node.kind === 273 /* NamespaceExportDeclaration */ || node.kind === 276 /* ImportClause */ && !!node.name || node.kind === 277 /* NamespaceImport */ || node.kind === 283 /* NamespaceExport */ || node.kind === 279 /* ImportSpecifier */ || node.kind === 284 /* ExportSpecifier */ || node.kind === 280 /* 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 === 306 /* ShorthandPropertyAssignment */ || node.kind === 305 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 261 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 208 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); + return node.kind === 277 /* ImportEqualsDeclaration */ || node.kind === 276 /* NamespaceExportDeclaration */ || node.kind === 279 /* ImportClause */ && !!node.name || node.kind === 280 /* NamespaceImport */ || node.kind === 286 /* NamespaceExport */ || node.kind === 282 /* ImportSpecifier */ || node.kind === 287 /* ExportSpecifier */ || node.kind === 283 /* 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 === 309 /* ShorthandPropertyAssignment */ || node.kind === 308 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 263 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 210 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); } function isAliasableOrJsExpression(e) { return isAliasableExpression(e) || isFunctionExpression(e) && isJSConstructor(e); @@ -47532,7 +47708,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 286 /* ExternalModuleReference */) { + if (isVariableDeclaration(node) || node.moduleReference.kind === 289 /* ExternalModuleReference */) { const immediate = resolveExternalModuleName( node, getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node) @@ -47548,7 +47724,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) { if (markSymbolOfAliasDeclarationIfTypeOnly(node, void 0, resolved, false) && !node.isTypeOnly) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node)); - const isExport = typeOnlyDeclaration.kind === 284 /* ExportSpecifier */; + const isExport = typeOnlyDeclaration.kind === 287 /* ExportSpecifier */; 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 = unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); @@ -47650,15 +47826,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getModuleSpecifierForImportOrExport(node) { switch (node.kind) { - case 276 /* ImportClause */: + case 279 /* ImportClause */: return node.parent.moduleSpecifier; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : void 0; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return node.parent.parent.moduleSpecifier; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return node.parent.parent.parent.moduleSpecifier; - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: return node.parent.parent.moduleSpecifier; default: return Debug.assertNever(node); @@ -47903,31 +48079,31 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve = false) { switch (node.kind) { - case 274 /* ImportEqualsDeclaration */: - case 261 /* VariableDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 263 /* VariableDeclaration */: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 276 /* ImportClause */: + case 279 /* ImportClause */: return getTargetOfImportClause(node, dontRecursivelyResolve); - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: return getTargetOfNamespaceExport(node, dontRecursivelyResolve); - case 279 /* ImportSpecifier */: - case 208 /* BindingElement */: + case 282 /* ImportSpecifier */: + case 210 /* BindingElement */: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: return getTargetOfExportSpecifier(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve); - case 280 /* ExportAssignment */: - case 227 /* BinaryExpression */: + case 283 /* ExportAssignment */: + case 229 /* BinaryExpression */: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return resolveEntityName(node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, true, dontRecursivelyResolve); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return getTargetOfAliasLikeExpression(node.initializer, dontRecursivelyResolve); - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: return getTargetOfAccessExpression(node, dontRecursivelyResolve); default: return Debug.fail(); @@ -48058,10 +48234,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (entityName.kind === 79 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 79 /* Identifier */ || entityName.parent.kind === 165 /* QualifiedName */) { + if (entityName.kind === 79 /* Identifier */ || entityName.parent.kind === 166 /* QualifiedName */) { return resolveEntityName(entityName, 1920 /* Namespace */, false, dontResolveAlias); } else { - Debug.assert(entityName.parent.kind === 274 /* ImportEqualsDeclaration */); + Debug.assert(entityName.parent.kind === 277 /* ImportEqualsDeclaration */); return resolveEntityName(entityName, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, false, dontResolveAlias); } } @@ -48121,9 +48297,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!symbol) { return getMergedSymbol(symbolFromJSPrototype); } - } else if (name.kind === 165 /* QualifiedName */ || name.kind === 211 /* PropertyAccessExpression */) { - const left = name.kind === 165 /* QualifiedName */ ? name.left : name.expression; - const right = name.kind === 165 /* QualifiedName */ ? name.right : name.name; + } else if (name.kind === 166 /* QualifiedName */ || name.kind === 213 /* PropertyAccessExpression */) { + const left = name.kind === 166 /* QualifiedName */ ? name.left : name.expression; + const right = name.kind === 166 /* QualifiedName */ ? name.right : name.name; let namespace = resolveEntityName(left, namespaceMeaning, ignoreErrors, false, location); if (!namespace || nodeIsMissing(right)) { return void 0; @@ -48180,7 +48356,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 280 /* ExportAssignment */)) { + if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 283 /* ExportAssignment */)) { markSymbolOfAliasDeclarationIfTypeOnly(getAliasDeclarationFromName(name), symbol, void 0, true); } return symbol.flags & meaning || dontResolveAlias ? symbol : resolveAlias(symbol); @@ -48483,7 +48659,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { var _a2; const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias); if (!dontResolveAlias && symbol) { - if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 314 /* SourceFile */)) { + if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 317 /* 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; @@ -48801,7 +48977,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function findConstructorDeclaration(node) { const members = node.members; for (const member of members) { - if (member.kind === 176 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 178 /* Constructor */ && nodeIsPresent(member.body)) { return member; } } @@ -48911,19 +49087,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } switch (location.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) { break; } - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: const sym = getSymbolOfNode(location); if (result = callback((sym == null ? void 0 : sym.exports) || emptySymbols, void 0, true, location)) { return result; } break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: let table; (getSymbolOfNode(location).members || emptySymbols).forEach((memberSymbol, key) => { if (memberSymbol.flags & (788968 /* Type */ & ~67108864 /* Assignment */)) { @@ -48979,7 +49155,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 284 /* 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, 287 /* ExportSpecifier */))) { const resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); const candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification); if (candidate) { @@ -49015,7 +49191,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (symbolFromSymbolTable === symbol) { return true; } - const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 284 /* ExportSpecifier */); + const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 287 /* ExportSpecifier */); symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; const flags = shouldResolveAlias ? getAllSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; if (flags & meaning) { @@ -49030,10 +49206,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (symbol.declarations && symbol.declarations.length) { for (const declaration of symbol.declarations) { switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: continue; default: return false; @@ -49132,10 +49308,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return node && getSymbolOfNode(node); } function hasExternalModuleSymbol(declaration) { - return isAmbientModule(declaration) || declaration.kind === 314 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isAmbientModule(declaration) || declaration.kind === 317 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasNonGlobalAugmentationExternalModuleSymbol(declaration) { - return isModuleWithStringLiteralName(declaration) || declaration.kind === 314 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isModuleWithStringLiteralName(declaration) || declaration.kind === 317 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { let aliasesToMakeVisible; @@ -49181,9 +49357,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isEntityNameVisible(entityName, enclosingDeclaration) { let meaning; - if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 234 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 166 /* ComputedPropertyName */) { + if (entityName.parent.kind === 188 /* TypeQuery */ || entityName.parent.kind === 236 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; - } else if (entityName.kind === 165 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 274 /* ImportEqualsDeclaration */) { + } else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 213 /* PropertyAccessExpression */ || entityName.parent.kind === 277 /* ImportEqualsDeclaration */) { meaning = 1920 /* Namespace */; } else { meaning = 788968 /* Type */; @@ -49223,7 +49399,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker); function symbolToStringWorker(writer2) { const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); - const printer3 = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 314 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); + const printer3 = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 317 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); printer3.writeNode(4 /* Unspecified */, entity, sourceFile, writer2); return writer2; @@ -49234,9 +49410,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function signatureToStringWorker(writer2) { let sigOutput; if (flags & 262144 /* WriteArrowStyleSignature */) { - sigOutput = kind === 1 /* Construct */ ? 185 /* ConstructorType */ : 184 /* FunctionType */; + sigOutput = kind === 1 /* Construct */ ? 187 /* ConstructorType */ : 186 /* FunctionType */; } else { - sigOutput = kind === 1 /* Construct */ ? 180 /* ConstructSignature */ : 179 /* CallSignature */; + sigOutput = kind === 1 /* Construct */ ? 182 /* ConstructSignature */ : 181 /* CallSignature */; } const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */); const printer3 = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); @@ -49730,7 +49906,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function shouldWriteTypeOfFunctionSymbol() { var _a3; const isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */) && some(symbol.declarations, (declaration) => isStatic(declaration)); - const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || forEach(symbol.declarations, (declaration) => declaration.parent.kind === 314 /* SourceFile */ || declaration.parent.kind === 271 /* ModuleBlock */)); + const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || forEach(symbol.declarations, (declaration) => declaration.parent.kind === 317 /* SourceFile */ || declaration.parent.kind === 274 /* ModuleBlock */)); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a3 = context.visitedTypes) == null ? void 0 : _a3.has(typeId))) && (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration)); } @@ -49809,12 +49985,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { const signature = resolved.callSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 184 /* FunctionType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 186 /* FunctionType */, context); return signatureNode; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { const signature = resolved.constructSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 185 /* ConstructorType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 187 /* ConstructorType */, context); return signatureNode; } } @@ -49982,12 +50158,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const typeElements = []; for (const signature of resolvedType.callSignatures) { - typeElements.push(signatureToSignatureDeclarationHelper(signature, 179 /* CallSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 181 /* CallSignature */, context)); } for (const signature of resolvedType.constructSignatures) { if (signature.flags & 4 /* Abstract */) continue; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 180 /* ConstructSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 182 /* ConstructSignature */, context)); } for (const info of resolvedType.indexInfos) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0)); @@ -50059,7 +50235,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 173 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); + const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 175 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); typeElements.push(preserveCommentsOn(methodDeclaration)); } } else { @@ -50090,8 +50266,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function preserveCommentsOn(node) { var _a3; - if (some(propertySymbol.declarations, (d) => d.kind === 356 /* JSDocPropertyTag */)) { - const d = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d2) => d2.kind === 356 /* JSDocPropertyTag */); + if (some(propertySymbol.declarations, (d) => d.kind === 359 /* JSDocPropertyTag */)) { + const d = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d2) => d2.kind === 359 /* 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 }]); @@ -50194,7 +50370,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { typeParameters = signature.typeParameters && signature.typeParameters.map((parameter) => typeParameterToDeclaration(parameter, context)); } const expandedParams = getExpandedParameters(signature, true)[0]; - const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 176 /* 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 === 178 /* 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); @@ -50215,11 +50391,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } let modifiers = options == null ? void 0 : options.modifiers; - if (kind === 185 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { + if (kind === 187 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { const flags = modifiersToFlags(modifiers); modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */); } - const node = kind === 179 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 180 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_a2 = options == null ? void 0 : options.name) != null ? _a2 : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 174 /* MethodDeclaration */ ? factory.createMethodDeclaration(modifiers, void 0, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), void 0, typeParameters, parameters, returnTypeNode, void 0) : kind === 176 /* Constructor */ ? factory.createConstructorDeclaration(modifiers, parameters, void 0) : kind === 177 /* GetAccessor */ ? factory.createGetAccessorDeclaration(modifiers, (_c = options == null ? void 0 : options.name) != null ? _c : factory.createIdentifier(""), parameters, returnTypeNode, void 0) : kind === 178 /* SetAccessor */ ? factory.createSetAccessorDeclaration(modifiers, (_d = options == null ? void 0 : options.name) != null ? _d : factory.createIdentifier(""), parameters, void 0) : kind === 181 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 326 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 184 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 185 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 263 /* FunctionDeclaration */ ? factory.createFunctionDeclaration(modifiers, void 0, (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, void 0) : kind === 218 /* FunctionExpression */ ? factory.createFunctionExpression(modifiers, void 0, (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, factory.createBlock([])) : kind === 219 /* ArrowFunction */ ? factory.createArrowFunction(modifiers, typeParameters, parameters, returnTypeNode, void 0, factory.createBlock([])) : Debug.assertNever(kind); + const node = kind === 181 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 182 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 175 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_a2 = options == null ? void 0 : options.name) != null ? _a2 : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 176 /* MethodDeclaration */ ? factory.createMethodDeclaration(modifiers, void 0, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), void 0, typeParameters, parameters, returnTypeNode, void 0) : kind === 178 /* Constructor */ ? factory.createConstructorDeclaration(modifiers, parameters, void 0) : kind === 179 /* GetAccessor */ ? factory.createGetAccessorDeclaration(modifiers, (_c = options == null ? void 0 : options.name) != null ? _c : factory.createIdentifier(""), parameters, returnTypeNode, void 0) : kind === 180 /* SetAccessor */ ? factory.createSetAccessorDeclaration(modifiers, (_d = options == null ? void 0 : options.name) != null ? _d : factory.createIdentifier(""), parameters, void 0) : kind === 183 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 329 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 186 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 187 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 265 /* FunctionDeclaration */ ? factory.createFunctionDeclaration(modifiers, void 0, (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, void 0) : kind === 220 /* FunctionExpression */ ? factory.createFunctionExpression(modifiers, void 0, (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, factory.createBlock([])) : kind === 221 /* ArrowFunction */ ? factory.createArrowFunction(modifiers, typeParameters, parameters, returnTypeNode, void 0, factory.createBlock([])) : Debug.assertNever(kind); if (typeArguments) { node.typeArguments = factory.createNodeArray(typeArguments); } @@ -50257,9 +50433,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return typeParameterToDeclarationWithConstraint(type, context, constraintNode); } function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { - let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 168 /* Parameter */); + let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */); if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = getDeclarationOfKind(parameterSymbol, 349 /* JSDocParameterTag */); + parameterDeclaration = getDeclarationOfKind(parameterSymbol, 352 /* JSDocParameterTag */); } let parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -50269,7 +50445,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 165 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); + const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 79 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* 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( @@ -50417,11 +50593,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) { var _a2; - let file = getDeclarationOfKind(symbol, 314 /* SourceFile */); + let file = getDeclarationOfKind(symbol, 317 /* SourceFile */); if (!file) { const equivalentFileSymbol = firstDefined(symbol.declarations, (d) => getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol)); if (equivalentFileSymbol) { - file = getDeclarationOfKind(equivalentFileSymbol, 314 /* SourceFile */); + file = getDeclarationOfKind(equivalentFileSymbol, 317 /* SourceFile */); } } if (file && file.moduleName !== void 0) { @@ -50861,7 +51037,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } return transformed === existing ? setTextRange(factory.cloneNode(existing), existing) : transformed; function visitExistingNodeTreeSymbols(node) { - if (isJSDocAllType(node) || node.kind === 328 /* JSDocNamepathType */) { + if (isJSDocAllType(node) || node.kind === 331 /* JSDocNamepathType */) { return factory.createKeywordTypeNode(132 /* AnyKeyword */); } if (isJSDocUnknownType(node)) { @@ -51001,8 +51177,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function symbolTableToDeclarationStatements(symbolTable, context, bundled) { - const serializePropertySymbolForClass = makeSerializePropertySymbol(factory.createPropertyDeclaration, 174 /* MethodDeclaration */, true); - const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol((mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), 173 /* MethodSignature */, false); + const serializePropertySymbolForClass = makeSerializePropertySymbol(factory.createPropertyDeclaration, 176 /* MethodDeclaration */, true); + const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol((mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), 175 /* MethodSignature */, false); const enclosingDeclaration = context.enclosingDeclaration; let results = []; const visitedSymbols = new Set2(); @@ -51376,8 +51552,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 179 /* CallSignature */); - const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 180 /* ConstructSignature */); + const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 181 /* CallSignature */); + const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 182 /* ConstructSignature */); const indexSignatures = serializeIndexSignatures(interfaceType, baseType); const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(95 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; addResult(factory.createInterfaceDeclaration( @@ -51445,7 +51621,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { const signatures = getSignaturesOfType(type, 0 /* Call */); for (const sig of signatures) { - const decl = signatureToSignatureDeclarationHelper(sig, 263 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); + const decl = signatureToSignatureDeclarationHelper(sig, 265 /* 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)) { @@ -51580,7 +51756,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { (p) => serializePropertySymbolForClass(p, true, staticBaseType) ); const isNonConstructableClassLikeInJsFile = !isClass && !!symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && !some(getSignaturesOfType(staticType, 1 /* Construct */)); - const constructors = isNonConstructableClassLikeInJsFile ? [factory.createConstructorDeclaration(factory.createModifiersFromModifierFlags(8 /* Private */), [], void 0)] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 176 /* Constructor */); + const constructors = isNonConstructableClassLikeInJsFile ? [factory.createConstructorDeclaration(factory.createModifiersFromModifierFlags(8 /* Private */), [], void 0)] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 178 /* Constructor */); const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); context.enclosingDeclaration = oldEnclosing; addResult(setTextRange(factory.createClassDeclaration( @@ -51627,8 +51803,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const targetName = getInternalSymbolName(target, verbatimTargetName); includePrivateSymbol(target); switch (node.kind) { - case 208 /* BindingElement */: - if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 261 /* VariableDeclaration */) { + case 210 /* BindingElement */: + if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 263 /* VariableDeclaration */) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; addResult(factory.createImportDeclaration( @@ -51644,15 +51820,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { break; } Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); - case 306 /* ShorthandPropertyAssignment */: - if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 227 /* BinaryExpression */) { + case 309 /* ShorthandPropertyAssignment */: + if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 229 /* BinaryExpression */) { serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), targetName ); } break; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: if (isPropertyAccessExpression(node.initializer)) { const initializer = node.initializer; const uniqueName = factory.createUniqueName(localName); @@ -51671,7 +51847,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { ), modifierFlags); break; } - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, isJsonSourceFile)) { serializeMaybeAliasAssignment(symbol); break; @@ -51684,10 +51860,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { isLocalImport ? symbolToName(target, context, 67108863 /* All */, false) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) ), isLocalImport ? modifierFlags : 0 /* None */); break; - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); break; - case 276 /* ImportClause */: + case 279 /* ImportClause */: addResult(factory.createImportDeclaration( void 0, factory.createImportClause(false, factory.createIdentifier(localName), void 0), @@ -51695,7 +51871,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { void 0 ), 0 /* None */); break; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: addResult(factory.createImportDeclaration( void 0, factory.createImportClause(false, void 0, factory.createNamespaceImport(factory.createIdentifier(localName))), @@ -51703,7 +51879,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { void 0 ), 0 /* None */); break; - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: addResult(factory.createExportDeclaration( void 0, false, @@ -51711,7 +51887,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) ), 0 /* None */); break; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: addResult(factory.createImportDeclaration( void 0, factory.createImportClause( @@ -51729,7 +51905,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { void 0 ), 0 /* None */); break; - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: const specifier = node.parent.parent.moduleSpecifier; serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), @@ -51737,12 +51913,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { specifier && isStringLiteralLike(specifier) ? factory.createStringLiteral(specifier.text) : void 0 ); break; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: serializeMaybeAliasAssignment(symbol); break; - case 227 /* BinaryExpression */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 229 /* BinaryExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: if (symbol.escapedName === "default" /* Default */ || symbol.escapedName === "export=" /* ExportEquals */) { serializeMaybeAliasAssignment(symbol); } else { @@ -52118,17 +52294,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getTypeAliasForTypeLiteral(type) { if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */ && type.symbol.declarations) { const node = walkUpParenthesizedTypes(type.symbol.declarations[0].parent); - if (node.kind === 268 /* TypeAliasDeclaration */) { + if (node.kind === 271 /* TypeAliasDeclaration */) { return getSymbolOfNode(node); } } return void 0; } function isTopLevelInExternalModuleAugmentation(node) { - return node && node.parent && node.parent.kind === 271 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); + return node && node.parent && node.parent.kind === 274 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); } function isDefaultBindingContext(location) { - return location.kind === 314 /* SourceFile */ || isAmbientModule(location); + return location.kind === 317 /* SourceFile */ || isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { const nameType = getSymbolLinks(symbol).nameType; @@ -52173,17 +52349,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!declaration) { declaration = symbol.declarations[0]; } - if (declaration.parent && declaration.parent.kind === 261 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 263 /* VariableDeclaration */) { return declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: if (context && !context.encounteredError && !(context.flags & 131072 /* AllowAnonymousIdentifier */)) { context.encounteredError = true; } - return declaration.kind === 232 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; + return declaration.kind === 234 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; } } const name = getNameOfSymbolFromNameType(symbol, context); @@ -52200,68 +52376,68 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: - case 348 /* JSDocEnumTag */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: + case 351 /* JSDocEnumTag */: return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent)); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: if (isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 263 /* FunctionDeclaration */: - case 269 /* EnumDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 266 /* AnnotationDeclaration */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 265 /* FunctionDeclaration */: + case 272 /* EnumDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 268 /* AnnotationDeclaration */: if (isExternalModuleAugmentation(node)) { return true; } const parent2 = getDeclarationContainer(node); - if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 274 /* ImportEqualsDeclaration */ && parent2.kind !== 314 /* SourceFile */ && parent2.flags & 16777216 /* Ambient */)) { + if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 277 /* ImportEqualsDeclaration */ && parent2.kind !== 317 /* SourceFile */ && parent2.flags & 16777216 /* Ambient */)) { return isGlobalSourceFile(parent2); } return isDeclarationVisible(parent2); - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) { return false; } - case 176 /* Constructor */: - case 180 /* ConstructSignature */: - case 179 /* CallSignature */: - case 181 /* IndexSignature */: - case 168 /* Parameter */: - case 271 /* ModuleBlock */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 187 /* TypeLiteral */: - case 183 /* TypeReference */: - case 188 /* ArrayType */: - case 189 /* TupleType */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: + case 178 /* Constructor */: + case 182 /* ConstructSignature */: + case 181 /* CallSignature */: + case 183 /* IndexSignature */: + case 169 /* Parameter */: + case 274 /* ModuleBlock */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 189 /* TypeLiteral */: + case 185 /* TypeReference */: + case 190 /* ArrayType */: + case 191 /* TupleType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: + case 198 /* ParenthesizedType */: + case 204 /* NamedTupleMember */: return isDeclarationVisible(node.parent); - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: - case 279 /* ImportSpecifier */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: + case 282 /* ImportSpecifier */: return false; - case 167 /* TypeParameter */: - case 314 /* SourceFile */: - case 273 /* NamespaceExportDeclaration */: + case 168 /* TypeParameter */: + case 317 /* SourceFile */: + case 276 /* NamespaceExportDeclaration */: return true; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return false; default: return false; @@ -52270,9 +52446,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function collectLinkedAliases(node, setVisibility) { let exportSymbol; - if (node.parent && node.parent.kind === 280 /* ExportAssignment */) { + if (node.parent && node.parent.kind === 283 /* ExportAssignment */) { exportSymbol = resolveName(node, node.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, void 0, node, false); - } else if (node.parent.kind === 284 /* ExportSpecifier */) { + } else if (node.parent.kind === 287 /* ExportSpecifier */) { exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); } let result; @@ -52367,12 +52543,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getDeclarationContainer(node) { return findAncestor(getRootDeclaration(node), (node2) => { switch (node2.kind) { - case 261 /* VariableDeclaration */: - case 262 /* VariableDeclarationList */: - case 279 /* ImportSpecifier */: - case 278 /* NamedImports */: - case 277 /* NamespaceImport */: - case 276 /* ImportClause */: + case 263 /* VariableDeclaration */: + case 264 /* VariableDeclarationList */: + case 282 /* ImportSpecifier */: + case 281 /* NamedImports */: + case 280 /* NamespaceImport */: + case 279 /* ImportClause */: return false; default: return true; @@ -52476,23 +52652,23 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getParentElementAccess(node) { const ancestor = node.parent.parent; switch (ancestor.kind) { - case 208 /* BindingElement */: - case 305 /* PropertyAssignment */: + case 210 /* BindingElement */: + case 308 /* PropertyAssignment */: return getSyntheticElementAccess(ancestor); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return getSyntheticElementAccess(node.parent); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return ancestor.initializer; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return ancestor.right; } } function getDestructuringPropertyName(node) { const parent2 = node.parent; - if (node.kind === 208 /* BindingElement */ && parent2.kind === 206 /* ObjectBindingPattern */) { + if (node.kind === 210 /* BindingElement */ && parent2.kind === 208 /* ObjectBindingPattern */) { return getLiteralPropertyNameText(node.propertyName || node.name); } - if (node.kind === 305 /* PropertyAssignment */ || node.kind === 306 /* ShorthandPropertyAssignment */) { + if (node.kind === 308 /* PropertyAssignment */ || node.kind === 309 /* ShorthandPropertyAssignment */) { return getLiteralPropertyNameText(node.name); } return "" + parent2.elements.indexOf(node); @@ -52517,7 +52693,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); } let type; - if (pattern.kind === 206 /* ObjectBindingPattern */) { + if (pattern.kind === 208 /* ObjectBindingPattern */) { if (declaration.dotDotDotToken) { parentType = getReducedType(parentType); if (parentType.flags & 2 /* Unknown */ || !isValidSpreadType(parentType)) { @@ -52572,17 +52748,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isEmptyArrayLiteral2(node) { const expr = skipParentheses(node, true); - return expr.kind === 209 /* ArrayLiteralExpression */ && expr.elements.length === 0; + return expr.kind === 211 /* 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 === 250 /* ForInStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 252 /* ForInStatement */) { const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression(declaration.parent.parent.expression, checkMode))); return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType; } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 251 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 253 /* ForOfStatement */) { const forOfStatement = declaration.parent.parent; return checkRightHandSideOfForOf(forOfStatement) || anyType; } @@ -52605,8 +52781,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (isParameter(declaration)) { const func = declaration.parent; - if (func.kind === 178 /* SetAccessor */ && hasBindableName(func)) { - const getter = getDeclarationOfKind(getSymbolOfNode(declaration.parent), 177 /* GetAccessor */); + if (func.kind === 180 /* SetAccessor */ && hasBindableName(func)) { + const getter = getDeclarationOfKind(getSymbolOfNode(declaration.parent), 179 /* GetAccessor */); if (getter) { const getterSignature = getSignatureFromDeclaration(getter); const thisParameter = getAccessorThisParameter(func); @@ -52659,7 +52835,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 212 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration(void 0, declaration, symbol, declaration)); + links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 214 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration(void 0, declaration, symbol, declaration)); } return links.isConstructorDeclaredProperty; } @@ -52675,7 +52851,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } for (const declaration of symbol.declarations) { const container = getThisContainer(declaration, false); - if (container && (container.kind === 176 /* Constructor */ || isJSConstructor(container))) { + if (container && (container.kind === 178 /* Constructor */ || isJSConstructor(container))) { return container; } } @@ -52937,7 +53113,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isDeclarationInConstructor(expression) { const thisContainer = getThisContainer(expression, false); - return thisContainer.kind === 176 /* Constructor */ || thisContainer.kind === 263 /* FunctionDeclaration */ || thisContainer.kind === 218 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); + return thisContainer.kind === 178 /* Constructor */ || thisContainer.kind === 265 /* FunctionDeclaration */ || thisContainer.kind === 220 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); } function getConstructorDefinedThisAssignmentTypes(types, declarations) { Debug.assert(types.length === declarations.length); @@ -52993,7 +53169,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2) { const elements = pattern.elements; const lastElement = lastOrUndefined(elements); - const restElement = lastElement && lastElement.kind === 208 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; + const restElement = lastElement && lastElement.kind === 210 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; if (elements.length === 0 || elements.length === 1 && restElement) { return languageVersion >= 2 /* ES2015 */ ? createIterableType(anyType) : anyArrayType; } @@ -53009,7 +53185,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return result; } function getTypeFromBindingPattern(pattern, includePatternInType = false, reportErrors2 = false) { - return pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); + return pattern.kind === 208 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors2) { return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration(declaration, true, 0 /* Normal */), declaration, reportErrors2); @@ -53042,7 +53218,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function declarationBelongsToPrivateAmbientMember(declaration) { const root = getRootDeclaration(declaration); - const memberDeclaration = root.kind === 168 /* Parameter */ ? root.parent : root; + const memberDeclaration = root.kind === 169 /* Parameter */ ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function tryGetTypeFromEffectiveTypeNode(node) { @@ -53110,7 +53286,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return reportCircularityError(symbol); } let type; - if (declaration.kind === 280 /* ExportAssignment */) { + if (declaration.kind === 283 /* 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); @@ -53127,7 +53303,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { type = tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionForMutableLocation(declaration.name, 0 /* Normal */); } else if (isObjectLiteralMethod(declaration)) { type = tryGetTypeFromEffectiveTypeNode(declaration) || checkObjectLiteralMethod(declaration, 0 /* Normal */); - } else if (isParameter(declaration) || isPropertyDeclaration(declaration) || isPropertySignature(declaration) || isAnnotationPropertyDeclaration(declaration) || isVariableDeclaration(declaration) || isBindingElement(declaration) || isJSDocPropertyLikeTag(declaration)) { + } else if (isParameter(declaration) || isPropertyDeclaration(declaration) || isPropertySignature(declaration) || isAnnotationPropertyDeclaration(declaration) || isVariableDeclaration(declaration) || isBindingElement(declaration) || isOverloadPropertyDeclaration(declaration) || isJSDocPropertyLikeTag(declaration)) { type = getWidenedTypeForVariableLikeDeclaration(declaration, true); } else if (isEnumDeclaration(declaration)) { type = getTypeOfFuncClassEnumModule(symbol); @@ -53147,13 +53323,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getAnnotatedAccessorTypeNode(accessor) { if (accessor) { switch (accessor.kind) { - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: const getterTypeAnnotation = getEffectiveReturnTypeNode(accessor); return getterTypeAnnotation; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: const setterTypeAnnotation = getEffectiveSetAccessorTypeAnnotationNode(accessor); return setterTypeAnnotation; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: Debug.assert(hasAccessorModifier(accessor)); const accessorTypeAnnotation = getEffectiveTypeAnnotationNode(accessor); return accessorTypeAnnotation; @@ -53178,9 +53354,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!pushTypeResolution(symbol, 0 /* Type */)) { return errorType; } - const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); - const accessor = tryCast(getDeclarationOfKind(symbol, 171 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const getter = getDeclarationOfKind(symbol, 179 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 180 /* SetAccessor */); + const accessor = tryCast(getDeclarationOfKind(symbol, 172 /* 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, true); if (!type) { if (setter && !isPrivateWithinAmbient(setter)) { @@ -53215,7 +53391,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!pushTypeResolution(symbol, 8 /* WriteType */)) { return errorType; } - const setter = (_a2 = getDeclarationOfKind(symbol, 178 /* SetAccessor */)) != null ? _a2 : tryCast(getDeclarationOfKind(symbol, 171 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const setter = (_a2 = getDeclarationOfKind(symbol, 180 /* SetAccessor */)) != null ? _a2 : tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let writeType = getAnnotatedAccessorType(setter); if (!popTypeResolution()) { if (getAnnotatedAccessorTypeNode(setter)) { @@ -53250,7 +53426,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const declaration = symbol.valueDeclaration; if (symbol.flags & 1536 /* Module */ && isShorthandAmbientModuleSymbol(symbol)) { return anyType; - } else if (declaration && (declaration.kind === 227 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 227 /* BinaryExpression */)) { + } else if (declaration && (declaration.kind === 229 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 229 /* BinaryExpression */)) { return getWidenedTypeForAssignmentDeclaration(symbol); } else if (symbol.flags & 512 /* ValueModule */ && declaration && isSourceFile(declaration) && declaration.commonJsModuleIndicator) { const resolvedModule = resolveExternalModuleSymbol(symbol); @@ -53306,7 +53482,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { ); return errorType; } - if (noImplicitAny && (declaration.kind !== 168 /* Parameter */ || declaration.initializer)) { + if (noImplicitAny && (declaration.kind !== 169 /* 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, @@ -53417,43 +53593,43 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return void 0; } switch (node.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 326 /* JSDocFunctionType */: - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 268 /* TypeAliasDeclaration */: - case 353 /* JSDocTemplateTag */: - case 354 /* JSDocTypedefTag */: - case 348 /* JSDocEnumTag */: - case 347 /* JSDocCallbackTag */: - case 200 /* MappedType */: - case 194 /* ConditionalType */: { + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 175 /* MethodSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 329 /* JSDocFunctionType */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 271 /* TypeAliasDeclaration */: + case 356 /* JSDocTemplateTag */: + case 357 /* JSDocTypedefTag */: + case 351 /* JSDocEnumTag */: + case 350 /* JSDocCallbackTag */: + case 202 /* MappedType */: + case 196 /* ConditionalType */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); - if (node.kind === 200 /* MappedType */) { + if (node.kind === 202 /* MappedType */) { return append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfNode(node.typeParameter))); - } else if (node.kind === 194 /* ConditionalType */) { + } else if (node.kind === 196 /* ConditionalType */) { return concatenate(outerTypeParameters, getInferTypeParameters(node)); } const outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, getEffectiveTypeParameterDeclarations(node)); - const thisType = includeThisTypes && (node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */ || node.kind === 267 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType; + const thisType = includeThisTypes && (node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */ || node.kind === 270 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType; return thisType ? append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters; } - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: const paramSymbol = getParameterSymbolFromJSDoc(node); if (paramSymbol) { node = paramSymbol.valueDeclaration; } break; - case 329 /* JSDoc */: { + case 332 /* JSDoc */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); return node.tags ? appendTypeParameters(outerTypeParameters, flatMap(node.tags, (t) => isJSDocTemplateTag(t) ? t.typeParameters : void 0)) : outerTypeParameters; } @@ -53461,7 +53637,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getOuterTypeParametersOfClassOrInterface(symbol) { - const declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : getDeclarationOfKind(symbol, 267 /* InterfaceDeclaration */); + const declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : getDeclarationOfKind(symbol, 270 /* InterfaceDeclaration */); Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); } @@ -53471,7 +53647,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let result; for (const node of symbol.declarations) { - if (node.kind === 267 /* InterfaceDeclaration */ || node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { + if (node.kind === 270 /* InterfaceDeclaration */ || node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { const declaration = node; result = appendTypeParameters(result, getEffectiveTypeParameterDeclarations(declaration)); } @@ -53604,7 +53780,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (!popTypeResolution() && type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 264 /* ClassDeclaration */ || declaration.kind === 267 /* InterfaceDeclaration */) { + if (declaration.kind === 266 /* ClassDeclaration */ || declaration.kind === 270 /* InterfaceDeclaration */) { reportCircularBaseType(declaration, type); } } @@ -53687,7 +53863,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; if (type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 267 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 270 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { for (const node of getInterfaceBaseTypeNodes(declaration)) { const baseType = getReducedType(getTypeFromTypeNode(node)); if (!isErrorType(baseType)) { @@ -53715,7 +53891,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; } for (const declaration of symbol.declarations) { - if (declaration.kind === 267 /* InterfaceDeclaration */) { + if (declaration.kind === 270 /* InterfaceDeclaration */) { if (declaration.flags & 128 /* ContainsThis */) { return false; } @@ -53781,7 +53957,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } else { type = errorType; - if (declaration.kind === 348 /* JSDocEnumTag */) { + if (declaration.kind === 351 /* 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)); @@ -53794,7 +53970,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isStringConcatExpression(expr) { if (isStringLiteralLike(expr)) { return true; - } else if (expr.kind === 227 /* BinaryExpression */) { + } else if (expr.kind === 229 /* BinaryExpression */) { return isStringConcatExpression(expr.left) && isStringConcatExpression(expr.right); } return false; @@ -53809,11 +53985,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 8 /* NumericLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return true; - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; case 79 /* Identifier */: return nodeIsMissing(expr) || !!getSymbolOfNode(member.parent).exports.get(expr.escapedText); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isStringConcatExpression(expr); default: return false; @@ -53827,7 +54003,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let hasNonLiteralMember = false; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 269 /* EnumDeclaration */) { + if (declaration.kind === 272 /* EnumDeclaration */) { for (const member of declaration.members) { if (member.initializer && isStringLiteralLike(member.initializer)) { return links.enumKind = 1 /* Literal */; @@ -53854,7 +54030,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const memberTypeList = []; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 269 /* EnumDeclaration */) { + if (declaration.kind === 272 /* EnumDeclaration */) { for (const member of declaration.members) { const value = getEnumMemberValue(member); const memberType = getFreshTypeOfLiteralType(getEnumLiteralType(value !== void 0 ? value : 0, enumCount, getSymbolOfNode(member))); @@ -53932,11 +54108,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 115 /* VoidKeyword */: case 157 /* UndefinedKeyword */: case 145 /* NeverKeyword */: - case 201 /* LiteralType */: + case 203 /* LiteralType */: return true; - case 188 /* ArrayType */: + case 190 /* ArrayType */: return isThislessType(node.elementType); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return !node.typeArguments || node.typeArguments.every(isThislessType); } return false; @@ -53952,21 +54128,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isThislessFunctionLikeDeclaration(node) { const returnType = getEffectiveReturnTypeNode(node); const typeParameters = getEffectiveTypeParameterDeclarations(node); - return (node.kind === 176 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); + return (node.kind === 178 /* 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 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return isThislessVariableLikeDeclaration(declaration); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return isThislessFunctionLikeDeclaration(declaration); } } @@ -54831,7 +55007,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isMappedTypeWithKeyofConstraintDeclaration(type) { const constraintDeclaration = getConstraintDeclarationForMappedType(type); - return constraintDeclaration.kind === 198 /* TypeOperator */ && constraintDeclaration.operator === 142 /* KeyOfKeyword */; + return constraintDeclaration.kind === 200 /* TypeOperator */ && constraintDeclaration.operator === 142 /* KeyOfKeyword */; } function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { @@ -55558,7 +55734,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return result; } function isJSDocOptionalParameter(node) { - return isInJSFile(node) && (node.type && node.type.kind === 325 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 325 /* JSDocOptionalType */)); + return isInJSFile(node) && (node.type && node.type.kind === 328 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 328 /* JSDocOptionalType */)); } function tryFindAmbientModule(moduleName, withAugmentations) { if (isExternalModuleNameRelative(moduleName)) { @@ -55591,7 +55767,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } const { isBracketed, typeExpression } = node; - return isBracketed || !!typeExpression && typeExpression.type.kind === 325 /* JSDocOptionalType */; + return isBracketed || !!typeExpression && typeExpression.type.kind === 328 /* JSDocOptionalType */; } function createTypePredicate(kind, parameterName, parameterIndex, type) { return { kind, parameterName, parameterIndex, type }; @@ -55659,7 +55835,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { parameters.push(paramSymbol); } - if (type && type.kind === 201 /* LiteralType */) { + if (type && type.kind === 203 /* LiteralType */) { flags |= 2 /* HasLiteralTypes */; } const isOptionalParameter2 = isOptionalJSDocPropertyLikeTag(param) || param.initializer || param.questionToken || isRestParameter(param) || iife && parameters.length > iife.arguments.length && !type || isJSDocOptionalParameter(param); @@ -55667,14 +55843,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { minArgumentCount = parameters.length; } } - if ((declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { - const otherKind = declaration.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; + if ((declaration.kind === 179 /* GetAccessor */ || declaration.kind === 180 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { + const otherKind = declaration.kind === 179 /* GetAccessor */ ? 180 /* SetAccessor */ : 179 /* GetAccessor */; const other = getDeclarationOfKind(getSymbolOfNode(declaration), otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); } } - const classType = declaration.kind === 176 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0; + const classType = declaration.kind === 178 /* 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 */; @@ -55750,15 +55926,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (node.kind) { case 79 /* Identifier */: return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol; - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return node.name.kind === 166 /* ComputedPropertyName */ && traverse(node.name); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + return node.name.kind === 167 /* ComputedPropertyName */ && traverse(node.name); + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return traverse(node.expression); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return traverse(node.initializer); default: return !nodeStartsNewLexicalEnvironment(node) && !isPartOfTypeNode(node) && !!forEachChild(node, traverse); @@ -55825,7 +56001,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function createTypePredicateFromTypePredicateNode(node, signature) { const parameterName = node.parameterName; const type = node.type && getTypeFromTypeNode(node.type); - return parameterName.kind === 197 /* ThisType */ ? createTypePredicate(node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, void 0, void 0, type) : createTypePredicate( + return parameterName.kind === 199 /* ThisType */ ? createTypePredicate(node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, void 0, void 0, type) : createTypePredicate( node.assertsModifier ? 3 /* AssertsIdentifier */ : 1 /* Identifier */, parameterName.escapedText, findIndex(signature.parameters, (p) => p.escapedName === parameterName.escapedText), @@ -55868,7 +56044,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return signature.resolvedReturnType; } function getReturnTypeFromAnnotation(declaration) { - if (declaration.kind === 176 /* Constructor */) { + if (declaration.kind === 178 /* Constructor */) { return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)); } if (isJSDocConstructSignature(declaration)) { @@ -55878,12 +56054,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (typeNode) { return getTypeFromTypeNode(typeNode); } - if (declaration.kind === 177 /* GetAccessor */ && hasBindableName(declaration)) { + if (declaration.kind === 179 /* GetAccessor */ && hasBindableName(declaration)) { const jsDocType = isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration); if (jsDocType) { return jsDocType; } - const setter = getDeclarationOfKind(getSymbolOfNode(declaration), 178 /* SetAccessor */); + const setter = getDeclarationOfKind(getSymbolOfNode(declaration), 180 /* SetAccessor */); const setterType = getAnnotatedAccessorType(setter); if (setterType) { return setterType; @@ -55971,7 +56147,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { var _a2; if (!signature.isolatedSignatureType) { const kind = (_a2 = signature.declaration) == null ? void 0 : _a2.kind; - const isConstructor = kind === void 0 || kind === 176 /* Constructor */ || kind === 180 /* ConstructSignature */ || kind === 185 /* ConstructorType */; + const isConstructor = kind === void 0 || kind === 178 /* Constructor */ || kind === 182 /* ConstructSignature */ || kind === 187 /* ConstructorType */; const type = createObjectType(16 /* Anonymous */); type.members = emptySymbols; type.properties = emptyArray; @@ -56030,9 +56206,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let inferences; if ((_a2 = typeParameter.symbol) == null ? void 0 : _a2.declarations) { for (const declaration of typeParameter.symbol.declarations) { - if (declaration.parent.kind === 195 /* InferType */) { + if (declaration.parent.kind === 197 /* InferType */) { const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent); - if (grandParent.kind === 183 /* TypeReference */ && !omitTypeReferences) { + if (grandParent.kind === 185 /* TypeReference */ && !omitTypeReferences) { const typeReference = grandParent; const typeParameters = getTypeParametersForTypeReference(typeReference); if (typeParameters) { @@ -56050,13 +56226,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - } else if (grandParent.kind === 168 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 191 /* RestType */ || grandParent.kind === 202 /* NamedTupleMember */ && grandParent.dotDotDotToken) { + } else if (grandParent.kind === 169 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 193 /* RestType */ || grandParent.kind === 204 /* NamedTupleMember */ && grandParent.dotDotDotToken) { inferences = append(inferences, createArrayType(unknownType)); - } else if (grandParent.kind === 204 /* TemplateLiteralTypeSpan */) { + } else if (grandParent.kind === 206 /* TemplateLiteralTypeSpan */) { inferences = append(inferences, stringType); - } else if (grandParent.kind === 167 /* TypeParameter */ && grandParent.parent.kind === 200 /* MappedType */) { + } else if (grandParent.kind === 168 /* TypeParameter */ && grandParent.parent.kind === 202 /* MappedType */) { inferences = append(inferences, keyofConstraintType); - } else if (grandParent.kind === 200 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 194 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 200 /* MappedType */ && grandParent.parent.checkType.type) { + } else if (grandParent.kind === 202 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 196 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 202 /* MappedType */ && grandParent.parent.checkType.type) { const checkMappedType2 = grandParent.parent.checkType; const nodeType = getTypeFromTypeNode(checkMappedType2.type); inferences = append(inferences, instantiateType( @@ -56081,7 +56257,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { let type = getTypeFromTypeNode(constraintDeclaration); if (type.flags & 1 /* Any */ && !isErrorType(type)) { - type = constraintDeclaration.parent.parent.kind === 200 /* MappedType */ ? keyofConstraintType : unknownType; + type = constraintDeclaration.parent.parent.kind === 202 /* MappedType */ ? keyofConstraintType : unknownType; } typeParameter.constraint = type; } @@ -56090,7 +56266,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return typeParameter.constraint === noConstraintType ? void 0 : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - const tp = getDeclarationOfKind(typeParameter.symbol, 167 /* TypeParameter */); + const tp = getDeclarationOfKind(typeParameter.symbol, 168 /* TypeParameter */); const host2 = isJSDocTemplateTag(tp.parent) ? getEffectiveContainerForJSDocTemplateTag(tp.parent) : tp.parent; return host2 && getSymbolOfNode(host2); } @@ -56170,7 +56346,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return ((_a2 = type.target.localTypeParameters) == null ? void 0 : _a2.map(() => errorType)) || emptyArray; } const node = type.node; - const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const typeArguments = !node ? emptyArray : node.kind === 185 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 190 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); if (popTypeResolution()) { type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; } else { @@ -56204,7 +56380,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return errorType; } } - if (node.kind === 183 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { + if (node.kind === 185 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference(type, node, void 0); } const typeArguments = concatenate(type.outerTypeParameters, fillMissingTypeArguments(typeArgumentsFromTypeReferenceNode(node), typeParameters, minTypeArgumentCount, isJs)); @@ -56272,9 +56448,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTypeReferenceName(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return node.typeName; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: const expr = node.expression; if (isEntityNameExpression(expr)) { return expr; @@ -56286,10 +56462,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return symbol.parent ? `${getSymbolPath(symbol.parent)}.${symbol.escapedName}` : symbol.escapedName; } function getUnresolvedSymbolForEntityName(name) { - const identifier = name.kind === 165 /* QualifiedName */ ? name.right : name.kind === 211 /* PropertyAccessExpression */ ? name.name : name; + const identifier = name.kind === 166 /* QualifiedName */ ? name.right : name.kind === 213 /* PropertyAccessExpression */ ? name.name : name; const text = identifier.escapedText; if (text) { - const parentSymbol = name.kind === 165 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 211 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; + const parentSymbol = name.kind === 166 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 213 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; const path = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text; let result = unresolvedSymbols.get(path); if (!result) { @@ -56341,7 +56517,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const valueType = getTypeOfSymbol(symbol); let typeType = valueType; if (symbol.valueDeclaration) { - const isImportTypeWithQualifier = node.kind === 205 /* ImportType */ && node.qualifier; + const isImportTypeWithQualifier = node.kind === 207 /* ImportType */ && node.qualifier; if (valueType.symbol && valueType.symbol !== symbol && isImportTypeWithQualifier) { typeType = getTypeReferenceType(node, valueType.symbol); } @@ -56369,7 +56545,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getIntersectionType([substitutionType.constraint, substitutionType.baseType]); } function isUnaryTupleTypeNode(node) { - return node.kind === 189 /* TupleType */ && node.elements.length === 1; + return node.kind === 191 /* 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; @@ -56377,17 +56553,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getConditionalFlowTypeOfType(type, node) { let constraints; let covariant = true; - while (node && !isStatement(node) && node.kind !== 329 /* JSDoc */) { + while (node && !isStatement(node) && node.kind !== 332 /* JSDoc */) { const parent2 = node.parent; - if (parent2.kind === 168 /* Parameter */) { + if (parent2.kind === 169 /* Parameter */) { covariant = !covariant; } - if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 194 /* ConditionalType */ && node === parent2.trueType) { + if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 196 /* 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 === 200 /* MappedType */ && node === parent2.type) { + } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 202 /* MappedType */ && node === parent2.type) { const mappedType = getTypeFromTypeNode(parent2); if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) { const typeParameter = getHomomorphicTypeVariable(mappedType); @@ -56404,7 +56580,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return constraints ? getSubstitutionType(type, getIntersectionType(constraints)) : type; } function isJSDocTypeReference(node) { - return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 183 /* TypeReference */ || node.kind === 205 /* ImportType */); + return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 185 /* TypeReference */ || node.kind === 207 /* ImportType */); } function checkNoTypeArguments(node, symbol) { if (node.typeArguments) { @@ -56510,9 +56686,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (declarations) { for (const declaration of declarations) { switch (declaration.kind) { - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: return declaration; } } @@ -56673,11 +56849,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTupleElementFlags(node) { switch (node.kind) { - case 190 /* OptionalType */: + case 192 /* OptionalType */: return 2 /* Optional */; - case 191 /* RestType */: + case 193 /* RestType */: return getRestTypeElementFlags(node); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return node.questionToken ? 2 /* Optional */ : node.dotDotDotToken ? getRestTypeElementFlags(node) : 1 /* Required */; default: return 1 /* Required */; @@ -56693,55 +56869,55 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return readonly ? globalReadonlyArrayType : globalArrayType; } const elementFlags = map(node.elements, getTupleElementFlags); - const missingName = some(node.elements, (e) => e.kind !== 202 /* NamedTupleMember */); + const missingName = some(node.elements, (e) => e.kind !== 204 /* NamedTupleMember */); return getTupleTargetType(elementFlags, readonly, missingName ? void 0 : node.elements); } function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { - return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 188 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 189 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 190 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 191 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); } function isResolvedByTypeAlias(node) { const parent2 = node.parent; switch (parent2.kind) { - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: - case 183 /* TypeReference */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 199 /* IndexedAccessType */: - case 194 /* ConditionalType */: - case 198 /* TypeOperator */: - case 188 /* ArrayType */: - case 189 /* TupleType */: + case 198 /* ParenthesizedType */: + case 204 /* NamedTupleMember */: + case 185 /* TypeReference */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: + case 201 /* IndexedAccessType */: + case 196 /* ConditionalType */: + case 200 /* TypeOperator */: + case 190 /* ArrayType */: + case 191 /* TupleType */: return isResolvedByTypeAlias(parent2); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return true; } return false; } function mayResolveTypeAlias(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node, 788968 /* Type */).flags & 524288 /* TypeAlias */); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return true; - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return node.operator !== 158 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); - case 196 /* ParenthesizedType */: - case 190 /* OptionalType */: - case 202 /* NamedTupleMember */: - case 325 /* JSDocOptionalType */: - case 323 /* JSDocNullableType */: - case 324 /* JSDocNonNullableType */: - case 318 /* JSDocTypeExpression */: + case 198 /* ParenthesizedType */: + case 192 /* OptionalType */: + case 204 /* NamedTupleMember */: + case 328 /* JSDocOptionalType */: + case 326 /* JSDocNullableType */: + case 327 /* JSDocNonNullableType */: + case 321 /* JSDocTypeExpression */: return mayResolveTypeAlias(node.type); - case 191 /* RestType */: - return node.type.kind !== 188 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 193 /* RestType */: + return node.type.kind !== 190 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 194 /* UnionType */: + case 195 /* IntersectionType */: return some(node.types, mayResolveTypeAlias); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); } return false; @@ -56752,10 +56928,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const target = getArrayOrTupleTargetType(node); if (target === emptyGenericType) { links.resolvedType = emptyObjectType; - } else if (!(node.kind === 189 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { - links.resolvedType = node.kind === 189 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference(target, node, void 0); + } else if (!(node.kind === 191 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { + links.resolvedType = node.kind === 191 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference(target, node, void 0); } else { - const elementTypes = node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const elementTypes = node.kind === 190 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); links.resolvedType = createNormalizedTypeReference(target, elementTypes); } } @@ -57736,7 +57912,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) { var _a2; - const accessExpression = accessNode && accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode : void 0; + const accessExpression = accessNode && accessNode.kind === 214 /* ElementAccessExpression */ ? accessNode : void 0; const propName = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode); if (propName !== void 0) { if (accessFlags & 256 /* Contextual */) { @@ -57904,7 +58080,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getIndexNodeForAccessExpression(accessNode) { - return accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 199 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 166 /* ComputedPropertyName */ ? accessNode.expression : accessNode; + return accessNode.kind === 214 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 201 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 167 /* ComputedPropertyName */ ? accessNode.expression : accessNode; } function isPatternLiteralPlaceholderType(type) { return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type); @@ -58035,7 +58211,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */) accessFlags |= 1 /* IncludeUndefined */; - if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 199 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) { + if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 201 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) { if (objectType.flags & 3 /* AnyOrUnknown */) { return objectType; } @@ -58575,7 +58751,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getThisType(node) { const container = getThisContainer(node, false); const parent2 = container && container.parent; - if (parent2 && (isClassLike(parent2) || parent2.kind === 267 /* InterfaceDeclaration */)) { + if (parent2 && (isClassLike(parent2) || parent2.kind === 270 /* InterfaceDeclaration */)) { if (!isStatic(container) && (!isConstructorDeclaration(container) || isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent2)).thisType; } @@ -58605,17 +58781,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getArrayElementTypeNode(node) { switch (node.kind) { - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return getArrayElementTypeNode(node.type); - case 189 /* TupleType */: + case 191 /* TupleType */: if (node.elements.length === 1) { node = node.elements[0]; - if (node.kind === 191 /* RestType */ || node.kind === 202 /* NamedTupleMember */ && node.dotDotDotToken) { + if (node.kind === 193 /* RestType */ || node.kind === 204 /* NamedTupleMember */ && node.dotDotDotToken) { return getArrayElementTypeNode(node.type); } } break; - case 188 /* ArrayType */: + case 190 /* ArrayType */: return node.elementType; } return void 0; @@ -58630,8 +58806,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getTypeFromTypeNodeWorker(node) { switch (node.kind) { case 132 /* AnyKeyword */: - case 321 /* JSDocAllType */: - case 322 /* JSDocUnknownType */: + case 324 /* JSDocAllType */: + case 325 /* JSDocUnknownType */: return anyType; case 159 /* UnknownKeyword */: return unknownType; @@ -58657,66 +58833,66 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return node.flags & 262144 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; case 140 /* IntrinsicKeyword */: return intrinsicMarkerType; - case 197 /* ThisType */: + case 199 /* ThisType */: case 109 /* ThisKeyword */: return getTypeFromThisTypeNode(node); - case 201 /* LiteralType */: + case 203 /* LiteralType */: return getTypeFromLiteralTypeNode(node); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return getTypeFromTypeReference(node); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return node.assertsModifier ? voidType : booleanType; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 188 /* ArrayType */: - case 189 /* TupleType */: + case 190 /* ArrayType */: + case 191 /* TupleType */: return getTypeFromArrayOrTupleTypeNode(node); - case 190 /* OptionalType */: + case 192 /* OptionalType */: return getTypeFromOptionalTypeNode(node); - case 192 /* UnionType */: + case 194 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 323 /* JSDocNullableType */: + case 326 /* JSDocNullableType */: return getTypeFromJSDocNullableTypeNode(node); - case 325 /* JSDocOptionalType */: + case 328 /* JSDocOptionalType */: return addOptionality(getTypeFromTypeNode(node.type)); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return getTypeFromNamedTupleTypeNode(node); - case 196 /* ParenthesizedType */: - case 324 /* JSDocNonNullableType */: - case 318 /* JSDocTypeExpression */: + case 198 /* ParenthesizedType */: + case 327 /* JSDocNonNullableType */: + case 321 /* JSDocTypeExpression */: return getTypeFromTypeNode(node.type); - case 191 /* RestType */: + case 193 /* RestType */: return getTypeFromRestTypeNode(node); - case 327 /* JSDocVariadicType */: + case 330 /* JSDocVariadicType */: return getTypeFromJSDocVariadicType(node); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 326 /* JSDocFunctionType */: - case 332 /* JSDocSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 329 /* JSDocFunctionType */: + case 335 /* JSDocSignature */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return getTypeFromTypeOperatorNode(node); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return getTypeFromIndexedAccessTypeNode(node); - case 200 /* MappedType */: + case 202 /* MappedType */: return getTypeFromMappedTypeNode(node); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return getTypeFromConditionalTypeNode(node); - case 195 /* InferType */: + case 197 /* InferType */: return getTypeFromInferTypeNode(node); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: return getTypeFromTemplateTypeNode(node); - case 205 /* ImportType */: + case 207 /* ImportType */: return getTypeFromImportTypeNode(node); case 79 /* Identifier */: - case 165 /* QualifiedName */: - case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: const symbol = getSymbolAtLocation(node); return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType; default: @@ -58911,13 +59087,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return type; } function maybeTypeParameterReference(node) { - return !(node.parent.kind === 183 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 205 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); + return !(node.parent.kind === 185 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 207 /* 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 === 242 /* Block */ || n.kind === 194 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { + if (!n || n.kind === 244 /* Block */ || n.kind === 196 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { return true; } } @@ -58926,17 +59102,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; function containsReference(node2) { switch (node2.kind) { - case 197 /* ThisType */: + case 199 /* ThisType */: return !!tp.isThisType; case 79 /* Identifier */: return !tp.isThisType && isPartOfTypeNode(node2) && maybeTypeParameterReference(node2) && getTypeFromTypeNodeWorker(node2) === tp; - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: const entityName = node2.exprName; const firstIdentifier = getFirstIdentifier(entityName); const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier); const tpDeclaration = tp.symbol.declarations[0]; let tpScope; - if (tpDeclaration.kind === 167 /* TypeParameter */) { + if (tpDeclaration.kind === 168 /* TypeParameter */) { tpScope = tpDeclaration.parent; } else if (tp.isThisType) { tpScope = tpDeclaration; @@ -58947,8 +59123,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return some(firstIdentifierSymbol.declarations, (idDecl) => isNodeDescendantOf(idDecl, tpScope)) || some(node2.typeArguments, containsReference); } return true; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return !node2.type && !!node2.body || some(node2.typeParameters, containsReference) || some(node2.parameters, containsReference) || !!node2.type && containsReference(node2.type); } return !!forEachChild(node2, containsReference); @@ -59179,32 +59355,32 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration); } function isContextSensitive(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 176 /* MethodDeclaration */ || isObjectLiteralMethod(node)); switch (node.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 263 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: return isContextSensitiveFunctionLikeDeclaration(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return some(node.properties, isContextSensitive); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return some(node.elements, isContextSensitive); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return (node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return isContextSensitive(node.expression); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive); - case 294 /* JsxAttribute */: { + case 297 /* JsxAttribute */: { const { initializer } = node; return !!initializer && isContextSensitive(initializer); } - case 297 /* JsxExpression */: { + case 300 /* JsxExpression */: { const { expression } = node; return !!expression && isContextSensitive(expression); } @@ -59215,7 +59391,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node); } function hasContextSensitiveReturnExpression(node) { - return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 242 /* Block */ && isContextSensitive(node.body); + return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 244 /* Block */ && isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { return (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func); @@ -59288,23 +59464,23 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; } switch (node.kind) { - case 297 /* JsxExpression */: - case 217 /* ParenthesizedExpression */: + case 300 /* JsxExpression */: + case 219 /* ParenthesizedExpression */: return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 27 /* CommaToken */: return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); } break; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer); } return false; @@ -59478,16 +59654,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) { switch (child.kind) { - case 297 /* JsxExpression */: + case 300 /* 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 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: return { errorNode: child, innerExpression: child, nameType }; default: return Debug.assertNever(child, "Found invalid jsx child"); @@ -59613,13 +59789,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue; } switch (prop.kind) { - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: - case 174 /* MethodDeclaration */: - case 306 /* ShorthandPropertyAssignment */: + case 180 /* SetAccessor */: + case 179 /* GetAccessor */: + case 176 /* MethodDeclaration */: + case 309 /* ShorthandPropertyAssignment */: yield { errorNode: prop.name, innerExpression: void 0, nameType: type }; break; - case 305 /* PropertyAssignment */: + case 308 /* 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: @@ -59673,7 +59849,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); } const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 174 /* MethodDeclaration */ && kind !== 173 /* MethodSignature */ && kind !== 176 /* Constructor */; + const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 176 /* MethodDeclaration */ && kind !== 175 /* MethodSignature */ && kind !== 178 /* Constructor */; let result = -1 /* True */; const sourceThisType = getThisTypeOfSignature(source); if (sourceThisType && sourceThisType !== voidType) { @@ -61521,7 +61697,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const sourceSignature = first(sourceSignatures); const targetSignature = first(targetSignatures); result2 = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors2, incompatibleReporter(sourceSignature, targetSignature)); - if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 176 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 176 /* Constructor */)) { + if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 178 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 178 /* Constructor */)) { const constructSignatureToString = (signature) => signatureToString(signature, void 0, 262144 /* WriteArrowStyleSignature */, kind); reportError(Diagnostics.Type_0_is_not_assignable_to_type_1, constructSignatureToString(sourceSignature), constructSignatureToString(targetSignature)); reportError(Diagnostics.Types_of_construct_signatures_are_incompatible); @@ -62139,7 +62315,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const target = type.target; if (getObjectFlags(target) & 1 /* Class */) { const baseTypeNode = getBaseTypeNodeOfClass(target); - if (baseTypeNode && baseTypeNode.expression.kind !== 79 /* Identifier */ && baseTypeNode.expression.kind !== 211 /* PropertyAccessExpression */) { + if (baseTypeNode && baseTypeNode.expression.kind !== 79 /* Identifier */ && baseTypeNode.expression.kind !== 213 /* PropertyAccessExpression */) { return void 0; } } @@ -62506,12 +62682,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let diagnostic; switch (declaration.kind) { - case 227 /* BinaryExpression */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 229 /* BinaryExpression */: + case 172 /* PropertyDeclaration */: + case 171 /* 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 168 /* Parameter */: + case 169 /* Parameter */: const param = declaration; if (isIdentifier(param.name) && (isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && (resolveName(param, param.name.escapedText, 788968 /* Type */, void 0, param.name.escapedText, true) || param.name.originalKeywordKind && isTypeNodeKind(param.name.originalKeywordKind))) { const newName = "arg" + param.parent.parameters.indexOf(param); @@ -62521,22 +62697,22 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } 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 208 /* BindingElement */: + case 210 /* BindingElement */: diagnostic = Diagnostics.Binding_element_0_implicitly_has_an_1_type; if (!noImplicitAny) { return; } break; - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 221 /* 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); @@ -62547,7 +62723,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } 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 200 /* MappedType */: + case 202 /* MappedType */: if (noImplicitAny) { error(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); } @@ -62644,7 +62820,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function inferFromIntraExpressionSites(context) { if (context.intraExpressionInferenceSites) { for (const { node, type } of context.intraExpressionInferenceSites) { - const contextualType = node.kind === 174 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); + const contextualType = node.kind === 176 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); if (contextualType) { inferTypes(context.inferences, type, contextualType); } @@ -62696,8 +62872,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isNonGenericTopLevelType(type) { if (type.aliasSymbol && !type.aliasTypeArguments) { - const declaration = getDeclarationOfKind(type.aliasSymbol, 268 /* TypeAliasDeclaration */); - return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 314 /* SourceFile */ ? true : n.kind === 270 /* ModuleDeclaration */ ? false : "quit")); + const declaration = getDeclarationOfKind(type.aliasSymbol, 271 /* TypeAliasDeclaration */); + return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 317 /* SourceFile */ ? true : n.kind === 273 /* ModuleDeclaration */ ? false : "quit")); } return false; } @@ -63442,7 +63618,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function inferFromSignature(source, target) { const saveBivariant = bivariant; const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - bivariant = bivariant || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 176 /* Constructor */; + bivariant = bivariant || kind === 176 /* MethodDeclaration */ || kind === 175 /* MethodSignature */ || kind === 178 /* Constructor */; applyToParameterTypes(source, target, inferFromContravariantTypesIfStrictFunctionTypes); bivariant = saveBivariant; applyToReturnTypes(source, target, inferFromTypes); @@ -63598,7 +63774,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; } default: - if (node.parent.kind === 306 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 309 /* 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; @@ -63623,7 +63799,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isInTypeQuery(node) { return !!findAncestor( node, - (n) => n.kind === 186 /* TypeQuery */ ? true : n.kind === 79 /* Identifier */ || n.kind === 165 /* QualifiedName */ ? false : "quit" + (n) => n.kind === 188 /* TypeQuery */ ? true : n.kind === 79 /* Identifier */ || n.kind === 166 /* QualifiedName */ ? false : "quit" ); } function getFlowCacheKey(node, declaredType, initialType, flowContainer) { @@ -63635,59 +63811,59 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } case 109 /* ThisKeyword */: return `0|${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`; - case 236 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: const left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer); return left && left + "." + node.right.escapedText; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: const propName = getAccessedPropertyName(node); if (propName !== void 0) { const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); return key && key + "." + propName; } break; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: return `${getNodeId(node)}#${getTypeId(declaredType)}`; } return void 0; } function isMatchingReference(source, target) { switch (target.kind) { - case 217 /* ParenthesizedExpression */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: return isMatchingReference(source, target.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression(target) && target.operatorToken.kind === 27 /* CommaToken */ && isMatchingReference(source, target.right); } switch (source.kind) { - case 237 /* MetaProperty */: - return target.kind === 237 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; + case 239 /* MetaProperty */: + return target.kind === 239 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - return isThisInTypeQuery(source) ? target.kind === 109 /* ThisKeyword */ : target.kind === 79 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (target.kind === 261 /* VariableDeclaration */ || target.kind === 208 /* BindingElement */) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target); + return isThisInTypeQuery(source) ? target.kind === 109 /* ThisKeyword */ : target.kind === 79 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (target.kind === 263 /* VariableDeclaration */ || target.kind === 210 /* BindingElement */) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target); case 109 /* ThisKeyword */: return target.kind === 109 /* ThisKeyword */; case 107 /* SuperKeyword */: return target.kind === 107 /* SuperKeyword */; - case 236 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: return isMatchingReference(source.expression, target); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* 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 165 /* QualifiedName */: + case 166 /* QualifiedName */: return isAccessExpression(target) && source.right.escapedText === getAccessedPropertyName(target) && isMatchingReference(source.left, target.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isBinaryExpression(source) && source.operatorToken.kind === 27 /* CommaToken */ && isMatchingReference(source.right, target); } return false; @@ -63837,7 +64013,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getMatchingUnionConstituentForObjectLiteral(unionType, node) { const keyPropertyName = getKeyPropertyName(unionType); - const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 305 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); + const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 308 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); const propType = propNode && getContextFreeTypeOfExpression(propNode.initializer); return propType && getConstituentTypeForKeyType(unionType, propType); } @@ -63852,7 +64028,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - if (expression.expression.kind === 211 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { + if (expression.expression.kind === 213 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { return true; } return false; @@ -64013,11 +64189,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return createArrayType(checkIteratedTypeOrElementType(65 /* Destructuring */, type, undefinedType, void 0) || errorType); } function getAssignedTypeOfBinaryExpression(node) { - const isDestructuringDefaultAssignment = node.parent.kind === 209 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 305 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); + const isDestructuringDefaultAssignment = node.parent.kind === 211 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 308 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent2) { - return parent2.parent.kind === 227 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 251 /* ForOfStatement */ && parent2.parent.initializer === parent2; + return parent2.parent.kind === 229 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 253 /* ForOfStatement */ && parent2.parent.initializer === parent2; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element)); @@ -64034,21 +64210,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getAssignedType(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return stringType; - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return checkRightHandSideOfForOf(parent2) || errorType; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return getAssignedTypeOfBinaryExpression(parent2); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return undefinedType; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return getAssignedTypeOfArrayLiteralElement(parent2, node); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return getAssignedTypeOfSpreadExpression(parent2); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return getAssignedTypeOfPropertyAssignment(parent2); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return getAssignedTypeOfShorthandPropertyAssignment(parent2); } return errorType; @@ -64056,7 +64232,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getInitialTypeOfBindingElement(node) { const pattern = node.parent; const parentType = getInitialType(pattern.parent); - const type = pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); + const type = pattern.kind === 208 /* 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) { @@ -64067,25 +64243,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 250 /* ForInStatement */) { + if (node.parent.parent.kind === 252 /* ForInStatement */) { return stringType; } - if (node.parent.parent.kind === 251 /* ForOfStatement */) { + if (node.parent.parent.kind === 253 /* ForOfStatement */) { return checkRightHandSideOfForOf(node.parent.parent) || errorType; } return errorType; } function getInitialType(node) { - return node.kind === 261 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); + return node.kind === 263 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function isEmptyArrayAssignment(node) { - return node.kind === 261 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 208 /* BindingElement */ && node.parent.kind === 227 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); + return node.kind === 263 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 210 /* BindingElement */ && node.parent.kind === 229 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return getReferenceCandidate(node.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 75 /* BarBarEqualsToken */: @@ -64100,10 +64276,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getReferenceRoot(node) { const { parent: parent2 } = node; - return parent2.kind === 217 /* ParenthesizedExpression */ || parent2.kind === 227 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */ && parent2.left === node || parent2.kind === 227 /* BinaryExpression */ && parent2.operatorToken.kind === 27 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; + return parent2.kind === 219 /* ParenthesizedExpression */ || parent2.kind === 229 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */ && parent2.left === node || parent2.kind === 229 /* BinaryExpression */ && parent2.operatorToken.kind === 27 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 298 /* CaseClause */) { + if (clause.kind === 301 /* CaseClause */) { return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); } return neverType; @@ -64119,12 +64295,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return links.switchTypes; } function getSwitchClauseTypeOfWitnesses(switchStatement) { - if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 298 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { + if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 301 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { return void 0; } const witnesses = []; for (const clause of switchStatement.caseBlock.clauses) { - const text = clause.kind === 298 /* CaseClause */ ? clause.expression.text : void 0; + const text = clause.kind === 301 /* CaseClause */ ? clause.expression.text : void 0; witnesses.push(text && !contains(witnesses, text) ? text : void 0); } return witnesses; @@ -64274,8 +64450,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isEvolvingArrayOperationTarget(node) { const root = getReferenceRoot(node); const parent2 = root.parent; - const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 213 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); - const isElementAssignment = parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 227 /* 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 === 215 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); + const isElementAssignment = parent2.kind === 214 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 229 /* 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) { @@ -64298,7 +64474,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isDeclarationWithExplicitTypeAnnotation(declaration)) { return getTypeOfSymbol(symbol); } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 251 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 253 /* ForOfStatement */) { const statement = declaration.parent.parent; const expressionType = getTypeOfDottedName(statement.expression, void 0); if (expressionType) { @@ -64322,7 +64498,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getExplicitThisType(node); case 107 /* SuperKeyword */: return checkSuperExpression(node); - case 211 /* PropertyAccessExpression */: { + case 213 /* PropertyAccessExpression */: { const type = getTypeOfDottedName(node.expression, diagnostic); if (type) { const name = node.name; @@ -64339,7 +64515,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } return void 0; } - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return getTypeOfDottedName(node.expression, diagnostic); } } @@ -64349,7 +64525,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let signature = links.effectsSignature; if (signature === void 0) { let funcType; - if (node.parent.kind === 245 /* ExpressionStatement */) { + if (node.parent.kind === 247 /* ExpressionStatement */) { funcType = getTypeOfDottedName(node.expression, void 0); } else if (node.expression.kind !== 107 /* SuperKeyword */) { if (isOptionalChain(node)) { @@ -64391,7 +64567,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isFalseExpression(expr) { const node = skipParentheses(expr, true); - return node.kind === 96 /* FalseKeyword */ || node.kind === 227 /* 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 === 229 /* 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) { @@ -64490,8 +64666,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const symbol = getResolvedSymbol(node); return isConstVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); } - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol); } return false; @@ -64511,7 +64687,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 236 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { + if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 238 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { return declaredType; } return resultType === nonNullUnknownType ? unknownType : resultType; @@ -64580,7 +64756,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { target.antecedents = saveAntecedents; } else if (flags & 2 /* Start */) { const container = flow.node; - if (container && container !== flowContainer && reference.kind !== 211 /* PropertyAccessExpression */ && reference.kind !== 212 /* ElementAccessExpression */ && reference.kind !== 109 /* ThisKeyword */) { + if (container && container !== flowContainer && reference.kind !== 213 /* PropertyAccessExpression */ && reference.kind !== 214 /* ElementAccessExpression */ && reference.kind !== 109 /* ThisKeyword */) { flow = container.flowNode; continue; } @@ -64599,7 +64775,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getInitialOrAssignedType(flow) { const node = flow.node; - return getNarrowableTypeForReference(node.kind === 261 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); + return getNarrowableTypeForReference(node.kind === 263 /* VariableDeclaration */ || node.kind === 210 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); } function getTypeAtFlowAssignment(flow) { const node = flow.node; @@ -64629,13 +64805,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConst(node))) { const init = getDeclaredExpandoInitializer(node); - if (init && (init.kind === 218 /* FunctionExpression */ || init.kind === 219 /* ArrowFunction */)) { + if (init && (init.kind === 220 /* FunctionExpression */ || init.kind === 221 /* ArrowFunction */)) { return getTypeAtFlowNode(flow.antecedent); } } return declaredType; } - if (isVariableDeclaration(node) && node.parent.parent.kind === 250 /* ForInStatement */ && isMatchingReference(reference, node.parent.parent.expression)) { + if (isVariableDeclaration(node) && node.parent.parent.kind === 252 /* ForInStatement */ && isMatchingReference(reference, node.parent.parent.expression)) { return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent)))); } return void 0; @@ -64645,7 +64821,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.kind === 96 /* FalseKeyword */) { return unreachableNeverType; } - if (node.kind === 227 /* BinaryExpression */) { + if (node.kind === 229 /* BinaryExpression */) { if (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); } @@ -64674,13 +64850,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getTypeAtFlowArrayMutation(flow) { if (declaredType === autoType || declaredType === autoArrayType) { const node = flow.node; - const expr = node.kind === 213 /* CallExpression */ ? node.expression.expression : node.left.expression; + const expr = node.kind === 215 /* 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 === 213 /* CallExpression */) { + if (node.kind === 215 /* CallExpression */) { for (const arg of node.arguments) { evolvedType2 = addEvolvingArrayElementType(evolvedType2, arg); } @@ -64717,7 +64893,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let type = getTypeFromFlowType(flowType); if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); - } else if (expr.kind === 222 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { + } else if (expr.kind === 224 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else { if (strictNullChecks) { @@ -64729,7 +64905,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { flow.clauseEnd, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)) ); - } else if (expr.kind === 222 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + } else if (expr.kind === 224 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { type = narrowTypeBySwitchOptionalChainContainment( type, flow.switchStatement, @@ -64978,10 +65154,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const operator = expr.operatorToken.kind; const left = getReferenceCandidate(expr.left); const right = getReferenceCandidate(expr.right); - if (left.kind === 222 /* TypeOfExpression */ && isStringLiteralLike(right)) { + if (left.kind === 224 /* TypeOfExpression */ && isStringLiteralLike(right)) { return narrowTypeByTypeof(type, left, operator, right, assumeTrue); } - if (right.kind === 222 /* TypeOfExpression */ && isStringLiteralLike(left)) { + if (right.kind === 224 /* TypeOfExpression */ && isStringLiteralLike(left)) { return narrowTypeByTypeof(type, right, operator, left, assumeTrue); } if (isMatchingReference(reference, left)) { @@ -65179,7 +65355,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!witnesses) { return type; } - const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 299 /* DefaultClause */); + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 302 /* DefaultClause */); const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; if (hasDefaultClause) { const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); @@ -65332,17 +65508,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } case 109 /* ThisKeyword */: case 107 /* SuperKeyword */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return narrowTypeByCallExpression(type, expr, assumeTrue); - case 217 /* ParenthesizedExpression */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: return narrowType(type, expr.expression, assumeTrue); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: if (expr.operator === 53 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } @@ -65380,7 +65556,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getNonMissingTypeOfSymbol(symbol); } function getControlFlowContainer(node) { - return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 271 /* ModuleBlock */ || node2.kind === 314 /* SourceFile */ || node2.kind === 171 /* PropertyDeclaration */ || node2.kind === 172 /* AnnotationPropertyDeclaration */); + return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 274 /* ModuleBlock */ || node2.kind === 317 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */ || node2.kind === 173 /* AnnotationPropertyDeclaration */); } function isSymbolAssigned(symbol) { if (!symbol.valueDeclaration) { @@ -65416,7 +65592,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function removeOptionalityFromDeclaredType(declaredType, declaration) { if (pushTypeResolution(declaration.symbol, 2 /* DeclaredType */)) { - const annotationIncludesUndefined = strictNullChecks && declaration.kind === 168 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !(getTypeFacts(checkExpression(declaration.initializer)) & 16777216 /* IsUndefined */); + const annotationIncludesUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !(getTypeFacts(checkExpression(declaration.initializer)) & 16777216 /* IsUndefined */); popTypeResolution(); return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; } else { @@ -65426,7 +65602,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isConstraintPosition(type, node) { const parent2 = node.parent; - return parent2.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 165 /* QualifiedName */ || parent2.kind === 213 /* CallExpression */ && parent2.expression === node || parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); + return parent2.kind === 213 /* PropertyAccessExpression */ || parent2.kind === 166 /* QualifiedName */ || parent2.kind === 215 /* CallExpression */ && parent2.expression === node || parent2.kind === 214 /* 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 */)); @@ -65474,14 +65650,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (declaration) { if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) { const parent2 = declaration.parent.parent; - if (parent2.kind === 261 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 168 /* Parameter */) { + if (parent2.kind === 263 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 169 /* Parameter */) { const links = getNodeLinks(parent2); if (!(links.flags & 268435456 /* InCheckIdentifier */)) { links.flags |= 268435456 /* InCheckIdentifier */; const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */); const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType); links.flags &= ~268435456 /* InCheckIdentifier */; - if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 168 /* Parameter */ && isSymbolAssigned(symbol))) { + if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 169 /* Parameter */ && isSymbolAssigned(symbol))) { const pattern = declaration.parent; const narrowedType = getFlowTypeOfReference(pattern, parentTypeConstraint, parentTypeConstraint, void 0, location.flowNode); if (narrowedType.flags & 131072 /* Never */) { @@ -65524,7 +65700,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const container = getContainingFunction(node); if (languageVersion < 2 /* ES2015 */) { - if (container.kind === 219 /* ArrowFunction */) { + if (container.kind === 221 /* 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); @@ -65545,7 +65721,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let declaration = localOrExportSymbol.valueDeclaration; if (declaration && localOrExportSymbol.flags & 32 /* Class */) { - if (declaration.kind === 264 /* ClassDeclaration */ && nodeIsDecorated(declaration)) { + if (declaration.kind === 266 /* ClassDeclaration */ && nodeIsDecorated(declaration)) { let container = getContainingClass(node); while (container !== void 0) { if (container === declaration && container.name !== node) { @@ -65555,9 +65731,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } container = getContainingClass(container); } - } else if (declaration.kind === 232 /* ClassExpression */) { + } else if (declaration.kind === 234 /* ClassExpression */) { let container = getThisContainer(node, false); - while (container.kind !== 314 /* SourceFile */) { + while (container.kind !== 317 /* SourceFile */) { if (container.parent === declaration) { if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) { getNodeLinks(declaration).flags |= 16777216 /* ClassWithConstructorReference */; @@ -65605,16 +65781,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return type; } type = getNarrowableTypeForReference(type, node, checkMode); - const isParameter2 = getRootDeclaration(declaration).kind === 168 /* Parameter */; + const isParameter2 = getRootDeclaration(declaration).kind === 169 /* 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 === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { + while (flowContainer !== declarationContainer && (flowContainer.kind === 220 /* FunctionExpression */ || flowContainer.kind === 221 /* 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) || node.parent.kind === 284 /* ExportSpecifier */) || node.parent.kind === 236 /* NonNullExpression */ || declaration.kind === 261 /* 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) || node.parent.kind === 287 /* ExportSpecifier */) || node.parent.kind === 238 /* NonNullExpression */ || declaration.kind === 263 /* 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)) { @@ -65664,7 +65840,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return findAncestor(node, (n) => !n || nodeStartsNewLexicalEnvironment(n) ? "quit" : isIterationStatement(n, false)); } function checkNestedBlockScopedBinding(node, symbol) { - if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 301 /* CatchClause */) { + if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 304 /* CatchClause */) { return; } const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); @@ -65674,7 +65850,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isCaptured) { let capturesBlockScopeBindingInLoopBody = true; if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 262 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 264 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container) { const part = getPartOfForStatementContainingNode(node.parent, container); if (part) { @@ -65693,7 +65869,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 262 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 264 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) { getNodeLinks(symbol.valueDeclaration).flags |= 4194304 /* NeedsLoopOutParameter */; } @@ -65710,13 +65886,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isAssignedInBodyOfForStatement(node, container) { let current = node; - while (current.parent.kind === 217 /* ParenthesizedExpression */) { + while (current.parent.kind === 219 /* ParenthesizedExpression */) { current = current.parent; } let isAssigned = false; if (isAssignmentTarget(current)) { isAssigned = true; - } else if (current.parent.kind === 225 /* PrefixUnaryExpression */ || current.parent.kind === 226 /* PostfixUnaryExpression */) { + } else if (current.parent.kind === 227 /* PrefixUnaryExpression */ || current.parent.kind === 228 /* PostfixUnaryExpression */) { const expr = current.parent; isAssigned = expr.operator === 45 /* PlusPlusToken */ || expr.operator === 46 /* MinusMinusToken */; } @@ -65727,7 +65903,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 171 /* PropertyDeclaration */ || container.kind === 176 /* Constructor */) { + if (container.kind === 172 /* PropertyDeclaration */ || container.kind === 178 /* Constructor */) { const classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } else { @@ -65761,27 +65937,27 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const isNodeInTypeQuery = isInTypeQuery(node); let container = getThisContainer(node, true); let capturedByArrowFunction = false; - if (container.kind === 176 /* Constructor */) { + if (container.kind === 178 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } - if (container.kind === 219 /* ArrowFunction */) { + if (container.kind === 221 /* ArrowFunction */) { container = getThisContainer(container, false); capturedByArrowFunction = true; } checkThisInStaticClassFieldInitializerInDecoratedClass(node, container); switch (container.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 176 /* Constructor */: + case 178 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } break; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: error(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); break; } @@ -65855,13 +66031,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getClassNameFromPrototypeMethod(container) { - if (container.kind === 218 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { + if (container.kind === 220 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { return container.parent.left.expression.expression; - } else if (container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 176 /* MethodDeclaration */ && container.parent.kind === 212 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { return container.parent.parent.left.expression; - } else if (container.kind === 218 /* FunctionExpression */ && container.parent.kind === 305 /* PropertyAssignment */ && container.parent.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 220 /* FunctionExpression */ && container.parent.kind === 308 /* PropertyAssignment */ && container.parent.parent.kind === 212 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { return container.parent.parent.parent.left.expression; - } else if (container.kind === 218 /* 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 === 220 /* 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; @@ -65869,7 +66045,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTypeForThisExpressionFromJSDoc(node) { const jsdocType = getJSDocType(node); - if (jsdocType && jsdocType.kind === 326 /* JSDocFunctionType */) { + if (jsdocType && jsdocType.kind === 329 /* 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); @@ -65881,16 +66057,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 168 /* Parameter */ && n.parent === constructorDecl); + return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 169 /* Parameter */ && n.parent === constructorDecl); } function checkSuperExpression(node) { - const isCallExpression2 = node.parent.kind === 213 /* CallExpression */ && node.parent.expression === node; + const isCallExpression2 = node.parent.kind === 215 /* CallExpression */ && node.parent.expression === node; const immediateContainer = getSuperContainer(node, true); let container = immediateContainer; let needToCaptureLexicalThis = false; let inAsyncFunction = false; if (!isCallExpression2) { - while (container && container.kind === 219 /* ArrowFunction */) { + while (container && container.kind === 221 /* ArrowFunction */) { if (hasSyntacticModifier(container, 512 /* Async */)) inAsyncFunction = true; container = getSuperContainer(container, true); @@ -65902,19 +66078,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const canUseSuperExpression = isLegalUsageOfSuperExpression(container); let nodeCheckFlag = 0; if (!canUseSuperExpression) { - const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 166 /* ComputedPropertyName */); - if (current && current.kind === 166 /* ComputedPropertyName */) { + const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 167 /* ComputedPropertyName */); + if (current && current.kind === 167 /* 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 === 210 /* ObjectLiteralExpression */)) { + } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 212 /* 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 === 176 /* Constructor */) { + if (!isCallExpression2 && immediateContainer.kind === 178 /* 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) { @@ -65930,7 +66106,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { nodeCheckFlag = 256 /* SuperInstance */; } getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 174 /* MethodDeclaration */ && inAsyncFunction) { + if (container.kind === 176 /* MethodDeclaration */ && inAsyncFunction) { if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 4096 /* MethodWithSuperPropertyAssignmentInAsync */; } else { @@ -65940,7 +66116,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 210 /* ObjectLiteralExpression */) { + if (container.parent.kind === 212 /* 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; @@ -65958,7 +66134,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!baseClassType) { return errorType; } - if (container.kind === 176 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 178 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return errorType; } @@ -65968,13 +66144,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } if (isCallExpression2) { - return container2.kind === 176 /* Constructor */; + return container2.kind === 178 /* Constructor */; } else { - if (isClassLike(container2.parent) || container2.parent.kind === 210 /* ObjectLiteralExpression */) { + if (isClassLike(container2.parent) || container2.parent.kind === 212 /* ObjectLiteralExpression */) { if (isStatic(container2)) { - return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 171 /* PropertyDeclaration */ || container2.kind === 175 /* ClassStaticBlockDeclaration */; + return container2.kind === 176 /* MethodDeclaration */ || container2.kind === 175 /* MethodSignature */ || container2.kind === 179 /* GetAccessor */ || container2.kind === 180 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 177 /* ClassStaticBlockDeclaration */; } else { - return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 171 /* PropertyDeclaration */ || container2.kind === 170 /* PropertySignature */ || container2.kind === 176 /* Constructor */; + return container2.kind === 176 /* MethodDeclaration */ || container2.kind === 175 /* MethodSignature */ || container2.kind === 179 /* GetAccessor */ || container2.kind === 180 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 171 /* PropertySignature */ || container2.kind === 178 /* Constructor */; } } } @@ -65982,7 +66158,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getContainingObjectLiteral(func) { - return (func.kind === 174 /* MethodDeclaration */ || func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) && func.parent.kind === 210 /* ObjectLiteralExpression */ ? func.parent : func.kind === 218 /* FunctionExpression */ && func.parent.kind === 305 /* PropertyAssignment */ ? func.parent.parent : void 0; + return (func.kind === 176 /* MethodDeclaration */ || func.kind === 179 /* GetAccessor */ || func.kind === 180 /* SetAccessor */) && func.parent.kind === 212 /* ObjectLiteralExpression */ ? func.parent : func.kind === 220 /* FunctionExpression */ && func.parent.kind === 308 /* PropertyAssignment */ ? func.parent.parent : void 0; } function getThisTypeArgument(type) { return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? getTypeArguments(type)[0] : void 0; @@ -65993,7 +66169,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }); } function getContextualThisParameterType(func) { - if (func.kind === 219 /* ArrowFunction */) { + if (func.kind === 221 /* ArrowFunction */) { return void 0; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -66017,7 +66193,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (thisType) { return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); } - if (literal.parent.kind !== 305 /* PropertyAssignment */) { + if (literal.parent.kind !== 308 /* PropertyAssignment */) { break; } literal = literal.parent.parent; @@ -66026,7 +66202,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getWidenedType(contextualType ? getNonNullableType3(contextualType) : checkExpressionCached(containingLiteral)); } const parent2 = walkUpParenthesizedExpressions(func.parent); - if (parent2.kind === 227 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */) { + if (parent2.kind === 229 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */) { const target = parent2.left; if (isAccessExpression(target)) { const { expression } = target; @@ -66073,11 +66249,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getTypeFromTypeNode(typeNode); } switch (declaration.kind) { - case 168 /* Parameter */: + case 169 /* Parameter */: return getContextuallyTypedParameterType(declaration); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return getContextualTypeForBindingElement(declaration, contextFlags); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (isStatic(declaration)) { return getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags); } @@ -66086,10 +66262,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getContextualTypeForBindingElement(declaration, contextFlags) { const parent2 = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 208 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); + const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 210 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0; - if (parent2.name.kind === 207 /* ArrayBindingPattern */) { + if (parent2.name.kind === 209 /* ArrayBindingPattern */) { const index = indexOfNode(declaration.parent.elements, declaration); if (index < 0) return void 0; @@ -66222,7 +66398,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return signatureHasRestParameter(signature) && argIndex >= restIndex ? getIndexedAccessType(getTypeOfSymbol(signature.parameters[restIndex]), getNumberLiteralType(argIndex - restIndex), 256 /* Contextual */) : getTypeAtPosition(signature, argIndex); } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 215 /* TaggedTemplateExpression */) { + if (template.parent.kind === 217 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return void 0; @@ -66481,10 +66657,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: case 157 /* UndefinedKeyword */: return true; - case 211 /* PropertyAccessExpression */: - case 217 /* ParenthesizedExpression */: + case 213 /* PropertyAccessExpression */: + case 219 /* ParenthesizedExpression */: return isPossiblyDiscriminantValue(node.expression); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return !node.expression || isPossiblyDiscriminantValue(node.expression); } return false; @@ -66494,7 +66670,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 305 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), + filter(node.properties, (p) => !!p.symbol && p.kind === 308 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), (prop) => [() => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -66514,7 +66690,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 294 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), + filter(node.properties, (p) => !!p.symbol && p.kind === 297 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), (prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -66571,63 +66747,63 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const { parent: parent2 } = node; switch (parent2.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 208 /* BindingElement */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 210 /* BindingElement */: return getContextualTypeForInitializerExpression(node, contextFlags); - case 219 /* ArrowFunction */: - case 254 /* ReturnStatement */: + case 221 /* ArrowFunction */: + case 256 /* ReturnStatement */: return getContextualTypeForReturnExpression(node, contextFlags); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return getContextualTypeForYieldOperand(parent2, contextFlags); - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return getContextualTypeForAwaitOperand(parent2, contextFlags); - case 213 /* CallExpression */: - case 220 /* EtsComponentExpression */: + case 215 /* CallExpression */: + case 222 /* EtsComponentExpression */: if (isInEtsFile(parent2) && parent2.expression.kind === 101 /* ImportKeyword */) { return stringType; } - case 214 /* NewExpression */: + case 216 /* NewExpression */: return getContextualTypeForArgument(parent2, node); - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: return isConstTypeReference(parent2.type) ? tryFindWhenConstTypeReference(parent2) : getTypeFromTypeNode(parent2.type); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node, contextFlags); - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent2, contextFlags); - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: return getContextualType2(parent2.parent, contextFlags); - case 209 /* ArrayLiteralExpression */: { + case 211 /* ArrayLiteralExpression */: { const arrayLiteral = parent2; const type = getApparentTypeOfContextualType(arrayLiteral, contextFlags); return getContextualTypeForElementExpression(type, indexOfNode(arrayLiteral.elements, node)); } - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node, contextFlags); - case 240 /* TemplateSpan */: - Debug.assert(parent2.parent.kind === 229 /* TemplateExpression */); + case 242 /* TemplateSpan */: + Debug.assert(parent2.parent.kind === 231 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent2.parent, node); - case 217 /* ParenthesizedExpression */: { + case 219 /* ParenthesizedExpression */: { const tag = isInJSFile(parent2) ? getJSDocTypeTag(parent2) : void 0; return !tag ? getContextualType2(parent2, contextFlags) : isJSDocTypeTag(tag) && isConstTypeReference(tag.typeExpression.type) ? tryFindWhenConstTypeReference(parent2) : getTypeFromTypeNode(tag.typeExpression.type); } - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return getContextualType2(parent2, contextFlags); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return getTypeFromTypeNode(parent2.type); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return tryGetTypeFromEffectiveTypeNode(parent2); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return getContextualTypeForJsxExpression(parent2, contextFlags); - case 294 /* JsxAttribute */: - case 296 /* JsxSpreadAttribute */: + case 297 /* JsxAttribute */: + case 299 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent2, contextFlags); - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return getContextualJsxElementAttributesType(parent2, contextFlags); } return void 0; @@ -66849,7 +67025,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return isFunctionExpressionOrArrowFunction(node) || isObjectLiteralMethod(node) ? getContextualSignature(node) : void 0; } function getContextualSignature(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 176 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const typeTagSignature = getSignatureOfTypeTag(node); if (typeTagSignature) { return typeTagSignature; @@ -66890,7 +67066,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return node.isSpread ? getIndexedAccessType(node.type, numberType) : node.type; } function hasDefaultValue(node) { - return node.kind === 208 /* BindingElement */ && !!node.initializer || node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */; + return node.kind === 210 /* BindingElement */ && !!node.initializer || node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */; } function checkArrayLiteral(node, checkMode, forceTuple) { const elements = node.elements; @@ -66903,7 +67079,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let hasOmittedExpression = false; for (let i = 0; i < elementCount; i++) { const e = elements[i]; - if (e.kind === 231 /* SpreadElement */) { + if (e.kind === 233 /* SpreadElement */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */); } @@ -66919,7 +67095,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { elementTypes.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, e.expression)); elementFlags.push(4 /* Rest */); } - } else if (exactOptionalPropertyTypes && e.kind === 233 /* OmittedExpression */) { + } else if (exactOptionalPropertyTypes && e.kind === 235 /* OmittedExpression */) { hasOmittedExpression = true; elementTypes.push(missingType); elementFlags.push(2 /* Optional */); @@ -66956,7 +67132,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isNumericName(name) { switch (name.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return isNumericComputedName(name); case 79 /* Identifier */: return isNumericLiteralName(name.escapedText); @@ -66973,7 +67149,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 102 /* InKeyword */ && node.parent.kind !== 177 /* GetAccessor */ && node.parent.kind !== 178 /* 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 !== 179 /* GetAccessor */ && node.parent.kind !== 180 /* SetAccessor */) { return links.resolvedType = errorType; } links.resolvedType = checkExpression(node.expression); @@ -67032,7 +67208,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let propertiesArray = []; let spread = emptyObjectType; const contextualType = getApparentTypeOfContextualType(node, void 0); - const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 206 /* ObjectBindingPattern */ || contextualType.pattern.kind === 210 /* ObjectLiteralExpression */); + const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 208 /* ObjectBindingPattern */ || contextualType.pattern.kind === 212 /* ObjectLiteralExpression */); const inConstContext = isConstContext(node); const checkFlags = inConstContext ? 8 /* Readonly */ : 0; const isInJavascript = isInJSFile(node) && !isInJsonFile(node); @@ -67051,9 +67227,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let offset = 0; for (const memberDecl of node.properties) { let member = getSymbolOfNode(memberDecl); - const computedNameType = memberDecl.name && memberDecl.name.kind === 166 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; - if (memberDecl.kind === 305 /* PropertyAssignment */ || memberDecl.kind === 306 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { - let type = memberDecl.kind === 305 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : memberDecl.kind === 306 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode); + const computedNameType = memberDecl.name && memberDecl.name.kind === 167 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; + if (memberDecl.kind === 308 /* PropertyAssignment */ || memberDecl.kind === 309 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { + let type = memberDecl.kind === 308 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : memberDecl.kind === 309 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode); if (isInJavascript) { const jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl); if (jsDocType) { @@ -67070,7 +67246,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { prop.nameType = nameType; } if (inDestructuringPattern) { - const isOptional = memberDecl.kind === 305 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 306 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; + const isOptional = memberDecl.kind === 308 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 309 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; if (isOptional) { prop.flags |= 16777216 /* Optional */; } @@ -67096,16 +67272,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { prop.target = member; member = prop; allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop); - if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 305 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { + if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 308 /* PropertyAssignment */ || memberDecl.kind === 176 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { const inferenceContext = getInferenceContext(node); Debug.assert(inferenceContext); - const inferenceNode = memberDecl.kind === 305 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; + const inferenceNode = memberDecl.kind === 308 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; addIntraExpressionInferenceSite(inferenceContext, inferenceNode, type); } if (type.symbol && type.symbol.flags & 268435456 /* Annotation */) { error(memberDecl, Diagnostics.Annotation_cannot_be_used_as_a_value); } - } else if (memberDecl.kind === 307 /* SpreadAssignment */) { + } else if (memberDecl.kind === 310 /* SpreadAssignment */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(memberDecl, 2 /* Assign */); } @@ -67134,7 +67310,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } continue; } else { - Debug.assert(memberDecl.kind === 177 /* GetAccessor */ || memberDecl.kind === 178 /* SetAccessor */); + Debug.assert(memberDecl.kind === 179 /* GetAccessor */ || memberDecl.kind === 180 /* SetAccessor */); checkNodeDeferred(memberDecl); } if (computedNameType && !(computedNameType.flags & 8576 /* StringOrNumberLiteralOrUnique */)) { @@ -67158,13 +67334,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (contextualTypeHasPattern) { const rootPatternParent = findAncestor( contextualType.pattern.parent, - (n) => n.kind === 261 /* VariableDeclaration */ || n.kind === 227 /* BinaryExpression */ || n.kind === 168 /* Parameter */ + (n) => n.kind === 263 /* VariableDeclaration */ || n.kind === 229 /* BinaryExpression */ || n.kind === 169 /* Parameter */ ); const spreadOrOutsideRootObject = findAncestor( node, - (n) => n === rootPatternParent || n.kind === 307 /* SpreadAssignment */ + (n) => n === rootPatternParent || n.kind === 310 /* SpreadAssignment */ ); - if (spreadOrOutsideRootObject.kind !== 307 /* SpreadAssignment */) { + if (spreadOrOutsideRootObject.kind !== 310 /* SpreadAssignment */) { for (const prop of getPropertiesOfType(contextualType)) { if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { @@ -67293,7 +67469,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } else { - Debug.assert(attributeDecl.kind === 296 /* JsxSpreadAttribute */); + Debug.assert(attributeDecl.kind === 299 /* JsxSpreadAttribute */); if (attributesTable.size > 0) { spread = getSpreadType(spread, createJsxAttributesType(), attributes.symbol, objectFlags, false); attributesTable = createSymbolTable(); @@ -67318,7 +67494,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { spread = getSpreadType(spread, createJsxAttributesType(), attributes.symbol, objectFlags, false); } } - const parent2 = openingLikeElement.parent.kind === 287 /* JsxElement */ ? openingLikeElement.parent : void 0; + const parent2 = openingLikeElement.parent.kind === 290 /* JsxElement */ ? openingLikeElement.parent : void 0; if (parent2 && parent2.openingElement === openingLikeElement && parent2.children.length > 0) { const childrenTypes = checkJsxChildren(parent2, checkMode); if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { @@ -67364,7 +67540,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!child.containsOnlyTriviaWhiteSpaces) { childrenTypes.push(stringType); } - } else if (child.kind === 297 /* JsxExpression */ && !child.expression) { + } else if (child.kind === 300 /* JsxExpression */ && !child.expression) { continue; } else { childrenTypes.push(checkExpressionForMutableLocation(child, checkMode)); @@ -67681,7 +67857,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError = true) { - const errorNode = !reportError ? void 0 : node.kind === 165 /* QualifiedName */ ? node.right : node.kind === 205 /* ImportType */ ? node : node.kind === 208 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; + const errorNode = !reportError ? void 0 : node.kind === 166 /* QualifiedName */ ? node.right : node.kind === 207 /* ImportType */ ? node : node.kind === 210 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); } function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) { @@ -67894,7 +68070,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return checkPropertyAccessExpressionOrQualifiedName(node, node.left, leftType, node.right, checkMode); } function isMethodAccessForCall(node) { - while (node.parent.kind === 217 /* ParenthesizedExpression */) { + while (node.parent.kind === 219 /* ParenthesizedExpression */) { node = node.parent; } return isCallOrNewExpression(node.parent) && node.parent.expression === node; @@ -68049,7 +68225,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } return isErrorType(apparentType) ? errorType : apparentType; } - prop = getPropertyOfType(apparentType, right.escapedText, false, node.kind === 165 /* QualifiedName */); + prop = getPropertyOfType(apparentType, right.escapedText, false, node.kind === 166 /* QualifiedName */); if (!prop) { const etsComponentExpressionNode = getEtsComponentExpressionInnerCallExpressionNode(node) || getRootEtsComponentInnerCallExpressionNode(node); const locals = getSourceFileOfNode(node).locals; @@ -68074,7 +68250,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - if (isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 308 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { + if (isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 311 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { markAliasReferenced(parentSymbol, node); } let propType; @@ -68172,7 +68348,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (declaration && isPropertyWithoutInitializer(declaration)) { if (!isStatic(declaration)) { const flowContainer = getControlFlowContainer(node); - if (flowContainer.kind === 176 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { + if (flowContainer.kind === 178 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { assumeUninitialized = true; } } @@ -68216,7 +68392,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!needInitialization && !(hasRequireDecorator && checkStructPropertyPosition(valueDeclaration, node))) { diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); } - } else if (valueDeclaration.kind === 264 /* ClassDeclaration */ && node.parent.kind !== 183 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { + } else if (valueDeclaration.kind === 266 /* ClassDeclaration */ && node.parent.kind !== 185 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { diagnosticMessage = error(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { @@ -68229,25 +68405,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isInPropertyInitializerOrClassStaticBlock(node) { return !!findAncestor(node, (node2) => { switch (node2.kind) { - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return true; - case 305 /* PropertyAssignment */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 307 /* SpreadAssignment */: - case 166 /* ComputedPropertyName */: - case 240 /* TemplateSpan */: - case 297 /* JsxExpression */: - case 294 /* JsxAttribute */: - case 295 /* JsxAttributes */: - case 296 /* JsxSpreadAttribute */: - case 289 /* JsxOpeningElement */: - case 234 /* ExpressionWithTypeArguments */: - case 300 /* HeritageClause */: + case 308 /* PropertyAssignment */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 310 /* SpreadAssignment */: + case 167 /* ComputedPropertyName */: + case 242 /* TemplateSpan */: + case 300 /* JsxExpression */: + case 297 /* JsxAttribute */: + case 298 /* JsxAttributes */: + case 299 /* JsxSpreadAttribute */: + case 292 /* JsxOpeningElement */: + case 236 /* ExpressionWithTypeArguments */: + case 303 /* HeritageClause */: return false; - case 219 /* ArrowFunction */: - case 245 /* ExpressionStatement */: + case 221 /* ArrowFunction */: + case 247 /* ExpressionStatement */: return isBlock(node2.parent) && isClassStaticBlockDeclaration(node2.parent.parent) ? true : "quit"; default: return isExpressionNode(node2) ? false : "quit"; @@ -68482,18 +68658,18 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isValidPropertyAccess(node, propertyName) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return isValidPropertyAccessWithType(node, node.expression.kind === 107 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return isValidPropertyAccessWithType(node, false, propertyName, getWidenedType(checkExpression(node.left))); - case 205 /* ImportType */: + case 207 /* ImportType */: return isValidPropertyAccessWithType(node, false, propertyName, getTypeFromTypeNode(node)); } } function isValidPropertyAccessForCompletions(node, type, property) { return isPropertyAccessible( node, - node.kind === 211 /* PropertyAccessExpression */ && node.expression.kind === 107 /* SuperKeyword */, + node.kind === 213 /* PropertyAccessExpression */ && node.expression.kind === 107 /* SuperKeyword */, false, type, property @@ -68518,7 +68694,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getForInVariableSymbol(node) { const initializer = node.initializer; - if (initializer.kind === 262 /* VariableDeclarationList */) { + if (initializer.kind === 264 /* VariableDeclarationList */) { const variable = initializer.declarations[0]; if (variable && !isBindingPattern(variable.name)) { return getSymbolOfNode(variable); @@ -68539,7 +68715,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let child = expr; let node = expr.parent; while (node) { - if (node.kind === 250 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { + if (node.kind === 252 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { return true; } child = node; @@ -68583,11 +68759,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (callLikeExpressionMayHaveTypeArguments(node)) { forEach(node.typeArguments, checkSourceElement); } - if (node.kind === 215 /* TaggedTemplateExpression */) { + if (node.kind === 217 /* TaggedTemplateExpression */) { checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); - } else if (node.kind !== 169 /* Decorator */) { + } else if (node.kind !== 170 /* Decorator */) { forEach(node.arguments, (argument) => { checkExpression(argument); }); @@ -68632,7 +68808,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function isSpreadArgument(arg) { - return !!arg && (arg.kind === 231 /* SpreadElement */ || arg.kind === 238 /* SyntheticExpression */ && arg.isSpread); + return !!arg && (arg.kind === 233 /* SpreadElement */ || arg.kind === 240 /* SyntheticExpression */ && arg.isSpread); } function getSpreadArgumentIndex(args) { return findIndex(args, isSpreadArgument); @@ -68648,9 +68824,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let callIsIncomplete = false; let effectiveParameterCount = getParameterCount(signature); let effectiveMinimumArguments = getMinArgumentCount(signature); - if (node.kind === 215 /* TaggedTemplateExpression */) { + if (node.kind === 217 /* TaggedTemplateExpression */) { argCount = args.length; - if (node.template.kind === 229 /* TemplateExpression */) { + if (node.template.kind === 231 /* TemplateExpression */) { const lastSpan = last(node.template.templateSpans); callIsIncomplete = nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated; } else { @@ -68658,7 +68834,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { Debug.assert(templateLiteral.kind === 14 /* NoSubstitutionTemplateLiteral */); callIsIncomplete = !!templateLiteral.isUnterminated; } - } else if (node.kind === 169 /* Decorator */) { + } else if (node.kind === 170 /* Decorator */) { argCount = getDecoratorArgumentCount(node, signature); } else if (isJsxOpeningLikeElement(node)) { callIsIncomplete = node.attributes.end === node.end; @@ -68669,7 +68845,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { effectiveParameterCount = args.length === 0 ? effectiveParameterCount : 1; effectiveMinimumArguments = Math.min(effectiveMinimumArguments, 1); } else if (!node.arguments) { - Debug.assert(node.kind === 214 /* NewExpression */); + Debug.assert(node.kind === 216 /* NewExpression */); return getMinArgumentCount(signature) === 0; } else { argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -68750,7 +68926,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isJsxOpeningLikeElement(node)) { return inferJsxTypeArguments(node, signature, checkMode, context); } - if (node.kind !== 169 /* Decorator */) { + if (node.kind !== 170 /* Decorator */) { const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); const contextualType = getContextualType2(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); if (contextualType) { @@ -68787,7 +68963,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 233 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { + if (arg.kind !== 235 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { const paramType = getTypeAtPosition(signature, i); if (couldContainTypeVariables(paramType)) { const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode); @@ -68808,7 +68984,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (index >= argCount - 1) { const arg = args[argCount - 1]; if (isSpreadArgument(arg)) { - return getMutableArrayOrTupleType(arg.kind === 238 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode)); + return getMutableArrayOrTupleType(arg.kind === 240 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode)); } } const types = []; @@ -68817,12 +68993,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { for (let i = index; i < argCount; i++) { const arg = args[i]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 238 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); + const spreadType = arg.kind === 240 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); if (isArrayLikeType2(spreadType)) { types.push(spreadType); flags.push(8 /* Variadic */); } else { - types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 231 /* SpreadElement */ ? arg.expression : arg)); + types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 233 /* SpreadElement */ ? arg.expression : arg)); flags.push(4 /* Rest */); } } else { @@ -68832,7 +69008,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType)); flags.push(1 /* Required */); } - if (arg.kind === 238 /* SyntheticExpression */ && arg.tupleNameSource) { + if (arg.kind === 240 /* SyntheticExpression */ && arg.tupleNameSource) { names.push(arg.tupleNameSource); } } @@ -68975,7 +69151,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return void 0; } const thisType = getThisTypeOfSignature(signature); - if (thisType && thisType !== voidType && node.kind !== 214 /* NewExpression */) { + if (thisType && thisType !== voidType && node.kind !== 216 /* NewExpression */) { const thisArgumentNode = getThisArgumentOfCall(node); const thisArgumentType = getThisArgumentType(thisArgumentNode); const errorNode = reportErrors2 ? thisArgumentNode || node : void 0; @@ -68990,7 +69166,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 233 /* OmittedExpression */) { + if (arg.kind !== 235 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); const argType = checkExpressionWithContextualType(arg, paramType, void 0, checkMode); const checkArgType = checkMode & 4 /* SkipContextSensitive */ ? getRegularTypeOfObjectLiteral(argType) : argType; @@ -69025,7 +69201,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getThisArgumentOfCall(node) { - const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : void 0; + const expression = node.kind === 215 /* CallExpression */ ? node.expression : node.kind === 217 /* TaggedTemplateExpression */ ? node.tag : void 0; if (expression) { const callee = skipOuterExpressions(expression); if (isAccessExpression(callee)) { @@ -69040,17 +69216,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return result; } function getEffectiveCallArguments(node) { - if (node.kind === 215 /* TaggedTemplateExpression */) { + if (node.kind === 217 /* TaggedTemplateExpression */) { const template = node.template; const args2 = [createSyntheticExpression(template, getGlobalTemplateStringsArrayType())]; - if (template.kind === 229 /* TemplateExpression */) { + if (template.kind === 231 /* TemplateExpression */) { forEach(template.templateSpans, (span) => { args2.push(span.expression); }); } return args2; } - if (node.kind === 169 /* Decorator */) { + if (node.kind === 170 /* Decorator */) { return getEffectiveDecoratorArguments(node); } if (isJsxOpeningLikeElement(node)) { @@ -69062,7 +69238,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const effectiveArgs = args.slice(0, spreadIndex); for (let i = spreadIndex; i < args.length; i++) { const arg = args[i]; - const spreadType = arg.kind === 231 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); + const spreadType = arg.kind === 233 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); if (spreadType && isTupleType(spreadType)) { forEach(getTypeArguments(spreadType), (t, i2) => { var _a2; @@ -69087,30 +69263,30 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const parent2 = node.parent; const expr = node.expression; switch (parent2.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: return [ createSyntheticExpression(expr, getTypeOfSymbol(getSymbolOfNode(parent2))) ]; - case 168 /* Parameter */: + case 169 /* Parameter */: const func = parent2.parent; return [ - createSyntheticExpression(expr, parent2.parent.kind === 176 /* Constructor */ ? getTypeOfSymbol(getSymbolOfNode(func)) : errorType), + createSyntheticExpression(expr, parent2.parent.kind === 178 /* Constructor */ ? getTypeOfSymbol(getSymbolOfNode(func)) : errorType), createSyntheticExpression(expr, anyType), createSyntheticExpression(expr, numberType) ]; - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: const hasPropDesc = languageVersion !== 0 /* ES3 */ && (!isPropertyDeclaration(parent2) || hasAccessorModifier(parent2)); return [ createSyntheticExpression(expr, getParentTypeOfClassElement(parent2)), createSyntheticExpression(expr, getClassElementPropertyKeyType(parent2)), createSyntheticExpression(expr, hasPropDesc ? createTypedPropertyDescriptorType(getTypeOfNode(parent2)) : anyType) ]; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: if (isEtsFunctionDecorators(getNameOfDecorator(node), compilerOptions)) { const symbol = getSymbolOfNode(expr); return symbol ? [ @@ -69123,19 +69299,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getDecoratorArgumentCount(node, signature) { switch (node.parent.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: return 1; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return hasAccessorModifier(node.parent) ? 3 : 2; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return languageVersion === 0 /* ES3 */ || signature.parameters.length <= 2 ? 2 : 3; - case 168 /* Parameter */: + case 169 /* Parameter */: return 3; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: if (isEtsFunctionDecorators(getNameOfDecorator(node), compilerOptions)) { return isCallExpression(node.expression) ? 1 : 0; } @@ -69262,10 +69438,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, fallbackError) { - const isTaggedTemplate = node.kind === 215 /* TaggedTemplateExpression */; - const isDecorator2 = node.kind === 169 /* Decorator */; + const isTaggedTemplate = node.kind === 217 /* TaggedTemplateExpression */; + const isDecorator2 = node.kind === 170 /* Decorator */; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); - const isEtsComponentExpression2 = node.kind === 220 /* EtsComponentExpression */; + const isEtsComponentExpression2 = node.kind === 222 /* EtsComponentExpression */; const reportErrors2 = !candidatesOutArray; let typeArguments; let virtual; @@ -69295,7 +69471,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let candidateForArgumentArityError; let candidateForTypeArgumentError; let result; - const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 213 /* CallExpression */ && node.arguments.hasTrailingComma; + const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 215 /* CallExpression */ && node.arguments.hasTrailingComma; if (candidates.length > 1) { result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma); } @@ -69745,7 +69921,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const declaration = signature.declaration; const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */); - if (!modifiers || declaration.kind !== 176 /* Constructor */) { + if (!modifiers || declaration.kind !== 178 /* Constructor */) { return true; } const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(declaration.parent.symbol); @@ -69887,19 +70063,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 168 /* Parameter */: + case 169 /* Parameter */: return Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: const decoratorName = getNameOfDecorator(node); if (isEtsFunctionDecorators(decoratorName, compilerOptions)) { return Diagnostics.Unable_to_resolve_signature_of_function_decorator_when_decorators_are_not_valid; @@ -70059,20 +70235,20 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function resolveSignature(node, candidatesOutArray, checkMode) { switch (node.kind) { - case 213 /* CallExpression */: - case 220 /* EtsComponentExpression */: + case 215 /* CallExpression */: + case 222 /* EtsComponentExpression */: return resolveCallExpression(node, candidatesOutArray, checkMode); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return resolveNewExpression(node, candidatesOutArray, checkMode); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode); - case 169 /* Decorator */: + case 170 /* Decorator */: if (isAnnotation(node)) { return resolveAnnotation(node); } return resolveDecorator(node, candidatesOutArray, checkMode); - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); } } @@ -70177,7 +70353,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } let parent2 = node.parent; - while (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) { + while (parent2 && parent2.kind === 213 /* PropertyAccessExpression */) { parent2 = parent2.parent; } if (parent2 && isBinaryExpression(parent2) && isPrototypeAccess(parent2.left) && parent2.operatorToken.kind === 63 /* EqualsToken */) { @@ -70196,9 +70372,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.expression.kind === 107 /* SuperKeyword */) { return voidType; } - if (node.kind === 214 /* NewExpression */) { + if (node.kind === 216 /* NewExpression */) { const declaration = signature.declaration; - if (declaration && declaration.kind !== 176 /* Constructor */ && declaration.kind !== 180 /* ConstructSignature */ && declaration.kind !== 185 /* ConstructorType */ && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { + if (declaration && declaration.kind !== 178 /* Constructor */ && declaration.kind !== 182 /* ConstructSignature */ && declaration.kind !== 187 /* ConstructorType */ && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { if (noImplicitAny) { error(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } @@ -70212,7 +70388,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (returnType.flags & 12288 /* ESSymbolLike */ && isSymbolOrSymbolForCall(node)) { return getESSymbolLikeTypeForNode(walkUpParenthesizedExpressions(node.parent)); } - if (node.kind === 213 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 245 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { + if (node.kind === 215 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 247 /* 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)) { @@ -70232,7 +70408,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(node.expression, Diagnostics.UI_component_0_cannot_be_used_in_this_place, diagnosticName(node.expression)); } const signatureDeclaration = signature.declaration; - if (node.kind === 213 /* CallExpression */ && signatureDeclaration && !isJSDocSignature(signatureDeclaration) && (isMethodDeclaration(signatureDeclaration) || isMethodSignature(signatureDeclaration) || isFunctionDeclaration(signatureDeclaration))) { + if (node.kind === 215 /* CallExpression */ && signatureDeclaration && !isJSDocSignature(signatureDeclaration) && (isMethodDeclaration(signatureDeclaration) || isMethodSignature(signatureDeclaration) || isFunctionDeclaration(signatureDeclaration))) { if (shouldCheckThrows(signatureDeclaration) && !hasAsyncErrorCallbacks(signatureDeclaration)) { checkThrowableFunction(node); } @@ -70572,20 +70748,20 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getDeprecatedSuggestionNode(node) { node = skipParentheses(node); switch (node.kind) { - case 213 /* CallExpression */: - case 169 /* Decorator */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 170 /* Decorator */: + case 216 /* NewExpression */: return getDeprecatedSuggestionNode(node.expression); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return getDeprecatedSuggestionNode(node.tag); - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return getDeprecatedSuggestionNode(node.tagName); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return node.argumentExpression; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return node.name; - case 183 /* TypeReference */: + case 185 /* TypeReference */: const typeReference = node; return isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference; default: @@ -70694,7 +70870,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (resolvedRequire.flags & 2097152 /* Alias */) { return false; } - const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 263 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 261 /* VariableDeclaration */ : 0 /* Unknown */; + const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 265 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 263 /* VariableDeclaration */ : 0 /* Unknown */; if (targetDeclarationKind !== 0 /* Unknown */) { const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind); return !!decl && !!(decl.flags & 16777216 /* Ambient */); @@ -70712,7 +70888,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getReturnTypeOfSignature(signature); } function checkAssertion(node) { - if (node.kind === 216 /* TypeAssertionExpression */) { + if (node.kind === 218 /* 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); @@ -70728,18 +70904,18 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 9 /* BigIntLiteral */: case 111 /* TrueKeyword */: case 96 /* FalseKeyword */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 229 /* TemplateExpression */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 231 /* TemplateExpression */: return true; - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return isValidConstAssertionArgument(node.expression); - case 225 /* PrefixUnaryExpression */: + case 227 /* 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 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: const expr = node.expression; let symbol = getTypeOfNode(expr).symbol; if (symbol && symbol.flags & 2097152 /* Alias */) { @@ -70785,7 +70961,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkExpressionWithTypeArguments(node) { checkGrammarExpressionWithTypeArguments(node); - const exprType = node.kind === 234 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); + const exprType = node.kind === 236 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); const typeArguments = node.typeArguments; if (exprType === silentNeverType || isErrorType(exprType) || !some(typeArguments)) { return exprType; @@ -70880,7 +71056,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 176 /* Constructor */) { + } else if (container.kind === 178 /* Constructor */) { const symbol = getSymbolOfNode(container.parent); return getTypeOfSymbol(symbol); } else { @@ -70930,7 +71106,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getParameterIdentifierNameAtPosition(signature, pos) { var _a2; - if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 326 /* JSDocFunctionType */) { + if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 329 /* JSDocFunctionType */) { return void 0; } const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -70962,7 +71138,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name); } function isValidDeclarationForTupleLabel(d) { - return d.kind === 202 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); + return d.kind === 204 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); } function getNameableDeclarationAtPosition(signature, pos) { const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -71221,7 +71397,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let yieldType; let nextType; let fallbackReturnType = voidType; - if (func.body.kind !== 242 /* Block */) { + if (func.body.kind !== 244 /* Block */) { returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */); if (isAsync) { returnType = unwrapAwaitedType(checkAwaitedType(returnType, false, func, Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)); @@ -71355,7 +71531,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return links.isExhaustive; } function computeExhaustiveSwitchStatement(node) { - if (node.expression.kind === 222 /* TypeOfExpression */) { + if (node.expression.kind === 224 /* TypeOfExpression */) { const witnesses = getSwitchClauseTypeOfWitnesses(node); if (!witnesses) { return false; @@ -71410,11 +71586,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function mayReturnNever(func) { switch (func.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return true; - case 174 /* MethodDeclaration */: - return func.parent.kind === 210 /* ObjectLiteralExpression */; + case 176 /* MethodDeclaration */: + return func.parent.kind === 212 /* ObjectLiteralExpression */; default: return false; } @@ -71456,7 +71632,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return judgeReturnTypeOfStyles(); } } - if (func.kind === 173 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 242 /* Block */ || !functionHasImplicitReturn(func)) { + if (func.kind === 175 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 244 /* Block */ || !functionHasImplicitReturn(func)) { return; } const hasExplicitReturn = func.flags & 512 /* HasExplicitReturn */; @@ -71492,7 +71668,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 176 /* MethodDeclaration */ || isObjectLiteralMethod(node)); checkNodeDeferred(node); if (isFunctionExpression(node)) { checkCollisionsForDeclarationName(node, node.name); @@ -71515,7 +71691,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return anyFunctionType; } const hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 218 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 220 /* FunctionExpression */) { checkGrammarForGenerator(node); } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -71559,7 +71735,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 176 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const functionFlags = getFunctionFlags(node); const returnType = getReturnTypeFromAnnotation(node); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); @@ -71567,7 +71743,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!getEffectiveReturnTypeNode(node)) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 242 /* Block */) { + if (node.body.kind === 244 /* Block */) { checkSourceElement(node.body); } else { const exprType = checkExpression(node.body); @@ -71633,7 +71809,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isReadonlySymbol(symbol)) { if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 109 /* ThisKeyword */) { const ctor = getContainingFunction(expr); - if (!(ctor && (ctor.kind === 176 /* Constructor */ || isJSConstructor(ctor)))) { + if (!(ctor && (ctor.kind === 178 /* Constructor */ || isJSConstructor(ctor)))) { return true; } if (symbol.valueDeclaration) { @@ -71654,7 +71830,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const symbol2 = getNodeLinks(node).resolvedSymbol; if (symbol2.flags & 2097152 /* Alias */) { const declaration = getDeclarationOfAliasSymbol(symbol2); - return !!declaration && declaration.kind === 277 /* NamespaceImport */; + return !!declaration && declaration.kind === 280 /* NamespaceImport */; } } } @@ -71759,7 +71935,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 176 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { + if (container && container.kind !== 178 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { const relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); } @@ -71952,7 +72128,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkObjectLiteralDestructuringPropertyAssignment(node, objectLiteralType, propertyIndex, allProperties, rightIsThis = false) { const properties = node.properties; const property = properties[propertyIndex]; - if (property.kind === 305 /* PropertyAssignment */ || property.kind === 306 /* ShorthandPropertyAssignment */) { + if (property.kind === 308 /* PropertyAssignment */ || property.kind === 309 /* ShorthandPropertyAssignment */) { const name = property.name; const exprType = getLiteralTypeFromPropertyName(name); if (isTypeUsableAsPropertyName(exprType)) { @@ -71965,8 +72141,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */, name); const type = getFlowTypeOfDestructuring(property, elementType); - return checkDestructuringAssignment(property.kind === 306 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); - } else if (property.kind === 307 /* SpreadAssignment */) { + return checkDestructuringAssignment(property.kind === 309 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); + } else if (property.kind === 310 /* SpreadAssignment */) { if (propertyIndex < properties.length - 1) { error(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { @@ -71998,7 +72174,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let inBoundsType = compilerOptions.noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType; for (let i = 0; i < elements.length; i++) { let type = possiblyOutOfBoundsType; - if (node.elements[i].kind === 231 /* SpreadElement */) { + if (node.elements[i].kind === 233 /* SpreadElement */) { type = inBoundsType = inBoundsType != null ? inBoundsType : checkIteratedTypeOrElementType(65 /* Destructuring */, sourceType, undefinedType, node) || errorType; } checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode); @@ -72008,8 +72184,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { const elements = node.elements; const element = elements[elementIndex]; - if (element.kind !== 233 /* OmittedExpression */) { - if (element.kind !== 231 /* SpreadElement */) { + if (element.kind !== 235 /* OmittedExpression */) { + if (element.kind !== 233 /* SpreadElement */) { const indexType = getNumberLiteralType(elementIndex); if (isArrayLikeType2(sourceType)) { const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(element) ? 16 /* NoTupleBoundsCheck */ : 0); @@ -72024,7 +72200,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { const restExpression = element.expression; - if (restExpression.kind === 227 /* BinaryExpression */ && restExpression.operatorToken.kind === 63 /* EqualsToken */) { + if (restExpression.kind === 229 /* 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); @@ -72037,7 +72213,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) { let target; - if (exprOrAssignment.kind === 306 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 309 /* ShorthandPropertyAssignment */) { const prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) { @@ -72049,25 +72225,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { target = exprOrAssignment; } - if (target.kind === 227 /* BinaryExpression */ && target.operatorToken.kind === 63 /* EqualsToken */) { + if (target.kind === 229 /* BinaryExpression */ && target.operatorToken.kind === 63 /* EqualsToken */) { checkBinaryExpression(target, checkMode); target = target.left; if (strictNullChecks) { sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); } } - if (target.kind === 210 /* ObjectLiteralExpression */) { + if (target.kind === 212 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType, rightIsThis); } - if (target.kind === 209 /* ArrayLiteralExpression */) { + if (target.kind === 211 /* 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 === 307 /* 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 === 307 /* 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 === 310 /* 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 === 310 /* 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); } @@ -72082,8 +72258,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: case 10 /* StringLiteral */: case 13 /* RegularExpressionLiteral */: - case 215 /* TaggedTemplateExpression */: - case 229 /* TemplateExpression */: + case 217 /* TaggedTemplateExpression */: + case 231 /* TemplateExpression */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: @@ -72091,25 +72267,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 96 /* FalseKeyword */: case 105 /* NullKeyword */: case 157 /* UndefinedKeyword */: - case 218 /* FunctionExpression */: - case 232 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 222 /* TypeOfExpression */: - case 236 /* NonNullExpression */: - case 288 /* JsxSelfClosingElement */: - case 287 /* JsxElement */: + case 220 /* FunctionExpression */: + case 234 /* ClassExpression */: + case 221 /* ArrowFunction */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 224 /* TypeOfExpression */: + case 238 /* NonNullExpression */: + case 291 /* JsxSelfClosingElement */: + case 290 /* JsxElement */: return true; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: switch (node.operator) { case 53 /* ExclamationToken */: case 39 /* PlusToken */: @@ -72118,9 +72294,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; } return false; - case 223 /* VoidExpression */: - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 225 /* VoidExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: default: return false; } @@ -72156,7 +72332,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } checkGrammarNullishCoalesceWithLogicalExpression(node); const operator = node.operatorToken.kind; - if (operator === 63 /* EqualsToken */ && (node.left.kind === 210 /* ObjectLiteralExpression */ || node.left.kind === 209 /* ArrayLiteralExpression */)) { + if (operator === 63 /* EqualsToken */ && (node.left.kind === 212 /* ObjectLiteralExpression */ || node.left.kind === 211 /* ArrayLiteralExpression */)) { state.skip = true; setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 109 /* ThisKeyword */)); return state; @@ -72178,7 +72354,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { if (operator === 55 /* AmpersandAmpersandToken */) { let parent2 = node.parent; - while (parent2.kind === 217 /* ParenthesizedExpression */ || isBinaryExpression(parent2) && (parent2.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || parent2.operatorToken.kind === 56 /* BarBarToken */)) { + while (parent2.kind === 219 /* ParenthesizedExpression */ || isBinaryExpression(parent2) && (parent2.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || parent2.operatorToken.kind === 56 /* BarBarToken */)) { parent2 = parent2.parent; } checkTestingKnownTruthyCallableOrAwaitableType(node.left, leftType, isIfStatement(parent2) ? parent2.thenStatement : void 0); @@ -72245,7 +72421,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { const operator = operatorToken.kind; - if (operator === 63 /* EqualsToken */ && (left.kind === 210 /* ObjectLiteralExpression */ || left.kind === 209 /* ArrayLiteralExpression */)) { + if (operator === 63 /* EqualsToken */ && (left.kind === 212 /* ObjectLiteralExpression */ || left.kind === 211 /* ArrayLiteralExpression */)) { return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 109 /* ThisKeyword */); } let leftType; @@ -72683,7 +72859,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return !!(type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */) || type.flags & 58982400 /* InstantiableNonPrimitive */ && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 402653316 /* StringLike */)); } function getContextNode2(node) { - if (node.kind === 295 /* JsxAttributes */ && !isJsxSelfClosingElement(node.parent)) { + if (node.kind === 298 /* JsxAttributes */ && !isJsxSelfClosingElement(node.parent)) { return node.parent.parent; } return node; @@ -72724,12 +72900,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isTypeAssertion3(node) { node = skipParentheses(node, true); - return node.kind === 216 /* TypeAssertionExpression */ || node.kind === 235 /* AsExpression */ || isJSDocTypeAssertion(node); + return node.kind === 218 /* TypeAssertionExpression */ || node.kind === 237 /* AsExpression */ || isJSDocTypeAssertion(node); } function checkDeclarationInitializer(declaration, checkMode, contextualType) { const initializer = getEffectiveInitializer(declaration); const type = getQuickTypeOfExpression(initializer) || (contextualType ? checkExpressionWithContextualType(initializer, contextualType, void 0, checkMode || 0 /* Normal */) : checkExpressionCached(initializer, checkMode)); - return isParameter(declaration) && declaration.name.kind === 207 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; + return isParameter(declaration) && declaration.name.kind === 209 /* 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; @@ -72737,7 +72913,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 208 /* BindingElement */ && e.dotDotDotToken)) { + if (i < patternElements.length - 1 || !(e.kind === 210 /* BindingElement */ && e.dotDotDotToken)) { elementTypes.push(!isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement(e, false, false) : anyType); elementFlags.push(2 /* Optional */); if (!isOmittedExpression(e) && !hasDefaultValue(e)) { @@ -72783,14 +72959,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return isConstContext(node) || isCommonJsExportedExpression(node) ? getRegularTypeOfLiteralType(type) : isTypeAssertion3(node) ? type : getWidenedLiteralLikeTypeForContextualType(type, instantiateContextualType(arguments.length === 2 ? getContextualType2(node, void 0) : contextualType, node, void 0)); } function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); } function checkObjectLiteralMethod(node, checkMode) { checkGrammarMethod(node); - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } const uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -72996,7 +73172,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return type; } function checkConstEnumAccess(node, type) { - const ok = node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 79 /* Identifier */ || node.kind === 165 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 186 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 284 /* ExportSpecifier */; + const ok = node.parent.kind === 213 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 214 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 79 /* Identifier */ || node.kind === 166 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 188 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 287 /* 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); } @@ -73019,9 +73195,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const kind = node.kind; if (cancellationToken) { switch (kind) { - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -73052,87 +73228,87 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return trueType; case 96 /* FalseKeyword */: return falseType; - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: return checkTemplateExpression(node); case 13 /* RegularExpressionLiteral */: return globalRegExpType; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return checkArrayLiteral(node, checkMode, forceTuple); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return checkObjectLiteral(node, checkMode); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node, checkMode); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return checkQualifiedName(node, checkMode); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return checkIndexedAccess(node, checkMode); - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (node.expression.kind === 101 /* ImportKeyword */) { return checkImportCallExpression(node); } - case 214 /* NewExpression */: + case 216 /* NewExpression */: return checkCallExpression(node, checkMode); - case 220 /* EtsComponentExpression */: + case 222 /* EtsComponentExpression */: const newNode = node; if (newNode.body && newNode.body.statements.length) { traverseEtsComponentStatements(newNode.body.statements, checkMode); } return checkCallExpression(node, checkMode); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return checkParenthesizedExpression(node, checkMode); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return checkClassExpression(node); - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 222 /* TypeOfExpression */: + case 224 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: return checkAssertion(node); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return checkNonNullAssertion(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return checkExpressionWithTypeArguments(node); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return checkSatisfiesExpression(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return checkMetaProperty(node); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return checkDeleteExpression(node); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return checkVoidExpression(node); - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return checkAwaitExpression(node); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return checkBinaryExpression(node, checkMode); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return checkConditionalExpression(node, checkMode); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return checkSpreadExpression(node, checkMode); - case 233 /* OmittedExpression */: + case 235 /* OmittedExpression */: return undefinedWideningType; - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return checkYieldExpression(node); - case 238 /* SyntheticExpression */: + case 240 /* SyntheticExpression */: return checkSyntheticExpression(node); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return checkJsxExpression(node, checkMode); - case 287 /* JsxElement */: + case 290 /* JsxElement */: return checkJsxElement(node, checkMode); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node, checkMode); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return checkJsxFragment(node); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return checkJsxAttributes(node, checkMode); - case 289 /* JsxOpeningElement */: + case 292 /* JsxOpeningElement */: Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return errorType; @@ -73217,10 +73393,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkVariableLikeDeclaration(node); const func = getContainingFunction(node); if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { - if (!(func.kind === 176 /* Constructor */ && nodeIsPresent(func.body))) { + if (!(func.kind === 178 /* Constructor */ && nodeIsPresent(func.body))) { error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } - if (func.kind === 176 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { + if (func.kind === 178 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { error(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); } } @@ -73231,13 +73407,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (func.parameters.indexOf(node) !== 0) { error(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); } - if (func.kind === 176 /* Constructor */ || func.kind === 180 /* ConstructSignature */ || func.kind === 185 /* ConstructorType */) { + if (func.kind === 178 /* Constructor */ || func.kind === 182 /* ConstructSignature */ || func.kind === 187 /* ConstructorType */) { error(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); } - if (func.kind === 219 /* ArrowFunction */) { + if (func.kind === 221 /* ArrowFunction */) { error(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); } - if (func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) { + if (func.kind === 179 /* GetAccessor */ || func.kind === 180 /* SetAccessor */) { error(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); } } @@ -73292,13 +73468,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTypePredicateParent(node) { switch (node.parent.kind) { - case 219 /* ArrowFunction */: - case 179 /* CallSignature */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 184 /* FunctionType */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 221 /* ArrowFunction */: + case 181 /* CallSignature */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 186 /* FunctionType */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: const parent2 = node.parent; if (node === parent2.type) { return parent2; @@ -73318,7 +73494,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { predicateVariableName ); return true; - } else if (name.kind === 207 /* ArrayBindingPattern */ || name.kind === 206 /* ObjectBindingPattern */) { + } else if (name.kind === 209 /* ArrayBindingPattern */ || name.kind === 208 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( name, predicateVariableNode, @@ -73330,9 +73506,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkSignatureDeclaration(node) { - if (node.kind === 181 /* IndexSignature */) { + if (node.kind === 183 /* IndexSignature */) { checkGrammarIndexSignature(node); - } else if (node.kind === 184 /* FunctionType */ || node.kind === 263 /* FunctionDeclaration */ || node.kind === 185 /* ConstructorType */ || node.kind === 179 /* CallSignature */ || node.kind === 176 /* Constructor */ || node.kind === 180 /* ConstructSignature */) { + } else if (node.kind === 186 /* FunctionType */ || node.kind === 265 /* FunctionDeclaration */ || node.kind === 187 /* ConstructorType */ || node.kind === 181 /* CallSignature */ || node.kind === 178 /* Constructor */ || node.kind === 182 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } const functionFlags = getFunctionFlags(node); @@ -73359,10 +73535,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const returnTypeNode = getEffectiveReturnTypeNode(node); if (noImplicitAny && !returnTypeNode) { switch (node.kind) { - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: error(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 179 /* CallSignature */: + case 181 /* CallSignature */: error(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -73384,7 +73560,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkAsyncFunctionReturnType(node, returnTypeNode); } } - if (node.kind !== 181 /* IndexSignature */ && node.kind !== 326 /* JSDocFunctionType */) { + if (node.kind !== 183 /* IndexSignature */ && node.kind !== 329 /* JSDocFunctionType */) { registerForUnusedIdentifiersCheck(node); } } @@ -73394,7 +73570,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const staticNames = new Map2(); const privateIdentifiers = new Map2(); for (const member of node.members) { - if (member.kind === 176 /* Constructor */) { + if (member.kind === 178 /* Constructor */) { for (const param of member.parameters) { if (isParameterPropertyDeclaration(param, member) && !isBindingPattern(param.name)) { addName(instanceNames, param.name, param.name.escapedText, 3 /* GetOrSetAccessor */); @@ -73412,19 +73588,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const memberName = name && getPropertyNameForPropertyNameNode(name); if (memberName) { switch (member.kind) { - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: addName(names, name, memberName, 1 /* GetAccessor */ | privateStaticFlags); break; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: addName(names, name, memberName, 2 /* SetAccessor */ | privateStaticFlags); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: addName(names, name, memberName, 8 /* Method */ | privateStaticFlags); break; } @@ -73477,7 +73653,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkObjectTypeForDuplicateDeclarations(node) { const names = new Map2(); for (const member of node.members) { - if (member.kind === 170 /* PropertySignature */) { + if (member.kind === 171 /* PropertySignature */) { let memberName; const name = member.name; switch (name.kind) { @@ -73501,7 +73677,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 267 /* InterfaceDeclaration */) { + if (node.kind === 270 /* InterfaceDeclaration */) { const nodeSymbol = getSymbolOfNode(node); if (nodeSymbol.declarations && nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -73537,7 +73713,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (type.symbol.declarations) { for (const decl of type.symbol.declarations) { - if (decl.kind === 269 /* EnumDeclaration */) { + if (decl.kind === 272 /* EnumDeclaration */) { const members = decl.members; for (let i = 0; i < members.length; ++i) { if (i > 1 && typeof getConstantValue2(members[i - 1]) !== typeof getConstantValue2(members[i])) { @@ -73609,7 +73785,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function evaluateAnnotationPropertyConstantExpression(expr) { switch (expr.kind) { - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: const value = evaluateAnnotationPropertyConstantExpression(expr.operand); if (typeof value === "number" || typeof value === "string" || typeof value === "boolean") { switch (expr.operator) { @@ -73628,7 +73804,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const left = evaluateAnnotationPropertyConstantExpression(expr.left); const right = evaluateAnnotationPropertyConstantExpression(expr.right); if (left !== void 0 && right !== void 0 && typeof left === typeof right) { @@ -73697,7 +73873,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: const elements = expr.elements; const result = new Array(elements.length); for (let i = 0; i < elements.length; ++i) { @@ -73721,7 +73897,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 8 /* NumericLiteral */: checkGrammarNumericLiteral(expr); return +expr.text; - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return evaluateAnnotationPropertyConstantExpression(expr.expression); case 79 /* Identifier */: if (isInfinityOrNaNString(expr.escapedText)) { @@ -73735,7 +73911,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return evaluateAnnotationPropertyConstantExpression(symbol.valueDeclaration.initializer); } break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (isConstantMemberAccess(expr)) { return getConstantValue2(expr); } @@ -73754,7 +73930,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } checkVariableLikeDeclaration(node); setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 171 /* PropertyDeclaration */ && node.initializer) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) { error(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); } if (isAnnotationPropertyDeclaration(node)) { @@ -73845,7 +74021,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 176 /* 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)) { @@ -73893,7 +74069,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isPrivateIdentifierClassElementDeclaration(n)) { return true; } - return n.kind === 171 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; + return n.kind === 172 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; } function checkConstructorDeclarationDiagnostics() { const containingClassDecl = node.parent; @@ -73956,20 +74132,20 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 177 /* GetAccessor */) { + if (node.kind === 179 /* 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 === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { const symbol = getSymbolOfNode(node); - const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); + const getter = getDeclarationOfKind(symbol, 179 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 180 /* SetAccessor */); if (getter && setter && !(getNodeCheckFlags(getter) & 1 /* TypeChecked */)) { getNodeLinks(getter).flags |= 1 /* TypeChecked */; const getterFlags = getEffectiveModifierFlags(getter); @@ -73990,7 +74166,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } const returnType = getTypeOfAccessors(getSymbolOfNode(node)); - if (node.kind === 177 /* GetAccessor */) { + if (node.kind === 179 /* GetAccessor */) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -74045,7 +74221,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkTypeReferenceNode(node) { checkGrammarTypeArguments(node, node.typeArguments); - if (node.kind === 183 /* TypeReference */ && node.typeName.jsdocDotPos !== void 0 && !isInJSFile(node) && !isInJSDoc(node)) { + if (node.kind === 185 /* TypeReference */ && node.typeName.jsdocDotPos !== void 0 && !isInJSFile(node) && !isInJSDoc(node)) { grammarErrorAtPos(node, node.typeName.jsdocDotPos, 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); } forEach(node.typeArguments, checkSourceElement); @@ -74109,7 +74285,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let seenRestElement = false; const hasNamedElement = some(elementTypes, isNamedTupleMember); for (const e of elementTypes) { - if (e.kind !== 202 /* NamedTupleMember */ && hasNamedElement) { + if (e.kind !== 204 /* NamedTupleMember */ && hasNamedElement) { grammarErrorOnNode(e, Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names); break; } @@ -74154,7 +74330,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const objectType = type.objectType; const indexType = type.indexType; if (isTypeAssignableTo(indexType, getIndexType(objectType, false))) { - if (accessNode.kind === 212 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { + if (accessNode.kind === 214 /* 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; @@ -74215,7 +74391,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { forEachChild(node, checkSourceElement); } function checkInferType(node) { - if (!findAncestor(node, (n) => n.parent && n.parent.kind === 194 /* ConditionalType */ && n.parent.extendsType === n)) { + if (!findAncestor(node, (n) => n.parent && n.parent.kind === 196 /* ConditionalType */ && n.parent.extendsType === n)) { grammarErrorOnNode(node, Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type); } checkSourceElement(node.typeParameter); @@ -74225,7 +74401,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!links.typeParametersChecked) { links.typeParametersChecked = true; const typeParameter = getDeclaredTypeOfTypeParameter(symbol); - const declarations = getDeclarationsOfKind(symbol, 167 /* TypeParameter */); + const declarations = getDeclarationsOfKind(symbol, 168 /* TypeParameter */); if (!areTypeParametersIdentical(declarations, [typeParameter], (decl) => [decl])) { const name = symbolToString(symbol); for (const declaration of declarations) { @@ -74263,10 +74439,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.dotDotDotToken && node.questionToken) { grammarErrorOnNode(node, Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest); } - if (node.type.kind === 190 /* OptionalType */) { + if (node.type.kind === 192 /* 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 === 191 /* RestType */) { + if (node.type.kind === 193 /* 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); @@ -74277,7 +74453,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getEffectiveDeclarationFlags(n, flagsToCheck) { let flags = getCombinedModifierFlags(n); - if (n.parent.kind !== 267 /* InterfaceDeclaration */ && n.parent.kind !== 264 /* ClassDeclaration */ && n.parent.kind !== 232 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { + if (n.parent.kind !== 270 /* InterfaceDeclaration */ && n.parent.kind !== 266 /* ClassDeclaration */ && n.parent.kind !== 234 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { if (!(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { flags |= 1 /* Export */; } @@ -74350,7 +74526,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const errorNode2 = subsequentNode.name || subsequentNode; const subsequentName = subsequentNode.name; if (node.name && subsequentName && (isPrivateIdentifier(node.name) && isPrivateIdentifier(subsequentName) && node.name.escapedText === subsequentName.escapedText || isComputedPropertyName(node.name) && isComputedPropertyName(subsequentName) || isPropertyNameLiteral(node.name) && isPropertyNameLiteral(subsequentName) && getEscapedTextOfIdentifierOrLiteral(node.name) === getEscapedTextOfIdentifierOrLiteral(subsequentName))) { - const reportError = (node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); + const reportError = (node.kind === 176 /* MethodDeclaration */ || node.kind === 175 /* 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); @@ -74382,14 +74558,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { for (const current of declarations) { const node = current; const inAmbientContext = node.flags & 16777216 /* Ambient */; - const inAmbientContextOrInterface = node.parent && (node.parent.kind === 267 /* InterfaceDeclaration */ || node.parent.kind === 187 /* TypeLiteral */) || inAmbientContext; + const inAmbientContextOrInterface = node.parent && (node.parent.kind === 270 /* InterfaceDeclaration */ || node.parent.kind === 189 /* TypeLiteral */) || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = void 0; } - if ((node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */) && !inAmbientContext) { + if ((node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */) && !inAmbientContext) { hasNonAmbientClass = true; } - if (node.kind === 263 /* FunctionDeclaration */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 176 /* Constructor */) { + if (node.kind === 265 /* FunctionDeclaration */ || node.kind === 176 /* MethodDeclaration */ || node.kind === 175 /* MethodSignature */ || node.kind === 178 /* Constructor */) { functionDeclarations.push(node); const currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; @@ -74431,9 +74607,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }); } if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 /* Function */ && declarations) { - const relatedDiagnostics = filter(declarations, (d) => d.kind === 264 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); + const relatedDiagnostics = filter(declarations, (d) => d.kind === 266 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); forEach(declarations, (declaration) => { - const diagnostic = declaration.kind === 264 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 263 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; + const diagnostic = declaration.kind === 266 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 265 /* 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)), @@ -74512,43 +74688,43 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getDeclarationSpaces(decl) { let d = decl; switch (d.kind) { - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return 2 /* ExportType */; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return isAmbientModule(d) || getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4 /* ExportNamespace */ | 1 /* ExportValue */ : 4 /* ExportNamespace */; - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; - case 280 /* ExportAssignment */: - case 227 /* BinaryExpression */: + case 283 /* ExportAssignment */: + case 229 /* BinaryExpression */: const node2 = d; const expression = isExportAssignment(node2) ? node2.expression : node2.right; if (!isEntityNameExpression(expression)) { return 1 /* ExportValue */; } d = expression; - case 274 /* ImportEqualsDeclaration */: - case 277 /* NamespaceImport */: - case 276 /* ImportClause */: + case 277 /* ImportEqualsDeclaration */: + case 280 /* NamespaceImport */: + case 279 /* ImportClause */: let result = 0 /* None */; const target = resolveAlias(getSymbolOfNode(d)); forEach(target.declarations, (d2) => { result |= getDeclarationSpaces(d2); }); return result; - case 261 /* VariableDeclaration */: - case 208 /* BindingElement */: - case 263 /* FunctionDeclaration */: - case 279 /* ImportSpecifier */: + case 263 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 265 /* FunctionDeclaration */: + case 282 /* ImportSpecifier */: case 79 /* Identifier */: return 1 /* ExportValue */; default: @@ -74799,21 +74975,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let headMessage; let expectedReturnType; switch (node.parent.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; const classSymbol = getSymbolOfNode(node.parent); const classConstructorType = getTypeOfSymbol(classSymbol); expectedReturnType = getUnionType([classConstructorType, voidType]); break; - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: headMessage = Diagnostics.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any; expectedReturnType = voidType; break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; const methodType = getTypeOfNode(node.parent); const descriptorType = createTypedPropertyDescriptorType(methodType); @@ -74859,15 +75035,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getEntityNameForDecoratorMetadata(node) { if (node) { switch (node.kind) { - case 193 /* IntersectionType */: - case 192 /* UnionType */: + case 195 /* IntersectionType */: + case 194 /* UnionType */: return getEntityNameForDecoratorMetadataFromTypeList(node.types); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return getEntityNameForDecoratorMetadataFromTypeList([node.trueType, node.falseType]); - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: + case 198 /* ParenthesizedType */: + case 204 /* NamedTupleMember */: return getEntityNameForDecoratorMetadata(node.type); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return node.typeName; } } @@ -74875,13 +75051,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getEntityNameForDecoratorMetadataFromTypeList(types) { let commonEntityName; for (let typeNode of types) { - while (typeNode.kind === 196 /* ParenthesizedType */ || typeNode.kind === 202 /* NamedTupleMember */) { + while (typeNode.kind === 198 /* ParenthesizedType */ || typeNode.kind === 204 /* NamedTupleMember */) { typeNode = typeNode.type; } if (typeNode.kind === 145 /* NeverKeyword */) { continue; } - if (!strictNullChecks && (typeNode.kind === 201 /* LiteralType */ && typeNode.literal.kind === 105 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { + if (!strictNullChecks && (typeNode.kind === 203 /* LiteralType */ && typeNode.literal.kind === 105 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { continue; } const individualEntityName = getEntityNameForDecoratorMetadata(typeNode); @@ -74941,9 +75117,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } switch (annotatedDecl.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: const enclosingDecl = annotatedDecl.parent; Debug.assert(isClassDeclaration(enclosingDecl)); if (hasSyntacticModifier(enclosingDecl, 256 /* Abstract */)) { @@ -74974,10 +75150,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: ident = da.expression; break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: ident = da.expression; break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: ident = getIdentifierFromEntityNameExpression(da.expression.expression); break; default: @@ -75032,13 +75208,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */); - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { checkExternalEmitHelpers(firstDecorator, 32 /* Param */); } if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */); switch (node.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: const constructor = getFirstConstructorWithBody(node); if (constructor) { for (const parameter of constructor.parameters) { @@ -75046,22 +75222,22 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - const otherKind = node.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + const otherKind = node.kind === 179 /* GetAccessor */ ? 180 /* SetAccessor */ : 179 /* GetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfNode(node), otherKind); markDecoratorMedataDataTypeNodeAsReferenced(getAnnotatedAccessorTypeNode(node) || otherAccessor && getAnnotatedAccessorTypeNode(otherAccessor)); break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: for (const parameter of node.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(node)); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveTypeAnnotationNode(node)); break; - case 168 /* Parameter */: + case 169 /* Parameter */: markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); const containingSignature = node.parent; for (const parameter of containingSignature.parameters) { @@ -75159,7 +75335,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (node.kind) { case 79 /* Identifier */: return node; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return node.name; default: return void 0; @@ -75170,7 +75346,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkDecorators(node); checkSignatureDeclaration(node); const functionFlags = getFunctionFlags(node); - if (node.name && node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { @@ -75186,7 +75362,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkFunctionOrConstructorSymbol(symbol); } } - const body = node.kind === 173 /* MethodSignature */ ? void 0 : node.body; + const body = node.kind === 175 /* MethodSignature */ ? void 0 : node.body; checkSourceElement(body); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node)); addLazyDiagnostic(checkFunctionOrMethodDeclarationDiagnostics); @@ -75222,43 +75398,43 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) { for (const node of potentiallyUnusedIdentifiers) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: checkUnusedClassMembers(node, addDiagnostic); checkUnusedTypeParameters(node, addDiagnostic); break; - case 314 /* SourceFile */: - case 270 /* ModuleDeclaration */: - case 242 /* Block */: - case 272 /* CaseBlock */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 317 /* SourceFile */: + case 273 /* ModuleDeclaration */: + case 244 /* Block */: + case 275 /* CaseBlock */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: checkUnusedLocalsAndParameters(node, addDiagnostic); break; - case 176 /* Constructor */: - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* Constructor */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: if (node.body) { checkUnusedLocalsAndParameters(node, addDiagnostic); } checkUnusedTypeParameters(node, addDiagnostic); break; - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: checkUnusedTypeParameters(node, addDiagnostic); break; - case 195 /* InferType */: + case 197 /* InferType */: checkUnusedInferTypeParameter(node, addDiagnostic); break; default: @@ -75277,11 +75453,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkUnusedClassMembers(node, addDiagnostic) { for (const member of node.members) { switch (member.kind) { - case 174 /* MethodDeclaration */: - case 171 /* PropertyDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - if (member.kind === 178 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { + case 176 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + if (member.kind === 180 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { break; } const symbol = getSymbolOfNode(member); @@ -75289,16 +75465,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; - case 176 /* Constructor */: + case 178 /* 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 181 /* IndexSignature */: - case 241 /* SemicolonClassElement */: - case 175 /* ClassStaticBlockDeclaration */: + case 183 /* IndexSignature */: + case 243 /* SemicolonClassElement */: + case 177 /* ClassStaticBlockDeclaration */: break; default: Debug.fail("Unexpected class member"); @@ -75322,7 +75498,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue; const name = idText(typeParameter.name); const { parent: parent2 } = typeParameter; - if (parent2.kind !== 195 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { + if (parent2.kind !== 197 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { if (tryAddToSet(seenParentsWithEveryUnused, parent2)) { const sourceFile = getSourceFileOfNode(parent2); const range = isJSDocTemplateTag(parent2) ? rangeOfNode(parent2) : rangeOfTypeParameters(sourceFile, parent2.typeParameters); @@ -75402,7 +75578,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }); unusedImports.forEach(([importClause, unuseds]) => { const importDecl = importClause.parent; - const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 277 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); + const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 280 /* 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 { @@ -75413,7 +75589,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 261 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 262 /* VariableDeclarationList */) { + if (bindingElements.length === 1 && bindingPattern.parent.kind === 263 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 264 /* 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)); @@ -75426,7 +75602,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }); 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 === 244 /* 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 === 246 /* 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))); @@ -75455,21 +75631,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (name.kind) { case 79 /* Identifier */: return idText(name); - case 207 /* ArrayBindingPattern */: - case 206 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: return bindingNameText(cast(first(name.elements), isBindingElement).name); default: return Debug.assertNever(name); } } function isImportedDeclaration(node) { - return node.kind === 276 /* ImportClause */ || node.kind === 279 /* ImportSpecifier */ || node.kind === 277 /* NamespaceImport */; + return node.kind === 279 /* ImportClause */ || node.kind === 282 /* ImportSpecifier */ || node.kind === 280 /* NamespaceImport */; } function importClauseFromImported(decl) { - return decl.kind === 276 /* ImportClause */ ? decl : decl.kind === 277 /* NamespaceImport */ ? decl.parent : decl.parent.parent; + return decl.kind === 279 /* ImportClause */ ? decl : decl.kind === 280 /* NamespaceImport */ ? decl.parent : decl.parent.parent; } function checkBlock(node) { - if (node.kind === 242 /* Block */) { + if (node.kind === 244 /* Block */) { checkGrammarStatementInAmbientContext(node); } if (isFunctionOrModuleBlock(node)) { @@ -75497,7 +75673,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if ((identifier == null ? void 0 : identifier.escapedText) !== name) { return false; } - if (node.kind === 171 /* PropertyDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */ || node.kind === 305 /* PropertyAssignment */) { + if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 176 /* MethodDeclaration */ || node.kind === 175 /* MethodSignature */ || node.kind === 179 /* GetAccessor */ || node.kind === 180 /* SetAccessor */ || node.kind === 308 /* PropertyAssignment */) { return false; } if (node.flags & 16777216 /* Ambient */) { @@ -75553,7 +75729,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 314 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { + if (parent2.kind === 317 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { errorSkippedOn( "noEmit", name, @@ -75571,7 +75747,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 314 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 2048 /* HasAsyncFunctions */) { + if (parent2.kind === 317 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 2048 /* HasAsyncFunctions */) { errorSkippedOn( "noEmit", name, @@ -75653,7 +75829,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if ((getCombinedNodeFlags(node) & 3 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { return; } - if (node.kind === 261 /* VariableDeclaration */ && !node.initializer) { + if (node.kind === 263 /* VariableDeclaration */ && !node.initializer) { return; } const symbol = getSymbolOfNode(node); @@ -75663,9 +75839,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const localDeclarationSymbol = resolveName(node, node.name.escapedText, 3 /* Variable */, void 0, void 0, false); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3 /* BlockScoped */) { - const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 262 /* VariableDeclarationList */); - const container = varDeclList.parent.kind === 244 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; - const namesShareScope = container && (container.kind === 242 /* Block */ && isFunctionLike(container.parent) || container.kind === 271 /* ModuleBlock */ || container.kind === 270 /* ModuleDeclaration */ || container.kind === 314 /* SourceFile */); + const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 264 /* VariableDeclarationList */); + const container = varDeclList.parent.kind === 246 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; + const namesShareScope = container && (container.kind === 244 /* Block */ && isFunctionLike(container.parent) || container.kind === 274 /* ModuleBlock */ || container.kind === 273 /* ModuleDeclaration */ || container.kind === 317 /* 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); @@ -75686,7 +75862,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!node.name) { return; } - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (hasOnlyExpressionInitializer(node) && node.initializer) { checkExpressionCached(node.initializer); @@ -75700,7 +75876,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < 5 /* ES2018 */) { checkExternalEmitHelpers(node, 4 /* Rest */); } - if (node.propertyName && node.propertyName.kind === 166 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } const parent2 = node.parent.parent; @@ -75720,7 +75896,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } if (isBindingPattern(node.name)) { - if (node.name.kind === 207 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { + if (node.name.kind === 209 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512 /* Read */); } forEach(node.name.elements, checkSourceElement); @@ -75730,7 +75906,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } if (isBindingPattern(node.name)) { - const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 250 /* ForInStatement */; + const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 252 /* ForInStatement */; const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression)); if (needCheckInitializer || needCheckWidenedType) { const widenedType = getWidenedTypeForVariableLikeDeclaration(node); @@ -75753,7 +75929,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const symbol = getSymbolOfNode(node); - if (symbol.flags & 2097152 /* Alias */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.kind === 208 /* BindingElement */ ? node.parent.parent : node)) { + if (symbol.flags & 2097152 /* Alias */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.kind === 210 /* BindingElement */ ? node.parent.parent : node)) { checkAliasSymbol(node); return; } @@ -75762,7 +75938,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 250 /* ForInStatement */) { + if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 252 /* ForInStatement */) { checkTypeAssignableToAndOptionallyElaborate(checkExpressionCached(initializer), type, node, initializer, void 0); } } @@ -75783,9 +75959,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } } - if (node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 170 /* PropertySignature */ && node.kind !== 172 /* AnnotationPropertyDeclaration */) { + if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 173 /* AnnotationPropertyDeclaration */) { checkExportsOnMergedDeclarations(node); - if (node.kind === 261 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { + if (node.kind === 263 /* VariableDeclaration */ || node.kind === 210 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionsForDeclarationName(node, node.name); @@ -75793,7 +75969,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) { const nextDeclarationName = getNameOfDeclaration(nextDeclaration); - const message = nextDeclaration.kind === 171 /* PropertyDeclaration */ || nextDeclaration.kind === 170 /* 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 === 172 /* PropertyDeclaration */ || nextDeclaration.kind === 171 /* 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, @@ -75810,7 +75986,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function areDeclarationFlagsIdentical(left, right) { - if (left.kind === 168 /* Parameter */ && right.kind === 261 /* VariableDeclaration */ || left.kind === 261 /* VariableDeclaration */ && right.kind === 168 /* Parameter */) { + if (left.kind === 169 /* Parameter */ && right.kind === 263 /* VariableDeclaration */ || left.kind === 263 /* VariableDeclaration */ && right.kind === 169 /* Parameter */) { return true; } if (hasQuestionToken(left) !== hasQuestionToken(right)) { @@ -75846,7 +76022,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const type = checkTruthinessExpression(node.expression); checkTestingKnownTruthyCallableOrAwaitableType(node.expression, type, node.thenStatement); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 243 /* EmptyStatement */) { + if (node.thenStatement.kind === 245 /* EmptyStatement */) { error(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -75962,12 +76138,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 262 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 264 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 262 /* VariableDeclarationList */) { + if (node.initializer.kind === 264 /* VariableDeclarationList */) { forEach(node.initializer.declarations, checkVariableDeclaration); } else { checkExpression(node.initializer); @@ -75997,12 +76173,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(node, 256 /* ForOfIncludes */); } - if (node.initializer.kind === 262 /* VariableDeclarationList */) { + if (node.initializer.kind === 264 /* VariableDeclarationList */) { checkForInOrForOfVariableDeclaration(node); } else { const varExpr = node.initializer; const iteratedType = checkRightHandSideOfForOf(node); - if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { + if (varExpr.kind === 211 /* ArrayLiteralExpression */ || varExpr.kind === 212 /* ObjectLiteralExpression */) { checkDestructuringAssignment(varExpr, iteratedType || errorType); } else { const leftType = checkExpression(varExpr); @@ -76024,7 +76200,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); const rightType = getNonNullableTypeIfNeeded(checkExpression(node.expression)); - if (node.initializer.kind === 262 /* VariableDeclarationList */) { + if (node.initializer.kind === 264 /* 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); @@ -76033,7 +76209,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { const varExpr = node.initializer; const leftType = checkExpression(varExpr); - if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { + if (varExpr.kind === 211 /* ArrayLiteralExpression */ || varExpr.kind === 212 /* 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); @@ -76590,11 +76766,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const functionFlags = getFunctionFlags(container); if (strictNullChecks || node.expression || returnType.flags & 131072 /* Never */) { const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType; - if (container.kind === 178 /* SetAccessor */) { + if (container.kind === 180 /* SetAccessor */) { if (node.expression) { error(node, Diagnostics.Setters_cannot_return_a_value); } - } else if (container.kind === 176 /* Constructor */) { + } else if (container.kind === 178 /* 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); } @@ -76605,7 +76781,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression); } } - } else if (container.kind !== 176 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) { + } else if (container.kind !== 178 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) { error(node, Diagnostics.Not_all_code_paths_return_a_value); } } @@ -76630,7 +76806,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const expressionType = checkExpression(node.expression); const expressionIsLiteral = isLiteralType3(expressionType); forEach(node.caseBlock.clauses, (clause) => { - if (clause.kind === 299 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 302 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === void 0) { firstDefaultClause = clause; } else { @@ -76638,7 +76814,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { hasDuplicateDefaultClause = true; } } - if (clause.kind === 298 /* CaseClause */) { + if (clause.kind === 301 /* CaseClause */) { addLazyDiagnostic(createLazyCaseClauseDiagnostics(clause)); } forEach(clause.statements, checkSourceElement); @@ -76670,7 +76846,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isFunctionLike(current)) { return "quit"; } - if (current.kind === 257 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { + if (current.kind === 259 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { grammarErrorOnNode(node.label, Diagnostics.Duplicate_label_0, getTextOfNode(node.label)); return true; } @@ -76754,8 +76930,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const indexInfos = getApplicableIndexInfos(type, propNameType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 267 /* InterfaceDeclaration */) : void 0; - const propDeclaration = declaration && declaration.kind === 227 /* BinaryExpression */ || name && name.kind === 166 /* ComputedPropertyName */ ? declaration : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 270 /* InterfaceDeclaration */) : void 0; + const propDeclaration = declaration && declaration.kind === 229 /* BinaryExpression */ || name && name.kind === 167 /* ComputedPropertyName */ ? declaration : void 0; const localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : void 0; for (const info of indexInfos) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : void 0; @@ -76779,7 +76955,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkIndexConstraintForIndexSignature(type, checkInfo) { const declaration = checkInfo.declaration; const indexInfos = getApplicableIndexInfos(type, checkInfo.keyType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 267 /* InterfaceDeclaration */) : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 270 /* InterfaceDeclaration */) : void 0; const localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfNode(declaration)) === type.symbol ? declaration : void 0; for (const info of indexInfos) { if (info === checkInfo) @@ -76884,7 +77060,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkTypeParametersNotReferenced(root, typeParameters, index) { visit(root); function visit(node) { - if (node.kind === 183 /* TypeReference */) { + if (node.kind === 185 /* TypeReference */) { const type = getTypeFromTypeReference(node); if (type.flags & 262144 /* TypeParameter */) { for (let i = index; i < typeParameters.length; i++) { @@ -77311,7 +77487,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getCheckFlags(s) & 1 /* Instantiated */ ? s.target : s; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { - return filter(symbol.declarations, (d) => d.kind === 264 /* ClassDeclaration */ || d.kind === 267 /* InterfaceDeclaration */); + return filter(symbol.declarations, (d) => d.kind === 266 /* ClassDeclaration */ || d.kind === 270 /* InterfaceDeclaration */); } function checkKindsOfPropertyMemberOverrides(type, baseType) { var _a2, _b, _c, _d; @@ -77341,7 +77517,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue basePropertyCheck; } } - if (derivedClassDecl.kind === 232 /* ClassExpression */) { + if (derivedClassDecl.kind === 234 /* ClassExpression */) { error( derivedClassDecl, Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, @@ -77376,7 +77552,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 171 /* PropertyDeclaration */ && !d.initializer); + const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 172 /* 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; @@ -77479,7 +77655,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function isPropertyWithoutInitializer(node) { - return node.kind === 171 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; + return node.kind === 172 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; } function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) { for (const staticBlock of staticBlocks) { @@ -77513,7 +77689,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkExportsOnMergedDeclarations(node); const symbol = getSymbolOfNode(node); checkTypeParameterListsIdentical(symbol); - const firstInterfaceDecl = getDeclarationOfKind(symbol, 267 /* InterfaceDeclaration */); + const firstInterfaceDecl = getDeclarationOfKind(symbol, 270 /* InterfaceDeclaration */); if (node === firstInterfaceDecl) { const type = getDeclaredTypeOfSymbol(symbol); const typeWithThis = getTypeWithThisArgument(type); @@ -77612,7 +77788,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return value; function evaluate(expr) { switch (expr.kind) { - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: const value2 = evaluate(expr.operand); if (typeof value2 === "number") { switch (expr.operator) { @@ -77625,7 +77801,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const left = evaluate(expr.left); const right = evaluate(expr.right); if (typeof left === "number" && typeof right === "number") { @@ -77665,7 +77841,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 8 /* NumericLiteral */: checkGrammarNumericLiteral(expr); return +expr.text; - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return evaluate(expr.expression); case 79 /* Identifier */: const identifier = expr; @@ -77673,13 +77849,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return +identifier.escapedText; } return nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText); - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: if (isConstantMemberAccess(expr)) { const type = getTypeOfExpression(expr.expression); if (type.symbol && type.symbol.flags & 384 /* Enum */) { let name; - if (expr.kind === 211 /* PropertyAccessExpression */) { + if (expr.kind === 213 /* PropertyAccessExpression */) { name = expr.name.escapedText; } else { name = escapeLeadingUnderscores(cast(expr.argumentExpression, isLiteralExpression).text); @@ -77713,7 +77889,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (type === errorType) { return false; } - return node.kind === 79 /* Identifier */ || node.kind === 211 /* PropertyAccessExpression */ && isConstantMemberAccess(node.expression) || node.kind === 212 /* ElementAccessExpression */ && isConstantMemberAccess(node.expression) && isStringLiteralLike(node.argumentExpression); + return node.kind === 79 /* Identifier */ || node.kind === 213 /* PropertyAccessExpression */ && isConstantMemberAccess(node.expression) || node.kind === 214 /* ElementAccessExpression */ && isConstantMemberAccess(node.expression) && isStringLiteralLike(node.argumentExpression); } function checkEnumDeclaration(node) { addLazyDiagnostic(() => checkEnumDeclarationWorker(node)); @@ -77737,7 +77913,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let seenEnumMissingInitialInitializer = false; forEach(enumSymbol.declarations, (declaration) => { - if (declaration.kind !== 269 /* EnumDeclaration */) { + if (declaration.kind !== 272 /* EnumDeclaration */) { return false; } const enumDeclaration = declaration; @@ -77764,7 +77940,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const declarations = symbol.declarations; if (declarations) { for (const declaration of declarations) { - if ((declaration.kind === 264 /* ClassDeclaration */ || declaration.kind === 263 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { + if ((declaration.kind === 266 /* ClassDeclaration */ || declaration.kind === 265 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { return declaration; } } @@ -77820,7 +77996,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 264 /* ClassDeclaration */); + const mergedClass = getDeclarationOfKind(symbol, 266 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 32768 /* LexicalModuleMergesWithClass */; } @@ -77851,21 +78027,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: for (const decl of node.declarationList.declarations) { checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 280 /* ExportAssignment */: - case 281 /* ExportDeclaration */: + case 283 /* ExportAssignment */: + case 284 /* ExportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 274 /* ImportEqualsDeclaration */: - case 275 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 208 /* BindingElement */: - case 261 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 263 /* VariableDeclaration */: const name = node.name; if (isBindingPattern(name)) { for (const el of name.elements) { @@ -77873,12 +78049,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } break; } - case 264 /* ClassDeclaration */: - case 269 /* EnumDeclaration */: - case 263 /* FunctionDeclaration */: - case 267 /* InterfaceDeclaration */: - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 266 /* ClassDeclaration */: + case 272 /* EnumDeclaration */: + case 265 /* FunctionDeclaration */: + case 270 /* InterfaceDeclaration */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: if (isGlobalAugmentation) { return; } @@ -77889,12 +78065,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (node.kind) { case 79 /* Identifier */: return node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.left; } while (node.kind !== 79 /* Identifier */); return node; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: do { if (isModuleExportsAccessExpression(node.expression) && !isPrivateIdentifier(node.name)) { return node.name; @@ -77913,9 +78089,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(moduleName, Diagnostics.String_literal_expected); return false; } - const inAmbientExternalModule = node.parent.kind === 271 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - if (node.parent.kind !== 314 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 281 /* 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 === 274 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + if (node.parent.kind !== 317 /* SourceFile */ && !inAmbientExternalModule) { + error(moduleName, node.kind === 284 /* 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)) { @@ -77944,8 +78120,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 283 /* NamespaceExport */); - if (node.kind === 284 /* ExportSpecifier */) { + Debug.assert(node.kind !== 286 /* NamespaceExport */); + if (node.kind === 287 /* 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) { @@ -77959,7 +78135,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } else { - Debug.assert(node.kind !== 261 /* VariableDeclaration */); + Debug.assert(node.kind !== 263 /* 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); @@ -77975,7 +78151,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 284 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + const message = node.kind === 287 /* 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 (compilerOptions.isolatedModules && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 16777216 /* Ambient */)) { @@ -77983,25 +78159,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const isType3 = !(targetFlags & 111551 /* Value */); if (isType3 || typeOnlyAlias) { switch (node.kind) { - case 276 /* ImportClause */: - case 279 /* ImportSpecifier */: - case 274 /* ImportEqualsDeclaration */: { + case 279 /* ImportClause */: + case 282 /* ImportSpecifier */: + case 277 /* ImportEqualsDeclaration */: { if (compilerOptions.preserveValueImports) { Debug.assertIsDefined(node.name, "An ImportClause with a symbol should have a name"); const message = isType3 ? Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_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 === 279 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); + const name = idText(node.kind === 282 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); addTypeOnlyDeclarationRelatedInfo( error(node, message, name), isType3 ? void 0 : typeOnlyAlias, name ); } - if (isType3 && node.kind === 274 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { + if (isType3 && node.kind === 277 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { error(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided); } break; } - case 284 /* ExportSpecifier */: { + case 287 /* ExportSpecifier */: { if (getSourceFileOfNode(typeOnlyAlias) !== getSourceFileOfNode(node)) { const message = isType3 ? Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isolatedModules_is_enabled; const name = idText(node.propertyName || node.name); @@ -78070,7 +78246,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkImportBinding(node) { checkCollisionsForDeclarationName(node, node.name); checkAliasSymbol(node); - if (node.kind === 279 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (node.kind === 282 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { checkExternalEmitHelpers(node, 131072 /* ImportDefault */); } } @@ -78117,7 +78293,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 277 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 280 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); if (moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && getESModuleInterop(compilerOptions)) { checkExternalEmitHelpers(node, 65536 /* ImportStar */); @@ -78143,7 +78319,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (hasSyntacticModifier(node, 1 /* Export */)) { markExportAsReferenced(node); } - if (node.moduleReference.kind !== 286 /* ExternalModuleReference */) { + if (node.moduleReference.kind !== 289 /* ExternalModuleReference */) { const target = resolveAlias(getSymbolOfNode(node)); if (target !== unknownSymbol) { const targetFlags = getAllSymbolFlags(target); @@ -78181,9 +78357,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause && !isNamespaceExport(node.exportClause)) { forEach(node.exportClause.elements, checkExportSpecifier); - const inAmbientExternalModule = node.parent.kind === 271 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 271 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; - if (node.parent.kind !== 314 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + const inAmbientExternalModule = node.parent.kind === 274 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 274 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; + if (node.parent.kind !== 317 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { error(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } else { @@ -78209,7 +78385,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkGrammarExportDeclaration(node) { var _a2; if (node.isTypeOnly) { - if (((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 282 /* NamedExports */) { + if (((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 285 /* NamedExports */) { return checkGrammarNamedImportsOrExports(node.exportClause); } else { return grammarErrorOnNode(node, Diagnostics.Only_named_exports_may_use_export_type); @@ -78218,7 +78394,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function checkGrammarModuleElementContext(node, errorMessage) { - const isInAppropriateContext = node.parent.kind === 314 /* SourceFile */ || node.parent.kind === 271 /* ModuleBlock */ || node.parent.kind === 270 /* ModuleDeclaration */; + const isInAppropriateContext = node.parent.kind === 317 /* SourceFile */ || node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 273 /* ModuleDeclaration */; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -78291,7 +78467,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: ident = node.expression; break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: ident = node.expression; break; default: @@ -78316,8 +78492,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (checkGrammarModuleElementContext(node, illegalContextMessage)) { return; } - const container = node.parent.kind === 314 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 270 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 317 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 273 /* ModuleDeclaration */ && !isAmbientModule(container)) { if (node.isExportEquals) { error(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } else { @@ -78429,186 +78605,188 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const kind = node.kind; if (cancellationToken) { switch (kind) { - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } - if (kind >= 244 /* FirstStatement */ && kind <= 260 /* LastStatement */ && node.flowNode && !isReachableFlowNode(node.flowNode)) { + if (kind >= 246 /* FirstStatement */ && kind <= 262 /* LastStatement */ && node.flowNode && !isReachableFlowNode(node.flowNode)) { errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected); } switch (kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return checkTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return checkParameter(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return checkPropertyDeclaration(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return checkPropertySignature(node); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return checkPropertyDeclaration(node); - case 185 /* ConstructorType */: - case 184 /* FunctionType */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: + case 187 /* ConstructorType */: + case 186 /* FunctionType */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: return checkSignatureDeclaration(node); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return checkMethodDeclaration(node); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return checkClassStaticBlockDeclaration(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return checkConstructorDeclaration(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return checkAccessorDeclaration(node); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return checkTypeReferenceNode(node); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return checkTypePredicate(node); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return checkTypeQuery(node); - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: return checkTypeLiteral(node); - case 188 /* ArrayType */: + case 190 /* ArrayType */: return checkArrayType(node); - case 189 /* TupleType */: + case 191 /* TupleType */: return checkTupleType(node); - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 196 /* ParenthesizedType */: - case 190 /* OptionalType */: - case 191 /* RestType */: + case 198 /* ParenthesizedType */: + case 192 /* OptionalType */: + case 193 /* RestType */: return checkSourceElement(node.type); - case 197 /* ThisType */: + case 199 /* ThisType */: return checkThisType(node); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return checkTypeOperator(node); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return checkConditionalType(node); - case 195 /* InferType */: + case 197 /* InferType */: return checkInferType(node); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: return checkTemplateLiteralType(node); - case 205 /* ImportType */: + case 207 /* ImportType */: return checkImportType(node); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return checkNamedTupleMember(node); - case 337 /* JSDocAugmentsTag */: + case 340 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 338 /* JSDocImplementsTag */: + case 341 /* JSDocImplementsTag */: return checkJSDocImplementsTag(node); - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 333 /* JSDocLink */: - case 334 /* JSDocLinkCode */: - case 335 /* JSDocLinkPlain */: + case 336 /* JSDocLink */: + case 337 /* JSDocLinkCode */: + case 338 /* JSDocLinkPlain */: return checkJSDocLinkLikeTag(node); - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: return checkJSDocParameterTag(node); - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: return checkJSDocPropertyTag(node); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: checkJSDocFunctionType(node); - case 324 /* JSDocNonNullableType */: - case 323 /* JSDocNullableType */: - case 321 /* JSDocAllType */: - case 322 /* JSDocUnknownType */: - case 331 /* JSDocTypeLiteral */: + case 327 /* JSDocNonNullableType */: + case 326 /* JSDocNullableType */: + case 324 /* JSDocAllType */: + case 325 /* JSDocUnknownType */: + case 334 /* JSDocTypeLiteral */: checkJSDocTypeIsInJsFile(node); forEachChild(node, checkSourceElement); return; - case 327 /* JSDocVariadicType */: + case 330 /* JSDocVariadicType */: checkJSDocVariadicType(node); return; - case 318 /* JSDocTypeExpression */: + case 321 /* JSDocTypeExpression */: return checkSourceElement(node.type); - case 342 /* JSDocPublicTag */: - case 344 /* JSDocProtectedTag */: - case 343 /* JSDocPrivateTag */: + case 345 /* JSDocPublicTag */: + case 347 /* JSDocProtectedTag */: + case 346 /* JSDocPrivateTag */: return checkJSDocAccessibilityModifiers(node); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return checkIndexedAccessType(node); - case 200 /* MappedType */: + case 202 /* MappedType */: return checkMappedType(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 242 /* Block */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 274 /* ModuleBlock */: return checkBlock(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return checkVariableStatement(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return checkExpressionStatement(node); - case 246 /* IfStatement */: + case 248 /* IfStatement */: return checkIfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return checkDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return checkWhileStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return checkForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return checkForInStatement(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return checkForOfStatement(node); - case 252 /* ContinueStatement */: - case 253 /* BreakStatement */: + case 254 /* ContinueStatement */: + case 255 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return checkReturnStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return checkWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return checkSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return checkLabeledStatement(node); - case 258 /* ThrowStatement */: + case 260 /* ThrowStatement */: return checkThrowStatement(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return checkTryStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return checkBindingElement(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return checkClassDeclaration(node); - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return checkStructDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return checkAnnotationDeclaration(node); - case 267 /* InterfaceDeclaration */: + case 269 /* OverloadDeclaration */: + return; + case 270 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return checkImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return checkExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return checkExportAssignment(node); - case 243 /* EmptyStatement */: - case 260 /* DebuggerStatement */: + case 245 /* EmptyStatement */: + case 262 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 285 /* MissingDeclaration */: + case 288 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -78695,33 +78873,33 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { currentNode = node; instantiationCount = 0; switch (node.kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 169 /* Decorator */: - case 289 /* JsxOpeningElement */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 217 /* TaggedTemplateExpression */: + case 170 /* Decorator */: + case 292 /* JsxOpeningElement */: resolveUntypedCall(node); break; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: checkAccessorDeclaration(node); break; - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: checkClassExpressionDeferred(node); break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: checkTypeParameterDeferred(node); break; - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: checkJsxSelfClosingElementDeferred(node); break; - case 287 /* JsxElement */: + case 290 /* JsxElement */: checkJsxElementDeferred(node); break; } @@ -78885,27 +79063,27 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { copySymbols(location.locals, meaning); } switch (location.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (!isExternalModule(location)) break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: copyLocallyVisibleExportSymbols(getSymbolOfNode(location).exports, meaning & 2623475 /* ModuleMember */); break; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 8 /* EnumMember */); break; - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: const className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: if (!isStaticSymbol) { copySymbols(getMembersOfSymbol(getSymbolOfNode(location)), meaning & 788968 /* Type */); } break; - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: const funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -78938,7 +79116,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function copyLocallyVisibleExportSymbols(source, meaning2) { if (meaning2) { source.forEach((symbol) => { - if (!getDeclarationOfKind(symbol, 284 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 283 /* NamespaceExport */)) { + if (!getDeclarationOfKind(symbol, 287 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 286 /* NamespaceExport */)) { copySymbol(symbol, meaning2); } }); @@ -78949,16 +79127,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return name.kind === 79 /* Identifier */ && isTypeDeclaration(name.parent) && getNameOfDeclaration(name.parent) === name; } function isTypeReferenceIdentifier(node) { - while (node.parent.kind === 165 /* QualifiedName */) { + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 183 /* TypeReference */; + return node.parent.kind === 185 /* TypeReference */; } function isHeritageClauseElementIdentifier(node) { - while (node.parent.kind === 211 /* PropertyAccessExpression */) { + while (node.parent.kind === 213 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent.kind === 234 /* ExpressionWithTypeArguments */; + return node.parent.kind === 236 /* ExpressionWithTypeArguments */; } function forEachEnclosingClass(node, callback) { let result; @@ -78985,13 +79163,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return !!forEachEnclosingClass(node, (n) => n === classDeclaration); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 165 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 166 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 274 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 277 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } - if (nodeOnRightSide.parent.kind === 280 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 283 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } return void 0; @@ -79017,7 +79195,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { node = parent2; parent2 = parent2.parent; } - if (parent2 && parent2.kind === 205 /* ImportType */ && parent2.qualifier === node) { + if (parent2 && parent2.kind === 207 /* ImportType */ && parent2.qualifier === node) { return parent2; } return void 0; @@ -79026,7 +79204,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isDeclarationName(name)) { return getSymbolOfNode(name.parent); } - if (isInJSFile(name) && name.parent.kind === 211 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { + if (isInJSFile(name) && name.parent.kind === 213 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { if (!isPrivateIdentifier(name) && !isJSDocMemberName(name)) { const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(name); if (specialPropertyAssignmentSymbol) { @@ -79034,7 +79212,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - if (name.parent.kind === 280 /* ExportAssignment */ && isEntityNameExpression(name)) { + if (name.parent.kind === 283 /* ExportAssignment */ && isEntityNameExpression(name)) { const success = resolveEntityName( name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, @@ -79044,7 +79222,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return success; } } else if (isEntityName(name) && isInRightSideOfImportOrExportAssignment(name)) { - const importEqualsDeclaration = getAncestor(name, 274 /* ImportEqualsDeclaration */); + const importEqualsDeclaration = getAncestor(name, 277 /* ImportEqualsDeclaration */); Debug.assert(importEqualsDeclaration !== void 0); return getSymbolOfPartOfRightHandSideOfImportEquals(name, true); } @@ -79061,7 +79239,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (isHeritageClauseElementIdentifier(name)) { let meaning = 0 /* None */; - if (name.parent.kind === 234 /* ExpressionWithTypeArguments */) { + if (name.parent.kind === 236 /* ExpressionWithTypeArguments */) { meaning = 788968 /* Type */; if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) { meaning |= 111551 /* Value */; @@ -79075,10 +79253,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return entityNameSymbol; } } - if (name.parent.kind === 349 /* JSDocParameterTag */) { + if (name.parent.kind === 352 /* JSDocParameterTag */) { return getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 167 /* TypeParameter */ && name.parent.parent.kind === 353 /* JSDocTemplateTag */) { + if (name.parent.kind === 168 /* TypeParameter */ && name.parent.parent.kind === 356 /* JSDocTemplateTag */) { Debug.assert(!isInJSFile(name)); const typeParameter = getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -79110,12 +79288,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return result; } else if (isPrivateIdentifier(name)) { return getSymbolForPrivateIdentifierExpression(name); - } else if (name.kind === 211 /* PropertyAccessExpression */ || name.kind === 165 /* QualifiedName */) { + } else if (name.kind === 213 /* PropertyAccessExpression */ || name.kind === 166 /* QualifiedName */) { const links = getNodeLinks(name); if (links.resolvedSymbol) { return links.resolvedSymbol; } - if (name.kind === 211 /* PropertyAccessExpression */) { + if (name.kind === 213 /* PropertyAccessExpression */) { checkPropertyAccessExpression(name, 0 /* Normal */); if (!links.resolvedSymbol) { const expressionType = checkExpressionCached(name.expression); @@ -79155,11 +79333,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return resolveJSDocMemberName(name); } } else if (isTypeReferenceIdentifier(name)) { - const meaning = name.parent.kind === 183 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; + const meaning = name.parent.kind === 185 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; const symbol = resolveEntityName(name, meaning, true, true); return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name); } - if (name.parent.kind === 182 /* TypePredicate */) { + if (name.parent.kind === 184 /* TypePredicate */) { return resolveEntityName(name, 1 /* FunctionScopedVariable */, true); } return void 0; @@ -79184,7 +79362,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getSymbolAtLocation(node, ignoreErrors) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { return isExternalModule(node) ? getMergedSymbol(node.symbol) : void 0; } const { parent: parent2 } = node; @@ -79201,7 +79379,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.kind === 79 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); - } else if (parent2.kind === 208 /* BindingElement */ && grandParent.kind === 206 /* ObjectBindingPattern */ && node === parent2.propertyName) { + } else if (parent2.kind === 210 /* BindingElement */ && grandParent.kind === 208 /* ObjectBindingPattern */ && node === parent2.propertyName) { const typeOfPattern = getTypeOfNode(grandParent); const propertyDeclaration = getPropertyOfType(typeOfPattern, node.escapedText); if (propertyDeclaration) { @@ -79220,8 +79398,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (node.kind) { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 211 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: if (!isThisInTypeQuery(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); } @@ -79236,19 +79414,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isInExpressionContext(node)) { return checkExpression(node).symbol; } - case 197 /* ThisType */: + case 199 /* ThisType */: return getTypeFromThisTypeNode(node).symbol; case 107 /* SuperKeyword */: return checkExpression(node).symbol; case 136 /* ConstructorKeyword */: const constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 176 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 178 /* 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 === 275 /* ImportDeclaration */ || node.parent.kind === 281 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && isRequireCall(node.parent, false) || isImportCall(node.parent)) || isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent) { + if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 278 /* ImportDeclaration */ || node.parent.kind === 284 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && isRequireCall(node.parent, false) || isImportCall(node.parent)) || isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent) { return resolveExternalModuleName(node, node, ignoreErrors); } if (isCallExpression(parent2) && isBindableObjectDefinePropertyCall(parent2) && parent2.arguments[1] === node) { @@ -79262,14 +79440,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 38 /* EqualsGreaterThanToken */: case 84 /* ClassKeyword */: return getSymbolOfNode(node.parent); - case 205 /* ImportType */: + case 207 /* ImportType */: return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : void 0; case 94 /* ExportKeyword */: return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0; case 101 /* ImportKeyword */: case 104 /* NewKeyword */: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return checkExpression(node).symbol; default: return void 0; @@ -79285,7 +79463,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return void 0; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 306 /* ShorthandPropertyAssignment */) { + if (location && location.kind === 309 /* ShorthandPropertyAssignment */) { return resolveEntityName(location.name, 111551 /* Value */ | 2097152 /* Alias */, true); } return void 0; @@ -79370,16 +79548,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getTypeOfNode(node); } function getTypeOfAssignmentPattern(expr) { - Debug.assert(expr.kind === 210 /* ObjectLiteralExpression */ || expr.kind === 209 /* ArrayLiteralExpression */); - if (expr.parent.kind === 251 /* ForOfStatement */) { + Debug.assert(expr.kind === 212 /* ObjectLiteralExpression */ || expr.kind === 211 /* ArrayLiteralExpression */); + if (expr.parent.kind === 253 /* ForOfStatement */) { const iteratedType = checkRightHandSideOfForOf(expr.parent); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 227 /* BinaryExpression */) { + if (expr.parent.kind === 229 /* BinaryExpression */) { const iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 305 /* PropertyAssignment */) { + if (expr.parent.kind === 308 /* PropertyAssignment */) { const node2 = cast(expr.parent.parent, isObjectLiteralExpression); const typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node2) || errorType; const propertyIndex = indexOfNode(node2.properties, expr.parent); @@ -79412,7 +79590,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 8 /* NumericLiteral */: case 10 /* StringLiteral */: return getStringLiteralType(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: const nameType = checkComputedPropertyName(name); return isTypeAssignableToKind(nameType, 12288 /* ESSymbolLike */) ? nameType : stringType; default: @@ -79503,7 +79681,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 314 /* SourceFile */) { + if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 317 /* SourceFile */) { const symbolFile = parentSymbol.valueDeclaration; const referenceFile = getSourceFileOfNode(node); const symbolIsUmdExport = symbolFile !== referenceFile; @@ -79528,7 +79706,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return void 0; } function isSymbolOfDestructuredElementOfCatchBinding(symbol) { - return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 301 /* CatchClause */; + return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 304 /* CatchClause */; } function isSymbolOfDeclarationWithCollidingName(symbol) { if (symbol.flags & 418 /* BlockScoped */ && symbol.valueDeclaration && !isSourceFile(symbol.valueDeclaration)) { @@ -79542,7 +79720,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else if (nodeLinks2.flags & 262144 /* CapturedBlockScopedBinding */) { const isDeclaredInLoop = nodeLinks2.flags & 524288 /* BlockScopedBindingInLoop */; const inLoopInitializer = isIterationStatement(container, false); - const inLoopBodyBlock = container.kind === 242 /* Block */ && isIterationStatement(container.parent, false); + const inLoopBodyBlock = container.kind === 244 /* Block */ && isIterationStatement(container.parent, false); links.isDeclarationWithCollidingName = !isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || !inLoopInitializer && !inLoopBodyBlock); } else { links.isDeclarationWithCollidingName = false; @@ -79577,25 +79755,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isValueAliasDeclaration(node) { switch (node.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return isAliasResolvedToValue(getSymbolOfNode(node)); - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: const symbol = getSymbolOfNode(node); return !!symbol && isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: const exportClause = node.exportClause; return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration)); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return node.expression && node.expression.kind === 79 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfNode(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(nodeIn) { const node = getParseTreeNode(nodeIn, isImportEqualsDeclaration); - if (node === void 0 || node.parent.kind !== 314 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { + if (node === void 0 || node.parent.kind !== 317 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { return false; } const isValue = isAliasResolvedToValue(getSymbolOfNode(node)); @@ -79684,15 +79862,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function canHaveConstantValue(node) { switch (node.kind) { - case 308 /* EnumMember */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 311 /* EnumMember */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return true; } return false; } function getConstantValue2(node) { - if (node.kind === 308 /* EnumMember */) { + if (node.kind === 311 /* EnumMember */) { return getEnumMemberValue(node); } const symbol = getNodeLinks(node).resolvedSymbol; @@ -79890,7 +80068,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: ident = node.expression; break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: ident = node.expression; break; default: @@ -79997,12 +80175,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { getJsxFragmentFactoryEntity, getAllAccessorDeclarations(accessor) { accessor = getParseTreeNode(accessor, isGetOrSetAccessorDeclaration); - const otherKind = accessor.kind === 178 /* SetAccessor */ ? 177 /* GetAccessor */ : 178 /* SetAccessor */; + const otherKind = accessor.kind === 180 /* SetAccessor */ ? 179 /* GetAccessor */ : 180 /* SetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfNode(accessor), otherKind); const firstAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? otherAccessor : accessor; const secondAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? accessor : otherAccessor; - const setAccessor = accessor.kind === 178 /* SetAccessor */ ? accessor : otherAccessor; - const getAccessor = accessor.kind === 177 /* GetAccessor */ ? accessor : otherAccessor; + const setAccessor = accessor.kind === 180 /* SetAccessor */ ? accessor : otherAccessor; + const getAccessor = accessor.kind === 179 /* GetAccessor */ ? accessor : otherAccessor; return { firstAccessor, secondAccessor, @@ -80018,7 +80196,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }, getDeclarationStatementsForSourceFile: (node, flags, tracker, bundled) => { const n = getParseTreeNode(node); - Debug.assert(n && n.kind === 314 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); + Debug.assert(n && n.kind === 317 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); const sym = getSymbolOfNode(node); if (!sym) { return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled); @@ -80130,18 +80308,18 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function isInHeritageClause(node) { - return node.parent && node.parent.kind === 234 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 300 /* HeritageClause */; + return node.parent && node.parent.kind === 236 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 303 /* HeritageClause */; } function getTypeReferenceDirectivesForEntityName(node) { if (!fileToDirective) { return void 0; } let meaning; - if (node.parent.kind === 166 /* ComputedPropertyName */) { + if (node.parent.kind === 167 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } else { meaning = 788968 /* Type */ | 1920 /* Namespace */; - if (node.kind === 79 /* Identifier */ && isInTypeQuery(node) || node.kind === 211 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { + if (node.kind === 79 /* Identifier */ && isInTypeQuery(node) || node.kind === 213 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } } @@ -80179,7 +80357,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 314 /* SourceFile */ && current.flags & 512 /* ValueModule */) { + if (current.valueDeclaration && current.valueDeclaration.kind === 317 /* SourceFile */ && current.flags & 512 /* ValueModule */) { return false; } for (const decl of symbol.declarations) { @@ -80204,12 +80382,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getExternalModuleFileFromDeclaration(declaration) { - const specifier = declaration.kind === 270 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); + const specifier = declaration.kind === 273 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); const moduleSymbol = resolveExternalModuleNameWorker(specifier, specifier, void 0); if (!moduleSymbol) { return void 0; } - return getDeclarationOfKind(moduleSymbol, 314 /* SourceFile */); + return getDeclarationOfKind(moduleSymbol, 317 /* SourceFile */); } function initializeTypeChecker() { for (const file of host.getSourceFiles()) { @@ -80438,7 +80616,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; } if (!nodeCanBeDecorated(node, node.parent, node.parent.parent, compilerOptions)) { - const isMethodDeclarationAndNodeIsNotPresent = node.kind === 174 /* MethodDeclaration */ && !nodeIsPresent(node.body); + const isMethodDeclarationAndNodeIsNotPresent = node.kind === 176 /* MethodDeclaration */ && !nodeIsPresent(node.body); const message = isMethodDeclarationAndNodeIsNotPresent ? Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload : Diagnostics.Decorators_are_not_valid_here; for (const decorator of decorators) { if (!grammarErrorOnNode(decorator, message)) { @@ -80446,7 +80624,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } return true; - } else if (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */) { + } else if (node.kind === 179 /* GetAccessor */ || node.kind === 180 /* 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); @@ -80466,21 +80644,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue; } if (modifier.kind !== 147 /* ReadonlyKeyword */) { - if (node.kind === 170 /* PropertySignature */ || node.kind === 173 /* MethodSignature */) { + if (node.kind === 171 /* PropertySignature */ || node.kind === 175 /* MethodSignature */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_member, tokenToString(modifier.kind)); } - if (node.kind === 181 /* IndexSignature */ && (modifier.kind !== 125 /* StaticKeyword */ || !isClassLike(node.parent))) { + if (node.kind === 183 /* 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 !== 102 /* InKeyword */ && modifier.kind !== 146 /* OutKeyword */) { - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_parameter, tokenToString(modifier.kind)); } } switch (modifier.kind) { case 86 /* ConstKeyword */: - if (node.kind !== 269 /* EnumDeclaration */) { + if (node.kind !== 272 /* EnumDeclaration */) { return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(86 /* ConstKeyword */)); } break; @@ -80515,7 +80693,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 271 /* ModuleBlock */ || node.parent.kind === 314 /* SourceFile */) { + } else if (node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 317 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 256 /* Abstract */) { if (modifier.kind === 122 /* PrivateKeyword */) { @@ -80537,9 +80715,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 271 /* ModuleBlock */ || node.parent.kind === 314 /* SourceFile */) { + } else if (node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 317 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* 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"); @@ -80556,7 +80734,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 171 /* PropertyDeclaration */) { + } else if (node.kind !== 172 /* PropertyDeclaration */) { return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); } flags |= 128 /* Accessor */; @@ -80564,7 +80742,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 147 /* ReadonlyKeyword */: if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); - } else if (node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 170 /* PropertySignature */ && node.kind !== 181 /* IndexSignature */ && node.kind !== 168 /* Parameter */) { + } else if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 183 /* IndexSignature */ && node.kind !== 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } flags |= 64 /* Readonly */; @@ -80580,14 +80758,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 1 /* Export */; break; case 89 /* DefaultKeyword */: - const container = node.parent.kind === 314 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 270 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 317 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 273 /* 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"); @@ -80603,9 +80781,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); - } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 271 /* ModuleBlock */) { + } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 274 /* 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"); @@ -80617,11 +80795,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 264 /* ClassDeclaration */ && node.kind !== 185 /* ConstructorType */) { - if (node.kind !== 174 /* MethodDeclaration */ && node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 177 /* GetAccessor */ && node.kind !== 178 /* SetAccessor */) { + if (node.kind !== 266 /* ClassDeclaration */ && node.kind !== 187 /* ConstructorType */) { + if (node.kind !== 176 /* MethodDeclaration */ && node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 179 /* GetAccessor */ && node.kind !== 180 /* SetAccessor */) { return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 264 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { + if (!(node.parent.kind === 266 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { return grammarErrorOnNode(modifier, Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 32 /* Static */) { @@ -80650,7 +80828,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } if (flags & 256 /* Abstract */) { @@ -80663,7 +80841,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 146 /* OutKeyword */: const inOutFlag = modifier.kind === 102 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; const inOutText = modifier.kind === 102 /* InKeyword */ ? "in" : "out"; - if (node.kind !== 167 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { + if (node.kind !== 168 /* 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) { @@ -80676,7 +80854,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { break; } } - if (node.kind === 176 /* Constructor */) { + if (node.kind === 178 /* Constructor */) { if (flags & 32 /* Static */) { return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -80687,11 +80865,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } return false; - } else if ((node.kind === 275 /* ImportDeclaration */ || node.kind === 274 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + } else if ((node.kind === 278 /* ImportDeclaration */ || node.kind === 277 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 168 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { + } else if (node.kind === 169 /* 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 === 168 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { + } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 512 /* Async */) { @@ -80704,49 +80882,51 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function shouldReportBadModifier(node) { switch (node.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 270 /* ModuleDeclaration */: - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 168 /* Parameter */: - case 167 /* TypeParameter */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 178 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* OverloadPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 183 /* IndexSignature */: + case 273 /* ModuleDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 169 /* Parameter */: + case 168 /* TypeParameter */: return false; - case 175 /* ClassStaticBlockDeclaration */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 273 /* NamespaceExportDeclaration */: - case 184 /* FunctionType */: - case 285 /* MissingDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 276 /* NamespaceExportDeclaration */: + case 186 /* FunctionType */: + case 288 /* MissingDeclaration */: return true; default: - if (node.parent.kind === 271 /* ModuleBlock */ || node.parent.kind === 314 /* SourceFile */) { + if (node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 317 /* SourceFile */) { return false; } switch (node.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return nodeHasAnyModifiersExcept(node, 133 /* AsyncKeyword */); - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 185 /* ConstructorType */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 187 /* ConstructorType */: return nodeHasAnyModifiersExcept(node, 127 /* AbstractKeyword */); - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 244 /* VariableStatement */: - case 268 /* TypeAliasDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 246 /* VariableStatement */: + case 271 /* TypeAliasDeclaration */: return true; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return nodeHasAnyModifiersExcept(node, 86 /* ConstKeyword */); default: Debug.assertNever(node); @@ -80764,10 +80944,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return false; } return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -80980,11 +81160,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 166 /* ComputedPropertyName */) { + if (node.kind !== 167 /* ComputedPropertyName */) { return false; } const computedPropertyName = node; - if (computedPropertyName.expression.kind === 227 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 27 /* CommaToken */) { + if (computedPropertyName.expression.kind === 229 /* 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; @@ -80992,7 +81172,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkGrammarForGenerator(node) { if (node.asteriskToken) { Debug.assert( - node.kind === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */ || node.kind === 174 /* MethodDeclaration */ + node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */ || node.kind === 176 /* MethodDeclaration */ ); if (node.flags & 16777216 /* Ambient */) { return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_allowed_in_an_ambient_context); @@ -81011,7 +81191,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkGrammarObjectLiteralExpression(node, inDestructuring) { const seen = new Map2(); for (const prop of node.properties) { - if (prop.kind === 307 /* SpreadAssignment */) { + if (prop.kind === 310 /* SpreadAssignment */) { if (inDestructuring) { const expression = skipParentheses(prop.expression); if (isArrayLiteralExpression(expression) || isObjectLiteralExpression(expression)) { @@ -81021,10 +81201,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue; } const name = prop.name; - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { checkGrammarComputedPropertyName(name); } - if (prop.kind === 306 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 309 /* 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 */) { @@ -81032,7 +81212,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (canHaveModifiers(prop) && prop.modifiers) { for (const mod of prop.modifiers) { - if (isModifier(mod) && (mod.kind !== 133 /* AsyncKeyword */ || prop.kind !== 174 /* MethodDeclaration */)) { + if (isModifier(mod) && (mod.kind !== 133 /* AsyncKeyword */ || prop.kind !== 176 /* MethodDeclaration */)) { grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod)); } } @@ -81043,8 +81223,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let currentKind; switch (prop.kind) { - case 306 /* ShorthandPropertyAssignment */: - case 305 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 308 /* 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 */) { @@ -81052,13 +81232,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } currentKind = 4 /* PropertyAssignment */; break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: currentKind = 8 /* Method */; break; - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: currentKind = 1 /* GetAccessor */; break; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: currentKind = 2 /* SetAccessor */; break; default: @@ -81095,7 +81275,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkGrammarTypeArguments(node, node.typeArguments); const seen = new Map2(); for (const attr of node.attributes.properties) { - if (attr.kind === 296 /* JsxSpreadAttribute */) { + if (attr.kind === 299 /* JsxSpreadAttribute */) { continue; } const { name, initializer } = attr; @@ -81104,7 +81284,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { return grammarErrorOnNode(name, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } - if (initializer && initializer.kind === 297 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 300 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(initializer, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -81139,7 +81319,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 251 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { + if (forInOrOfStatement.kind === 253 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { if (!(forInOrOfStatement.flags & 32768 /* AwaitContext */)) { const sourceFile = getSourceFileOfNode(forInOrOfStatement); if (isInTopLevelContext(forInOrOfStatement)) { @@ -81179,7 +81359,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 176 /* Constructor */) { + if (func && func.kind !== 178 /* 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); @@ -81195,7 +81375,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { grammarErrorOnNode(forInOrOfStatement.initializer, Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async); return false; } - if (forInOrOfStatement.initializer.kind === 262 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 264 /* VariableDeclarationList */) { const variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { const declarations = variableList.declarations; @@ -81203,16 +81383,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } if (declarations.length > 1) { - const diagnostic = forInOrOfStatement.kind === 250 /* 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 === 252 /* 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 === 250 /* 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 === 252 /* 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 === 250 /* 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 === 252 /* 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); } } @@ -81220,7 +81400,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function checkGrammarAccessor(accessor) { - if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 187 /* TypeLiteral */ && accessor.parent.kind !== 267 /* InterfaceDeclaration */) { + if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 189 /* TypeLiteral */ && accessor.parent.kind !== 270 /* InterfaceDeclaration */) { if (languageVersion < 1 /* ES5 */) { return grammarErrorOnNode(accessor.name, Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); } @@ -81235,7 +81415,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (hasSyntacticModifier(accessor, 256 /* Abstract */)) { return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } - if (accessor.parent.kind === 187 /* TypeLiteral */ || accessor.parent.kind === 267 /* InterfaceDeclaration */) { + if (accessor.parent.kind === 189 /* TypeLiteral */ || accessor.parent.kind === 270 /* InterfaceDeclaration */) { return grammarErrorOnNode(accessor.body, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } } @@ -81245,10 +81425,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!doesAccessorHaveCorrectParameterCount(accessor)) { return grammarErrorOnNode( accessor.name, - accessor.kind === 177 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter + accessor.kind === 179 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter ); } - if (accessor.kind === 178 /* SetAccessor */) { + if (accessor.kind === 180 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -81266,10 +81446,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 179 /* GetAccessor */ ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 179 /* GetAccessor */ ? 1 : 2)) { return getThisParameter(accessor); } } @@ -81286,7 +81466,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } switch (parent2.kind) { - case 261 /* VariableDeclaration */: + case 263 /* 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); @@ -81298,12 +81478,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return grammarErrorOnNode(parent2.name, Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const); } break; - case 171 /* PropertyDeclaration */: + case 172 /* 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 170 /* PropertySignature */: + case 171 /* 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); } @@ -81312,7 +81492,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_not_allowed_here); } } else if (node.operator === 147 /* ReadonlyKeyword */) { - if (node.type.kind !== 188 /* ArrayType */ && node.type.kind !== 189 /* TupleType */) { + if (node.type.kind !== 190 /* ArrayType */ && node.type.kind !== 191 /* TupleType */) { return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(154 /* SymbolKeyword */)); } } @@ -81326,8 +81506,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (checkGrammarFunctionLikeDeclaration(node)) { return true; } - if (node.kind === 174 /* MethodDeclaration */) { - if (node.parent.kind === 210 /* ObjectLiteralExpression */) { + if (node.kind === 176 /* MethodDeclaration */) { + if (node.parent.kind === 212 /* 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)) { @@ -81348,12 +81528,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } 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 === 174 /* MethodDeclaration */ && !node.body) { + } else if (node.kind === 176 /* 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 === 267 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 270 /* 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 === 187 /* TypeLiteral */) { + } else if (node.parent.kind === 189 /* 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); } } @@ -81364,17 +81544,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: if (node.label && current.label.escapedText === node.label.escapedText) { - const isMisplacedContinueLabel = node.kind === 252 /* ContinueStatement */ && !isIterationStatement(current.statement, true); + const isMisplacedContinueLabel = node.kind === 254 /* ContinueStatement */ && !isIterationStatement(current.statement, true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); } return false; } break; - case 256 /* SwitchStatement */: - if (node.kind === 253 /* BreakStatement */ && !node.label) { + case 258 /* SwitchStatement */: + if (node.kind === 255 /* BreakStatement */ && !node.label) { return false; } break; @@ -81387,10 +81567,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { current = current.parent; } if (node.label) { - const message = node.kind === 253 /* 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 === 255 /* 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 === 253 /* 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 === 255 /* 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); } } @@ -81410,10 +81590,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function isStringOrNumberLiteralExpression(expr) { - return isStringOrNumericLiteralLike(expr) || expr.kind === 225 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; + return isStringOrNumericLiteralLike(expr) || expr.kind === 227 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; } function isBigIntLiteralExpression(expr) { - return expr.kind === 9 /* BigIntLiteral */ || expr.kind === 225 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 9 /* BigIntLiteral */; + return expr.kind === 9 /* BigIntLiteral */ || expr.kind === 227 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 9 /* BigIntLiteral */; } function isSimpleLiteralEnumReference(expr) { if ((isPropertyAccessExpression(expr) || isElementAccessExpression(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) { @@ -81435,7 +81615,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 250 /* ForInStatement */ && node.parent.parent.kind !== 251 /* ForOfStatement */) { + if (node.parent.parent.kind !== 252 /* ForInStatement */ && node.parent.parent.kind !== 253 /* ForOfStatement */) { if (node.flags & 16777216 /* Ambient */) { checkAmbientInitializer(node); } else if (!node.initializer) { @@ -81447,7 +81627,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - if (node.exclamationToken && (node.parent.parent.kind !== 244 /* VariableStatement */ || !node.type || node.initializer || node.flags & 16777216 /* Ambient */)) { + if (node.exclamationToken && (node.parent.parent.kind !== 246 /* 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); } @@ -81499,15 +81679,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function allowLetAndConstDeclarations(parent2) { switch (parent2.kind) { - case 246 /* IfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 255 /* WithStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 248 /* IfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 257 /* WithStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: return false; - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return allowLetAndConstDeclarations(parent2.parent); } return true; @@ -81609,7 +81789,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) { return true; } - } else if (node.parent.kind === 267 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 270 /* 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; } @@ -81635,14 +81815,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 267 /* InterfaceDeclaration */ || node.kind === 268 /* TypeAliasDeclaration */ || node.kind === 275 /* ImportDeclaration */ || node.kind === 274 /* ImportEqualsDeclaration */ || node.kind === 281 /* ExportDeclaration */ || node.kind === 280 /* ExportAssignment */ || node.kind === 273 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { + if (node.kind === 270 /* InterfaceDeclaration */ || node.kind === 271 /* TypeAliasDeclaration */ || node.kind === 278 /* ImportDeclaration */ || node.kind === 277 /* ImportEqualsDeclaration */ || node.kind === 284 /* ExportDeclaration */ || node.kind === 283 /* ExportAssignment */ || node.kind === 276 /* 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 === 244 /* VariableStatement */) { + if (isDeclaration(decl) || decl.kind === 246 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -81659,7 +81839,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 242 /* Block */ || node.parent.kind === 271 /* ModuleBlock */ || node.parent.kind === 314 /* SourceFile */) { + if (node.parent.kind === 244 /* Block */ || node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 317 /* SourceFile */) { const links2 = getNodeLinks(node.parent); if (!links2.hasReportedStatementInAmbientContext) { return links2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -81674,9 +81854,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 201 /* LiteralType */)) { + } else if (isChildOfNodeWithKind(node, 203 /* LiteralType */)) { diagnosticMessage = Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0; - } else if (isChildOfNodeWithKind(node, 308 /* EnumMember */)) { + } else if (isChildOfNodeWithKind(node, 311 /* EnumMember */)) { diagnosticMessage = Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0; } if (diagnosticMessage) { @@ -81736,7 +81916,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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) === 278 /* NamedImports */) { + if (node.isTypeOnly && ((_a2 = node.namedBindings) == null ? void 0 : _a2.kind) === 281 /* NamedImports */) { return checkGrammarNamedImportsOrExports(node.namedBindings); } return false; @@ -81746,7 +81926,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (specifier.isTypeOnly) { return grammarErrorOnFirstToken( specifier, - specifier.kind === 279 /* 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 === 282 /* 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 ); } }); @@ -81855,12 +82035,12 @@ function isNotAccessor(declaration) { return !isAccessor(declaration); } function isNotOverload(declaration) { - return declaration.kind !== 263 /* FunctionDeclaration */ && declaration.kind !== 174 /* MethodDeclaration */ || !!declaration.body; + return declaration.kind !== 265 /* FunctionDeclaration */ && declaration.kind !== 176 /* MethodDeclaration */ || !!declaration.body; } function isDeclarationNameOrImportPropertyName(name) { switch (name.parent.kind) { - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return isIdentifier(name); default: return isDeclarationName(name); @@ -82138,20 +82318,20 @@ var visitEachChildTable = { nodesVisitor(node.typeArguments, visitor, isTypeNodeOrTypeParameterDeclaration) ); }, - [165 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [166 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateQualifiedName( node, nodeVisitor(node.left, visitor, isEntityName), nodeVisitor(node.right, visitor, isIdentifier) ); }, - [166 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [167 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateComputedPropertyName( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [167 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [168 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82160,7 +82340,7 @@ var visitEachChildTable = { nodeVisitor(node.default, visitor, isTypeNode) ); }, - [168 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [169 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -82171,14 +82351,14 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [169 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [170 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDecorator( node, nodeVisitor(node.expression, visitor, isExpression), node.annotationDeclaration ); }, - [170 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [171 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertySignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82187,7 +82367,16 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [171 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [174 /* OverloadPropertyDeclaration */]: function visitEachChildOfOverloadPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + return context.factory.updateOverloadPropertyDeclaration( + node, + nodesVisitor(node.modifiers, visitor, isModifier), + nodeVisitor(node.name, visitor, isPropertyName), + nodeVisitor(node.questionToken, tokenVisitor, isToken), + nodeVisitor(node.type, visitor, isTypeNode) + ); + }, + [172 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { var _a2; return context.factory.updatePropertyDeclaration( node, @@ -82198,7 +82387,7 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [172 /* AnnotationPropertyDeclaration */]: function visitEachChildOfAnnotationPropertyDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [173 /* AnnotationPropertyDeclaration */]: function visitEachChildOfAnnotationPropertyDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAnnotationPropertyDeclaration( node, nodeVisitor(node.name, visitor, isPropertyName), @@ -82206,7 +82395,7 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [173 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [175 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82217,7 +82406,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [174 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [176 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -82230,7 +82419,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [176 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [178 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82238,7 +82427,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [177 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [179 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { if (context.isLexicalEnvironmentSuspended && context.isLexicalEnvironmentSuspended()) { return context.factory.updateGetAccessorDeclaration( node, @@ -82259,7 +82448,7 @@ var visitEachChildTable = { ); } }, - [178 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [180 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { if (context.isLexicalEnvironmentSuspended && context.isLexicalEnvironmentSuspended()) { return context.factory.updateSetAccessorDeclaration( node, @@ -82278,7 +82467,7 @@ var visitEachChildTable = { ); } }, - [175 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [177 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { context.startLexicalEnvironment(); context.suspendLexicalEnvironment(); return context.factory.updateClassStaticBlockDeclaration( @@ -82286,7 +82475,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [179 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [181 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCallSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -82294,7 +82483,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [180 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [182 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -82302,7 +82491,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [181 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [183 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82310,7 +82499,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [182 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [184 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypePredicateNode( node, nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), @@ -82318,14 +82507,14 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [183 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [185 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeReferenceNode( node, nodeVisitor(node.typeName, visitor, isEntityName), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [184 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [186 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateFunctionTypeNode( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -82333,7 +82522,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [185 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [187 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorTypeNode( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82342,56 +82531,56 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [186 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [188 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeQueryNode( node, nodeVisitor(node.exprName, visitor, isEntityName), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [187 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [189 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTypeLiteralNode( node, nodesVisitor(node.members, visitor, isTypeElement) ); }, - [188 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [190 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateArrayTypeNode( node, nodeVisitor(node.elementType, visitor, isTypeNode) ); }, - [189 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [191 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTupleTypeNode( node, nodesVisitor(node.elements, visitor, isTypeNode) ); }, - [190 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [192 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateOptionalTypeNode( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [191 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [193 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateRestTypeNode( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [192 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [194 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateUnionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [193 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [195 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateIntersectionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [194 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [196 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConditionalTypeNode( node, nodeVisitor(node.checkType, visitor, isTypeNode), @@ -82400,13 +82589,13 @@ var visitEachChildTable = { nodeVisitor(node.falseType, visitor, isTypeNode) ); }, - [195 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [197 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInferTypeNode( node, nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration) ); }, - [205 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [207 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeNode( node, nodeVisitor(node.argument, visitor, isTypeNode), @@ -82416,14 +82605,14 @@ var visitEachChildTable = { node.isTypeOf ); }, - [304 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [307 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeAssertionContainer( node, nodeVisitor(node.assertClause, visitor, isAssertClause), node.multiLine ); }, - [202 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [204 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateNamedTupleMember( node, nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken), @@ -82432,26 +82621,26 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [196 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [198 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedType( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [198 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [200 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOperatorNode( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [199 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [201 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexedAccessTypeNode( node, nodeVisitor(node.objectType, visitor, isTypeNode), nodeVisitor(node.indexType, visitor, isTypeNode) ); }, - [200 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [202 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMappedTypeNode( node, nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken), @@ -82462,39 +82651,39 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [201 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [203 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLiteralTypeNode( node, nodeVisitor(node.literal, visitor, isExpression) ); }, - [203 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [205 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralType( node, nodeVisitor(node.head, visitor, isTemplateHead), nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) ); }, - [204 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [206 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralTypeSpan( node, nodeVisitor(node.type, visitor, isTypeNode), nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail) ); }, - [206 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [208 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectBindingPattern( node, nodesVisitor(node.elements, visitor, isBindingElement) ); }, - [207 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [209 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayBindingPattern( node, nodesVisitor(node.elements, visitor, isArrayBindingElement) ); }, - [208 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [210 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBindingElement( node, nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken), @@ -82503,19 +82692,19 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [209 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [211 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayLiteralExpression( node, nodesVisitor(node.elements, visitor, isExpression) ); }, - [210 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [212 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectLiteralExpression( node, nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) ); }, - [211 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [213 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82527,7 +82716,7 @@ var visitEachChildTable = { nodeVisitor(node.name, visitor, isMemberName) ); }, - [212 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [214 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isElementAccessChain(node) ? context.factory.updateElementAccessChain( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82539,7 +82728,7 @@ var visitEachChildTable = { nodeVisitor(node.argumentExpression, visitor, isExpression) ); }, - [213 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [215 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return isCallChain(node) ? context.factory.updateCallChain( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82553,7 +82742,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [220 /* EtsComponentExpression */]: function visitEachChildOfEtsComponentExpression(node, visitor, context, nodesVisitor, nodeVisitor) { + [222 /* EtsComponentExpression */]: function visitEachChildOfEtsComponentExpression(node, visitor, context, nodesVisitor, nodeVisitor) { return context.factory.updateEtsComponentExpression( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82561,7 +82750,7 @@ var visitEachChildTable = { nodeVisitor(node.body, visitor, isBlock) ); }, - [214 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [216 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNewExpression( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82569,7 +82758,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [215 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [217 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTaggedTemplateExpression( node, nodeVisitor(node.tag, visitor, isExpression), @@ -82577,20 +82766,20 @@ var visitEachChildTable = { nodeVisitor(node.template, visitor, isTemplateLiteral) ); }, - [216 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [218 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAssertion( node, nodeVisitor(node.type, visitor, isTypeNode), nodeVisitor(node.expression, visitor, isExpression) ); }, - [217 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [219 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [218 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [220 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionExpression( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82602,7 +82791,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [219 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [221 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateArrowFunction( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82613,43 +82802,43 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [221 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [223 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDeleteExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [222 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [224 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOfExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [223 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [225 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVoidExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [224 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [226 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAwaitExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [225 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [227 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePrefixUnaryExpression( node, nodeVisitor(node.operand, visitor, isExpression) ); }, - [226 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [228 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePostfixUnaryExpression( node, nodeVisitor(node.operand, visitor, isExpression) ); }, - [227 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [229 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBinaryExpression( node, nodeVisitor(node.left, visitor, isExpression), @@ -82657,7 +82846,7 @@ var visitEachChildTable = { nodeVisitor(node.right, visitor, isExpression) ); }, - [228 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [230 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateConditionalExpression( node, nodeVisitor(node.condition, visitor, isExpression), @@ -82667,27 +82856,27 @@ var visitEachChildTable = { nodeVisitor(node.whenFalse, visitor, isExpression) ); }, - [229 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [231 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateExpression( node, nodeVisitor(node.head, visitor, isTemplateHead), nodesVisitor(node.templateSpans, visitor, isTemplateSpan) ); }, - [230 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [232 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateYieldExpression( node, nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken), nodeVisitor(node.expression, visitor, isExpression) ); }, - [231 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [233 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadElement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [232 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [234 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -82697,28 +82886,28 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [234 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [236 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionWithTypeArguments( node, nodeVisitor(node.expression, visitor, isExpression), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [235 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [237 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAsExpression( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.type, visitor, isTypeNode) ); }, - [239 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [241 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSatisfiesExpression( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.type, visitor, isTypeNode) ); }, - [236 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [238 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return isOptionalChain(node) ? context.factory.updateNonNullChain( node, nodeVisitor(node.expression, visitor, isExpression) @@ -82727,39 +82916,39 @@ var visitEachChildTable = { nodeVisitor(node.expression, visitor, isExpression) ); }, - [237 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [239 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [240 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [242 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateSpan( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail) ); }, - [242 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [244 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [244 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [246 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVariableStatement( node, nodesVisitor(node.modifiers, visitor, isModifier), nodeVisitor(node.declarationList, visitor, isVariableDeclarationList) ); }, - [245 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [247 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [246 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [248 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIfStatement( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82767,21 +82956,21 @@ var visitEachChildTable = { nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) ); }, - [247 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [249 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDoStatement( node, visitIterationBody(node.statement, visitor, context, nodeVisitor), nodeVisitor(node.expression, visitor, isExpression) ); }, - [248 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [250 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWhileStatement( node, nodeVisitor(node.expression, visitor, isExpression), visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [249 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [251 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -82790,7 +82979,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [250 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [252 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForInStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -82798,7 +82987,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [251 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [253 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateForOfStatement( node, nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword), @@ -82807,52 +82996,52 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [252 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [254 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [253 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [255 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [254 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [256 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateReturnStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [255 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [257 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWithStatement( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock) ); }, - [256 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [258 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSwitchStatement( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.caseBlock, visitor, isCaseBlock) ); }, - [257 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [259 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, nodeVisitor(node.label, visitor, isIdentifier), nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock) ); }, - [258 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [260 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateThrowStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [259 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [261 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, nodeVisitor(node.tryBlock, visitor, isBlock), @@ -82860,7 +83049,7 @@ var visitEachChildTable = { nodeVisitor(node.finallyBlock, visitor, isBlock) ); }, - [261 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [263 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateVariableDeclaration( node, nodeVisitor(node.name, visitor, isBindingName), @@ -82869,13 +83058,13 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [262 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [264 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateVariableDeclarationList( node, nodesVisitor(node.declarations, visitor, isVariableDeclaration) ); }, - [263 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [265 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82887,7 +83076,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [264 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [266 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -82897,7 +83086,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [265 /* StructDeclaration */]: function visitEachChildOfStructDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [267 /* StructDeclaration */]: function visitEachChildOfStructDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateStructDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82907,7 +83096,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [266 /* AnnotationDeclaration */]: function visitEachChildOfAnnotationDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [268 /* AnnotationDeclaration */]: function visitEachChildOfAnnotationDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAnnotationDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82915,7 +83104,15 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isAnnotationElement) ); }, - [267 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [269 /* OverloadDeclaration */]: function visitEachChildOfOverloadDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + return context.factory.updateOverloadDeclaration( + node, + nodesVisitor(node.modifiers, visitor, isModifier), + nodeVisitor(node.name, visitor, isIdentifier), + nodesVisitor(node.members, visitor, isOverloadElement) + ); + }, + [270 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82925,7 +83122,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [268 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [271 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82934,7 +83131,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [269 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [272 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82942,7 +83139,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isEnumMember) ); }, - [270 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [273 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateModuleDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82950,25 +83147,25 @@ var visitEachChildTable = { nodeVisitor(node.body, visitor, isModuleBody) ); }, - [271 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [274 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateModuleBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [272 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [275 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCaseBlock( node, nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) ); }, - [273 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [276 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [274 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [277 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportEqualsDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82977,7 +83174,7 @@ var visitEachChildTable = { nodeVisitor(node.moduleReference, visitor, isModuleReference) ); }, - [275 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [278 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82986,21 +83183,21 @@ var visitEachChildTable = { nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [302 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [305 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateAssertClause( node, nodesVisitor(node.elements, visitor, isAssertEntry), node.multiLine ); }, - [303 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [306 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAssertEntry( node, nodeVisitor(node.name, visitor, isAssertionKey), nodeVisitor(node.value, visitor, isExpression) ); }, - [276 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [279 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, node.isTypeOnly, @@ -83008,25 +83205,25 @@ var visitEachChildTable = { nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, - [277 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [280 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [283 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [286 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [278 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [281 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedImports( node, nodesVisitor(node.elements, visitor, isImportSpecifier) ); }, - [279 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [282 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportSpecifier( node, node.isTypeOnly, @@ -83034,14 +83231,14 @@ var visitEachChildTable = { nodeVisitor(node.name, visitor, isIdentifier) ); }, - [280 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [283 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportAssignment( node, nodesVisitor(node.modifiers, visitor, isModifier), nodeVisitor(node.expression, visitor, isExpression) ); }, - [281 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [284 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83051,13 +83248,13 @@ var visitEachChildTable = { nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [282 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [285 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedExports( node, nodesVisitor(node.elements, visitor, isExportSpecifier) ); }, - [284 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [287 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportSpecifier( node, node.isTypeOnly, @@ -83065,13 +83262,13 @@ var visitEachChildTable = { nodeVisitor(node.name, visitor, isIdentifier) ); }, - [286 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [289 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExternalModuleReference( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [287 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [290 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxElement( node, nodeVisitor(node.openingElement, visitor, isJsxOpeningElement), @@ -83079,7 +83276,7 @@ var visitEachChildTable = { nodeVisitor(node.closingElement, visitor, isJsxClosingElement) ); }, - [288 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [291 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSelfClosingElement( node, nodeVisitor(node.tagName, visitor, isJsxTagNameExpression), @@ -83087,7 +83284,7 @@ var visitEachChildTable = { nodeVisitor(node.attributes, visitor, isJsxAttributes) ); }, - [289 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [292 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxOpeningElement( node, nodeVisitor(node.tagName, visitor, isJsxTagNameExpression), @@ -83095,13 +83292,13 @@ var visitEachChildTable = { nodeVisitor(node.attributes, visitor, isJsxAttributes) ); }, - [290 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [293 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxClosingElement( node, nodeVisitor(node.tagName, visitor, isJsxTagNameExpression) ); }, - [291 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [294 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxFragment( node, nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment), @@ -83109,97 +83306,97 @@ var visitEachChildTable = { nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment) ); }, - [294 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [297 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttribute( node, nodeVisitor(node.name, visitor, isIdentifier), nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) ); }, - [295 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [298 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttributes( node, nodesVisitor(node.properties, visitor, isJsxAttributeLike) ); }, - [296 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [299 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSpreadAttribute( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [297 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [300 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [298 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [301 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCaseClause( node, nodeVisitor(node.expression, visitor, isExpression), nodesVisitor(node.statements, visitor, isStatement) ); }, - [299 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [302 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateDefaultClause( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [300 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [303 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateHeritageClause( node, nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) ); }, - [301 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [304 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), nodeVisitor(node.block, visitor, isBlock) ); }, - [305 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [308 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePropertyAssignment( node, nodeVisitor(node.name, visitor, isPropertyName), nodeVisitor(node.initializer, visitor, isExpression) ); }, - [306 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [309 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, nodeVisitor(node.name, visitor, isIdentifier), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, - [307 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [310 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadAssignment( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [308 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [311 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumMember( node, nodeVisitor(node.name, visitor, isPropertyName), nodeVisitor(node.initializer, visitor, isExpression) ); }, - [314 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { + [317 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile( node, visitLexicalEnvironment(node.statements, visitor, context) ); }, - [359 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [362 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePartiallyEmittedExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [360 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [363 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCommaListExpression( node, nodesVisitor(node.elements, visitor, isExpression) @@ -83773,7 +83970,7 @@ function isNamedDefaultReference(e) { function chainBundle(context, transformSourceFile) { return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - return node.kind === 314 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 317 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -83816,7 +84013,7 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption let hasImportDefault = false; for (const node of sourceFile.statements) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: externalImports.push(node); if (!hasImportStar && getImportNeedsImportStarHelper(node)) { hasImportStar = true; @@ -83825,12 +84022,12 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption hasImportDefault = true; } break; - case 274 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 286 /* ExternalModuleReference */) { + case 277 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 289 /* ExternalModuleReference */) { externalImports.push(node); } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { externalImports.push(node); @@ -83853,19 +84050,19 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption addExportedNamesForExportDeclaration(node); } break; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { exportEquals = node; } break; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: if (hasSyntacticModifier(node, 1 /* Export */)) { for (const decl of node.declarationList.declarations) { exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames); } } break; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -83882,7 +84079,7 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption } } break; - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -84026,7 +84223,7 @@ function isStaticPropertyDeclaration(member) { return isPropertyDeclaration(member) && hasStaticModifier(member); } function isInitializedProperty(member) { - return member.kind === 171 /* PropertyDeclaration */ && member.initializer !== void 0; + return member.kind === 172 /* PropertyDeclaration */ && member.initializer !== void 0; } function isNonStaticMethodOrAccessorWithPrivateName(member) { return !isStatic(member) && (isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member)) && isPrivateIdentifier(member.name); @@ -84063,12 +84260,12 @@ function getAllDecoratorsOfClass(node) { } function getAllDecoratorsOfClassElement(member, parent2) { switch (member.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return getAllDecoratorsOfAccessors(member, parent2); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return getAllDecoratorsOfMethod(member); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return getAllDecoratorsOfProperty(member); default: return void 0; @@ -84540,8 +84737,8 @@ function transformTypeScript(context) { const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); + context.enableSubstitution(213 /* PropertyAccessExpression */); + context.enableSubstitution(214 /* ElementAccessExpression */); let currentSourceFile; let currentNamespace; let currentNamespaceContainerName; @@ -84552,14 +84749,14 @@ function transformTypeScript(context) { let applicableSubstitutions; return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - if (node.kind === 315 /* Bundle */) { + if (node.kind === 318 /* Bundle */) { return transformBundle(node); } return transformSourceFile(node); } function transformBundle(node) { return factory2.createBundle(node.sourceFiles.map(transformSourceFile), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 317 /* InputFiles */) { + if (prepend.kind === 320 /* InputFiles */) { return createUnparsedSourceFile(prepend, "js"); } return prepend; @@ -84590,22 +84787,22 @@ function transformTypeScript(context) { } function onBeforeVisitNode(node) { switch (node.kind) { - case 314 /* SourceFile */: - case 272 /* CaseBlock */: - case 271 /* ModuleBlock */: - case 242 /* Block */: + case 317 /* SourceFile */: + case 275 /* CaseBlock */: + case 274 /* ModuleBlock */: + case 244 /* Block */: currentLexicalScope = node; currentScopeFirstDeclarationsOfName = void 0; break; - case 264 /* ClassDeclaration */: - case 263 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 265 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 2 /* Ambient */)) { break; } if (node.name) { recordEmittedDeclarationInScope(node); } else { - Debug.assert(node.kind === 264 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); + Debug.assert(node.kind === 266 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); } break; } @@ -84624,10 +84821,10 @@ function transformTypeScript(context) { } function sourceElementVisitorWorker(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 280 /* ExportAssignment */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 283 /* ExportAssignment */: + case 284 /* ExportDeclaration */: return visitElidableStatement(node); default: return visitorWorker(node); @@ -84645,13 +84842,13 @@ function transformTypeScript(context) { return node; } switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return visitImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return visitExportAssignment(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return visitExportDeclaration(node); default: Debug.fail("Unhandled ellided statement"); @@ -84661,7 +84858,7 @@ function transformTypeScript(context) { return saveStateAndInvoke(node, namespaceElementVisitorWorker); } function namespaceElementVisitorWorker(node) { - if (node.kind === 281 /* ExportDeclaration */ || node.kind === 275 /* ImportDeclaration */ || node.kind === 276 /* ImportClause */ || node.kind === 274 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 286 /* ExternalModuleReference */) { + if (node.kind === 284 /* ExportDeclaration */ || node.kind === 278 /* ImportDeclaration */ || node.kind === 279 /* ImportClause */ || node.kind === 277 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 289 /* ExternalModuleReference */) { return void 0; } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) { return visitTypeScript(node); @@ -84673,21 +84870,21 @@ function transformTypeScript(context) { } function classElementVisitorWorker(node, parent2) { switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: return visitConstructor(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node, parent2); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return visitEachChild(node, visitor, context); - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: return node; - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return; default: return Debug.failBadSyntaxKind(node); @@ -84698,15 +84895,15 @@ function transformTypeScript(context) { } function objectLiteralElementVisitorWorker(node, parent2) { switch (node.kind) { - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 307 /* SpreadAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 310 /* SpreadAssignment */: return visitor(node); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); default: return Debug.failBadSyntaxKind(node); @@ -84741,13 +84938,13 @@ function transformTypeScript(context) { case 147 /* ReadonlyKeyword */: case 102 /* InKeyword */: case 146 /* OutKeyword */: - case 188 /* ArrayType */: - case 189 /* TupleType */: - case 190 /* OptionalType */: - case 191 /* RestType */: - case 187 /* TypeLiteral */: - case 182 /* TypePredicate */: - case 167 /* TypeParameter */: + case 190 /* ArrayType */: + case 191 /* TupleType */: + case 192 /* OptionalType */: + case 193 /* RestType */: + case 189 /* TypeLiteral */: + case 184 /* TypePredicate */: + case 168 /* TypeParameter */: case 132 /* AnyKeyword */: case 159 /* UnknownKeyword */: case 135 /* BooleanKeyword */: @@ -84756,83 +84953,86 @@ function transformTypeScript(context) { case 145 /* NeverKeyword */: case 115 /* VoidKeyword */: case 154 /* SymbolKeyword */: - case 185 /* ConstructorType */: - case 184 /* FunctionType */: - case 186 /* TypeQuery */: - case 183 /* TypeReference */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 194 /* ConditionalType */: - case 196 /* ParenthesizedType */: - case 197 /* ThisType */: - case 198 /* TypeOperator */: - case 199 /* IndexedAccessType */: - case 200 /* MappedType */: - case 201 /* LiteralType */: - case 181 /* IndexSignature */: + case 187 /* ConstructorType */: + case 186 /* FunctionType */: + case 188 /* TypeQuery */: + case 185 /* TypeReference */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: + case 196 /* ConditionalType */: + case 198 /* ParenthesizedType */: + case 199 /* ThisType */: + case 200 /* TypeOperator */: + case 201 /* IndexedAccessType */: + case 202 /* MappedType */: + case 203 /* LiteralType */: + case 183 /* IndexSignature */: return void 0; - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return factory2.createNotEmittedStatement(node); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return void 0; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return factory2.createNotEmittedStatement(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return visitClassExpression(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: + return factory2.createNotEmittedStatement(node); + case 269 /* OverloadDeclaration */: return factory2.createNotEmittedStatement(node); - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return visitHeritageClause(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArguments(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 176 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 177 /* ClassStaticBlockDeclaration */: return Debug.fail("Class and object literal elements must be visited with their respective visitors"); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return visitFunctionExpression(node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return visitArrowFunction(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node); - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: return visitAssertionExpression(node); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return visitSatisfiesExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return visitNewExpression(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return visitNonNullExpression(node); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return visitEnumDeclaration(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return visitModuleDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node); - case 289 /* JsxOpeningElement */: + case 292 /* JsxOpeningElement */: return visitJsxJsxOpeningElement(node); default: return visitEachChild(node, visitor, context); @@ -85064,19 +85264,19 @@ function transformTypeScript(context) { } function shouldAddTypeMetadata(node) { const kind = node.kind; - return kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 171 /* PropertyDeclaration */; + return kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 172 /* PropertyDeclaration */; } function shouldAddReturnTypeMetadata(node) { - return node.kind === 174 /* MethodDeclaration */; + return node.kind === 176 /* MethodDeclaration */; } function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return getFirstConstructorWithBody(node) !== void 0; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return true; } return false; @@ -85609,12 +85809,12 @@ function transformTypeScript(context) { factory2.createVariableDeclaration( factory2.getLocalName(node, false, true) ) - ], currentLexicalScope.kind === 314 /* SourceFile */ ? 0 /* None */ : 1 /* Let */) + ], currentLexicalScope.kind === 317 /* SourceFile */ ? 0 /* None */ : 1 /* Let */) ); setOriginalNode(statement, node); recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 269 /* EnumDeclaration */) { + if (node.kind === 272 /* EnumDeclaration */) { setSourceMapRange(statement.declarationList, node); } else { setSourceMapRange(statement, node); @@ -85696,7 +85896,7 @@ function transformTypeScript(context) { let statementsLocation; let blockLocation; if (node.body) { - if (node.body.kind === 271 /* ModuleBlock */) { + if (node.body.kind === 274 /* ModuleBlock */) { saveStateAndInvoke(node.body, (body) => addRange(statements, visitNodes2(body.statements, namespaceElementVisitor, isStatement))); statementsLocation = node.body.statements; blockLocation = node.body; @@ -85725,13 +85925,13 @@ function transformTypeScript(context) { true ); setTextRange(block, blockLocation); - if (!node.body || node.body.kind !== 271 /* ModuleBlock */) { + if (!node.body || node.body.kind !== 274 /* ModuleBlock */) { setEmitFlags(block, getEmitFlags(block) | 1536 /* NoComments */); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 270 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 273 /* ModuleDeclaration */) { const recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -85759,7 +85959,7 @@ function transformTypeScript(context) { return name || namedBindings ? factory2.updateImportClause(node, false, name, namedBindings) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 277 /* NamespaceImport */) { + if (node.kind === 280 /* NamespaceImport */) { return shouldEmitAliasDeclaration(node) ? node : void 0; } else { const allowEmpty = compilerOptions.preserveValueImports && (compilerOptions.importsNotUsedAsValues === 1 /* Preserve */ || compilerOptions.importsNotUsedAsValues === 2 /* Error */); @@ -85929,15 +86129,15 @@ function transformTypeScript(context) { if ((enabledSubstitutions & 2 /* NamespaceExports */) === 0) { enabledSubstitutions |= 2 /* NamespaceExports */; context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(306 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(270 /* ModuleDeclaration */); + context.enableSubstitution(309 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(273 /* ModuleDeclaration */); } } function isTransformedModuleDeclaration(node) { - return getOriginalNode(node).kind === 270 /* ModuleDeclaration */; + return getOriginalNode(node).kind === 273 /* ModuleDeclaration */; } function isTransformedEnumDeclaration(node) { - return getOriginalNode(node).kind === 269 /* EnumDeclaration */; + return getOriginalNode(node).kind === 272 /* EnumDeclaration */; } function onEmitNode(hint, node, emitCallback) { const savedApplicableSubstitutions = applicableSubstitutions; @@ -85982,9 +86182,9 @@ function transformTypeScript(context) { switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return substituteElementAccessExpression(node); } return node; @@ -85995,8 +86195,8 @@ function transformTypeScript(context) { function trySubstituteNamespaceExportedName(node) { if (enabledSubstitutions & applicableSubstitutions && !isGeneratedIdentifier(node) && !isLocalName(node)) { const container = resolver.getReferencedExportContainer(node, false); - if (container && container.kind !== 314 /* SourceFile */) { - const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 270 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 269 /* EnumDeclaration */; + if (container && container.kind !== 317 /* SourceFile */) { + const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 273 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 272 /* EnumDeclaration */; if (substitute) { return setTextRange( factory2.createPropertyAccessExpression(factory2.getGeneratedNameForNode(container), node), @@ -86098,45 +86298,49 @@ function transformClassFields(context) { switch (node.kind) { case 128 /* AccessorKeyword */: return shouldTransformAutoAccessors ? void 0 : node; - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return void 0; - case 232 /* ClassExpression */: + case 269 /* OverloadDeclaration */: + return void 0; + case 234 /* ClassExpression */: return visitClassExpression(node); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + return void 0; + case 174 /* OverloadPropertyDeclaration */: return void 0; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); case 80 /* PrivateIdentifier */: return visitPrivateIdentifier(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, false); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node, false); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitCallExpression(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node); - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: { + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: { return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( void 0, fallbackVisitor, @@ -86152,10 +86356,10 @@ function transformClassFields(context) { } function discardedValueVisitor(node) { switch (node.kind) { - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, true); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node, true); default: return visitor(node); @@ -86163,9 +86367,9 @@ function transformClassFields(context) { } function heritageClauseVisitor(node) { switch (node.kind) { - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return visitEachChild(node, heritageClauseVisitor, context); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArgumentsInHeritageClause(node); default: return visitor(node); @@ -86173,8 +86377,8 @@ function transformClassFields(context) { } function assignmentTargetVisitor(node) { switch (node.kind) { - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return visitAssignmentPattern(node); default: return visitor(node); @@ -86182,25 +86386,25 @@ function transformClassFields(context) { } function classElementVisitor(node) { switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: return visitConstructorDeclaration(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( void 0, visitMethodOrAccessorDeclaration, node ); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( void 0, visitPropertyDeclaration, node ); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: return node; default: return visitor(node); @@ -86208,10 +86412,10 @@ function transformClassFields(context) { } function accessorFieldResultVisitor(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return transformFieldInitializer(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return classElementVisitor(node); default: Debug.assertMissingNode(node, "Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration"); @@ -87295,14 +87499,14 @@ function transformClassFields(context) { if ((enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */) === 0) { enabledSubstitutions |= 2 /* ClassStaticThisOrSuperReference */; context.enableSubstitution(109 /* ThisKeyword */); - context.enableEmitNotification(263 /* FunctionDeclaration */); - context.enableEmitNotification(218 /* FunctionExpression */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(171 /* PropertyDeclaration */); - context.enableEmitNotification(166 /* ComputedPropertyName */); + context.enableEmitNotification(265 /* FunctionDeclaration */); + context.enableEmitNotification(220 /* FunctionExpression */); + context.enableEmitNotification(178 /* Constructor */); + context.enableEmitNotification(179 /* GetAccessor */); + context.enableEmitNotification(180 /* SetAccessor */); + context.enableEmitNotification(176 /* MethodDeclaration */); + context.enableEmitNotification(172 /* PropertyDeclaration */); + context.enableEmitNotification(167 /* ComputedPropertyName */); } } function addMethodStatements(statements, methods, receiver) { @@ -87344,12 +87548,12 @@ function transformClassFields(context) { } } switch (node.kind) { - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: if (isArrowFunction(original) || getEmitFlags(node) & 262144 /* AsyncFunctionBody */) { break; } - case 263 /* FunctionDeclaration */: - case 176 /* Constructor */: { + case 265 /* FunctionDeclaration */: + case 178 /* Constructor */: { const savedClassLexicalEnvironment = currentClassLexicalEnvironment; const savedCurrentComputedPropertyNameClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment; currentClassLexicalEnvironment = void 0; @@ -87359,10 +87563,10 @@ function transformClassFields(context) { currentComputedPropertyNameClassLexicalEnvironment = savedCurrentComputedPropertyNameClassLexicalEnvironment; return; } - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - case 171 /* PropertyDeclaration */: { + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { const savedClassLexicalEnvironment = currentClassLexicalEnvironment; const savedCurrentComputedPropertyNameClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment; currentComputedPropertyNameClassLexicalEnvironment = currentClassLexicalEnvironment; @@ -87372,7 +87576,7 @@ function transformClassFields(context) { currentComputedPropertyNameClassLexicalEnvironment = savedCurrentComputedPropertyNameClassLexicalEnvironment; return; } - case 166 /* ComputedPropertyName */: { + case 167 /* ComputedPropertyName */: { const savedClassLexicalEnvironment = currentClassLexicalEnvironment; const savedCurrentComputedPropertyNameClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment; currentClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment; @@ -87846,15 +88050,15 @@ function createRuntimeTypeSerializer(context) { } function serializeTypeOfNode(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: return serializeTypeNode(node.type); - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: + case 180 /* SetAccessor */: + case 179 /* GetAccessor */: return serializeTypeNode(getAccessorTypeNode(node)); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 174 /* MethodDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 176 /* MethodDeclaration */: return factory.createIdentifier("Function"); default: return factory.createVoidZero(); @@ -87881,7 +88085,7 @@ function createRuntimeTypeSerializer(context) { return factory.createArrayLiteralExpression(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 177 /* GetAccessor */) { + if (container && node.kind === 179 /* GetAccessor */) { const { setAccessor } = getAllAccessorDeclarations(container.members, node); if (setAccessor) { return setAccessor.parameters; @@ -87907,22 +88111,22 @@ function createRuntimeTypeSerializer(context) { case 157 /* UndefinedKeyword */: case 145 /* NeverKeyword */: return factory.createVoidZero(); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: return factory.createIdentifier("Function"); - case 188 /* ArrayType */: - case 189 /* TupleType */: + case 190 /* ArrayType */: + case 191 /* TupleType */: return factory.createIdentifier("Array"); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return node.assertsModifier ? factory.createVoidZero() : factory.createIdentifier("Boolean"); case 135 /* BooleanKeyword */: return factory.createIdentifier("Boolean"); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: case 153 /* StringKeyword */: return factory.createIdentifier("String"); case 150 /* ObjectKeyword */: return factory.createIdentifier("Object"); - case 201 /* LiteralType */: + case 203 /* LiteralType */: return serializeLiteralOfLiteralTypeNode(node.literal); case 149 /* NumberKeyword */: return factory.createIdentifier("Number"); @@ -87930,37 +88134,37 @@ function createRuntimeTypeSerializer(context) { return getGlobalConstructor("BigInt", 7 /* ES2020 */); case 154 /* SymbolKeyword */: return getGlobalConstructor("Symbol", 2 /* ES2015 */); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return serializeTypeReferenceNode(node); - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return serializeUnionOrIntersectionConstituents(node.types, true); - case 192 /* UnionType */: + case 194 /* UnionType */: return serializeUnionOrIntersectionConstituents(node.types, false); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return serializeUnionOrIntersectionConstituents([node.trueType, node.falseType], false); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: if (node.operator === 147 /* ReadonlyKeyword */) { return serializeTypeNode(node.type); } break; - case 186 /* TypeQuery */: - case 199 /* IndexedAccessType */: - case 200 /* MappedType */: - case 187 /* TypeLiteral */: + case 188 /* TypeQuery */: + case 201 /* IndexedAccessType */: + case 202 /* MappedType */: + case 189 /* TypeLiteral */: case 132 /* AnyKeyword */: case 159 /* UnknownKeyword */: - case 197 /* ThisType */: - case 205 /* ImportType */: + case 199 /* ThisType */: + case 207 /* ImportType */: break; - case 321 /* JSDocAllType */: - case 322 /* JSDocUnknownType */: - case 326 /* JSDocFunctionType */: - case 327 /* JSDocVariadicType */: - case 328 /* JSDocNamepathType */: + case 324 /* JSDocAllType */: + case 325 /* JSDocUnknownType */: + case 329 /* JSDocFunctionType */: + case 330 /* JSDocVariadicType */: + case 331 /* JSDocNamepathType */: break; - case 323 /* JSDocNullableType */: - case 324 /* JSDocNonNullableType */: - case 325 /* JSDocOptionalType */: + case 326 /* JSDocNullableType */: + case 327 /* JSDocNonNullableType */: + case 328 /* JSDocOptionalType */: return serializeTypeNode(node.type); default: return Debug.failBadSyntaxKind(node); @@ -87972,7 +88176,7 @@ function createRuntimeTypeSerializer(context) { case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return factory.createIdentifier("String"); - case 225 /* PrefixUnaryExpression */: { + case 227 /* PrefixUnaryExpression */: { const operand = node.operand; switch (operand.kind) { case 8 /* NumericLiteral */: @@ -88105,7 +88309,7 @@ function createRuntimeTypeSerializer(context) { name.original = void 0; setParent(name, getParseTreeNode(currentLexicalScope)); return name; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return serializeQualifiedNameAsExpression(node); } } @@ -88153,23 +88357,23 @@ function transformLegacyDecorators(context) { return node; } switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return void 0; - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return visitClassExpression(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return visitConstructorDeclaration(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameterDeclaration(node); default: return visitEachChild(node, visitor, context); @@ -88578,34 +88782,34 @@ function transformES2017(context) { switch (node.kind) { case 133 /* AsyncKeyword */: return void 0; - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return visitAwaitExpression(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitMethodDeclaration, node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionDeclaration, node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionExpression, node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return doWithContext(1 /* NonTopLevel */, visitArrowFunction, node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 107 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 107 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitGetAccessorDeclaration, node); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitSetAccessorDeclaration, node); - case 176 /* Constructor */: + case 178 /* Constructor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitConstructorDeclaration, node); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitDefault, node); default: return visitEachChild(node, visitor, context); @@ -88614,27 +88818,27 @@ function transformES2017(context) { function asyncBodyVisitor(node) { if (isNodeWithPossibleHoistedDeclaration(node)) { switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatementInAsyncBody(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatementInAsyncBody(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatementInAsyncBody(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatementInAsyncBody(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClauseInAsyncBody(node); - case 242 /* Block */: - case 256 /* SwitchStatement */: - case 272 /* CaseBlock */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 259 /* TryStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 246 /* IfStatement */: - case 255 /* WithStatement */: - case 257 /* LabeledStatement */: + case 244 /* Block */: + case 258 /* SwitchStatement */: + case 275 /* CaseBlock */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 261 /* TryStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 248 /* IfStatement */: + case 257 /* WithStatement */: + case 259 /* LabeledStatement */: return visitEachChild(node, asyncBodyVisitor, context); default: return Debug.assertNever(node, "Unhandled node."); @@ -88884,7 +89088,7 @@ function transformES2017(context) { const original = getOriginalNode(node, isFunctionLike); const nodeType = original.type; const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0; - const isArrowFunction2 = node.kind === 219 /* ArrowFunction */; + const isArrowFunction2 = node.kind === 221 /* ArrowFunction */; const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192 /* CaptureArguments */) !== 0; const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames; enclosingFunctionParameterNames = new Set2(); @@ -88973,15 +89177,15 @@ function transformES2017(context) { function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); - context.enableEmitNotification(264 /* ClassDeclaration */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(244 /* VariableStatement */); + context.enableSubstitution(215 /* CallExpression */); + context.enableSubstitution(213 /* PropertyAccessExpression */); + context.enableSubstitution(214 /* ElementAccessExpression */); + context.enableEmitNotification(266 /* ClassDeclaration */); + context.enableEmitNotification(176 /* MethodDeclaration */); + context.enableEmitNotification(179 /* GetAccessor */); + context.enableEmitNotification(180 /* SetAccessor */); + context.enableEmitNotification(178 /* Constructor */); + context.enableEmitNotification(246 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -89012,11 +89216,11 @@ function transformES2017(context) { } function substituteExpression(node) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -89059,7 +89263,7 @@ function transformES2017(context) { } function isSuperContainer(node) { const kind = node.kind; - return kind === 264 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 266 /* ClassDeclaration */ || kind === 178 /* Constructor */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 4096 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -89266,115 +89470,115 @@ function transformES2018(context) { return node; } switch (node.kind) { - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return visitAwaitExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return visitYieldExpression(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return visitReturnStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return visitLabeledStatement(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClause(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 250 /* ForInStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 252 /* ForInStatement */: return doWithHierarchyFacts( visitDefault, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatement(node, void 0); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return doWithHierarchyFacts( visitForStatement, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return visitVoidExpression(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return doWithHierarchyFacts( visitConstructorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return doWithHierarchyFacts( visitMethodDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return doWithHierarchyFacts( visitGetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return doWithHierarchyFacts( visitSetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return doWithHierarchyFacts( visitFunctionDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return doWithHierarchyFacts( visitFunctionExpression, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return doWithHierarchyFacts( visitArrowFunction, node, 2 /* ArrowFunctionExcludes */, 0 /* ArrowFunctionIncludes */ ); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 107 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 107 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return doWithHierarchyFacts( visitDefault, node, @@ -89452,7 +89656,7 @@ function transformES2018(context) { function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 /* Async */) { const statement = unwrapInnermostStatementOfLabel(node); - if (statement.kind === 251 /* ForOfStatement */ && statement.awaitModifier) { + if (statement.kind === 253 /* ForOfStatement */ && statement.awaitModifier) { return visitForOfStatement(statement, node); } return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node); @@ -89463,7 +89667,7 @@ function transformES2018(context) { let chunkObject; const objects = []; for (const e of elements) { - if (e.kind === 307 /* SpreadAssignment */) { + if (e.kind === 310 /* SpreadAssignment */) { if (chunkObject) { objects.push(factory2.createObjectLiteralExpression(chunkObject)); chunkObject = void 0; @@ -89471,7 +89675,7 @@ function transformES2018(context) { const target = e.expression; objects.push(visitNode(target, visitor, isExpression)); } else { - chunkObject = append(chunkObject, e.kind === 305 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); + chunkObject = append(chunkObject, e.kind === 308 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); } } if (chunkObject) { @@ -89482,7 +89686,7 @@ function transformES2018(context) { function visitObjectLiteralExpression(node) { if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { const objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 210 /* ObjectLiteralExpression */) { + if (objects.length && objects[0].kind !== 212 /* ObjectLiteralExpression */) { objects.unshift(factory2.createObjectLiteralExpression()); } let expression = objects[0]; @@ -90135,15 +90339,15 @@ function transformES2018(context) { function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); - context.enableEmitNotification(264 /* ClassDeclaration */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(244 /* VariableStatement */); + context.enableSubstitution(215 /* CallExpression */); + context.enableSubstitution(213 /* PropertyAccessExpression */); + context.enableSubstitution(214 /* ElementAccessExpression */); + context.enableEmitNotification(266 /* ClassDeclaration */); + context.enableEmitNotification(176 /* MethodDeclaration */); + context.enableEmitNotification(179 /* GetAccessor */); + context.enableEmitNotification(180 /* SetAccessor */); + context.enableEmitNotification(178 /* Constructor */); + context.enableEmitNotification(246 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -90174,11 +90378,11 @@ function transformES2018(context) { } function substituteExpression(node) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -90221,7 +90425,7 @@ function transformES2018(context) { } function isSuperContainer(node) { const kind = node.kind; - return kind === 264 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 266 /* ClassDeclaration */ || kind === 178 /* Constructor */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 4096 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -90264,7 +90468,7 @@ function transformES2019(context) { return node; } switch (node.kind) { - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClause(node); default: return visitEachChild(node, visitor, context); @@ -90300,25 +90504,25 @@ function transformES2020(context) { return node; } switch (node.kind) { - case 213 /* CallExpression */: { + case 215 /* CallExpression */: { const updated = visitNonOptionalCallExpression(node, false); Debug.assertNotNode(updated, isSyntheticReference); return updated; } - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: if (isOptionalChain(node)) { const updated = visitOptionalExpression(node, false, false); Debug.assertNotNode(updated, isSyntheticReference); return updated; } return visitEachChild(node, visitor, context); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (node.operatorToken.kind === 60 /* QuestionQuestionToken */) { return transformNullishCoalescingExpression(node); } return visitEachChild(node, visitor, context); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return visitDeleteExpression(node); default: return visitEachChild(node, visitor, context); @@ -90356,7 +90560,7 @@ function transformES2020(context) { thisArg = expression; } } - expression = node.kind === 211 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); + expression = node.kind === 213 /* 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) { @@ -90375,12 +90579,12 @@ function transformES2020(context) { } function visitNonOptionalExpression(node, captureThisArg, isDelete) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return visitNode(node, visitor, isExpression); @@ -90401,8 +90605,8 @@ function transformES2020(context) { for (let i = 0; i < chain.length; i++) { const segment = chain[i]; switch (segment.kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { if (!isSimpleCopiableExpression(rightExpression)) { thisArg = factory2.createTempVariable(hoistVariableDeclaration); @@ -90411,9 +90615,9 @@ function transformES2020(context) { thisArg = rightExpression; } } - rightExpression = segment.kind === 211 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); + rightExpression = segment.kind === 213 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (i === 0 && leftThisArg) { if (!isGeneratedIdentifier(leftThisArg)) { leftThisArg = factory2.cloneNode(leftThisArg); @@ -90492,7 +90696,7 @@ function transformES2021(context) { return node; } switch (node.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const binaryExpression = node; if (isLogicalOrCoalescingAssignmentExpression(binaryExpression)) { return transformLogicalAssignment(binaryExpression); @@ -90670,13 +90874,13 @@ function transformJsx(context) { } function visitorWorker(node) { switch (node.kind) { - case 287 /* JsxElement */: + case 290 /* JsxElement */: return visitJsxElement(node, false); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node, false); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return visitJsxFragment(node, false); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return visitJsxExpression(node); default: return visitEachChild(node, visitor, context); @@ -90686,13 +90890,13 @@ function transformJsx(context) { switch (node.kind) { case 11 /* JsxText */: return visitJsxText(node); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return visitJsxExpression(node); - case 287 /* JsxElement */: + case 290 /* JsxElement */: return visitJsxElement(node, true); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node, true); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return visitJsxFragment(node, true); default: return Debug.failBadSyntaxKind(node); @@ -90887,7 +91091,7 @@ function transformJsx(context) { const literal = factory2.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote); return setTextRange(literal, node); } - if (node.kind === 297 /* JsxExpression */) { + if (node.kind === 300 /* JsxExpression */) { if (node.expression === void 0) { return factory2.createTrue(); } @@ -90949,7 +91153,7 @@ function transformJsx(context) { return decoded === text ? void 0 : decoded; } function getTagName(node) { - if (node.kind === 287 /* JsxElement */) { + if (node.kind === 290 /* JsxElement */) { return getTagName(node.openingElement); } else { const name = node.tagName; @@ -91248,7 +91452,7 @@ function transformES2016(context) { return node; } switch (node.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node); default: return visitEachChild(node, visitor, context); @@ -91376,7 +91580,7 @@ function transformES2015(context) { hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 254 /* ReturnStatement */ && !node.expression; + return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 256 /* 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(node, false) || isBlock(node)); @@ -91416,65 +91620,65 @@ function transformES2015(context) { switch (node.kind) { case 125 /* StaticKeyword */: return void 0; - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return visitClassExpression(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return visitArrowFunction(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return visitFunctionExpression(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return visitVariableDeclaration(node); case 79 /* Identifier */: return visitIdentifier(node); - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return visitVariableDeclarationList(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return visitSwitchStatement(node); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return visitCaseBlock(node); - case 242 /* Block */: + case 244 /* Block */: return visitBlock(node, false); - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: return visitBreakOrContinueStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return visitLabeledStatement(node); - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return visitDoOrWhileStatement(node, void 0); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node, void 0); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatement(node, void 0); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatement(node, void 0); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClause(node); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return visitShorthandPropertyAssignment(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return visitNewExpression(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: @@ -91485,30 +91689,30 @@ function transformES2015(context) { return visitStringLiteral(node); case 8 /* NumericLiteral */: return visitNumericLiteral(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: return visitTemplateExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return visitYieldExpression(node); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return visitSpreadElement(node); case 107 /* SuperKeyword */: return visitSuperKeyword(false); case 109 /* ThisKeyword */: return visitThisKeyword(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return visitMetaProperty(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return visitAccessorDeclaration(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return visitReturnStatement(node); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return visitVoidExpression(node); default: return visitEachChild(node, visitor, context); @@ -91609,13 +91813,13 @@ function transformES2015(context) { } function visitBreakOrContinueStatement(node) { if (convertedLoopState) { - const jump = node.kind === 253 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + const jump = node.kind === 255 /* 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 === 253 /* BreakStatement */) { + if (node.kind === 255 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; labelMarker = "break"; } else { @@ -91623,7 +91827,7 @@ function transformES2015(context) { labelMarker = "continue"; } } else { - if (node.kind === 253 /* BreakStatement */) { + if (node.kind === 255 /* BreakStatement */) { labelMarker = `break-${label.escapedText}`; setLabeledJump(convertedLoopState, true, idText(label), labelMarker); } else { @@ -91867,14 +92071,14 @@ function transformES2015(context) { }; } function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 254 /* ReturnStatement */) { + if (statement.kind === 256 /* ReturnStatement */) { return true; - } else if (statement.kind === 246 /* IfStatement */) { + } else if (statement.kind === 248 /* IfStatement */) { const ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } - } else if (statement.kind === 242 /* Block */) { + } else if (statement.kind === 244 /* Block */) { const lastStatement = lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -92116,7 +92320,7 @@ function transformES2015(context) { return true; } function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) { + if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 221 /* ArrowFunction */) { insertCaptureThisForNode(statements, node, factory2.createThis()); return true; } @@ -92155,21 +92359,21 @@ function transformES2015(context) { if (hierarchyFacts & 32768 /* NewTarget */) { let newTarget; switch (node.kind) { - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return statements; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: newTarget = factory2.createVoidZero(); break; - case 176 /* Constructor */: + case 178 /* Constructor */: newTarget = factory2.createPropertyAccessExpression( setEmitFlags(factory2.createThis(), 4 /* NoSubstitution */), "constructor" ); break; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: newTarget = factory2.createConditionalExpression( factory2.createLogicalAnd( setEmitFlags(factory2.createThis(), 4 /* NoSubstitution */), @@ -92213,21 +92417,21 @@ function transformES2015(context) { function addClassMembers(statements, node) { for (const member of node.members) { switch (member.kind) { - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 176 /* Constructor */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 177 /* ClassStaticBlockDeclaration */: break; default: Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName); @@ -92380,7 +92584,7 @@ function transformES2015(context) { 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 === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { + if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */)) { name = factory2.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); @@ -92426,7 +92630,7 @@ function transformES2015(context) { multiLine = true; } } else { - Debug.assert(node.kind === 219 /* ArrowFunction */); + Debug.assert(node.kind === 221 /* ArrowFunction */); statementsLocation = moveRangeEnd(body, -1); const equalsGreaterThanToken = node.equalsGreaterThanToken; if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { @@ -92629,14 +92833,14 @@ function transformES2015(context) { } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return visitDoOrWhileStatement(node, outermostLabeledStatement); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node, outermostLabeledStatement); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatement(node, outermostLabeledStatement); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -92913,7 +93117,7 @@ function transformES2015(context) { 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 === 166 /* ComputedPropertyName */)) { + if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 167 /* ComputedPropertyName */)) { numInitialProperties = i; break; } @@ -93025,15 +93229,15 @@ function transformES2015(context) { } function convertIterationStatementCore(node, initializerFunction, convertedLoopBody) { switch (node.kind) { - case 249 /* ForStatement */: + case 251 /* ForStatement */: return convertForStatement(node, initializerFunction, convertedLoopBody); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return convertForInStatement(node, convertedLoopBody); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return convertForOfStatement(node, convertedLoopBody); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return convertDoStatement(node, convertedLoopBody); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return convertWhileStatement(node, convertedLoopBody); default: return Debug.failBadSyntaxKind(node, "IterationStatement expected"); @@ -93084,11 +93288,11 @@ function transformES2015(context) { function createConvertedLoopState(node) { let loopInitializer; switch (node.kind) { - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: const initializer = node.initializer; - if (initializer && initializer.kind === 262 /* VariableDeclarationList */) { + if (initializer && initializer.kind === 264 /* VariableDeclarationList */) { loopInitializer = initializer; } break; @@ -93442,20 +93646,20 @@ function transformES2015(context) { for (let i = start; i < numProperties; i++) { const property = properties[i]; switch (property.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, !!node.multiLine)); } break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -93558,7 +93762,7 @@ function transformES2015(context) { let updated; const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (node.kind === 177 /* GetAccessor */) { + if (node.kind === 179 /* GetAccessor */) { updated = factory2.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body); } else { updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); @@ -93860,13 +94064,13 @@ function transformES2015(context) { if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) { enabledSubstitutions |= 1 /* CapturedThis */; context.enableSubstitution(109 /* ThisKeyword */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(219 /* ArrowFunction */); - context.enableEmitNotification(218 /* FunctionExpression */); - context.enableEmitNotification(263 /* FunctionDeclaration */); + context.enableEmitNotification(178 /* Constructor */); + context.enableEmitNotification(176 /* MethodDeclaration */); + context.enableEmitNotification(179 /* GetAccessor */); + context.enableEmitNotification(180 /* SetAccessor */); + context.enableEmitNotification(221 /* ArrowFunction */); + context.enableEmitNotification(220 /* FunctionExpression */); + context.enableEmitNotification(265 /* FunctionDeclaration */); } } function onSubstituteNode(hint, node) { @@ -93890,10 +94094,10 @@ function transformES2015(context) { } function isNameOfDeclarationWithCollidingName(node) { switch (node.parent.kind) { - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: - case 269 /* EnumDeclaration */: - case 261 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: + case 272 /* EnumDeclaration */: + case 263 /* VariableDeclaration */: return node.parent.name === node && resolver.isDeclarationWithCollidingName(node.parent); } return false; @@ -93950,11 +94154,11 @@ function transformES2015(context) { return false; } const statement = firstOrUndefined(constructor.body.statements); - if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 245 /* ExpressionStatement */) { + if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 247 /* ExpressionStatement */) { return false; } const statementExpression = statement.expression; - if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 213 /* CallExpression */) { + if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 215 /* CallExpression */) { return false; } const callTarget = statementExpression.expression; @@ -93962,7 +94166,7 @@ function transformES2015(context) { return false; } const callArgument = singleOrUndefined(statementExpression.arguments); - if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 231 /* SpreadElement */) { + if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 233 /* SpreadElement */) { return false; } const expression = callArgument.expression; @@ -93979,24 +94183,24 @@ function transformES5(context) { if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(289 /* JsxOpeningElement */); - context.enableEmitNotification(290 /* JsxClosingElement */); - context.enableEmitNotification(288 /* JsxSelfClosingElement */); + context.enableEmitNotification(292 /* JsxOpeningElement */); + context.enableEmitNotification(293 /* JsxClosingElement */); + context.enableEmitNotification(291 /* JsxSelfClosingElement */); noSubstitution = []; } const previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(305 /* PropertyAssignment */); + context.enableSubstitution(213 /* PropertyAccessExpression */); + context.enableSubstitution(308 /* PropertyAssignment */); return chainBundle(context, transformSourceFile); function transformSourceFile(node) { return node; } function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 289 /* JsxOpeningElement */: - case 290 /* JsxClosingElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 293 /* JsxClosingElement */: + case 291 /* JsxSelfClosingElement */: const tagName = node.tagName; noSubstitution[getOriginalNodeId(tagName)] = true; break; @@ -94122,13 +94326,13 @@ function transformGenerators(context) { } function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 247 /* DoStatement */: + case 249 /* DoStatement */: return visitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return visitWhileStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return visitSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -94136,24 +94340,24 @@ function transformGenerators(context) { } function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return visitFunctionExpression(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return visitAccessorDeclaration(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatement(node); - case 253 /* BreakStatement */: + case 255 /* BreakStatement */: return visitBreakStatement(node); - case 252 /* ContinueStatement */: + case 254 /* ContinueStatement */: return visitContinueStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return visitReturnStatement(node); default: if (node.transformFlags & 1048576 /* ContainsYield */) { @@ -94167,23 +94371,23 @@ function transformGenerators(context) { } function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return visitCommaListExpression(node); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return visitConditionalExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return visitYieldExpression(node); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return visitNewExpression(node); default: return visitEachChild(node, visitor, context); @@ -94191,9 +94395,9 @@ function transformGenerators(context) { } function visitGenerator(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return visitFunctionExpression(node); default: return Debug.failBadSyntaxKind(node); @@ -94360,14 +94564,14 @@ function transformGenerators(context) { if (containsYield(right)) { let target; switch (left.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: target = factory2.updatePropertyAccessExpression( left, cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)), left.name ); break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: target = factory2.updateElementAccessExpression( left, cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)), @@ -94639,35 +94843,35 @@ function transformGenerators(context) { } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 242 /* Block */: + case 244 /* Block */: return transformAndEmitBlock(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return transformAndEmitExpressionStatement(node); - case 246 /* IfStatement */: + case 248 /* IfStatement */: return transformAndEmitIfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return transformAndEmitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return transformAndEmitWhileStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return transformAndEmitForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return transformAndEmitForInStatement(node); - case 252 /* ContinueStatement */: + case 254 /* ContinueStatement */: return transformAndEmitContinueStatement(node); - case 253 /* BreakStatement */: + case 255 /* BreakStatement */: return transformAndEmitBreakStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return transformAndEmitReturnStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return transformAndEmitWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return transformAndEmitSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return transformAndEmitLabeledStatement(node); - case 258 /* ThrowStatement */: + case 260 /* ThrowStatement */: return transformAndEmitThrowStatement(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return transformAndEmitTryStatement(node); default: return emitStatement(visitNode(node, visitor, isStatement)); @@ -94992,7 +95196,7 @@ function transformGenerators(context) { for (let i = 0; i < numClauses; i++) { const clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 299 /* DefaultClause */ && defaultClauseIndex === -1) { + if (clause.kind === 302 /* DefaultClause */ && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -95002,7 +95206,7 @@ function transformGenerators(context) { let defaultClausesSkipped = 0; for (let i = clausesWritten; i < numClauses; i++) { const clause = caseBlock.clauses[i]; - if (clause.kind === 298 /* CaseClause */) { + if (clause.kind === 301 /* CaseClause */) { if (containsYield(clause.expression) && pendingClauses.length > 0) { break; } @@ -95927,12 +96131,12 @@ function transformModule(context) { const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(215 /* TaggedTemplateExpression */); + context.enableSubstitution(215 /* CallExpression */); + context.enableSubstitution(217 /* TaggedTemplateExpression */); context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(227 /* BinaryExpression */); - context.enableSubstitution(306 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(314 /* SourceFile */); + context.enableSubstitution(229 /* BinaryExpression */); + context.enableSubstitution(309 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(317 /* SourceFile */); const moduleInfoMap = []; const deferredExports = []; let currentSourceFile; @@ -96240,23 +96444,23 @@ function transformModule(context) { } function topLevelVisitor(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return visitImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return visitExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return visitExportAssignment(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 361 /* MergeDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 362 /* EndOfDeclarationMarker */: + case 365 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return visitor(node); @@ -96267,26 +96471,26 @@ function transformModule(context) { return node; } switch (node.kind) { - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) { return visitImportCallExpression(node); } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -96301,24 +96505,24 @@ function transformModule(context) { if (isObjectLiteralExpression(node)) { for (const elem of node.properties) { switch (elem.kind) { - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (destructuringNeedsFlattening(elem.initializer)) { return true; } break; - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: if (destructuringNeedsFlattening(elem.name)) { return true; } break; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: if (destructuringNeedsFlattening(elem.expression)) { return true; } break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return false; default: Debug.assertNever(elem, "Unhandled object member kind"); @@ -96975,7 +97179,7 @@ function transformModule(context) { } } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 244 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 246 /* VariableStatement */) { const id = getOriginalNodeId(node); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original); } @@ -97007,10 +97211,10 @@ function transformModule(context) { const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 278 /* NamedImports */: + case 281 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding, true); } @@ -97154,7 +97358,7 @@ function transformModule(context) { return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)]; previousOnEmitNode(hint, node, emitCallback); @@ -97192,11 +97396,11 @@ function transformModule(context) { switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return substituteCallExpression(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return substituteTaggedTemplateExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return substituteBinaryExpression(node); } return node; @@ -97247,7 +97451,7 @@ function transformModule(context) { return node; } else if (!(isGeneratedIdentifier(node) && !(node.autoGenerateFlags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) { const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); - if (exportContainer && exportContainer.kind === 314 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 317 /* SourceFile */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createIdentifier("exports"), @@ -97326,10 +97530,10 @@ function transformSystemModule(context) { context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(306 /* ShorthandPropertyAssignment */); - context.enableSubstitution(227 /* BinaryExpression */); - context.enableSubstitution(237 /* MetaProperty */); - context.enableEmitNotification(314 /* SourceFile */); + context.enableSubstitution(309 /* ShorthandPropertyAssignment */); + context.enableSubstitution(229 /* BinaryExpression */); + context.enableSubstitution(239 /* MetaProperty */); + context.enableEmitNotification(317 /* SourceFile */); const moduleInfoMap = []; const deferredExports = []; const exportFunctionsMap = []; @@ -97479,7 +97683,7 @@ function transformSystemModule(context) { if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) { let hasExportDeclarationWithExportClause = false; for (const externalImport of moduleInfo.externalImports) { - if (externalImport.kind === 281 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 284 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -97598,11 +97802,11 @@ function transformSystemModule(context) { for (const entry of group2.externalImports) { const importVariableName = getLocalNameForExternalImport(factory2, entry, currentSourceFile); switch (entry.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: if (!entry.importClause) { break; } - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: Debug.assert(importVariableName !== void 0); statements.push( factory2.createExpressionStatement( @@ -97624,7 +97828,7 @@ function transformSystemModule(context) { ); } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: Debug.assert(importVariableName !== void 0); if (entry.exportClause) { if (isNamedExports(entry.exportClause)) { @@ -97693,13 +97897,13 @@ function transformSystemModule(context) { } function topLevelVisitor(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return visitImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return visitExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return visitExportAssignment(node); default: return topLevelNestedVisitor(node); @@ -97844,7 +98048,7 @@ function transformSystemModule(context) { } } function shouldHoistVariableDeclarationList(node) { - return (getEmitFlags(node) & 2097152 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 314 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); + return (getEmitFlags(node) & 2097152 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 317 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); } function transformInitializedVariable(node, isExportedDeclaration) { const createAssignment3 = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; @@ -97868,7 +98072,7 @@ function transformSystemModule(context) { 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 === 244 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 246 /* VariableStatement */) { const id = getOriginalNodeId(node); const isExportedDeclaration = hasSyntacticModifier(node.original, 1 /* Export */); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration); @@ -97906,10 +98110,10 @@ function transformSystemModule(context) { const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 278 /* NamedImports */: + case 281 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding); } @@ -98004,43 +98208,43 @@ function transformSystemModule(context) { } function topLevelNestedVisitor(node) { switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node, true); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatement(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return visitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return visitWhileStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return visitLabeledStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return visitWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return visitSwitchStatement(node); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return visitCaseBlock(node); - case 298 /* CaseClause */: + case 301 /* CaseClause */: return visitCaseClause(node); - case 299 /* DefaultClause */: + case 302 /* DefaultClause */: return visitDefaultClause(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return visitTryStatement(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClause(node); - case 242 /* Block */: + case 244 /* Block */: return visitBlock(node); - case 361 /* MergeDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 362 /* EndOfDeclarationMarker */: + case 365 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return visitor(node); @@ -98182,26 +98386,26 @@ function transformSystemModule(context) { return node; } switch (node.kind) { - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node, false); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (isImportCall(node)) { return visitImportCallExpression(node); } break; - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -98261,7 +98465,7 @@ function transformSystemModule(context) { return hasExportedReferenceInDestructuringTarget(node.initializer); } else if (isIdentifier(node)) { const container = resolver.getReferencedExportContainer(node); - return container !== void 0 && container.kind === 314 /* SourceFile */; + return container !== void 0 && container.kind === 317 /* SourceFile */; } else { return false; } @@ -98305,7 +98509,7 @@ function transformSystemModule(context) { return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { const id = getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -98339,7 +98543,7 @@ function transformSystemModule(context) { } function substituteUnspecified(node) { switch (node.kind) { - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return substituteShorthandPropertyAssignment(node); } return node; @@ -98381,9 +98585,9 @@ function transformSystemModule(context) { switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return substituteBinaryExpression(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return substituteMetaProperty(node); } return node; @@ -98446,7 +98650,7 @@ function transformSystemModule(context) { const valueDeclaration = resolver.getReferencedImportDeclaration(name) || resolver.getReferencedValueDeclaration(name); if (valueDeclaration) { const exportContainer = resolver.getReferencedExportContainer(name, false); - if (exportContainer && exportContainer.kind === 314 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 317 /* SourceFile */) { exportedNames = append(exportedNames, factory2.getDeclarationName(valueDeclaration)); } exportedNames = addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]); @@ -98479,7 +98683,7 @@ function transformECMAScriptModule(context) { const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(314 /* SourceFile */); + context.enableEmitNotification(317 /* SourceFile */); context.enableSubstitution(79 /* Identifier */); let helperNameSubstitutions; let currentSourceFile; @@ -98530,11 +98734,11 @@ function transformECMAScriptModule(context) { } function visitor(node) { switch (node.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return getEmitModuleKind(compilerOptions) >= 100 /* Node16 */ ? visitImportEqualsDeclaration(node) : void 0; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return visitExportAssignment(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: const exportDecl = node; return visitExportDeclaration(exportDecl); } @@ -98696,8 +98900,8 @@ function transformNodeModule(context) { const cjsOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(314 /* SourceFile */); - context.enableEmitNotification(314 /* SourceFile */); + context.enableSubstitution(317 /* SourceFile */); + context.enableEmitNotification(317 /* SourceFile */); let currentSourceFile; return transformSourceFileOrBundle; function onSubstituteNode(hint, node) { @@ -98740,7 +98944,7 @@ function transformNodeModule(context) { return result; } function transformSourceFileOrBundle(node) { - return node.kind === 314 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 317 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -98770,7 +98974,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.kind === 266 /* 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; @@ -98787,7 +98991,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.kind === 266 /* 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; @@ -98795,7 +98999,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { } } function createGetSymbolAccessibilityDiagnosticForNode(node) { - if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isAnnotationPropertyDeclaration(node) || isPropertyAccessExpression(node) || isBindingElement(node) || isConstructorDeclaration(node)) { + if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isAnnotationPropertyDeclaration(node) || isPropertyAccessExpression(node) || isBindingElement(node) || isConstructorDeclaration(node) || isOverloadPropertyDeclaration(node)) { return getVariableDeclarationTypeVisibilityError; } else if (isSetAccessor(node) || isGetAccessor(node)) { return getAccessorDeclarationTypeVisibilityError; @@ -98818,12 +99022,12 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { 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 === 261 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { + if (node.kind === 263 /* VariableDeclaration */ || node.kind === 210 /* 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 === 171 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 170 /* PropertySignature */ || node.kind === 168 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { + } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 213 /* PropertyAccessExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* 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 === 264 /* ClassDeclaration */ || node.kind === 168 /* Parameter */) { + } else if (node.parent.kind === 266 /* ClassDeclaration */ || node.kind === 169 /* 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; @@ -98840,7 +99044,7 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; - if (node.kind === 178 /* SetAccessor */) { + if (node.kind === 180 /* 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 { @@ -98862,26 +99066,26 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { function getReturnTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; switch (node.kind) { - case 180 /* ConstructSignature */: + case 182 /* 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 179 /* CallSignature */: + case 181 /* 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 181 /* IndexSignature */: + case 183 /* 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 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.kind === 266 /* 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 263 /* FunctionDeclaration */: + case 265 /* 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: @@ -98902,29 +99106,29 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 176 /* Constructor */: + case 178 /* 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 180 /* ConstructSignature */: - case 185 /* ConstructorType */: + case 182 /* ConstructSignature */: + case 187 /* 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 179 /* CallSignature */: + case 181 /* 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 181 /* IndexSignature */: + case 183 /* 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 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 266 /* 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 263 /* FunctionDeclaration */: - case 184 /* FunctionType */: + case 265 /* FunctionDeclaration */: + case 186 /* 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 178 /* SetAccessor */: - case 177 /* GetAccessor */: + case 180 /* SetAccessor */: + case 179 /* 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)}`); @@ -98933,37 +99137,37 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { function getTypeParameterConstraintVisibilityError() { let diagnosticMessage; switch (node.parent.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 200 /* MappedType */: + case 202 /* MappedType */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1; break; - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 187 /* ConstructorType */: + case 182 /* ConstructSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 179 /* CallSignature */: + case 181 /* CallSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 266 /* 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 184 /* FunctionType */: - case 263 /* FunctionDeclaration */: + case 186 /* FunctionType */: + case 265 /* FunctionDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -99016,7 +99220,7 @@ function hasInternalAnnotation(range, currentSourceFile) { } function isInternalDeclaration(node, currentSourceFile) { const parseTreeNode = getParseTreeNode(node); - if (parseTreeNode && parseTreeNode.kind === 168 /* Parameter */) { + if (parseTreeNode && parseTreeNode.kind === 169 /* Parameter */) { const paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode); const previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : void 0; const text = currentSourceFile.text; @@ -99225,10 +99429,10 @@ function transformDeclarations(context) { return result; } function transformRoot(node) { - if (node.kind === 314 /* SourceFile */ && node.isDeclarationFile) { + if (node.kind === 317 /* SourceFile */ && node.isDeclarationFile) { return node; } - if (node.kind === 315 /* Bundle */) { + if (node.kind === 318 /* Bundle */) { isBundledEmit = true; refs = new Map2(); libs2 = new Map2(); @@ -99265,7 +99469,7 @@ function transformDeclarations(context) { return factory2.updateSourceFile(sourceFile, transformAndReplaceLatePaintedStatements(updated2), true, [], [], false, []); } ), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 317 /* InputFiles */) { + if (prepend.kind === 320 /* InputFiles */) { const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; collectReferences(sourceFile, refs); @@ -99407,14 +99611,14 @@ function transformDeclarations(context) { if (name.kind === 79 /* Identifier */) { return name; } else { - if (name.kind === 207 /* ArrayBindingPattern */) { + if (name.kind === 209 /* ArrayBindingPattern */) { return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement)); } else { return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement)); } } function visitBindingElement(elem) { - if (elem.kind === 233 /* OmittedExpression */) { + if (elem.kind === 235 /* OmittedExpression */) { return elem; } if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced) { @@ -99474,14 +99678,14 @@ function transformDeclarations(context) { if (type !== void 0 && isTypeReferenceNode(type) && type.typeName.virtual) { return; } - const shouldUseResolverType = node.kind === 168 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); + const shouldUseResolverType = node.kind === 169 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); if (type && !shouldUseResolverType) { return visitNode(type, visitDeclarationSubtree); } if (!getParseTreeNode(node)) { return type ? visitNode(type, visitDeclarationSubtree) : factory2.createKeywordTypeNode(132 /* AnyKeyword */); } - if (node.kind === 178 /* SetAccessor */) { + if (node.kind === 180 /* SetAccessor */) { return factory2.createKeywordTypeNode(132 /* AnyKeyword */); } errorNameNode = node.name; @@ -99490,10 +99694,10 @@ function transformDeclarations(context) { oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); } - if (node.kind === 261 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { + if (node.kind === 263 /* VariableDeclaration */ || node.kind === 210 /* BindingElement */) { return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); } - if (node.kind === 168 /* Parameter */ || node.kind === 171 /* PropertyDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 172 /* AnnotationPropertyDeclaration */) { + if (node.kind === 169 /* Parameter */ || node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 173 /* AnnotationPropertyDeclaration */ || node.kind === 174 /* OverloadPropertyDeclaration */) { 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)); @@ -99510,23 +99714,23 @@ function transformDeclarations(context) { function isDeclarationAndNotVisible(node) { node = getParseTreeNode(node); switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 270 /* ModuleDeclaration */: - case 267 /* InterfaceDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 266 /* AnnotationDeclaration */: + case 265 /* FunctionDeclaration */: + case 273 /* ModuleDeclaration */: + case 270 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 268 /* AnnotationDeclaration */: return !resolver.isDeclarationVisible(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return !getBindingNameVisible(node); - case 274 /* ImportEqualsDeclaration */: - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: + case 277 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: return false; - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return true; } return false; @@ -99591,7 +99795,7 @@ function transformDeclarations(context) { return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree); } function isEnclosingDeclaration(node) { - return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isStructDeclaration(node) || isAnnotationDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node); + return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isStructDeclaration(node) || isAnnotationDeclaration(node) || isOverloadDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node); } function checkEntityNameVisibility(entityName, enclosingDeclaration2) { const visibilityResult = resolver.isEntityNameVisible(entityName, enclosingDeclaration2); @@ -99607,7 +99811,7 @@ function transformDeclarations(context) { function rewriteModuleSpecifier(parent2, input) { if (!input) return void 0; - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 270 /* ModuleDeclaration */ && parent2.kind !== 205 /* ImportType */; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 273 /* ModuleDeclaration */ && parent2.kind !== 207 /* ImportType */; if (isStringLiteralLike(input)) { if (isBundledEmit) { const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent2); @@ -99626,7 +99830,7 @@ function transformDeclarations(context) { function transformImportEqualsDeclaration(decl) { if (!resolver.isDeclarationVisible(decl)) return; - if (decl.moduleReference.kind === 286 /* ExternalModuleReference */) { + if (decl.moduleReference.kind === 289 /* ExternalModuleReference */) { const specifier = getExternalModuleImportEqualsDeclarationExpression(decl); return factory2.updateImportEqualsDeclaration( decl, @@ -99662,7 +99866,7 @@ function transformDeclarations(context) { void 0 ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); } - if (decl.importClause.namedBindings.kind === 277 /* NamespaceImport */) { + if (decl.importClause.namedBindings.kind === 280 /* NamespaceImport */) { const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : void 0; return visibleDefaultBinding || namedBindings ? factory2.updateImportDeclaration(decl, decl.modifiers, factory2.updateImportClause( decl.importClause, @@ -99773,7 +99977,7 @@ function transformDeclarations(context) { const oldDiag = getSymbolAccessibilityDiagnostic; const canProduceDiagnostic = canProduceDiagnostics(input); const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; - let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 187 /* TypeLiteral */ || input.kind === 200 /* MappedType */) && input.parent.kind !== 268 /* TypeAliasDeclaration */; + let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 189 /* TypeLiteral */ || input.kind === 202 /* MappedType */) && input.parent.kind !== 271 /* TypeAliasDeclaration */; if (isMethodDeclaration(input) || isMethodSignature(input)) { if (hasEffectiveModifier(input, 8 /* Private */)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) @@ -99792,26 +99996,26 @@ function transformDeclarations(context) { } if (isProcessedComponent(input)) { switch (input.kind) { - case 234 /* ExpressionWithTypeArguments */: { + case 236 /* 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 183 /* TypeReference */: { + case 185 /* TypeReference */: { checkEntityNameVisibility(input.typeName, enclosingDeclaration); const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateTypeReferenceNode(node, node.typeName, node.typeArguments)); } - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: return cleanup(factory2.updateConstructSignature( input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type) )); - case 176 /* Constructor */: { + case 178 /* Constructor */: { const ctor = factory2.createConstructorDeclaration( ensureModifiers(input), updateParamsList(input, input.parameters, 0 /* None */), @@ -99819,7 +100023,7 @@ function transformDeclarations(context) { ); return cleanup(ctor); } - case 174 /* MethodDeclaration */: { + case 176 /* MethodDeclaration */: { if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -99837,7 +100041,7 @@ function transformDeclarations(context) { ); return cleanup(sig); } - case 177 /* GetAccessor */: { + case 179 /* GetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -99851,7 +100055,7 @@ function transformDeclarations(context) { void 0 )); } - case 178 /* SetAccessor */: { + case 180 /* SetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -99863,7 +100067,7 @@ function transformDeclarations(context) { void 0 )); } - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -99876,14 +100080,14 @@ function transformDeclarations(context) { ensureType(input, input.type), ensureNoInitializer(input) )); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return cleanup(factory2.updateAnnotationPropertyDeclaration( input, input.name, ensureType(input, input.type), input.initializer )); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -99894,7 +100098,18 @@ function transformDeclarations(context) { input.questionToken, ensureType(input, input.type) )); - case 173 /* MethodSignature */: { + case 174 /* OverloadPropertyDeclaration */: + if (isPrivateIdentifier(input.name)) { + return cleanup(void 0); + } + return cleanup(factory2.updateOverloadPropertyDeclaration( + input, + ensureModifiers(input), + input.name, + input.questionToken, + ensureType(input, input.type) + )); + case 175 /* MethodSignature */: { if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -99908,7 +100123,7 @@ function transformDeclarations(context) { ensureType(input, input.type) )); } - case 179 /* CallSignature */: { + case 181 /* CallSignature */: { return cleanup(factory2.updateCallSignature( input, ensureTypeParams(input, input.typeParameters), @@ -99916,7 +100131,7 @@ function transformDeclarations(context) { ensureType(input, input.type) )); } - case 181 /* IndexSignature */: { + case 183 /* IndexSignature */: { return cleanup(factory2.updateIndexSignature( input, ensureModifiers(input), @@ -99924,7 +100139,7 @@ function transformDeclarations(context) { visitNode(input.type, visitDeclarationSubtree) || factory2.createKeywordTypeNode(132 /* AnyKeyword */) )); } - case 261 /* VariableDeclaration */: { + case 263 /* VariableDeclaration */: { if (isBindingPattern(input.name)) { return recreateBindingPattern(input.name); } @@ -99932,13 +100147,13 @@ function transformDeclarations(context) { suppressNewDiagnosticContexts = true; return cleanup(factory2.updateVariableDeclaration(input, input.name, void 0, ensureType(input, input.type), ensureNoInitializer(input))); } - case 167 /* TypeParameter */: { + case 168 /* TypeParameter */: { if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { return cleanup(factory2.updateTypeParameterDeclaration(input, input.modifiers, input.name, void 0, void 0)); } return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); } - case 194 /* ConditionalType */: { + case 196 /* ConditionalType */: { const checkType = visitNode(input.checkType, visitDeclarationSubtree); const extendsType = visitNode(input.extendsType, visitDeclarationSubtree); const oldEnclosingDecl = enclosingDeclaration; @@ -99948,13 +100163,13 @@ function transformDeclarations(context) { const falseType = visitNode(input.falseType, visitDeclarationSubtree); return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType)); } - case 184 /* FunctionType */: { + case 186 /* FunctionType */: { return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree))); } - case 185 /* ConstructorType */: { + case 187 /* ConstructorType */: { return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree))); } - case 205 /* ImportType */: { + case 207 /* ImportType */: { if (!isLiteralImportTypeNode(input)) return cleanup(input); return cleanup(factory2.updateImportTypeNode( @@ -99994,7 +100209,7 @@ function transformDeclarations(context) { } } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); + return node.parent.kind === 176 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); } function visitDeclarationStatements(input) { if (!isPreservedDeclarationStatement(input)) { @@ -100003,7 +100218,7 @@ function transformDeclarations(context) { if (shouldStripInternal(input)) return; switch (input.kind) { - case 281 /* ExportDeclaration */: { + case 284 /* ExportDeclaration */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -100017,7 +100232,7 @@ function transformDeclarations(context) { getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0 ); } - case 280 /* ExportAssignment */: { + case 283 /* ExportAssignment */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -100059,10 +100274,10 @@ function transformDeclarations(context) { if (shouldStripInternal(input)) return; switch (input.kind) { - case 274 /* ImportEqualsDeclaration */: { + case 277 /* ImportEqualsDeclaration */: { return transformImportEqualsDeclaration(input); } - case 275 /* ImportDeclaration */: { + case 278 /* ImportDeclaration */: { return transformImportDeclaration(input); } } @@ -100082,7 +100297,7 @@ function transformDeclarations(context) { } const previousNeedsDeclare = needsDeclare; switch (input.kind) { - case 268 /* TypeAliasDeclaration */: { + case 271 /* TypeAliasDeclaration */: { needsDeclare = false; const clean2 = cleanup(factory2.updateTypeAliasDeclaration( input, @@ -100097,7 +100312,7 @@ function transformDeclarations(context) { needsDeclare = previousNeedsDeclare; return clean2; } - case 267 /* InterfaceDeclaration */: { + case 270 /* InterfaceDeclaration */: { return cleanup(factory2.updateInterfaceDeclaration( input, ensureModifiers(input), @@ -100107,7 +100322,7 @@ function transformDeclarations(context) { visitNodes2(input.members, visitDeclarationSubtree) )); } - case 263 /* FunctionDeclaration */: { + case 265 /* FunctionDeclaration */: { const clean2 = cleanup(factory2.updateFunctionDeclaration( input, ensureModifiers(input), @@ -100197,10 +100412,10 @@ function transformDeclarations(context) { return clean2; } } - case 270 /* ModuleDeclaration */: { + case 273 /* ModuleDeclaration */: { needsDeclare = false; const inner = input.body; - if (inner && inner.kind === 271 /* ModuleBlock */) { + if (inner && inner.kind === 274 /* ModuleBlock */) { const oldNeedsScopeFix = needsScopeFixMarker; const oldHasScopeFix = resultHasScopeMarker; resultHasScopeMarker = false; @@ -100244,7 +100459,7 @@ function transformDeclarations(context) { )); } } - case 265 /* StructDeclaration */: { + case 267 /* StructDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const decorators = ensureEtsDecorators(input, host); @@ -100261,7 +100476,7 @@ function transformDeclarations(context) { members )); } - case 266 /* AnnotationDeclaration */: { + case 268 /* AnnotationDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -100274,7 +100489,20 @@ function transformDeclarations(context) { members )); } - case 264 /* ClassDeclaration */: { + case 269 /* OverloadDeclaration */: { + errorNameNode = input.name; + errorFallbackNode = input; + const modifiers = factory2.createNodeArray(ensureModifiers(input)); + const memberNodes = visitNodes2(input.members, visitDeclarationSubtree); + const members = factory2.createNodeArray(memberNodes); + return cleanup(factory2.updateOverloadDeclaration( + input, + modifiers, + input.name, + members + )); + } + case 266 /* ClassDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -100377,10 +100605,10 @@ function transformDeclarations(context) { )); } } - case 244 /* VariableStatement */: { + case 246 /* VariableStatement */: { return cleanup(transformVariableStatement(input)); } - case 269 /* EnumDeclaration */: { + case 272 /* EnumDeclaration */: { return cleanup(factory2.updateEnumDeclaration(input, factory2.createNodeArray(ensureModifiers(input)), input.name, factory2.createNodeArray(mapDefined(input.members, (m) => { if (shouldStripInternal(m)) return; @@ -100396,7 +100624,7 @@ function transformDeclarations(context) { if (canProdiceDiagnostic) { getSymbolAccessibilityDiagnostic = oldDiag; } - if (input.kind === 270 /* ModuleDeclaration */) { + if (input.kind === 273 /* ModuleDeclaration */) { needsDeclare = previousNeedsDeclare; } if (node === input) { @@ -100419,7 +100647,7 @@ function transformDeclarations(context) { return flatten(mapDefined(d.elements, (e) => recreateBindingElement(e))); } function recreateBindingElement(e) { - if (e.kind === 233 /* OmittedExpression */) { + if (e.kind === 235 /* OmittedExpression */) { return; } if (e.name) { @@ -100468,7 +100696,7 @@ function transformDeclarations(context) { 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 === 314 /* SourceFile */; + const parentIsFile = node.parent.kind === 317 /* SourceFile */; if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { mask2 ^= 2 /* Ambient */; additions = 0 /* None */; @@ -100494,7 +100722,7 @@ function transformDeclarations(context) { } } function isAlwaysType(node) { - if (node.kind === 267 /* InterfaceDeclaration */) { + if (node.kind === 270 /* InterfaceDeclaration */) { return true; } return false; @@ -100514,60 +100742,62 @@ function maskModifierFlags(node, modifierMask = 258047 /* All */ ^ 4 /* Public * } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 177 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; + return accessor.kind === 179 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; } } function canHaveLiteralInitializer(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return !hasEffectiveModifier(node, 8 /* Private */); - case 168 /* Parameter */: - case 261 /* VariableDeclaration */: + case 169 /* Parameter */: + case 263 /* VariableDeclaration */: return true; } return false; } function isPreservedDeclarationStatement(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 270 /* ModuleDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 267 /* InterfaceDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 244 /* VariableStatement */: - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: + case 265 /* FunctionDeclaration */: + case 273 /* ModuleDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 270 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 246 /* VariableStatement */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: return true; } return false; } function isProcessedComponent(node) { switch (node.kind) { - case 180 /* ConstructSignature */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 181 /* IndexSignature */: - case 261 /* VariableDeclaration */: - case 167 /* TypeParameter */: - case 234 /* ExpressionWithTypeArguments */: - case 183 /* TypeReference */: - case 194 /* ConditionalType */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 205 /* ImportType */: + case 182 /* ConstructSignature */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 171 /* PropertySignature */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 183 /* IndexSignature */: + case 263 /* VariableDeclaration */: + case 168 /* TypeParameter */: + case 236 /* ExpressionWithTypeArguments */: + case 185 /* TypeReference */: + case 196 /* ConditionalType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 207 /* ImportType */: return true; } return false; @@ -100671,7 +100901,7 @@ function noEmitNotification(hint, node, callback) { } function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) { var _a2, _b; - const enabledSyntaxKindFeatures = new Array(364 /* Count */); + const enabledSyntaxKindFeatures = new Array(367 /* Count */); let lexicalEnvironmentVariableDeclarations; let lexicalEnvironmentFunctionDeclarations; let lexicalEnvironmentStatements; @@ -100750,7 +100980,7 @@ function transformNodes(resolver, host, factory2, options, nodes, transformers, state = 1 /* Initialized */; const transformed = []; for (const node of nodes) { - (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Emit, "transformNodes", node.kind === 314 /* 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 === 317 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); PerformanceDotting.start("transformRoot"); transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); PerformanceDotting.stop("transformRoot"); @@ -101067,7 +101297,7 @@ function getOutputPathsForBundle(options, forceDtsPaths) { } function getOutputPathsFor(sourceFile, host, forceDtsPaths) { const options = host.getCompilerOptions(); - if (sourceFile.kind === 315 /* Bundle */) { + if (sourceFile.kind === 318 /* Bundle */) { return getOutputPathsForBundle(options, forceDtsPaths); } else { const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options)); @@ -101440,8 +101670,8 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform2, printer3, mapOptions) { const sourceFileOrBundle = transform2.transformed[0]; - const bundle = sourceFileOrBundle.kind === 315 /* Bundle */ ? sourceFileOrBundle : void 0; - const sourceFile = sourceFileOrBundle.kind === 314 /* SourceFile */ ? sourceFileOrBundle : void 0; + const bundle = sourceFileOrBundle.kind === 318 /* Bundle */ ? sourceFileOrBundle : void 0; + const sourceFile = sourceFileOrBundle.kind === 317 /* SourceFile */ ? sourceFileOrBundle : void 0; const sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; let sourceMapGenerator; if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) { @@ -101495,7 +101725,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla writer.clear(); } function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) { - return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 314 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); + return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 317 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); } function getSourceRoot(mapOptions) { const sourceRoot = normalizeSlashes(mapOptions.sourceRoot || ""); @@ -101846,11 +102076,11 @@ function createPrinter(printerOptions = {}, handlers = {}) { break; } switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: return printFile(node); - case 315 /* Bundle */: + case 318 /* Bundle */: return printBundle(node); - case 316 /* UnparsedSource */: + case 319 /* UnparsedSource */: return printUnparsedSource(node); } writeNode(hint, node, sourceFile, beginPrint()); @@ -102164,300 +102394,304 @@ function createPrinter(printerOptions = {}, handlers = {}) { return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return emitQualifiedName(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return emitTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return emitParameter(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return emitDecorator(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return emitPropertySignature(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return emitPropertyDeclaration(node); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return emitAnnotationPropertyDeclaration(node); - case 173 /* MethodSignature */: + case 174 /* OverloadPropertyDeclaration */: + return emitOverloadPropertyDeclaration(node); + case 175 /* MethodSignature */: return emitMethodSignature(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return emitMethodDeclaration(node); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return emitClassStaticBlockDeclaration(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return emitConstructor(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return emitAccessorDeclaration(node); - case 179 /* CallSignature */: + case 181 /* CallSignature */: return emitCallSignature(node); - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: return emitConstructSignature(node); - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return emitIndexSignature(node); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return emitTypePredicate(node); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return emitTypeReference(node); - case 184 /* FunctionType */: + case 186 /* FunctionType */: return emitFunctionType(node); - case 185 /* ConstructorType */: + case 187 /* ConstructorType */: return emitConstructorType(node); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return emitTypeQuery(node); - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: return emitTypeLiteral(node); - case 188 /* ArrayType */: + case 190 /* ArrayType */: return emitArrayType(node); - case 189 /* TupleType */: + case 191 /* TupleType */: return emitTupleType(node); - case 190 /* OptionalType */: + case 192 /* OptionalType */: return emitOptionalType(node); - case 192 /* UnionType */: + case 194 /* UnionType */: return emitUnionType(node); - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return emitIntersectionType(node); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return emitConditionalType(node); - case 195 /* InferType */: + case 197 /* InferType */: return emitInferType(node); - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return emitParenthesizedType(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 197 /* ThisType */: + case 199 /* ThisType */: return emitThisType(); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return emitTypeOperator(node); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return emitIndexedAccessType(node); - case 200 /* MappedType */: + case 202 /* MappedType */: return emitMappedType(node); - case 201 /* LiteralType */: + case 203 /* LiteralType */: return emitLiteralType(node); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return emitNamedTupleMember(node); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: return emitTemplateType(node); - case 204 /* TemplateLiteralTypeSpan */: + case 206 /* TemplateLiteralTypeSpan */: return emitTemplateTypeSpan(node); - case 205 /* ImportType */: + case 207 /* ImportType */: return emitImportTypeNode(node); - case 206 /* ObjectBindingPattern */: + case 208 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return emitBindingElement(node); - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return emitTemplateSpan(node); - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: return emitSemicolonClassElement(); - case 242 /* Block */: + case 244 /* Block */: return emitBlock(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return emitVariableStatement(node); - case 243 /* EmptyStatement */: + case 245 /* EmptyStatement */: return emitEmptyStatement(false); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return emitExpressionStatement(node); - case 246 /* IfStatement */: + case 248 /* IfStatement */: return emitIfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return emitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return emitWhileStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return emitForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return emitForInStatement(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return emitForOfStatement(node); - case 252 /* ContinueStatement */: + case 254 /* ContinueStatement */: return emitContinueStatement(node); - case 253 /* BreakStatement */: + case 255 /* BreakStatement */: return emitBreakStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return emitReturnStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return emitWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return emitSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return emitLabeledStatement(node); - case 258 /* ThrowStatement */: + case 260 /* ThrowStatement */: return emitThrowStatement(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return emitTryStatement(node); - case 260 /* DebuggerStatement */: + case 262 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return emitVariableDeclarationList(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return emitFunctionDeclaration(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return emitClassOrStructDeclaration(node); - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return emitClassOrStructDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return emitAnnotationDeclaration(node); - case 267 /* InterfaceDeclaration */: + case 269 /* OverloadDeclaration */: + return emitOverloadDeclaration(node); + case 270 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return emitModuleBlock(node); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return emitCaseBlock(node); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return emitNamespaceExportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return emitImportDeclaration(node); - case 276 /* ImportClause */: + case 279 /* ImportClause */: return emitImportClause(node); - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return emitNamespaceImport(node); - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: return emitNamespaceExport(node); - case 278 /* NamedImports */: + case 281 /* NamedImports */: return emitNamedImports(node); - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return emitImportSpecifier(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return emitExportAssignment(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return emitExportDeclaration(node); - case 282 /* NamedExports */: + case 285 /* NamedExports */: return emitNamedExports(node); - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: return emitExportSpecifier(node); - case 302 /* AssertClause */: + case 305 /* AssertClause */: return emitAssertClause(node); - case 303 /* AssertEntry */: + case 306 /* AssertEntry */: return emitAssertEntry(node); - case 285 /* MissingDeclaration */: + case 288 /* MissingDeclaration */: return; - case 286 /* ExternalModuleReference */: + case 289 /* ExternalModuleReference */: return emitExternalModuleReference(node); case 11 /* JsxText */: return emitJsxText(node); - case 289 /* JsxOpeningElement */: - case 292 /* JsxOpeningFragment */: + case 292 /* JsxOpeningElement */: + case 295 /* JsxOpeningFragment */: return emitJsxOpeningElementOrFragment(node); - case 290 /* JsxClosingElement */: - case 293 /* JsxClosingFragment */: + case 293 /* JsxClosingElement */: + case 296 /* JsxClosingFragment */: return emitJsxClosingElementOrFragment(node); - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: return emitJsxAttribute(node); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return emitJsxAttributes(node); - case 296 /* JsxSpreadAttribute */: + case 299 /* JsxSpreadAttribute */: return emitJsxSpreadAttribute(node); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return emitJsxExpression(node); - case 298 /* CaseClause */: + case 301 /* CaseClause */: return emitCaseClause(node); - case 299 /* DefaultClause */: + case 302 /* DefaultClause */: return emitDefaultClause(node); - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return emitHeritageClause(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return emitCatchClause(node); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: return emitSpreadAssignment(node); - case 308 /* EnumMember */: + case 311 /* EnumMember */: return emitEnumMember(node); - case 309 /* UnparsedPrologue */: + case 312 /* UnparsedPrologue */: return writeUnparsedNode(node); - case 316 /* UnparsedSource */: - case 310 /* UnparsedPrepend */: + case 319 /* UnparsedSource */: + case 313 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); - case 311 /* UnparsedText */: - case 312 /* UnparsedInternalText */: + case 314 /* UnparsedText */: + case 315 /* UnparsedInternalText */: return emitUnparsedTextLike(node); - case 313 /* UnparsedSyntheticReference */: + case 316 /* UnparsedSyntheticReference */: return emitUnparsedSyntheticReference(node); - case 314 /* SourceFile */: + case 317 /* SourceFile */: return emitSourceFile(node); - case 315 /* Bundle */: + case 318 /* Bundle */: return Debug.fail("Bundles should be printed using printBundle"); - case 317 /* InputFiles */: + case 320 /* InputFiles */: return Debug.fail("InputFiles should not be printed"); - case 318 /* JSDocTypeExpression */: + case 321 /* JSDocTypeExpression */: return emitJSDocTypeExpression(node); - case 319 /* JSDocNameReference */: + case 322 /* JSDocNameReference */: return emitJSDocNameReference(node); - case 321 /* JSDocAllType */: + case 324 /* JSDocAllType */: return writePunctuation("*"); - case 322 /* JSDocUnknownType */: + case 325 /* JSDocUnknownType */: return writePunctuation("?"); - case 323 /* JSDocNullableType */: + case 326 /* JSDocNullableType */: return emitJSDocNullableType(node); - case 324 /* JSDocNonNullableType */: + case 327 /* JSDocNonNullableType */: return emitJSDocNonNullableType(node); - case 325 /* JSDocOptionalType */: + case 328 /* JSDocOptionalType */: return emitJSDocOptionalType(node); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: return emitJSDocFunctionType(node); - case 191 /* RestType */: - case 327 /* JSDocVariadicType */: + case 193 /* RestType */: + case 330 /* JSDocVariadicType */: return emitRestOrJSDocVariadicType(node); - case 328 /* JSDocNamepathType */: + case 331 /* JSDocNamepathType */: return; - case 329 /* JSDoc */: + case 332 /* JSDoc */: return emitJSDoc(node); - case 331 /* JSDocTypeLiteral */: + case 334 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 332 /* JSDocSignature */: + case 335 /* JSDocSignature */: return emitJSDocSignature(node); - case 336 /* JSDocTag */: - case 341 /* JSDocClassTag */: - case 346 /* JSDocOverrideTag */: + case 339 /* JSDocTag */: + case 344 /* JSDocClassTag */: + case 349 /* JSDocOverrideTag */: return emitJSDocSimpleTag(node); - case 337 /* JSDocAugmentsTag */: - case 338 /* JSDocImplementsTag */: + case 340 /* JSDocAugmentsTag */: + case 341 /* JSDocImplementsTag */: return emitJSDocHeritageTag(node); - case 339 /* JSDocAuthorTag */: - case 340 /* JSDocDeprecatedTag */: + case 342 /* JSDocAuthorTag */: + case 343 /* JSDocDeprecatedTag */: return; - case 342 /* JSDocPublicTag */: - case 343 /* JSDocPrivateTag */: - case 344 /* JSDocProtectedTag */: - case 345 /* JSDocReadonlyTag */: + case 345 /* JSDocPublicTag */: + case 346 /* JSDocPrivateTag */: + case 347 /* JSDocProtectedTag */: + case 348 /* JSDocReadonlyTag */: return; - case 347 /* JSDocCallbackTag */: + case 350 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); - case 349 /* JSDocParameterTag */: - case 356 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: + case 359 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 348 /* JSDocEnumTag */: - case 350 /* JSDocReturnTag */: - case 351 /* JSDocThisTag */: - case 352 /* JSDocTypeTag */: + case 351 /* JSDocEnumTag */: + case 353 /* JSDocReturnTag */: + case 354 /* JSDocThisTag */: + case 355 /* JSDocTypeTag */: return emitJSDocSimpleTypedTag(node); - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 355 /* JSDocSeeTag */: + case 358 /* JSDocSeeTag */: return emitJSDocSeeTag(node); - case 358 /* NotEmittedStatement */: - case 362 /* EndOfDeclarationMarker */: - case 361 /* MergeDeclarationMarker */: + case 361 /* NotEmittedStatement */: + case 365 /* EndOfDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: return; } if (isExpression(node)) { @@ -102486,84 +102720,84 @@ function createPrinter(printerOptions = {}, handlers = {}) { return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return emitArrayLiteralExpression(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return emitObjectLiteralExpression(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return emitPropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return emitElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return emitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return emitNewExpression(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: return emitTypeAssertionExpression(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return emitParenthesizedExpression(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return emitFunctionExpression(node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return emitArrowFunction(node); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return emitDeleteExpression(node); - case 222 /* TypeOfExpression */: + case 224 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return emitVoidExpression(node); - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return emitAwaitExpression(node); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return emitBinaryExpression(node); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return emitConditionalExpression(node); - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: return emitTemplateExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return emitYieldExpression(node); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return emitSpreadElement(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return emitClassExpression(node); - case 233 /* OmittedExpression */: + case 235 /* OmittedExpression */: return; - case 235 /* AsExpression */: + case 237 /* AsExpression */: return emitAsExpression(node); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return emitNonNullExpression(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return emitSatisfiesExpression(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return emitMetaProperty(node); - case 238 /* SyntheticExpression */: + case 240 /* SyntheticExpression */: return Debug.fail("SyntheticExpression should never be printed."); - case 287 /* JsxElement */: + case 290 /* JsxElement */: return emitJsxElement(node); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return emitJsxSelfClosingElement(node); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return emitJsxFragment(node); - case 357 /* SyntaxList */: + case 360 /* SyntaxList */: return Debug.fail("SyntaxList should not be printed"); - case 358 /* NotEmittedStatement */: + case 361 /* NotEmittedStatement */: return; - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return emitCommaList(node); - case 361 /* MergeDeclarationMarker */: - case 362 /* EndOfDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: + case 365 /* EndOfDeclarationMarker */: return; - case 363 /* SyntheticReferenceExpression */: + case 366 /* SyntheticReferenceExpression */: return Debug.fail("SyntheticReferenceExpression should not be printed"); } } @@ -102614,7 +102848,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitHelpers(node) { let helpersEmitted = false; - const bundle = node.kind === 315 /* Bundle */ ? node : void 0; + const bundle = node.kind === 318 /* Bundle */ ? node : void 0; if (bundle && moduleKind === 0 /* None */) { return; } @@ -102685,7 +102919,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { updateOrPushBundleFileTextLike( pos, writer.getTextPos(), - unparsed.kind === 311 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ + unparsed.kind === 314 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ ); } } @@ -102716,7 +102950,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitTabStop(hint, node, snippet) { Debug.assert( - node.kind === 243 /* EmptyStatement */, + node.kind === 245 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` ); Debug.assert( @@ -102772,7 +103006,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emit(node.dotDotDotToken); emitNodeWithWriter(node.name, writeParameter); emit(node.questionToken); - if (node.parent && node.parent.kind === 326 /* JSDocFunctionType */ && !node.name) { + if (node.parent && node.parent.kind === 329 /* JSDocFunctionType */ && !node.name) { emit(node.type); } else { emitTypeAnnotation(node.type); @@ -102790,6 +103024,11 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitTypeAnnotation(node.type); writeTrailingSemicolon(); } + function emitOverloadPropertyDeclaration(node) { + emitModifiers(node, node.modifiers); + emitNodeWithWriter(node.name, writeProperty); + emit(node.questionToken); + } function emitPropertyDeclaration(node) { emitDecoratorsAndModifiers(node, node.modifiers); emit(node.name); @@ -102834,7 +103073,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitAccessorDeclaration(node) { emitDecoratorsAndModifiers(node, node.modifiers); - writeKeyword(node.kind === 177 /* GetAccessor */ ? "get" : "set"); + writeKeyword(node.kind === 179 /* GetAccessor */ ? "get" : "set"); writeSpace(); emit(node.name); emitSignatureAndBody(node, emitSignatureHead); @@ -103263,7 +103502,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function shouldEmitWhitespaceBeforeOperand(node) { const operand = node.operand; - return operand.kind === 225 /* 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 === 227 /* 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); @@ -103459,7 +103698,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (node.elseStatement) { writeLineOrSpace(node, node.thenStatement, node.elseStatement); emitTokenWithComment(92 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); - if (node.elseStatement.kind === 246 /* IfStatement */) { + if (node.elseStatement.kind === 248 /* IfStatement */) { writeSpace(); emit(node.elseStatement); } else { @@ -103520,7 +103759,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(164 /* OfKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(165 /* OfKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); @@ -103528,7 +103767,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitForBinding(node) { if (node !== void 0) { - if (node.kind === 262 /* VariableDeclarationList */) { + if (node.kind === 264 /* VariableDeclarationList */) { emit(node); } else { emitExpression(node); @@ -103564,7 +103803,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } pos = writeTokenText(token, writer2, pos); if (isSimilarNode && contextNode.end !== pos) { - const isJsxExprContext = contextNode.kind === 297 /* JsxExpression */; + const isJsxExprContext = contextNode.kind === 300 /* JsxExpression */; emitTrailingCommentsOfPosition(pos, !isJsxExprContext, isJsxExprContext); } return pos; @@ -103823,6 +104062,25 @@ function createPrinter(printerOptions = {}, handlers = {}) { decreaseIndent(); } } + function emitOverloadDeclaration(node) { + emitDecoratorsAndModifiers(node, node.modifiers); + writeKeyword("overload"); + if (node.name) { + writeSpace(); + emitIdentifierName(node.name); + } + const indentedFlag = getEmitFlags(node) & 65536 /* Indented */; + if (indentedFlag) { + increaseIndent(); + } + writeSpace(); + writePunctuation("{"); + emitList(node, node.members, 145 /* EnumMembers */); + writePunctuation("}"); + if (indentedFlag) { + decreaseIndent(); + } + } function emitTypeAliasDeclaration(node) { if (isSendableFunctionOrType(node, true)) { emitDecorators(node, node.illegalDecorators); @@ -104220,7 +104478,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 352 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 355 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } else { @@ -104264,7 +104522,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { function emitJSDocTypedefTag(tag) { emitJSDocTagName(tag.tagName); if (tag.typeExpression) { - if (tag.typeExpression.kind === 318 /* JSDocTypeExpression */) { + if (tag.typeExpression.kind === 321 /* JSDocTypeExpression */) { emitJSDocTypeExpression(tag.typeExpression); } else { writeSpace(); @@ -104282,7 +104540,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emit(tag.fullName); } emitJSDocComment(tag.comment); - if (tag.typeExpression && tag.typeExpression.kind === 331 /* JSDocTypeLiteral */) { + if (tag.typeExpression && tag.typeExpression.kind === 334 /* JSDocTypeLiteral */) { emitJSDocTypeLiteral(tag.typeExpression); } } @@ -105098,7 +105356,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { return block.statements.length === 0 && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile)); } function skipSynthesizedParentheses(node) { - while (node.kind === 217 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { + while (node.kind === 219 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -105168,84 +105426,84 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (!node) return; switch (node.kind) { - case 242 /* Block */: + case 244 /* Block */: forEach(node.statements, generateNames); break; - case 257 /* LabeledStatement */: - case 255 /* WithStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 259 /* LabeledStatement */: + case 257 /* WithStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: generateNames(node.statement); break; - case 246 /* IfStatement */: + case 248 /* IfStatement */: generateNames(node.thenStatement); generateNames(node.elseStatement); break; - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: - case 250 /* ForInStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: + case 252 /* ForInStatement */: generateNames(node.initializer); generateNames(node.statement); break; - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: generateNames(node.caseBlock); break; - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: forEach(node.clauses, generateNames); break; - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: forEach(node.statements, generateNames); break; - case 259 /* TryStatement */: + case 261 /* TryStatement */: generateNames(node.tryBlock); generateNames(node.catchClause); generateNames(node.finallyBlock); break; - case 301 /* CatchClause */: + case 304 /* CatchClause */: generateNames(node.variableDeclaration); generateNames(node.block); break; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: generateNames(node.declarationList); break; - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: forEach(node.declarations, generateNames); break; - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: generateNameIfNeeded(node.name); break; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: generateNameIfNeeded(node.name); if (getEmitFlags(node) & 524288 /* ReuseTempVariableScope */) { forEach(node.parameters, generateNames); generateNames(node.body); } break; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: forEach(node.elements, generateNames); break; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: generateNames(node.importClause); break; - case 276 /* ImportClause */: + case 279 /* ImportClause */: generateNameIfNeeded(node.name); generateNames(node.namedBindings); break; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: generateNameIfNeeded(node.name); break; - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: generateNameIfNeeded(node.name); break; - case 278 /* NamedImports */: + case 281 /* NamedImports */: forEach(node.elements, generateNames); break; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: generateNameIfNeeded(node.propertyName || node.name); break; } @@ -105254,13 +105512,13 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (!node) return; switch (node.kind) { - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: generateNameIfNeeded(node.name); break; } @@ -105434,27 +105692,27 @@ function createPrinter(printerOptions = {}, handlers = {}) { prefix, suffix ); - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForModuleOrEnum(node); - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForImportOrExportDeclaration(node); - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 280 /* ExportAssignment */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 283 /* ExportAssignment */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForExportDefault(); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForClassExpression(); - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return generateNameForMethodOrAccessor(node, privateName, prefix, suffix); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return makeTempVariableName(TempFlags.Auto, true, privateName, prefix, suffix); default: return makeTempVariableName(TempFlags.Auto, false, privateName, prefix, suffix); @@ -105545,14 +105803,14 @@ function createPrinter(printerOptions = {}, handlers = {}) { const skipTrailingComments = end < 0 || (emitFlags & 1024 /* NoTrailingComments */) !== 0 || node.kind === 11 /* JsxText */; if ((pos > 0 || end > 0) && pos !== end) { if (!skipLeadingComments) { - emitLeadingComments(pos, node.kind !== 358 /* NotEmittedStatement */); + emitLeadingComments(pos, node.kind !== 361 /* NotEmittedStatement */); } if (!skipLeadingComments || pos >= 0 && (emitFlags & 512 /* NoLeadingComments */) !== 0) { containerPos = pos; } if (!skipTrailingComments || end >= 0 && (emitFlags & 1024 /* NoTrailingComments */) !== 0) { containerEnd = end; - if (node.kind === 262 /* VariableDeclarationList */) { + if (node.kind === 264 /* VariableDeclarationList */) { declarationListContainerEnd = end; } } @@ -105568,7 +105826,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { containerPos = savedContainerPos; containerEnd = savedContainerEnd; declarationListContainerEnd = savedDeclarationListContainerEnd; - if (!skipTrailingComments && node.kind !== 358 /* NotEmittedStatement */) { + if (!skipTrailingComments && node.kind !== 361 /* NotEmittedStatement */) { emitTrailingComments(end); } } @@ -105820,7 +106078,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } } else { const source = sourceMapRange.source || sourceMapSource; - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { + if (node.kind !== 361 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos)); } if (emitFlags & 64 /* NoNestedSourceMaps */) { @@ -105835,7 +106093,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (emitFlags & 64 /* NoNestedSourceMaps */) { sourceMapsDisabled = false; } - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { + if (node.kind !== 361 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end); } } @@ -108237,89 +108495,89 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return diagnostics; function walk(node, parent2) { switch (parent2.kind) { - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: if (parent2.questionToken === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); return "skip"; } - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 261 /* VariableDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 221 /* ArrowFunction */: + case 263 /* 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 276 /* ImportClause */: + case 279 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(parent2, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); return "skip"; } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); return "skip"; } break; - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 287 /* 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 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.import_can_only_be_used_in_TypeScript_files)); return "skip"; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.export_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: const heritageClause = node; if (heritageClause.token === 118 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 267 /* InterfaceDeclaration */: + case 270 /* 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 270 /* ModuleDeclaration */: + case 273 /* 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 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); return "skip"; - case 269 /* EnumDeclaration */: + case 272 /* 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 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 235 /* AsExpression */: + case 237 /* AsExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: Debug.fail(); } } @@ -108328,27 +108586,27 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config diagnostics.push(createDiagnosticForNode2(parent2, Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning)); } switch (parent2.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 221 /* ArrowFunction */: if (nodes === parent2.typeParameters) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); return "skip"; } - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: if (nodes === parent2.modifiers) { - checkModifiers(parent2.modifiers, parent2.kind === 244 /* VariableStatement */); + checkModifiers(parent2.modifiers, parent2.kind === 246 /* VariableStatement */); return "skip"; } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (nodes === parent2.modifiers) { for (const modifier of nodes) { if (isModifier(modifier) && modifier.kind !== 125 /* StaticKeyword */ && modifier.kind !== 128 /* AccessorKeyword */) { @@ -108358,18 +108616,18 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return "skip"; } break; - case 168 /* Parameter */: + case 169 /* 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 213 /* CallExpression */: - case 214 /* NewExpression */: - case 234 /* ExpressionWithTypeArguments */: - case 288 /* JsxSelfClosingElement */: - case 289 /* JsxOpeningElement */: - case 215 /* TaggedTemplateExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 236 /* ExpressionWithTypeArguments */: + case 291 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 217 /* TaggedTemplateExpression */: if (nodes === parent2.typeArguments) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); return "skip"; @@ -116164,39 +116422,39 @@ var SemanticMeaning = /* @__PURE__ */ ((SemanticMeaning3) => { })(SemanticMeaning || {}); function getMeaningFromDeclaration(node) { switch (node.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return isInJSFile(node) && getJSDocEnumTag(node) ? 7 /* All */ : 1 /* Value */; - case 168 /* Parameter */: - case 208 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 301 /* CatchClause */: - case 294 /* JsxAttribute */: + case 169 /* Parameter */: + case 210 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 304 /* CatchClause */: + case 297 /* JsxAttribute */: return 1 /* Value */; - case 167 /* TypeParameter */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 187 /* TypeLiteral */: + case 168 /* TypeParameter */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 189 /* TypeLiteral */: return 2 /* Type */; - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return node.name === void 0 ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */; - case 308 /* EnumMember */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: + case 311 /* EnumMember */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: return 1 /* Value */ | 2 /* Type */; - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return 2 /* Type */; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: if (isAmbientModule(node)) { return 4 /* Namespace */ | 1 /* Value */; } else if (getModuleInstanceState(node) === 1 /* Instantiated */) { @@ -116204,15 +116462,15 @@ function getMeaningFromDeclaration(node) { } else { return 4 /* Namespace */; } - case 269 /* EnumDeclaration */: - case 278 /* NamedImports */: - case 279 /* ImportSpecifier */: - case 274 /* ImportEqualsDeclaration */: - case 275 /* ImportDeclaration */: - case 280 /* ExportAssignment */: - case 281 /* ExportDeclaration */: + case 272 /* EnumDeclaration */: + case 281 /* NamedImports */: + case 282 /* ImportSpecifier */: + case 277 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 283 /* ExportAssignment */: + case 284 /* ExportDeclaration */: return 7 /* All */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return 4 /* Namespace */ | 1 /* Value */; } return 7 /* All */; @@ -116220,7 +116478,7 @@ function getMeaningFromDeclaration(node) { function getMeaningFromLocation(node) { node = getAdjustedReferenceLocation(node); const parent2 = node.parent; - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { return 1 /* Value */; } else if (isExportAssignment(parent2) || isExportSpecifier(parent2) || isExternalModuleReference(parent2) || isImportSpecifier(parent2) || isImportClause(parent2) || isImportEqualsDeclaration(parent2) && node === parent2.name) { return 7 /* All */; @@ -116244,11 +116502,11 @@ function getMeaningFromLocation(node) { } } function getMeaningFromRightHandSideOfImportEquals(node) { - const name = node.kind === 165 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; - return name && name.parent.kind === 274 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; + const name = node.kind === 166 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; + return name && name.parent.kind === 277 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; } function isInRightSideOfInternalImportEqualsDeclaration(node) { - while (node.parent.kind === 165 /* QualifiedName */) { + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } return isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -116259,26 +116517,26 @@ function isNamespaceReference(node) { function isQualifiedNameNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 165 /* QualifiedName */) { - while (root.parent && root.parent.kind === 165 /* QualifiedName */) { + if (root.parent.kind === 166 /* QualifiedName */) { + while (root.parent && root.parent.kind === 166 /* QualifiedName */) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 183 /* TypeReference */ && !isLastClause; + return root.parent.kind === 185 /* TypeReference */ && !isLastClause; } function isPropertyAccessNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 211 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 211 /* PropertyAccessExpression */) { + if (root.parent.kind === 213 /* PropertyAccessExpression */) { + while (root.parent && root.parent.kind === 213 /* PropertyAccessExpression */) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 234 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 300 /* HeritageClause */) { + if (!isLastClause && root.parent.kind === 236 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 303 /* HeritageClause */) { const decl = root.parent.parent.parent; - return (decl.kind === 264 /* ClassDeclaration */ || decl.kind === 265 /* StructDeclaration */) && root.parent.parent.token === 118 /* ImplementsKeyword */ || decl.kind === 267 /* InterfaceDeclaration */ && root.parent.parent.token === 95 /* ExtendsKeyword */; + return (decl.kind === 266 /* ClassDeclaration */ || decl.kind === 267 /* StructDeclaration */) && root.parent.parent.token === 118 /* ImplementsKeyword */ || decl.kind === 270 /* InterfaceDeclaration */ && root.parent.parent.token === 95 /* ExtendsKeyword */; } return false; } @@ -116289,15 +116547,15 @@ function isTypeReference(node) { switch (node.kind) { case 109 /* ThisKeyword */: return !isExpressionNode(node); - case 197 /* ThisType */: + case 199 /* ThisType */: return true; } switch (node.parent.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return true; - case 205 /* ImportType */: + case 207 /* ImportType */: return !node.parent.isTypeOf; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return isPartOfTypeNode(node.parent); } return false; @@ -116344,7 +116602,7 @@ function climbPastPropertyOrElementAccess(node) { } function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 257 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { + if (referenceNode.kind === 259 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -116394,22 +116652,22 @@ function isNameOfFunctionDeclaration(node) { } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { switch (node.parent.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 305 /* PropertyAssignment */: - case 308 /* EnumMember */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 270 /* ModuleDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 308 /* PropertyAssignment */: + case 311 /* EnumMember */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 273 /* ModuleDeclaration */: return getNameOfDeclaration(node.parent) === node; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return node.parent.argumentExpression === node; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return true; - case 201 /* LiteralType */: - return node.parent.parent.kind === 199 /* IndexedAccessType */; + case 203 /* LiteralType */: + return node.parent.parent.kind === 201 /* IndexedAccessType */; default: return false; } @@ -116427,86 +116685,86 @@ function getContainerNode(node) { return void 0; } switch (node.kind) { - case 314 /* SourceFile */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 270 /* ModuleDeclaration */: + case 317 /* SourceFile */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 273 /* ModuleDeclaration */: return node; } } } function getNodeKind(node) { switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: return isExternalModule(node) ? "module" /* moduleElement */ : "script" /* scriptElement */; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return "module" /* moduleElement */; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return "class" /* classElement */; - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return "struct" /* structElement */; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return "interface" /* interfaceElement */; - case 268 /* TypeAliasDeclaration */: - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: + case 271 /* TypeAliasDeclaration */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: return "type" /* typeElement */; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return "enum" /* enumElement */; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return getKindOfVariableDeclaration(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return getKindOfVariableDeclaration(getRootDeclaration(node)); - case 219 /* ArrowFunction */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return "function" /* functionElement */; - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return "getter" /* memberGetAccessorElement */; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return "setter" /* memberSetAccessorElement */; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return "method" /* memberFunctionElement */; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: const { initializer } = node; return isFunctionLike(initializer) ? "method" /* memberFunctionElement */ : "property" /* memberVariableElement */; - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 306 /* ShorthandPropertyAssignment */: - case 307 /* SpreadAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 309 /* ShorthandPropertyAssignment */: + case 310 /* SpreadAssignment */: return "property" /* memberVariableElement */; - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return "index" /* indexSignatureElement */; - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: return "construct" /* constructSignatureElement */; - case 179 /* CallSignature */: + case 181 /* CallSignature */: return "call" /* callSignatureElement */; - case 176 /* Constructor */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 177 /* ClassStaticBlockDeclaration */: return "constructor" /* constructorImplementationElement */; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return "type parameter" /* typeParameterElement */; - case 308 /* EnumMember */: + case 311 /* EnumMember */: return "enum member" /* enumMemberElement */; - case 168 /* Parameter */: + case 169 /* Parameter */: return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) ? "property" /* memberVariableElement */ : "parameter" /* parameterElement */; - case 274 /* ImportEqualsDeclaration */: - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: - case 277 /* NamespaceImport */: - case 283 /* NamespaceExport */: + case 277 /* ImportEqualsDeclaration */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: + case 280 /* NamespaceImport */: + case 286 /* NamespaceExport */: return "alias" /* alias */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const kind = getAssignmentDeclarationKind(node); const { right } = node; switch (kind) { @@ -116534,7 +116792,7 @@ function getNodeKind(node) { } case 79 /* Identifier */: return isImportClause(node.parent) ? "alias" /* alias */ : "" /* unknown */; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: const scriptKind = getNodeKind(node.expression); return scriptKind === "" /* unknown */ ? "const" /* constElement */ : scriptKind; default: @@ -116549,7 +116807,7 @@ function isThis(node) { case 109 /* ThisKeyword */: return true; case 79 /* Identifier */: - return identifierIsThisKeyword(node) && node.parent.kind === 168 /* Parameter */; + return identifierIsThisKeyword(node) && node.parent.kind === 169 /* Parameter */; default: return false; } @@ -116598,42 +116856,42 @@ function isCompletedNode(n, sourceFile) { return false; } switch (n.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 206 /* ObjectBindingPattern */: - case 187 /* TypeLiteral */: - case 242 /* Block */: - case 271 /* ModuleBlock */: - case 272 /* CaseBlock */: - case 278 /* NamedImports */: - case 282 /* NamedExports */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 212 /* ObjectLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 189 /* TypeLiteral */: + case 244 /* Block */: + case 274 /* ModuleBlock */: + case 275 /* CaseBlock */: + case 281 /* NamedImports */: + case 285 /* NamedExports */: return nodeEndsWith(n, 19 /* CloseBraceToken */, sourceFile); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return isCompletedNode(n.block, sourceFile); - case 214 /* NewExpression */: + case 216 /* NewExpression */: if (!n.arguments) { return true; } - case 213 /* CallExpression */: - case 217 /* ParenthesizedExpression */: - case 196 /* ParenthesizedType */: + case 215 /* CallExpression */: + case 219 /* ParenthesizedExpression */: + case 198 /* ParenthesizedType */: return nodeEndsWith(n, 21 /* CloseParenToken */, sourceFile); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: return isCompletedNode(n.type, sourceFile); - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 180 /* ConstructSignature */: - case 179 /* CallSignature */: - case 219 /* ArrowFunction */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 182 /* ConstructSignature */: + case 181 /* CallSignature */: + case 221 /* ArrowFunction */: if (n.body) { return isCompletedNode(n.body, sourceFile); } @@ -116641,60 +116899,60 @@ function isCompletedNode(n, sourceFile) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 21 /* CloseParenToken */, sourceFile); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return !!n.body && isCompletedNode(n.body, sourceFile); - case 246 /* IfStatement */: + case 248 /* IfStatement */: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return isCompletedNode(n.expression, sourceFile) || hasChildOfKind(n, 26 /* SemicolonToken */, sourceFile); - case 209 /* ArrayLiteralExpression */: - case 207 /* ArrayBindingPattern */: - case 212 /* ElementAccessExpression */: - case 166 /* ComputedPropertyName */: - case 189 /* TupleType */: + case 211 /* ArrayLiteralExpression */: + case 209 /* ArrayBindingPattern */: + case 214 /* ElementAccessExpression */: + case 167 /* ComputedPropertyName */: + case 191 /* TupleType */: return nodeEndsWith(n, 23 /* CloseBracketToken */, sourceFile); - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: if (n.type) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 23 /* CloseBracketToken */, sourceFile); - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: return false; - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 248 /* WhileStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 250 /* WhileStatement */: return isCompletedNode(n.statement, sourceFile); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return hasChildOfKind(n, 116 /* WhileKeyword */, sourceFile) ? nodeEndsWith(n, 21 /* CloseParenToken */, sourceFile) : isCompletedNode(n.statement, sourceFile); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return isCompletedNode(n.exprName, sourceFile); - case 222 /* TypeOfExpression */: - case 221 /* DeleteExpression */: - case 223 /* VoidExpression */: - case 230 /* YieldExpression */: - case 231 /* SpreadElement */: + case 224 /* TypeOfExpression */: + case 223 /* DeleteExpression */: + case 225 /* VoidExpression */: + case 232 /* YieldExpression */: + case 233 /* SpreadElement */: const unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return isCompletedNode(n.template, sourceFile); - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: const lastSpan = lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return nodeIsPresent(n.literal); - case 281 /* ExportDeclaration */: - case 275 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: return nodeIsPresent(n.moduleSpecifier); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return isCompletedNode(n.operand, sourceFile); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isCompletedNode(n.right, sourceFile); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -116796,14 +117054,14 @@ function getContextualTypeFromParentOrAncestorTypeNode(node, checker) { function getAdjustedLocationForDeclaration(node, forRename) { if (!forRename) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: return getAdjustedLocationForClass(node); - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return getAdjustedLocationForFunction(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return node; } } @@ -116953,7 +117211,7 @@ function getAdjustedLocation(node, forRename) { if (node.kind === 129 /* AsKeyword */ && isAsExpression(parent2) && isTypeReferenceNode(parent2.type)) { return parent2.type.typeName; } - if (node.kind === 102 /* InKeyword */ && isForInStatement(parent2) || node.kind === 164 /* OfKeyword */ && isForOfStatement(parent2)) { + if (node.kind === 102 /* InKeyword */ && isForInStatement(parent2) || node.kind === 165 /* OfKeyword */ && isForOfStatement(parent2)) { return skipOuterExpressions(parent2.expression); } } @@ -117092,7 +117350,7 @@ function findPrecedingToken(position, sourceFile, startNode2, excludeJsdoc) { } } } - Debug.assert(startNode2 !== void 0 || n.kind === 314 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); + Debug.assert(startNode2 !== void 0 || n.kind === 317 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); const candidate = findRightmostChildNodeWithTokens(children, children.length, sourceFile, n.kind); return candidate && findRightmostToken(candidate, sourceFile); } @@ -117115,7 +117373,7 @@ function findRightmostChildNodeWithTokens(children, exclusiveStartPosition, sour for (let i = exclusiveStartPosition - 1; i >= 0; i--) { const child = children[i]; if (isWhiteSpaceOnlyJsxText(child)) { - if (i === 0 && (parentKind === 11 /* JsxText */ || parentKind === 288 /* JsxSelfClosingElement */)) { + if (i === 0 && (parentKind === 11 /* JsxText */ || parentKind === 291 /* JsxSelfClosingElement */)) { Debug.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`"); } } else if (nodeHasTokens(children[i], sourceFile)) { @@ -117147,13 +117405,13 @@ function isInsideJsxElementOrAttribute(sourceFile, position) { if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 11 /* JsxText */) { return true; } - if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 297 /* JsxExpression */) { + if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 300 /* JsxExpression */) { return true; } - if (token && token.kind === 19 /* CloseBraceToken */ && token.parent.kind === 297 /* JsxExpression */) { + if (token && token.kind === 19 /* CloseBraceToken */ && token.parent.kind === 300 /* JsxExpression */) { return true; } - if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 290 /* JsxClosingElement */) { + if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 293 /* JsxClosingElement */) { return true; } return false; @@ -117181,9 +117439,9 @@ function isInJSXText(sourceFile, position) { function isInsideJsxElement(sourceFile, position) { function isInsideJsxElementTraversal(node) { while (node) { - if (node.kind >= 288 /* JsxSelfClosingElement */ && node.kind <= 297 /* 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 >= 291 /* JsxSelfClosingElement */ && node.kind <= 300 /* 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 === 287 /* JsxElement */) { + } else if (node.kind === 290 /* JsxElement */) { if (position > node.getStart(sourceFile)) return true; node = node.parent; @@ -117344,15 +117602,15 @@ function getNodeModifiers(node, excludeFlags = 0 /* None */) { result.push("deprecated" /* deprecatedModifier */); if (node.flags & 16777216 /* Ambient */) result.push("declare" /* ambientModifier */); - if (node.kind === 280 /* ExportAssignment */) + if (node.kind === 283 /* ExportAssignment */) result.push("export" /* exportedModifier */); return result.length > 0 ? result.join(",") : "" /* none */; } function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 183 /* TypeReference */ || node.kind === 213 /* CallExpression */) { + if (node.kind === 185 /* TypeReference */ || node.kind === 215 /* CallExpression */) { return node.typeArguments; } - if (isFunctionLike(node) || node.kind === 264 /* ClassDeclaration */ || node.kind === 267 /* InterfaceDeclaration */) { + if (isFunctionLike(node) || node.kind === 266 /* ClassDeclaration */ || node.kind === 270 /* InterfaceDeclaration */) { return node.typeParameters; } return void 0; @@ -117387,14 +117645,14 @@ function cloneCompilerOptions(options) { return result; } function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { - if (node.kind === 209 /* ArrayLiteralExpression */ || node.kind === 210 /* ObjectLiteralExpression */) { - if (node.parent.kind === 227 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */) { + if (node.kind === 211 /* ArrayLiteralExpression */ || node.kind === 212 /* ObjectLiteralExpression */) { + if (node.parent.kind === 229 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */) { return true; } - if (node.parent.kind === 251 /* ForOfStatement */ && node.parent.initializer === node) { + if (node.parent.kind === 253 /* ForOfStatement */ && node.parent.initializer === node) { return true; } - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 305 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 308 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { return true; } } @@ -117498,7 +117756,7 @@ function skipConstraint(type) { return type.isTypeParameter() ? type.getConstraint() || type : type; } function getNameFromPropertyName(name) { - return name.kind === 166 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); + return name.kind === 167 /* 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)); @@ -117622,7 +117880,7 @@ function findModifier(node, kind) { } function insertImports(changes, sourceFile, imports, blankLineBetween) { const decl = isArray(imports) ? imports[0] : imports; - const importKindPredicate = decl.kind === 244 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; + const importKindPredicate = decl.kind === 246 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; const existingImportStatements = filter(sourceFile.statements, importKindPredicate); const sortedNewImports = isArray(imports) ? stableSort(imports, ts_OrganizeImports_exports.compareImportsOrRequireStatements) : [imports]; if (!existingImportStatements.length) { @@ -118163,13 +118421,13 @@ function needsParentheses(expression) { function getContextualTypeFromParent(node, checker) { const { parent: parent2 } = node; switch (parent2.kind) { - case 214 /* NewExpression */: + case 216 /* NewExpression */: return checker.getContextualType(parent2); - case 227 /* BinaryExpression */: { + case 229 /* BinaryExpression */: { const { left, operatorToken, right } = parent2; return isEqualityOperatorKind(operatorToken.kind) ? checker.getTypeAtLocation(node === right ? left : right) : checker.getContextualType(node); } - case 298 /* CaseClause */: + case 301 /* CaseClause */: return parent2.expression === node ? getSwitchedType(parent2, checker) : void 0; default: return checker.getContextualType(node); @@ -118195,8 +118453,8 @@ function isStringLiteralOrTemplate(node) { switch (node.kind) { case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 229 /* TemplateExpression */: - case 215 /* TaggedTemplateExpression */: + case 231 /* TemplateExpression */: + case 217 /* TaggedTemplateExpression */: return true; default: return false; @@ -118226,16 +118484,16 @@ function getTypeNodeIfAccessible(type, enclosingScope, program, host) { return typeIsAccessible ? res : void 0; } function syntaxRequiresTrailingCommaOrSemicolonOrASI(kind) { - return kind === 179 /* CallSignature */ || kind === 180 /* ConstructSignature */ || kind === 181 /* IndexSignature */ || kind === 170 /* PropertySignature */ || kind === 173 /* MethodSignature */; + return kind === 181 /* CallSignature */ || kind === 182 /* ConstructSignature */ || kind === 183 /* IndexSignature */ || kind === 171 /* PropertySignature */ || kind === 175 /* MethodSignature */; } function syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) { - return kind === 263 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 265 /* FunctionDeclaration */ || kind === 178 /* Constructor */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) { - return kind === 270 /* ModuleDeclaration */; + return kind === 273 /* ModuleDeclaration */; } function syntaxRequiresTrailingSemicolonOrASI(kind) { - return kind === 244 /* VariableStatement */ || kind === 245 /* ExpressionStatement */ || kind === 247 /* DoStatement */ || kind === 252 /* ContinueStatement */ || kind === 253 /* BreakStatement */ || kind === 254 /* ReturnStatement */ || kind === 258 /* ThrowStatement */ || kind === 260 /* DebuggerStatement */ || kind === 171 /* PropertyDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 281 /* ExportDeclaration */ || kind === 273 /* NamespaceExportDeclaration */ || kind === 280 /* ExportAssignment */; + return kind === 246 /* VariableStatement */ || kind === 247 /* ExpressionStatement */ || kind === 249 /* DoStatement */ || kind === 254 /* ContinueStatement */ || kind === 255 /* BreakStatement */ || kind === 256 /* ReturnStatement */ || kind === 260 /* ThrowStatement */ || kind === 262 /* DebuggerStatement */ || kind === 172 /* PropertyDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 284 /* ExportDeclaration */ || kind === 276 /* NamespaceExportDeclaration */ || kind === 283 /* ExportAssignment */; } var syntaxMayBeASICandidate = or( syntaxRequiresTrailingCommaOrSemicolonOrASI, @@ -118265,7 +118523,7 @@ function nodeIsASICandidate(node, sourceFile) { } else if (!syntaxRequiresTrailingSemicolonOrASI(node.kind)) { return false; } - if (node.kind === 247 /* DoStatement */) { + if (node.kind === 249 /* DoStatement */) { return true; } const topNode = findAncestor(node, (ancestor) => !ancestor.parent); @@ -119427,13 +119685,13 @@ function getSemanticClassifications(typeChecker3, cancellationToken, sourceFile, } function checkForClassificationCancellation(cancellationToken, kind) { switch (kind) { - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -119637,46 +119895,46 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) pos = tag.tagName.end; let commentStart = tag.tagName.end; switch (tag.kind) { - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: const param = tag; processJSDocParameterTag(param); commentStart = param.isNameFirst && ((_a2 = param.typeExpression) == null ? void 0 : _a2.end) || param.name.end; break; - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: const prop = tag; commentStart = prop.isNameFirst && ((_b = prop.typeExpression) == null ? void 0 : _b.end) || prop.name.end; break; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); pos = tag.end; commentStart = tag.typeParameters.end; break; - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: const type = tag; - commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 318 /* 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) === 321 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; break; - case 347 /* JSDocCallbackTag */: + case 350 /* JSDocCallbackTag */: commentStart = tag.typeExpression.end; break; - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = tag.typeExpression.end; break; - case 351 /* JSDocThisTag */: - case 348 /* JSDocEnumTag */: + case 354 /* JSDocThisTag */: + case 351 /* JSDocEnumTag */: commentStart = tag.typeExpression.end; break; - case 350 /* JSDocReturnTag */: + case 353 /* JSDocReturnTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_f = tag.typeExpression) == null ? void 0 : _f.end) || commentStart; break; - case 355 /* JSDocSeeTag */: + case 358 /* JSDocSeeTag */: commentStart = ((_g = tag.name) == null ? void 0 : _g.end) || commentStart; break; - case 337 /* JSDocAugmentsTag */: - case 338 /* JSDocImplementsTag */: + case 340 /* JSDocAugmentsTag */: + case 341 /* JSDocImplementsTag */: commentStart = tag.class.end; break; } @@ -119819,22 +120077,22 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) } function tryClassifyJsxElementName(token) { switch (token.parent && token.parent.kind) { - case 289 /* JsxOpeningElement */: + case 292 /* JsxOpeningElement */: if (token.parent.tagName === token) { return 19 /* jsxOpenTagName */; } break; - case 290 /* JsxClosingElement */: + case 293 /* JsxClosingElement */: if (token.parent.tagName === token) { return 20 /* jsxCloseTagName */; } break; - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: if (token.parent.tagName === token) { return 21 /* jsxSelfClosingTagName */; } break; - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: if (token.parent.name === token) { return 22 /* jsxAttribute */; } @@ -119855,11 +120113,11 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) if (token) { const parent2 = token.parent; if (tokenKind === 63 /* EqualsToken */) { - if (parent2.kind === 261 /* VariableDeclaration */ || parent2.kind === 171 /* PropertyDeclaration */ || parent2.kind === 168 /* Parameter */ || parent2.kind === 294 /* JsxAttribute */) { + if (parent2.kind === 263 /* VariableDeclaration */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 169 /* Parameter */ || parent2.kind === 297 /* JsxAttribute */) { return 5 /* operator */; } } - if (parent2.kind === 227 /* BinaryExpression */ || parent2.kind === 225 /* PrefixUnaryExpression */ || parent2.kind === 226 /* PostfixUnaryExpression */ || parent2.kind === 228 /* ConditionalExpression */) { + if (parent2.kind === 229 /* BinaryExpression */ || parent2.kind === 227 /* PrefixUnaryExpression */ || parent2.kind === 228 /* PostfixUnaryExpression */ || parent2.kind === 230 /* ConditionalExpression */) { return 5 /* operator */; } } @@ -119869,7 +120127,7 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) } else if (tokenKind === 9 /* BigIntLiteral */) { return 25 /* bigintLiteral */; } else if (tokenKind === 10 /* StringLiteral */) { - return token && token.parent.kind === 294 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + return token && token.parent.kind === 297 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 13 /* RegularExpressionLiteral */) { return 6 /* stringLiteral */; } else if (isTemplateLiteralKind(tokenKind)) { @@ -119879,32 +120137,32 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) } else if (tokenKind === 79 /* Identifier */) { if (token) { switch (token.parent.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: if (token.parent.name === token) { return 11 /* className */; } return; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: if (token.parent.name === token) { return 15 /* typeParameterName */; } return; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: if (token.parent.name === token) { return 13 /* interfaceName */; } return; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: if (token.parent.name === token) { return 12 /* enumName */; } return; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: if (token.parent.name === token) { return 14 /* moduleName */; } return; - case 168 /* Parameter */: + case 169 /* Parameter */: if (token.parent.name === token) { return isThisIdentifier(token) ? 3 /* keyword */ : 17 /* parameterName */; } @@ -120047,7 +120305,7 @@ var DocumentHighlights; let child = throwStatement; while (child.parent) { const parent2 = child.parent; - if (isFunctionBlock(parent2) || parent2.kind === 314 /* SourceFile */) { + if (isFunctionBlock(parent2) || parent2.kind === 317 /* SourceFile */) { return parent2; } if (isTryStatement(parent2) && parent2.tryBlock === child && parent2.catchClause) { @@ -120077,15 +120335,15 @@ var DocumentHighlights; function getBreakOrContinueOwner(statement) { return findAncestor(statement, (node) => { switch (node.kind) { - case 256 /* SwitchStatement */: - if (statement.kind === 252 /* ContinueStatement */) { + case 258 /* SwitchStatement */: + if (statement.kind === 254 /* ContinueStatement */) { return false; } - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 248 /* WhileStatement */: - case 247 /* DoStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 250 /* WhileStatement */: + case 249 /* DoStatement */: return !statement.label || isLabeledBy(node, statement.label.escapedText); default: return isFunctionLike(node) && "quit"; @@ -120098,25 +120356,25 @@ var DocumentHighlights; function getNodesToSearchForModifier(declaration, modifierFlag) { const container = declaration.parent; switch (container.kind) { - case 271 /* ModuleBlock */: - case 314 /* SourceFile */: - case 242 /* Block */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 274 /* ModuleBlock */: + case 317 /* SourceFile */: + case 244 /* Block */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: if (modifierFlag & 256 /* Abstract */ && isClassDeclaration(declaration)) { return [...declaration.members, declaration]; } else { return container.statements; } - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 263 /* FunctionDeclaration */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: return [...container.parameters, ...isClassLike(container.parent) ? container.parent.members : []]; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 187 /* TypeLiteral */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 189 /* TypeLiteral */: const nodes = container.members; if (modifierFlag & (28 /* AccessibilityModifier */ | 64 /* Readonly */)) { const constructor = find(container.members, isConstructorDeclaration); @@ -120127,7 +120385,7 @@ var DocumentHighlights; return [...nodes, container]; } return nodes; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return void 0; default: Debug.assertNever(container, "Invalid container kind."); @@ -120143,7 +120401,7 @@ var DocumentHighlights; function getLoopBreakContinueOccurrences(loopNode) { const keywords = []; if (pushKeywordIf(keywords, loopNode.getFirstToken(), 98 /* ForKeyword */, 116 /* WhileKeyword */, 91 /* DoKeyword */)) { - if (loopNode.kind === 247 /* DoStatement */) { + if (loopNode.kind === 249 /* DoStatement */) { const loopTokens = loopNode.getChildren(); for (let i = loopTokens.length - 1; i >= 0; i--) { if (pushKeywordIf(keywords, loopTokens[i], 116 /* WhileKeyword */)) { @@ -120163,13 +120421,13 @@ var DocumentHighlights; const owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return getLoopBreakContinueOccurrences(owner); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return getSwitchCaseDefaultOccurrences(owner); } } @@ -121545,9 +121803,9 @@ function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) { function containsTopLevelCommonjs(sourceFile) { return sourceFile.statements.some((statement) => { switch (statement.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return statement.declarationList.declarations.some((decl) => !!decl.initializer && isRequireCall(propertyAccessLeftHandSide(decl.initializer), true)); - case 245 /* ExpressionStatement */: { + case 247 /* ExpressionStatement */: { const { expression } = statement; if (!isBinaryExpression(expression)) return isRequireCall(expression, true); @@ -121564,10 +121822,10 @@ function propertyAccessLeftHandSide(node) { } function importNameForConvertToDefaultImport(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: const { importClause, moduleSpecifier } = node; - return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 277 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; - case 274 /* ImportEqualsDeclaration */: + return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 280 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; + case 277 /* ImportEqualsDeclaration */: return node.name; default: return void 0; @@ -121631,18 +121889,18 @@ function hasSupportedNumberOfArguments(node) { } function isFixablePromiseArgument(arg, checker) { switch (arg.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: const functionFlags = getFunctionFlags(arg); if (functionFlags & 1 /* Generator */) { return false; } - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: visitedNestedConvertibleFunctions.set(getKeyFromNode(arg), true); case 105 /* NullKeyword */: return true; case 79 /* Identifier */: - case 211 /* PropertyAccessExpression */: { + case 213 /* PropertyAccessExpression */: { const symbol = checker.getSymbolAtLocation(arg); if (!symbol) { return false; @@ -121658,24 +121916,24 @@ function getKeyFromNode(exp) { } function canBeConvertedToClass(node, checker) { var _a2, _b, _c, _d; - if (node.kind === 218 /* FunctionExpression */) { + if (node.kind === 220 /* FunctionExpression */) { if (isVariableDeclaration(node.parent) && ((_a2 = node.symbol.members) == null ? void 0 : _a2.size)) { return true; } const symbol = checker.getSymbolOfExpando(node, false); return !!(symbol && (((_b = symbol.exports) == null ? void 0 : _b.size) || ((_c = symbol.members) == null ? void 0 : _c.size))); } - if (node.kind === 263 /* FunctionDeclaration */) { + if (node.kind === 265 /* FunctionDeclaration */) { return !!((_d = node.symbol.members) == null ? void 0 : _d.size); } return false; } function canBeConvertedToAsync(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return true; default: return false; @@ -121820,9 +122078,9 @@ function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checke } function shouldKeepItem(declaration, checker) { switch (declaration.kind) { - case 276 /* ImportClause */: - case 279 /* ImportSpecifier */: - case 274 /* ImportEqualsDeclaration */: + case 279 /* ImportClause */: + case 282 /* ImportSpecifier */: + case 277 /* ImportEqualsDeclaration */: const importer = checker.getSymbolAtLocation(declaration.name); const imported = checker.getAliasedSymbol(importer); return importer.escapedName !== imported.escapedName; @@ -121832,7 +122090,7 @@ function shouldKeepItem(declaration, checker) { } function tryAddSingleDeclarationName(declaration, containers) { const name = getNameOfDeclaration(declaration); - return !!name && (pushLiteral(name, containers) || name.kind === 166 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); + return !!name && (pushLiteral(name, containers) || name.kind === 167 /* 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); @@ -121843,7 +122101,7 @@ function pushLiteral(node, containers) { function getContainers(declaration) { const containers = []; const name = getNameOfDeclaration(declaration); - if (name && name.kind === 166 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { + if (name && name.kind === 167 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { return emptyArray; } containers.shift(); @@ -122013,7 +122271,7 @@ function addNodeWithRecursiveInitializer(node) { } } function hasNavigationBarName(node) { - return !hasDynamicName(node) || node.kind !== 227 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; + return !hasDynamicName(node) || node.kind !== 229 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; } function addChildrenRecursively(node) { curCancellationToken.throwIfCancellationRequested(); @@ -122021,7 +122279,7 @@ function addChildrenRecursively(node) { return; } switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: const ctr = node; addNodeWithRecursiveChild(ctr, ctr.body); for (const param of ctr.parameters) { @@ -122030,32 +122288,32 @@ function addChildrenRecursively(node) { } } break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 175 /* MethodSignature */: if (hasNavigationBarName(node)) { addNodeWithRecursiveChild(node, node.body); } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (hasNavigationBarName(node)) { addNodeWithRecursiveInitializer(node); } break; - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (hasNavigationBarName(node)) { addLeafNode(node); } break; - case 276 /* ImportClause */: + case 279 /* ImportClause */: const importClause = node; if (importClause.name) { addLeafNode(importClause.name); } const { namedBindings } = importClause; if (namedBindings) { - if (namedBindings.kind === 277 /* NamespaceImport */) { + if (namedBindings.kind === 280 /* NamespaceImport */) { addLeafNode(namedBindings); } else { for (const element of namedBindings.elements) { @@ -122064,16 +122322,16 @@ function addChildrenRecursively(node) { } } break; - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: addNodeWithRecursiveChild(node, node.name); break; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: const { expression } = node; isIdentifier(expression) ? addLeafNode(node, expression) : addLeafNode(node); break; - case 208 /* BindingElement */: - case 305 /* PropertyAssignment */: - case 261 /* VariableDeclaration */: { + case 210 /* BindingElement */: + case 308 /* PropertyAssignment */: + case 263 /* VariableDeclaration */: { const child = node; if (isBindingPattern(child.name)) { addChildrenRecursively(child.name); @@ -122082,18 +122340,18 @@ function addChildrenRecursively(node) { } break; } - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: const nameNode = node.name; if (nameNode && isIdentifier(nameNode)) { addTrackedEs5Class(nameNode.text); } addNodeWithRecursiveChild(node, node.body); break; - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: addNodeWithRecursiveChild(node, node.body); break; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: startNode(node); for (const member of node.members) { if (!isComputedProperty(member)) { @@ -122102,20 +122360,20 @@ function addChildrenRecursively(node) { } endNode(); break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: startNode(node); for (const member of node.members) { addChildrenRecursively(member); } endNode(); break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; - case 280 /* ExportAssignment */: { + case 283 /* ExportAssignment */: { const expression2 = node.expression; const child = isObjectLiteralExpression(expression2) || isCallExpression(expression2) ? expression2 : isArrowFunction(expression2) || isFunctionExpression(expression2) ? expression2.body : void 0; if (child) { @@ -122127,16 +122385,16 @@ function addChildrenRecursively(node) { } break; } - case 284 /* ExportSpecifier */: - case 274 /* ImportEqualsDeclaration */: - case 181 /* IndexSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 268 /* TypeAliasDeclaration */: + case 287 /* ExportSpecifier */: + case 277 /* ImportEqualsDeclaration */: + case 183 /* IndexSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 271 /* TypeAliasDeclaration */: addLeafNode(node); break; - case 213 /* CallExpression */: - case 227 /* BinaryExpression */: { + case 215 /* CallExpression */: + case 229 /* BinaryExpression */: { const special = getAssignmentDeclarationKind(node); switch (special) { case 1 /* ExportsProperty */: @@ -122346,12 +122604,12 @@ function shouldReallyMerge(a, b, parent2) { return false; } switch (a.kind) { - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return isStatic(a) === isStatic(b); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return areSameModule(a, b) && getFullyQualifiedModuleName(a) === getFullyQualifiedModuleName(b); default: return true; @@ -122368,7 +122626,7 @@ function areSameModule(a, b) { if (!a.body || !b.body) { return a.body === b.body; } - return a.body.kind === b.body.kind && (a.body.kind !== 270 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); + return a.body.kind === b.body.kind && (a.body.kind !== 273 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); } function merge(target, source) { target.additionalNodes = target.additionalNodes || []; @@ -122389,7 +122647,7 @@ function compareChildren(child1, child2) { return compareStringsCaseSensitiveUI(tryGetName(child1.node), tryGetName(child2.node)) || compareValues(navigationBarNodeKind(child1), navigationBarNodeKind(child2)); } function tryGetName(node) { - if (node.kind === 270 /* ModuleDeclaration */) { + if (node.kind === 273 /* ModuleDeclaration */) { return getModuleName(node); } const declName = getNameOfDeclaration(node); @@ -122398,16 +122656,16 @@ function tryGetName(node) { return propertyName && unescapeLeadingUnderscores(propertyName); } switch (node.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 232 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 234 /* ClassExpression */: return getFunctionOrClassName(node); default: return void 0; } } function getItemName(node, name) { - if (node.kind === 270 /* ModuleDeclaration */) { + if (node.kind === 273 /* ModuleDeclaration */) { return cleanText(getModuleName(node)); } if (name) { @@ -122417,28 +122675,28 @@ function getItemName(node, name) { } } switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: const sourceFile = node; return isExternalModule(sourceFile) ? `"${escapeString(getBaseFileName(removeFileExtension(normalizePath(sourceFile.fileName))))}"` : ""; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; - case 219 /* ArrowFunction */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 221 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: if (getSyntacticModifierFlags(node) & 1024 /* Default */) { return "default"; } return getFunctionOrClassName(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return "constructor"; - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: return "new()"; - case 179 /* CallSignature */: + case 181 /* CallSignature */: return "()"; - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return "[]"; default: return ""; @@ -122463,20 +122721,20 @@ function primaryNavBarMenuItems(root) { return true; } switch (navigationBarNodeKind(item)) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 269 /* EnumDeclaration */: - case 267 /* InterfaceDeclaration */: - case 270 /* ModuleDeclaration */: - case 314 /* SourceFile */: - case 268 /* TypeAliasDeclaration */: - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 272 /* EnumDeclaration */: + case 270 /* InterfaceDeclaration */: + case 273 /* ModuleDeclaration */: + case 317 /* SourceFile */: + case 271 /* TypeAliasDeclaration */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: return true; - case 219 /* ArrowFunction */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return isTopLevelFunctionDeclaration(item); default: return false; @@ -122486,10 +122744,10 @@ function primaryNavBarMenuItems(root) { return false; } switch (navigationBarNodeKind(item2.parent)) { - case 271 /* ModuleBlock */: - case 314 /* SourceFile */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: + case 274 /* ModuleBlock */: + case 317 /* SourceFile */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: return true; default: return false; @@ -122548,7 +122806,7 @@ function getModuleName(moduleDeclaration) { } function getFullyQualifiedModuleName(moduleDeclaration) { const result = [getTextOfIdentifierOrLiteral(moduleDeclaration.name)]; - while (moduleDeclaration.body && moduleDeclaration.body.kind === 270 /* ModuleDeclaration */) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 273 /* ModuleDeclaration */) { moduleDeclaration = moduleDeclaration.body; result.push(getTextOfIdentifierOrLiteral(moduleDeclaration.name)); } @@ -122558,13 +122816,13 @@ function getInteriorModule(decl) { return decl.body && isModuleDeclaration(decl.body) ? getInteriorModule(decl.body) : decl; } function isComputedProperty(member) { - return !member.name || member.name.kind === 166 /* ComputedPropertyName */; + return !member.name || member.name.kind === 167 /* ComputedPropertyName */; } function getNodeSpan(node) { - return node.kind === 314 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); + return node.kind === 317 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); } function getModifiers2(node) { - if (node.parent && node.parent.kind === 261 /* VariableDeclaration */) { + if (node.parent && node.parent.kind === 263 /* VariableDeclaration */) { node = node.parent; } return getNodeModifiers(node); @@ -122609,9 +122867,9 @@ function getCalledExpressionName(expr) { } function isFunctionOrClassExpression(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 232 /* ClassExpression */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 234 /* ClassExpression */: return true; default: return false; @@ -122697,8 +122955,8 @@ var NodeObject = class { if (!children.length) { return void 0; } - const child = find(children, (kid) => kid.kind < 318 /* FirstJSDocNode */ || kid.kind > 356 /* LastJSDocNode */); - return child.kind < 165 /* FirstNode */ ? child : child.getFirstToken(sourceFile); + const child = find(children, (kid) => kid.kind < 321 /* FirstJSDocNode */ || kid.kind > 359 /* LastJSDocNode */); + return child.kind < 166 /* FirstNode */ ? child : child.getFirstToken(sourceFile); } getLastToken(sourceFile) { this.assertHasRealPosition(); @@ -122707,7 +122965,7 @@ var NodeObject = class { if (!child) { return void 0; } - return child.kind < 165 /* FirstNode */ ? child : child.getLastToken(sourceFile); + return child.kind < 166 /* FirstNode */ ? child : child.getLastToken(sourceFile); } forEachChild(cbNode, cbNodeArray) { return forEachChild(this, cbNode, cbNodeArray); @@ -122770,7 +123028,7 @@ function addSyntheticNodes(nodes, pos, end, parent2) { } } function createSyntaxList(nodes, parent2) { - const list = createNode(357 /* SyntaxList */, nodes.pos, nodes.end, parent2); + const list = createNode(360 /* SyntaxList */, nodes.pos, nodes.end, parent2); list._children = []; let pos = nodes.pos; for (const node of nodes) { @@ -123084,7 +123342,7 @@ function getJsDocTagsOfDeclarations(declarations, checker) { var _a2; if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) { + if (declaration.kind === 179 /* GetAccessor */ || declaration.kind === 180 /* SetAccessor */) { return symbol.getContextualJsDocTags(declaration, checker); } return ((_a2 = symbol.declarations) == null ? void 0 : _a2.length) === 1 ? symbol.getJsDocTags() : void 0; @@ -123107,7 +123365,7 @@ function getDocumentationComment(declarations, checker) { const inheritedDocs = findBaseOfDeclaration(checker, declaration, (symbol) => { if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) { + if (declaration.kind === 179 /* GetAccessor */ || declaration.kind === 180 /* SetAccessor */) { return symbol.getContextualDocumentationComment(declaration, checker); } return symbol.getDocumentationComment(checker); @@ -123121,7 +123379,7 @@ function getDocumentationComment(declarations, checker) { } function findBaseOfDeclaration(checker, declaration, cb) { var _a2; - const classOrInterfaceDeclaration = ((_a2 = declaration.parent) == null ? void 0 : _a2.kind) === 176 /* Constructor */ ? declaration.parent.parent : declaration.parent; + const classOrInterfaceDeclaration = ((_a2 = declaration.parent) == null ? void 0 : _a2.kind) === 178 /* Constructor */ ? declaration.parent.parent : declaration.parent; if (!classOrInterfaceDeclaration) return; const isStaticMember = hasStaticModifier(declaration); @@ -123135,7 +123393,7 @@ function findBaseOfDeclaration(checker, declaration, cb) { var SourceFileObject = class extends NodeObject { constructor(kind, pos, end) { super(kind, pos, end); - this.kind = 314 /* SourceFile */; + this.kind = 317 /* SourceFile */; } update(newText, textChangeRange) { return updateSourceFile(this, newText, textChangeRange); @@ -123191,10 +123449,10 @@ var SourceFileObject = class extends NodeObject { } function visit(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: const functionDeclaration = node; const declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -123210,30 +123468,30 @@ var SourceFileObject = class extends NodeObject { } forEachChild(node, visit); break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 270 /* ModuleDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 284 /* ExportSpecifier */: - case 279 /* ImportSpecifier */: - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 187 /* TypeLiteral */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 273 /* ModuleDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 287 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 189 /* TypeLiteral */: addDeclaration(node); forEachChild(node, visit); break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (!hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { break; } - case 261 /* VariableDeclaration */: - case 208 /* BindingElement */: { + case 263 /* VariableDeclaration */: + case 210 /* BindingElement */: { const decl = node; if (isBindingPattern(decl.name)) { forEachChild(decl.name, visit); @@ -123243,12 +123501,12 @@ var SourceFileObject = class extends NodeObject { visit(decl.initializer); } } - case 308 /* EnumMember */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 311 /* EnumMember */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: addDeclaration(node); break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: const exportDeclaration = node; if (exportDeclaration.exportClause) { if (isNamedExports(exportDeclaration.exportClause)) { @@ -123258,14 +123516,14 @@ var SourceFileObject = class extends NodeObject { } } break; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: const importClause = node.importClause; if (importClause) { if (importClause.name) { addDeclaration(importClause.name); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 277 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 280 /* NamespaceImport */) { addDeclaration(importClause.namedBindings); } else { forEach(importClause.namedBindings.elements, visit); @@ -123273,7 +123531,7 @@ var SourceFileObject = class extends NodeObject { } } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) !== 0 /* None */) { addDeclaration(node); } @@ -123913,15 +124171,15 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h switch (node.kind) { case 79 /* Identifier */: return !isLabelName(node) && !isTagName(node) && !isConstTypeReference(node.parent); - case 211 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: return !isInComment(sourceFile, position); case 109 /* ThisKeyword */: - case 197 /* ThisType */: + case 199 /* ThisType */: case 107 /* SuperKeyword */: - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return true; - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return isImportMeta(node); default: return false; @@ -124031,15 +124289,15 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h return void 0; } switch (node.kind) { - case 211 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: case 10 /* StringLiteral */: case 96 /* FalseKeyword */: case 111 /* TrueKeyword */: case 105 /* NullKeyword */: case 107 /* SuperKeyword */: case 109 /* ThisKeyword */: - case 197 /* ThisType */: + case 199 /* ThisType */: case 79 /* Identifier */: break; default: @@ -124050,7 +124308,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h if (isRightSideOfPropertyAccess(nodeForStartPos) || isRightSideOfQualifiedName(nodeForStartPos)) { nodeForStartPos = nodeForStartPos.parent; } else if (isNameOfModuleDeclaration(nodeForStartPos)) { - if (nodeForStartPos.parent.parent.kind === 270 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { + if (nodeForStartPos.parent.parent.kind === 273 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { nodeForStartPos = nodeForStartPos.parent.parent.name; } else { break; @@ -124667,7 +124925,7 @@ function initializeNameTable(sourceFile) { }); } function literalIsName(node) { - return isDeclarationName(node) || node.parent.kind === 286 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); + return isDeclarationName(node) || node.parent.kind === 289 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); } function getContainingObjectLiteralElement(node) { const element = getContainingObjectLiteralElementWorker(node); @@ -124678,11 +124936,11 @@ function getContainingObjectLiteralElementWorker(node) { case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: - if (node.parent.kind === 166 /* ComputedPropertyName */) { + if (node.parent.kind === 167 /* ComputedPropertyName */) { return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : void 0; } case 79 /* Identifier */: - return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.parent.kind === 295 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; + return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 212 /* ObjectLiteralExpression */ || node.parent.parent.kind === 298 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; } return void 0; } @@ -124717,7 +124975,7 @@ function getPropertySymbolsFromContextualType(node, checker, contextualType, uni return discriminatedPropertySymbols; } function isArgumentOfElementAccessExpression(node) { - return node && node.parent && node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.argumentExpression === node; + return node && node.parent && node.parent.kind === 214 /* ElementAccessExpression */ && node.parent.argumentExpression === node; } function getDefaultLibFilePath(options) { if (sys) { @@ -125639,89 +125897,89 @@ function spanInSourceFileAtLocation(sourceFile, position) { if (node) { const { parent: parent2 } = node; switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 261 /* VariableDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 263 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return spanInVariableDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return spanInParameterDeclaration(node); - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 178 /* Constructor */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return spanInFunctionDeclaration(node); - case 242 /* Block */: + case 244 /* Block */: if (isFunctionBlock(node)) { return spanInFunctionBlock(node); } - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return spanInBlock(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return spanInBlock(node.block); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return textSpan(node.expression); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return textSpan(node.getChildAt(0), node.expression); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return spanInNode(node.statement); - case 260 /* DebuggerStatement */: + case 262 /* DebuggerStatement */: return textSpan(node.getChildAt(0)); - case 246 /* IfStatement */: + case 248 /* IfStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return spanInNode(node.statement); - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: return textSpan(node.getChildAt(0), node.label); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return spanInForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return spanInInitializerOfForLike(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: return spanInNode(node.statements[0]); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return spanInBlock(node.tryBlock); - case 258 /* ThrowStatement */: + case 260 /* ThrowStatement */: return textSpan(node, node.expression); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return textSpan(node, node.expression); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return textSpan(node, node.moduleReference); - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: if (getModuleInstanceState(node) !== 1 /* Instantiated */) { return void 0; } - case 264 /* ClassDeclaration */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: - case 208 /* BindingElement */: + case 266 /* ClassDeclaration */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: + case 210 /* BindingElement */: return textSpan(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return spanInNode(node.statement); - case 169 /* Decorator */: + case 170 /* Decorator */: return spanInNodeArray(parent2.modifiers, node, isDecorator); - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: return spanInBindingPattern(node); - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return void 0; case 26 /* SemicolonToken */: case 1 /* EndOfFileToken */: @@ -125749,16 +126007,16 @@ function spanInSourceFileAtLocation(sourceFile, position) { case 83 /* CatchKeyword */: case 97 /* FinallyKeyword */: return spanInNextNode(node); - case 164 /* OfKeyword */: + case 165 /* OfKeyword */: return spanInOfKeyword(node); default: if (isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); } - if ((node.kind === 79 /* Identifier */ || node.kind === 231 /* SpreadElement */ || node.kind === 305 /* PropertyAssignment */ || node.kind === 306 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { + if ((node.kind === 79 /* Identifier */ || node.kind === 233 /* SpreadElement */ || node.kind === 308 /* PropertyAssignment */ || node.kind === 309 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { return textSpan(node); } - if (node.kind === 227 /* BinaryExpression */) { + if (node.kind === 229 /* BinaryExpression */) { const { left, operatorToken } = node; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern( @@ -125774,19 +126032,19 @@ function spanInSourceFileAtLocation(sourceFile, position) { } if (isExpressionNode(node)) { switch (parent2.kind) { - case 247 /* DoStatement */: + case 249 /* DoStatement */: return spanInPreviousNode(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return spanInNode(node.parent); - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: return textSpan(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (node.parent.operatorToken.kind === 27 /* CommaToken */) { return textSpan(node); } break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: if (node.parent.body === node) { return textSpan(node); } @@ -125794,25 +126052,25 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } switch (node.parent.kind) { - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (node.parent.name === node && !isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } break; - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: if (node.parent.type === node) { return spanInNextNode(node.parent.type); } break; - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: { + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: { const { initializer, type } = node.parent; if (initializer === node || type === node || isAssignmentOperator(node.kind)) { return spanInPreviousNode(node); } break; } - case 227 /* BinaryExpression */: { + case 229 /* BinaryExpression */: { const { left } = node.parent; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left) && node !== left) { return spanInPreviousNode(node); @@ -125835,14 +126093,14 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function spanInVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.parent.kind === 250 /* ForInStatement */) { + if (variableDeclaration.parent.parent.kind === 252 /* 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 === 251 /* ForOfStatement */) { + if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 253 /* ForOfStatement */) { return textSpanFromVariableDeclaration(variableDeclaration); } if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] !== variableDeclaration) { @@ -125869,7 +126127,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 264 /* ClassDeclaration */ && functionDeclaration.kind !== 176 /* Constructor */; + return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 266 /* ClassDeclaration */ && functionDeclaration.kind !== 178 /* Constructor */; } function spanInFunctionDeclaration(functionDeclaration) { if (!functionDeclaration.body) { @@ -125889,22 +126147,22 @@ function spanInSourceFileAtLocation(sourceFile, position) { } function spanInBlock(block) { switch (block.parent.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: if (getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { return void 0; } - case 248 /* WhileStatement */: - case 246 /* IfStatement */: - case 250 /* ForInStatement */: + case 250 /* WhileStatement */: + case 248 /* IfStatement */: + case 252 /* ForInStatement */: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: return spanInNodeIfStartsOnSameLine(findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } return spanInNode(block.statements[0]); } function spanInInitializerOfForLike(forLikeStatement) { - if (forLikeStatement.initializer.kind === 262 /* VariableDeclarationList */) { + if (forLikeStatement.initializer.kind === 264 /* VariableDeclarationList */) { const variableDeclarationList = forLikeStatement.initializer; if (variableDeclarationList.declarations.length > 0) { return spanInNode(variableDeclarationList.declarations[0]); @@ -125927,64 +126185,64 @@ function spanInSourceFileAtLocation(sourceFile, position) { function spanInBindingPattern(bindingPattern) { const firstBindingElement = forEach( bindingPattern.elements, - (element) => element.kind !== 233 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 235 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - if (bindingPattern.parent.kind === 208 /* BindingElement */) { + if (bindingPattern.parent.kind === 210 /* BindingElement */) { return textSpan(bindingPattern.parent); } return textSpanFromVariableDeclaration(bindingPattern.parent); } function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node2) { - Debug.assert(node2.kind !== 207 /* ArrayBindingPattern */ && node2.kind !== 206 /* ObjectBindingPattern */); - const elements = node2.kind === 209 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; + Debug.assert(node2.kind !== 209 /* ArrayBindingPattern */ && node2.kind !== 208 /* ObjectBindingPattern */); + const elements = node2.kind === 211 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; const firstBindingElement = forEach( elements, - (element) => element.kind !== 233 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 235 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - return textSpan(node2.parent.kind === 227 /* BinaryExpression */ ? node2.parent : node2); + return textSpan(node2.parent.kind === 229 /* BinaryExpression */ ? node2.parent : node2); } function spanInOpenBraceToken(node2) { switch (node2.parent.kind) { - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: const enumDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: const classDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return spanInNodeIfStartsOnSameLine(node2.parent.parent, node2.parent.clauses[0]); } return spanInNode(node2.parent); } function spanInCloseBraceToken(node2) { switch (node2.parent.kind) { - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: if (getModuleInstanceState(node2.parent.parent) !== 1 /* Instantiated */) { return void 0; } - case 269 /* EnumDeclaration */: - case 264 /* ClassDeclaration */: + case 272 /* EnumDeclaration */: + case 266 /* ClassDeclaration */: return textSpan(node2); - case 242 /* Block */: + case 244 /* Block */: if (isFunctionBlock(node2.parent)) { return textSpan(node2); } - case 301 /* CatchClause */: + case 304 /* CatchClause */: return spanInNode(lastOrUndefined(node2.parent.statements)); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: const caseBlock = node2.parent; const lastClause = lastOrUndefined(caseBlock.clauses); if (lastClause) { return spanInNode(lastOrUndefined(lastClause.statements)); } return void 0; - case 206 /* ObjectBindingPattern */: + case 208 /* ObjectBindingPattern */: const bindingPattern = node2.parent; return spanInNode(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -125997,7 +126255,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { } function spanInCloseBracketToken(node2) { switch (node2.parent.kind) { - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: const bindingPattern = node2.parent; return textSpan(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -126009,56 +126267,56 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function spanInOpenParenToken(node2) { - if (node2.parent.kind === 247 /* DoStatement */ || node2.parent.kind === 213 /* CallExpression */ || node2.parent.kind === 214 /* NewExpression */) { + if (node2.parent.kind === 249 /* DoStatement */ || node2.parent.kind === 215 /* CallExpression */ || node2.parent.kind === 216 /* NewExpression */) { return spanInPreviousNode(node2); } - if (node2.parent.kind === 217 /* ParenthesizedExpression */) { + if (node2.parent.kind === 219 /* ParenthesizedExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInCloseParenToken(node2) { switch (node2.parent.kind) { - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - case 248 /* WhileStatement */: - case 247 /* DoStatement */: - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 217 /* ParenthesizedExpression */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 178 /* Constructor */: + case 250 /* WhileStatement */: + case 249 /* DoStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 219 /* ParenthesizedExpression */: return spanInPreviousNode(node2); default: return spanInNode(node2.parent); } } function spanInColonToken(node2) { - if (isFunctionLike(node2.parent) || node2.parent.kind === 305 /* PropertyAssignment */ || node2.parent.kind === 168 /* Parameter */) { + if (isFunctionLike(node2.parent) || node2.parent.kind === 308 /* PropertyAssignment */ || node2.parent.kind === 169 /* Parameter */) { return spanInPreviousNode(node2); } return spanInNode(node2.parent); } function spanInGreaterThanOrLessThanToken(node2) { - if (node2.parent.kind === 216 /* TypeAssertionExpression */) { + if (node2.parent.kind === 218 /* TypeAssertionExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInWhileKeyword(node2) { - if (node2.parent.kind === 247 /* DoStatement */) { + if (node2.parent.kind === 249 /* DoStatement */) { return textSpanEndingAtNextToken(node2, node2.parent.expression); } return spanInNode(node2.parent); } function spanInOfKeyword(node2) { - if (node2.parent.kind === 251 /* ForOfStatement */) { + if (node2.parent.kind === 253 /* ForOfStatement */) { return spanInNextNode(node2); } return spanInNode(node2.parent); @@ -126147,17 +126405,17 @@ function getCallHierarchItemContainerName(node) { return; } switch (node.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - if (node.parent.kind === 210 /* ObjectLiteralExpression */) { + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: + if (node.parent.kind === 212 /* ObjectLiteralExpression */) { return (_a2 = getAssignedName(node.parent)) == null ? void 0 : _a2.getText(); } return (_b = getNameOfDeclaration(node.parent)) == null ? void 0 : _b.getText(); - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 270 /* ModuleDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 273 /* ModuleDeclaration */: if (isModuleBlock(node.parent) && isIdentifier(node.parent.parent.name)) { return node.parent.parent.name.getText(); } @@ -126335,55 +126593,55 @@ function createCallSiteCollector(program, callSites) { } switch (node.kind) { case 79 /* Identifier */: - case 274 /* ImportEqualsDeclaration */: - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return; - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: recordCallSite(node); return; - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: collect(node.expression); return; - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: collect(node.name); collect(node.initializer); return; - case 213 /* CallExpression */: + case 215 /* CallExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 214 /* NewExpression */: + case 216 /* NewExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: recordCallSite(node); collect(node.tag); collect(node.template); return; - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: recordCallSite(node); collect(node.tagName); collect(node.attributes); return; - case 169 /* Decorator */: + case 170 /* Decorator */: recordCallSite(node); collect(node.expression); return; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: recordCallSite(node); forEachChild(node, collect); break; - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: collect(node.expression); return; } @@ -126436,26 +126694,26 @@ function collectCallSites(program, node) { const callSites = []; const collect = createCallSiteCollector(program, callSites); switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: collectCallSitesOfSourceFile(node, collect); break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: collectCallSitesOfModuleDeclaration(node, collect); break; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: collectCallSitesOfFunctionLikeDeclaration(program.getTypeChecker(), node, collect); break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: collectCallSitesOfClassLikeDeclaration(node, collect); break; - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: collectCallSitesOfClassStaticBlockDeclaration(node, collect); break; default: @@ -126556,13 +126814,13 @@ function collectTokens(program, sourceFile, span, collector, cancellationToken) let inJSXElement = false; function visit(node) { switch (node.kind) { - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!node || !textSpanIntersectsWith(span, node.pos, node.getFullWidth()) || node.getFullWidth() === 0) { @@ -126702,25 +126960,25 @@ function isRightSideOfQualifiedNameOrPropertyAccess2(node) { return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node; } var tokenFromDeclarationMapping = new Map2([ - [261 /* VariableDeclaration */, 7 /* variable */], - [168 /* Parameter */, 6 /* parameter */], - [171 /* PropertyDeclaration */, 9 /* property */], - [270 /* ModuleDeclaration */, 3 /* namespace */], - [269 /* EnumDeclaration */, 1 /* enum */], - [308 /* EnumMember */, 8 /* enumMember */], - [264 /* ClassDeclaration */, 0 /* class */], - [174 /* MethodDeclaration */, 11 /* member */], - [263 /* FunctionDeclaration */, 10 /* function */], - [218 /* FunctionExpression */, 10 /* function */], - [173 /* MethodSignature */, 11 /* member */], - [177 /* GetAccessor */, 9 /* property */], - [178 /* SetAccessor */, 9 /* property */], - [170 /* PropertySignature */, 9 /* property */], - [267 /* InterfaceDeclaration */, 2 /* interface */], - [268 /* TypeAliasDeclaration */, 5 /* type */], - [167 /* TypeParameter */, 4 /* typeParameter */], - [305 /* PropertyAssignment */, 9 /* property */], - [306 /* ShorthandPropertyAssignment */, 9 /* property */] + [263 /* VariableDeclaration */, 7 /* variable */], + [169 /* Parameter */, 6 /* parameter */], + [172 /* PropertyDeclaration */, 9 /* property */], + [273 /* ModuleDeclaration */, 3 /* namespace */], + [272 /* EnumDeclaration */, 1 /* enum */], + [311 /* EnumMember */, 8 /* enumMember */], + [266 /* ClassDeclaration */, 0 /* class */], + [176 /* MethodDeclaration */, 11 /* member */], + [265 /* FunctionDeclaration */, 10 /* function */], + [220 /* FunctionExpression */, 10 /* function */], + [175 /* MethodSignature */, 11 /* member */], + [179 /* GetAccessor */, 9 /* property */], + [180 /* SetAccessor */, 9 /* property */], + [171 /* PropertySignature */, 9 /* property */], + [270 /* InterfaceDeclaration */, 2 /* interface */], + [271 /* TypeAliasDeclaration */, 5 /* type */], + [168 /* TypeParameter */, 4 /* typeParameter */], + [308 /* PropertyAssignment */, 9 /* property */], + [309 /* ShorthandPropertyAssignment */, 9 /* property */] ]); // src/services/_namespaces/ts.codefix.ts @@ -127067,7 +127325,7 @@ function findAwaitableInitializers(expression, sourceFile, cancellationToken, pr } const declaration = tryCast(symbol.valueDeclaration, isVariableDeclaration); const variableName = declaration && tryCast(declaration.name, isIdentifier); - const variableStatement = getAncestor(declaration, 244 /* VariableStatement */); + const variableStatement = getAncestor(declaration, 246 /* VariableStatement */); if (!declaration || !variableStatement || declaration.type || !declaration.initializer || variableStatement.getSourceFile() !== sourceFile || hasSyntacticModifier(variableStatement, 1 /* Export */) || !variableName || !isInsideAwaitableBody(declaration.initializer)) { isCompleteFix = false; continue; @@ -127119,7 +127377,7 @@ function symbolReferenceIsAlsoMissingAwait(reference, diagnostics, sourceFile, c return diagnostic && contains(errorCodes3, diagnostic.code) || 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 === 263 /* FunctionDeclaration */ || ancestor.parent.kind === 218 /* FunctionExpression */ || ancestor.parent.kind === 219 /* ArrowFunction */ || ancestor.parent.kind === 174 /* MethodDeclaration */)); + return node.kind & 32768 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 265 /* FunctionDeclaration */ || ancestor.parent.kind === 220 /* FunctionExpression */ || ancestor.parent.kind === 221 /* ArrowFunction */ || ancestor.parent.kind === 176 /* MethodDeclaration */)); } function makeChange3(changeTracker, errorCode, sourceFile, checker, insertionSite, fixedDeclarations) { if (isForOfStatement(insertionSite.parent) && !insertionSite.parent.awaitModifier) { @@ -127241,10 +127499,10 @@ function applyChange(changeTracker, initializer, sourceFile, fixedNodes) { function isPossiblyPartOfDestructuring(node) { switch (node.kind) { case 79 /* Identifier */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return true; default: return false; @@ -127257,7 +127515,7 @@ function arrayElementCouldBeVariableDeclaration(expression, checker) { function isPossiblyPartOfCommaSeperatedInitializer(node) { switch (node.kind) { case 79 /* Identifier */: - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: case 27 /* CommaToken */: return true; default: @@ -127299,7 +127557,7 @@ function makeChange5(changeTracker, sourceFile, pos, fixedNodes) { return; } const declaration = token.parent; - if (declaration.kind === 171 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { + if (declaration.kind === 172 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { changeTracker.insertModifierBefore(sourceFile, 137 /* DeclareKeyword */, declaration); } } @@ -127433,7 +127691,7 @@ function addUndefinedToOptionalProperty(changes, toAdd) { const d = add.valueDeclaration; if (d && (isPropertySignature(d) || isPropertyDeclaration(d)) && d.type) { const t = factory.createUnionTypeNode([ - ...d.type.kind === 192 /* UnionType */ ? d.type.types : [d.type], + ...d.type.kind === 194 /* UnionType */ ? d.type.types : [d.type], factory.createTypeReferenceNode("undefined") ]); changes.replaceNode(d.getSourceFile(), d.type, t); @@ -127501,24 +127759,24 @@ function doChange(changes, sourceFile, decl) { } } function isDeclarationWithType(node) { - return isFunctionLikeDeclaration(node) || node.kind === 261 /* VariableDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 171 /* PropertyDeclaration */; + return isFunctionLikeDeclaration(node) || node.kind === 263 /* VariableDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 172 /* PropertyDeclaration */; } function transformJSDocType(node) { switch (node.kind) { - case 321 /* JSDocAllType */: - case 322 /* JSDocUnknownType */: + case 324 /* JSDocAllType */: + case 325 /* JSDocUnknownType */: return factory.createTypeReferenceNode("any", emptyArray); - case 325 /* JSDocOptionalType */: + case 328 /* JSDocOptionalType */: return transformJSDocOptionalType(node); - case 324 /* JSDocNonNullableType */: + case 327 /* JSDocNonNullableType */: return transformJSDocType(node.type); - case 323 /* JSDocNullableType */: + case 326 /* JSDocNullableType */: return transformJSDocNullableType(node); - case 327 /* JSDocVariadicType */: + case 330 /* JSDocVariadicType */: return transformJSDocVariadicType(node); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: return transformJSDocFunctionType(node); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return transformJSDocTypeReference(node); default: const visited = visitEachChild(node, transformJSDocType, nullTransformationContext); @@ -127541,7 +127799,7 @@ function transformJSDocFunctionType(node) { } function transformJSDocParameter(node) { const index = node.parent.parameters.indexOf(node); - const isRest = node.type.kind === 327 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; + const isRest = node.type.kind === 330 /* 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), node.initializer); @@ -127689,7 +127947,7 @@ function doChange2(changes, sourceFile, position, checker, preferences, compiler })) { return; } - const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 245 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; + const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 247 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; changes.delete(sourceFile, nodeToDelete); if (!assignmentExpr) { members.push(factory.createPropertyDeclaration( @@ -127759,7 +128017,7 @@ function doChange2(changes, sourceFile, position, checker, preferences, compiler function createArrowFunctionExpressionMember(members2, arrowFunction, name) { const arrowFunctionBody = arrowFunction.body; let bodyBlock; - if (arrowFunctionBody.kind === 242 /* Block */) { + if (arrowFunctionBody.kind === 244 /* Block */) { bodyBlock = arrowFunctionBody; } else { bodyBlock = factory.createBlock([factory.createReturnStatement(arrowFunctionBody)]); @@ -128206,7 +128464,7 @@ function transformCallbackArgument(func, hasContinuation, continuationArgName, i switch (func.kind) { case 105 /* NullKeyword */: break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: case 79 /* Identifier */: if (!inputArgName) { break; @@ -128226,8 +128484,8 @@ function transformCallbackArgument(func, hasContinuation, continuationArgName, i continuationArgName.types.push(transformer.checker.getAwaitedType(returnType) || returnType); } return varDeclOrAssignment; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: { + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: { const funcBody = func.body; const returnType2 = (_a2 = getLastCallSignature(transformer.checker.getTypeAtLocation(func), transformer.checker)) == null ? void 0 : _a2.getReturnType(); if (isBlock(funcBody)) { @@ -128441,10 +128699,10 @@ function fixImportOfModuleExports(importingFile, exportingFile, changes, quotePr } const importNode = importFromModuleSpecifier(moduleSpecifier); switch (importNode.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: changes.replaceNode(importingFile, importNode, makeImport(importNode.name, void 0, moduleSpecifier, quotePreference)); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (isRequireCall(importNode, false)) { changes.replaceNode(importingFile, importNode, factory.createPropertyAccessExpression(getSynthesizedDeepClone(importNode), "default")); } @@ -128503,19 +128761,19 @@ function forEachExportReference(sourceFile, cb) { } function convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports, useSitesToUnqualify, quotePreference) { switch (statement.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference); return false; - case 245 /* ExpressionStatement */: { + case 247 /* ExpressionStatement */: { const { expression } = statement; switch (expression.kind) { - case 213 /* CallExpression */: { + case 215 /* CallExpression */: { if (isRequireCall(expression, true)) { changes.replaceNode(sourceFile, statement, makeImport(void 0, void 0, expression.arguments[0], quotePreference)); } return false; } - case 227 /* BinaryExpression */: { + case 229 /* BinaryExpression */: { const { operatorToken } = expression; return operatorToken.kind === 63 /* EqualsToken */ && convertAssignment(sourceFile, checker, expression, changes, exports, useSitesToUnqualify); } @@ -128557,8 +128815,8 @@ function convertVariableStatement(sourceFile, statement, changes, checker, ident } function convertPropertyAccessImport(name, propertyName, moduleSpecifier, identifiers, quotePreference) { switch (name.kind) { - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: { + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: { const tmp = makeUniqueName(propertyName, identifiers); return convertedImports([ makeSingleImport(tmp, propertyName, moduleSpecifier, quotePreference), @@ -128597,14 +128855,14 @@ function convertAssignment(sourceFile, checker, assignment, changes, exports, us function tryChangeModuleExportsObject(object, useSitesToUnqualify) { const statements = mapAllOrFail(object.properties, (prop) => { switch (prop.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 306 /* ShorthandPropertyAssignment */: - case 307 /* SpreadAssignment */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 309 /* ShorthandPropertyAssignment */: + case 310 /* SpreadAssignment */: return void 0; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return !isIdentifier(prop.name) ? void 0 : convertExportsDotXEquals_replaceNode(prop.name.text, prop.initializer, useSitesToUnqualify); - case 174 /* MethodDeclaration */: + case 176 /* 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}`); @@ -128659,15 +128917,15 @@ function convertExportsPropertyAssignment({ left, right, parent: parent2 }, sour function convertExportsDotXEquals_replaceNode(name, exported, useSitesToUnqualify) { const modifiers = [factory.createToken(94 /* ExportKeyword */)]; switch (exported.kind) { - case 218 /* FunctionExpression */: { + case 220 /* FunctionExpression */: { const { name: expressionName } = exported; if (expressionName && expressionName.text !== name) { return exportConst(); } } - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return functionExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return classExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); default: return exportConst(); @@ -128682,7 +128940,7 @@ function replaceImportUseSites(nodeOrNodes, useSitesToUnqualify) { } return isArray(nodeOrNodes) ? getSynthesizedDeepClonesWithReplacements(nodeOrNodes, true, replaceNode) : getSynthesizedDeepCloneWithReplacements(nodeOrNodes, true, replaceNode); function replaceNode(original) { - if (original.kind === 211 /* PropertyAccessExpression */) { + if (original.kind === 213 /* PropertyAccessExpression */) { const replacement = useSitesToUnqualify.get(original); useSitesToUnqualify.delete(original); return replacement; @@ -128691,13 +128949,13 @@ function replaceImportUseSites(nodeOrNodes, useSitesToUnqualify) { } function convertSingleImport(name, moduleSpecifier, checker, identifiers, target, quotePreference) { switch (name.kind) { - case 206 /* ObjectBindingPattern */: { + case 208 /* 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(void 0, importSpecifiers, moduleSpecifier, quotePreference)]); } } - case 207 /* ArrayBindingPattern */: { + case 209 /* ArrayBindingPattern */: { const tmp = makeUniqueName(moduleSpecifierToValidIdentifier(moduleSpecifier.text, target), identifiers); return convertedImports([ makeImport(factory.createIdentifier(tmp), void 0, moduleSpecifier, quotePreference), @@ -128768,11 +129026,11 @@ function forEachFreeIdentifier(node, cb) { function isFreeIdentifier(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return parent2.name !== node; - case 208 /* BindingElement */: + case 210 /* BindingElement */: return parent2.propertyName !== node; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return parent2.propertyName !== node; default: return true; @@ -129442,11 +129700,11 @@ function tryUseExistingNamespaceImport(existingImports, symbolName2, position, c function getTargetModuleFromNamespaceLikeImport(declaration, checker) { var _a2; switch (declaration.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return checker.resolveExternalModuleName(declaration.initializer.arguments[0]); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return checker.getAliasedSymbol(declaration.symbol); - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: const namespaceImport = tryCast((_a2 = declaration.importClause) == null ? void 0 : _a2.namedBindings, isNamespaceImport); return namespaceImport && checker.getAliasedSymbol(namespaceImport.symbol); default: @@ -129456,11 +129714,11 @@ function getTargetModuleFromNamespaceLikeImport(declaration, checker) { function getNamespaceLikeImportText(declaration) { var _a2, _b, _c; switch (declaration.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return (_a2 = tryCast(declaration.name, isIdentifier)) == null ? void 0 : _a2.text; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return declaration.name.text; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return (_c = tryCast((_b = declaration.importClause) == null ? void 0 : _b.namedBindings, isNamespaceImport)) == null ? void 0 : _c.name.text; default: return Debug.assertNever(declaration); @@ -129480,11 +129738,11 @@ function getAddAsTypeOnly(isValidTypeOnlyUseSite, isForNewImportDeclaration, sym } function tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker, compilerOptions) { return firstDefined(existingImports, ({ declaration, importKind, symbol, targetFlags }) => { - if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 274 /* ImportEqualsDeclaration */) { + if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 277 /* ImportEqualsDeclaration */) { return void 0; } - if (declaration.kind === 261 /* VariableDeclaration */) { - return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 206 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; + if (declaration.kind === 263 /* VariableDeclaration */) { + return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 208 /* 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)) @@ -129495,7 +129753,7 @@ function tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker const addAsTypeOnly = getAddAsTypeOnly(isValidTypeOnlyUseSite, false, symbol, targetFlags, checker, compilerOptions); if (importKind === 1 /* Default */ && (name || addAsTypeOnly === 2 /* Required */ && namedBindings)) return void 0; - if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 277 /* NamespaceImport */) + if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 280 /* NamespaceImport */) return void 0; return { kind: 2 /* AddToExisting */, @@ -129515,7 +129773,7 @@ function createExistingImportMap(checker, importingFile, compilerOptions) { if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i.parent); } - } else if (i.kind === 275 /* ImportDeclaration */ || i.kind === 274 /* ImportEqualsDeclaration */) { + } else if (i.kind === 278 /* ImportDeclaration */ || i.kind === 277 /* ImportEqualsDeclaration */) { const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier); if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i); @@ -129856,7 +130114,7 @@ function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSy case 4 /* PromoteTypeOnly */: { const { typeOnlyAliasDeclaration } = fix; const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, compilerOptions, sourceFile); - return promotedDeclaration.kind === 279 /* 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 === 282 /* 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}`); @@ -129864,12 +130122,12 @@ function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSy } function getModuleSpecifierText(promotedDeclaration) { var _a2, _b; - return promotedDeclaration.kind === 274 /* 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 === 277 /* 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) { const convertExistingToTypeOnly = compilerOptions.preserveValueImports && compilerOptions.isolatedModules; switch (aliasDeclaration.kind) { - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: if (aliasDeclaration.isTypeOnly) { if (aliasDeclaration.parent.elements.length > 1 && ts_OrganizeImports_exports.importSpecifiersAreSorted(aliasDeclaration.parent.elements)) { changes.delete(sourceFile, aliasDeclaration); @@ -129885,13 +130143,13 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF promoteImportClause(aliasDeclaration.parent.parent); return aliasDeclaration.parent.parent; } - case 276 /* ImportClause */: + case 279 /* ImportClause */: promoteImportClause(aliasDeclaration); return aliasDeclaration; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: promoteImportClause(aliasDeclaration.parent); return aliasDeclaration.parent; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: changes.deleteRange(sourceFile, aliasDeclaration.getChildAt(1)); return aliasDeclaration; default: @@ -129902,7 +130160,7 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF if (convertExistingToTypeOnly) { const namedImports = tryCast(importClause.namedBindings, isNamedImports); if (namedImports && namedImports.elements.length > 1) { - if (ts_OrganizeImports_exports.importSpecifiersAreSorted(namedImports.elements) && aliasDeclaration.kind === 279 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { + if (ts_OrganizeImports_exports.importSpecifiersAreSorted(namedImports.elements) && aliasDeclaration.kind === 282 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { changes.delete(sourceFile, aliasDeclaration); changes.insertImportSpecifierAtIndex(sourceFile, aliasDeclaration, namedImports, 0); } @@ -129917,7 +130175,7 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF } function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, compilerOptions) { var _a2; - if (clause.kind === 206 /* ObjectBindingPattern */) { + if (clause.kind === 208 /* ObjectBindingPattern */) { if (defaultImport) { addElementToBindingPattern(clause, defaultImport.name, "default"); } @@ -130315,13 +130573,13 @@ function doRemoveOverrideModifierChange(changeTracker, sourceFile, pos) { } function isClassElementLikeHasJSDoc(node) { switch (node.kind) { - case 176 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return true; - case 168 /* Parameter */: + case 169 /* Parameter */: return isParameterPropertyDeclaration(node, node.parent); default: return false; @@ -130579,7 +130837,7 @@ registerCodeFix({ }); function getNamedTupleMember(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - return findAncestor(token, (t) => t.kind === 202 /* NamedTupleMember */); + return findAncestor(token, (t) => t.kind === 204 /* NamedTupleMember */); } function doChange8(changes, sourceFile, namedTupleMember) { if (!namedTupleMember) { @@ -130588,10 +130846,10 @@ function doChange8(changes, sourceFile, namedTupleMember) { let unwrappedType = namedTupleMember.type; let sawOptional = false; let sawRest = false; - while (unwrappedType.kind === 190 /* OptionalType */ || unwrappedType.kind === 191 /* RestType */ || unwrappedType.kind === 196 /* ParenthesizedType */) { - if (unwrappedType.kind === 190 /* OptionalType */) { + while (unwrappedType.kind === 192 /* OptionalType */ || unwrappedType.kind === 193 /* RestType */ || unwrappedType.kind === 198 /* ParenthesizedType */) { + if (unwrappedType.kind === 192 /* OptionalType */) { sawOptional = true; - } else if (unwrappedType.kind === 191 /* RestType */) { + } else if (unwrappedType.kind === 193 /* RestType */) { sawRest = true; } unwrappedType = unwrappedType.type; @@ -130893,19 +131151,19 @@ function getInfo6(checker, sourceFile, position, errorCode) { } function getVariableLikeInitializer(declaration) { switch (declaration.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 305 /* PropertyAssignment */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 308 /* PropertyAssignment */: return declaration.initializer; - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: return declaration.initializer && (isJsxExpression(declaration.initializer) ? declaration.initializer.expression : void 0); - case 306 /* ShorthandPropertyAssignment */: - case 170 /* PropertySignature */: - case 308 /* EnumMember */: - case 356 /* JSDocPropertyTag */: - case 349 /* JSDocParameterTag */: + case 309 /* ShorthandPropertyAssignment */: + case 171 /* PropertySignature */: + case 311 /* EnumMember */: + case 359 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: return void 0; } } @@ -131138,7 +131396,7 @@ function createActionForAddMissingMemberInJavascriptFile(context, { parentDeclar function addMissingMemberInJs(changeTracker, sourceFile, classDeclaration, token, makeStatic) { const tokenName = token.text; if (makeStatic) { - if (classDeclaration.kind === 232 /* ClassExpression */) { + if (classDeclaration.kind === 234 /* ClassExpression */) { return; } const className = classDeclaration.name.getText(); @@ -131187,7 +131445,7 @@ function createActionsForAddMissingMemberInTypeScriptFile(context, { parentDecla } function getTypeNode2(checker, node, token) { let typeNode; - if (token.parent.parent.kind === 227 /* BinaryExpression */) { + if (token.parent.parent.kind === 229 /* 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))); @@ -131253,7 +131511,7 @@ function getActionsForMissingMethodDeclaration(context, info) { } function addMethodDeclaration(context, changes, callExpression, name, modifierFlags, parentDeclaration, sourceFile) { const importAdder = createImportAdder(sourceFile, context.program, context.preferences, context.host); - const kind = isClassLike(parentDeclaration) ? 174 /* MethodDeclaration */ : 173 /* MethodSignature */; + const kind = isClassLike(parentDeclaration) ? 176 /* MethodDeclaration */ : 175 /* MethodSignature */; const signatureDeclaration = createSignatureDeclarationFromCallExpression(kind, context, importAdder, callExpression, name, modifierFlags, parentDeclaration); const containingMethodDeclaration = tryGetContainingMethodDeclaration(parentDeclaration, callExpression); if (containingMethodDeclaration) { @@ -131282,7 +131540,7 @@ function addEnumMemberDeclaration(changes, checker, { token, parentDeclaration } 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(263 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature(263 /* FunctionDeclaration */, context, quotePreference, info.signature, createStubbedBody(Diagnostics.Function_not_implemented.message, quotePreference), info.token, void 0, void 0, void 0, importAdder); + const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(265 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature(265 /* FunctionDeclaration */, context, quotePreference, info.signature, createStubbedBody(Diagnostics.Function_not_implemented.message, quotePreference), info.token, void 0, void 0, void 0, importAdder); if (functionDeclaration === void 0) { Debug.fail("fixMissingFunctionDeclaration codefix got unexpected error."); } @@ -131382,7 +131640,7 @@ function tryGetValueFromType(context, checker, importAdder, quotePreference, typ if (signature === void 0) return createUndefined(); const func = createSignatureDeclarationFromSignature( - 218 /* FunctionExpression */, + 220 /* FunctionExpression */, context, quotePreference, signature[0], @@ -132043,7 +132301,7 @@ registerCodeFix({ const importDeclaration = getImportDeclaration(context.sourceFile, context.program, context.span.start); if (!importDeclaration) return; - const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 279 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); + const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 282 /* 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) { @@ -132058,18 +132316,18 @@ registerCodeFix({ }); function getImportDeclaration(sourceFile, program, start) { const identifier = tryCast(getTokenAtPosition(sourceFile, start), isIdentifier); - if (!identifier || identifier.parent.kind !== 183 /* TypeReference */) + if (!identifier || identifier.parent.kind !== 185 /* 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 === 274 /* ImportEqualsDeclaration */) { + if (importDeclaration.kind === 277 /* ImportEqualsDeclaration */) { changes.insertModifierBefore(sourceFile, 155 /* TypeKeyword */, importDeclaration.name); return; } - const importClause = importDeclaration.kind === 276 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; + const importClause = importDeclaration.kind === 279 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; if (importClause.name && importClause.namedBindings) { return; } @@ -132227,7 +132485,7 @@ function deleteTypeParameters(changes, sourceFile, token) { changes.delete(sourceFile, Debug.checkDefined(cast(token.parent, isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); } function isImport(token) { - return token.kind === 101 /* ImportKeyword */ || token.kind === 79 /* Identifier */ && (token.parent.kind === 279 /* ImportSpecifier */ || token.parent.kind === 276 /* ImportClause */); + return token.kind === 101 /* ImportKeyword */ || token.kind === 79 /* Identifier */ && (token.parent.kind === 282 /* ImportSpecifier */ || token.parent.kind === 279 /* ImportClause */); } function tryGetFullImport(token) { return token.kind === 101 /* ImportKeyword */ ? tryCast(token.parent, isImportDeclaration) : void 0; @@ -132236,7 +132494,7 @@ 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 === 244 /* VariableStatement */ ? node.parent : node); + changes.delete(sourceFile, node.parent.kind === 246 /* VariableStatement */ ? node.parent : node); } function deleteDestructuringElements(changes, sourceFile, node) { forEach(node.elements, (n) => changes.delete(sourceFile, n)); @@ -132260,14 +132518,14 @@ function tryPrefixDeclaration(changes, errorCode, sourceFile, token) { } function canPrefix(token) { switch (token.parent.kind) { - case 168 /* Parameter */: - case 167 /* TypeParameter */: + case 169 /* Parameter */: + case 168 /* TypeParameter */: return true; - case 261 /* VariableDeclaration */: { + case 263 /* VariableDeclaration */: { const varDecl = token.parent; switch (varDecl.parent.parent.kind) { - case 251 /* ForOfStatement */: - case 250 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 252 /* ForInStatement */: return true; } } @@ -132316,8 +132574,8 @@ function isNotProvidedArguments(parameter, checker, sourceFiles) { function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program, cancellationToken, isFixAll) { const { parent: parent2 } = parameter; switch (parent2.kind) { - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: + case 176 /* MethodDeclaration */: + case 178 /* 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); @@ -132335,18 +132593,18 @@ function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program } } return true; - case 263 /* FunctionDeclaration */: { + case 265 /* FunctionDeclaration */: { if (parent2.name && isCallbackLike(checker, sourceFile, parent2.name)) { return isLastParameter(parent2, parameter, isFixAll); } return true; } - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return isLastParameter(parent2, parameter, isFixAll); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return false; - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return true; default: return Debug.failBadSyntaxKind(parent2); @@ -132396,7 +132654,7 @@ function doChange18(changes, sourceFile, start, length2, errorCode) { const container = (isBlock(statement.parent) ? statement.parent : statement).parent; if (!isBlock(statement.parent) || statement === first(statement.parent.statements)) { switch (container.kind) { - case 246 /* IfStatement */: + case 248 /* IfStatement */: if (container.elseStatement) { if (isBlock(statement.parent)) { break; @@ -132405,8 +132663,8 @@ function doChange18(changes, sourceFile, start, length2, errorCode) { } return; } - case 248 /* WhileStatement */: - case 249 /* ForStatement */: + case 250 /* WhileStatement */: + case 251 /* ForStatement */: changes.delete(sourceFile, container); return; } @@ -132465,7 +132723,7 @@ registerCodeFix({ 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 === 323 /* JSDocNullableType */) { + if (typeNode.kind === 326 /* JSDocNullableType */) { actions2.push(fix(checker.getNullableType(type, 32768 /* Undefined */), fixIdNullable, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)); } return actions2; @@ -132483,7 +132741,7 @@ registerCodeFix({ if (!info) return; const { typeNode, type } = info; - const fixedType = typeNode.kind === 323 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; + const fixedType = typeNode.kind === 326 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; doChange20(changes, sourceFile, typeNode, fixedType, checker); }); } @@ -132498,22 +132756,22 @@ function getInfo11(sourceFile, pos, checker) { } function isTypeContainer(node) { switch (node.kind) { - case 235 /* AsExpression */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 263 /* FunctionDeclaration */: - case 177 /* GetAccessor */: - case 181 /* IndexSignature */: - case 200 /* MappedType */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 178 /* SetAccessor */: - case 268 /* TypeAliasDeclaration */: - case 216 /* TypeAssertionExpression */: - case 261 /* VariableDeclaration */: + case 237 /* AsExpression */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 265 /* FunctionDeclaration */: + case 179 /* GetAccessor */: + case 183 /* IndexSignature */: + case 202 /* MappedType */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 180 /* SetAccessor */: + case 271 /* TypeAliasDeclaration */: + case 218 /* TypeAssertionExpression */: + case 263 /* VariableDeclaration */: return true; default: return false; @@ -132604,14 +132862,14 @@ function getNodes3(sourceFile, start) { } let insertBefore; switch (containingFunction.kind) { - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: insertBefore = containingFunction.name; break; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: insertBefore = findChildOfKind(containingFunction, 99 /* FunctionKeyword */, sourceFile); break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: const kind = containingFunction.typeParameters ? 29 /* LessThanToken */ : 20 /* OpenParenToken */; insertBefore = findChildOfKind(containingFunction, kind, sourceFile) || first(containingFunction.parameters); break; @@ -132906,7 +133164,7 @@ function annotateSetAccessor(changes, importAdder, sourceFile, setAccessorDeclar function annotate(changes, importAdder, sourceFile, declaration, type, program, host) { const typeNode = getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { - if (isInJSFile(sourceFile) && declaration.kind !== 170 /* PropertySignature */) { + if (isInJSFile(sourceFile) && declaration.kind !== 171 /* PropertySignature */) { const parent2 = isVariableDeclaration(declaration) ? tryCast(declaration.parent.parent, isVariableStatement) : declaration; if (!parent2) { return; @@ -132982,17 +133240,17 @@ function inferTypeForParametersFromUsage(func, sourceFile, program, cancellation function getFunctionReferences(containingFunction, sourceFile, program, cancellationToken) { let searchToken; switch (containingFunction.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: searchToken = findChildOfKind(containingFunction, 136 /* ConstructorKeyword */, sourceFile); break; - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: const parent2 = containingFunction.parent; searchToken = (isVariableDeclaration(parent2) || isPropertyDeclaration(parent2)) && isIdentifier(parent2.name) ? parent2.name : containingFunction.name; break; - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: searchToken = containingFunction.name; break; } @@ -133127,44 +133385,44 @@ function inferTypeFromReferences(program, references, cancellationToken) { node = node.parent; } switch (node.parent.kind) { - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: inferTypeFromExpressionStatement(node, usage); break; - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: usage.isNumber = true; break; - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: inferTypeFromPrefixUnaryExpression(node.parent, usage); break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: inferTypeFromBinaryExpression(node, node.parent, usage); break; - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: inferTypeFromSwitchStatementLabel(node.parent, usage); break; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: if (node.parent.expression === node) { inferTypeFromCallExpression(node.parent, usage); } else { inferTypeFromContextualType(node, usage); } break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: inferTypeFromPropertyAccessExpression(node.parent, usage); break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: inferTypeFromPropertyElementExpression(node.parent, node, usage); break; - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: inferTypeFromPropertyAssignment(node.parent, usage); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: inferTypeFromPropertyDeclaration(node.parent, usage); break; - case 261 /* VariableDeclaration */: { + case 263 /* VariableDeclaration */: { const { name, initializer } = node.parent; if (node === name) { if (initializer) { @@ -133261,7 +133519,7 @@ function inferTypeFromReferences(program, references, cancellationToken) { break; case 56 /* BarBarToken */: case 60 /* QuestionQuestionToken */: - if (node === parent2.left && (node.parent.parent.kind === 261 /* VariableDeclaration */ || isAssignmentExpression(node.parent.parent, true))) { + if (node === parent2.left && (node.parent.parent.kind === 263 /* VariableDeclaration */ || isAssignmentExpression(node.parent.parent, true))) { addCandidateType(usage, checker.getTypeAtLocation(parent2.right)); } break; @@ -133285,7 +133543,7 @@ function inferTypeFromReferences(program, references, cancellationToken) { } } calculateUsageOfNode(parent2, call.return_); - if (parent2.kind === 213 /* CallExpression */) { + if (parent2.kind === 215 /* CallExpression */) { (usage.calls || (usage.calls = [])).push(call); } else { (usage.constructs || (usage.constructs = [])).push(call); @@ -133704,7 +133962,7 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con 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 : 170 /* PropertySignature */; + const kind = (_a2 = declaration == null ? void 0 : declaration.kind) != null ? _a2 : 171 /* PropertySignature */; const declarationName = getSynthesizedDeepClone(getNameOfDeclaration(declaration), false); const effectiveModifierFlags = declaration ? getEffectiveModifierFlags(declaration) : 0 /* None */; let modifierFlags = effectiveModifierFlags & 4 /* Public */ ? 4 /* Public */ : effectiveModifierFlags & 16 /* Protected */ ? 16 /* Protected */ : 0 /* None */; @@ -133717,8 +133975,8 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con const ambient = !!(enclosingDeclaration.flags & 16777216 /* Ambient */) || isAmbient; const quotePreference = getQuotePreference(sourceFile, preferences); switch (kind) { - case 170 /* PropertySignature */: - case 171 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 172 /* PropertyDeclaration */: const flags = quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : void 0; let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); if (importAdder) { @@ -133736,8 +133994,8 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con void 0 )); break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: { + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: { Debug.assertIsDefined(declarations); let typeNode2 = checker.typeToTypeNode(type, enclosingDeclaration, void 0, getNoopSymbolTrackerWithResolver(context)); const allAccessors = getAllAccessorDeclarations(declarations, declaration); @@ -133772,8 +134030,8 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con } break; } - case 173 /* MethodSignature */: - case 174 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 176 /* MethodDeclaration */: Debug.assertIsDefined(declarations); const signatures = type.isUnion() ? flatMap(type.types, (t) => t.getCallSignatures()) : type.getCallSignatures(); if (!some(signatures)) { @@ -133800,7 +134058,7 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con break; } function outputMethod(quotePreference2, signature, modifiers2, name, body2) { - const method = createSignatureDeclarationFromSignature(174 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); + const method = createSignatureDeclarationFromSignature(176 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); if (method) addClassElement(method); } @@ -133926,7 +134184,7 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder const parameters = createDummyParameters(args.length, names, argumentTypeNodes, void 0, isJs); const type = isJs || contextualType === void 0 ? void 0 : checker.typeToTypeNode(contextualType, contextNode, void 0, tracker); switch (kind) { - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return factory.createMethodDeclaration( modifiers, asteriskToken, @@ -133937,7 +134195,7 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder type, createStubbedMethodBody(quotePreference) ); - case 173 /* MethodSignature */: + case 175 /* MethodSignature */: return factory.createMethodSignature( modifiers, name, @@ -133946,7 +134204,7 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder parameters, type === void 0 ? factory.createKeywordTypeNode(159 /* UnknownKeyword */) : type ); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return factory.createFunctionDeclaration( modifiers, asteriskToken, @@ -134300,7 +134558,7 @@ function getAccessorConvertiblePropertyAtPosition(file, program, start, end, con isStatic: hasStaticModifier(declaration), isReadonly: hasEffectiveReadonlyModifier(declaration), type: getDeclarationType(declaration, program), - container: declaration.kind === 168 /* Parameter */ ? declaration.parent.parent : declaration.parent, + container: declaration.kind === 169 /* Parameter */ ? declaration.parent.parent : declaration.parent, originalName: declaration.name.text, declaration, fieldName, @@ -134448,7 +134706,7 @@ registerCodeFix({ }); function getActionsForUsageOfInvalidImport(context) { const sourceFile = context.sourceFile; - const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 213 /* CallExpression */ : 214 /* NewExpression */; + const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 215 /* CallExpression */ : 216 /* NewExpression */; const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), (a) => a.kind === targetKind); if (!node) { return []; @@ -134771,7 +135029,7 @@ registerCodeFix({ function getImportTypeNode(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); Debug.assert(token.kind === 101 /* ImportKeyword */, "This token should be an ImportKeyword"); - Debug.assert(token.parent.kind === 205 /* ImportType */, "Token parent should be an ImportType"); + Debug.assert(token.parent.kind === 207 /* ImportType */, "Token parent should be an ImportType"); return token.parent; } function doChange28(changes, sourceFile, importType) { @@ -135548,12 +135806,12 @@ function isMemberCompletionKind(kind) { function getJsxClosingTagCompletion(location, sourceFile) { const jsxClosingElement = findAncestor(location, (node) => { switch (node.kind) { - case 290 /* JsxClosingElement */: + case 293 /* JsxClosingElement */: return true; case 43 /* SlashToken */: case 31 /* GreaterThanToken */: case 79 /* Identifier */: - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return false; default: return "quit"; @@ -135872,10 +136130,10 @@ function createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, pro const quotePreference = getQuotePreference(sourceFile, preferences); const builderFlags = 33554432 /* OmitThisParameter */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */); switch (declaration.kind) { - case 170 /* PropertySignature */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodSignature */: - case 174 /* MethodDeclaration */: { + case 171 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 175 /* MethodSignature */: + case 176 /* 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); @@ -136395,11 +136653,11 @@ function getContextualType(previousToken, position, sourceFile, checker) { return getContextualTypeFromParent(previousToken, checker); case 63 /* EqualsToken */: switch (parent2.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return checker.getContextualType(parent2.initializer); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return checker.getTypeAtLocation(parent2.left); - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: return checker.getContextualTypeForJsxAttribute(parent2); default: return void 0; @@ -136424,7 +136682,7 @@ function getFirstSymbolInChain(symbol, enclosingDeclaration, checker) { } function isModuleSymbol(symbol) { var _a2; - return !!((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d.kind === 314 /* SourceFile */)); + return !!((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d.kind === 317 /* SourceFile */)); } function getCompletionData(program, log, sourceFile, compilerOptions, position, preferences, detailsEntryId, host, formatContext, cancellationToken) { var _a2; @@ -136458,7 +136716,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const typeExpression = tryGetTypeExpressionFromTag(tag); if (typeExpression) { currentToken = getTokenAtPosition(sourceFile, position); - if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 356 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { + if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 359 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression); } } @@ -136516,7 +136774,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, isRightOfDot = contextToken.kind === 24 /* DotToken */; isRightOfQuestionDot = contextToken.kind === 28 /* QuestionDotToken */; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: propertyAccessToConvert = parent2; node = propertyAccessToConvert.expression; const leftmostAccessExpression = getLeftmostAccessExpression(propertyAccessToConvert); @@ -136527,16 +136785,16 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return void 0; } break; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: node = parent2.left; break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: node = parent2.name; break; - case 205 /* ImportType */: + case 207 /* ImportType */: node = parent2; break; - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: node = parent2.getFirstToken(sourceFile); Debug.assert(node.kind === 101 /* ImportKeyword */ || node.kind === 104 /* NewKeyword */); break; @@ -136544,51 +136802,51 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return void 0; } } else if (!importStatementCompletion) { - if (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) { + if (parent2 && parent2.kind === 213 /* PropertyAccessExpression */) { contextToken = parent2; parent2 = parent2.parent; } if (currentToken.parent === location) { switch (currentToken.kind) { case 31 /* GreaterThanToken */: - if (currentToken.parent.kind === 287 /* JsxElement */ || currentToken.parent.kind === 289 /* JsxOpeningElement */) { + if (currentToken.parent.kind === 290 /* JsxElement */ || currentToken.parent.kind === 292 /* JsxOpeningElement */) { location = currentToken; } break; case 43 /* SlashToken */: - if (currentToken.parent.kind === 288 /* JsxSelfClosingElement */) { + if (currentToken.parent.kind === 291 /* JsxSelfClosingElement */) { location = currentToken; } break; } } switch (parent2.kind) { - case 290 /* JsxClosingElement */: + case 293 /* JsxClosingElement */: if (contextToken.kind === 43 /* SlashToken */) { isStartingCloseTag = true; location = contextToken; } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (!binaryExpressionMayBeOpenTag(parent2)) { break; } - case 288 /* JsxSelfClosingElement */: - case 287 /* JsxElement */: - case 289 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: + case 290 /* JsxElement */: + case 292 /* JsxOpeningElement */: isJsxIdentifierExpected = true; if (contextToken.kind === 29 /* LessThanToken */) { isRightOfOpenTag = true; location = contextToken; } break; - case 297 /* JsxExpression */: - case 296 /* JsxSpreadAttribute */: + case 300 /* JsxExpression */: + case 299 /* JsxSpreadAttribute */: if (previousToken.kind === 19 /* CloseBraceToken */ && currentToken.kind === 31 /* GreaterThanToken */) { isJsxIdentifierExpected = true; } break; - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: if (parent2.initializer === previousToken && previousToken.end < position) { isJsxIdentifierExpected = true; break; @@ -136692,13 +136950,13 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, }; function isTagWithTypeExpression(tag) { switch (tag.kind) { - case 349 /* JSDocParameterTag */: - case 356 /* JSDocPropertyTag */: - case 350 /* JSDocReturnTag */: - case 352 /* JSDocTypeTag */: - case 354 /* JSDocTypedefTag */: + case 352 /* JSDocParameterTag */: + case 359 /* JSDocPropertyTag */: + case 353 /* JSDocReturnTag */: + case 355 /* JSDocTypeTag */: + case 357 /* JSDocTypedefTag */: return true; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return !!tag.constraint; default: return false; @@ -136707,7 +136965,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, function tryGetTypeExpressionFromTag(tag) { if (isTagWithTypeExpression(tag)) { const typeExpression = isJSDocTemplateTag(tag) ? tag.constraint : tag.typeExpression; - return typeExpression && typeExpression.kind === 318 /* JSDocTypeExpression */ ? typeExpression : void 0; + return typeExpression && typeExpression.kind === 321 /* JSDocTypeExpression */ ? typeExpression : void 0; } return void 0; } @@ -136737,7 +136995,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, symbols.push(exportedSymbol); } } - if (!isTypeLocation && symbol.declarations && symbol.declarations.some((d) => d.kind !== 314 /* SourceFile */ && d.kind !== 270 /* ModuleDeclaration */ && d.kind !== 269 /* EnumDeclaration */)) { + if (!isTypeLocation && symbol.declarations && symbol.declarations.some((d) => d.kind !== 317 /* SourceFile */ && d.kind !== 273 /* ModuleDeclaration */ && d.kind !== 272 /* EnumDeclaration */)) { let type = typeChecker3.getTypeOfSymbolAtLocation(symbol, node).getNonOptionalType(); let insertQuestionDot = false; if (type.isNullableType()) { @@ -136776,7 +137034,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (isRightOfQuestionDot && some(type.getCallSignatures())) { isNewIdentifierLocation = true; } - const propertyAccess = node.kind === 205 /* ImportType */ ? node : node.parent; + const propertyAccess = node.kind === 207 /* ImportType */ ? node : node.parent; if (inCheckedFile) { const typeSymbols = type.getApparentProperties(); for (const symbol of typeSymbols) { @@ -137012,7 +137270,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } } } - if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 314 /* SourceFile */) { + if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 317 /* SourceFile */) { const thisType = typeChecker3.tryGetThisTypeAt(scopeNode, false, isClassLike(scopeNode.parent) ? scopeNode : void 0); if (thisType && !isProbablyGlobalType(thisType, sourceFile, typeChecker3)) { for (const symbol of getPropertiesForCompletion(thisType, typeChecker3)) { @@ -137042,10 +137300,10 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } function isSnippetScope(scopeNode) { switch (scopeNode.kind) { - case 314 /* SourceFile */: - case 229 /* TemplateExpression */: - case 297 /* JsxExpression */: - case 242 /* Block */: + case 317 /* SourceFile */: + case 231 /* TemplateExpression */: + case 300 /* JsxExpression */: + case 244 /* Block */: return true; default: return isStatement(scopeNode); @@ -137055,24 +137313,24 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return insideJsDocTagTypeExpression || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker3) || isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken)); } function isContextTokenValueLocation(contextToken2) { - return contextToken2 && (contextToken2.kind === 113 /* TypeOfKeyword */ && (contextToken2.parent.kind === 186 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 130 /* AssertsKeyword */ && contextToken2.parent.kind === 182 /* TypePredicate */); + return contextToken2 && (contextToken2.kind === 113 /* TypeOfKeyword */ && (contextToken2.parent.kind === 188 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 130 /* AssertsKeyword */ && contextToken2.parent.kind === 184 /* TypePredicate */); } function isContextTokenTypeLocation(contextToken2) { if (contextToken2) { const parentKind = contextToken2.parent.kind; switch (contextToken2.kind) { case 58 /* ColonToken */: - return parentKind === 171 /* PropertyDeclaration */ || parentKind === 170 /* PropertySignature */ || parentKind === 168 /* Parameter */ || parentKind === 261 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); + return parentKind === 172 /* PropertyDeclaration */ || parentKind === 171 /* PropertySignature */ || parentKind === 169 /* Parameter */ || parentKind === 263 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); case 63 /* EqualsToken */: - return parentKind === 268 /* TypeAliasDeclaration */; + return parentKind === 271 /* TypeAliasDeclaration */; case 129 /* AsKeyword */: - return parentKind === 235 /* AsExpression */; + return parentKind === 237 /* AsExpression */; case 29 /* LessThanToken */: - return parentKind === 183 /* TypeReference */ || parentKind === 216 /* TypeAssertionExpression */; + return parentKind === 185 /* TypeReference */ || parentKind === 218 /* TypeAssertionExpression */; case 95 /* ExtendsKeyword */: - return parentKind === 167 /* TypeParameter */; + return parentKind === 168 /* TypeParameter */; case 151 /* SatisfiesKeyword */: - return parentKind === 239 /* SatisfiesExpression */; + return parentKind === 241 /* SatisfiesExpression */; } } return false; @@ -137247,14 +137505,14 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return true; } if (contextToken2.kind === 31 /* GreaterThanToken */ && contextToken2.parent) { - if (location === contextToken2.parent && (location.kind === 289 /* JsxOpeningElement */ || location.kind === 288 /* JsxSelfClosingElement */)) { + if (location === contextToken2.parent && (location.kind === 292 /* JsxOpeningElement */ || location.kind === 291 /* JsxSelfClosingElement */)) { return false; } - if (contextToken2.parent.kind === 289 /* JsxOpeningElement */) { - return location.parent.kind !== 289 /* JsxOpeningElement */; + if (contextToken2.parent.kind === 292 /* JsxOpeningElement */) { + return location.parent.kind !== 292 /* JsxOpeningElement */; } - if (contextToken2.parent.kind === 290 /* JsxClosingElement */ || contextToken2.parent.kind === 288 /* JsxSelfClosingElement */) { - return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 287 /* JsxElement */; + if (contextToken2.parent.kind === 293 /* JsxClosingElement */ || contextToken2.parent.kind === 291 /* JsxSelfClosingElement */) { + return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 290 /* JsxElement */; } } return false; @@ -137265,29 +137523,29 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const tokenKind = keywordForNode(contextToken); switch (tokenKind) { case 27 /* CommaToken */: - return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 227 /* BinaryExpression */ || containingNodeKind === 184 /* FunctionType */ || containingNodeKind === 210 /* ObjectLiteralExpression */; + return containingNodeKind === 215 /* CallExpression */ || containingNodeKind === 178 /* Constructor */ || containingNodeKind === 216 /* NewExpression */ || containingNodeKind === 211 /* ArrayLiteralExpression */ || containingNodeKind === 229 /* BinaryExpression */ || containingNodeKind === 186 /* FunctionType */ || containingNodeKind === 212 /* ObjectLiteralExpression */; case 20 /* OpenParenToken */: - return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 217 /* ParenthesizedExpression */ || containingNodeKind === 196 /* ParenthesizedType */; + return containingNodeKind === 215 /* CallExpression */ || containingNodeKind === 178 /* Constructor */ || containingNodeKind === 216 /* NewExpression */ || containingNodeKind === 219 /* ParenthesizedExpression */ || containingNodeKind === 198 /* ParenthesizedType */; case 22 /* OpenBracketToken */: - return containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 181 /* IndexSignature */ || containingNodeKind === 166 /* ComputedPropertyName */; + return containingNodeKind === 211 /* ArrayLiteralExpression */ || containingNodeKind === 183 /* IndexSignature */ || containingNodeKind === 167 /* ComputedPropertyName */; case 143 /* ModuleKeyword */: case 144 /* NamespaceKeyword */: case 101 /* ImportKeyword */: return true; case 24 /* DotToken */: - return containingNodeKind === 270 /* ModuleDeclaration */; + return containingNodeKind === 273 /* ModuleDeclaration */; case 18 /* OpenBraceToken */: - return containingNodeKind === 264 /* ClassDeclaration */ || containingNodeKind === 265 /* StructDeclaration */ || containingNodeKind === 210 /* ObjectLiteralExpression */; + return containingNodeKind === 266 /* ClassDeclaration */ || containingNodeKind === 267 /* StructDeclaration */ || containingNodeKind === 212 /* ObjectLiteralExpression */; case 63 /* EqualsToken */: - return containingNodeKind === 261 /* VariableDeclaration */ || containingNodeKind === 227 /* BinaryExpression */; + return containingNodeKind === 263 /* VariableDeclaration */ || containingNodeKind === 229 /* BinaryExpression */; case 15 /* TemplateHead */: - return containingNodeKind === 229 /* TemplateExpression */; + return containingNodeKind === 231 /* TemplateExpression */; case 16 /* TemplateMiddle */: - return containingNodeKind === 240 /* TemplateSpan */; + return containingNodeKind === 242 /* TemplateSpan */; case 133 /* AsyncKeyword */: - return containingNodeKind === 174 /* MethodDeclaration */ || containingNodeKind === 306 /* ShorthandPropertyAssignment */; + return containingNodeKind === 176 /* MethodDeclaration */ || containingNodeKind === 309 /* ShorthandPropertyAssignment */; case 41 /* AsteriskToken */: - return containingNodeKind === 174 /* MethodDeclaration */; + return containingNodeKind === 176 /* MethodDeclaration */; } if (isClassMemberCompletionKeyword(tokenKind)) { return true; @@ -137325,7 +137583,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, completionKind = 0 /* ObjectPropertyDeclaration */; let typeMembers; let existingMembers; - if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */) { + if (objectLikeContainer.kind === 212 /* ObjectLiteralExpression */) { const instantiatedType = tryGetObjectLiteralContextualType(objectLikeContainer, typeChecker3); if (instantiatedType === void 0) { if (objectLikeContainer.flags & 33554432 /* InWithStatement */) { @@ -137347,16 +137605,16 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } } } else { - Debug.assert(objectLikeContainer.kind === 206 /* ObjectBindingPattern */); + Debug.assert(objectLikeContainer.kind === 208 /* 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 === 251 /* ForOfStatement */; - if (!canGetType && rootDeclaration.kind === 168 /* Parameter */) { + let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 253 /* ForOfStatement */; + if (!canGetType && rootDeclaration.kind === 169 /* Parameter */) { if (isExpression(rootDeclaration.parent)) { canGetType = !!typeChecker3.getContextualType(rootDeclaration.parent); - } else if (rootDeclaration.parent.kind === 174 /* MethodDeclaration */ || rootDeclaration.parent.kind === 178 /* SetAccessor */) { + } else if (rootDeclaration.parent.kind === 176 /* MethodDeclaration */ || rootDeclaration.parent.kind === 180 /* SetAccessor */) { canGetType = isExpression(rootDeclaration.parent.parent) && !!typeChecker3.getContextualType(rootDeclaration.parent.parent); } } @@ -137374,7 +137632,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const filteredMembers = filterObjectMembersList(typeMembers, Debug.checkDefined(existingMembers)); symbols = concatenate(symbols, filteredMembers); setSortTextToOptionalMember(); - if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { + if (objectLikeContainer.kind === 212 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { transformObjectLiteralMembersSortText(symbolsStartIndex); collectObjectLiteralMethodSymbols(filteredMembers, objectLikeContainer); } @@ -137390,10 +137648,10 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (!isTypeKeywordTokenOrIdentifier(contextToken)) { keywordFilters = 8 /* TypeKeyword */; } - const { moduleSpecifier } = namedImportsOrExports.kind === 278 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; + const { moduleSpecifier } = namedImportsOrExports.kind === 281 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; if (!moduleSpecifier) { isNewIdentifierLocation = true; - return namedImportsOrExports.kind === 278 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; + return namedImportsOrExports.kind === 281 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; } const moduleSpecifierSymbol = typeChecker3.getSymbolAtLocation(moduleSpecifier); if (!moduleSpecifierSymbol) { @@ -137508,31 +137766,31 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, case 30 /* LessThanSlashToken */: case 43 /* SlashToken */: case 79 /* Identifier */: - case 211 /* PropertyAccessExpression */: - case 295 /* JsxAttributes */: - case 294 /* JsxAttribute */: - case 296 /* JsxSpreadAttribute */: - if (parent2 && (parent2.kind === 288 /* JsxSelfClosingElement */ || parent2.kind === 289 /* JsxOpeningElement */)) { + case 213 /* PropertyAccessExpression */: + case 298 /* JsxAttributes */: + case 297 /* JsxAttribute */: + case 299 /* JsxSpreadAttribute */: + if (parent2 && (parent2.kind === 291 /* JsxSelfClosingElement */ || parent2.kind === 292 /* JsxOpeningElement */)) { if (contextToken2.kind === 31 /* GreaterThanToken */) { const precedingToken = findPrecedingToken(contextToken2.pos, sourceFile, void 0); if (!parent2.typeArguments || precedingToken && precedingToken.kind === 43 /* SlashToken */) break; } return parent2; - } else if (parent2.kind === 294 /* JsxAttribute */) { + } else if (parent2.kind === 297 /* JsxAttribute */) { return parent2.parent.parent; } break; case 10 /* StringLiteral */: - if (parent2 && (parent2.kind === 294 /* JsxAttribute */ || parent2.kind === 296 /* JsxSpreadAttribute */)) { + if (parent2 && (parent2.kind === 297 /* JsxAttribute */ || parent2.kind === 299 /* JsxSpreadAttribute */)) { return parent2.parent.parent; } break; case 19 /* CloseBraceToken */: - if (parent2 && parent2.kind === 297 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 294 /* JsxAttribute */) { + if (parent2 && parent2.kind === 300 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 297 /* JsxAttribute */) { return parent2.parent.parent.parent; } - if (parent2 && parent2.kind === 296 /* JsxSpreadAttribute */) { + if (parent2 && parent2.kind === 299 /* JsxSpreadAttribute */) { return parent2.parent.parent; } break; @@ -137545,34 +137803,34 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const containingNodeKind = parent2.kind; switch (contextToken2.kind) { case 27 /* CommaToken */: - return containingNodeKind === 261 /* VariableDeclaration */ || isVariableDeclarationListButNotTypeArgument(contextToken2) || containingNodeKind === 244 /* VariableStatement */ || containingNodeKind === 269 /* EnumDeclaration */ || isFunctionLikeButNotConstructor(containingNodeKind) || containingNodeKind === 267 /* InterfaceDeclaration */ || containingNodeKind === 207 /* ArrayBindingPattern */ || containingNodeKind === 268 /* TypeAliasDeclaration */ || isClassLike(parent2) && !!parent2.typeParameters && parent2.typeParameters.end >= contextToken2.pos; + return containingNodeKind === 263 /* VariableDeclaration */ || isVariableDeclarationListButNotTypeArgument(contextToken2) || containingNodeKind === 246 /* VariableStatement */ || containingNodeKind === 272 /* EnumDeclaration */ || isFunctionLikeButNotConstructor(containingNodeKind) || containingNodeKind === 270 /* InterfaceDeclaration */ || containingNodeKind === 209 /* ArrayBindingPattern */ || containingNodeKind === 271 /* TypeAliasDeclaration */ || isClassLike(parent2) && !!parent2.typeParameters && parent2.typeParameters.end >= contextToken2.pos; case 24 /* DotToken */: - return containingNodeKind === 207 /* ArrayBindingPattern */; + return containingNodeKind === 209 /* ArrayBindingPattern */; case 58 /* ColonToken */: - return containingNodeKind === 208 /* BindingElement */; + return containingNodeKind === 210 /* BindingElement */; case 22 /* OpenBracketToken */: - return containingNodeKind === 207 /* ArrayBindingPattern */; + return containingNodeKind === 209 /* ArrayBindingPattern */; case 20 /* OpenParenToken */: - return containingNodeKind === 301 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); + return containingNodeKind === 304 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); case 18 /* OpenBraceToken */: - return containingNodeKind === 269 /* EnumDeclaration */; + return containingNodeKind === 272 /* EnumDeclaration */; case 29 /* LessThanToken */: - return containingNodeKind === 264 /* ClassDeclaration */ || containingNodeKind === 232 /* ClassExpression */ || containingNodeKind === 267 /* InterfaceDeclaration */ || containingNodeKind === 268 /* TypeAliasDeclaration */ || isFunctionLikeKind(containingNodeKind); + return containingNodeKind === 266 /* ClassDeclaration */ || containingNodeKind === 234 /* ClassExpression */ || containingNodeKind === 270 /* InterfaceDeclaration */ || containingNodeKind === 271 /* TypeAliasDeclaration */ || isFunctionLikeKind(containingNodeKind); case 125 /* StaticKeyword */: - return containingNodeKind === 171 /* PropertyDeclaration */ && !isClassLike(parent2.parent); + return containingNodeKind === 172 /* PropertyDeclaration */ && !isClassLike(parent2.parent); case 25 /* DotDotDotToken */: - return containingNodeKind === 168 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 207 /* ArrayBindingPattern */; + return containingNodeKind === 169 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 209 /* ArrayBindingPattern */; case 124 /* PublicKeyword */: case 122 /* PrivateKeyword */: case 123 /* ProtectedKeyword */: - return containingNodeKind === 168 /* Parameter */ && !isConstructorDeclaration(parent2.parent); + return containingNodeKind === 169 /* Parameter */ && !isConstructorDeclaration(parent2.parent); case 129 /* AsKeyword */: - return containingNodeKind === 279 /* ImportSpecifier */ || containingNodeKind === 284 /* ExportSpecifier */ || containingNodeKind === 277 /* NamespaceImport */; + return containingNodeKind === 282 /* ImportSpecifier */ || containingNodeKind === 287 /* ExportSpecifier */ || containingNodeKind === 280 /* NamespaceImport */; case 138 /* GetKeyword */: case 152 /* SetKeyword */: return !isFromObjectTypeDeclaration(contextToken2); case 79 /* Identifier */: - if (containingNodeKind === 279 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { + if (containingNodeKind === 282 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { return false; } break; @@ -137588,7 +137846,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, case 139 /* InferKeyword */: return true; case 155 /* TypeKeyword */: - return containingNodeKind !== 279 /* ImportSpecifier */; + return containingNodeKind !== 282 /* ImportSpecifier */; case 41 /* AsteriskToken */: return isFunctionLike(contextToken2.parent) && !isMethodDeclaration(contextToken2.parent); } @@ -137623,7 +137881,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (ancestorClassLike && contextToken2 === previousToken && isPreviousPropertyDeclarationTerminated(contextToken2, position)) { return false; } - const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 171 /* PropertyDeclaration */); + const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 172 /* PropertyDeclaration */); if (ancestorPropertyDeclaraion && contextToken2 !== previousToken && isClassLike(previousToken.parent.parent) && position <= previousToken.end) { if (isPreviousPropertyDeclarationTerminated(contextToken2, previousToken.end)) { return false; @@ -137637,7 +137895,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return contextToken2.kind !== 63 /* EqualsToken */ && (contextToken2.kind === 26 /* SemicolonToken */ || !positionsAreOnSameLine(contextToken2.end, position2, sourceFile)); } function isFunctionLikeButNotConstructor(kind) { - return isFunctionLikeKind(kind) && kind !== 176 /* Constructor */; + return isFunctionLikeKind(kind) && kind !== 178 /* Constructor */; } function isDotOfNumericLiteral(contextToken2) { if (contextToken2.kind === 8 /* NumericLiteral */) { @@ -137647,7 +137905,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return false; } function isVariableDeclarationListButNotTypeArgument(node2) { - return node2.parent.kind === 262 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker3); + return node2.parent.kind === 264 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker3); } function filterObjectMembersList(contextualMemberSymbols, existingMembers) { if (existingMembers.length === 0) { @@ -137656,7 +137914,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const membersDeclaredBySpreadAssignment = new Set2(); const existingMemberNames = new Set2(); for (const m of existingMembers) { - if (m.kind !== 305 /* PropertyAssignment */ && m.kind !== 306 /* ShorthandPropertyAssignment */ && m.kind !== 208 /* BindingElement */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */ && m.kind !== 307 /* SpreadAssignment */) { + if (m.kind !== 308 /* PropertyAssignment */ && m.kind !== 309 /* ShorthandPropertyAssignment */ && m.kind !== 210 /* BindingElement */ && m.kind !== 176 /* MethodDeclaration */ && m.kind !== 179 /* GetAccessor */ && m.kind !== 180 /* SetAccessor */ && m.kind !== 310 /* SpreadAssignment */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -137735,7 +137993,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, function filterClassMembersList(baseSymbols, existingMembers, currentClassElementModifierFlags) { const existingMemberNames = new Set2(); for (const m of existingMembers) { - if (m.kind !== 171 /* PropertyDeclaration */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */) { + if (m.kind !== 172 /* PropertyDeclaration */ && m.kind !== 176 /* MethodDeclaration */ && m.kind !== 179 /* GetAccessor */ && m.kind !== 180 /* SetAccessor */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -137761,7 +138019,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (isCurrentlyEditingNode(attr)) { continue; } - if (attr.kind === 294 /* JsxAttribute */) { + if (attr.kind === 297 /* JsxAttribute */) { seenNames.add(attr.name.escapedText); } else if (isJsxSpreadAttribute(attr)) { setMembersDeclaredBySpreadAssignment(attr, membersDeclaredBySpreadAssignment); @@ -137841,7 +138099,7 @@ function getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind, js var _keywordCompletions = []; var allKeywordsCompletions = memoize(() => { const res = []; - for (let i = 81 /* FirstKeyword */; i <= 164 /* LastKeyword */; i++) { + for (let i = 81 /* FirstKeyword */; i <= 165 /* LastKeyword */; i++) { res.push({ name: tokenToString(i), kind: "keyword" /* keyword */, @@ -137987,7 +138245,7 @@ function getPropertiesForCompletion(type, checker) { } function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) { switch (location.kind) { - case 357 /* SyntaxList */: + case 360 /* SyntaxList */: return tryCast(location.parent, isObjectTypeDeclaration); case 1 /* EndOfFileToken */: const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration); @@ -138046,7 +138304,7 @@ function tryGetTypeLiteralNode(node) { case 26 /* SemicolonToken */: case 27 /* CommaToken */: case 79 /* Identifier */: - if (parent2.kind === 170 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { + if (parent2.kind === 171 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { return parent2.parent; } break; @@ -138063,11 +138321,11 @@ function getConstraintOfTypeArgumentProperty(node, checker) { if (!t) return void 0; switch (node.kind) { - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return checker.getTypeOfPropertyOfContextualType(t, node.symbol.escapedName); - case 193 /* IntersectionType */: - case 187 /* TypeLiteral */: - case 192 /* UnionType */: + case 195 /* IntersectionType */: + case 189 /* TypeLiteral */: + case 194 /* UnionType */: return t; } } @@ -138090,7 +138348,7 @@ function isValidTrigger(sourceFile, triggerCharacter, contextToken, position) { case "/": return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 43 /* SlashToken */ && isJsxClosingElement(contextToken.parent)); case " ": - return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 314 /* SourceFile */; + return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 317 /* SourceFile */; default: return Debug.assertNever(triggerCharacter); } @@ -138186,8 +138444,8 @@ function getSingleLineReplacementSpanForImportCompletionNode(node) { if (rangeIsOnSingleLine(top, sourceFile)) { return createTextSpanFromNode(top, sourceFile); } - Debug.assert(top.kind !== 101 /* ImportKeyword */ && top.kind !== 279 /* ImportSpecifier */); - const potentialSplitPoint = top.kind === 275 /* 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 !== 282 /* ImportSpecifier */); + const potentialSplitPoint = top.kind === 278 /* 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 @@ -138430,26 +138688,26 @@ var StringLiteralCompletionKind = /* @__PURE__ */ ((StringLiteralCompletionKind2 function getStringLiteralCompletionEntries(sourceFile, node, position, typeChecker3, compilerOptions, host, preferences) { const parent2 = walkUpParentheses(node.parent); switch (parent2.kind) { - case 201 /* LiteralType */: { + case 203 /* LiteralType */: { const grandParent = walkUpParentheses(parent2.parent); switch (grandParent.kind) { - case 234 /* ExpressionWithTypeArguments */: - case 183 /* TypeReference */: { + case 236 /* ExpressionWithTypeArguments */: + case 185 /* TypeReference */: { const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent); if (typeArgument) { return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker3.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false }; } return void 0; } - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: const { indexType, objectType } = grandParent; if (!rangeContainsPosition(indexType, position)) { return void 0; } return stringLiteralCompletionsFromProperties(typeChecker3.getTypeFromTypeNode(objectType)); - case 205 /* ImportType */: + case 207 /* ImportType */: return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker3, preferences) }; - case 192 /* UnionType */: { + case 194 /* UnionType */: { if (!isTypeReferenceNode(grandParent.parent)) { return void 0; } @@ -138461,28 +138719,28 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, typeCheck return void 0; } } - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (isObjectLiteralExpression(parent2.parent) && parent2.name === node) { return stringLiteralCompletionsForObjectLiteral(typeChecker3, parent2.parent); } return fromContextualType(); - case 212 /* ElementAccessExpression */: { + case 214 /* ElementAccessExpression */: { const { expression, argumentExpression } = parent2; if (node === skipParentheses(argumentExpression)) { return stringLiteralCompletionsFromProperties(typeChecker3.getTypeAtLocation(expression)); } return void 0; } - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 294 /* JsxAttribute */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 297 /* JsxAttribute */: if (!isRequireCallArgument(node) && !isImportCall(parent2)) { - const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 294 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); + const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 297 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker3) || fromContextualType(); } - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: - case 286 /* ExternalModuleReference */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 289 /* ExternalModuleReference */: return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker3, preferences) }; default: return fromContextualType(); @@ -138493,9 +138751,9 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, typeCheck } function walkUpParentheses(node) { switch (node.kind) { - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return walkUpParenthesizedTypes(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return walkUpParenthesizedExpressions(node); default: return node; @@ -139073,14 +139331,14 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { if (cancellationToken) cancellationToken.throwIfCancellationRequested(); switch (direct.kind) { - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (isImportCall(direct)) { handleImportCall(direct); break; } if (!isAvailableThroughGlobal) { const parent2 = direct.parent; - if (exportKind === 2 /* ExportEquals */ && parent2.kind === 261 /* VariableDeclaration */) { + if (exportKind === 2 /* ExportEquals */ && parent2.kind === 263 /* VariableDeclaration */) { const { name } = parent2; if (name.kind === 79 /* Identifier */) { directImports.push(name); @@ -139091,28 +139349,28 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { break; case 79 /* Identifier */: break; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: handleNamespaceImport(direct, direct.name, hasSyntacticModifier(direct, 1 /* Export */), false); break; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: directImports.push(direct); const namedBindings = direct.importClause && direct.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 277 /* NamespaceImport */) { + if (namedBindings && namedBindings.kind === 280 /* NamespaceImport */) { handleNamespaceImport(direct, namedBindings.name, false, true); } else if (!isAvailableThroughGlobal && isDefaultImport(direct)) { addIndirectUser(getSourceFileLikeForImportDeclaration(direct)); } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: if (!direct.exportClause) { handleDirectImports(getContainingModuleSymbol(direct, checker)); - } else if (direct.exportClause.kind === 283 /* NamespaceExport */) { + } else if (direct.exportClause.kind === 286 /* NamespaceExport */) { addIndirectUser(getSourceFileLikeForImportDeclaration(direct), true); } else { directImports.push(direct); } break; - case 205 /* ImportType */: + case 207 /* ImportType */: if (!isAvailableThroughGlobal && direct.isTypeOf && !direct.qualifier && isExported2(direct)) { addIndirectUser(direct.getSourceFile(), true); } @@ -139141,7 +139399,7 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { directImports.push(importDeclaration); } else if (!isAvailableThroughGlobal) { const sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration); - Debug.assert(sourceFileLike.kind === 314 /* SourceFile */ || sourceFileLike.kind === 270 /* ModuleDeclaration */); + Debug.assert(sourceFileLike.kind === 317 /* SourceFile */ || sourceFileLike.kind === 273 /* ModuleDeclaration */); if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) { addIndirectUser(sourceFileLike, true); } else { @@ -139187,7 +139445,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c } return { importSearches, singleReferences }; function handleImport(decl) { - if (decl.kind === 274 /* ImportEqualsDeclaration */) { + if (decl.kind === 277 /* ImportEqualsDeclaration */) { if (isExternalModuleImportEquals(decl)) { handleNamespaceImportLike(decl.name); } @@ -139197,7 +139455,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c handleNamespaceImportLike(decl); return; } - if (decl.kind === 205 /* ImportType */) { + if (decl.kind === 207 /* ImportType */) { if (decl.qualifier) { const firstIdentifier = getFirstIdentifier(decl.qualifier); if (firstIdentifier.escapedText === symbolName(exportSymbol)) { @@ -139211,7 +139469,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c if (decl.moduleSpecifier.kind !== 10 /* StringLiteral */) { return; } - if (decl.kind === 281 /* ExportDeclaration */) { + if (decl.kind === 284 /* ExportDeclaration */) { if (decl.exportClause && isNamedExports(decl.exportClause)) { searchForNamedImport(decl.exportClause); } @@ -139220,10 +139478,10 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c const { name, namedBindings } = decl.importClause || { name: void 0, namedBindings: void 0 }; if (namedBindings) { switch (namedBindings.kind) { - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: handleNamespaceImportLike(namedBindings.name); break; - case 278 /* NamedImports */: + case 281 /* NamedImports */: if (exportKind === 0 /* Named */ || exportKind === 1 /* Default */) { searchForNamedImport(namedBindings); } @@ -139257,7 +139515,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c addSearch(name, checker.getSymbolAtLocation(name)); } } else { - const localSymbol = element.kind === 284 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); + const localSymbol = element.kind === 287 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); addSearch(name, localSymbol); } } @@ -139280,7 +139538,7 @@ function findModuleReferences(program, sourceFiles, searchModuleSymbol) { const checker = program.getTypeChecker(); for (const referencingFile of sourceFiles) { const searchSourceFile = searchModuleSymbol.valueDeclaration; - if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 314 /* SourceFile */) { + if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 317 /* SourceFile */) { for (const ref of referencingFile.referencedFiles) { if (program.getSourceFileFromReference(referencingFile, ref) === searchSourceFile) { refs.push({ kind: "reference", referencingFile, ref }); @@ -139322,7 +139580,7 @@ function getDirectImportsMap(sourceFiles, checker, cancellationToken) { return map2; } function forEachPossibleImportOrExportStatement(sourceFileLike, action) { - return forEach(sourceFileLike.kind === 314 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action)); + return forEach(sourceFileLike.kind === 317 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action)); } function forEachImport(sourceFile, action) { if (sourceFile.externalModuleIndicator || sourceFile.imports !== void 0) { @@ -139332,15 +139590,15 @@ function forEachImport(sourceFile, action) { } else { forEachPossibleImportOrExportStatement(sourceFile, (statement) => { switch (statement.kind) { - case 281 /* ExportDeclaration */: - case 275 /* ImportDeclaration */: { + case 284 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: { const decl = statement; if (decl.moduleSpecifier && isStringLiteral(decl.moduleSpecifier)) { action(decl, decl.moduleSpecifier); } break; } - case 274 /* ImportEqualsDeclaration */: { + case 277 /* ImportEqualsDeclaration */: { const decl = statement; if (isExternalModuleImportEquals(decl)) { action(decl, decl.moduleReference.expression); @@ -139358,7 +139616,7 @@ function getImportOrExportSymbol(node, symbol, checker, comingFromExport) { const { parent: parent2 } = node; const grandparent = parent2.parent; if (symbol.exportSymbol) { - if (parent2.kind === 211 /* PropertyAccessExpression */) { + if (parent2.kind === 213 /* PropertyAccessExpression */) { return ((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d === parent2)) && isBinaryExpression(grandparent) ? getSpecialPropertyExport(grandparent, false) : void 0; } else { return exportInfo(symbol.exportSymbol, getExportKindForDeclaration(parent2)); @@ -139462,15 +139720,15 @@ function getExportNode(parent2, node) { function isNodeImport(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return parent2.name === node && isExternalModuleImportEquals(parent2); - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return !parent2.propertyName; - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: Debug.assert(parent2.name === node); return true; - case 208 /* BindingElement */: + case 210 /* BindingElement */: return isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(parent2.parent.parent); default: return false; @@ -139501,21 +139759,21 @@ function getContainingModuleSymbol(importer, checker) { return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol); } function getSourceFileLikeForImportDeclaration(node) { - if (node.kind === 213 /* CallExpression */) { + if (node.kind === 215 /* CallExpression */) { return node.getSourceFile(); } const { parent: parent2 } = node; - if (parent2.kind === 314 /* SourceFile */) { + if (parent2.kind === 317 /* SourceFile */) { return parent2; } - Debug.assert(parent2.kind === 271 /* ModuleBlock */); + Debug.assert(parent2.kind === 274 /* ModuleBlock */); return cast(parent2.parent, isAmbientModuleDeclaration); } function isAmbientModuleDeclaration(node) { - return node.kind === 270 /* ModuleDeclaration */ && node.name.kind === 10 /* StringLiteral */; + return node.kind === 273 /* ModuleDeclaration */ && node.name.kind === 10 /* StringLiteral */; } function isExternalModuleImportEquals(eq) { - return eq.moduleReference.kind === 286 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 10 /* StringLiteral */; + return eq.moduleReference.kind === 289 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 10 /* StringLiteral */; } // src/services/findAllReferences.ts @@ -139585,28 +139843,28 @@ function getContextNode(node) { if (!node) return void 0; switch (node.kind) { - case 261 /* VariableDeclaration */: + case 263 /* 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 208 /* BindingElement */: + case 210 /* BindingElement */: return getContextNode(node.parent.parent); - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return node.parent.parent.parent; - case 284 /* ExportSpecifier */: - case 277 /* NamespaceImport */: + case 287 /* ExportSpecifier */: + case 280 /* NamespaceImport */: return node.parent.parent; - case 276 /* ImportClause */: - case 283 /* NamespaceExport */: + case 279 /* ImportClause */: + case 286 /* NamespaceExport */: return node.parent; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isExpressionStatement(node.parent) ? node.parent : node; - case 251 /* ForOfStatement */: - case 250 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 252 /* ForInStatement */: return { start: node.initializer, end: node.expression }; - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent) ? getContextNode( findAncestor( node.parent, @@ -139648,7 +139906,7 @@ function getImplementationsAtPosition(program, cancellationToken, sourceFiles, s const node = getTouchingPropertyName(sourceFile, position); let referenceEntries; const entries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position); - if (node.parent.kind === 211 /* PropertyAccessExpression */ || node.parent.kind === 208 /* BindingElement */ || node.parent.kind === 212 /* ElementAccessExpression */ || node.kind === 107 /* SuperKeyword */) { + if (node.parent.kind === 213 /* PropertyAccessExpression */ || node.parent.kind === 210 /* BindingElement */ || node.parent.kind === 214 /* ElementAccessExpression */ || node.kind === 107 /* SuperKeyword */) { referenceEntries = entries && [...entries]; } else if (entries) { const queue = createQueue(entries); @@ -139669,11 +139927,11 @@ function getImplementationsAtPosition(program, cancellationToken, sourceFiles, s return map(referenceEntries, (entry) => toImplementationLocation(entry, checker)); } function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { return void 0; } const checker = program.getTypeChecker(); - if (node.parent.kind === 306 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 309 /* ShorthandPropertyAssignment */) { const result = []; Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, (node2) => result.push(nodeEntry(node2))); return result; @@ -139864,12 +140122,12 @@ function implementationKindDisplayParts(node, checker) { const symbol = checker.getSymbolAtLocation(isDeclaration(node) && node.name ? node.name : node); if (symbol) { return getDefinitionKindAndDisplayParts(symbol, checker, node); - } else if (node.kind === 210 /* ObjectLiteralExpression */) { + } else if (node.kind === 212 /* ObjectLiteralExpression */) { return { kind: "interface" /* interfaceElement */, displayParts: [punctuationPart(20 /* OpenParenToken */), textPart("object literal"), punctuationPart(21 /* CloseParenToken */)] }; - } else if (node.kind === 232 /* ClassExpression */) { + } else if (node.kind === 234 /* ClassExpression */) { return { kind: "local class" /* localClassElement */, displayParts: [punctuationPart(20 /* OpenParenToken */), textPart("anonymous local class"), punctuationPart(21 /* CloseParenToken */)] @@ -139927,47 +140185,47 @@ function declarationIsWriteAccess(decl) { if (!!(decl.flags & 16777216 /* Ambient */)) return true; switch (decl.kind) { - case 227 /* BinaryExpression */: - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 229 /* BinaryExpression */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: case 89 /* DefaultKeyword */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: - case 284 /* ExportSpecifier */: - case 276 /* ImportClause */: - case 274 /* ImportEqualsDeclaration */: - case 279 /* ImportSpecifier */: - case 267 /* InterfaceDeclaration */: - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: - case 294 /* JsxAttribute */: - case 270 /* ModuleDeclaration */: - case 273 /* NamespaceExportDeclaration */: - case 277 /* NamespaceImport */: - case 283 /* NamespaceExport */: - case 168 /* Parameter */: - case 306 /* ShorthandPropertyAssignment */: - case 268 /* TypeAliasDeclaration */: - case 167 /* TypeParameter */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: + case 287 /* ExportSpecifier */: + case 279 /* ImportClause */: + case 277 /* ImportEqualsDeclaration */: + case 282 /* ImportSpecifier */: + case 270 /* InterfaceDeclaration */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: + case 297 /* JsxAttribute */: + case 273 /* ModuleDeclaration */: + case 276 /* NamespaceExportDeclaration */: + case 280 /* NamespaceImport */: + case 286 /* NamespaceExport */: + case 169 /* Parameter */: + case 309 /* ShorthandPropertyAssignment */: + case 271 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: return true; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return !isArrayLiteralOrObjectLiteralDestructuringPattern(decl.parent); - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return !!decl.body; - case 261 /* VariableDeclaration */: - case 171 /* PropertyDeclaration */: + case 263 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: return !!decl.initializer || isCatchClause(decl.parent); - case 173 /* MethodSignature */: - case 170 /* PropertySignature */: - case 356 /* JSDocPropertyTag */: - case 349 /* JSDocParameterTag */: + case 175 /* MethodSignature */: + case 171 /* PropertySignature */: + case 359 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: return false; default: return Debug.failBadSyntaxKind(decl); @@ -140156,9 +140414,9 @@ var Core; if (symbol.declarations) { for (const decl of symbol.declarations) { switch (decl.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: if (sourceFilesSet.has(decl.getSourceFile().fileName)) { references.push(nodeEntry(decl.name)); } @@ -140248,7 +140506,7 @@ var Core; } function getSpecialSearchKind(node) { switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: case 136 /* ConstructorKeyword */: return SpecialSearchKind.Constructor; case 79 /* Identifier */: @@ -140424,7 +140682,7 @@ var Core; } function getSymbolScope(symbol) { const { declarations, flags, parent: parent2, valueDeclaration } = symbol; - if (valueDeclaration && (valueDeclaration.kind === 218 /* FunctionExpression */ || valueDeclaration.kind === 232 /* ClassExpression */)) { + if (valueDeclaration && (valueDeclaration.kind === 220 /* FunctionExpression */ || valueDeclaration.kind === 234 /* ClassExpression */)) { return valueDeclaration; } if (!declarations) { @@ -140433,7 +140691,7 @@ var Core; if (flags & (4 /* Property */ | 8192 /* Method */)) { const privateDeclaration = find(declarations, (d) => hasEffectiveModifier(d, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(d)); if (privateDeclaration) { - return getAncestor(privateDeclaration, 264 /* ClassDeclaration */); + return getAncestor(privateDeclaration, 266 /* ClassDeclaration */); } return void 0; } @@ -140450,7 +140708,7 @@ var Core; if (scope && scope !== container) { return void 0; } - if (!container || container.kind === 314 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { + if (!container || container.kind === 317 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { return void 0; } scope = container; @@ -140657,7 +140915,7 @@ var Core; default: Debug.assertNever(state.specialSearchKind); } - if (isInJSFile(referenceLocation) && referenceLocation.parent.kind === 208 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(referenceLocation.parent.parent.parent)) { + if (isInJSFile(referenceLocation) && referenceLocation.parent.kind === 210 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(referenceLocation.parent.parent.parent)) { referenceSymbol = referenceLocation.parent.symbol; if (!referenceSymbol) return; @@ -140794,14 +141052,14 @@ var Core; if (constructorSymbol && constructorSymbol.declarations) { for (const decl of constructorSymbol.declarations) { const ctrKeyword = findChildOfKind(decl, 136 /* ConstructorKeyword */, sourceFile); - Debug.assert(decl.kind === 176 /* Constructor */ && !!ctrKeyword); + Debug.assert(decl.kind === 178 /* Constructor */ && !!ctrKeyword); addNode(ctrKeyword); } } if (classSymbol.exports) { classSymbol.exports.forEach((member) => { const decl = member.valueDeclaration; - if (decl && decl.kind === 174 /* MethodDeclaration */) { + if (decl && decl.kind === 176 /* MethodDeclaration */) { const body = decl.body; if (body) { forEachDescendantOfKind(body, 109 /* ThisKeyword */, (thisKeyword) => { @@ -140823,7 +141081,7 @@ var Core; return; } for (const decl of constructor.declarations) { - Debug.assert(decl.kind === 176 /* Constructor */); + Debug.assert(decl.kind === 178 /* Constructor */); const body = decl.body; if (body) { forEachDescendantOfKind(body, 107 /* SuperKeyword */, (node) => { @@ -140852,7 +141110,7 @@ var Core; if (refNode.kind !== 79 /* Identifier */) { return; } - if (refNode.parent.kind === 306 /* ShorthandPropertyAssignment */) { + if (refNode.parent.kind === 309 /* ShorthandPropertyAssignment */) { getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference2); } const containingClass = getContainingClassIfInHeritageClause(refNode); @@ -140867,7 +141125,7 @@ var Core; addIfImplementation(typeHavingNode.initializer); } else if (isFunctionLike(typeHavingNode) && typeHavingNode.body) { const body = typeHavingNode.body; - if (body.kind === 242 /* Block */) { + if (body.kind === 244 /* Block */) { forEachReturnStatement(body, (returnStatement) => { if (returnStatement.expression) addIfImplementation(returnStatement.expression); @@ -140889,13 +141147,13 @@ var Core; } function isImplementationExpression(node) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return isImplementationExpression(node.expression); - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 210 /* ObjectLiteralExpression */: - case 232 /* ClassExpression */: - case 209 /* ArrayLiteralExpression */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 212 /* ObjectLiteralExpression */: + case 234 /* ClassExpression */: + case 211 /* ArrayLiteralExpression */: return true; default: return false; @@ -140925,13 +141183,13 @@ var Core; } let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; @@ -140949,38 +141207,38 @@ var Core; return [{ definition: { type: 0 /* Symbol */, symbol: searchSpaceNode.symbol }, references }]; } function isParameterName(node) { - return node.kind === 79 /* Identifier */ && node.parent.kind === 168 /* Parameter */ && node.parent.name === node; + return node.kind === 79 /* Identifier */ && node.parent.kind === 169 /* Parameter */ && node.parent.name === node; } function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) { let searchSpaceNode = getThisContainer(thisOrSuperKeyword, false); let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: if (isObjectLiteralMethod(searchSpaceNode)) { staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; } - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (isExternalModule(searchSpaceNode) || isParameterName(thisOrSuperKeyword)) { return void 0; } - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: break; default: return void 0; } - const references = flatMap(searchSpaceNode.kind === 314 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { + const references = flatMap(searchSpaceNode.kind === 317 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { cancellationToken.throwIfCancellationRequested(); return getPossibleSymbolReferenceNodes(sourceFile, "this", isSourceFile(searchSpaceNode) ? sourceFile : searchSpaceNode).filter((node) => { if (!isThis(node)) { @@ -140988,19 +141246,19 @@ var Core; } const container = getThisContainer(node, false); switch (searchSpaceNode.kind) { - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: return searchSpaceNode.symbol === container.symbol; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol; - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 265 /* StructDeclaration */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 212 /* ObjectLiteralExpression */: + case 267 /* StructDeclaration */: return container.parent && searchSpaceNode.symbol === container.parent.symbol && isStatic(container) === !!staticFlag; - case 314 /* SourceFile */: - return container.kind === 314 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); + case 317 /* SourceFile */: + return container.kind === 317 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); } }); }).map((n) => nodeEntry(n)); @@ -141088,7 +141346,7 @@ var Core; 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, 284 /* ExportSpecifier */); + const exportSpecifier = getDeclarationOfKind(symbol, 287 /* ExportSpecifier */); if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) { const localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); if (localSymbol) { @@ -141116,7 +141374,7 @@ var Core; return firstDefined(checker.getRootSymbols(sym), (rootSymbol) => cbSymbol(sym, rootSymbol, void 0, kind) || (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, 208 /* BindingElement */); + const bindingElement = getDeclarationOfKind(symbol2, 210 /* BindingElement */); if (bindingElement && isObjectBindingElementWithoutPropertyName(bindingElement)) { return getPropertySymbolFromBindingElement(checker2, bindingElement); } @@ -141294,9 +141552,9 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles } if (searchOtherFilesOnly && every(symbol.declarations, (d) => d.getSourceFile().fileName === sourceFile.fileName)) return void 0; - if (parent2.kind === 213 /* CallExpression */ || parent2.kind === 220 /* EtsComponentExpression */ && isCalledStructDeclaration(symbol.getDeclarations())) { + if (parent2.kind === 215 /* CallExpression */ || parent2.kind === 222 /* EtsComponentExpression */ && isCalledStructDeclaration(symbol.getDeclarations())) { const declarations = symbol.getDeclarations(); - if ((declarations == null ? void 0 : declarations.length) && declarations[0].kind === 265 /* StructDeclaration */) { + if ((declarations == null ? void 0 : declarations.length) && declarations[0].kind === 267 /* StructDeclaration */) { return getDefinitionFromSymbol(typeChecker3, symbol, node); } } @@ -141316,7 +141574,7 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles return node.kind === 107 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo]; } } - if (node.parent.kind === 306 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 309 /* ShorthandPropertyAssignment */) { const shorthandSymbol = typeChecker3.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); const definitions = (shorthandSymbol == null ? void 0 : shorthandSymbol.declarations) ? shorthandSymbol.declarations.map((decl) => createDefinitionInfo(decl, typeChecker3, shorthandSymbol, node, false, failedAliasResolution)) : emptyArray; return concatenate(definitions, getDefinitionFromObjectLiteralElement(typeChecker3, node) || emptyArray); @@ -141464,7 +141722,7 @@ function shouldSkipAlias(node, declaration) { if (node.parent === declaration) { return true; } - if (declaration.kind === 277 /* NamespaceImport */) { + if (declaration.kind === 280 /* NamespaceImport */) { return false; } return true; @@ -141542,19 +141800,19 @@ function isDefinitionVisible(checker, declaration) { if (hasInitializer(declaration.parent) && declaration.parent.initializer === declaration) return isDefinitionVisible(checker, declaration.parent); switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: if (hasEffectiveModifier(declaration, 8 /* Private */)) return false; - case 176 /* Constructor */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 210 /* ObjectLiteralExpression */: - case 232 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: + case 178 /* Constructor */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 212 /* ObjectLiteralExpression */: + case 234 /* ClassExpression */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: return isDefinitionVisible(checker, declaration.parent); default: return false; @@ -141589,9 +141847,9 @@ function tryGetSignatureDeclaration(typeChecker3, node) { } function isConstructorLike(node) { switch (node.kind) { - case 176 /* Constructor */: - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 178 /* Constructor */: + case 187 /* ConstructorType */: + case 182 /* ConstructSignature */: return true; default: return false; @@ -141628,14 +141886,14 @@ function provideInlayHints(context) { return; } switch (node.kind) { - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 219 /* ArrowFunction */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 221 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!textSpanIntersectsWith(span, node.pos, node.getFullWidth())) { @@ -141775,7 +142033,7 @@ function provideInlayHints(context) { } function isHintableLiteral(node) { switch (node.kind) { - case 225 /* PrefixUnaryExpression */: { + case 227 /* PrefixUnaryExpression */: { const operand = node.operand; return isLiteralExpression(operand) || isIdentifier(operand) && isInfinityOrNaNString(operand.escapedText); } @@ -141783,7 +142041,7 @@ function provideInlayHints(context) { case 96 /* FalseKeyword */: case 105 /* NullKeyword */: case 14 /* NoSubstitutionTemplateLiteral */: - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: return true; case 79 /* Identifier */: { const name = node.escapedText; @@ -141983,8 +142241,8 @@ function getJsDocCommentsFromDeclarations(declarations, checker) { const parts = []; forEachUnique(declarations, (declaration) => { for (const jsdoc of getCommentHavingNodes(declaration)) { - const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 336 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); - if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 354 /* JSDocTypedefTag */ && declaration.kind !== 347 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 354 /* JSDocTypedefTag */ || t.kind === 347 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 349 /* JSDocParameterTag */ || t.kind === 350 /* JSDocReturnTag */)) { + const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 339 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); + if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 357 /* JSDocTypedefTag */ && declaration.kind !== 350 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 357 /* JSDocTypedefTag */ || t.kind === 350 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 352 /* JSDocParameterTag */ || t.kind === 353 /* JSDocReturnTag */)) { continue; } let newparts = jsdoc.comment ? getDisplayPartsFromComment(jsdoc.comment, checker) : []; @@ -142003,11 +142261,11 @@ function isIdenticalListOfDisplayParts(parts1, parts2) { } function getCommentHavingNodes(declaration) { switch (declaration.kind) { - case 349 /* JSDocParameterTag */: - case 356 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: + case 359 /* JSDocPropertyTag */: return [declaration]; - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: return [declaration, declaration.parent]; default: return getJSDocCommentsAndTags(declaration); @@ -142017,7 +142275,7 @@ function getJsDocTagsFromDeclarations(declarations, checker) { const infos = []; forEachUnique(declarations, (declaration) => { const tags = getJSDocTags(declaration); - if (tags.some((t) => t.kind === 354 /* JSDocTypedefTag */ || t.kind === 347 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 349 /* JSDocParameterTag */ || t.kind === 350 /* JSDocReturnTag */)) { + if (tags.some((t) => t.kind === 357 /* JSDocTypedefTag */ || t.kind === 350 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 352 /* JSDocParameterTag */ || t.kind === 353 /* JSDocReturnTag */)) { return; } for (const tag of tags) { @@ -142032,18 +142290,18 @@ function getDisplayPartsFromComment(comment, checker) { } return flatMap( comment, - (node) => node.kind === 330 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) + (node) => node.kind === 333 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) ); } function getCommentDisplayParts(tag, checker) { const { comment, kind } = tag; const namePart = getTagNameDisplayPart(kind); switch (kind) { - case 338 /* JSDocImplementsTag */: + case 341 /* JSDocImplementsTag */: return withNode(tag.class); - case 337 /* JSDocAugmentsTag */: + case 340 /* JSDocAugmentsTag */: return withNode(tag.class); - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: const templateTag = tag; const displayParts = []; if (templateTag.constraint) { @@ -142065,13 +142323,13 @@ function getCommentDisplayParts(tag, checker) { displayParts.push(...[spacePart(), ...getDisplayPartsFromComment(comment, checker)]); } return displayParts; - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: return withNode(tag.typeExpression); - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 356 /* JSDocPropertyTag */: - case 349 /* JSDocParameterTag */: - case 355 /* JSDocSeeTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 359 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: + case 358 /* JSDocSeeTag */: const { name } = tag; return name ? withNode(name) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); default: @@ -142094,14 +142352,14 @@ function getCommentDisplayParts(tag, checker) { } function getTagNameDisplayPart(kind) { switch (kind) { - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: return parameterNamePart; - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: return propertyNamePart; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return typeParameterNamePart; - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: return typeAliasNamePart; default: return textPart; @@ -142226,47 +142484,47 @@ function getCommentOwnerInfo(tokenAtPos, options) { } function getCommentOwnerInfoWorker(commentOwner, options) { switch (commentOwner.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 173 /* MethodSignature */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 175 /* MethodSignature */: + case 221 /* ArrowFunction */: const host = commentOwner; return { commentOwner, parameters: host.parameters, hasReturn: hasReturn(host, options) }; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return getCommentOwnerInfoWorker(commentOwner.initializer, options); - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: - case 268 /* TypeAliasDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: + case 271 /* TypeAliasDeclaration */: return { commentOwner }; - case 170 /* PropertySignature */: { + case 171 /* PropertySignature */: { const host2 = commentOwner; return host2.type && isFunctionTypeNode(host2.type) ? { commentOwner, parameters: host2.type.parameters, hasReturn: hasReturn(host2.type, options) } : { commentOwner }; } - case 244 /* VariableStatement */: { + case 246 /* 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 314 /* SourceFile */: + case 317 /* SourceFile */: return "quit"; - case 270 /* ModuleDeclaration */: - return commentOwner.parent.kind === 270 /* ModuleDeclaration */ ? void 0 : { commentOwner }; - case 245 /* ExpressionStatement */: + case 273 /* ModuleDeclaration */: + return commentOwner.parent.kind === 273 /* ModuleDeclaration */ ? void 0 : { commentOwner }; + case 247 /* ExpressionStatement */: return getCommentOwnerInfoWorker(commentOwner.expression, options); - case 227 /* BinaryExpression */: { + case 229 /* 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 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: const init = commentOwner.initializer; if (init && (isFunctionExpression(init) || isArrowFunction(init))) { return { commentOwner, parameters: init.parameters, hasReturn: hasReturn(init, options) }; @@ -142277,14 +142535,14 @@ function hasReturn(node, options) { 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 === 217 /* ParenthesizedExpression */) { + while (rightHandSide.kind === 219 /* ParenthesizedExpression */) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return rightHandSide; - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return find(rightHandSide.members, isConstructorDeclaration); } } @@ -142608,11 +142866,11 @@ function compareIdentifiers(s1, s2) { function getModuleSpecifierExpression(declaration) { var _a2; switch (declaration.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return (_a2 = tryCast(declaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a2.expression; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return declaration.moduleSpecifier; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return declaration.declarationList.declarations[0].initializer.arguments[0]; } } @@ -142639,19 +142897,19 @@ function compareImportKind(s1, s2) { function getImportKindOrder(s1) { var _a2; switch (s1.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: if (!s1.importClause) return 0; if (s1.importClause.isTypeOnly) return 1; - if (((_a2 = s1.importClause.namedBindings) == null ? void 0 : _a2.kind) === 277 /* NamespaceImport */) + if (((_a2 = s1.importClause.namedBindings) == null ? void 0 : _a2.kind) === 280 /* NamespaceImport */) return 2; if (s1.importClause.name) return 3; return 4; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return 5; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return 6; } } @@ -142825,21 +143083,21 @@ function createOutliningSpanFromBounds(pos, end, kind) { } function getOutliningSpanForNode(n, sourceFile) { switch (n.kind) { - case 242 /* Block */: + case 244 /* Block */: if (isFunctionLike(n.parent)) { return functionSpan(n.parent, n, sourceFile); } switch (n.parent.kind) { - case 247 /* DoStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 249 /* ForStatement */: - case 246 /* IfStatement */: - case 248 /* WhileStatement */: - case 255 /* WithStatement */: - case 301 /* CatchClause */: + case 249 /* DoStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 251 /* ForStatement */: + case 248 /* IfStatement */: + case 250 /* WhileStatement */: + case 257 /* WithStatement */: + case 304 /* CatchClause */: return spanForNode(n.parent); - case 259 /* TryStatement */: + case 261 /* TryStatement */: const tryStatement = n.parent; if (tryStatement.tryBlock === n) { return spanForNode(n.parent); @@ -142851,43 +143109,43 @@ function getOutliningSpanForNode(n, sourceFile) { default: return createOutliningSpan(createTextSpanFromNode(n, sourceFile), "code" /* Code */); } - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return spanForNode(n.parent); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 272 /* CaseBlock */: - case 187 /* TypeLiteral */: - case 206 /* ObjectBindingPattern */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 275 /* CaseBlock */: + case 189 /* TypeLiteral */: + case 208 /* ObjectBindingPattern */: return spanForNode(n); - case 189 /* TupleType */: + case 191 /* TupleType */: return spanForNode(n, false, !isTupleTypeNode(n.parent), 22 /* OpenBracketToken */); - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: return spanForNodeArray(n.statements); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return spanForObjectOrArrayLiteral(n); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return spanForObjectOrArrayLiteral(n, 22 /* OpenBracketToken */); - case 287 /* JsxElement */: + case 290 /* JsxElement */: return spanForJSXElement(n); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return spanForJSXFragment(n); - case 288 /* JsxSelfClosingElement */: - case 289 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: return spanForJSXAttributes(n.attributes); - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: case 14 /* NoSubstitutionTemplateLiteral */: return spanForTemplateLiteral(n); - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: return spanForNode(n, false, !isBindingElement(n.parent), 22 /* OpenBracketToken */); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return spanForArrowFunction(n); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return spanForCallExpression(n); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return spanForParenthesizedExpression(n); } function spanForCallExpression(node) { @@ -142952,7 +143210,7 @@ function getOutliningSpanForNode(n, sourceFile) { function functionSpan(node, body, sourceFile) { const openToken = tryGetFunctionOpenToken(node, body, sourceFile); const closeToken = findChildOfKind(body, 19 /* CloseBraceToken */, sourceFile); - return openToken && closeToken && spanBetweenTokens(openToken, closeToken, node, sourceFile, node.kind !== 219 /* ArrowFunction */); + return openToken && closeToken && spanBetweenTokens(openToken, closeToken, node, sourceFile, node.kind !== 221 /* ArrowFunction */); } function spanBetweenTokens(openToken, closeToken, hintSpanNode, sourceFile, autoCollapse = false, useFullStart = true) { const textSpan = createTextSpanFromBounds(useFullStart ? openToken.getFullStart() : openToken.getStart(sourceFile), closeToken.getEnd()); @@ -143066,18 +143324,18 @@ function getInfo19(context, considerPartialSpans = true) { } const noSymbolError = (id) => isIdentifier(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) }; switch (exportNode.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 270 /* ModuleDeclaration */: { + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 273 /* ModuleDeclaration */: { const node = exportNode; if (!node.name) return void 0; return noSymbolError(node.name) || { exportNode: node, exportName: node.name, wasDefault, exportingModuleSymbol }; } - case 244 /* VariableStatement */: { + case 246 /* VariableStatement */: { const vs = exportNode; if (!(vs.declarationList.flags & 2 /* Const */) || vs.declarationList.declarations.length !== 1) { return void 0; @@ -143088,7 +143346,7 @@ function getInfo19(context, considerPartialSpans = true) { Debug.assert(!wasDefault, "Can't have a default flag here"); return noSymbolError(decl.name) || { exportNode: vs, exportName: decl.name, wasDefault, exportingModuleSymbol }; } - case 280 /* ExportAssignment */: { + case 283 /* ExportAssignment */: { const node = exportNode; if (node.isExportEquals) return void 0; @@ -143114,20 +143372,20 @@ function changeExport(exportingSourceFile, { wasDefault, exportNode, exportName } else { const exportKeyword = Debug.checkDefined(findModifier(exportNode, 94 /* ExportKeyword */), "Should find an export keyword in modifier list"); switch (exportNode.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: changes.insertNodeAfter(exportingSourceFile, exportKeyword, factory.createToken(89 /* DefaultKeyword */)); break; - case 244 /* VariableStatement */: + case 246 /* 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 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 270 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 273 /* ModuleDeclaration */: changes.deleteModifier(exportingSourceFile, exportKeyword); changes.insertNodeAfter(exportingSourceFile, exportNode, factory.createExportDefault(factory.createIdentifier(exportName.text))); break; @@ -143153,23 +143411,23 @@ function changeImports(program, { wasDefault, exportName, exportingModuleSymbol function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportName) { const { parent: parent2 } = ref; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier(exportName)); break; - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: { + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: { const spec = parent2; changes.replaceNode(importingSourceFile, spec, makeImportSpecifier2(exportName, spec.name.text)); break; } - case 276 /* ImportClause */: { + case 279 /* 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 === 277 /* NamespaceImport */) { + } else if (namedBindings.kind === 280 /* 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(void 0, [makeImportSpecifier2(exportName, ref.text)], clause.parent.moduleSpecifier, quotePreference); @@ -143180,7 +143438,7 @@ function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportNam } break; } - case 205 /* ImportType */: + case 207 /* ImportType */: const importTypeNode = parent2; changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.assertions, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf)); break; @@ -143191,10 +143449,10 @@ function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportNam function changeNamedToDefaultImport(importingSourceFile, ref, changes) { const parent2 = ref.parent; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier("default")); break; - case 279 /* ImportSpecifier */: { + case 282 /* ImportSpecifier */: { const defaultImport = factory.createIdentifier(parent2.name.text); if (parent2.parent.elements.length === 1) { changes.replaceNode(importingSourceFile, parent2.parent, defaultImport); @@ -143204,7 +143462,7 @@ function changeNamedToDefaultImport(importingSourceFile, ref, changes) { } break; } - case 284 /* ExportSpecifier */: { + case 287 /* ExportSpecifier */: { changes.replaceNode(importingSourceFile, parent2, makeExportSpecifier("default", parent2.name.text)); break; } @@ -143294,7 +143552,7 @@ function getImportConversionInfo(context, considerPartialSpans = true) { if (!importClause.namedBindings) { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_namespace_import_or_named_imports) }; } - if (importClause.namedBindings.kind === 277 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 280 /* NamespaceImport */) { return { convertTo: 0 /* Named */, import: importClause.namedBindings }; } const shouldUseDefault = getShouldUseDefault(context.program, importClause); @@ -143715,11 +143973,11 @@ function isAllowedStatementToMove(statement) { } function isPureImport(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return true; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return !hasSyntacticModifier(node, 1 /* Export */); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return node.declarationList.declarations.every((d) => !!d.initializer && isRequireCall(d.initializer, true)); default: return false; @@ -143808,11 +144066,11 @@ function updateImportsInOtherFiles(changes, program, oldFile, movedSymbols, newM } function getNamespaceLikeImport(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 277 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; - case 274 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 280 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; + case 277 /* ImportEqualsDeclaration */: return node.name; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return tryCast(node.name, isIdentifier); default: return Debug.assertNever(node, `Unexpected node kind ${node.kind}`); @@ -143842,23 +144100,23 @@ function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifie const newNamespaceId = factory.createIdentifier(newNamespaceName); const newModuleString = factory.createStringLiteral(newModuleSpecifier); switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return factory.createImportDeclaration( void 0, factory.createImportClause(false, void 0, factory.createNamespaceImport(newNamespaceId)), newModuleString, void 0 ); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return factory.createImportEqualsDeclaration(void 0, false, newNamespaceId, factory.createExternalModuleReference(newModuleString)); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return factory.createVariableDeclaration(newNamespaceId, void 0, void 0, createRequireCall(newModuleString)); default: return Debug.assertNever(node, `Unexpected node kind ${node.kind}`); } } function moduleSpecifierFromImport(i) { - return i.kind === 275 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 274 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; + return i.kind === 278 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 277 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; } function forEachImportInStatement(statement, cb) { if (isImportDeclaration(statement)) { @@ -143917,15 +144175,15 @@ function addExports(sourceFile, toMove, needExport, useEs6Exports) { } function deleteUnusedImports(sourceFile, importDecl, changes, isUnused) { switch (importDecl.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused); break; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: if (isUnused(importDecl.name)) { changes.delete(sourceFile, importDecl); } break; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused); break; default: @@ -143937,7 +144195,7 @@ function deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnu return; const { name, namedBindings } = importDecl.importClause; const defaultUnused = !name || isUnused(name); - const namedBindingsUnused = !namedBindings || (namedBindings.kind === 277 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); + const namedBindingsUnused = !namedBindings || (namedBindings.kind === 280 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); if (defaultUnused && namedBindingsUnused) { changes.delete(sourceFile, importDecl); } else { @@ -143951,7 +144209,7 @@ function deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnu importDecl.importClause, factory.updateImportClause(importDecl.importClause, importDecl.importClause.isTypeOnly, name, void 0) ); - } else if (namedBindings.kind === 278 /* NamedImports */) { + } else if (namedBindings.kind === 281 /* NamedImports */) { for (const element of namedBindings.elements) { if (isUnused(element.name)) changes.delete(sourceFile, element); @@ -143975,9 +144233,9 @@ function deleteUnusedImportsInVariableDeclaration(sourceFile, varDecl, changes, } } break; - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: break; - case 206 /* ObjectBindingPattern */: + case 208 /* ObjectBindingPattern */: if (name.elements.every((e) => isIdentifier(e.name) && isUnused(e.name))) { changes.delete( sourceFile, @@ -144092,14 +144350,14 @@ function getUsageInfo(oldFile, toMove, checker) { } function isInImport(decl) { switch (decl.kind) { - case 274 /* ImportEqualsDeclaration */: - case 279 /* ImportSpecifier */: - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: + case 277 /* ImportEqualsDeclaration */: + case 282 /* ImportSpecifier */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: return true; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return isVariableDeclarationInImport(decl); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return isVariableDeclaration(decl.parent.parent) && isVariableDeclarationInImport(decl.parent.parent); default: return false; @@ -144110,7 +144368,7 @@ function isVariableDeclarationInImport(decl) { } function filterImport(i, moduleSpecifier, keep) { switch (i.kind) { - case 275 /* ImportDeclaration */: { + case 278 /* ImportDeclaration */: { const clause = i.importClause; if (!clause) return void 0; @@ -144118,9 +144376,9 @@ function filterImport(i, moduleSpecifier, keep) { const namedBindings = clause.namedBindings && filterNamedBindings(clause.namedBindings, keep); return defaultImport || namedBindings ? factory.createImportDeclaration(void 0, factory.createImportClause(false, defaultImport, namedBindings), moduleSpecifier, void 0) : void 0; } - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return keep(i.name) ? i : void 0; - case 261 /* VariableDeclaration */: { + case 263 /* VariableDeclaration */: { const name = filterBindingName(i.name, keep); return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : void 0; } @@ -144129,7 +144387,7 @@ function filterImport(i, moduleSpecifier, keep) { } } function filterNamedBindings(namedBindings, keep) { - if (namedBindings.kind === 277 /* NamespaceImport */) { + if (namedBindings.kind === 280 /* NamespaceImport */) { return keep(namedBindings.name) ? namedBindings : void 0; } else { const newElements = namedBindings.elements.filter((e) => keep(e.name)); @@ -144140,9 +144398,9 @@ function filterBindingName(name, keep) { switch (name.kind) { case 79 /* Identifier */: return keep(name) ? name : void 0; - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: return name; - case 206 /* ObjectBindingPattern */: { + case 208 /* ObjectBindingPattern */: { const newElements = name.elements.filter((prop) => prop.propertyName || !isIdentifier(prop.name) || keep(prop.name)); return newElements.length ? factory.createObjectBindingPattern(newElements) : void 0; } @@ -144199,13 +144457,13 @@ function isTopLevelDeclarationStatement(node) { } function isNonVariableTopLevelDeclaration(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 277 /* ImportEqualsDeclaration */: return true; default: return false; @@ -144213,17 +144471,17 @@ function isNonVariableTopLevelDeclaration(node) { } function forEachTopLevelDeclaration(statement, cb) { switch (statement.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 277 /* ImportEqualsDeclaration */: return cb(statement); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return firstDefined(statement.declarationList.declarations, (decl) => forEachTopLevelDeclarationInBindingName(decl.name, cb)); - case 245 /* ExpressionStatement */: { + case 247 /* ExpressionStatement */: { const { expression } = statement; return isBinaryExpression(expression) && getAssignmentDeclarationKind(expression) === 1 /* ExportsProperty */ ? cb(statement) : void 0; } @@ -144233,8 +144491,8 @@ function forEachTopLevelDeclarationInBindingName(name, cb) { switch (name.kind) { case 79 /* Identifier */: return cb(cast(name.parent, (x) => isVariableDeclaration(x) || isBindingElement(x))); - case 207 /* ArrayBindingPattern */: - case 206 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: return firstDefined(name.elements, (em) => isOmittedExpression(em) ? void 0 : forEachTopLevelDeclarationInBindingName(em.name, cb)); default: return Debug.assertNever(name, `Unexpected name kind ${name.kind}`); @@ -144245,9 +144503,9 @@ function nameOfTopLevelDeclaration(d) { } function getTopLevelDeclarationStatement(d) { switch (d.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return d.parent.parent; - case 208 /* BindingElement */: + case 210 /* BindingElement */: return getTopLevelDeclarationStatement( cast(d.parent.parent, (p) => isVariableDeclaration(p) || isBindingElement(p)) ); @@ -144280,24 +144538,24 @@ function addExport(decl, useEs6Exports) { function addEs6Export(d) { const modifiers = canHaveModifiers(d) ? concatenate([factory.createModifier(94 /* ExportKeyword */)], getModifiers(d)) : void 0; switch (d.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return factory.updateFunctionDeclaration(d, modifiers, d.asteriskToken, d.name, d.typeParameters, d.parameters, d.type, d.body); - case 264 /* ClassDeclaration */: + case 266 /* 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 244 /* VariableStatement */: + case 246 /* VariableStatement */: return factory.updateVariableStatement(d, modifiers, d.declarationList); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return factory.updateModuleDeclaration(d, modifiers, d.name, d.body); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return factory.updateEnumDeclaration(d, modifiers, d.name, d.members); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return factory.updateTypeAliasDeclaration(d, modifiers, d.name, d.typeParameters, d.type); - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return factory.updateInterfaceDeclaration(d, modifiers, d.name, d.typeParameters, d.heritageClauses, d.members); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return factory.updateImportEqualsDeclaration(d, modifiers, d.isTypeOnly, d.name, d.moduleReference); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return Debug.fail(); default: return Debug.assertNever(d, `Unexpected declaration kind ${d.kind}`); @@ -144308,18 +144566,18 @@ function addCommonjsExport(decl) { } function getNamesToExportInCommonJS(decl) { switch (decl.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: return [decl.name.text]; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return mapDefined(decl.declarationList.declarations, (d) => isIdentifier(d.name) ? d.name.text : void 0); - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 277 /* ImportEqualsDeclaration */: return emptyArray; - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return Debug.fail("Can't export an ExpressionStatement"); default: return Debug.assertNever(decl, `Unexpected decl kind ${decl.kind}`); @@ -144371,7 +144629,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { const lastDeclaration = signatureDecls[signatureDecls.length - 1]; let updated = lastDeclaration; switch (lastDeclaration.kind) { - case 173 /* MethodSignature */: { + case 175 /* MethodSignature */: { updated = factory.updateMethodSignature( lastDeclaration, lastDeclaration.modifiers, @@ -144383,7 +144641,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 174 /* MethodDeclaration */: { + case 176 /* MethodDeclaration */: { updated = factory.updateMethodDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -144397,7 +144655,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 179 /* CallSignature */: { + case 181 /* CallSignature */: { updated = factory.updateCallSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -144406,7 +144664,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 176 /* Constructor */: { + case 178 /* Constructor */: { updated = factory.updateConstructorDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -144415,7 +144673,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 180 /* ConstructSignature */: { + case 182 /* ConstructSignature */: { updated = factory.updateConstructSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -144424,7 +144682,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 263 /* FunctionDeclaration */: { + case 265 /* FunctionDeclaration */: { updated = factory.updateFunctionDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -144495,12 +144753,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isConvertableSignatureDeclaration(d) { switch (d.kind) { - case 173 /* MethodSignature */: - case 174 /* MethodDeclaration */: - case 179 /* CallSignature */: - case 176 /* Constructor */: - case 180 /* ConstructSignature */: - case 263 /* FunctionDeclaration */: + case 175 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 181 /* CallSignature */: + case 178 /* Constructor */: + case 182 /* ConstructSignature */: + case 265 /* FunctionDeclaration */: return true; } return false; @@ -145047,14 +145305,14 @@ function entryToFunctionCall(entry) { const functionReference = entry.node; const parent2 = functionReference.parent; switch (parent2.kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: const callOrNewExpression = tryCast(parent2, isCallOrNewExpression); if (callOrNewExpression && callOrNewExpression.expression === functionReference) { return callOrNewExpression; } break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.parent && propertyAccessExpression.name === functionReference) { const callOrNewExpression2 = tryCast(propertyAccessExpression.parent, isCallOrNewExpression); @@ -145063,7 +145321,7 @@ function entryToFunctionCall(entry) { } } break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.parent && elementAccessExpression.argumentExpression === functionReference) { const callOrNewExpression2 = tryCast(elementAccessExpression.parent, isCallOrNewExpression); @@ -145081,13 +145339,13 @@ function entryToAccessExpression(entry) { const reference = entry.node; const parent2 = reference.parent; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.expression === reference) { return propertyAccessExpression; } break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.expression === reference) { return elementAccessExpression; @@ -145129,22 +145387,22 @@ function isValidFunctionDeclaration(functionDeclaration, checker) { if (!isValidParameterNodeArray(functionDeclaration.parameters, checker)) return false; switch (functionDeclaration.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return hasNameOrDefault(functionDeclaration) && isSingleImplementation(functionDeclaration, checker); - case 174 /* MethodDeclaration */: + case 176 /* 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 176 /* Constructor */: + case 178 /* Constructor */: if (isClassDeclaration(functionDeclaration.parent)) { return hasNameOrDefault(functionDeclaration.parent) && isSingleImplementation(functionDeclaration, checker); } else { return isValidVariableDeclaration(functionDeclaration.parent.parent) && isSingleImplementation(functionDeclaration, checker); } - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return isValidVariableDeclaration(functionDeclaration.parent); } return false; @@ -145304,7 +145562,7 @@ function getParameterName(paramDeclaration) { } function getClassNames(constructorDeclaration) { switch (constructorDeclaration.parent.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: const classDeclaration = constructorDeclaration.parent; if (classDeclaration.name) return [classDeclaration.name]; @@ -145313,7 +145571,7 @@ function getClassNames(constructorDeclaration) { "Nameless class declaration should be a default export" ); return [defaultModifier]; - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: const classExpression = constructorDeclaration.parent; const variableDeclaration = constructorDeclaration.parent.parent; const className = classExpression.name; @@ -145324,7 +145582,7 @@ function getClassNames(constructorDeclaration) { } function getFunctionNames(functionDeclaration) { switch (functionDeclaration.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: if (functionDeclaration.name) return [functionDeclaration.name]; const defaultModifier = Debug.checkDefined( @@ -145332,21 +145590,21 @@ function getFunctionNames(functionDeclaration) { "Nameless function declaration should be a default export" ); return [defaultModifier]; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return [functionDeclaration.name]; - case 176 /* Constructor */: + case 178 /* Constructor */: const ctrKeyword = Debug.checkDefined( findChildOfKind(functionDeclaration, 136 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword" ); - if (functionDeclaration.parent.kind === 232 /* ClassExpression */) { + if (functionDeclaration.parent.kind === 234 /* ClassExpression */) { const variableDeclaration = functionDeclaration.parent.parent; return [variableDeclaration.name, ctrKeyword]; } return [ctrKeyword]; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return [functionDeclaration.parent.name]; - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: if (functionDeclaration.name) return [functionDeclaration.name, functionDeclaration.parent.name]; return [functionDeclaration.parent.name]; @@ -145429,11 +145687,11 @@ function isNotEqualsOperator(node) { function getParentBinaryExpression(expr) { const container = findAncestor(expr.parent, (n) => { switch (n.kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return false; - case 229 /* TemplateExpression */: - case 227 /* BinaryExpression */: + case 231 /* TemplateExpression */: + case 229 /* BinaryExpression */: return !(isBinaryExpression(n.parent) && isNotEqualsOperator(n.parent)); default: return "quit"; @@ -146053,18 +146311,18 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { function checkForStaticContext(nodeToCheck, containingClass) { let current = nodeToCheck; while (current !== containingClass) { - if (current.kind === 171 /* PropertyDeclaration */) { + if (current.kind === 172 /* PropertyDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 168 /* Parameter */) { + } else if (current.kind === 169 /* Parameter */) { const ctorOrMethod = getContainingFunction(current); - if (ctorOrMethod.kind === 176 /* Constructor */) { + if (ctorOrMethod.kind === 178 /* Constructor */) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 174 /* MethodDeclaration */) { + } else if (current.kind === 176 /* MethodDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } @@ -146098,7 +146356,7 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { visit(nodeToCheck); if (rangeFacts & 8 /* UsesThis */) { const container = getThisContainer(nodeToCheck, false); - if (container.kind === 263 /* FunctionDeclaration */ || container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ || container.kind === 218 /* FunctionExpression */) { + if (container.kind === 265 /* FunctionDeclaration */ || container.kind === 176 /* MethodDeclaration */ && container.parent.kind === 212 /* ObjectLiteralExpression */ || container.kind === 220 /* FunctionExpression */) { rangeFacts |= 16 /* UsesThisInFunction */; } } @@ -146108,21 +146366,21 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { return true; } if (isDeclaration(node2)) { - const declaringNode = node2.kind === 261 /* VariableDeclaration */ ? node2.parent.parent : node2; + const declaringNode = node2.kind === 263 /* VariableDeclaration */ ? node2.parent.parent : node2; if (hasSyntacticModifier(declaringNode, 1 /* Export */)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; } } switch (node2.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractImport)); return true; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; case 107 /* SuperKeyword */: - if (node2.parent.kind === 213 /* CallExpression */) { + if (node2.parent.kind === 215 /* 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)); @@ -146133,7 +146391,7 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { thisNode = node2; } break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: forEachChild(node2, function check(n) { if (isThis(n)) { rangeFacts |= 8 /* UsesThis */; @@ -146144,34 +146402,34 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { forEachChild(n, check); } }); - case 264 /* ClassDeclaration */: - case 263 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 265 /* FunctionDeclaration */: if (isSourceFile(node2.parent) && node2.parent.externalModuleIndicator === void 0) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.functionWillNotBeVisibleInTheNewScope)); } - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return false; } const savedPermittedJumps = permittedJumps; switch (node2.kind) { - case 246 /* IfStatement */: + case 248 /* IfStatement */: permittedJumps &= ~4 /* Return */; break; - case 259 /* TryStatement */: + case 261 /* TryStatement */: permittedJumps = 0 /* None */; break; - case 242 /* Block */: - if (node2.parent && node2.parent.kind === 259 /* TryStatement */ && node2.parent.finallyBlock === node2) { + case 244 /* Block */: + if (node2.parent && node2.parent.kind === 261 /* TryStatement */ && node2.parent.finallyBlock === node2) { permittedJumps = 4 /* Return */; } break; - case 299 /* DefaultClause */: - case 298 /* CaseClause */: + case 302 /* DefaultClause */: + case 301 /* CaseClause */: permittedJumps |= 1 /* Break */; break; default: @@ -146181,39 +146439,39 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { break; } switch (node2.kind) { - case 197 /* ThisType */: + case 199 /* ThisType */: case 109 /* ThisKeyword */: rangeFacts |= 8 /* UsesThis */; thisNode = node2; break; - case 257 /* LabeledStatement */: { + case 259 /* LabeledStatement */: { const label = node2.label; (seenLabels || (seenLabels = [])).push(label.escapedText); forEachChild(node2, visit); seenLabels.pop(); break; } - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: { + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: { const label = node2.label; if (label) { if (!contains(seenLabels, label.escapedText)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)); } } else { - if (!(permittedJumps & (node2.kind === 253 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { + if (!(permittedJumps & (node2.kind === 255 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingConditionalBreakOrContinueStatements)); } } break; } - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: rangeFacts |= 4 /* IsAsyncFunction */; break; - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: rangeFacts |= 2 /* IsGenerator */; break; - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: if (permittedJumps & 4 /* Return */) { rangeFacts |= 1 /* HasReturn */; } else { @@ -146263,12 +146521,12 @@ function collectEnclosingScopes(range) { const scopes = []; while (true) { current = current.parent; - if (current.kind === 168 /* Parameter */) { + if (current.kind === 169 /* Parameter */) { current = findAncestor(current, (parent2) => isFunctionLikeDeclaration(parent2)).parent; } if (isScope(current)) { scopes.push(current); - if (current.kind === 314 /* SourceFile */) { + if (current.kind === 317 /* SourceFile */) { return scopes; } } @@ -146344,28 +146602,28 @@ function getDescriptionForConstantInScope(scope) { } function getDescriptionForFunctionLikeDeclaration(scope) { switch (scope.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: return "constructor"; - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: return scope.name ? `function '${scope.name.text}'` : ANONYMOUS; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return "arrow function"; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return `method '${scope.name.getText()}'`; - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return `'get ${scope.name.getText()}'`; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return `'set ${scope.name.getText()}'`; default: throw Debug.assertNever(scope, `Unexpected scope kind ${scope.kind}`); } } function getDescriptionForClassLikeDeclaration(scope) { - return scope.kind === 264 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; + return scope.kind === 266 /* 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 === 271 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? SpecialScope.Module : SpecialScope.Global; + return scope.kind === 274 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? SpecialScope.Module : SpecialScope.Global; } var SpecialScope = /* @__PURE__ */ ((SpecialScope2) => { SpecialScope2[SpecialScope2["Module"] = 0] = "Module"; @@ -146661,7 +146919,7 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont changeTracker.insertNodeBefore(context.file, oldVariableDeclaration, newVariableDeclaration); const localReference = factory.createIdentifier(localNameText); changeTracker.replaceNode(context.file, node, localReference); - } else if (node.parent.kind === 245 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { + } else if (node.parent.kind === 247 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { const newVariableStatement = factory.createVariableStatement( void 0, factory.createVariableDeclarationList([newVariableDeclaration], 2 /* Const */) @@ -146678,7 +146936,7 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont } else { changeTracker.insertNodeBefore(context.file, nodeToInsertBefore, newVariableStatement, false); } - if (node.parent.kind === 245 /* ExpressionStatement */) { + if (node.parent.kind === 247 /* ExpressionStatement */) { changeTracker.delete(context.file, node.parent); } else { let localReference = factory.createIdentifier(localNameText); @@ -147199,27 +147457,27 @@ function getExtractableParent(node) { function isExtractableExpression(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 308 /* EnumMember */: + case 311 /* EnumMember */: return false; } switch (node.kind) { case 10 /* StringLiteral */: - return parent2.kind !== 275 /* ImportDeclaration */ && parent2.kind !== 279 /* ImportSpecifier */; - case 231 /* SpreadElement */: - case 206 /* ObjectBindingPattern */: - case 208 /* BindingElement */: + return parent2.kind !== 278 /* ImportDeclaration */ && parent2.kind !== 282 /* ImportSpecifier */; + case 233 /* SpreadElement */: + case 208 /* ObjectBindingPattern */: + case 210 /* BindingElement */: return false; case 79 /* Identifier */: - return parent2.kind !== 208 /* BindingElement */ && parent2.kind !== 279 /* ImportSpecifier */ && parent2.kind !== 284 /* ExportSpecifier */; + return parent2.kind !== 210 /* BindingElement */ && parent2.kind !== 282 /* ImportSpecifier */ && parent2.kind !== 287 /* ExportSpecifier */; } return true; } function isBlockLike(node) { switch (node.kind) { - case 242 /* Block */: - case 314 /* SourceFile */: - case 271 /* ModuleBlock */: - case 298 /* CaseClause */: + case 244 /* Block */: + case 317 /* SourceFile */: + case 274 /* ModuleBlock */: + case 301 /* CaseClause */: return true; default: return false; @@ -147359,10 +147617,10 @@ function getInfo21(context) { } function isConvertibleDeclaration(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: return true; default: return false; @@ -147430,7 +147688,7 @@ function getRenameInfoForNode(node, typeChecker3, sourceFile, program, preferenc return getRenameInfoError(wouldRenameNodeModules); } const kind = ts_SymbolDisplay_exports.getSymbolKind(typeChecker3, symbol, node); - const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 166 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; + const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; const displayName = specifierName || typeChecker3.symbolToString(symbol); const fullDisplayName = specifierName || typeChecker3.getFullyQualifiedName(symbol); return getRenameInfoSuccess(displayName, fullDisplayName, kind, ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker3, symbol), node, sourceFile); @@ -147693,10 +147951,10 @@ function getImmediatelyContainingArgumentInfo(node, position, sourceFile) { return getArgumentListInfoForTemplate(parent2, 0, sourceFile); } return void 0; - } else if (isTemplateHead(node) && parent2.parent.kind === 215 /* TaggedTemplateExpression */) { + } else if (isTemplateHead(node) && parent2.parent.kind === 217 /* TaggedTemplateExpression */) { const templateExpression = parent2; const tagExpression = templateExpression.parent; - Debug.assert(templateExpression.kind === 229 /* TemplateExpression */); + Debug.assert(templateExpression.kind === 231 /* TemplateExpression */); const argumentIndex = isInsideTemplateLiteral(node, position, sourceFile) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); } else if (isTemplateSpan(parent2) && isTaggedTemplateExpression(parent2.parent.parent)) { @@ -147758,17 +148016,17 @@ function getContextualSignatureLocationInfo(startingToken, sourceFile, position, return void 0; const { parent: parent2 } = startingToken; switch (parent2.kind) { - case 217 /* ParenthesizedExpression */: - case 174 /* MethodDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 219 /* ParenthesizedExpression */: + case 176 /* MethodDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* 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 227 /* BinaryExpression */: { + case 229 /* BinaryExpression */: { const highestBinary = getHighestBinary(parent2); const contextualType2 = checker.getContextualType(highestBinary); const argumentIndex2 = startingToken.kind === 20 /* OpenParenToken */ ? 0 : countBinaryExpressionParameters(parent2) - 1; @@ -147834,7 +148092,7 @@ function getApplicableSpanForTaggedTemplate(taggedTemplate, sourceFile) { const template = taggedTemplate.template; const applicableSpanStart = template.getStart(); let applicableSpanEnd = template.getEnd(); - if (template.kind === 229 /* TemplateExpression */) { + if (template.kind === 231 /* TemplateExpression */) { const lastSpan = last(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = skipTrivia(sourceFile.text, applicableSpanEnd, false); @@ -148101,7 +148359,7 @@ function getSelectionChildren(node) { 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 === 167 /* TypeParameter */ || kind === 23 /* CloseBracketToken */ + ({ kind }) => kind === 22 /* OpenBracketToken */ || kind === 168 /* TypeParameter */ || kind === 23 /* CloseBracketToken */ ); return [ openBraceToken, @@ -148111,7 +148369,7 @@ function getSelectionChildren(node) { } 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) === 329 /* JSDoc */ ? children[0] : void 0; + const firstJSDocChild = ((_a2 = children[0]) == null ? void 0 : _a2.kind) === 332 /* 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; @@ -148172,19 +148430,19 @@ function createSyntaxList2(children) { } function isListOpener(token) { const kind = token && token.kind; - return kind === 18 /* OpenBraceToken */ || kind === 22 /* OpenBracketToken */ || kind === 20 /* OpenParenToken */ || kind === 289 /* JsxOpeningElement */; + return kind === 18 /* OpenBraceToken */ || kind === 22 /* OpenBracketToken */ || kind === 20 /* OpenParenToken */ || kind === 292 /* JsxOpeningElement */; } function isListCloser(token) { const kind = token && token.kind; - return kind === 19 /* CloseBraceToken */ || kind === 23 /* CloseBracketToken */ || kind === 21 /* CloseParenToken */ || kind === 290 /* JsxClosingElement */; + return kind === 19 /* CloseBraceToken */ || kind === 23 /* CloseBracketToken */ || kind === 21 /* CloseParenToken */ || kind === 293 /* JsxClosingElement */; } function getEndPos(sourceFile, node) { switch (node.kind) { - case 349 /* JSDocParameterTag */: - case 347 /* JSDocCallbackTag */: - case 356 /* JSDocPropertyTag */: - case 354 /* JSDocTypedefTag */: - case 351 /* JSDocThisTag */: + case 352 /* JSDocParameterTag */: + case 350 /* JSDocCallbackTag */: + case 359 /* JSDocPropertyTag */: + case 357 /* JSDocTypedefTag */: + case 354 /* JSDocThisTag */: return sourceFile.getLineEndOfPosition(node.getStart()); default: return node.getEnd(); @@ -148208,7 +148466,7 @@ function getSymbolKind(typeChecker3, symbol, location) { } const flags = getCombinedLocalAndExportSymbolFlags(symbol); if (flags & 32 /* Class */) { - return getDeclarationOfKind(symbol, 232 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; + return getDeclarationOfKind(symbol, 234 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; } if (flags & 384 /* Enum */) return "enum" /* enumElement */; @@ -148334,13 +148592,13 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s const declaration = find(symbol.declarations, (declaration2) => declaration2.name === location); if (declaration) { switch (declaration.kind) { - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: symbolKind = "getter" /* memberGetAccessorElement */; break; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: symbolKind = "setter" /* memberSetAccessorElement */; break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: symbolKind = "accessor" /* memberAccessorVariableElement */; break; default: @@ -148352,7 +148610,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s } let signature; type = isThisExpression ? typeChecker3.getTypeAtLocation(location) : typeChecker3.getTypeOfSymbolAtLocation(symbol, location); - if (location.parent && location.parent.kind === 211 /* PropertyAccessExpression */) { + if (location.parent && location.parent.kind === 213 /* PropertyAccessExpression */) { const right = location.parent.name; if (right === location || right && right.getFullWidth() === 0) { location = location.parent; @@ -148368,7 +148626,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s } if (callExpressionLike) { signature = typeChecker3.getResolvedSignature(callExpressionLike); - const useConstructSignatures = callExpressionLike.kind === 214 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 107 /* SuperKeyword */; + const useConstructSignatures = callExpressionLike.kind === 216 /* 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; @@ -148423,21 +148681,21 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s hasAddedSymbolInfo = true; hasMultipleSignatures = allSignatures.length > 1; } - } else if (isNameOfFunctionDeclaration(location) && !(symbolFlags & 98304 /* Accessor */) || location.kind === 136 /* ConstructorKeyword */ && location.parent.kind === 176 /* Constructor */) { + } else if (isNameOfFunctionDeclaration(location) && !(symbolFlags & 98304 /* Accessor */) || location.kind === 136 /* ConstructorKeyword */ && location.parent.kind === 178 /* Constructor */) { const functionDeclaration = location.parent; const locationIsSymbolDeclaration = symbol.declarations && find(symbol.declarations, (declaration) => declaration === (location.kind === 136 /* ConstructorKeyword */ ? functionDeclaration.parent : functionDeclaration)); if (locationIsSymbolDeclaration) { - const allSignatures = functionDeclaration.kind === 176 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); + const allSignatures = functionDeclaration.kind === 178 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); if (!typeChecker3.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker3.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 176 /* Constructor */) { + if (functionDeclaration.kind === 178 /* Constructor */) { symbolKind = "constructor" /* constructorImplementationElement */; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 179 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 181 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); } if (signature) { addSignatureDisplayParts(signature, allSignatures); @@ -148449,9 +148707,9 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s } if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) { addAliasPrefixIfNecessary(); - if (getDeclarationOfKind(symbol, 232 /* ClassExpression */)) { + if (getDeclarationOfKind(symbol, 234 /* ClassExpression */)) { pushSymbolKind("local class" /* localClassElement */); - } else if (getDeclarationOfKind(symbol, 265 /* StructDeclaration */)) { + } else if (getDeclarationOfKind(symbol, 267 /* StructDeclaration */)) { displayParts.push(keywordPart(85 /* StructKeyword */)); } else { displayParts.push(keywordPart(84 /* ClassKeyword */)); @@ -148490,7 +148748,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s } if (symbolFlags & 1536 /* Module */ && !isThisExpression) { prefixNextMeaning(); - const declaration = getDeclarationOfKind(symbol, 270 /* ModuleDeclaration */); + const declaration = getDeclarationOfKind(symbol, 273 /* ModuleDeclaration */); const isNamespace = declaration && declaration.name && declaration.name.kind === 79 /* Identifier */; displayParts.push(keywordPart(isNamespace ? 144 /* NamespaceKeyword */ : 143 /* ModuleKeyword */)); displayParts.push(spacePart()); @@ -148508,7 +148766,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s addFullSymbolName(symbol.parent, enclosingDeclaration); writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration); } else { - const decl = getDeclarationOfKind(symbol, 167 /* TypeParameter */); + const decl = getDeclarationOfKind(symbol, 168 /* TypeParameter */); if (decl === void 0) return Debug.fail(); const declaration = decl.parent; @@ -148516,14 +148774,14 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s if (isFunctionLikeKind(declaration.kind)) { addInPrefix(); const signature = typeChecker3.getSignatureFromDeclaration(declaration); - if (declaration.kind === 180 /* ConstructSignature */) { + if (declaration.kind === 182 /* ConstructSignature */) { displayParts.push(keywordPart(104 /* NewKeyword */)); displayParts.push(spacePart()); - } else if (declaration.kind !== 179 /* CallSignature */ && declaration.name) { + } else if (declaration.kind !== 181 /* CallSignature */ && declaration.name) { addFullSymbolName(declaration.symbol); } addRange(displayParts, signatureToDisplayParts(typeChecker3, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); - } else if (declaration.kind === 268 /* TypeAliasDeclaration */) { + } else if (declaration.kind === 271 /* TypeAliasDeclaration */) { addInPrefix(); displayParts.push(keywordPart(155 /* TypeKeyword */)); displayParts.push(spacePart()); @@ -148537,7 +148795,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s 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) === 308 /* EnumMember */) { + if ((declaration == null ? void 0 : declaration.kind) === 311 /* EnumMember */) { const constantValue = typeChecker3.getConstantValue(declaration); if (constantValue !== void 0) { displayParts.push(spacePart()); @@ -148581,17 +148839,17 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s } if (symbol.declarations) { switch (symbol.declarations[0].kind) { - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: displayParts.push(keywordPart(94 /* ExportKeyword */)); displayParts.push(spacePart()); displayParts.push(keywordPart(144 /* NamespaceKeyword */)); break; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: displayParts.push(keywordPart(94 /* ExportKeyword */)); displayParts.push(spacePart()); displayParts.push(keywordPart(symbol.declarations[0].isExportEquals ? 63 /* EqualsToken */ : 89 /* DefaultKeyword */)); break; - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: displayParts.push(keywordPart(94 /* ExportKeyword */)); break; default: @@ -148601,7 +148859,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s displayParts.push(spacePart()); addFullSymbolName(symbol); forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 274 /* ImportEqualsDeclaration */) { + if (declaration.kind === 277 /* ImportEqualsDeclaration */) { const importEqualsDeclaration = declaration; if (isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(spacePart()); @@ -148669,9 +148927,9 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s documentation = symbol.getContextualDocumentationComment(enclosingDeclaration, typeChecker3); } if (documentation.length === 0 && symbolFlags & 4 /* Property */) { - if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 314 /* SourceFile */)) { + if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 317 /* SourceFile */)) { for (const declaration of symbol.declarations) { - if (!declaration.parent || declaration.parent.kind !== 227 /* BinaryExpression */) { + if (!declaration.parent || declaration.parent.kind !== 229 /* BinaryExpression */) { continue; } const rhsSymbol = typeChecker3.getSymbolAtLocation(declaration.parent.right); @@ -148822,14 +149080,14 @@ function isLocalVariableOrFunction(symbol) { return false; } return forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 218 /* FunctionExpression */) { + if (declaration.kind === 220 /* FunctionExpression */) { return true; } - if (declaration.kind !== 261 /* VariableDeclaration */ && declaration.kind !== 263 /* FunctionDeclaration */) { + if (declaration.kind !== 263 /* VariableDeclaration */ && declaration.kind !== 265 /* FunctionDeclaration */) { return false; } for (let parent2 = declaration.parent; !isFunctionBlock(parent2); parent2 = parent2.parent) { - if (parent2.kind === 314 /* SourceFile */ || parent2.kind === 271 /* ModuleBlock */) { + if (parent2.kind === 317 /* SourceFile */ || parent2.kind === 274 /* ModuleBlock */) { return false; } } @@ -148987,7 +149245,7 @@ function getAdjustedEndPosition(sourceFile, node, options) { 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 === 210 /* ObjectLiteralExpression */); + return !!candidate && !!node.parent && (candidate.kind === 27 /* CommaToken */ || candidate.kind === 26 /* SemicolonToken */ && node.parent.kind === 212 /* ObjectLiteralExpression */); } function isThisTypeAnnotatable(containingFunction) { return isFunctionExpression(containingFunction) || isFunctionDeclaration(containingFunction); @@ -149184,7 +149442,7 @@ var ChangeTracker = class { endNode2 = first(node.parameters); } } else { - endNode2 = (_a2 = node.kind === 261 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) != null ? _a2 : node.name; + endNode2 = (_a2 = node.kind === 263 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) != null ? _a2 : node.name; } this.insertNodeAt(sourceFile, endNode2.end, type, { prefix: ": " }); return true; @@ -149326,19 +149584,19 @@ ${options.prefix}` : "\n" : options.prefix } getInsertNodeAfterOptionsWorker(node) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 270 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 273 /* ModuleDeclaration */: return { prefix: this.newLineCharacter, suffix: this.newLineCharacter }; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: case 10 /* StringLiteral */: case 79 /* Identifier */: return { prefix: ", " }; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return { suffix: "," + this.newLineCharacter }; case 94 /* ExportKeyword */: return { prefix: " " }; - case 168 /* Parameter */: + case 169 /* Parameter */: return {}; default: Debug.assert(isStatement(node) || isClassOrTypeElement(node)); @@ -149347,7 +149605,7 @@ ${options.prefix}` : "\n" : options.prefix } insertName(sourceFile, node, name) { Debug.assert(!node.name); - if (node.kind === 219 /* ArrowFunction */) { + if (node.kind === 221 /* ArrowFunction */) { const arrow = findChildOfKind(node, 38 /* EqualsGreaterThanToken */, sourceFile); const lparen = findChildOfKind(node, 20 /* OpenParenToken */, sourceFile); if (lparen) { @@ -149357,12 +149615,12 @@ ${options.prefix}` : "\n" : options.prefix this.insertText(sourceFile, first(node.parameters).getStart(sourceFile), `function ${name}(`); this.replaceRange(sourceFile, arrow, factory.createToken(21 /* CloseParenToken */)); } - if (node.body.kind !== 242 /* Block */) { + if (node.body.kind !== 244 /* 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 === 218 /* FunctionExpression */ ? 99 /* FunctionKeyword */ : 84 /* ClassKeyword */, sourceFile).end; + const pos = findChildOfKind(node, node.kind === 220 /* FunctionExpression */ ? 99 /* FunctionKeyword */ : 84 /* ClassKeyword */, sourceFile).end; this.insertNodeAt(sourceFile, pos, factory.createIdentifier(name), { prefix: " " }); } } @@ -149483,10 +149741,10 @@ ${options.prefix}` : "\n" : options.prefix } }; function updateJSDocHost(parent2) { - if (parent2.kind !== 219 /* ArrowFunction */) { + if (parent2.kind !== 221 /* ArrowFunction */) { return parent2; } - const jsDocNode = parent2.parent.kind === 171 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; + const jsDocNode = parent2.parent.kind === 172 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; jsDocNode.jsDoc = parent2.jsDoc; jsDocNode.jsDocCache = parent2.jsDocCache; return jsDocNode; @@ -149496,14 +149754,14 @@ function tryMergeJsdocTags(oldTag, newTag) { return void 0; } switch (oldTag.kind) { - case 349 /* JSDocParameterTag */: { + case 352 /* JSDocParameterTag */: { const oldParam = oldTag; const newParam = newTag; return isIdentifier(oldParam.name) && isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? factory.createJSDocParameterTag(void 0, newParam.name, false, newParam.typeExpression, newParam.isNameFirst, oldParam.comment) : void 0; } - case 350 /* JSDocReturnTag */: + case 353 /* JSDocReturnTag */: return factory.createJSDocReturnTag(void 0, newTag.typeExpression, oldTag.comment); - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: return factory.createJSDocTypeTag(void 0, newTag.typeExpression, oldTag.comment); } } @@ -149884,13 +150142,13 @@ function isValidLocationToAddComment(sourceFile, position) { 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 === 166 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); + return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 167 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); } var deleteDeclaration; ((_deleteDeclaration) => { function deleteDeclaration2(changes, deletedNodesInLists, sourceFile, node) { switch (node.kind) { - case 168 /* Parameter */: { + case 169 /* Parameter */: { const oldFunction = node.parent; if (isArrowFunction(oldFunction) && oldFunction.parameters.length === 1 && !findChildOfKind(oldFunction, 20 /* OpenParenToken */, sourceFile)) { changes.replaceNodeWithText(sourceFile, node, "()"); @@ -149899,29 +150157,29 @@ var deleteDeclaration; } break; } - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* 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 208 /* BindingElement */: + case 210 /* BindingElement */: const pattern = node.parent; - const preserveComma = pattern.kind === 207 /* ArrayBindingPattern */ && node !== last(pattern.elements); + const preserveComma = pattern.kind === 209 /* ArrayBindingPattern */ && node !== last(pattern.elements); if (preserveComma) { deleteNode(changes, sourceFile, node); } else { deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node); break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); break; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: const namedImports = node.parent; if (namedImports.elements.length === 1) { deleteImportBinding(changes, sourceFile, namedImports); @@ -149929,7 +150187,7 @@ var deleteDeclaration; deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: deleteImportBinding(changes, sourceFile, node); break; case 26 /* SemicolonToken */: @@ -149938,9 +150196,9 @@ var deleteDeclaration; case 99 /* FunctionKeyword */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: 0 /* Exclude */ }); break; - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 263 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 265 /* FunctionDeclaration */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -149975,13 +150233,13 @@ var deleteDeclaration; const previousToken = Debug.checkDefined(getTokenAtPosition(sourceFile, node.pos - 1)); changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end }); } else { - const importDecl = getAncestor(node, 275 /* ImportDeclaration */); + const importDecl = getAncestor(node, 278 /* ImportDeclaration */); deleteNode(changes, sourceFile, importDecl); } } function deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node) { const { parent: parent2 } = node; - if (parent2.kind === 301 /* CatchClause */) { + if (parent2.kind === 304 /* CatchClause */) { changes.deleteNodeRange(sourceFile, findChildOfKind(parent2, 20 /* OpenParenToken */, sourceFile), findChildOfKind(parent2, 21 /* CloseParenToken */, sourceFile)); return; } @@ -149991,14 +150249,14 @@ var deleteDeclaration; } const gp = parent2.parent; switch (gp.kind) { - case 251 /* ForOfStatement */: - case 250 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 252 /* ForInStatement */: changes.replaceNode(sourceFile, node, factory.createObjectLiteralExpression()); break; - case 249 /* ForStatement */: + case 251 /* ForStatement */: deleteNode(changes, sourceFile, parent2); break; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: deleteNode(changes, sourceFile, gp, { leadingTriviaOption: hasJSDocNodes(gp) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -150200,10 +150458,10 @@ function getFormattingScanner(text, languageVariant, startPos, endPos, cb) { function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { - case 294 /* JsxAttribute */: - case 289 /* JsxOpeningElement */: - case 290 /* JsxClosingElement */: - case 288 /* JsxSelfClosingElement */: + case 297 /* JsxAttribute */: + case 292 /* JsxOpeningElement */: + case 293 /* JsxClosingElement */: + case 291 /* JsxSelfClosingElement */: return isKeyword(node.kind) || node.kind === 79 /* Identifier */; } } @@ -150370,7 +150628,7 @@ var RuleFlags = /* @__PURE__ */ ((RuleFlags2) => { // src/services/formatting/rules.ts function getAllRules() { const allTokens = []; - for (let token = 0 /* FirstToken */; token <= 164 /* LastToken */; token++) { + for (let token = 0 /* FirstToken */; token <= 165 /* LastToken */; token++) { if (token !== 1 /* EndOfFileToken */) { allTokens.push(token); } @@ -150381,9 +150639,9 @@ function getAllRules() { const anyToken = { tokens: allTokens, isSpecific: false }; const anyTokenIncludingMultilineComments = tokenRangeFrom([...allTokens, 3 /* MultiLineCommentTrivia */]); const anyTokenIncludingEOF = tokenRangeFrom([...allTokens, 1 /* EndOfFileToken */]); - const keywords = tokenRangeFromRange(81 /* FirstKeyword */, 164 /* LastKeyword */); + const keywords = tokenRangeFromRange(81 /* FirstKeyword */, 165 /* LastKeyword */); const binaryOperators = tokenRangeFromRange(29 /* FirstBinaryOperator */, 78 /* LastBinaryOperator */); - const binaryKeywordOperators = [102 /* InKeyword */, 103 /* InstanceOfKeyword */, 164 /* OfKeyword */, 129 /* AsKeyword */, 141 /* IsKeyword */]; + const binaryKeywordOperators = [102 /* InKeyword */, 103 /* InstanceOfKeyword */, 165 /* OfKeyword */, 129 /* AsKeyword */, 141 /* IsKeyword */]; const unaryPrefixOperators = [45 /* PlusPlusToken */, 46 /* MinusMinusToken */, 54 /* TildeToken */, 53 /* ExclamationToken */]; const unaryPrefixExpressions = [ 8 /* NumericLiteral */, @@ -150656,40 +150914,40 @@ function isOptionEnabledOrUndefined(optionName) { return (context) => !context.options || !hasProperty(context.options, optionName) || !!context.options[optionName]; } function isForContext(context) { - return context.contextNode.kind === 249 /* ForStatement */; + return context.contextNode.kind === 251 /* ForStatement */; } function isNotForContext(context) { return !isForContext(context); } function isBinaryOpContext(context) { switch (context.contextNode.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return context.contextNode.operatorToken.kind !== 27 /* CommaToken */; - case 228 /* ConditionalExpression */: - case 194 /* ConditionalType */: - case 235 /* AsExpression */: - case 284 /* ExportSpecifier */: - case 279 /* ImportSpecifier */: - case 182 /* TypePredicate */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 239 /* SatisfiesExpression */: + case 230 /* ConditionalExpression */: + case 196 /* ConditionalType */: + case 237 /* AsExpression */: + case 287 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 184 /* TypePredicate */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: + case 241 /* SatisfiesExpression */: return true; - case 208 /* BindingElement */: - case 268 /* TypeAliasDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 280 /* ExportAssignment */: - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 308 /* EnumMember */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 210 /* BindingElement */: + case 271 /* TypeAliasDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 283 /* ExportAssignment */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 311 /* EnumMember */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return context.currentTokenSpan.kind === 63 /* EqualsToken */ || context.nextTokenSpan.kind === 63 /* EqualsToken */; - case 250 /* ForInStatement */: - case 167 /* TypeParameter */: + case 252 /* ForInStatement */: + case 168 /* TypeParameter */: return context.currentTokenSpan.kind === 102 /* InKeyword */ || context.nextTokenSpan.kind === 102 /* InKeyword */ || context.currentTokenSpan.kind === 63 /* EqualsToken */ || context.nextTokenSpan.kind === 63 /* EqualsToken */; - case 251 /* ForOfStatement */: - return context.currentTokenSpan.kind === 164 /* OfKeyword */ || context.nextTokenSpan.kind === 164 /* OfKeyword */; + case 253 /* ForOfStatement */: + return context.currentTokenSpan.kind === 165 /* OfKeyword */ || context.nextTokenSpan.kind === 165 /* OfKeyword */; } return false; } @@ -150701,16 +150959,16 @@ function isNotTypeAnnotationContext(context) { } function isTypeAnnotationContext(context) { const contextKind = context.contextNode.kind; - return contextKind === 171 /* PropertyDeclaration */ || contextKind === 170 /* PropertySignature */ || contextKind === 168 /* Parameter */ || contextKind === 261 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); + return contextKind === 172 /* PropertyDeclaration */ || contextKind === 171 /* PropertySignature */ || contextKind === 169 /* Parameter */ || contextKind === 263 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); } function isConditionalOperatorContext(context) { - return context.contextNode.kind === 228 /* ConditionalExpression */ || context.contextNode.kind === 194 /* ConditionalType */; + return context.contextNode.kind === 230 /* ConditionalExpression */ || context.contextNode.kind === 196 /* ConditionalType */; } function isSameLineTokenOrBeforeBlockContext(context) { return context.TokensAreOnSameLine() || isBeforeBlockContext(context); } function isBraceWrappedContext(context) { - return context.contextNode.kind === 206 /* ObjectBindingPattern */ || context.contextNode.kind === 200 /* MappedType */ || isSingleLineBlockContext(context); + return context.contextNode.kind === 208 /* ObjectBindingPattern */ || context.contextNode.kind === 202 /* MappedType */ || isSingleLineBlockContext(context); } function isBeforeMultilineBlockContext(context) { return isBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); @@ -150732,26 +150990,26 @@ function nodeIsBlockContext(node) { return true; } switch (node.kind) { - case 242 /* Block */: - case 272 /* CaseBlock */: - case 210 /* ObjectLiteralExpression */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 275 /* CaseBlock */: + case 212 /* ObjectLiteralExpression */: + case 274 /* ModuleBlock */: return true; } return false; } function isFunctionDeclContext(context) { switch (context.contextNode.kind) { - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 179 /* CallSignature */: - case 218 /* FunctionExpression */: - case 176 /* Constructor */: - case 219 /* ArrowFunction */: - case 267 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 181 /* CallSignature */: + case 220 /* FunctionExpression */: + case 178 /* Constructor */: + case 221 /* ArrowFunction */: + case 270 /* InterfaceDeclaration */: return true; } return false; @@ -150760,41 +151018,41 @@ function isNotFunctionDeclContext(context) { return !isFunctionDeclContext(context); } function isFunctionDeclarationOrFunctionExpressionContext(context) { - return context.contextNode.kind === 263 /* FunctionDeclaration */ || context.contextNode.kind === 218 /* FunctionExpression */; + return context.contextNode.kind === 265 /* FunctionDeclaration */ || context.contextNode.kind === 220 /* FunctionExpression */; } function isTypeScriptDeclWithBlockContext(context) { return nodeIsTypeScriptDeclWithBlockContext(context.contextNode); } function nodeIsTypeScriptDeclWithBlockContext(node) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 187 /* TypeLiteral */: - case 270 /* ModuleDeclaration */: - case 281 /* ExportDeclaration */: - case 282 /* NamedExports */: - case 275 /* ImportDeclaration */: - case 278 /* NamedImports */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 189 /* TypeLiteral */: + case 273 /* ModuleDeclaration */: + case 284 /* ExportDeclaration */: + case 285 /* NamedExports */: + case 278 /* ImportDeclaration */: + case 281 /* NamedImports */: return true; } return false; } function isAfterCodeBlockContext(context) { switch (context.currentTokenParent.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 301 /* CatchClause */: - case 271 /* ModuleBlock */: - case 256 /* SwitchStatement */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 304 /* CatchClause */: + case 274 /* ModuleBlock */: + case 258 /* SwitchStatement */: return true; - case 242 /* Block */: { + case 244 /* Block */: { const blockParent = context.currentTokenParent.parent; - if (!blockParent || blockParent.kind !== 219 /* ArrowFunction */ && blockParent.kind !== 218 /* FunctionExpression */) { + if (!blockParent || blockParent.kind !== 221 /* ArrowFunction */ && blockParent.kind !== 220 /* FunctionExpression */) { return true; } } @@ -150803,29 +151061,29 @@ function isAfterCodeBlockContext(context) { } function isControlDeclContext(context) { switch (context.contextNode.kind) { - case 246 /* IfStatement */: - case 256 /* SwitchStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 248 /* WhileStatement */: - case 259 /* TryStatement */: - case 247 /* DoStatement */: - case 255 /* WithStatement */: - case 301 /* CatchClause */: + case 248 /* IfStatement */: + case 258 /* SwitchStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 250 /* WhileStatement */: + case 261 /* TryStatement */: + case 249 /* DoStatement */: + case 257 /* WithStatement */: + case 304 /* CatchClause */: return true; default: return false; } } function isObjectContext(context) { - return context.contextNode.kind === 210 /* ObjectLiteralExpression */; + return context.contextNode.kind === 212 /* ObjectLiteralExpression */; } function isFunctionCallContext(context) { - return context.contextNode.kind === 213 /* CallExpression */; + return context.contextNode.kind === 215 /* CallExpression */; } function isNewContext(context) { - return context.contextNode.kind === 214 /* NewExpression */; + return context.contextNode.kind === 216 /* NewExpression */; } function isFunctionCallOrNewContext(context) { return isFunctionCallContext(context) || isNewContext(context); @@ -150840,10 +151098,10 @@ function isNextTokenNotCloseParen(context) { return context.nextTokenSpan.kind !== 21 /* CloseParenToken */; } function isArrowFunctionContext(context) { - return context.contextNode.kind === 219 /* ArrowFunction */; + return context.contextNode.kind === 221 /* ArrowFunction */; } function isImportTypeContext(context) { - return context.contextNode.kind === 205 /* ImportType */; + return context.contextNode.kind === 207 /* ImportType */; } function isNonJsxSameLineTokenContext(context) { return context.TokensAreOnSameLine() && context.contextNode.kind !== 11 /* JsxText */; @@ -150852,19 +151110,19 @@ function isNonJsxTextContext(context) { return context.contextNode.kind !== 11 /* JsxText */; } function isNonJsxElementOrFragmentContext(context) { - return context.contextNode.kind !== 287 /* JsxElement */ && context.contextNode.kind !== 291 /* JsxFragment */; + return context.contextNode.kind !== 290 /* JsxElement */ && context.contextNode.kind !== 294 /* JsxFragment */; } function isJsxExpressionContext(context) { - return context.contextNode.kind === 297 /* JsxExpression */ || context.contextNode.kind === 296 /* JsxSpreadAttribute */; + return context.contextNode.kind === 300 /* JsxExpression */ || context.contextNode.kind === 299 /* JsxSpreadAttribute */; } function isNextTokenParentJsxAttribute(context) { - return context.nextTokenParent.kind === 294 /* JsxAttribute */; + return context.nextTokenParent.kind === 297 /* JsxAttribute */; } function isJsxAttributeContext(context) { - return context.contextNode.kind === 294 /* JsxAttribute */; + return context.contextNode.kind === 297 /* JsxAttribute */; } function isJsxSelfClosingElementContext(context) { - return context.contextNode.kind === 288 /* JsxSelfClosingElement */; + return context.contextNode.kind === 291 /* JsxSelfClosingElement */; } function isNotBeforeBlockInFunctionDeclarationContext(context) { return !isFunctionDeclContext(context) && !isBeforeBlockContext(context); @@ -150876,45 +151134,45 @@ function nodeIsInDecoratorContext(node) { while (node && isExpression(node)) { node = node.parent; } - return node && node.kind === 169 /* Decorator */; + return node && node.kind === 170 /* Decorator */; } function isStartOfVariableDeclarationList(context) { - return context.currentTokenParent.kind === 262 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; + return context.currentTokenParent.kind === 264 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; } function isNotFormatOnEnter(context) { return context.formattingRequestKind !== 2 /* FormatOnEnter */; } function isModuleDeclContext(context) { - return context.contextNode.kind === 270 /* ModuleDeclaration */; + return context.contextNode.kind === 273 /* ModuleDeclaration */; } function isObjectTypeContext(context) { - return context.contextNode.kind === 187 /* TypeLiteral */; + return context.contextNode.kind === 189 /* TypeLiteral */; } function isConstructorSignatureContext(context) { - return context.contextNode.kind === 180 /* ConstructSignature */; + return context.contextNode.kind === 182 /* ConstructSignature */; } function isTypeArgumentOrParameterOrAssertion(token, parent2) { if (token.kind !== 29 /* LessThanToken */ && token.kind !== 31 /* GreaterThanToken */) { return false; } switch (parent2.kind) { - case 183 /* TypeReference */: - case 216 /* TypeAssertionExpression */: - case 268 /* TypeAliasDeclaration */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 234 /* ExpressionWithTypeArguments */: + case 185 /* TypeReference */: + case 218 /* TypeAssertionExpression */: + case 271 /* TypeAliasDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 236 /* ExpressionWithTypeArguments */: return true; default: return false; @@ -150924,28 +151182,28 @@ function isTypeArgumentOrParameterOrAssertionContext(context) { return isTypeArgumentOrParameterOrAssertion(context.currentTokenSpan, context.currentTokenParent) || isTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); } function isTypeAssertionContext(context) { - return context.contextNode.kind === 216 /* TypeAssertionExpression */; + return context.contextNode.kind === 218 /* TypeAssertionExpression */; } function isVoidOpContext(context) { - return context.currentTokenSpan.kind === 115 /* VoidKeyword */ && context.currentTokenParent.kind === 223 /* VoidExpression */; + return context.currentTokenSpan.kind === 115 /* VoidKeyword */ && context.currentTokenParent.kind === 225 /* VoidExpression */; } function isYieldOrYieldStarWithOperand(context) { - return context.contextNode.kind === 230 /* YieldExpression */ && context.contextNode.expression !== void 0; + return context.contextNode.kind === 232 /* YieldExpression */ && context.contextNode.expression !== void 0; } function isNonNullAssertionContext(context) { - return context.contextNode.kind === 236 /* NonNullExpression */; + return context.contextNode.kind === 238 /* NonNullExpression */; } function isNotStatementConditionContext(context) { return !isStatementConditionContext(context); } function isStatementConditionContext(context) { switch (context.contextNode.kind) { - case 246 /* IfStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 248 /* IfStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return true; default: return false; @@ -150971,16 +151229,16 @@ function isSemicolonDeletionContext(context) { if (startLine === endLine) { return nextTokenKind === 19 /* CloseBraceToken */ || nextTokenKind === 1 /* EndOfFileToken */; } - if (nextTokenKind === 241 /* SemicolonClassElement */ || nextTokenKind === 26 /* SemicolonToken */) { + if (nextTokenKind === 243 /* SemicolonClassElement */ || nextTokenKind === 26 /* SemicolonToken */) { return false; } - if (context.contextNode.kind === 267 /* InterfaceDeclaration */ || context.contextNode.kind === 268 /* TypeAliasDeclaration */) { + if (context.contextNode.kind === 270 /* InterfaceDeclaration */ || context.contextNode.kind === 271 /* TypeAliasDeclaration */) { return !isPropertySignature(context.currentTokenParent) || !!context.currentTokenParent.type || nextTokenKind !== 20 /* OpenParenToken */; } if (isPropertyDeclaration(context.currentTokenParent)) { return !context.currentTokenParent.initializer; } - return context.currentTokenParent.kind !== 249 /* ForStatement */ && context.currentTokenParent.kind !== 243 /* EmptyStatement */ && context.currentTokenParent.kind !== 241 /* SemicolonClassElement */ && nextTokenKind !== 22 /* OpenBracketToken */ && nextTokenKind !== 20 /* OpenParenToken */ && nextTokenKind !== 39 /* PlusToken */ && nextTokenKind !== 40 /* MinusToken */ && nextTokenKind !== 43 /* SlashToken */ && nextTokenKind !== 13 /* RegularExpressionLiteral */ && nextTokenKind !== 27 /* CommaToken */ && nextTokenKind !== 229 /* TemplateExpression */ && nextTokenKind !== 15 /* TemplateHead */ && nextTokenKind !== 14 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 24 /* DotToken */; + return context.currentTokenParent.kind !== 251 /* ForStatement */ && context.currentTokenParent.kind !== 245 /* EmptyStatement */ && context.currentTokenParent.kind !== 243 /* SemicolonClassElement */ && nextTokenKind !== 22 /* OpenBracketToken */ && nextTokenKind !== 20 /* OpenParenToken */ && nextTokenKind !== 39 /* PlusToken */ && nextTokenKind !== 40 /* MinusToken */ && nextTokenKind !== 43 /* SlashToken */ && nextTokenKind !== 13 /* RegularExpressionLiteral */ && nextTokenKind !== 27 /* CommaToken */ && nextTokenKind !== 231 /* TemplateExpression */ && nextTokenKind !== 15 /* TemplateHead */ && nextTokenKind !== 14 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 24 /* DotToken */; } function isSemicolonInsertionContext(context) { return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile); @@ -151055,12 +151313,12 @@ function buildMap(rules) { return map2; } function getRuleBucketIndex(row, column) { - Debug.assert(row <= 164 /* LastKeyword */ && column <= 164 /* LastKeyword */, "Must compute formatting context from tokens"); + Debug.assert(row <= 165 /* LastKeyword */ && column <= 165 /* LastKeyword */, "Must compute formatting context from tokens"); return row * mapRowLength + column; } var maskBitSize = 5; var mask = 31; -var mapRowLength = 164 /* LastToken */ + 1; +var mapRowLength = 165 /* LastToken */ + 1; var RulesPosition = ((RulesPosition2) => { RulesPosition2[RulesPosition2["StopRulesSpecific"] = 0] = "StopRulesSpecific"; RulesPosition2[RulesPosition2["StopRulesAny"] = maskBitSize * 1] = "StopRulesAny"; @@ -151166,18 +151424,18 @@ function findOutermostNodeWithinListLevel(node) { } function isListElement(parent2, node) { switch (parent2.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: return rangeContainsRange(parent2.members, node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: const body = parent2.body; - return !!body && body.kind === 271 /* ModuleBlock */ && rangeContainsRange(body.statements, node); - case 314 /* SourceFile */: - case 242 /* Block */: - case 271 /* ModuleBlock */: + return !!body && body.kind === 274 /* ModuleBlock */ && rangeContainsRange(body.statements, node); + case 317 /* SourceFile */: + case 244 /* Block */: + case 274 /* ModuleBlock */: return rangeContainsRange(parent2.statements, node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return rangeContainsRange(parent2.block.statements, node); } return false; @@ -151391,26 +151649,26 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt return modifier.kind; } switch (node.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return 84 /* ClassKeyword */; - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return 85 /* StructKeyword */; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return 119 /* InterfaceKeyword */; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return 99 /* FunctionKeyword */; - case 269 /* EnumDeclaration */: - return 269 /* EnumDeclaration */; - case 177 /* GetAccessor */: + case 272 /* EnumDeclaration */: + return 272 /* EnumDeclaration */; + case 179 /* GetAccessor */: return 138 /* GetKeyword */; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return 152 /* SetKeyword */; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: if (node.asteriskToken) { return 41 /* AsteriskToken */; } - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: const name = getNameOfDeclaration(node); if (name) { return name.kind; @@ -151450,15 +151708,15 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt case 43 /* SlashToken */: case 31 /* GreaterThanToken */: switch (container.kind) { - case 289 /* JsxOpeningElement */: - case 290 /* JsxClosingElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 293 /* JsxClosingElement */: + case 291 /* JsxSelfClosingElement */: return false; } break; case 22 /* OpenBracketToken */: case 23 /* CloseBracketToken */: - if (container.kind !== 200 /* MappedType */) { + if (container.kind !== 202 /* MappedType */) { return false; } break; @@ -151542,11 +151800,11 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt return inheritedIndentation; } } - const effectiveParentStartLine = child.kind === 169 /* Decorator */ ? childStartLine : undecoratedParentStartLine; + const effectiveParentStartLine = child.kind === 170 /* 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 === 209 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { + if (isFirstListItem && parent2.kind === 211 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { inheritedIndentation = childIndentation.indentation; } return inheritedIndentation; @@ -151919,50 +152177,50 @@ function getRangeOfEnclosingComment(sourceFile, position, precedingToken, tokenA } function getOpenTokenForList(node, list) { switch (node.kind) { - case 176 /* Constructor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 219 /* ArrowFunction */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* Constructor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 221 /* ArrowFunction */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: if (node.typeParameters === list) { return 29 /* LessThanToken */; } else if (node.parameters === list) { return 20 /* OpenParenToken */; } break; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: if (node.typeArguments === list) { return 29 /* LessThanToken */; } else if (node.arguments === list) { return 20 /* OpenParenToken */; } break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: if (node.typeParameters === list) { return 29 /* LessThanToken */; } break; - case 183 /* TypeReference */: - case 215 /* TaggedTemplateExpression */: - case 186 /* TypeQuery */: - case 234 /* ExpressionWithTypeArguments */: - case 205 /* ImportType */: + case 185 /* TypeReference */: + case 217 /* TaggedTemplateExpression */: + case 188 /* TypeQuery */: + case 236 /* ExpressionWithTypeArguments */: + case 207 /* ImportType */: if (node.typeArguments === list) { return 29 /* LessThanToken */; } break; - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: return 18 /* OpenBraceToken */; } return 0 /* Unknown */; @@ -152045,11 +152303,11 @@ var SmartIndenter; } const lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line; const currentToken = getTokenAtPosition(sourceFile, position); - const isObjectLiteral = currentToken.kind === 18 /* OpenBraceToken */ && currentToken.parent.kind === 210 /* ObjectLiteralExpression */; + const isObjectLiteral = currentToken.kind === 18 /* OpenBraceToken */ && currentToken.parent.kind === 212 /* ObjectLiteralExpression */; if (options.indentStyle === 1 /* Block */ || isObjectLiteral) { return getBlockIndent(sourceFile, position, options); } - if (precedingToken.kind === 27 /* CommaToken */ && precedingToken.parent.kind !== 227 /* BinaryExpression */) { + if (precedingToken.kind === 27 /* CommaToken */ && precedingToken.parent.kind !== 229 /* BinaryExpression */) { const actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1 /* Unknown */) { return actualIndentation; @@ -152057,7 +152315,7 @@ var SmartIndenter; } const containerList = getListByPosition(position, precedingToken.parent, sourceFile); if (containerList && !rangeContainsRange(containerList, precedingToken)) { - const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; + const useTheSameBaseIndentation = [220 /* FunctionExpression */, 221 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize; return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize; } @@ -152166,7 +152424,7 @@ var SmartIndenter; } } function getActualIndentationForNode(current, parent2, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { - const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 314 /* SourceFile */ || !parentAndChildShareLine); + const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 317 /* SourceFile */ || !parentAndChildShareLine); if (!useActualIndentation) { return -1 /* Unknown */; } @@ -152204,7 +152462,7 @@ var SmartIndenter; } SmartIndenter2.isArgumentAndStartLineOverlapsExpressionBeingCalled = isArgumentAndStartLineOverlapsExpressionBeingCalled; function childStartsOnTheSameLineWithElseInIfStatement(parent2, child, childStartLine, sourceFile) { - if (parent2.kind === 246 /* IfStatement */ && parent2.elseStatement === child) { + if (parent2.kind === 248 /* IfStatement */ && parent2.elseStatement === child) { const elseKeyword = findChildOfKind(parent2, 92 /* ElseKeyword */, sourceFile); Debug.assert(elseKeyword !== void 0); const elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; @@ -152255,43 +152513,43 @@ var SmartIndenter; } function getListByRange(start, end, node, sourceFile) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return getList(node.typeArguments); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return getList(node.properties); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return getList(node.elements); - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: return getList(node.members); - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 176 /* Constructor */: - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 178 /* Constructor */: + case 187 /* ConstructorType */: + case 182 /* ConstructSignature */: return getList(node.typeParameters) || getList(node.parameters); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return getList(node.parameters); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 353 /* JSDocTemplateTag */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 356 /* JSDocTemplateTag */: return getList(node.typeParameters); - case 214 /* NewExpression */: - case 213 /* CallExpression */: + case 216 /* NewExpression */: + case 215 /* CallExpression */: return getList(node.typeArguments) || getList(node.arguments); - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return getList(node.declarations); - case 278 /* NamedImports */: - case 282 /* NamedExports */: + case 281 /* NamedImports */: + case 285 /* NamedExports */: return getList(node.elements); - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: return getList(node.elements); } function getList(list) { @@ -152314,7 +152572,7 @@ var SmartIndenter; return findColumnForFirstNonWhitespaceCharacterInLine(sourceFile.getLineAndCharacterOfPosition(list.pos), sourceFile, options); } function getActualIndentationForListItem(node, sourceFile, options, listIndentsChild) { - if (node.parent && node.parent.kind === 262 /* VariableDeclarationList */) { + if (node.parent && node.parent.kind === 264 /* VariableDeclarationList */) { return -1 /* Unknown */; } const containingList = getContainingList(node, sourceFile); @@ -152375,96 +152633,96 @@ var SmartIndenter; function nodeWillIndentChild(settings, parent2, child, sourceFile, indentByDefault) { const childKind = child ? child.kind : 0 /* Unknown */; switch (parent2.kind) { - case 245 /* ExpressionStatement */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 209 /* ArrayLiteralExpression */: - case 242 /* Block */: - case 271 /* ModuleBlock */: - case 210 /* ObjectLiteralExpression */: - case 187 /* TypeLiteral */: - case 200 /* MappedType */: - case 189 /* TupleType */: - case 272 /* CaseBlock */: - case 299 /* DefaultClause */: - case 298 /* CaseClause */: - case 217 /* ParenthesizedExpression */: - case 211 /* PropertyAccessExpression */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 244 /* VariableStatement */: - case 280 /* ExportAssignment */: - case 254 /* ReturnStatement */: - case 228 /* ConditionalExpression */: - case 207 /* ArrayBindingPattern */: - case 206 /* ObjectBindingPattern */: - case 289 /* JsxOpeningElement */: - case 292 /* JsxOpeningFragment */: - case 288 /* JsxSelfClosingElement */: - case 297 /* JsxExpression */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 168 /* Parameter */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 196 /* ParenthesizedType */: - case 215 /* TaggedTemplateExpression */: - case 224 /* AwaitExpression */: - case 282 /* NamedExports */: - case 278 /* NamedImports */: - case 284 /* ExportSpecifier */: - case 279 /* ImportSpecifier */: - case 171 /* PropertyDeclaration */: + case 247 /* ExpressionStatement */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 211 /* ArrayLiteralExpression */: + case 244 /* Block */: + case 274 /* ModuleBlock */: + case 212 /* ObjectLiteralExpression */: + case 189 /* TypeLiteral */: + case 202 /* MappedType */: + case 191 /* TupleType */: + case 275 /* CaseBlock */: + case 302 /* DefaultClause */: + case 301 /* CaseClause */: + case 219 /* ParenthesizedExpression */: + case 213 /* PropertyAccessExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 246 /* VariableStatement */: + case 283 /* ExportAssignment */: + case 256 /* ReturnStatement */: + case 230 /* ConditionalExpression */: + case 209 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 292 /* JsxOpeningElement */: + case 295 /* JsxOpeningFragment */: + case 291 /* JsxSelfClosingElement */: + case 300 /* JsxExpression */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 169 /* Parameter */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 198 /* ParenthesizedType */: + case 217 /* TaggedTemplateExpression */: + case 226 /* AwaitExpression */: + case 285 /* NamedExports */: + case 281 /* NamedImports */: + case 287 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 172 /* PropertyDeclaration */: return true; - case 261 /* VariableDeclaration */: - case 305 /* PropertyAssignment */: - case 227 /* BinaryExpression */: - if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 210 /* ObjectLiteralExpression */) { + case 263 /* VariableDeclaration */: + case 308 /* PropertyAssignment */: + case 229 /* BinaryExpression */: + if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 212 /* ObjectLiteralExpression */) { return rangeIsOnOneLine(sourceFile, child); } - if (parent2.kind === 227 /* BinaryExpression */ && sourceFile && child && childKind === 287 /* JsxElement */) { + if (parent2.kind === 229 /* BinaryExpression */ && sourceFile && child && childKind === 290 /* 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 !== 227 /* BinaryExpression */) { + if (parent2.kind !== 229 /* BinaryExpression */) { return true; } break; - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 249 /* ForStatement */: - case 246 /* IfStatement */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return childKind !== 242 /* Block */; - case 219 /* ArrowFunction */: - if (sourceFile && childKind === 217 /* ParenthesizedExpression */) { + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 251 /* ForStatement */: + case 248 /* IfStatement */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + return childKind !== 244 /* Block */; + case 221 /* ArrowFunction */: + if (sourceFile && childKind === 219 /* ParenthesizedExpression */) { return rangeIsOnOneLine(sourceFile, child); } - return childKind !== 242 /* Block */; - case 281 /* ExportDeclaration */: - return childKind !== 282 /* NamedExports */; - case 275 /* ImportDeclaration */: - return childKind !== 276 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 278 /* NamedImports */; - case 287 /* JsxElement */: - return childKind !== 290 /* JsxClosingElement */; - case 291 /* JsxFragment */: - return childKind !== 293 /* JsxClosingFragment */; - case 193 /* IntersectionType */: - case 192 /* UnionType */: - if (childKind === 187 /* TypeLiteral */ || childKind === 189 /* TupleType */) { + return childKind !== 244 /* Block */; + case 284 /* ExportDeclaration */: + return childKind !== 285 /* NamedExports */; + case 278 /* ImportDeclaration */: + return childKind !== 279 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 281 /* NamedImports */; + case 290 /* JsxElement */: + return childKind !== 293 /* JsxClosingElement */; + case 294 /* JsxFragment */: + return childKind !== 296 /* JsxClosingFragment */; + case 195 /* IntersectionType */: + case 194 /* UnionType */: + if (childKind === 189 /* TypeLiteral */ || childKind === 191 /* TupleType */) { return false; } break; @@ -152474,11 +152732,11 @@ var SmartIndenter; SmartIndenter2.nodeWillIndentChild = nodeWillIndentChild; function isControlFlowEndingStatement(kind, parent2) { switch (kind) { - case 254 /* ReturnStatement */: - case 258 /* ThrowStatement */: - case 252 /* ContinueStatement */: - case 253 /* BreakStatement */: - return parent2.kind !== 242 /* Block */; + case 256 /* ReturnStatement */: + case 260 /* ThrowStatement */: + case 254 /* ContinueStatement */: + case 255 /* BreakStatement */: + return parent2.kind !== 244 /* Block */; default: return false; } @@ -154280,6 +154538,9 @@ __export(ts_exports3, { isOptionalTypeNode: () => isOptionalTypeNode, isOuterExpression: () => isOuterExpression, isOutermostOptionalChain: () => isOutermostOptionalChain, + isOverloadDeclaration: () => isOverloadDeclaration, + isOverloadElement: () => isOverloadElement, + isOverloadPropertyDeclaration: () => isOverloadPropertyDeclaration, isOverrideModifier: () => isOverrideModifier, isPackedArrayLiteral: () => isPackedArrayLiteral, isParameter: () => isParameter, @@ -155613,7 +155874,7 @@ var createLogicalNot = Debug.deprecate(function createLogicalNot2(operand) { }, factoryDeprecation); var createNode2 = Debug.deprecate(function createNode3(kind, pos = 0, end = 0) { return setTextRangePosEnd( - kind === 314 /* SourceFile */ ? parseBaseNodeFactory.createBaseSourceFileNode(kind) : kind === 79 /* Identifier */ ? parseBaseNodeFactory.createBaseIdentifierNode(kind) : kind === 80 /* PrivateIdentifier */ ? parseBaseNodeFactory.createBasePrivateIdentifierNode(kind) : !isNodeKind(kind) ? parseBaseNodeFactory.createBaseTokenNode(kind) : parseBaseNodeFactory.createBaseNode(kind), + kind === 317 /* SourceFile */ ? parseBaseNodeFactory.createBaseSourceFileNode(kind) : kind === 79 /* Identifier */ ? parseBaseNodeFactory.createBaseIdentifierNode(kind) : kind === 80 /* PrivateIdentifier */ ? parseBaseNodeFactory.createBasePrivateIdentifierNode(kind) : !isNodeKind(kind) ? parseBaseNodeFactory.createBaseTokenNode(kind) : parseBaseNodeFactory.createBaseNode(kind), pos, end ); @@ -155627,7 +155888,7 @@ var getMutableClone = Debug.deprecate(function getMutableClone2(node) { // src/deprecatedCompat/4.0/renamedNodeTests.ts var isTypeAssertion = Debug.deprecate(function isTypeAssertion2(node) { - return node.kind === 216 /* TypeAssertionExpression */; + return node.kind === 218 /* TypeAssertionExpression */; }, { since: "4.0", warnAfter: "4.1", @@ -163807,7 +164068,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter } const initialNode = getTouchingPropertyName(program.getSourceFile(file), position); const symbol = program.getTypeChecker().getSymbolAtLocation(initialNode); - const importSpecifier = symbol && getDeclarationOfKind(symbol, 279 /* ImportSpecifier */); + const importSpecifier = symbol && getDeclarationOfKind(symbol, 282 /* ImportSpecifier */); if (!importSpecifier) return void 0; const nameToSearch = ((_a3 = importSpecifier.propertyName) == null ? void 0 : _a3.text) || importSpecifier.name.text; @@ -166413,7 +166674,7 @@ function unwrapParenthesizedType(tsType) { function findParentIf(asExpr) { let node = asExpr.parent; while (node) { - if (node.kind === 246 /* IfStatement */) { + if (node.kind === 248 /* IfStatement */) { return node; } node = node.parent; @@ -166489,14 +166750,14 @@ function clearTrueSymbolAtLocationCache() { trueSymbolAtLocationCache.clear(); } function isTypeDeclSyntaxKind(kind) { - return isStructDeclarationKind(kind) || kind === 269 /* EnumDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */; + return isStructDeclarationKind(kind) || kind === 272 /* EnumDeclaration */ || kind === 266 /* ClassDeclaration */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */; } function symbolHasDuplicateName(symbol, tsDeclKind) { const symbolDecls = symbol == null ? void 0 : symbol.getDeclarations(); if (symbolDecls) { for (const symDecl of symbolDecls) { const declKind = symDecl.kind; - const isNamespaceTypeCollision = isTypeDeclSyntaxKind(declKind) && tsDeclKind === 270 /* ModuleDeclaration */ || isTypeDeclSyntaxKind(tsDeclKind) && declKind === 270 /* ModuleDeclaration */; + const isNamespaceTypeCollision = isTypeDeclSyntaxKind(declKind) && tsDeclKind === 273 /* ModuleDeclaration */ || isTypeDeclSyntaxKind(tsDeclKind) && declKind === 273 /* ModuleDeclaration */; if (declKind !== 79 /* Identifier */ && declKind !== tsDeclKind && !isNamespaceTypeCollision) return true; } @@ -166608,12 +166869,12 @@ function isCompileTimeExpression(tsExpr) { return isCompileTimeExpression(tsExpr.expression); } switch (tsExpr.kind) { - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return isPrefixUnaryExprValidEnumMemberInit(tsExpr); - case 217 /* ParenthesizedExpression */: - case 227 /* BinaryExpression */: + case 219 /* ParenthesizedExpression */: + case 229 /* BinaryExpression */: return isBinaryExprValidEnumMemberInit(tsExpr); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isConditionalExprValidEnumMemberInit(tsExpr); case 79 /* Identifier */: return isIdentifierValidEnumMemberInit(tsExpr); @@ -166621,7 +166882,7 @@ function isCompileTimeExpression(tsExpr) { return true; case 10 /* StringLiteral */: return true; - case 211 /* PropertyAccessExpression */: { + case 213 /* PropertyAccessExpression */: { const propertyAccess = tsExpr; if (isNumberConstantValue(propertyAccess)) { return true; @@ -166652,7 +166913,7 @@ function isConditionalExprValidEnumMemberInit(tsExpr) { function isIdentifierValidEnumMemberInit(tsExpr) { const tsSymbol = typeChecker.getSymbolAtLocation(tsExpr); const tsDecl = getDeclaration2(tsSymbol); - return !!tsDecl && (isVarDeclaration(tsDecl) && isConst(tsDecl.parent) || tsDecl.kind === 308 /* EnumMember */); + return !!tsDecl && (isVarDeclaration(tsDecl) && isConst(tsDecl.parent) || tsDecl.kind === 311 /* EnumMember */); } function isUnaryOpAllowedForEnumMemberInit(tsPrefixUnaryOp) { return tsPrefixUnaryOp === 39 /* PlusToken */ || tsPrefixUnaryOp === 40 /* MinusToken */ || tsPrefixUnaryOp === 54 /* TildeToken */; @@ -166829,7 +167090,7 @@ function validateObjectLiteralType(type) { return type !== void 0 && type.isClassOrInterface() && hasDefaultCtor(type) && !hasReadonlyFields(type) && !isAbstractClass(type); } function isStructDeclarationKind(kind) { - return kind === 265 /* StructDeclaration */; + return kind === 267 /* StructDeclaration */; } function isStructDeclaration2(node) { return isStructDeclarationKind(node.kind); @@ -166998,7 +167259,7 @@ function validateFields(type, objectLiteral) { return true; } function isSupportedTypeNodeKind(kind) { - return kind !== 132 /* AnyKeyword */ && kind !== 159 /* UnknownKeyword */ && kind !== 154 /* SymbolKeyword */ && kind !== 199 /* IndexedAccessType */ && kind !== 194 /* ConditionalType */ && kind !== 200 /* MappedType */ && kind !== 195 /* InferType */; + return kind !== 132 /* AnyKeyword */ && kind !== 159 /* UnknownKeyword */ && kind !== 154 /* SymbolKeyword */ && kind !== 201 /* IndexedAccessType */ && kind !== 196 /* ConditionalType */ && kind !== 202 /* MappedType */ && kind !== 197 /* InferType */; } function isSupportedType(typeNode) { if (isParenthesizedTypeNode(typeNode)) @@ -167999,28 +168260,28 @@ LinterConfig.terminalTokens = new Set2([ LinterConfig.incrementOnlyTokens = new Map2([ [132 /* AnyKeyword */, 0 /* AnyType */], [154 /* SymbolKeyword */, 1 /* SymbolType */], - [197 /* ThisType */, 56 /* ThisType */], - [186 /* TypeQuery */, 6 /* TypeQuery */], - [221 /* DeleteExpression */, 33 /* DeleteOperator */], + [199 /* ThisType */, 56 /* ThisType */], + [188 /* TypeQuery */, 6 /* TypeQuery */], + [223 /* DeleteExpression */, 33 /* DeleteOperator */], [13 /* RegularExpressionLiteral */, 7 /* RegexLiteral */], - [182 /* TypePredicate */, 8 /* IsOperator */], - [230 /* YieldExpression */, 10 /* YieldExpression */], - [181 /* IndexSignature */, 14 /* IndexMember */], - [255 /* WithStatement */, 15 /* WithStatement */], - [199 /* IndexedAccessType */, 17 /* IndexedAccessType */], + [184 /* TypePredicate */, 8 /* IsOperator */], + [232 /* YieldExpression */, 10 /* YieldExpression */], + [183 /* IndexSignature */, 14 /* IndexMember */], + [257 /* WithStatement */, 15 /* WithStatement */], + [201 /* IndexedAccessType */, 17 /* IndexedAccessType */], [159 /* UnknownKeyword */, 18 /* UnknownType */], [102 /* InKeyword */, 20 /* InOperator */], - [179 /* CallSignature */, 39 /* CallSignature */], - [193 /* IntersectionType */, 23 /* IntersectionType */], - [187 /* TypeLiteral */, 24 /* ObjectTypeLiteral */], - [185 /* ConstructorType */, 38 /* ConstructorFuncs */], + [181 /* CallSignature */, 39 /* CallSignature */], + [195 /* IntersectionType */, 23 /* IntersectionType */], + [189 /* TypeLiteral */, 24 /* ObjectTypeLiteral */], + [187 /* ConstructorType */, 38 /* ConstructorFuncs */], [80 /* PrivateIdentifier */, 41 /* PrivateIdentifier */], - [194 /* ConditionalType */, 43 /* ConditionalType */], - [200 /* MappedType */, 44 /* MappedType */], - [287 /* JsxElement */, 51 /* JsxElement */], - [288 /* JsxSelfClosingElement */, 51 /* JsxElement */], - [274 /* ImportEqualsDeclaration */, 61 /* ImportAssignment */], - [273 /* NamespaceExportDeclaration */, 67 /* UMDModuleDefinition */] + [196 /* ConditionalType */, 43 /* ConditionalType */], + [202 /* MappedType */, 44 /* MappedType */], + [290 /* JsxElement */, 51 /* JsxElement */], + [291 /* JsxSelfClosingElement */, 51 /* JsxElement */], + [277 /* ImportEqualsDeclaration */, 61 /* ImportAssignment */], + [276 /* NamespaceExportDeclaration */, 67 /* UMDModuleDefinition */] ]); // src/linter/ArkTSLinter_1_0/TypeScriptLinter.ts @@ -168029,53 +168290,53 @@ var _TypeScriptLinter = class { this.sourceFile = sourceFile; this.tscStrictDiagnostics = tscStrictDiagnostics; this.handlersMap = new Map2([ - [210 /* ObjectLiteralExpression */, this.handleObjectLiteralExpression], - [209 /* ArrayLiteralExpression */, this.handleArrayLiteralExpression], - [168 /* Parameter */, this.handleParameter], - [269 /* EnumDeclaration */, this.handleEnumDeclaration], - [267 /* InterfaceDeclaration */, this.handleInterfaceDeclaration], - [258 /* ThrowStatement */, this.handleThrowStatement], - [276 /* ImportClause */, this.handleImportClause], - [249 /* ForStatement */, this.handleForStatement], - [250 /* ForInStatement */, this.handleForInStatement], - [251 /* ForOfStatement */, this.handleForOfStatement], - [275 /* ImportDeclaration */, this.handleImportDeclaration], - [211 /* PropertyAccessExpression */, this.handlePropertyAccessExpression], - [171 /* PropertyDeclaration */, this.handlePropertyAssignmentOrDeclaration], - [305 /* PropertyAssignment */, this.handlePropertyAssignmentOrDeclaration], - [218 /* FunctionExpression */, this.handleFunctionExpression], - [219 /* ArrowFunction */, this.handleArrowFunction], - [232 /* ClassExpression */, this.handleClassExpression], - [301 /* CatchClause */, this.handleCatchClause], - [263 /* FunctionDeclaration */, this.handleFunctionDeclaration], - [225 /* PrefixUnaryExpression */, this.handlePrefixUnaryExpression], - [227 /* BinaryExpression */, this.handleBinaryExpression], - [262 /* VariableDeclarationList */, this.handleVariableDeclarationList], - [261 /* VariableDeclaration */, this.handleVariableDeclaration], - [264 /* ClassDeclaration */, this.handleClassDeclaration], - [270 /* ModuleDeclaration */, this.handleModuleDeclaration], - [268 /* TypeAliasDeclaration */, this.handleTypeAliasDeclaration], - [279 /* ImportSpecifier */, this.handleImportSpecifier], - [277 /* NamespaceImport */, this.handleNamespaceImport], - [216 /* TypeAssertionExpression */, this.handleTypeAssertionExpression], - [174 /* MethodDeclaration */, this.handleMethodDeclaration], + [212 /* ObjectLiteralExpression */, this.handleObjectLiteralExpression], + [211 /* ArrayLiteralExpression */, this.handleArrayLiteralExpression], + [169 /* Parameter */, this.handleParameter], + [272 /* EnumDeclaration */, this.handleEnumDeclaration], + [270 /* InterfaceDeclaration */, this.handleInterfaceDeclaration], + [260 /* ThrowStatement */, this.handleThrowStatement], + [279 /* ImportClause */, this.handleImportClause], + [251 /* ForStatement */, this.handleForStatement], + [252 /* ForInStatement */, this.handleForInStatement], + [253 /* ForOfStatement */, this.handleForOfStatement], + [278 /* ImportDeclaration */, this.handleImportDeclaration], + [213 /* PropertyAccessExpression */, this.handlePropertyAccessExpression], + [172 /* PropertyDeclaration */, this.handlePropertyAssignmentOrDeclaration], + [308 /* PropertyAssignment */, this.handlePropertyAssignmentOrDeclaration], + [220 /* FunctionExpression */, this.handleFunctionExpression], + [221 /* ArrowFunction */, this.handleArrowFunction], + [234 /* ClassExpression */, this.handleClassExpression], + [304 /* CatchClause */, this.handleCatchClause], + [265 /* FunctionDeclaration */, this.handleFunctionDeclaration], + [227 /* PrefixUnaryExpression */, this.handlePrefixUnaryExpression], + [229 /* BinaryExpression */, this.handleBinaryExpression], + [264 /* VariableDeclarationList */, this.handleVariableDeclarationList], + [263 /* VariableDeclaration */, this.handleVariableDeclaration], + [266 /* ClassDeclaration */, this.handleClassDeclaration], + [273 /* ModuleDeclaration */, this.handleModuleDeclaration], + [271 /* TypeAliasDeclaration */, this.handleTypeAliasDeclaration], + [282 /* ImportSpecifier */, this.handleImportSpecifier], + [280 /* NamespaceImport */, this.handleNamespaceImport], + [218 /* TypeAssertionExpression */, this.handleTypeAssertionExpression], + [176 /* MethodDeclaration */, this.handleMethodDeclaration], [79 /* Identifier */, this.handleIdentifier], - [212 /* ElementAccessExpression */, this.handleElementAccessExpression], - [308 /* EnumMember */, this.handleEnumMember], - [183 /* TypeReference */, this.handleTypeReference], - [280 /* ExportAssignment */, this.handleExportAssignment], - [213 /* CallExpression */, this.handleCallExpression], - [237 /* MetaProperty */, this.handleMetaProperty], - [214 /* NewExpression */, this.handleNewExpression], - [235 /* AsExpression */, this.handleAsExpression], - [231 /* SpreadElement */, this.handleSpreadOp], - [307 /* SpreadAssignment */, this.handleSpreadOp], - [177 /* GetAccessor */, this.handleGetAccessor], - [178 /* SetAccessor */, this.handleSetAccessor], - [180 /* ConstructSignature */, this.handleConstructSignature], - [234 /* ExpressionWithTypeArguments */, this.handleExpressionWithTypeArguments], - [166 /* ComputedPropertyName */, this.handleComputedPropertyName], - [175 /* ClassStaticBlockDeclaration */, this.handleClassStaticBlockDeclaration] + [214 /* ElementAccessExpression */, this.handleElementAccessExpression], + [311 /* EnumMember */, this.handleEnumMember], + [185 /* TypeReference */, this.handleTypeReference], + [283 /* ExportAssignment */, this.handleExportAssignment], + [215 /* CallExpression */, this.handleCallExpression], + [239 /* MetaProperty */, this.handleMetaProperty], + [216 /* NewExpression */, this.handleNewExpression], + [237 /* AsExpression */, this.handleAsExpression], + [233 /* SpreadElement */, this.handleSpreadOp], + [310 /* SpreadAssignment */, this.handleSpreadOp], + [179 /* GetAccessor */, this.handleGetAccessor], + [180 /* SetAccessor */, this.handleSetAccessor], + [182 /* ConstructSignature */, this.handleConstructSignature], + [236 /* ExpressionWithTypeArguments */, this.handleExpressionWithTypeArguments], + [167 /* ComputedPropertyName */, this.handleComputedPropertyName], + [177 /* ClassStaticBlockDeclaration */, this.handleClassStaticBlockDeclaration] ]); this.validatedTypesSet = new Set2(); _TypeScriptLinter.tsTypeChecker = tsProgram.getLinterTypeChecker(); @@ -168304,28 +168565,28 @@ var _TypeScriptLinter = class { if (!p.declarations) continue; const decl = p.declarations[0]; - if (decl.kind === 173 /* MethodSignature */) { + if (decl.kind === 175 /* MethodSignature */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 174 /* MethodDeclaration */) { + } else if (decl.kind === 176 /* MethodDeclaration */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 171 /* PropertyDeclaration */) { + } else if (decl.kind === 172 /* PropertyDeclaration */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 170 /* PropertySignature */) { + } else if (decl.kind === 171 /* PropertySignature */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, @@ -168353,7 +168614,7 @@ var _TypeScriptLinter = class { let noContextTypeForArrayLiteral = false; const arrayLitElements = arrayLitNode.elements; for (const element of arrayLitElements) { - if (element.kind === 210 /* ObjectLiteralExpression */) { + if (element.kind === 212 /* ObjectLiteralExpression */) { const objectLiteralType = _TypeScriptLinter.tsTypeChecker.getContextualType(element); if (!isDynamicLiteralInitializer(arrayLitNode) && !isExpressionAssignableToType(objectLiteralType, element)) { noContextTypeForArrayLiteral = true; @@ -168388,7 +168649,7 @@ var _TypeScriptLinter = class { return; let enumDeclCount = 0; for (const decl of enumDecls) { - if (decl.kind === 269 /* EnumDeclaration */) + if (decl.kind === 272 /* EnumDeclaration */) enumDeclCount++; } if (enumDeclCount > 1) @@ -168401,7 +168662,7 @@ var _TypeScriptLinter = class { if (iDecls) { let iDeclCount = 0; for (const decl of iDecls) { - if (decl.kind === 267 /* InterfaceDeclaration */) + if (decl.kind === 270 /* InterfaceDeclaration */) iDeclCount++; } if (iDeclCount > 1) @@ -168747,11 +169008,11 @@ var _TypeScriptLinter = class { } else if (tsBinaryExpr.operatorToken.kind === 27 /* CommaToken */) { let tsExprNode = tsBinaryExpr; let tsParentNode = tsExprNode.parent; - while (tsParentNode && tsParentNode.kind === 227 /* BinaryExpression */) { + while (tsParentNode && tsParentNode.kind === 229 /* BinaryExpression */) { tsExprNode = tsParentNode; tsParentNode = tsExprNode.parent; } - if (tsParentNode && tsParentNode.kind === 249 /* ForStatement */) { + if (tsParentNode && tsParentNode.kind === 251 /* ForStatement */) { const tsForNode = tsParentNode; if (tsExprNode === tsForNode.initializer || tsExprNode === tsForNode.incrementor) return; @@ -168890,15 +169151,15 @@ var _TypeScriptLinter = class { if (isModuleBlock(tsModuleBody)) { for (const tsModuleStmt of tsModuleBody.statements) { switch (tsModuleStmt.kind) { - case 244 /* VariableStatement */: - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 281 /* ExportDeclaration */: + case 246 /* VariableStatement */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 284 /* ExportDeclaration */: break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: break; default: this.incrementCounters(tsModuleStmt, 47 /* NonDeclarationInNamespace */); @@ -169020,7 +169281,7 @@ var _TypeScriptLinter = class { handleRestrictedValues(tsIdentifier, tsIdentSym) { const illegalValues = 128 /* ConstEnum */ | 256 /* RegularEnum */ | 512 /* ValueModule */ | 32 /* Class */; if ((tsIdentSym.flags & 512 /* ValueModule */) !== 0) { - if (!!tsIdentSym && symbolHasDuplicateName(tsIdentSym, 270 /* ModuleDeclaration */)) { + if (!!tsIdentSym && symbolHasDuplicateName(tsIdentSym, 273 /* ModuleDeclaration */)) { return; } } @@ -169146,7 +169407,7 @@ var _TypeScriptLinter = class { } handleGenericCallWithNoTypeArgs(callLikeExpr, callSignature) { var _a2, _b; - const tsSyntaxKind = isNewExpression(callLikeExpr) ? 176 /* Constructor */ : 263 /* FunctionDeclaration */; + const tsSyntaxKind = isNewExpression(callLikeExpr) ? 178 /* Constructor */ : 265 /* FunctionDeclaration */; const signDecl = _TypeScriptLinter.tsTypeChecker.signatureToSignatureDeclaration( callSignature, tsSyntaxKind, @@ -169339,10 +169600,10 @@ var _TypeScriptLinter = class { } handleConstructSignature(node) { switch (node.parent.kind) { - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: this.incrementCounters(node, 36 /* ConstructorType */); break; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: this.incrementCounters(node, 37 /* ConstructorIface */); break; default: @@ -170664,13 +170925,13 @@ var SENDABLE_DECORATOR = "Sendable"; var SENDABLE_INTERFACE = "ISendable"; var PROMISE = "Promise"; var SENDABLE_DECORATOR_NODES = [ - 264 /* ClassDeclaration */, - 263 /* FunctionDeclaration */, - 268 /* TypeAliasDeclaration */ + 266 /* ClassDeclaration */, + 265 /* FunctionDeclaration */, + 271 /* TypeAliasDeclaration */ ]; var SENDABLE_CLOSURE_DECLS = [ - 264 /* ClassDeclaration */, - 263 /* FunctionDeclaration */ + 266 /* ClassDeclaration */, + 265 /* FunctionDeclaration */ ]; var ARKTS_COLLECTIONS_D_ETS = "@arkts.collections.d.ets"; var COLLECTIONS_NAMESPACE = "collections"; @@ -170756,7 +171017,7 @@ function getInstanceofUnsupportedHighlightRange(nodeOrComment) { return getKeywordHighlightRange(nodeOrComment.operatorToken, "instanceof"); } function getConstAssertionHighlightRange(nodeOrComment) { - if (nodeOrComment.kind === 235 /* AsExpression */) { + if (nodeOrComment.kind === 237 /* AsExpression */) { return [ nodeOrComment.expression.getEnd() + 1, nodeOrComment.type.getStart() - 1 @@ -170769,11 +171030,11 @@ function getConstAssertionHighlightRange(nodeOrComment) { } function getLimitedReturnTypeInferenceHighlightRange(nodeOrComment) { let node; - if (nodeOrComment.kind === 218 /* FunctionExpression */) { + if (nodeOrComment.kind === 220 /* FunctionExpression */) { node = nodeOrComment.type; - } else if (nodeOrComment.kind === 263 /* FunctionDeclaration */) { + } else if (nodeOrComment.kind === 265 /* FunctionDeclaration */) { node = nodeOrComment.name; - } else if (nodeOrComment.kind === 174 /* MethodDeclaration */) { + } else if (nodeOrComment.kind === 176 /* MethodDeclaration */) { node = nodeOrComment.name; } if (node !== void 0) { @@ -170872,7 +171133,7 @@ function unwrapParenthesizedType2(tsType) { function findParentIf2(asExpr) { let node = asExpr.parent; while (node) { - if (node.kind === 246 /* IfStatement */) { + if (node.kind === 248 /* IfStatement */) { return node; } node = node.parent; @@ -170950,14 +171211,14 @@ function clearTrueSymbolAtLocationCache2() { trueSymbolAtLocationCache2.clear(); } function isTypeDeclSyntaxKind2(kind) { - return isStructDeclarationKind2(kind) || kind === 269 /* EnumDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */; + return isStructDeclarationKind2(kind) || kind === 272 /* EnumDeclaration */ || kind === 266 /* ClassDeclaration */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */; } function symbolHasDuplicateName2(symbol, tsDeclKind) { const symbolDecls = symbol == null ? void 0 : symbol.getDeclarations(); if (symbolDecls) { for (const symDecl of symbolDecls) { const declKind = symDecl.kind; - const isNamespaceTypeCollision = isTypeDeclSyntaxKind2(declKind) && tsDeclKind === 270 /* ModuleDeclaration */ || isTypeDeclSyntaxKind2(tsDeclKind) && declKind === 270 /* ModuleDeclaration */; + const isNamespaceTypeCollision = isTypeDeclSyntaxKind2(declKind) && tsDeclKind === 273 /* ModuleDeclaration */ || isTypeDeclSyntaxKind2(tsDeclKind) && declKind === 273 /* ModuleDeclaration */; if (declKind !== 79 /* Identifier */ && declKind !== tsDeclKind && !isNamespaceTypeCollision) return true; } @@ -171120,12 +171381,12 @@ function isCompileTimeExpression2(tsExpr) { return isCompileTimeExpression2(tsExpr.expression); } switch (tsExpr.kind) { - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return isPrefixUnaryExprValidEnumMemberInit2(tsExpr); - case 217 /* ParenthesizedExpression */: - case 227 /* BinaryExpression */: + case 219 /* ParenthesizedExpression */: + case 229 /* BinaryExpression */: return isBinaryExprValidEnumMemberInit2(tsExpr); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isConditionalExprValidEnumMemberInit2(tsExpr); case 79 /* Identifier */: return isIdentifierValidEnumMemberInit2(tsExpr); @@ -171133,7 +171394,7 @@ function isCompileTimeExpression2(tsExpr) { return true; case 10 /* StringLiteral */: return true; - case 211 /* PropertyAccessExpression */: { + case 213 /* PropertyAccessExpression */: { const propertyAccess = tsExpr; if (isNumberConstantValue2(propertyAccess)) { return true; @@ -171164,7 +171425,7 @@ function isConditionalExprValidEnumMemberInit2(tsExpr) { function isIdentifierValidEnumMemberInit2(tsExpr) { const tsSymbol = typeChecker2.getSymbolAtLocation(tsExpr); const tsDecl = getDeclaration3(tsSymbol); - return !!tsDecl && (isVarDeclaration2(tsDecl) && isConst2(tsDecl.parent) || tsDecl.kind === 308 /* EnumMember */); + return !!tsDecl && (isVarDeclaration2(tsDecl) && isConst2(tsDecl.parent) || tsDecl.kind === 311 /* EnumMember */); } function isUnaryOpAllowedForEnumMemberInit2(tsPrefixUnaryOp) { return tsPrefixUnaryOp === 39 /* PlusToken */ || tsPrefixUnaryOp === 40 /* MinusToken */ || tsPrefixUnaryOp === 54 /* TildeToken */; @@ -171407,7 +171668,7 @@ function validateObjectLiteralType2(type) { return type !== void 0 && type.isClassOrInterface() && hasDefaultCtor2(type) && !hasReadonlyFields2(type) && !isAbstractClass2(type); } function isStructDeclarationKind2(kind) { - return kind === 265 /* StructDeclaration */; + return kind === 267 /* StructDeclaration */; } function isStructDeclaration3(node) { return isStructDeclarationKind2(node.kind); @@ -171544,7 +171805,7 @@ function validateField(type, prop) { return true; } function isSupportedTypeNodeKind2(kind) { - return kind !== 132 /* AnyKeyword */ && kind !== 159 /* UnknownKeyword */ && kind !== 154 /* SymbolKeyword */ && kind !== 199 /* IndexedAccessType */ && kind !== 194 /* ConditionalType */ && kind !== 200 /* MappedType */ && kind !== 195 /* InferType */; + return kind !== 132 /* AnyKeyword */ && kind !== 159 /* UnknownKeyword */ && kind !== 154 /* SymbolKeyword */ && kind !== 201 /* IndexedAccessType */ && kind !== 196 /* ConditionalType */ && kind !== 202 /* MappedType */ && kind !== 197 /* InferType */; } function isSupportedType2(typeNode) { if (isParenthesizedTypeNode(typeNode)) @@ -172312,7 +172573,7 @@ function getDecoratorsIfInSendableClass(declaration) { return getDecorators(declaration); } function getClassNodeFromDeclaration(declaration) { - if (declaration.kind === 168 /* Parameter */) { + if (declaration.kind === 169 /* Parameter */) { return isClassDeclaration(declaration.parent.parent) ? declaration.parent.parent : void 0; } return isClassDeclaration(declaration.parent) ? declaration.parent : void 0; @@ -172888,26 +173149,26 @@ LinterConfig2.terminalTokens = new Set2([ LinterConfig2.incrementOnlyTokens = new Map2([ [132 /* AnyKeyword */, 0 /* AnyType */], [154 /* SymbolKeyword */, 1 /* SymbolType */], - [197 /* ThisType */, 53 /* ThisType */], - [186 /* TypeQuery */, 6 /* TypeQuery */], - [221 /* DeleteExpression */, 30 /* DeleteOperator */], - [182 /* TypePredicate */, 7 /* IsOperator */], - [230 /* YieldExpression */, 9 /* YieldExpression */], - [255 /* WithStatement */, 14 /* WithStatement */], - [199 /* IndexedAccessType */, 16 /* IndexedAccessType */], + [199 /* ThisType */, 53 /* ThisType */], + [188 /* TypeQuery */, 6 /* TypeQuery */], + [223 /* DeleteExpression */, 30 /* DeleteOperator */], + [184 /* TypePredicate */, 7 /* IsOperator */], + [232 /* YieldExpression */, 9 /* YieldExpression */], + [257 /* WithStatement */, 14 /* WithStatement */], + [201 /* IndexedAccessType */, 16 /* IndexedAccessType */], [159 /* UnknownKeyword */, 17 /* UnknownType */], - [179 /* CallSignature */, 36 /* CallSignature */], - [193 /* IntersectionType */, 21 /* IntersectionType */], - [187 /* TypeLiteral */, 22 /* ObjectTypeLiteral */], - [185 /* ConstructorType */, 35 /* ConstructorFuncs */], + [181 /* CallSignature */, 36 /* CallSignature */], + [195 /* IntersectionType */, 21 /* IntersectionType */], + [189 /* TypeLiteral */, 22 /* ObjectTypeLiteral */], + [187 /* ConstructorType */, 35 /* ConstructorFuncs */], [80 /* PrivateIdentifier */, 38 /* PrivateIdentifier */], - [194 /* ConditionalType */, 40 /* ConditionalType */], - [200 /* MappedType */, 41 /* MappedType */], - [287 /* JsxElement */, 48 /* JsxElement */], - [288 /* JsxSelfClosingElement */, 48 /* JsxElement */], - [274 /* ImportEqualsDeclaration */, 57 /* ImportAssignment */], - [273 /* NamespaceExportDeclaration */, 63 /* UMDModuleDefinition */], - [232 /* ClassExpression */, 25 /* ClassExpression */] + [196 /* ConditionalType */, 40 /* ConditionalType */], + [202 /* MappedType */, 41 /* MappedType */], + [290 /* JsxElement */, 48 /* JsxElement */], + [291 /* JsxSelfClosingElement */, 48 /* JsxElement */], + [277 /* ImportEqualsDeclaration */, 57 /* ImportAssignment */], + [276 /* NamespaceExportDeclaration */, 63 /* UMDModuleDefinition */], + [234 /* ClassExpression */, 25 /* ClassExpression */] ]); // src/linter/ArkTSLinter_1_1/TypeScriptLinter.ts @@ -172918,60 +173179,60 @@ var _TypeScriptLinter2 = class { this.compatibleSdkVersionStage = "beta1"; this.compatibleSdkVersion = 12; this.handlersMap = new Map2([ - [210 /* ObjectLiteralExpression */, { handler: this.handleObjectLiteralExpression, name: "handleObjectLiteralExpression" }], - [209 /* ArrayLiteralExpression */, { handler: this.handleArrayLiteralExpression, name: "handleArrayLiteralExpression" }], - [168 /* Parameter */, { handler: this.handleParameter, name: "handleParameter" }], - [269 /* EnumDeclaration */, { handler: this.handleEnumDeclaration, name: "handleEnumDeclaration" }], - [267 /* InterfaceDeclaration */, { handler: this.handleInterfaceDeclaration, name: "handleInterfaceDeclaration" }], - [258 /* ThrowStatement */, { handler: this.handleThrowStatement, name: "handleThrowStatement" }], - [276 /* ImportClause */, { handler: this.handleImportClause, name: "handleImportClause" }], - [249 /* ForStatement */, { handler: this.handleForStatement, name: "handleForStatement" }], - [250 /* ForInStatement */, { handler: this.handleForInStatement, name: "handleForInStatement" }], - [251 /* ForOfStatement */, { handler: this.handleForOfStatement, name: "handleForOfStatement" }], - [275 /* ImportDeclaration */, { handler: this.handleImportDeclaration, name: "handleImportDeclaration" }], - [211 /* PropertyAccessExpression */, { handler: this.handlePropertyAccessExpression, name: "handlePropertyAccessExpression" }], - [171 /* PropertyDeclaration */, { handler: this.handlePropertyDeclaration, name: "handlePropertyDeclaration" }], - [305 /* PropertyAssignment */, { handler: this.handlePropertyAssignment, name: "handlePropertyAssignment" }], - [170 /* PropertySignature */, { handler: this.handlePropertySignature, name: "handlePropertySignature" }], - [218 /* FunctionExpression */, { handler: this.handleFunctionExpression, name: "handleFunctionExpression" }], - [219 /* ArrowFunction */, { handler: this.handleArrowFunction, name: "handleArrowFunction" }], - [301 /* CatchClause */, { handler: this.handleCatchClause, name: "handleCatchClause" }], - [263 /* FunctionDeclaration */, { handler: this.handleFunctionDeclaration, name: "handleFunctionDeclaration" }], - [225 /* PrefixUnaryExpression */, { handler: this.handlePrefixUnaryExpression, name: "handlePrefixUnaryExpression" }], - [227 /* BinaryExpression */, { handler: this.handleBinaryExpression, name: "handleBinaryExpression" }], - [262 /* VariableDeclarationList */, { handler: this.handleVariableDeclarationList, name: "handleVariableDeclarationList" }], - [261 /* VariableDeclaration */, { handler: this.handleVariableDeclaration, name: "handleVariableDeclaration" }], - [264 /* ClassDeclaration */, { handler: this.handleClassDeclaration, name: "handleClassDeclaration" }], - [270 /* ModuleDeclaration */, { handler: this.handleModuleDeclaration, name: "handleModuleDeclaration" }], - [268 /* TypeAliasDeclaration */, { handler: this.handleTypeAliasDeclaration, name: "handleTypeAliasDeclaration" }], - [279 /* ImportSpecifier */, { handler: this.handleImportSpecifier, name: "handleImportSpecifier" }], - [277 /* NamespaceImport */, { handler: this.handleNamespaceImport, name: "handleNamespaceImport" }], - [216 /* TypeAssertionExpression */, { handler: this.handleTypeAssertionExpression, name: "handleTypeAssertionExpression" }], - [174 /* MethodDeclaration */, { handler: this.handleMethodDeclaration, name: "handleMethodDeclaration" }], - [173 /* MethodSignature */, { handler: this.handleMethodSignature, name: "handleMethodSignature" }], + [212 /* ObjectLiteralExpression */, { handler: this.handleObjectLiteralExpression, name: "handleObjectLiteralExpression" }], + [211 /* ArrayLiteralExpression */, { handler: this.handleArrayLiteralExpression, name: "handleArrayLiteralExpression" }], + [169 /* Parameter */, { handler: this.handleParameter, name: "handleParameter" }], + [272 /* EnumDeclaration */, { handler: this.handleEnumDeclaration, name: "handleEnumDeclaration" }], + [270 /* InterfaceDeclaration */, { handler: this.handleInterfaceDeclaration, name: "handleInterfaceDeclaration" }], + [260 /* ThrowStatement */, { handler: this.handleThrowStatement, name: "handleThrowStatement" }], + [279 /* ImportClause */, { handler: this.handleImportClause, name: "handleImportClause" }], + [251 /* ForStatement */, { handler: this.handleForStatement, name: "handleForStatement" }], + [252 /* ForInStatement */, { handler: this.handleForInStatement, name: "handleForInStatement" }], + [253 /* ForOfStatement */, { handler: this.handleForOfStatement, name: "handleForOfStatement" }], + [278 /* ImportDeclaration */, { handler: this.handleImportDeclaration, name: "handleImportDeclaration" }], + [213 /* PropertyAccessExpression */, { handler: this.handlePropertyAccessExpression, name: "handlePropertyAccessExpression" }], + [172 /* PropertyDeclaration */, { handler: this.handlePropertyDeclaration, name: "handlePropertyDeclaration" }], + [308 /* PropertyAssignment */, { handler: this.handlePropertyAssignment, name: "handlePropertyAssignment" }], + [171 /* PropertySignature */, { handler: this.handlePropertySignature, name: "handlePropertySignature" }], + [220 /* FunctionExpression */, { handler: this.handleFunctionExpression, name: "handleFunctionExpression" }], + [221 /* ArrowFunction */, { handler: this.handleArrowFunction, name: "handleArrowFunction" }], + [304 /* CatchClause */, { handler: this.handleCatchClause, name: "handleCatchClause" }], + [265 /* FunctionDeclaration */, { handler: this.handleFunctionDeclaration, name: "handleFunctionDeclaration" }], + [227 /* PrefixUnaryExpression */, { handler: this.handlePrefixUnaryExpression, name: "handlePrefixUnaryExpression" }], + [229 /* BinaryExpression */, { handler: this.handleBinaryExpression, name: "handleBinaryExpression" }], + [264 /* VariableDeclarationList */, { handler: this.handleVariableDeclarationList, name: "handleVariableDeclarationList" }], + [263 /* VariableDeclaration */, { handler: this.handleVariableDeclaration, name: "handleVariableDeclaration" }], + [266 /* ClassDeclaration */, { handler: this.handleClassDeclaration, name: "handleClassDeclaration" }], + [273 /* ModuleDeclaration */, { handler: this.handleModuleDeclaration, name: "handleModuleDeclaration" }], + [271 /* TypeAliasDeclaration */, { handler: this.handleTypeAliasDeclaration, name: "handleTypeAliasDeclaration" }], + [282 /* ImportSpecifier */, { handler: this.handleImportSpecifier, name: "handleImportSpecifier" }], + [280 /* NamespaceImport */, { handler: this.handleNamespaceImport, name: "handleNamespaceImport" }], + [218 /* TypeAssertionExpression */, { handler: this.handleTypeAssertionExpression, name: "handleTypeAssertionExpression" }], + [176 /* MethodDeclaration */, { handler: this.handleMethodDeclaration, name: "handleMethodDeclaration" }], + [175 /* MethodSignature */, { handler: this.handleMethodSignature, name: "handleMethodSignature" }], [79 /* Identifier */, { handler: this.handleIdentifier, name: "handleIdentifier" }], - [212 /* ElementAccessExpression */, { handler: this.handleElementAccessExpression, name: "handleElementAccessExpression" }], - [308 /* EnumMember */, { handler: this.handleEnumMember, name: "handleEnumMember" }], - [183 /* TypeReference */, { handler: this.handleTypeReference, name: "handleTypeReference" }], - [280 /* ExportAssignment */, { handler: this.handleExportAssignment, name: "handleExportAssignment" }], - [213 /* CallExpression */, { handler: this.handleCallExpression, name: "handleCallExpression" }], - [237 /* MetaProperty */, { handler: this.handleMetaProperty, name: "handleMetaProperty" }], - [214 /* NewExpression */, { handler: this.handleNewExpression, name: "handleNewExpression" }], - [235 /* AsExpression */, { handler: this.handleAsExpression, name: "handleAsExpression" }], - [231 /* SpreadElement */, { handler: this.handleSpreadOp, name: "handleSpreadOp" }], - [307 /* SpreadAssignment */, { handler: this.handleSpreadOp, name: "handleSpreadOp" }], - [177 /* GetAccessor */, { handler: this.handleGetAccessor, name: "handleGetAccessor" }], - [178 /* SetAccessor */, { handler: this.handleSetAccessor, name: "handleSetAccessor" }], - [180 /* ConstructSignature */, { handler: this.handleConstructSignature, name: "handleConstructSignature" }], - [234 /* ExpressionWithTypeArguments */, { handler: this.handleExpressionWithTypeArguments, name: "handleExpressionWithTypeArguments" }], - [166 /* ComputedPropertyName */, { handler: this.handleComputedPropertyName, name: "handleComputedPropertyName" }], - [220 /* EtsComponentExpression */, { handler: this.handleEtsComponentExpression, name: "handleEtsComponentExpression" }], - [175 /* ClassStaticBlockDeclaration */, { handler: this.handleClassStaticBlockDeclaration, name: "handleClassStaticBlockDeclaration" }], - [181 /* IndexSignature */, { handler: this.handleIndexSignature, name: "handleIndexSignature" }], + [214 /* ElementAccessExpression */, { handler: this.handleElementAccessExpression, name: "handleElementAccessExpression" }], + [311 /* EnumMember */, { handler: this.handleEnumMember, name: "handleEnumMember" }], + [185 /* TypeReference */, { handler: this.handleTypeReference, name: "handleTypeReference" }], + [283 /* ExportAssignment */, { handler: this.handleExportAssignment, name: "handleExportAssignment" }], + [215 /* CallExpression */, { handler: this.handleCallExpression, name: "handleCallExpression" }], + [239 /* MetaProperty */, { handler: this.handleMetaProperty, name: "handleMetaProperty" }], + [216 /* NewExpression */, { handler: this.handleNewExpression, name: "handleNewExpression" }], + [237 /* AsExpression */, { handler: this.handleAsExpression, name: "handleAsExpression" }], + [233 /* SpreadElement */, { handler: this.handleSpreadOp, name: "handleSpreadOp" }], + [310 /* SpreadAssignment */, { handler: this.handleSpreadOp, name: "handleSpreadOp" }], + [179 /* GetAccessor */, { handler: this.handleGetAccessor, name: "handleGetAccessor" }], + [180 /* SetAccessor */, { handler: this.handleSetAccessor, name: "handleSetAccessor" }], + [182 /* ConstructSignature */, { handler: this.handleConstructSignature, name: "handleConstructSignature" }], + [236 /* ExpressionWithTypeArguments */, { handler: this.handleExpressionWithTypeArguments, name: "handleExpressionWithTypeArguments" }], + [167 /* ComputedPropertyName */, { handler: this.handleComputedPropertyName, name: "handleComputedPropertyName" }], + [222 /* EtsComponentExpression */, { handler: this.handleEtsComponentExpression, name: "handleEtsComponentExpression" }], + [177 /* ClassStaticBlockDeclaration */, { handler: this.handleClassStaticBlockDeclaration, name: "handleClassStaticBlockDeclaration" }], + [183 /* IndexSignature */, { handler: this.handleIndexSignature, name: "handleIndexSignature" }], [94 /* ExportKeyword */, { handler: this.handleExportKeyword, name: "handleExportKeyword" }], - [281 /* ExportDeclaration */, { handler: this.handleExportDeclaration, name: "handleExportDeclaration" }], - [254 /* ReturnStatement */, { handler: this.handleReturnStatement, name: "handleReturnStatement" }], - [169 /* Decorator */, { handler: this.handleDecorator, name: "handleDecorator" }] + [284 /* ExportDeclaration */, { handler: this.handleExportDeclaration, name: "handleExportDeclaration" }], + [256 /* ReturnStatement */, { handler: this.handleReturnStatement, name: "handleReturnStatement" }], + [170 /* Decorator */, { handler: this.handleDecorator, name: "handleDecorator" }] ]); this.validatedTypesSet = new Set2(); _TypeScriptLinter2.tsTypeChecker = tsProgram.getLinterTypeChecker(); @@ -173228,28 +173489,28 @@ var _TypeScriptLinter2 = class { if (!p.declarations) continue; const decl = p.declarations[0]; - if (decl.kind === 173 /* MethodSignature */) { + if (decl.kind === 175 /* MethodSignature */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 174 /* MethodDeclaration */) { + } else if (decl.kind === 176 /* MethodDeclaration */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 171 /* PropertyDeclaration */) { + } else if (decl.kind === 172 /* PropertyDeclaration */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 170 /* PropertySignature */) { + } else if (decl.kind === 171 /* PropertySignature */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, @@ -173285,7 +173546,7 @@ var _TypeScriptLinter2 = class { const arrayLitElements = arrayLitNode.elements; for (const element of arrayLitElements) { const elementContextType = _TypeScriptLinter2.tsTypeChecker.getContextualType(element); - if (element.kind === 210 /* ObjectLiteralExpression */) { + if (element.kind === 212 /* ObjectLiteralExpression */) { if (!isDynamicLiteralInitializer2(arrayLitNode) && !isObjectLiteralAssignable2(elementContextType, element)) { noContextTypeForArrayLiteral = true; break; @@ -173325,7 +173586,7 @@ var _TypeScriptLinter2 = class { return; let enumDeclCount = 0; for (const decl of enumDecls) { - if (decl.kind === 269 /* EnumDeclaration */) + if (decl.kind === 272 /* EnumDeclaration */) enumDeclCount++; } if (enumDeclCount > 1) @@ -173338,7 +173599,7 @@ var _TypeScriptLinter2 = class { if (iDecls) { let iDeclCount = 0; for (const decl of iDecls) { - if (decl.kind === 267 /* InterfaceDeclaration */) + if (decl.kind === 270 /* InterfaceDeclaration */) iDeclCount++; } if (iDeclCount > 1) @@ -173790,11 +174051,11 @@ var _TypeScriptLinter2 = class { } else if (tsBinaryExpr.operatorToken.kind === 27 /* CommaToken */) { let tsExprNode = tsBinaryExpr; let tsParentNode = tsExprNode.parent; - while (tsParentNode && tsParentNode.kind === 227 /* BinaryExpression */) { + while (tsParentNode && tsParentNode.kind === 229 /* BinaryExpression */) { tsExprNode = tsParentNode; tsParentNode = tsExprNode.parent; } - if (tsParentNode && tsParentNode.kind === 249 /* ForStatement */) { + if (tsParentNode && tsParentNode.kind === 251 /* ForStatement */) { const tsForNode = tsParentNode; if (tsExprNode === tsForNode.initializer || tsExprNode === tsForNode.incrementor) return; @@ -174059,15 +174320,15 @@ var _TypeScriptLinter2 = class { if (isModuleBlock(tsModuleBody)) { for (const tsModuleStmt of tsModuleBody.statements) { switch (tsModuleStmt.kind) { - case 244 /* VariableStatement */: - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 281 /* ExportDeclaration */: + case 246 /* VariableStatement */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 284 /* ExportDeclaration */: break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: break; default: this.incrementCounters(tsModuleStmt, 44 /* NonDeclarationInNamespace */); @@ -174194,7 +174455,7 @@ var _TypeScriptLinter2 = class { handleRestrictedValues(tsIdentifier, tsIdentSym) { const illegalValues = 128 /* ConstEnum */ | 256 /* RegularEnum */ | 512 /* ValueModule */ | 32 /* Class */; if ((tsIdentSym.flags & 512 /* ValueModule */) !== 0) { - if (!!tsIdentSym && symbolHasDuplicateName2(tsIdentSym, 270 /* ModuleDeclaration */)) { + if (!!tsIdentSym && symbolHasDuplicateName2(tsIdentSym, 273 /* ModuleDeclaration */)) { return; } } @@ -174490,25 +174751,25 @@ var _TypeScriptLinter2 = class { } isEsObjectPossiblyAllowed(typeRef) { switch (typeRef.parent.kind) { - case 261 /* VariableDeclaration */: - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: - case 184 /* FunctionType */: - case 170 /* PropertySignature */: - case 188 /* ArrayType */: - case 214 /* NewExpression */: + case 263 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: + case 186 /* FunctionType */: + case 171 /* PropertySignature */: + case 190 /* ArrayType */: + case 216 /* NewExpression */: return true; - case 219 /* ArrowFunction */: - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: + case 221 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: return this.isObjectLiteralFromFunc(typeRef.parent); - case 183 /* TypeReference */: + case 185 /* TypeReference */: const promiseType = typeRef.parent; if (promiseType.typeName.getText() === PROMISE) { return this.isObjectLiteralFromFunc(typeRef.parent.parent, true); } return true; - case 235 /* AsExpression */: + case 237 /* AsExpression */: return !isObjectLiteralExpression(typeRef.parent.expression); default: return false; @@ -174587,10 +174848,10 @@ var _TypeScriptLinter2 = class { } handleConstructSignature(node) { switch (node.parent.kind) { - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: this.incrementCounters(node, 33 /* ConstructorType */); break; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: this.incrementCounters(node, 34 /* ConstructorIface */); break; default: @@ -174667,9 +174928,9 @@ var _TypeScriptLinter2 = class { if (decl.exclamationToken === void 0) { return; } - if (decl.kind === 171 /* PropertyDeclaration */) { + if (decl.kind === 172 /* PropertyDeclaration */) { const parentDecl = decl.parent; - if (parentDecl.kind === 264 /* ClassDeclaration */ && hasSendableDecorator(parentDecl)) { + if (parentDecl.kind === 266 /* ClassDeclaration */ && hasSendableDecorator(parentDecl)) { this.incrementCounters(decl, 82 /* SendableDefiniteAssignment */); return; } @@ -174800,28 +175061,28 @@ var _TypeScriptLinter2 = class { return; } switch (parentNode.kind) { - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: if (isConstEnum(parentNode.symbol)) { break; } else { this.incrementCounters((_a2 = parentNode.name) != null ? _a2 : parentNode, 90 /* SharedModuleExports */); } return; - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: if (!isShareableType(_TypeScriptLinter2.tsTypeChecker.getTypeAtLocation(parentNode))) { this.incrementCounters((_b = parentNode.name) != null ? _b : parentNode, 90 /* SharedModuleExports */); } return; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: for (const variableDeclaration of parentNode.declarationList.declarations) { if (!isShareableEntity(variableDeclaration.name)) { this.incrementCounters(variableDeclaration.name, 90 /* SharedModuleExports */); } } return; - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: if (!isShareableEntity(parentNode)) { this.incrementCounters(parentNode, 108 /* SharedModuleExportsWarning */); } @@ -174930,15 +175191,15 @@ var _InteropTypescriptLinter = class { this.D_ETS = ".d.ets"; this.ETS = ".ets"; this.handlersMap = new Map2([ - [275 /* ImportDeclaration */, this.handleImportDeclaration], - [267 /* InterfaceDeclaration */, this.handleInterfaceDeclaration], - [264 /* ClassDeclaration */, this.handleClassDeclaration], - [214 /* NewExpression */, this.handleNewExpression], - [210 /* ObjectLiteralExpression */, this.handleObjectLiteralExpression], - [209 /* ArrayLiteralExpression */, this.handleArrayLiteralExpression], - [235 /* AsExpression */, this.handleAsExpression], - [281 /* ExportDeclaration */, this.handleExportDeclaration], - [280 /* ExportAssignment */, this.handleExportAssignment] + [278 /* ImportDeclaration */, this.handleImportDeclaration], + [270 /* InterfaceDeclaration */, this.handleInterfaceDeclaration], + [266 /* ClassDeclaration */, this.handleClassDeclaration], + [216 /* NewExpression */, this.handleNewExpression], + [212 /* ObjectLiteralExpression */, this.handleObjectLiteralExpression], + [211 /* ArrayLiteralExpression */, this.handleArrayLiteralExpression], + [237 /* AsExpression */, this.handleAsExpression], + [284 /* ExportDeclaration */, this.handleExportDeclaration], + [283 /* ExportAssignment */, this.handleExportAssignment] ]); _InteropTypescriptLinter.tsTypeChecker = tsProgram.getLinterTypeChecker(); _InteropTypescriptLinter.etsLoaderPath = tsProgram.getCompilerOptions().etsLoaderPath; @@ -177483,6 +177744,9 @@ __export(ts_server_exports3, { isOptionalTypeNode, isOuterExpression, isOutermostOptionalChain, + isOverloadDeclaration, + isOverloadElement, + isOverloadPropertyDeclaration, isOverrideModifier, isPackedArrayLiteral, isParameter, diff --git a/lib/typescript.d.ts b/lib/typescript.d.ts index 4f76592ee5..b6b594e6ac 100644 --- a/lib/typescript.d.ts +++ b/lib/typescript.d.ts @@ -310,209 +310,212 @@ declare namespace ts { GlobalKeyword = 161, BigIntKeyword = 162, OverrideKeyword = 163, - OfKeyword = 164, - QualifiedName = 165, - ComputedPropertyName = 166, - TypeParameter = 167, - Parameter = 168, - Decorator = 169, - PropertySignature = 170, - PropertyDeclaration = 171, - AnnotationPropertyDeclaration = 172, - MethodSignature = 173, - MethodDeclaration = 174, - ClassStaticBlockDeclaration = 175, - Constructor = 176, - GetAccessor = 177, - SetAccessor = 178, - CallSignature = 179, - ConstructSignature = 180, - IndexSignature = 181, - TypePredicate = 182, - TypeReference = 183, - FunctionType = 184, - ConstructorType = 185, - TypeQuery = 186, - TypeLiteral = 187, - ArrayType = 188, - TupleType = 189, - OptionalType = 190, - RestType = 191, - UnionType = 192, - IntersectionType = 193, - ConditionalType = 194, - InferType = 195, - ParenthesizedType = 196, - ThisType = 197, - TypeOperator = 198, - IndexedAccessType = 199, - MappedType = 200, - LiteralType = 201, - NamedTupleMember = 202, - TemplateLiteralType = 203, - TemplateLiteralTypeSpan = 204, - ImportType = 205, - ObjectBindingPattern = 206, - ArrayBindingPattern = 207, - BindingElement = 208, - ArrayLiteralExpression = 209, - ObjectLiteralExpression = 210, - PropertyAccessExpression = 211, - ElementAccessExpression = 212, - CallExpression = 213, - NewExpression = 214, - TaggedTemplateExpression = 215, - TypeAssertionExpression = 216, - ParenthesizedExpression = 217, - FunctionExpression = 218, - ArrowFunction = 219, - EtsComponentExpression = 220, - DeleteExpression = 221, - TypeOfExpression = 222, - VoidExpression = 223, - AwaitExpression = 224, - PrefixUnaryExpression = 225, - PostfixUnaryExpression = 226, - BinaryExpression = 227, - ConditionalExpression = 228, - TemplateExpression = 229, - YieldExpression = 230, - SpreadElement = 231, - ClassExpression = 232, - OmittedExpression = 233, - ExpressionWithTypeArguments = 234, - AsExpression = 235, - NonNullExpression = 236, - MetaProperty = 237, - SyntheticExpression = 238, - SatisfiesExpression = 239, - TemplateSpan = 240, - SemicolonClassElement = 241, - Block = 242, - EmptyStatement = 243, - VariableStatement = 244, - ExpressionStatement = 245, - IfStatement = 246, - DoStatement = 247, - WhileStatement = 248, - ForStatement = 249, - ForInStatement = 250, - ForOfStatement = 251, - ContinueStatement = 252, - BreakStatement = 253, - ReturnStatement = 254, - WithStatement = 255, - SwitchStatement = 256, - LabeledStatement = 257, - ThrowStatement = 258, - TryStatement = 259, - DebuggerStatement = 260, - VariableDeclaration = 261, - VariableDeclarationList = 262, - FunctionDeclaration = 263, - ClassDeclaration = 264, - StructDeclaration = 265, - AnnotationDeclaration = 266, - InterfaceDeclaration = 267, - TypeAliasDeclaration = 268, - EnumDeclaration = 269, - ModuleDeclaration = 270, - ModuleBlock = 271, - CaseBlock = 272, - NamespaceExportDeclaration = 273, - ImportEqualsDeclaration = 274, - ImportDeclaration = 275, - ImportClause = 276, - NamespaceImport = 277, - NamedImports = 278, - ImportSpecifier = 279, - ExportAssignment = 280, - ExportDeclaration = 281, - NamedExports = 282, - NamespaceExport = 283, - ExportSpecifier = 284, - MissingDeclaration = 285, - ExternalModuleReference = 286, - JsxElement = 287, - JsxSelfClosingElement = 288, - JsxOpeningElement = 289, - JsxClosingElement = 290, - JsxFragment = 291, - JsxOpeningFragment = 292, - JsxClosingFragment = 293, - JsxAttribute = 294, - JsxAttributes = 295, - JsxSpreadAttribute = 296, - JsxExpression = 297, - CaseClause = 298, - DefaultClause = 299, - HeritageClause = 300, - CatchClause = 301, - AssertClause = 302, - AssertEntry = 303, - ImportTypeAssertionContainer = 304, - PropertyAssignment = 305, - ShorthandPropertyAssignment = 306, - SpreadAssignment = 307, - EnumMember = 308, - UnparsedPrologue = 309, - UnparsedPrepend = 310, - UnparsedText = 311, - UnparsedInternalText = 312, - UnparsedSyntheticReference = 313, - SourceFile = 314, - Bundle = 315, - UnparsedSource = 316, - InputFiles = 317, - JSDocTypeExpression = 318, - JSDocNameReference = 319, - JSDocMemberName = 320, - JSDocAllType = 321, - JSDocUnknownType = 322, - JSDocNullableType = 323, - JSDocNonNullableType = 324, - JSDocOptionalType = 325, - JSDocFunctionType = 326, - JSDocVariadicType = 327, - JSDocNamepathType = 328, - JSDoc = 329, + OverloadKeyword = 164, + OfKeyword = 165, + QualifiedName = 166, + ComputedPropertyName = 167, + TypeParameter = 168, + Parameter = 169, + Decorator = 170, + PropertySignature = 171, + PropertyDeclaration = 172, + AnnotationPropertyDeclaration = 173, + OverloadPropertyDeclaration = 174, + MethodSignature = 175, + MethodDeclaration = 176, + ClassStaticBlockDeclaration = 177, + Constructor = 178, + GetAccessor = 179, + SetAccessor = 180, + CallSignature = 181, + ConstructSignature = 182, + IndexSignature = 183, + TypePredicate = 184, + TypeReference = 185, + FunctionType = 186, + ConstructorType = 187, + TypeQuery = 188, + TypeLiteral = 189, + ArrayType = 190, + TupleType = 191, + OptionalType = 192, + RestType = 193, + UnionType = 194, + IntersectionType = 195, + ConditionalType = 196, + InferType = 197, + ParenthesizedType = 198, + ThisType = 199, + TypeOperator = 200, + IndexedAccessType = 201, + MappedType = 202, + LiteralType = 203, + NamedTupleMember = 204, + TemplateLiteralType = 205, + TemplateLiteralTypeSpan = 206, + ImportType = 207, + ObjectBindingPattern = 208, + ArrayBindingPattern = 209, + BindingElement = 210, + ArrayLiteralExpression = 211, + ObjectLiteralExpression = 212, + PropertyAccessExpression = 213, + ElementAccessExpression = 214, + CallExpression = 215, + NewExpression = 216, + TaggedTemplateExpression = 217, + TypeAssertionExpression = 218, + ParenthesizedExpression = 219, + FunctionExpression = 220, + ArrowFunction = 221, + EtsComponentExpression = 222, + DeleteExpression = 223, + TypeOfExpression = 224, + VoidExpression = 225, + AwaitExpression = 226, + PrefixUnaryExpression = 227, + PostfixUnaryExpression = 228, + BinaryExpression = 229, + ConditionalExpression = 230, + TemplateExpression = 231, + YieldExpression = 232, + SpreadElement = 233, + ClassExpression = 234, + OmittedExpression = 235, + ExpressionWithTypeArguments = 236, + AsExpression = 237, + NonNullExpression = 238, + MetaProperty = 239, + SyntheticExpression = 240, + SatisfiesExpression = 241, + TemplateSpan = 242, + SemicolonClassElement = 243, + Block = 244, + EmptyStatement = 245, + VariableStatement = 246, + ExpressionStatement = 247, + IfStatement = 248, + DoStatement = 249, + WhileStatement = 250, + ForStatement = 251, + ForInStatement = 252, + ForOfStatement = 253, + ContinueStatement = 254, + BreakStatement = 255, + ReturnStatement = 256, + WithStatement = 257, + SwitchStatement = 258, + LabeledStatement = 259, + ThrowStatement = 260, + TryStatement = 261, + DebuggerStatement = 262, + VariableDeclaration = 263, + VariableDeclarationList = 264, + FunctionDeclaration = 265, + ClassDeclaration = 266, + StructDeclaration = 267, + AnnotationDeclaration = 268, + OverloadDeclaration = 269, + InterfaceDeclaration = 270, + TypeAliasDeclaration = 271, + EnumDeclaration = 272, + ModuleDeclaration = 273, + ModuleBlock = 274, + CaseBlock = 275, + NamespaceExportDeclaration = 276, + ImportEqualsDeclaration = 277, + ImportDeclaration = 278, + ImportClause = 279, + NamespaceImport = 280, + NamedImports = 281, + ImportSpecifier = 282, + ExportAssignment = 283, + ExportDeclaration = 284, + NamedExports = 285, + NamespaceExport = 286, + ExportSpecifier = 287, + MissingDeclaration = 288, + ExternalModuleReference = 289, + JsxElement = 290, + JsxSelfClosingElement = 291, + JsxOpeningElement = 292, + JsxClosingElement = 293, + JsxFragment = 294, + JsxOpeningFragment = 295, + JsxClosingFragment = 296, + JsxAttribute = 297, + JsxAttributes = 298, + JsxSpreadAttribute = 299, + JsxExpression = 300, + CaseClause = 301, + DefaultClause = 302, + HeritageClause = 303, + CatchClause = 304, + AssertClause = 305, + AssertEntry = 306, + ImportTypeAssertionContainer = 307, + PropertyAssignment = 308, + ShorthandPropertyAssignment = 309, + SpreadAssignment = 310, + EnumMember = 311, + UnparsedPrologue = 312, + UnparsedPrepend = 313, + UnparsedText = 314, + UnparsedInternalText = 315, + UnparsedSyntheticReference = 316, + SourceFile = 317, + Bundle = 318, + UnparsedSource = 319, + InputFiles = 320, + JSDocTypeExpression = 321, + JSDocNameReference = 322, + JSDocMemberName = 323, + JSDocAllType = 324, + JSDocUnknownType = 325, + JSDocNullableType = 326, + JSDocNonNullableType = 327, + JSDocOptionalType = 328, + JSDocFunctionType = 329, + JSDocVariadicType = 330, + JSDocNamepathType = 331, + JSDoc = 332, /** @deprecated Use SyntaxKind.JSDoc */ - JSDocComment = 329, - JSDocText = 330, - JSDocTypeLiteral = 331, - JSDocSignature = 332, - JSDocLink = 333, - JSDocLinkCode = 334, - JSDocLinkPlain = 335, - JSDocTag = 336, - JSDocAugmentsTag = 337, - JSDocImplementsTag = 338, - JSDocAuthorTag = 339, - JSDocDeprecatedTag = 340, - JSDocClassTag = 341, - JSDocPublicTag = 342, - JSDocPrivateTag = 343, - JSDocProtectedTag = 344, - JSDocReadonlyTag = 345, - JSDocOverrideTag = 346, - JSDocCallbackTag = 347, - JSDocEnumTag = 348, - JSDocParameterTag = 349, - JSDocReturnTag = 350, - JSDocThisTag = 351, - JSDocTypeTag = 352, - JSDocTemplateTag = 353, - JSDocTypedefTag = 354, - JSDocSeeTag = 355, - JSDocPropertyTag = 356, - SyntaxList = 357, - NotEmittedStatement = 358, - PartiallyEmittedExpression = 359, - CommaListExpression = 360, - MergeDeclarationMarker = 361, - EndOfDeclarationMarker = 362, - SyntheticReferenceExpression = 363, - Count = 364, + JSDocComment = 332, + JSDocText = 333, + JSDocTypeLiteral = 334, + JSDocSignature = 335, + JSDocLink = 336, + JSDocLinkCode = 337, + JSDocLinkPlain = 338, + JSDocTag = 339, + JSDocAugmentsTag = 340, + JSDocImplementsTag = 341, + JSDocAuthorTag = 342, + JSDocDeprecatedTag = 343, + JSDocClassTag = 344, + JSDocPublicTag = 345, + JSDocPrivateTag = 346, + JSDocProtectedTag = 347, + JSDocReadonlyTag = 348, + JSDocOverrideTag = 349, + JSDocCallbackTag = 350, + JSDocEnumTag = 351, + JSDocParameterTag = 352, + JSDocReturnTag = 353, + JSDocThisTag = 354, + JSDocTypeTag = 355, + JSDocTemplateTag = 356, + JSDocTypedefTag = 357, + JSDocSeeTag = 358, + JSDocPropertyTag = 359, + SyntaxList = 360, + NotEmittedStatement = 361, + PartiallyEmittedExpression = 362, + CommaListExpression = 363, + MergeDeclarationMarker = 364, + EndOfDeclarationMarker = 365, + SyntheticReferenceExpression = 366, + Count = 367, FirstAssignment = 63, LastAssignment = 78, FirstCompoundAssignment = 64, @@ -520,15 +523,15 @@ declare namespace ts { FirstReservedWord = 81, LastReservedWord = 117, FirstKeyword = 81, - LastKeyword = 164, + LastKeyword = 165, FirstFutureReservedWord = 118, LastFutureReservedWord = 126, - FirstTypeNode = 182, - LastTypeNode = 205, + FirstTypeNode = 184, + LastTypeNode = 207, FirstPunctuation = 18, LastPunctuation = 78, FirstToken = 0, - LastToken = 164, + LastToken = 165, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 8, @@ -537,19 +540,19 @@ declare namespace ts { LastTemplateToken = 17, FirstBinaryOperator = 29, LastBinaryOperator = 78, - FirstStatement = 244, - LastStatement = 260, - FirstNode = 165, - FirstJSDocNode = 318, - LastJSDocNode = 356, - FirstJSDocTagNode = 336, - LastJSDocTagNode = 356 + FirstStatement = 246, + LastStatement = 262, + FirstNode = 166, + FirstJSDocNode = 321, + LastJSDocNode = 359, + FirstJSDocTagNode = 339, + LastJSDocTagNode = 359 } 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; type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail; type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken; - type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.StructKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.LazyKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; + type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.StructKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.OverloadKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.LazyKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.InKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword; type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword; type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind; @@ -690,14 +693,14 @@ declare namespace ts { } interface JSDocContainer { } - type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AnnotationPropertyDeclaration | AnnotationDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | ExportSpecifier | CaseClause | EndOfFileToken; - type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | AnnotationPropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType; + type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AnnotationPropertyDeclaration | OverloadPropertyDeclaration | AnnotationDeclaration | OverloadDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | ExportSpecifier | CaseClause | EndOfFileToken; + type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | AnnotationPropertyDeclaration | OverloadPropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType; type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement; type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute; type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | AnnotationPropertyDeclaration | PropertyAssignment | EnumMember; type HasDecorators = ParameterDeclaration | PropertyDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ClassExpression | ClassDeclaration | StructDeclaration | FunctionDeclaration; type HasIllegalDecorators = PropertyAssignment | ShorthandPropertyAssignment | FunctionDeclaration | ConstructorDeclaration | IndexSignatureDeclaration | ClassStaticBlockDeclaration | MissingDeclaration | VariableStatement | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportDeclaration | ExportAssignment; - type HasModifiers = TypeParameterDeclaration | ParameterDeclaration | ConstructorTypeNode | PropertySignature | PropertyDeclaration | MethodSignature | MethodDeclaration | ConstructorDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | IndexSignatureDeclaration | FunctionExpression | ArrowFunction | ClassExpression | VariableStatement | FunctionDeclaration | ClassDeclaration | StructDeclaration | AnnotationDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | ExportAssignment | ExportDeclaration; + type HasModifiers = TypeParameterDeclaration | ParameterDeclaration | ConstructorTypeNode | PropertySignature | PropertyDeclaration | MethodSignature | MethodDeclaration | ConstructorDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | IndexSignatureDeclaration | FunctionExpression | ArrowFunction | ClassExpression | VariableStatement | FunctionDeclaration | ClassDeclaration | StructDeclaration | AnnotationDeclaration | OverloadDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | ExportAssignment | ExportDeclaration | OverloadPropertyDeclaration; interface NodeArray extends ReadonlyArray, ReadonlyTextRange { readonly hasTrailingComma: boolean; } @@ -938,7 +941,7 @@ declare namespace ts { readonly parent: ObjectLiteralExpression; readonly expression: Expression; } - type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | AnnotationPropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag; + type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | AnnotationPropertyDeclaration | OverloadPropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag; interface PropertyLikeDeclaration extends NamedDeclaration { readonly name: PropertyName; } @@ -1730,7 +1733,7 @@ declare namespace ts { type DeclarationWithTypeParameters = DeclarationWithTypeParameterChildren | JSDocTypedefTag | JSDocCallbackTag | JSDocSignature; type DeclarationWithTypeParameterChildren = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag; interface ClassLikeDeclarationBase extends NamedDeclaration, JSDocContainer { - readonly kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression | SyntaxKind.StructDeclaration | SyntaxKind.AnnotationDeclaration; + readonly kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression | SyntaxKind.StructDeclaration | SyntaxKind.AnnotationDeclaration | SyntaxKind.OverloadDeclaration; readonly name?: Identifier; readonly typeParameters?: NodeArray; readonly heritageClauses?: NodeArray; @@ -1754,6 +1757,12 @@ declare namespace ts { readonly name: Identifier; readonly members: NodeArray; } + interface OverloadDeclaration extends DeclarationStatement { + readonly kind: SyntaxKind.OverloadDeclaration; + readonly modifiers?: NodeArray; + readonly name: Identifier; + readonly members: NodeArray; + } interface ClassExpression extends ClassLikeDeclarationBase, PrimaryExpression { readonly kind: SyntaxKind.ClassExpression; readonly modifiers?: NodeArray; @@ -1767,6 +1776,16 @@ declare namespace ts { _annnotationElementBrand: any; readonly name: PropertyName; } + interface OverloadElement extends NamedDeclaration { + readonly name: PropertyName; + } + interface OverloadPropertyDeclaration extends OverloadElement, JSDocContainer { + readonly kind: SyntaxKind.OverloadPropertyDeclaration; + readonly modifiers?: NodeArray; + readonly name: PropertyName; + readonly questionToken?: QuestionToken; + readonly type?: TypeNode; + } interface TypeElement extends NamedDeclaration { _typeElementBrand: any; readonly name?: PropertyName; @@ -3888,6 +3907,8 @@ declare namespace ts { updatePropertyDeclaration(node: PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; createAnnotationPropertyDeclaration(name: string | PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): AnnotationPropertyDeclaration; updateAnnotationPropertyDeclaration(node: AnnotationPropertyDeclaration, name: string | PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): AnnotationPropertyDeclaration; + createOverloadPropertyDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined): OverloadPropertyDeclaration; + updateOverloadPropertyDeclaration(node: OverloadPropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined): OverloadPropertyDeclaration; createMethodSignature(modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): MethodSignature; updateMethodSignature(node: MethodSignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode | undefined): MethodSignature; createMethodDeclaration(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration; @@ -4087,6 +4108,8 @@ declare namespace ts { updateStructDeclaration(node: StructDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): StructDeclaration; createAnnotationDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, members: readonly AnnotationElement[]): AnnotationDeclaration; updateAnnotationDeclaration(node: AnnotationDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, members: readonly AnnotationElement[]): AnnotationDeclaration; + createOverloadDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, members: readonly OverloadElement[]): OverloadDeclaration; + updateOverloadDeclaration(node: OverloadDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, members: readonly OverloadElement[]): OverloadDeclaration; createInterfaceDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; updateInterfaceDeclaration(node: InterfaceDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; createTypeAliasDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; @@ -5267,6 +5290,7 @@ declare namespace ts { function isBindingName(node: Node): node is BindingName; function isFunctionLike(node: Node | undefined): node is SignatureDeclaration; function isAnnotationElement(node: Node): node is AnnotationElement; + function isOverloadElement(node: Node): node is OverloadElement; function isClassElement(node: Node): node is ClassElement; function isClassLike(node: Node): node is ClassLikeDeclaration; function isStruct(node: Node): node is StructDeclaration; @@ -5437,6 +5461,7 @@ declare namespace ts { function isDecorator(node: Node): node is Decorator; function isAnnotation(node: Node): node is Annotation; function isPropertySignature(node: Node): node is PropertySignature; + function isOverloadPropertyDeclaration(node: Node): node is OverloadPropertyDeclaration; function isPropertyDeclaration(node: Node): node is PropertyDeclaration; function isAnnotationPropertyDeclaration(node: Node): node is AnnotationPropertyDeclaration; function isMethodSignature(node: Node): node is MethodSignature; @@ -5535,6 +5560,7 @@ declare namespace ts { function isClassDeclaration(node: Node): node is ClassDeclaration; function isStructDeclaration(node: Node): node is StructDeclaration; function isAnnotationDeclaration(node: Node): node is AnnotationDeclaration; + function isOverloadDeclaration(node: Node): node is OverloadDeclaration; function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration; function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration; function isEnumDeclaration(node: Node): node is EnumDeclaration; diff --git a/lib/typescript.js b/lib/typescript.js index 83e9140daa..df6d167e49 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -1822,6 +1822,9 @@ __export(typescript_exports, { isOptionalTypeNode: () => isOptionalTypeNode, isOuterExpression: () => isOuterExpression, isOutermostOptionalChain: () => isOutermostOptionalChain, + isOverloadDeclaration: () => isOverloadDeclaration, + isOverloadElement: () => isOverloadElement, + isOverloadPropertyDeclaration: () => isOverloadPropertyDeclaration, isOverrideModifier: () => isOverrideModifier, isPackedArrayLiteral: () => isPackedArrayLiteral, isParameter: () => isParameter, @@ -6457,208 +6460,211 @@ var SyntaxKind2 = /* @__PURE__ */ ((SyntaxKind5) => { SyntaxKind5[SyntaxKind5["GlobalKeyword"] = 161] = "GlobalKeyword"; SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 162] = "BigIntKeyword"; SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 163] = "OverrideKeyword"; - SyntaxKind5[SyntaxKind5["OfKeyword"] = 164] = "OfKeyword"; - SyntaxKind5[SyntaxKind5["QualifiedName"] = 165] = "QualifiedName"; - SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 166] = "ComputedPropertyName"; - SyntaxKind5[SyntaxKind5["TypeParameter"] = 167] = "TypeParameter"; - SyntaxKind5[SyntaxKind5["Parameter"] = 168] = "Parameter"; - SyntaxKind5[SyntaxKind5["Decorator"] = 169] = "Decorator"; - SyntaxKind5[SyntaxKind5["PropertySignature"] = 170] = "PropertySignature"; - SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 171] = "PropertyDeclaration"; - SyntaxKind5[SyntaxKind5["AnnotationPropertyDeclaration"] = 172] = "AnnotationPropertyDeclaration"; - SyntaxKind5[SyntaxKind5["MethodSignature"] = 173] = "MethodSignature"; - SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 174] = "MethodDeclaration"; - SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 175] = "ClassStaticBlockDeclaration"; - SyntaxKind5[SyntaxKind5["Constructor"] = 176] = "Constructor"; - SyntaxKind5[SyntaxKind5["GetAccessor"] = 177] = "GetAccessor"; - SyntaxKind5[SyntaxKind5["SetAccessor"] = 178] = "SetAccessor"; - SyntaxKind5[SyntaxKind5["CallSignature"] = 179] = "CallSignature"; - SyntaxKind5[SyntaxKind5["ConstructSignature"] = 180] = "ConstructSignature"; - SyntaxKind5[SyntaxKind5["IndexSignature"] = 181] = "IndexSignature"; - SyntaxKind5[SyntaxKind5["TypePredicate"] = 182] = "TypePredicate"; - SyntaxKind5[SyntaxKind5["TypeReference"] = 183] = "TypeReference"; - SyntaxKind5[SyntaxKind5["FunctionType"] = 184] = "FunctionType"; - SyntaxKind5[SyntaxKind5["ConstructorType"] = 185] = "ConstructorType"; - SyntaxKind5[SyntaxKind5["TypeQuery"] = 186] = "TypeQuery"; - SyntaxKind5[SyntaxKind5["TypeLiteral"] = 187] = "TypeLiteral"; - SyntaxKind5[SyntaxKind5["ArrayType"] = 188] = "ArrayType"; - SyntaxKind5[SyntaxKind5["TupleType"] = 189] = "TupleType"; - SyntaxKind5[SyntaxKind5["OptionalType"] = 190] = "OptionalType"; - SyntaxKind5[SyntaxKind5["RestType"] = 191] = "RestType"; - SyntaxKind5[SyntaxKind5["UnionType"] = 192] = "UnionType"; - SyntaxKind5[SyntaxKind5["IntersectionType"] = 193] = "IntersectionType"; - SyntaxKind5[SyntaxKind5["ConditionalType"] = 194] = "ConditionalType"; - SyntaxKind5[SyntaxKind5["InferType"] = 195] = "InferType"; - SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 196] = "ParenthesizedType"; - SyntaxKind5[SyntaxKind5["ThisType"] = 197] = "ThisType"; - SyntaxKind5[SyntaxKind5["TypeOperator"] = 198] = "TypeOperator"; - SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 199] = "IndexedAccessType"; - SyntaxKind5[SyntaxKind5["MappedType"] = 200] = "MappedType"; - SyntaxKind5[SyntaxKind5["LiteralType"] = 201] = "LiteralType"; - SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 202] = "NamedTupleMember"; - SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 203] = "TemplateLiteralType"; - SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 204] = "TemplateLiteralTypeSpan"; - SyntaxKind5[SyntaxKind5["ImportType"] = 205] = "ImportType"; - SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 206] = "ObjectBindingPattern"; - SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 207] = "ArrayBindingPattern"; - SyntaxKind5[SyntaxKind5["BindingElement"] = 208] = "BindingElement"; - SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 209] = "ArrayLiteralExpression"; - SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 210] = "ObjectLiteralExpression"; - SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 211] = "PropertyAccessExpression"; - SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 212] = "ElementAccessExpression"; - SyntaxKind5[SyntaxKind5["CallExpression"] = 213] = "CallExpression"; - SyntaxKind5[SyntaxKind5["NewExpression"] = 214] = "NewExpression"; - SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 215] = "TaggedTemplateExpression"; - SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 216] = "TypeAssertionExpression"; - SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 217] = "ParenthesizedExpression"; - SyntaxKind5[SyntaxKind5["FunctionExpression"] = 218] = "FunctionExpression"; - SyntaxKind5[SyntaxKind5["ArrowFunction"] = 219] = "ArrowFunction"; - SyntaxKind5[SyntaxKind5["EtsComponentExpression"] = 220] = "EtsComponentExpression"; - SyntaxKind5[SyntaxKind5["DeleteExpression"] = 221] = "DeleteExpression"; - SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 222] = "TypeOfExpression"; - SyntaxKind5[SyntaxKind5["VoidExpression"] = 223] = "VoidExpression"; - SyntaxKind5[SyntaxKind5["AwaitExpression"] = 224] = "AwaitExpression"; - SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 225] = "PrefixUnaryExpression"; - SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 226] = "PostfixUnaryExpression"; - SyntaxKind5[SyntaxKind5["BinaryExpression"] = 227] = "BinaryExpression"; - SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 228] = "ConditionalExpression"; - SyntaxKind5[SyntaxKind5["TemplateExpression"] = 229] = "TemplateExpression"; - SyntaxKind5[SyntaxKind5["YieldExpression"] = 230] = "YieldExpression"; - SyntaxKind5[SyntaxKind5["SpreadElement"] = 231] = "SpreadElement"; - SyntaxKind5[SyntaxKind5["ClassExpression"] = 232] = "ClassExpression"; - SyntaxKind5[SyntaxKind5["OmittedExpression"] = 233] = "OmittedExpression"; - SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 234] = "ExpressionWithTypeArguments"; - SyntaxKind5[SyntaxKind5["AsExpression"] = 235] = "AsExpression"; - SyntaxKind5[SyntaxKind5["NonNullExpression"] = 236] = "NonNullExpression"; - SyntaxKind5[SyntaxKind5["MetaProperty"] = 237] = "MetaProperty"; - SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 238] = "SyntheticExpression"; - SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 239] = "SatisfiesExpression"; - SyntaxKind5[SyntaxKind5["TemplateSpan"] = 240] = "TemplateSpan"; - SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 241] = "SemicolonClassElement"; - SyntaxKind5[SyntaxKind5["Block"] = 242] = "Block"; - SyntaxKind5[SyntaxKind5["EmptyStatement"] = 243] = "EmptyStatement"; - SyntaxKind5[SyntaxKind5["VariableStatement"] = 244] = "VariableStatement"; - SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 245] = "ExpressionStatement"; - SyntaxKind5[SyntaxKind5["IfStatement"] = 246] = "IfStatement"; - SyntaxKind5[SyntaxKind5["DoStatement"] = 247] = "DoStatement"; - SyntaxKind5[SyntaxKind5["WhileStatement"] = 248] = "WhileStatement"; - SyntaxKind5[SyntaxKind5["ForStatement"] = 249] = "ForStatement"; - SyntaxKind5[SyntaxKind5["ForInStatement"] = 250] = "ForInStatement"; - SyntaxKind5[SyntaxKind5["ForOfStatement"] = 251] = "ForOfStatement"; - SyntaxKind5[SyntaxKind5["ContinueStatement"] = 252] = "ContinueStatement"; - SyntaxKind5[SyntaxKind5["BreakStatement"] = 253] = "BreakStatement"; - SyntaxKind5[SyntaxKind5["ReturnStatement"] = 254] = "ReturnStatement"; - SyntaxKind5[SyntaxKind5["WithStatement"] = 255] = "WithStatement"; - SyntaxKind5[SyntaxKind5["SwitchStatement"] = 256] = "SwitchStatement"; - SyntaxKind5[SyntaxKind5["LabeledStatement"] = 257] = "LabeledStatement"; - SyntaxKind5[SyntaxKind5["ThrowStatement"] = 258] = "ThrowStatement"; - SyntaxKind5[SyntaxKind5["TryStatement"] = 259] = "TryStatement"; - SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 260] = "DebuggerStatement"; - SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 261] = "VariableDeclaration"; - SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 262] = "VariableDeclarationList"; - SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 263] = "FunctionDeclaration"; - SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 264] = "ClassDeclaration"; - SyntaxKind5[SyntaxKind5["StructDeclaration"] = 265] = "StructDeclaration"; - SyntaxKind5[SyntaxKind5["AnnotationDeclaration"] = 266] = "AnnotationDeclaration"; - SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 267] = "InterfaceDeclaration"; - SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 268] = "TypeAliasDeclaration"; - SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 269] = "EnumDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 270] = "ModuleDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleBlock"] = 271] = "ModuleBlock"; - SyntaxKind5[SyntaxKind5["CaseBlock"] = 272] = "CaseBlock"; - SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 273] = "NamespaceExportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 274] = "ImportEqualsDeclaration"; - SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 275] = "ImportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportClause"] = 276] = "ImportClause"; - SyntaxKind5[SyntaxKind5["NamespaceImport"] = 277] = "NamespaceImport"; - SyntaxKind5[SyntaxKind5["NamedImports"] = 278] = "NamedImports"; - SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 279] = "ImportSpecifier"; - SyntaxKind5[SyntaxKind5["ExportAssignment"] = 280] = "ExportAssignment"; - SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 281] = "ExportDeclaration"; - SyntaxKind5[SyntaxKind5["NamedExports"] = 282] = "NamedExports"; - SyntaxKind5[SyntaxKind5["NamespaceExport"] = 283] = "NamespaceExport"; - SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 284] = "ExportSpecifier"; - SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 285] = "MissingDeclaration"; - SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 286] = "ExternalModuleReference"; - SyntaxKind5[SyntaxKind5["JsxElement"] = 287] = "JsxElement"; - SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 288] = "JsxSelfClosingElement"; - SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 289] = "JsxOpeningElement"; - SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 290] = "JsxClosingElement"; - SyntaxKind5[SyntaxKind5["JsxFragment"] = 291] = "JsxFragment"; - SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 292] = "JsxOpeningFragment"; - SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 293] = "JsxClosingFragment"; - SyntaxKind5[SyntaxKind5["JsxAttribute"] = 294] = "JsxAttribute"; - SyntaxKind5[SyntaxKind5["JsxAttributes"] = 295] = "JsxAttributes"; - SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 296] = "JsxSpreadAttribute"; - SyntaxKind5[SyntaxKind5["JsxExpression"] = 297] = "JsxExpression"; - SyntaxKind5[SyntaxKind5["CaseClause"] = 298] = "CaseClause"; - SyntaxKind5[SyntaxKind5["DefaultClause"] = 299] = "DefaultClause"; - SyntaxKind5[SyntaxKind5["HeritageClause"] = 300] = "HeritageClause"; - SyntaxKind5[SyntaxKind5["CatchClause"] = 301] = "CatchClause"; - SyntaxKind5[SyntaxKind5["AssertClause"] = 302] = "AssertClause"; - SyntaxKind5[SyntaxKind5["AssertEntry"] = 303] = "AssertEntry"; - SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 304] = "ImportTypeAssertionContainer"; - SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 305] = "PropertyAssignment"; - SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 306] = "ShorthandPropertyAssignment"; - SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 307] = "SpreadAssignment"; - SyntaxKind5[SyntaxKind5["EnumMember"] = 308] = "EnumMember"; - SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 309] = "UnparsedPrologue"; - SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 310] = "UnparsedPrepend"; - SyntaxKind5[SyntaxKind5["UnparsedText"] = 311] = "UnparsedText"; - SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 312] = "UnparsedInternalText"; - SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 313] = "UnparsedSyntheticReference"; - SyntaxKind5[SyntaxKind5["SourceFile"] = 314] = "SourceFile"; - SyntaxKind5[SyntaxKind5["Bundle"] = 315] = "Bundle"; - SyntaxKind5[SyntaxKind5["UnparsedSource"] = 316] = "UnparsedSource"; - SyntaxKind5[SyntaxKind5["InputFiles"] = 317] = "InputFiles"; - SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 318] = "JSDocTypeExpression"; - SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 319] = "JSDocNameReference"; - SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 320] = "JSDocMemberName"; - SyntaxKind5[SyntaxKind5["JSDocAllType"] = 321] = "JSDocAllType"; - SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 322] = "JSDocUnknownType"; - SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 323] = "JSDocNullableType"; - SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 324] = "JSDocNonNullableType"; - SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 325] = "JSDocOptionalType"; - SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 326] = "JSDocFunctionType"; - SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 327] = "JSDocVariadicType"; - SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 328] = "JSDocNamepathType"; - SyntaxKind5[SyntaxKind5["JSDoc"] = 329] = "JSDoc"; - SyntaxKind5[SyntaxKind5["JSDocComment"] = 329 /* JSDoc */] = "JSDocComment"; - SyntaxKind5[SyntaxKind5["JSDocText"] = 330] = "JSDocText"; - SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 331] = "JSDocTypeLiteral"; - SyntaxKind5[SyntaxKind5["JSDocSignature"] = 332] = "JSDocSignature"; - SyntaxKind5[SyntaxKind5["JSDocLink"] = 333] = "JSDocLink"; - SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 334] = "JSDocLinkCode"; - SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 335] = "JSDocLinkPlain"; - SyntaxKind5[SyntaxKind5["JSDocTag"] = 336] = "JSDocTag"; - SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 337] = "JSDocAugmentsTag"; - SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 338] = "JSDocImplementsTag"; - SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 339] = "JSDocAuthorTag"; - SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 340] = "JSDocDeprecatedTag"; - SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 341] = "JSDocClassTag"; - SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 342] = "JSDocPublicTag"; - SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 343] = "JSDocPrivateTag"; - SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 344] = "JSDocProtectedTag"; - SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 345] = "JSDocReadonlyTag"; - SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 346] = "JSDocOverrideTag"; - SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 347] = "JSDocCallbackTag"; - SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 348] = "JSDocEnumTag"; - SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 349] = "JSDocParameterTag"; - SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 350] = "JSDocReturnTag"; - SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 351] = "JSDocThisTag"; - SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 352] = "JSDocTypeTag"; - SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 353] = "JSDocTemplateTag"; - SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 354] = "JSDocTypedefTag"; - SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 355] = "JSDocSeeTag"; - SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 356] = "JSDocPropertyTag"; - SyntaxKind5[SyntaxKind5["SyntaxList"] = 357] = "SyntaxList"; - SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 358] = "NotEmittedStatement"; - SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 359] = "PartiallyEmittedExpression"; - SyntaxKind5[SyntaxKind5["CommaListExpression"] = 360] = "CommaListExpression"; - SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 361] = "MergeDeclarationMarker"; - SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 362] = "EndOfDeclarationMarker"; - SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 363] = "SyntheticReferenceExpression"; - SyntaxKind5[SyntaxKind5["Count"] = 364] = "Count"; + SyntaxKind5[SyntaxKind5["OverloadKeyword"] = 164] = "OverloadKeyword"; + SyntaxKind5[SyntaxKind5["OfKeyword"] = 165] = "OfKeyword"; + SyntaxKind5[SyntaxKind5["QualifiedName"] = 166] = "QualifiedName"; + SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 167] = "ComputedPropertyName"; + SyntaxKind5[SyntaxKind5["TypeParameter"] = 168] = "TypeParameter"; + SyntaxKind5[SyntaxKind5["Parameter"] = 169] = "Parameter"; + SyntaxKind5[SyntaxKind5["Decorator"] = 170] = "Decorator"; + SyntaxKind5[SyntaxKind5["PropertySignature"] = 171] = "PropertySignature"; + SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 172] = "PropertyDeclaration"; + SyntaxKind5[SyntaxKind5["AnnotationPropertyDeclaration"] = 173] = "AnnotationPropertyDeclaration"; + SyntaxKind5[SyntaxKind5["OverloadPropertyDeclaration"] = 174] = "OverloadPropertyDeclaration"; + SyntaxKind5[SyntaxKind5["MethodSignature"] = 175] = "MethodSignature"; + SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 176] = "MethodDeclaration"; + SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 177] = "ClassStaticBlockDeclaration"; + SyntaxKind5[SyntaxKind5["Constructor"] = 178] = "Constructor"; + SyntaxKind5[SyntaxKind5["GetAccessor"] = 179] = "GetAccessor"; + SyntaxKind5[SyntaxKind5["SetAccessor"] = 180] = "SetAccessor"; + SyntaxKind5[SyntaxKind5["CallSignature"] = 181] = "CallSignature"; + SyntaxKind5[SyntaxKind5["ConstructSignature"] = 182] = "ConstructSignature"; + SyntaxKind5[SyntaxKind5["IndexSignature"] = 183] = "IndexSignature"; + SyntaxKind5[SyntaxKind5["TypePredicate"] = 184] = "TypePredicate"; + SyntaxKind5[SyntaxKind5["TypeReference"] = 185] = "TypeReference"; + SyntaxKind5[SyntaxKind5["FunctionType"] = 186] = "FunctionType"; + SyntaxKind5[SyntaxKind5["ConstructorType"] = 187] = "ConstructorType"; + SyntaxKind5[SyntaxKind5["TypeQuery"] = 188] = "TypeQuery"; + SyntaxKind5[SyntaxKind5["TypeLiteral"] = 189] = "TypeLiteral"; + SyntaxKind5[SyntaxKind5["ArrayType"] = 190] = "ArrayType"; + SyntaxKind5[SyntaxKind5["TupleType"] = 191] = "TupleType"; + SyntaxKind5[SyntaxKind5["OptionalType"] = 192] = "OptionalType"; + SyntaxKind5[SyntaxKind5["RestType"] = 193] = "RestType"; + SyntaxKind5[SyntaxKind5["UnionType"] = 194] = "UnionType"; + SyntaxKind5[SyntaxKind5["IntersectionType"] = 195] = "IntersectionType"; + SyntaxKind5[SyntaxKind5["ConditionalType"] = 196] = "ConditionalType"; + SyntaxKind5[SyntaxKind5["InferType"] = 197] = "InferType"; + SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 198] = "ParenthesizedType"; + SyntaxKind5[SyntaxKind5["ThisType"] = 199] = "ThisType"; + SyntaxKind5[SyntaxKind5["TypeOperator"] = 200] = "TypeOperator"; + SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 201] = "IndexedAccessType"; + SyntaxKind5[SyntaxKind5["MappedType"] = 202] = "MappedType"; + SyntaxKind5[SyntaxKind5["LiteralType"] = 203] = "LiteralType"; + SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 204] = "NamedTupleMember"; + SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 205] = "TemplateLiteralType"; + SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 206] = "TemplateLiteralTypeSpan"; + SyntaxKind5[SyntaxKind5["ImportType"] = 207] = "ImportType"; + SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 208] = "ObjectBindingPattern"; + SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 209] = "ArrayBindingPattern"; + SyntaxKind5[SyntaxKind5["BindingElement"] = 210] = "BindingElement"; + SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 211] = "ArrayLiteralExpression"; + SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 212] = "ObjectLiteralExpression"; + SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 213] = "PropertyAccessExpression"; + SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 214] = "ElementAccessExpression"; + SyntaxKind5[SyntaxKind5["CallExpression"] = 215] = "CallExpression"; + SyntaxKind5[SyntaxKind5["NewExpression"] = 216] = "NewExpression"; + SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 217] = "TaggedTemplateExpression"; + SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 218] = "TypeAssertionExpression"; + SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 219] = "ParenthesizedExpression"; + SyntaxKind5[SyntaxKind5["FunctionExpression"] = 220] = "FunctionExpression"; + SyntaxKind5[SyntaxKind5["ArrowFunction"] = 221] = "ArrowFunction"; + SyntaxKind5[SyntaxKind5["EtsComponentExpression"] = 222] = "EtsComponentExpression"; + SyntaxKind5[SyntaxKind5["DeleteExpression"] = 223] = "DeleteExpression"; + SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 224] = "TypeOfExpression"; + SyntaxKind5[SyntaxKind5["VoidExpression"] = 225] = "VoidExpression"; + SyntaxKind5[SyntaxKind5["AwaitExpression"] = 226] = "AwaitExpression"; + SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 227] = "PrefixUnaryExpression"; + SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 228] = "PostfixUnaryExpression"; + SyntaxKind5[SyntaxKind5["BinaryExpression"] = 229] = "BinaryExpression"; + SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 230] = "ConditionalExpression"; + SyntaxKind5[SyntaxKind5["TemplateExpression"] = 231] = "TemplateExpression"; + SyntaxKind5[SyntaxKind5["YieldExpression"] = 232] = "YieldExpression"; + SyntaxKind5[SyntaxKind5["SpreadElement"] = 233] = "SpreadElement"; + SyntaxKind5[SyntaxKind5["ClassExpression"] = 234] = "ClassExpression"; + SyntaxKind5[SyntaxKind5["OmittedExpression"] = 235] = "OmittedExpression"; + SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 236] = "ExpressionWithTypeArguments"; + SyntaxKind5[SyntaxKind5["AsExpression"] = 237] = "AsExpression"; + SyntaxKind5[SyntaxKind5["NonNullExpression"] = 238] = "NonNullExpression"; + SyntaxKind5[SyntaxKind5["MetaProperty"] = 239] = "MetaProperty"; + SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 240] = "SyntheticExpression"; + SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 241] = "SatisfiesExpression"; + SyntaxKind5[SyntaxKind5["TemplateSpan"] = 242] = "TemplateSpan"; + SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 243] = "SemicolonClassElement"; + SyntaxKind5[SyntaxKind5["Block"] = 244] = "Block"; + SyntaxKind5[SyntaxKind5["EmptyStatement"] = 245] = "EmptyStatement"; + SyntaxKind5[SyntaxKind5["VariableStatement"] = 246] = "VariableStatement"; + SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 247] = "ExpressionStatement"; + SyntaxKind5[SyntaxKind5["IfStatement"] = 248] = "IfStatement"; + SyntaxKind5[SyntaxKind5["DoStatement"] = 249] = "DoStatement"; + SyntaxKind5[SyntaxKind5["WhileStatement"] = 250] = "WhileStatement"; + SyntaxKind5[SyntaxKind5["ForStatement"] = 251] = "ForStatement"; + SyntaxKind5[SyntaxKind5["ForInStatement"] = 252] = "ForInStatement"; + SyntaxKind5[SyntaxKind5["ForOfStatement"] = 253] = "ForOfStatement"; + SyntaxKind5[SyntaxKind5["ContinueStatement"] = 254] = "ContinueStatement"; + SyntaxKind5[SyntaxKind5["BreakStatement"] = 255] = "BreakStatement"; + SyntaxKind5[SyntaxKind5["ReturnStatement"] = 256] = "ReturnStatement"; + SyntaxKind5[SyntaxKind5["WithStatement"] = 257] = "WithStatement"; + SyntaxKind5[SyntaxKind5["SwitchStatement"] = 258] = "SwitchStatement"; + SyntaxKind5[SyntaxKind5["LabeledStatement"] = 259] = "LabeledStatement"; + SyntaxKind5[SyntaxKind5["ThrowStatement"] = 260] = "ThrowStatement"; + SyntaxKind5[SyntaxKind5["TryStatement"] = 261] = "TryStatement"; + SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 262] = "DebuggerStatement"; + SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 263] = "VariableDeclaration"; + SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 264] = "VariableDeclarationList"; + SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 265] = "FunctionDeclaration"; + SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 266] = "ClassDeclaration"; + SyntaxKind5[SyntaxKind5["StructDeclaration"] = 267] = "StructDeclaration"; + SyntaxKind5[SyntaxKind5["AnnotationDeclaration"] = 268] = "AnnotationDeclaration"; + SyntaxKind5[SyntaxKind5["OverloadDeclaration"] = 269] = "OverloadDeclaration"; + SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 270] = "InterfaceDeclaration"; + SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 271] = "TypeAliasDeclaration"; + SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 272] = "EnumDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 273] = "ModuleDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleBlock"] = 274] = "ModuleBlock"; + SyntaxKind5[SyntaxKind5["CaseBlock"] = 275] = "CaseBlock"; + SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 276] = "NamespaceExportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 277] = "ImportEqualsDeclaration"; + SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 278] = "ImportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportClause"] = 279] = "ImportClause"; + SyntaxKind5[SyntaxKind5["NamespaceImport"] = 280] = "NamespaceImport"; + SyntaxKind5[SyntaxKind5["NamedImports"] = 281] = "NamedImports"; + SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 282] = "ImportSpecifier"; + SyntaxKind5[SyntaxKind5["ExportAssignment"] = 283] = "ExportAssignment"; + SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 284] = "ExportDeclaration"; + SyntaxKind5[SyntaxKind5["NamedExports"] = 285] = "NamedExports"; + SyntaxKind5[SyntaxKind5["NamespaceExport"] = 286] = "NamespaceExport"; + SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 287] = "ExportSpecifier"; + SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 288] = "MissingDeclaration"; + SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 289] = "ExternalModuleReference"; + SyntaxKind5[SyntaxKind5["JsxElement"] = 290] = "JsxElement"; + SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 291] = "JsxSelfClosingElement"; + SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 292] = "JsxOpeningElement"; + SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 293] = "JsxClosingElement"; + SyntaxKind5[SyntaxKind5["JsxFragment"] = 294] = "JsxFragment"; + SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 295] = "JsxOpeningFragment"; + SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 296] = "JsxClosingFragment"; + SyntaxKind5[SyntaxKind5["JsxAttribute"] = 297] = "JsxAttribute"; + SyntaxKind5[SyntaxKind5["JsxAttributes"] = 298] = "JsxAttributes"; + SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 299] = "JsxSpreadAttribute"; + SyntaxKind5[SyntaxKind5["JsxExpression"] = 300] = "JsxExpression"; + SyntaxKind5[SyntaxKind5["CaseClause"] = 301] = "CaseClause"; + SyntaxKind5[SyntaxKind5["DefaultClause"] = 302] = "DefaultClause"; + SyntaxKind5[SyntaxKind5["HeritageClause"] = 303] = "HeritageClause"; + SyntaxKind5[SyntaxKind5["CatchClause"] = 304] = "CatchClause"; + SyntaxKind5[SyntaxKind5["AssertClause"] = 305] = "AssertClause"; + SyntaxKind5[SyntaxKind5["AssertEntry"] = 306] = "AssertEntry"; + SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 307] = "ImportTypeAssertionContainer"; + SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 308] = "PropertyAssignment"; + SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 309] = "ShorthandPropertyAssignment"; + SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 310] = "SpreadAssignment"; + SyntaxKind5[SyntaxKind5["EnumMember"] = 311] = "EnumMember"; + SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 312] = "UnparsedPrologue"; + SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 313] = "UnparsedPrepend"; + SyntaxKind5[SyntaxKind5["UnparsedText"] = 314] = "UnparsedText"; + SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 315] = "UnparsedInternalText"; + SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 316] = "UnparsedSyntheticReference"; + SyntaxKind5[SyntaxKind5["SourceFile"] = 317] = "SourceFile"; + SyntaxKind5[SyntaxKind5["Bundle"] = 318] = "Bundle"; + SyntaxKind5[SyntaxKind5["UnparsedSource"] = 319] = "UnparsedSource"; + SyntaxKind5[SyntaxKind5["InputFiles"] = 320] = "InputFiles"; + SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 321] = "JSDocTypeExpression"; + SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 322] = "JSDocNameReference"; + SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 323] = "JSDocMemberName"; + SyntaxKind5[SyntaxKind5["JSDocAllType"] = 324] = "JSDocAllType"; + SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 325] = "JSDocUnknownType"; + SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 326] = "JSDocNullableType"; + SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 327] = "JSDocNonNullableType"; + SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 328] = "JSDocOptionalType"; + SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 329] = "JSDocFunctionType"; + SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 330] = "JSDocVariadicType"; + SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 331] = "JSDocNamepathType"; + SyntaxKind5[SyntaxKind5["JSDoc"] = 332] = "JSDoc"; + SyntaxKind5[SyntaxKind5["JSDocComment"] = 332 /* JSDoc */] = "JSDocComment"; + SyntaxKind5[SyntaxKind5["JSDocText"] = 333] = "JSDocText"; + SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 334] = "JSDocTypeLiteral"; + SyntaxKind5[SyntaxKind5["JSDocSignature"] = 335] = "JSDocSignature"; + SyntaxKind5[SyntaxKind5["JSDocLink"] = 336] = "JSDocLink"; + SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 337] = "JSDocLinkCode"; + SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 338] = "JSDocLinkPlain"; + SyntaxKind5[SyntaxKind5["JSDocTag"] = 339] = "JSDocTag"; + SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 340] = "JSDocAugmentsTag"; + SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 341] = "JSDocImplementsTag"; + SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 342] = "JSDocAuthorTag"; + SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 343] = "JSDocDeprecatedTag"; + SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 344] = "JSDocClassTag"; + SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 345] = "JSDocPublicTag"; + SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 346] = "JSDocPrivateTag"; + SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 347] = "JSDocProtectedTag"; + SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 348] = "JSDocReadonlyTag"; + SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 349] = "JSDocOverrideTag"; + SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 350] = "JSDocCallbackTag"; + SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 351] = "JSDocEnumTag"; + SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 352] = "JSDocParameterTag"; + SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 353] = "JSDocReturnTag"; + SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 354] = "JSDocThisTag"; + SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 355] = "JSDocTypeTag"; + SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 356] = "JSDocTemplateTag"; + SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 357] = "JSDocTypedefTag"; + SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 358] = "JSDocSeeTag"; + SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 359] = "JSDocPropertyTag"; + SyntaxKind5[SyntaxKind5["SyntaxList"] = 360] = "SyntaxList"; + SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 361] = "NotEmittedStatement"; + SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 362] = "PartiallyEmittedExpression"; + SyntaxKind5[SyntaxKind5["CommaListExpression"] = 363] = "CommaListExpression"; + SyntaxKind5[SyntaxKind5["MergeDeclarationMarker"] = 364] = "MergeDeclarationMarker"; + SyntaxKind5[SyntaxKind5["EndOfDeclarationMarker"] = 365] = "EndOfDeclarationMarker"; + SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 366] = "SyntheticReferenceExpression"; + SyntaxKind5[SyntaxKind5["Count"] = 367] = "Count"; SyntaxKind5[SyntaxKind5["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment"; SyntaxKind5[SyntaxKind5["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment"; SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment"; @@ -6666,15 +6672,15 @@ var SyntaxKind2 = /* @__PURE__ */ ((SyntaxKind5) => { SyntaxKind5[SyntaxKind5["FirstReservedWord"] = 81 /* BreakKeyword */] = "FirstReservedWord"; SyntaxKind5[SyntaxKind5["LastReservedWord"] = 117 /* WithKeyword */] = "LastReservedWord"; SyntaxKind5[SyntaxKind5["FirstKeyword"] = 81 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind5[SyntaxKind5["LastKeyword"] = 164 /* OfKeyword */] = "LastKeyword"; + SyntaxKind5[SyntaxKind5["LastKeyword"] = 165 /* OfKeyword */] = "LastKeyword"; SyntaxKind5[SyntaxKind5["FirstFutureReservedWord"] = 118 /* ImplementsKeyword */] = "FirstFutureReservedWord"; SyntaxKind5[SyntaxKind5["LastFutureReservedWord"] = 126 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 182 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind5[SyntaxKind5["LastTypeNode"] = 205 /* ImportType */] = "LastTypeNode"; + SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 184 /* TypePredicate */] = "FirstTypeNode"; + SyntaxKind5[SyntaxKind5["LastTypeNode"] = 207 /* ImportType */] = "LastTypeNode"; SyntaxKind5[SyntaxKind5["FirstPunctuation"] = 18 /* OpenBraceToken */] = "FirstPunctuation"; SyntaxKind5[SyntaxKind5["LastPunctuation"] = 78 /* CaretEqualsToken */] = "LastPunctuation"; SyntaxKind5[SyntaxKind5["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind5[SyntaxKind5["LastToken"] = 164 /* LastKeyword */] = "LastToken"; + SyntaxKind5[SyntaxKind5["LastToken"] = 165 /* LastKeyword */] = "LastToken"; SyntaxKind5[SyntaxKind5["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; SyntaxKind5[SyntaxKind5["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; SyntaxKind5[SyntaxKind5["FirstLiteralToken"] = 8 /* NumericLiteral */] = "FirstLiteralToken"; @@ -6683,15 +6689,15 @@ var SyntaxKind2 = /* @__PURE__ */ ((SyntaxKind5) => { SyntaxKind5[SyntaxKind5["LastTemplateToken"] = 17 /* TemplateTail */] = "LastTemplateToken"; SyntaxKind5[SyntaxKind5["FirstBinaryOperator"] = 29 /* LessThanToken */] = "FirstBinaryOperator"; SyntaxKind5[SyntaxKind5["LastBinaryOperator"] = 78 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind5[SyntaxKind5["FirstStatement"] = 244 /* VariableStatement */] = "FirstStatement"; - SyntaxKind5[SyntaxKind5["LastStatement"] = 260 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind5[SyntaxKind5["FirstNode"] = 165 /* QualifiedName */] = "FirstNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 318 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 356 /* JSDocPropertyTag */] = "LastJSDocNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 336 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 356 /* JSDocPropertyTag */] = "LastJSDocTagNode"; + SyntaxKind5[SyntaxKind5["FirstStatement"] = 246 /* VariableStatement */] = "FirstStatement"; + SyntaxKind5[SyntaxKind5["LastStatement"] = 262 /* DebuggerStatement */] = "LastStatement"; + SyntaxKind5[SyntaxKind5["FirstNode"] = 166 /* QualifiedName */] = "FirstNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 321 /* JSDocTypeExpression */] = "FirstJSDocNode"; + SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 359 /* JSDocPropertyTag */] = "LastJSDocNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 339 /* JSDocTag */] = "FirstJSDocTagNode"; + SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 359 /* JSDocPropertyTag */] = "LastJSDocTagNode"; SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 127 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 164 /* OfKeyword */] = "LastContextualKeyword"; + SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 165 /* OfKeyword */] = "LastContextualKeyword"; return SyntaxKind5; })(SyntaxKind2 || {}); var NodeFlags2 = /* @__PURE__ */ ((NodeFlags4) => { @@ -11709,6 +11715,7 @@ var textToKeywordObj = { protected: 123 /* ProtectedKeyword */, public: 124 /* PublicKeyword */, override: 163 /* OverrideKeyword */, + overload: 164 /* OverloadKeyword */, out: 146 /* OutKeyword */, readonly: 147 /* ReadonlyKeyword */, require: 148 /* RequireKeyword */, @@ -11739,7 +11746,7 @@ var textToKeywordObj = { yield: 126 /* YieldKeyword */, async: 133 /* AsyncKeyword */, await: 134 /* AwaitKeyword */, - of: 164 /* OfKeyword */ + of: 165 /* OfKeyword */ }; var textToKeyword = new Map2(getEntries(textToKeywordObj)); var textToToken = new Map2(getEntries({ @@ -13814,16 +13821,16 @@ function collapseTextChangeRangesAcrossMultipleVersions(changes) { return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN); } function getTypeParameterOwner(d) { - if (d && d.kind === 167 /* TypeParameter */) { + if (d && d.kind === 168 /* TypeParameter */) { for (let current = d; current; current = current.parent) { - if (isFunctionLike(current) || isClassLike(current) || current.kind === 267 /* InterfaceDeclaration */) { + if (isFunctionLike(current) || isClassLike(current) || current.kind === 270 /* InterfaceDeclaration */) { return current; } } } } function isParameterPropertyDeclaration(node, parent2) { - return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 176 /* Constructor */; + return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 178 /* Constructor */; } function isEmptyBindingPattern(node) { if (isBindingPattern(node)) { @@ -13849,14 +13856,14 @@ function getCombinedFlags(node, getFlags) { node = walkUpBindingElementsAndPatterns(node); } let flags = getFlags(node); - if (node.kind === 261 /* VariableDeclaration */) { + if (node.kind === 263 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 262 /* VariableDeclarationList */) { + if (node && node.kind === 264 /* VariableDeclarationList */) { flags |= getFlags(node); node = node.parent; } - if (node && node.kind === 244 /* VariableStatement */) { + if (node && node.kind === 246 /* VariableStatement */) { flags |= getFlags(node); } return flags; @@ -13977,30 +13984,30 @@ function nameForNamelessJSDocTypedef(declaration) { return getDeclarationIdentifier(hostNode); } switch (hostNode.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); } break; - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: let expr = hostNode.expression; - if (expr.kind === 227 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { + if (expr.kind === 229 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { expr = expr.left; } switch (expr.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return expr.name; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: const arg = expr.argumentExpression; if (isIdentifier(arg)) { return arg; } } break; - case 217 /* ParenthesizedExpression */: { + case 219 /* ParenthesizedExpression */: { return getDeclarationIdentifier(hostNode.expression); } - case 257 /* LabeledStatement */: { + case 259 /* LabeledStatement */: { if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { return getDeclarationIdentifier(hostNode.statement); } @@ -14031,16 +14038,16 @@ function getNonAssignedNameOfDeclaration(declaration) { switch (declaration.kind) { case 79 /* Identifier */: return declaration; - case 356 /* JSDocPropertyTag */: - case 349 /* JSDocParameterTag */: { + case 359 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: { const { name } = declaration; - if (name.kind === 165 /* QualifiedName */) { + if (name.kind === 166 /* QualifiedName */) { return name.right; } break; } - case 213 /* CallExpression */: - case 227 /* BinaryExpression */: { + case 215 /* CallExpression */: + case 229 /* BinaryExpression */: { const expr2 = declaration; switch (getAssignmentDeclarationKind(expr2)) { case 1 /* ExportsProperty */: @@ -14056,15 +14063,15 @@ function getNonAssignedNameOfDeclaration(declaration) { return void 0; } } - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 348 /* JSDocEnumTag */: + case 351 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); - case 280 /* ExportAssignment */: { + case 283 /* ExportAssignment */: { const { expression } = declaration; return isIdentifier(expression) ? expression : void 0; } - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: const expr = declaration; if (isBindableStaticElementAccessExpression(expr)) { return expr.argumentExpression; @@ -14278,10 +14285,10 @@ function getAllJSDocTagsOfKind(node, kind) { 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 === 330 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); + return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 333 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); } function formatJSDocLink(link) { - const kind = link.kind === 333 /* JSDocLink */ ? "link" : link.kind === 334 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; + const kind = link.kind === 336 /* JSDocLink */ ? "link" : link.kind === 337 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; const name = link.name ? entityNameToString(link.name) : ""; const space = link.name && link.text.startsWith("://") ? "" : " "; return `{@${kind} ${name}${space}${link.text}}`; @@ -14291,7 +14298,7 @@ function getEffectiveTypeParameterDeclarations(node) { return emptyArray; } if (isJSDocTypeAlias(node)) { - Debug.assert(node.parent.kind === 329 /* JSDoc */); + Debug.assert(node.parent.kind === 332 /* JSDoc */); return flatMap(node.parent.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0); } if (node.typeParameters) { @@ -14319,7 +14326,7 @@ function isMemberName(node) { return node.kind === 79 /* Identifier */ || node.kind === 80 /* PrivateIdentifier */; } function isGetOrSetAccessorDeclaration(node) { - return node.kind === 178 /* SetAccessor */ || node.kind === 177 /* GetAccessor */; + return node.kind === 180 /* SetAccessor */ || node.kind === 179 /* GetAccessor */; } function isPropertyAccessChain(node) { return isPropertyAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); @@ -14332,7 +14339,7 @@ function isCallChain(node) { } function isOptionalChain(node) { const kind = node.kind; - return !!(node.flags & 32 /* OptionalChain */) && (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */ || kind === 213 /* CallExpression */ || kind === 236 /* NonNullExpression */); + return !!(node.flags & 32 /* OptionalChain */) && (kind === 213 /* PropertyAccessExpression */ || kind === 214 /* ElementAccessExpression */ || kind === 215 /* CallExpression */ || kind === 238 /* NonNullExpression */); } function isOptionalChainRoot(node) { return isOptionalChain(node) && !isNonNullExpression(node) && !!node.questionDotToken; @@ -14344,7 +14351,7 @@ function isOutermostOptionalChain(node) { return !isOptionalChain(node.parent) || isOptionalChainRoot(node.parent) || node !== node.parent.expression; } function isNullishCoalesce(node) { - return node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; + return node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; } function isConstTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "const" && !node.typeArguments; @@ -14356,34 +14363,34 @@ function isNonNullChain(node) { return isNonNullExpression(node) && !!(node.flags & 32 /* OptionalChain */); } function isBreakOrContinueStatement(node) { - return node.kind === 253 /* BreakStatement */ || node.kind === 252 /* ContinueStatement */; + return node.kind === 255 /* BreakStatement */ || node.kind === 254 /* ContinueStatement */; } function isNamedExportBindings(node) { - return node.kind === 283 /* NamespaceExport */ || node.kind === 282 /* NamedExports */; + return node.kind === 286 /* NamespaceExport */ || node.kind === 285 /* NamedExports */; } function isUnparsedTextLike(node) { switch (node.kind) { - case 311 /* UnparsedText */: - case 312 /* UnparsedInternalText */: + case 314 /* UnparsedText */: + case 315 /* UnparsedInternalText */: return true; default: return false; } } function isUnparsedNode(node) { - return isUnparsedTextLike(node) || node.kind === 309 /* UnparsedPrologue */ || node.kind === 313 /* UnparsedSyntheticReference */; + return isUnparsedTextLike(node) || node.kind === 312 /* UnparsedPrologue */ || node.kind === 316 /* UnparsedSyntheticReference */; } function isJSDocPropertyLikeTag(node) { - return node.kind === 356 /* JSDocPropertyTag */ || node.kind === 349 /* JSDocParameterTag */; + return node.kind === 359 /* JSDocPropertyTag */ || node.kind === 352 /* JSDocParameterTag */; } function isNode(node) { return isNodeKind(node.kind); } function isNodeKind(kind) { - return kind >= 165 /* FirstNode */; + return kind >= 166 /* FirstNode */; } function isTokenKind(kind) { - return kind >= 0 /* FirstToken */ && kind <= 164 /* LastToken */; + return kind >= 0 /* FirstToken */ && kind <= 165 /* LastToken */; } function isToken(n) { return isTokenKind(n.kind); @@ -14399,11 +14406,11 @@ function isLiteralExpression(node) { } function isLiteralExpressionOfObject(node) { switch (node.kind) { - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 211 /* ArrayLiteralExpression */: case 13 /* RegularExpressionLiteral */: - case 218 /* FunctionExpression */: - case 232 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 234 /* ClassExpression */: return true; } return false; @@ -14423,13 +14430,13 @@ function isImportOrExportSpecifier(node) { } function isTypeOnlyImportOrExportDeclaration(node) { switch (node.kind) { - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return node.parent.isTypeOnly; - case 276 /* ImportClause */: - case 274 /* ImportEqualsDeclaration */: + case 279 /* ImportClause */: + case 277 /* ImportEqualsDeclaration */: return node.isTypeOnly; default: return false; @@ -14485,15 +14492,15 @@ function isModifier(node) { } function isEntityName(node) { const kind = node.kind; - return kind === 165 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 166 /* 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 === 166 /* ComputedPropertyName */; + return kind === 79 /* Identifier */ || kind === 80 /* PrivateIdentifier */ || kind === 10 /* StringLiteral */ || kind === 8 /* NumericLiteral */ || kind === 167 /* ComputedPropertyName */; } function isBindingName(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 206 /* ObjectBindingPattern */ || kind === 207 /* ArrayBindingPattern */; + return kind === 79 /* Identifier */ || kind === 208 /* ObjectBindingPattern */ || kind === 209 /* ArrayBindingPattern */; } function isFunctionLike(node) { return !!node && isFunctionLikeKind(node.kind); @@ -14509,13 +14516,13 @@ function isBooleanLiteral(node) { } function isFunctionLikeDeclarationKind(kind) { switch (kind) { - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return true; default: return false; @@ -14523,14 +14530,14 @@ function isFunctionLikeDeclarationKind(kind) { } function isFunctionLikeKind(kind) { switch (kind) { - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 332 /* JSDocSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 184 /* FunctionType */: - case 326 /* JSDocFunctionType */: - case 185 /* ConstructorType */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 335 /* JSDocSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: + case 186 /* FunctionType */: + case 329 /* JSDocFunctionType */: + case 187 /* ConstructorType */: return true; default: return isFunctionLikeDeclarationKind(kind); @@ -14541,29 +14548,33 @@ function isFunctionOrModuleBlock(node) { } function isAnnotationElement(node) { const kind = node.kind; - return kind === 172 /* AnnotationPropertyDeclaration */; + return kind === 173 /* AnnotationPropertyDeclaration */; +} +function isOverloadElement(node) { + const kind = node.kind; + return kind === 174 /* OverloadPropertyDeclaration */; } function isClassElement(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 171 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 241 /* SemicolonClassElement */; + return kind === 178 /* Constructor */ || kind === 172 /* PropertyDeclaration */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 183 /* IndexSignature */ || kind === 177 /* ClassStaticBlockDeclaration */ || kind === 243 /* SemicolonClassElement */; } function isClassLike(node) { - return node && (node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */ || node.kind === 265 /* StructDeclaration */); + return node && (node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */ || node.kind === 267 /* StructDeclaration */); } function isStruct(node) { - return node && node.kind === 265 /* StructDeclaration */; + return node && node.kind === 267 /* StructDeclaration */; } function isAccessor(node) { - return node && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */); + return node && (node.kind === 179 /* GetAccessor */ || node.kind === 180 /* SetAccessor */); } function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); } function isMethodOrAccessor(node) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return true; default: return false; @@ -14571,10 +14582,10 @@ function isMethodOrAccessor(node) { } function isNamedClassElement(node) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 171 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 172 /* PropertyDeclaration */: return true; default: return false; @@ -14585,22 +14596,22 @@ function isModifierLike(node) { } function isTypeElement(node) { const kind = node.kind; - return kind === 180 /* ConstructSignature */ || kind === 179 /* CallSignature */ || kind === 170 /* PropertySignature */ || kind === 173 /* MethodSignature */ || kind === 181 /* IndexSignature */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 182 /* ConstructSignature */ || kind === 181 /* CallSignature */ || kind === 171 /* PropertySignature */ || kind === 175 /* MethodSignature */ || kind === 183 /* IndexSignature */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function isClassOrTypeElement(node) { return isTypeElement(node) || isClassElement(node); } function isObjectLiteralElementLike(node) { const kind = node.kind; - return kind === 305 /* PropertyAssignment */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 307 /* SpreadAssignment */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 308 /* PropertyAssignment */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 310 /* SpreadAssignment */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } function isFunctionOrConstructorTypeNode(node) { switch (node.kind) { - case 184 /* FunctionType */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: return true; } return false; @@ -14608,23 +14619,23 @@ function isFunctionOrConstructorTypeNode(node) { function isBindingPattern(node) { if (node) { const kind = node.kind; - return kind === 207 /* ArrayBindingPattern */ || kind === 206 /* ObjectBindingPattern */; + return kind === 209 /* ArrayBindingPattern */ || kind === 208 /* ObjectBindingPattern */; } return false; } function isAssignmentPattern(node) { const kind = node.kind; - return kind === 209 /* ArrayLiteralExpression */ || kind === 210 /* ObjectLiteralExpression */; + return kind === 211 /* ArrayLiteralExpression */ || kind === 212 /* ObjectLiteralExpression */; } function isArrayBindingElement(node) { const kind = node.kind; - return kind === 208 /* BindingElement */ || kind === 233 /* OmittedExpression */; + return kind === 210 /* BindingElement */ || kind === 235 /* OmittedExpression */; } function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: return true; } return false; @@ -14634,78 +14645,78 @@ function isBindingOrAssignmentPattern(node) { } function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 206 /* ObjectBindingPattern */: - case 210 /* ObjectLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 212 /* ObjectLiteralExpression */: return true; } return false; } function isObjectBindingOrAssignmentElement(node) { switch (node.kind) { - case 208 /* BindingElement */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 307 /* SpreadAssignment */: + case 210 /* BindingElement */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 310 /* SpreadAssignment */: return true; } return false; } function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 209 /* ArrayBindingPattern */: + case 211 /* ArrayLiteralExpression */: return true; } return false; } function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) { const kind = node.kind; - return kind === 211 /* PropertyAccessExpression */ || kind === 165 /* QualifiedName */ || kind === 205 /* ImportType */; + return kind === 213 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */ || kind === 207 /* ImportType */; } function isPropertyAccessOrQualifiedName(node) { const kind = node.kind; - return kind === 211 /* PropertyAccessExpression */ || kind === 165 /* QualifiedName */; + return kind === 213 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */; } function isCallLikeExpression(node) { switch (node.kind) { - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 169 /* Decorator */: - case 220 /* EtsComponentExpression */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 217 /* TaggedTemplateExpression */: + case 170 /* Decorator */: + case 222 /* EtsComponentExpression */: return true; default: return false; } } function isCallOrNewExpression(node) { - return node.kind === 213 /* CallExpression */ || node.kind === 214 /* NewExpression */; + return node.kind === 215 /* CallExpression */ || node.kind === 216 /* NewExpression */; } function isTemplateLiteral(node) { const kind = node.kind; - return kind === 229 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; + return kind === 231 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); } function isLeftHandSideExpressionKind(kind) { switch (kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 214 /* NewExpression */: - case 213 /* CallExpression */: - case 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: - case 215 /* TaggedTemplateExpression */: - case 209 /* ArrayLiteralExpression */: - case 217 /* ParenthesizedExpression */: - case 210 /* ObjectLiteralExpression */: - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 220 /* EtsComponentExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 216 /* NewExpression */: + case 215 /* CallExpression */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: + case 217 /* TaggedTemplateExpression */: + case 211 /* ArrayLiteralExpression */: + case 219 /* ParenthesizedExpression */: + case 212 /* ObjectLiteralExpression */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 222 /* EtsComponentExpression */: case 79 /* Identifier */: case 80 /* PrivateIdentifier */: case 13 /* RegularExpressionLiteral */: @@ -14713,15 +14724,15 @@ function isLeftHandSideExpressionKind(kind) { case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: case 96 /* FalseKeyword */: case 105 /* NullKeyword */: case 109 /* ThisKeyword */: case 111 /* TrueKeyword */: case 107 /* SuperKeyword */: - case 236 /* NonNullExpression */: - case 234 /* ExpressionWithTypeArguments */: - case 237 /* MetaProperty */: + case 238 /* NonNullExpression */: + case 236 /* ExpressionWithTypeArguments */: + case 239 /* MetaProperty */: case 101 /* ImportKeyword */: return true; default: @@ -14733,13 +14744,13 @@ function isUnaryExpression(node) { } function isUnaryExpressionKind(kind) { switch (kind) { - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: - case 221 /* DeleteExpression */: - case 222 /* TypeOfExpression */: - case 223 /* VoidExpression */: - case 224 /* AwaitExpression */: - case 216 /* TypeAssertionExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: + case 223 /* DeleteExpression */: + case 224 /* TypeOfExpression */: + case 225 /* VoidExpression */: + case 226 /* AwaitExpression */: + case 218 /* TypeAssertionExpression */: return true; default: return isLeftHandSideExpressionKind(kind); @@ -14747,9 +14758,9 @@ function isUnaryExpressionKind(kind) { } function isUnaryExpressionWithWrite(expr) { switch (expr.kind) { - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return true; - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return expr.operator === 45 /* PlusPlusToken */ || expr.operator === 46 /* MinusMinusToken */; default: return false; @@ -14760,16 +14771,16 @@ function isExpression(node) { } function isExpressionKind(kind) { switch (kind) { - case 228 /* ConditionalExpression */: - case 230 /* YieldExpression */: - case 219 /* ArrowFunction */: - case 227 /* BinaryExpression */: - case 231 /* SpreadElement */: - case 235 /* AsExpression */: - case 233 /* OmittedExpression */: - case 360 /* CommaListExpression */: - case 359 /* PartiallyEmittedExpression */: - case 239 /* SatisfiesExpression */: + case 230 /* ConditionalExpression */: + case 232 /* YieldExpression */: + case 221 /* ArrowFunction */: + case 229 /* BinaryExpression */: + case 233 /* SpreadElement */: + case 237 /* AsExpression */: + case 235 /* OmittedExpression */: + case 363 /* CommaListExpression */: + case 362 /* PartiallyEmittedExpression */: + case 241 /* SatisfiesExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -14777,20 +14788,20 @@ function isExpressionKind(kind) { } function isAssertionExpression(node) { const kind = node.kind; - return kind === 216 /* TypeAssertionExpression */ || kind === 235 /* AsExpression */; + return kind === 218 /* TypeAssertionExpression */ || kind === 237 /* AsExpression */; } function isNotEmittedOrPartiallyEmittedNode(node) { return isNotEmittedStatement(node) || isPartiallyEmittedExpression(node); } function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return true; - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -14849,7 +14860,7 @@ function allImportsAreAnnotations(imports, resolver) { }); } function isForInOrOfStatement(node) { - return node.kind === 250 /* ForInStatement */ || node.kind === 251 /* ForOfStatement */; + return node.kind === 252 /* ForInStatement */ || node.kind === 253 /* ForOfStatement */; } function isConciseBody(node) { return isBlock(node) || isExpression(node); @@ -14862,35 +14873,35 @@ function isForInitializer(node) { } function isModuleBody(node) { const kind = node.kind; - return kind === 271 /* ModuleBlock */ || kind === 270 /* ModuleDeclaration */ || kind === 79 /* Identifier */; + return kind === 274 /* ModuleBlock */ || kind === 273 /* ModuleDeclaration */ || kind === 79 /* Identifier */; } function isNamespaceBody(node) { const kind = node.kind; - return kind === 271 /* ModuleBlock */ || kind === 270 /* ModuleDeclaration */; + return kind === 274 /* ModuleBlock */ || kind === 273 /* ModuleDeclaration */; } function isJSDocNamespaceBody(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 270 /* ModuleDeclaration */; + return kind === 79 /* Identifier */ || kind === 273 /* ModuleDeclaration */; } function isNamedImportBindings(node) { const kind = node.kind; - return kind === 278 /* NamedImports */ || kind === 277 /* NamespaceImport */; + return kind === 281 /* NamedImports */ || kind === 280 /* NamespaceImport */; } function isModuleOrEnumDeclaration(node) { - return node.kind === 270 /* ModuleDeclaration */ || node.kind === 269 /* EnumDeclaration */; + return node.kind === 273 /* ModuleDeclaration */ || node.kind === 272 /* EnumDeclaration */; } function isDeclarationKind(kind) { - return kind === 219 /* ArrowFunction */ || kind === 208 /* BindingElement */ || kind === 264 /* ClassDeclaration */ || kind === 232 /* ClassExpression */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 265 /* StructDeclaration */ || kind === 266 /* AnnotationDeclaration */ || kind === 176 /* Constructor */ || kind === 269 /* EnumDeclaration */ || kind === 308 /* EnumMember */ || kind === 284 /* ExportSpecifier */ || kind === 263 /* FunctionDeclaration */ || kind === 218 /* FunctionExpression */ || kind === 177 /* GetAccessor */ || kind === 276 /* ImportClause */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 279 /* ImportSpecifier */ || kind === 267 /* InterfaceDeclaration */ || kind === 294 /* JsxAttribute */ || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 270 /* ModuleDeclaration */ || kind === 273 /* NamespaceExportDeclaration */ || kind === 277 /* NamespaceImport */ || kind === 283 /* NamespaceExport */ || kind === 168 /* Parameter */ || kind === 305 /* PropertyAssignment */ || kind === 171 /* PropertyDeclaration */ || kind === 172 /* AnnotationPropertyDeclaration */ || kind === 170 /* PropertySignature */ || kind === 178 /* SetAccessor */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 268 /* TypeAliasDeclaration */ || kind === 167 /* TypeParameter */ || kind === 261 /* VariableDeclaration */ || kind === 354 /* JSDocTypedefTag */ || kind === 347 /* JSDocCallbackTag */ || kind === 356 /* JSDocPropertyTag */; + return kind === 221 /* ArrowFunction */ || kind === 210 /* BindingElement */ || kind === 266 /* ClassDeclaration */ || kind === 234 /* ClassExpression */ || kind === 177 /* ClassStaticBlockDeclaration */ || kind === 267 /* StructDeclaration */ || kind === 268 /* AnnotationDeclaration */ || kind === 174 /* OverloadPropertyDeclaration */ || kind === 178 /* Constructor */ || kind === 272 /* EnumDeclaration */ || kind === 311 /* EnumMember */ || kind === 287 /* ExportSpecifier */ || kind === 265 /* FunctionDeclaration */ || kind === 220 /* FunctionExpression */ || kind === 179 /* GetAccessor */ || kind === 279 /* ImportClause */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 282 /* ImportSpecifier */ || kind === 270 /* InterfaceDeclaration */ || kind === 297 /* JsxAttribute */ || kind === 176 /* MethodDeclaration */ || kind === 175 /* MethodSignature */ || kind === 273 /* ModuleDeclaration */ || kind === 276 /* NamespaceExportDeclaration */ || kind === 280 /* NamespaceImport */ || kind === 286 /* NamespaceExport */ || kind === 169 /* Parameter */ || kind === 308 /* PropertyAssignment */ || kind === 172 /* PropertyDeclaration */ || kind === 173 /* AnnotationPropertyDeclaration */ || kind === 171 /* PropertySignature */ || kind === 180 /* SetAccessor */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 271 /* TypeAliasDeclaration */ || kind === 168 /* TypeParameter */ || kind === 263 /* VariableDeclaration */ || kind === 357 /* JSDocTypedefTag */ || kind === 350 /* JSDocCallbackTag */ || kind === 359 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { - return kind === 263 /* FunctionDeclaration */ || kind === 285 /* MissingDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 265 /* StructDeclaration */ || kind === 266 /* AnnotationDeclaration */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 269 /* EnumDeclaration */ || kind === 270 /* ModuleDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 281 /* ExportDeclaration */ || kind === 280 /* ExportAssignment */ || kind === 273 /* NamespaceExportDeclaration */; + return kind === 265 /* FunctionDeclaration */ || kind === 288 /* MissingDeclaration */ || kind === 266 /* ClassDeclaration */ || kind === 267 /* StructDeclaration */ || kind === 268 /* AnnotationDeclaration */ || kind === 269 /* OverloadDeclaration */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 272 /* EnumDeclaration */ || kind === 273 /* ModuleDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 284 /* ExportDeclaration */ || kind === 283 /* ExportAssignment */ || kind === 276 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 253 /* BreakStatement */ || kind === 252 /* ContinueStatement */ || kind === 260 /* DebuggerStatement */ || kind === 247 /* DoStatement */ || kind === 245 /* ExpressionStatement */ || kind === 243 /* EmptyStatement */ || kind === 250 /* ForInStatement */ || kind === 251 /* ForOfStatement */ || kind === 249 /* ForStatement */ || kind === 246 /* IfStatement */ || kind === 257 /* LabeledStatement */ || kind === 254 /* ReturnStatement */ || kind === 256 /* SwitchStatement */ || kind === 258 /* ThrowStatement */ || kind === 259 /* TryStatement */ || kind === 244 /* VariableStatement */ || kind === 248 /* WhileStatement */ || kind === 255 /* WithStatement */ || kind === 358 /* NotEmittedStatement */ || kind === 362 /* EndOfDeclarationMarker */ || kind === 361 /* MergeDeclarationMarker */; + return kind === 255 /* BreakStatement */ || kind === 254 /* ContinueStatement */ || kind === 262 /* DebuggerStatement */ || kind === 249 /* DoStatement */ || kind === 247 /* ExpressionStatement */ || kind === 245 /* EmptyStatement */ || kind === 252 /* ForInStatement */ || kind === 253 /* ForOfStatement */ || kind === 251 /* ForStatement */ || kind === 248 /* IfStatement */ || kind === 259 /* LabeledStatement */ || kind === 256 /* ReturnStatement */ || kind === 258 /* SwitchStatement */ || kind === 260 /* ThrowStatement */ || kind === 261 /* TryStatement */ || kind === 246 /* VariableStatement */ || kind === 250 /* WhileStatement */ || kind === 257 /* WithStatement */ || kind === 361 /* NotEmittedStatement */ || kind === 365 /* EndOfDeclarationMarker */ || kind === 364 /* MergeDeclarationMarker */; } function isDeclaration(node) { - if (node.kind === 167 /* TypeParameter */) { - return node.parent && node.parent.kind !== 353 /* JSDocTemplateTag */ || isInJSFile(node); + if (node.kind === 168 /* TypeParameter */) { + return node.parent && node.parent.kind !== 356 /* JSDocTemplateTag */ || isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -14905,10 +14916,10 @@ function isStatement(node) { return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); } function isBlockStatement(node) { - if (node.kind !== 242 /* Block */) + if (node.kind !== 244 /* Block */) return false; if (node.parent !== void 0) { - if (node.parent.kind === 259 /* TryStatement */ || node.parent.kind === 301 /* CatchClause */) { + if (node.parent.kind === 261 /* TryStatement */ || node.parent.kind === 304 /* CatchClause */) { return false; } } @@ -14916,50 +14927,50 @@ function isBlockStatement(node) { } function isStatementOrBlock(node) { const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 242 /* Block */; + return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 244 /* Block */; } function isModuleReference(node) { const kind = node.kind; - return kind === 286 /* ExternalModuleReference */ || kind === 165 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 289 /* ExternalModuleReference */ || kind === 166 /* QualifiedName */ || kind === 79 /* Identifier */; } function isJsxTagNameExpression(node) { const kind = node.kind; - return kind === 109 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 211 /* PropertyAccessExpression */; + return kind === 109 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 213 /* PropertyAccessExpression */; } function isJsxChild(node) { const kind = node.kind; - return kind === 287 /* JsxElement */ || kind === 297 /* JsxExpression */ || kind === 288 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 291 /* JsxFragment */; + return kind === 290 /* JsxElement */ || kind === 300 /* JsxExpression */ || kind === 291 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 294 /* JsxFragment */; } function isJsxAttributeLike(node) { const kind = node.kind; - return kind === 294 /* JsxAttribute */ || kind === 296 /* JsxSpreadAttribute */; + return kind === 297 /* JsxAttribute */ || kind === 299 /* JsxSpreadAttribute */; } function isStringLiteralOrJsxExpression(node) { const kind = node.kind; - return kind === 10 /* StringLiteral */ || kind === 297 /* JsxExpression */; + return kind === 10 /* StringLiteral */ || kind === 300 /* JsxExpression */; } function isJsxOpeningLikeElement(node) { const kind = node.kind; - return kind === 289 /* JsxOpeningElement */ || kind === 288 /* JsxSelfClosingElement */; + return kind === 292 /* JsxOpeningElement */ || kind === 291 /* JsxSelfClosingElement */; } function isCaseOrDefaultClause(node) { const kind = node.kind; - return kind === 298 /* CaseClause */ || kind === 299 /* DefaultClause */; + return kind === 301 /* CaseClause */ || kind === 302 /* DefaultClause */; } function isJSDocNode(node) { - return node.kind >= 318 /* FirstJSDocNode */ && node.kind <= 356 /* LastJSDocNode */; + return node.kind >= 321 /* FirstJSDocNode */ && node.kind <= 359 /* LastJSDocNode */; } function isJSDocCommentContainingNode(node) { - return node.kind === 329 /* JSDoc */ || node.kind === 328 /* JSDocNamepathType */ || node.kind === 330 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 332 /* JSDoc */ || node.kind === 331 /* JSDocNamepathType */ || node.kind === 333 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } function isJSDocTag(node) { - return node.kind >= 336 /* FirstJSDocTagNode */ && node.kind <= 356 /* LastJSDocTagNode */; + return node.kind >= 339 /* FirstJSDocTagNode */ && node.kind <= 359 /* LastJSDocTagNode */; } function isSetAccessor(node) { - return node.kind === 178 /* SetAccessor */; + return node.kind === 180 /* SetAccessor */; } function isGetAccessor(node) { - return node.kind === 177 /* GetAccessor */; + return node.kind === 179 /* GetAccessor */; } function hasJSDocNodes(node) { const { jsDoc } = node; @@ -14973,23 +14984,23 @@ function hasInitializer(node) { } function hasOnlyExpressionInitializer(node) { switch (node.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 305 /* PropertyAssignment */: - case 308 /* EnumMember */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 308 /* PropertyAssignment */: + case 311 /* EnumMember */: return true; default: return false; } } function isObjectLiteralElement(node) { - return node.kind === 294 /* JsxAttribute */ || node.kind === 296 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); + return node.kind === 297 /* JsxAttribute */ || node.kind === 299 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); } function isTypeReferenceType(node) { - return node.kind === 183 /* TypeReference */ || node.kind === 234 /* ExpressionWithTypeArguments */; + return node.kind === 185 /* TypeReference */ || node.kind === 236 /* ExpressionWithTypeArguments */; } var MAX_SMI_X86 = 1073741823; function guessIndentation(lines) { @@ -15017,7 +15028,7 @@ function isStringLiteralLike(node) { return node.kind === 10 /* StringLiteral */ || node.kind === 14 /* NoSubstitutionTemplateLiteral */; } function isJSDocLinkLike(node) { - return node.kind === 333 /* JSDocLink */ || node.kind === 334 /* JSDocLinkCode */ || node.kind === 335 /* JSDocLinkPlain */; + return node.kind === 336 /* JSDocLink */ || node.kind === 337 /* JSDocLinkCode */ || node.kind === 338 /* JSDocLinkPlain */; } function hasRestParameter(s) { const last2 = lastOrUndefined(s.parameters); @@ -15025,7 +15036,7 @@ function hasRestParameter(s) { } function isRestParameter(node) { const type = isJSDocParameterTag(node) ? node.typeExpression && node.typeExpression.type : node.type; - return node.dotDotDotToken !== void 0 || !!type && type.kind === 327 /* JSDocVariadicType */; + return node.dotDotDotToken !== void 0 || !!type && type.kind === 330 /* JSDocVariadicType */; } var _MemoryUtils = class { static tryGC() { @@ -15249,7 +15260,7 @@ function aggregateChildData(node) { } } function getSourceFileOfNode(node) { - while (node && node.kind !== 314 /* SourceFile */) { + while (node && node.kind !== 317 /* SourceFile */) { node = node.parent; } return node; @@ -15262,11 +15273,11 @@ function isPlainJsFile(file, checkJs) { } function isStatementWithLocals(node) { switch (node.kind) { - case 242 /* Block */: - case 272 /* CaseBlock */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 244 /* Block */: + case 275 /* CaseBlock */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: return true; } return false; @@ -15423,7 +15434,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) { if (includeJsDoc && hasJSDocNodes(node)) { return getTokenPosOfNode(node.jsDoc[0], sourceFile); } - if (node.kind === 357 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 360 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return node.virtual ? node.pos : skipTrivia( @@ -15626,7 +15637,7 @@ function isBlockOrCatchScoped(declaration) { } function isCatchClauseVariableDeclarationOrBindingElement(declaration) { const node = getRootDeclaration(declaration); - return node.kind === 261 /* VariableDeclaration */ && node.parent.kind === 301 /* CatchClause */; + return node.kind === 263 /* VariableDeclaration */ && node.parent.kind === 304 /* CatchClause */; } function isAmbientModule(node) { return isModuleDeclaration(node) && (node.name.kind === 10 /* StringLiteral */ || isGlobalScopeAugmentation(node)); @@ -15644,10 +15655,10 @@ function isShorthandAmbientModuleSymbol(moduleSymbol) { return isShorthandAmbientModule(moduleSymbol.valueDeclaration); } function isShorthandAmbientModule(node) { - return !!node && node.kind === 270 /* ModuleDeclaration */ && !node.body; + return !!node && node.kind === 273 /* ModuleDeclaration */ && !node.body; } function isBlockScopedContainerTopLevel(node) { - return node.kind === 314 /* SourceFile */ || node.kind === 270 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); + return node.kind === 317 /* SourceFile */ || node.kind === 273 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); } function isGlobalScopeAugmentation(module2) { return !!(module2.flags & 1024 /* GlobalAugmentation */); @@ -15657,9 +15668,9 @@ function isExternalModuleAugmentation(node) { } function isModuleAugmentationExternal(node) { switch (node.parent.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: return isExternalModule(node.parent); - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); } return false; @@ -15707,34 +15718,34 @@ function isAmbientPropertyDeclaration(node) { } function isBlockScope(node, parentNode) { switch (node.kind) { - case 314 /* SourceFile */: - case 272 /* CaseBlock */: - case 301 /* CatchClause */: - case 270 /* ModuleDeclaration */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 175 /* ClassStaticBlockDeclaration */: + case 317 /* SourceFile */: + case 275 /* CaseBlock */: + case 304 /* CatchClause */: + case 273 /* ModuleDeclaration */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return true; - case 242 /* Block */: + case 244 /* Block */: return !isFunctionLikeOrClassStaticBlockDeclaration(parentNode); } return false; } function isDeclarationWithTypeParameters(node) { switch (node.kind) { - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: - case 332 /* JSDocSignature */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: + case 335 /* JSDocSignature */: return true; default: assertType(node); @@ -15743,26 +15754,26 @@ function isDeclarationWithTypeParameters(node) { } function isDeclarationWithTypeParameterChildren(node) { switch (node.kind) { - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 326 /* JSDocFunctionType */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 353 /* JSDocTemplateTag */: - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 175 /* MethodSignature */: + case 183 /* IndexSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 329 /* JSDocFunctionType */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 356 /* JSDocTemplateTag */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return true; default: assertType(node); @@ -15771,8 +15782,8 @@ function isDeclarationWithTypeParameterChildren(node) { } function isAnyImportSyntax(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: return true; default: return false; @@ -15783,17 +15794,18 @@ function isAnyImportOrBareOrAccessedRequire(node) { } function isLateVisibilityPaintedStatement(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 244 /* VariableStatement */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 263 /* FunctionDeclaration */: - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 246 /* VariableStatement */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 265 /* FunctionDeclaration */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: return true; default: return false; @@ -15826,7 +15838,7 @@ function getNameFromIndexInfo(info) { return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : void 0; } function isComputedNonLiteralName(name) { - return name.kind === 166 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); + return name.kind === 167 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); } function tryGetTextOfPropertyName(name) { switch (name.kind) { @@ -15837,7 +15849,7 @@ function tryGetTextOfPropertyName(name) { case 8 /* NumericLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return void 0; @@ -15855,15 +15867,15 @@ function entityNameToString(name) { case 80 /* PrivateIdentifier */: case 79 /* Identifier */: return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { return Debug.assertNever(name.name); } - case 320 /* JSDocMemberName */: + case 323 /* JSDocMemberName */: return entityNameToString(name.left) + entityNameToString(name.right); default: return Debug.assertNever(name); @@ -15943,7 +15955,7 @@ function getSpanOfTokenAtPosition(sourceFile, pos) { } function getErrorSpanForArrowFunction(sourceFile, node) { const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 242 /* Block */) { + if (node.body && node.body.kind === 244 /* Block */) { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { @@ -15955,37 +15967,37 @@ function getErrorSpanForArrowFunction(sourceFile, node) { function getErrorSpanForNode(sourceFile, node) { let errorNode = node; switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: const pos2 = skipTrivia(sourceFile.text, 0, false); if (pos2 === sourceFile.text.length) { return createTextSpan(0, 0); } return getSpanOfTokenAtPosition(sourceFile, pos2); - case 261 /* VariableDeclaration */: - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 268 /* TypeAliasDeclaration */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: - case 277 /* NamespaceImport */: + case 263 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 271 /* TypeAliasDeclaration */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 171 /* PropertySignature */: + case 280 /* NamespaceImport */: errorNode = node.name; break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: const start = skipTrivia(sourceFile.text, node.pos); const end = node.statements.length > 0 ? node.statements[0].pos : node.end; return createTextSpanFromBounds(start, end); @@ -16027,10 +16039,10 @@ function isLet(node) { return !!(getCombinedNodeFlags(node) & 1 /* Let */); } function isSuperCall(n) { - return n.kind === 213 /* CallExpression */ && n.expression.kind === 107 /* SuperKeyword */; + return n.kind === 215 /* CallExpression */ && n.expression.kind === 107 /* SuperKeyword */; } function isImportCall(n) { - return n.kind === 213 /* CallExpression */ && n.expression.kind === 101 /* ImportKeyword */; + return n.kind === 215 /* CallExpression */ && n.expression.kind === 101 /* ImportKeyword */; } function isImportMeta(n) { return isMetaProperty(n) && n.keywordToken === 101 /* ImportKeyword */ && n.name.escapedText === "meta"; @@ -16039,7 +16051,7 @@ function isLiteralImportTypeNode(n) { return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); } function isPrologueDirective(node) { - return node.kind === 245 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; + return node.kind === 247 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; } function isCustomPrologue(node) { return !!(getEmitFlags(node) & 1048576 /* CustomPrologue */); @@ -16054,7 +16066,7 @@ function isHoistedVariableStatement(node) { return isCustomPrologue(node) && isVariableStatement(node) && every(node.declarationList.declarations, isHoistedVariable); } function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 168 /* Parameter */ || node.kind === 167 /* TypeParameter */ || node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */ || node.kind === 217 /* ParenthesizedExpression */ || node.kind === 261 /* VariableDeclaration */ || node.kind === 284 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); + const commentRanges = node.kind === 169 /* Parameter */ || node.kind === 168 /* TypeParameter */ || node.kind === 220 /* FunctionExpression */ || node.kind === 221 /* ArrowFunction */ || node.kind === 219 /* ParenthesizedExpression */ || node.kind === 263 /* VariableDeclaration */ || node.kind === 287 /* 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*/; @@ -16062,7 +16074,7 @@ var fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*/; var defaultLibReferenceRegEx = /^(\/\/\/\s*/; function isPartOfTypeNode(node) { - if (182 /* FirstTypeNode */ <= node.kind && node.kind <= 205 /* LastTypeNode */) { + if (184 /* FirstTypeNode */ <= node.kind && node.kind <= 207 /* LastTypeNode */) { return true; } switch (node.kind) { @@ -16078,65 +16090,65 @@ function isPartOfTypeNode(node) { case 145 /* NeverKeyword */: return true; case 115 /* VoidKeyword */: - return node.parent.kind !== 223 /* VoidExpression */; - case 234 /* ExpressionWithTypeArguments */: + return node.parent.kind !== 225 /* VoidExpression */; + case 236 /* ExpressionWithTypeArguments */: return isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 167 /* TypeParameter */: - return node.parent.kind === 200 /* MappedType */ || node.parent.kind === 195 /* InferType */; + case 168 /* TypeParameter */: + return node.parent.kind === 202 /* MappedType */ || node.parent.kind === 197 /* InferType */; case 79 /* Identifier */: - if (node.parent.kind === 165 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node) { node = node.parent; - } else if (node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node) { + } else if (node.parent.kind === 213 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } Debug.assert( - node.kind === 79 /* Identifier */ || node.kind === 165 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, + node.kind === 79 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 213 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'." ); - case 165 /* QualifiedName */: - case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: case 109 /* ThisKeyword */: { const { parent: parent2 } = node; - if (parent2.kind === 186 /* TypeQuery */) { + if (parent2.kind === 188 /* TypeQuery */) { return false; } - if (parent2.kind === 205 /* ImportType */) { + if (parent2.kind === 207 /* ImportType */) { return !parent2.isTypeOf; } - if (182 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 205 /* LastTypeNode */) { + if (184 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 207 /* LastTypeNode */) { return true; } switch (parent2.kind) { - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return isHeritageClause(parent2.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent2); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return node === parent2.constraint; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return node === parent2.constraint; - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 168 /* Parameter */: - case 261 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 169 /* Parameter */: + case 263 /* VariableDeclaration */: return node === parent2.type; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return node === parent2.type; - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: return node === parent2.type; - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: return node === parent2.type; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: return contains(parent2.typeArguments, node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return false; } } @@ -16156,23 +16168,23 @@ function forEachReturnStatement(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return visitor(node); - case 272 /* CaseBlock */: - case 242 /* Block */: - case 246 /* IfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 255 /* WithStatement */: - case 256 /* SwitchStatement */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 257 /* LabeledStatement */: - case 259 /* TryStatement */: - case 301 /* CatchClause */: + case 275 /* CaseBlock */: + case 244 /* Block */: + case 248 /* IfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 257 /* WithStatement */: + case 258 /* SwitchStatement */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 259 /* LabeledStatement */: + case 261 /* TryStatement */: + case 304 /* CatchClause */: return forEachChild(node, traverse); } } @@ -16181,21 +16193,21 @@ function forEachYieldExpression(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: visitor(node); const operand = node.expression; if (operand) { traverse(operand); } return; - case 269 /* EnumDeclaration */: - case 267 /* InterfaceDeclaration */: - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 270 /* InterfaceDeclaration */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: return; default: if (isFunctionLike(node)) { - if (node.name && node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { traverse(node.name.expression); return; } @@ -16206,9 +16218,9 @@ function forEachYieldExpression(body, visitor) { } } function getRestParameterElementType(node) { - if (node && node.kind === 188 /* ArrayType */) { + if (node && node.kind === 190 /* ArrayType */) { return node.elementType; - } else if (node && node.kind === 183 /* TypeReference */) { + } else if (node && node.kind === 185 /* TypeReference */) { return singleOrUndefined(node.typeArguments); } else { return void 0; @@ -16216,27 +16228,27 @@ function getRestParameterElementType(node) { } function getMembersOfDeclaration(node) { switch (node.kind) { - case 267 /* InterfaceDeclaration */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 187 /* TypeLiteral */: + case 270 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 189 /* TypeLiteral */: return node.members; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return node.properties; } } function isVariableLike(node) { if (node) { switch (node.kind) { - case 208 /* BindingElement */: - case 308 /* EnumMember */: - case 168 /* Parameter */: - case 305 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 306 /* ShorthandPropertyAssignment */: - case 261 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 311 /* EnumMember */: + case 169 /* Parameter */: + case 308 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 309 /* ShorthandPropertyAssignment */: + case 263 /* VariableDeclaration */: return true; } } @@ -16246,7 +16258,7 @@ function isVariableLikeOrAccessor(node) { return isVariableLike(node) || isAccessor(node); } function isVariableDeclarationInVariableStatement(node) { - return node.parent.kind === 262 /* VariableDeclarationList */ && node.parent.parent.kind === 244 /* VariableStatement */; + return node.parent.kind === 264 /* VariableDeclarationList */ && node.parent.parent.kind === 246 /* VariableStatement */; } function isCommonJsExportedExpression(node) { if (!isInJSFile(node)) @@ -16263,13 +16275,13 @@ function isValidESSymbolDeclaration(node) { } function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return true; } return false; @@ -16279,20 +16291,20 @@ function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) { if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 257 /* LabeledStatement */) { + if (node.statement.kind !== 259 /* LabeledStatement */) { return node.statement; } node = node.statement; } } function isFunctionBlock(node) { - return node && node.kind === 242 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 244 /* Block */ && isFunctionLike(node.parent); } function isObjectLiteralMethod(node) { - return node && node.kind === 174 /* MethodDeclaration */ && node.parent.kind === 210 /* ObjectLiteralExpression */; + return node && node.kind === 176 /* MethodDeclaration */ && node.parent.kind === 212 /* ObjectLiteralExpression */; } function isObjectLiteralOrClassExpressionMethodOrAccessor(node) { - return (node.kind === 174 /* MethodDeclaration */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */) && (node.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.kind === 232 /* ClassExpression */); + return (node.kind === 176 /* MethodDeclaration */ || node.kind === 179 /* GetAccessor */ || node.kind === 180 /* SetAccessor */) && (node.parent.kind === 212 /* ObjectLiteralExpression */ || node.parent.kind === 234 /* ClassExpression */); } function isIdentifierTypePredicate(predicate) { return predicate && predicate.kind === 1 /* Identifier */; @@ -16302,7 +16314,7 @@ function isThisTypePredicate(predicate) { } function getPropertyAssignment(objectLiteral, key, key2) { return objectLiteral.properties.filter((property) => { - if (property.kind === 305 /* PropertyAssignment */) { + if (property.kind === 308 /* PropertyAssignment */) { const propName = tryGetTextOfPropertyName(property.name); return key === propName || !!key2 && key2 === propName; } @@ -16352,63 +16364,63 @@ function getContainingStruct(node) { return findAncestor(node.parent, isStruct); } function getThisContainer(node, includeArrowFunctions) { - Debug.assert(node.kind !== 314 /* SourceFile */); + Debug.assert(node.kind !== 317 /* SourceFile */); while (true) { node = node.parent; if (!node) { return Debug.fail(); } switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (isClassLike(node.parent.parent)) { return node; } node = node.parent; break; - case 169 /* Decorator */: - if (node.parent.kind === 168 /* Parameter */ && isClassElement(node.parent.parent)) { + case 170 /* Decorator */: + if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 270 /* ModuleDeclaration */: - case 175 /* ClassStaticBlockDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 269 /* EnumDeclaration */: - case 314 /* SourceFile */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 273 /* ModuleDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: + case 272 /* EnumDeclaration */: + case 317 /* SourceFile */: return node; } } } function isThisContainerOrFunctionBlock(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 171 /* PropertyDeclaration */: + case 221 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 172 /* PropertyDeclaration */: return true; - case 242 /* Block */: + case 244 /* Block */: switch (node.parent.kind) { - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return true; default: return false; @@ -16428,9 +16440,9 @@ function getNewTargetContainer(node) { const container = getThisContainer(node, false); if (container) { switch (container.kind) { - case 176 /* Constructor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 178 /* Constructor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return container; } } @@ -16443,26 +16455,26 @@ function getSuperContainer(node, stopOnFunctions) { return node; } switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: node = node.parent; break; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: if (!stopOnFunctions) { continue; } - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 177 /* ClassStaticBlockDeclaration */: return node; - case 169 /* Decorator */: - if (node.parent.kind === 168 /* Parameter */ && isClassElement(node.parent.parent)) { + case 170 /* Decorator */: + if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; @@ -16472,14 +16484,14 @@ function getSuperContainer(node, stopOnFunctions) { } } function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 218 /* FunctionExpression */ || func.kind === 219 /* ArrowFunction */) { + if (func.kind === 220 /* FunctionExpression */ || func.kind === 221 /* ArrowFunction */) { let prev = func; let parent2 = func.parent; - while (parent2.kind === 217 /* ParenthesizedExpression */) { + while (parent2.kind === 219 /* ParenthesizedExpression */) { prev = parent2; parent2 = parent2.parent; } - if (parent2.kind === 213 /* CallExpression */ && parent2.expression === prev) { + if (parent2.kind === 215 /* CallExpression */ && parent2.expression === prev) { return parent2; } } @@ -16489,11 +16501,11 @@ function isSuperOrSuperProperty(node) { } function isSuperProperty(node) { const kind = node.kind; - return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 107 /* SuperKeyword */; + return (kind === 213 /* PropertyAccessExpression */ || kind === 214 /* ElementAccessExpression */) && node.expression.kind === 107 /* SuperKeyword */; } function isThisProperty(node) { const kind = node.kind; - return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 109 /* ThisKeyword */; + return (kind === 213 /* PropertyAccessExpression */ || kind === 214 /* ElementAccessExpression */) && node.expression.kind === 109 /* ThisKeyword */; } function isThisInitializedDeclaration(node) { var _a2; @@ -16504,22 +16516,22 @@ function isThisInitializedObjectBindingExpression(node) { } function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return node.typeName; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return isEntityNameExpression(node.expression) ? node.expression : void 0; case 79 /* Identifier */: - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return node; } return void 0; } function getInvokedExpression(node) { switch (node.kind) { - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return node.tag; - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return node.tagName; default: return node.expression; @@ -16530,20 +16542,20 @@ function nodeCanBeDecorated(node, parent2, grandparent, compilerOptions) { return false; } switch (node.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: return true; - case 171 /* PropertyDeclaration */: - return parent2.kind === 264 /* ClassDeclaration */ || parent2.kind === 265 /* StructDeclaration */; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - return node.body !== void 0 && (parent2.kind === 264 /* ClassDeclaration */ || parent2.kind === 265 /* StructDeclaration */); - case 168 /* Parameter */: - return parent2.body !== void 0 && (parent2.kind === 176 /* Constructor */ || parent2.kind === 174 /* MethodDeclaration */ || parent2.kind === 178 /* SetAccessor */) && (grandparent.kind === 264 /* ClassDeclaration */ || grandparent.kind === 265 /* StructDeclaration */); - case 263 /* FunctionDeclaration */: + case 172 /* PropertyDeclaration */: + return parent2.kind === 266 /* ClassDeclaration */ || parent2.kind === 267 /* StructDeclaration */; + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: + return node.body !== void 0 && (parent2.kind === 266 /* ClassDeclaration */ || parent2.kind === 267 /* StructDeclaration */); + case 169 /* Parameter */: + return parent2.body !== void 0 && (parent2.kind === 178 /* Constructor */ || parent2.kind === 176 /* MethodDeclaration */ || parent2.kind === 180 /* SetAccessor */) && (grandparent.kind === 266 /* ClassDeclaration */ || grandparent.kind === 267 /* StructDeclaration */); + case 265 /* FunctionDeclaration */: return isArkTsDecorator(node, compilerOptions) || isSendableFunctionOrType(node); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return isSendableFunctionOrType(node); } return false; @@ -16556,13 +16568,13 @@ function nodeOrChildIsDecorated(node, parent2, grandparent) { } function childIsDecorated(node, parent2) { switch (node.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(m, node, parent2)); - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(m, node, parent2)); - case 174 /* MethodDeclaration */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: + case 176 /* MethodDeclaration */: + case 180 /* SetAccessor */: + case 178 /* Constructor */: return some(node.parameters, (p) => nodeIsDecorated(p, node, parent2)); default: return false; @@ -16576,7 +16588,7 @@ function classOrConstructorParameterIsDecorated(node) { } function isJSXTagName(node) { const { parent: parent2 } = node; - if (parent2.kind === 289 /* JsxOpeningElement */ || parent2.kind === 288 /* JsxSelfClosingElement */ || parent2.kind === 290 /* JsxClosingElement */) { + if (parent2.kind === 292 /* JsxOpeningElement */ || parent2.kind === 291 /* JsxSelfClosingElement */ || parent2.kind === 293 /* JsxClosingElement */) { return parent2.tagName === node; } return false; @@ -16588,55 +16600,55 @@ function isExpressionNode(node) { case 111 /* TrueKeyword */: case 96 /* FalseKeyword */: case 13 /* RegularExpressionLiteral */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 211 /* PropertyAccessExpression */: - case 220 /* EtsComponentExpression */: - case 212 /* ElementAccessExpression */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 235 /* AsExpression */: - case 216 /* TypeAssertionExpression */: - case 239 /* SatisfiesExpression */: - case 236 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: - case 218 /* FunctionExpression */: - case 232 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 223 /* VoidExpression */: - case 221 /* DeleteExpression */: - case 222 /* TypeOfExpression */: - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: - case 227 /* BinaryExpression */: - case 228 /* ConditionalExpression */: - case 231 /* SpreadElement */: - case 229 /* TemplateExpression */: - case 233 /* OmittedExpression */: - case 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: - case 230 /* YieldExpression */: - case 224 /* AwaitExpression */: - case 237 /* MetaProperty */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 213 /* PropertyAccessExpression */: + case 222 /* EtsComponentExpression */: + case 214 /* ElementAccessExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 217 /* TaggedTemplateExpression */: + case 237 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 241 /* SatisfiesExpression */: + case 238 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 220 /* FunctionExpression */: + case 234 /* ClassExpression */: + case 221 /* ArrowFunction */: + case 225 /* VoidExpression */: + case 223 /* DeleteExpression */: + case 224 /* TypeOfExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: + case 229 /* BinaryExpression */: + case 230 /* ConditionalExpression */: + case 233 /* SpreadElement */: + case 231 /* TemplateExpression */: + case 235 /* OmittedExpression */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: + case 232 /* YieldExpression */: + case 226 /* AwaitExpression */: + case 239 /* MetaProperty */: return true; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return !isHeritageClause(node.parent); - case 165 /* QualifiedName */: - while (node.parent.kind === 165 /* QualifiedName */) { + case 166 /* QualifiedName */: + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); - case 320 /* JSDocMemberName */: + return node.parent.kind === 188 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + case 323 /* JSDocMemberName */: while (isJSDocMemberName(node.parent)) { node = node.parent; } - return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + return node.parent.kind === 188 /* 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 === 102 /* InKeyword */; case 79 /* Identifier */: - if (node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { + if (node.parent.kind === 188 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { return true; } case 8 /* NumericLiteral */: @@ -16652,64 +16664,64 @@ function isExpressionNode(node) { function isInExpressionContext(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 308 /* EnumMember */: - case 305 /* PropertyAssignment */: - case 208 /* BindingElement */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 311 /* EnumMember */: + case 308 /* PropertyAssignment */: + case 210 /* BindingElement */: return parent2.initializer === node; - case 245 /* ExpressionStatement */: - case 246 /* IfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 254 /* ReturnStatement */: - case 255 /* WithStatement */: - case 256 /* SwitchStatement */: - case 298 /* CaseClause */: - case 258 /* ThrowStatement */: + case 247 /* ExpressionStatement */: + case 248 /* IfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 256 /* ReturnStatement */: + case 257 /* WithStatement */: + case 258 /* SwitchStatement */: + case 301 /* CaseClause */: + case 260 /* ThrowStatement */: return parent2.expression === node; - case 249 /* ForStatement */: + case 251 /* ForStatement */: const forStatement = parent2; - return forStatement.initializer === node && forStatement.initializer.kind !== 262 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + return forStatement.initializer === node && forStatement.initializer.kind !== 264 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: const forInStatement = parent2; - return forInStatement.initializer === node && forInStatement.initializer.kind !== 262 /* VariableDeclarationList */ || forInStatement.expression === node; - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + return forInStatement.initializer === node && forInStatement.initializer.kind !== 264 /* VariableDeclarationList */ || forInStatement.expression === node; + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: return node === parent2.expression; - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return node === parent2.expression; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return node === parent2.expression; - case 169 /* Decorator */: - case 297 /* JsxExpression */: - case 296 /* JsxSpreadAttribute */: - case 307 /* SpreadAssignment */: + case 170 /* Decorator */: + case 300 /* JsxExpression */: + case 299 /* JsxSpreadAttribute */: + case 310 /* SpreadAssignment */: return true; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return parent2.expression === node && !isPartOfTypeNode(parent2); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return parent2.objectAssignmentInitializer === node; - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return node === parent2.expression; default: return isExpressionNode(parent2); } } function isPartOfTypeQuery(node) { - while (node.kind === 165 /* QualifiedName */ || node.kind === 79 /* Identifier */) { + while (node.kind === 166 /* QualifiedName */ || node.kind === 79 /* Identifier */) { node = node.parent; } - return node.kind === 186 /* TypeQuery */; + return node.kind === 188 /* TypeQuery */; } function isNamespaceReexportDeclaration(node) { return isNamespaceExport(node) && !!node.parent.moduleSpecifier; } function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 274 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 286 /* ExternalModuleReference */; + return node.kind === 277 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 289 /* ExternalModuleReference */; } function getExternalModuleImportEqualsDeclarationExpression(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node)); @@ -16719,7 +16731,7 @@ function getExternalModuleRequireArgument(node) { return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0]; } function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 274 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 286 /* ExternalModuleReference */; + return node.kind === 277 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 289 /* ExternalModuleReference */; } function isSourceFileJS(file) { return isInJSFile(file); @@ -16778,7 +16790,7 @@ function isInStruct(node) { return !!container && isStruct(container); } function isRequireCall(callExpression, requireStringLiteralLikeArgument) { - if (callExpression.kind !== 213 /* CallExpression */) { + if (callExpression.kind !== 215 /* CallExpression */) { return false; } const { expression, arguments: args } = callExpression; @@ -16840,9 +16852,9 @@ function getAssignedExpandoInitializer(node) { function getExpandoInitializer(initializer, isPrototypeAssignment) { if (isCallExpression(initializer)) { const e = skipParentheses(initializer.expression); - return e.kind === 218 /* FunctionExpression */ || e.kind === 219 /* ArrowFunction */ ? initializer : void 0; + return e.kind === 220 /* FunctionExpression */ || e.kind === 221 /* ArrowFunction */ ? initializer : void 0; } - if (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 232 /* ClassExpression */ || initializer.kind === 219 /* ArrowFunction */) { + if (initializer.kind === 220 /* FunctionExpression */ || initializer.kind === 234 /* ClassExpression */ || initializer.kind === 221 /* ArrowFunction */) { return initializer; } if (isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAssignment)) { @@ -17004,7 +17016,7 @@ function isPrototypePropertyAssignment(node) { return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 3 /* PrototypeProperty */; } function isSpecialPropertyDeclaration(expr) { - return isInJSFile(expr) && expr.parent && expr.parent.kind === 245 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); + return isInJSFile(expr) && expr.parent && expr.parent.kind === 247 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); } function setValueDeclaration(symbol, node) { const { valueDeclaration } = symbol; @@ -17017,16 +17029,16 @@ function isFunctionSymbol(symbol) { return false; } const decl = symbol.valueDeclaration; - return decl.kind === 263 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); + return decl.kind === 265 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); } function tryGetModuleSpecifierFromDeclaration(node) { var _a2, _b; switch (node.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return (_a2 = findAncestor(node.initializer, (node2) => isRequireCall(node2, true))) == null ? void 0 : _a2.arguments[0]; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return tryCast(node.moduleSpecifier, isStringLiteralLike); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); default: Debug.assertNever(node); @@ -17037,14 +17049,14 @@ function importFromModuleSpecifier(node) { } function tryGetImportFromModuleSpecifier(node) { switch (node.parent.kind) { - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: return node.parent; - case 286 /* ExternalModuleReference */: + case 289 /* ExternalModuleReference */: return node.parent.parent; - case 213 /* CallExpression */: + case 215 /* CallExpression */: return isImportCall(node.parent) || isRequireCall(node.parent, false) ? node.parent : void 0; - case 201 /* LiteralType */: + case 203 /* LiteralType */: Debug.assert(isStringLiteral(node)); return tryCast(node.parent.parent, isImportTypeNode); default: @@ -17053,16 +17065,16 @@ function tryGetImportFromModuleSpecifier(node) { } function getExternalModuleName(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: return node.moduleSpecifier; - case 274 /* ImportEqualsDeclaration */: - return node.moduleReference.kind === 286 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; - case 205 /* ImportType */: + case 277 /* ImportEqualsDeclaration */: + return node.moduleReference.kind === 289 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; + case 207 /* ImportType */: return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; - case 213 /* CallExpression */: + case 215 /* CallExpression */: return node.arguments[0]; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return node.name.kind === 10 /* StringLiteral */ ? node.name : void 0; default: return Debug.assertNever(node); @@ -17070,18 +17082,18 @@ function getExternalModuleName(node) { } function getNamespaceDeclarationNode(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return node; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return node.exportClause && tryCast(node.exportClause, isNamespaceExport); default: return Debug.assertNever(node); } } function isDefaultImport(node) { - return node.kind === 275 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; + return node.kind === 278 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } function forEachImportClauseDeclaration(node, action) { if (node.name) { @@ -17098,13 +17110,13 @@ function forEachImportClauseDeclaration(node, action) { function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 168 /* Parameter */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 306 /* ShorthandPropertyAssignment */: - case 305 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 169 /* Parameter */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 309 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return node.questionToken !== void 0; } } @@ -17116,7 +17128,7 @@ function isJSDocConstructSignature(node) { return !!name && name.escapedText === "new"; } function isJSDocTypeAlias(node) { - return node.kind === 354 /* JSDocTypedefTag */ || node.kind === 347 /* JSDocCallbackTag */ || node.kind === 348 /* JSDocEnumTag */; + return node.kind === 357 /* JSDocTypedefTag */ || node.kind === 350 /* JSDocCallbackTag */ || node.kind === 351 /* JSDocEnumTag */; } function isTypeAlias(node) { return isJSDocTypeAlias(node) || isTypeAliasDeclaration(node); @@ -17129,14 +17141,14 @@ function getSourceOfDefaultedAssignment(node) { } function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: const v = getSingleVariableOfVariableStatement(node); return v && v.initializer; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer; - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return node.initializer; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return node.initializer; } } @@ -17144,7 +17156,7 @@ function getSingleVariableOfVariableStatement(node) { return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; } function getNestedModuleDeclaration(node) { - return isModuleDeclaration(node) && node.body && node.body.kind === 270 /* ModuleDeclaration */ ? node.body : void 0; + return isModuleDeclaration(node) && node.body && node.body.kind === 273 /* ModuleDeclaration */ ? node.body : void 0; } function getJSDocCommentsAndTags(hostNode, noCache) { let result; @@ -17156,11 +17168,11 @@ function getJSDocCommentsAndTags(hostNode, noCache) { if (hasJSDocNodes(node)) { result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc))); } - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node)); break; } - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node)); break; } @@ -17180,7 +17192,7 @@ function ownsJSDocTag(hostNode, tag) { } function getNextJSDocCommentLocation(node) { const parent2 = node.parent; - if (parent2.kind === 305 /* PropertyAssignment */ || parent2.kind === 280 /* ExportAssignment */ || parent2.kind === 171 /* PropertyDeclaration */ || parent2.kind === 245 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 254 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 63 /* EqualsToken */) { + if (parent2.kind === 308 /* PropertyAssignment */ || parent2.kind === 283 /* ExportAssignment */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 247 /* ExpressionStatement */ && node.kind === 213 /* PropertyAccessExpression */ || parent2.kind === 256 /* 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; @@ -17256,32 +17268,32 @@ function getAssignmentTargetKind(node) { let parent2 = node.parent; while (true) { switch (parent2.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const binaryOperator = parent2.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent2.left === node ? binaryOperator === 63 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: const unaryOperator = parent2.operator; return unaryOperator === 45 /* PlusPlusToken */ || unaryOperator === 46 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: return parent2.initializer === node ? 1 /* Definite */ : 0 /* None */; - case 217 /* ParenthesizedExpression */: - case 209 /* ArrayLiteralExpression */: - case 231 /* SpreadElement */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 211 /* ArrayLiteralExpression */: + case 233 /* SpreadElement */: + case 238 /* NonNullExpression */: node = parent2; break; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: node = parent2.parent; break; - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: if (parent2.name !== node) { return 0 /* None */; } node = parent2.parent; break; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (parent2.name === node) { return 0 /* None */; } @@ -17298,22 +17310,22 @@ function isAssignmentTarget(node) { } function isNodeWithPossibleHoistedDeclaration(node) { switch (node.kind) { - case 242 /* Block */: - case 244 /* VariableStatement */: - case 255 /* WithStatement */: - case 246 /* IfStatement */: - case 256 /* SwitchStatement */: - case 272 /* CaseBlock */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 257 /* LabeledStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 259 /* TryStatement */: - case 301 /* CatchClause */: + case 244 /* Block */: + case 246 /* VariableStatement */: + case 257 /* WithStatement */: + case 248 /* IfStatement */: + case 258 /* SwitchStatement */: + case 275 /* CaseBlock */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 259 /* LabeledStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 261 /* TryStatement */: + case 304 /* CatchClause */: return true; } return false; @@ -17328,14 +17340,14 @@ function walkUp(node, kind) { return node; } function walkUpParenthesizedTypes(node) { - return walkUp(node, 196 /* ParenthesizedType */); + return walkUp(node, 198 /* ParenthesizedType */); } function walkUpParenthesizedExpressions(node) { - return walkUp(node, 217 /* ParenthesizedExpression */); + return walkUp(node, 219 /* ParenthesizedExpression */); } function walkUpParenthesizedTypesAndGetParentAndChild(node) { let child; - while (node && node.kind === 196 /* ParenthesizedType */) { + while (node && node.kind === 198 /* ParenthesizedType */) { child = node; node = node.parent; } @@ -17351,11 +17363,11 @@ function skipParentheses(node, excludeJSDocTypeAssertions) { return skipOuterExpressions(node, flags); } function isDeleteTarget(node) { - if (node.kind !== 211 /* PropertyAccessExpression */ && node.kind !== 212 /* ElementAccessExpression */) { + if (node.kind !== 213 /* PropertyAccessExpression */ && node.kind !== 214 /* ElementAccessExpression */) { return false; } node = walkUpParenthesizedExpressions(node.parent); - return node && node.kind === 221 /* DeleteExpression */; + return node && node.kind === 223 /* DeleteExpression */; } function isNodeDescendantOf(node, ancestor) { while (node) { @@ -17393,56 +17405,56 @@ function getDeclarationFromName(name) { } } function isLiteralComputedPropertyDeclarationName(node) { - return isStringOrNumericLiteralLike(node) && node.parent.kind === 166 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); + return isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); } function isIdentifierName(node) { const parent2 = node.parent; switch (parent2.kind) { - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 308 /* EnumMember */: - case 305 /* PropertyAssignment */: - case 211 /* PropertyAccessExpression */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 311 /* EnumMember */: + case 308 /* PropertyAssignment */: + case 213 /* PropertyAccessExpression */: return parent2.name === node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return parent2.right === node; - case 208 /* BindingElement */: - case 279 /* ImportSpecifier */: + case 210 /* BindingElement */: + case 282 /* ImportSpecifier */: return parent2.propertyName === node; - case 284 /* ExportSpecifier */: - case 294 /* JsxAttribute */: - case 288 /* JsxSelfClosingElement */: - case 289 /* JsxOpeningElement */: - case 290 /* JsxClosingElement */: + case 287 /* ExportSpecifier */: + case 297 /* JsxAttribute */: + case 291 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 293 /* JsxClosingElement */: return true; } return false; } function isAliasSymbolDeclaration(node) { - if (node.kind === 274 /* ImportEqualsDeclaration */ || node.kind === 273 /* NamespaceExportDeclaration */ || node.kind === 276 /* ImportClause */ && !!node.name || node.kind === 277 /* NamespaceImport */ || node.kind === 283 /* NamespaceExport */ || node.kind === 279 /* ImportSpecifier */ || node.kind === 284 /* ExportSpecifier */ || node.kind === 280 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { + if (node.kind === 277 /* ImportEqualsDeclaration */ || node.kind === 276 /* NamespaceExportDeclaration */ || node.kind === 279 /* ImportClause */ && !!node.name || node.kind === 280 /* NamespaceImport */ || node.kind === 286 /* NamespaceExport */ || node.kind === 282 /* ImportSpecifier */ || node.kind === 287 /* ExportSpecifier */ || node.kind === 283 /* 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 276 /* ImportClause */: - case 279 /* ImportSpecifier */: - case 277 /* NamespaceImport */: - case 284 /* ExportSpecifier */: - case 280 /* ExportAssignment */: - case 274 /* ImportEqualsDeclaration */: - case 283 /* NamespaceExport */: + case 279 /* ImportClause */: + case 282 /* ImportSpecifier */: + case 280 /* NamespaceImport */: + case 287 /* ExportSpecifier */: + case 283 /* ExportAssignment */: + case 277 /* ImportEqualsDeclaration */: + case 286 /* NamespaceExport */: return node.parent; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.parent; - } while (node.parent.kind === 165 /* QualifiedName */); + } while (node.parent.kind === 166 /* QualifiedName */); return getAliasDeclarationFromName(node); } } @@ -17457,7 +17469,7 @@ function getExportAssignmentExpression(node) { return isExportAssignment(node) ? node.expression : node.right; } function getPropertyAssignmentAliasLikeExpression(node) { - return node.kind === 306 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 305 /* PropertyAssignment */ ? node.initializer : node.parent.right; + return node.kind === 309 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 308 /* PropertyAssignment */ ? node.initializer : node.parent.right; } function getEffectiveBaseTypeNode(node) { const baseType = getClassExtendsHeritageElement(node); @@ -17542,10 +17554,10 @@ function getVirtualEtsComponent(node) { return void 0; } function isKeyword(token) { - return 81 /* FirstKeyword */ <= token && token <= 164 /* LastKeyword */; + return 81 /* FirstKeyword */ <= token && token <= 165 /* LastKeyword */; } function isContextualKeyword(token) { - return 127 /* FirstContextualKeyword */ <= token && token <= 164 /* LastContextualKeyword */; + return 127 /* FirstContextualKeyword */ <= token && token <= 165 /* LastContextualKeyword */; } function isNonContextualKeyword(token) { return isKeyword(token) && !isContextualKeyword(token); @@ -17581,13 +17593,13 @@ function getFunctionFlags(node) { } let flags = 0 /* Normal */; switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: if (node.asteriskToken) { flags |= 1 /* Generator */; } - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: if (hasSyntacticModifier(node, 512 /* Async */)) { flags |= 2 /* Async */; } @@ -17600,10 +17612,10 @@ function getFunctionFlags(node) { } function isAsyncFunction(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */); } return false; @@ -17619,7 +17631,7 @@ function hasDynamicName(declaration) { return !!name && isDynamicName(name); } function isDynamicName(name) { - if (!(name.kind === 166 /* ComputedPropertyName */ || name.kind === 212 /* ElementAccessExpression */)) { + if (!(name.kind === 167 /* ComputedPropertyName */ || name.kind === 214 /* ElementAccessExpression */)) { return false; } const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; @@ -17633,7 +17645,7 @@ function getPropertyNameForPropertyNameNode(name) { case 10 /* StringLiteral */: case 8 /* NumericLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -17685,17 +17697,17 @@ function isPushOrUnshiftIdentifier(node) { } function isParameterDeclaration(node) { const root = getRootDeclaration(node); - return root.kind === 168 /* Parameter */; + return root.kind === 169 /* Parameter */; } function getRootDeclaration(node) { - while (node.kind === 208 /* BindingElement */) { + while (node.kind === 210 /* BindingElement */) { node = node.parent.parent; } return node; } function nodeStartsNewLexicalEnvironment(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 218 /* FunctionExpression */ || kind === 263 /* FunctionDeclaration */ || kind === 219 /* ArrowFunction */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 270 /* ModuleDeclaration */ || kind === 314 /* SourceFile */; + return kind === 178 /* Constructor */ || kind === 220 /* FunctionExpression */ || kind === 265 /* FunctionDeclaration */ || kind === 221 /* ArrowFunction */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 273 /* ModuleDeclaration */ || kind === 317 /* SourceFile */; } function nodeIsSynthesized(range) { return positionIsSynthesized(range.pos) || positionIsSynthesized(range.end); @@ -17710,22 +17722,22 @@ var Associativity = /* @__PURE__ */ ((Associativity2) => { })(Associativity || {}); function getExpressionAssociativity(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 216 /* NewExpression */ && expression.arguments !== void 0; return getOperatorAssociativity(expression.kind, operator, hasArguments); } function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 214 /* NewExpression */: + case 216 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 225 /* PrefixUnaryExpression */: - case 222 /* TypeOfExpression */: - case 223 /* VoidExpression */: - case 221 /* DeleteExpression */: - case 224 /* AwaitExpression */: - case 228 /* ConditionalExpression */: - case 230 /* YieldExpression */: + case 227 /* PrefixUnaryExpression */: + case 224 /* TypeOfExpression */: + case 225 /* VoidExpression */: + case 223 /* DeleteExpression */: + case 226 /* AwaitExpression */: + case 230 /* ConditionalExpression */: + case 232 /* YieldExpression */: return 1 /* Right */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (operator) { case 42 /* AsteriskAsteriskToken */: case 63 /* EqualsToken */: @@ -17751,13 +17763,13 @@ function getOperatorAssociativity(kind, operator, hasArguments) { } function getExpressionPrecedence(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 216 /* NewExpression */ && expression.arguments !== void 0; return getOperatorPrecedence(expression.kind, operator, hasArguments); } function getOperator(expression) { - if (expression.kind === 227 /* BinaryExpression */) { + if (expression.kind === 229 /* BinaryExpression */) { return expression.operatorToken.kind; - } else if (expression.kind === 225 /* PrefixUnaryExpression */ || expression.kind === 226 /* PostfixUnaryExpression */) { + } else if (expression.kind === 227 /* PrefixUnaryExpression */ || expression.kind === 228 /* PostfixUnaryExpression */) { return expression.operator; } else { return expression.kind; @@ -17793,15 +17805,15 @@ var OperatorPrecedence = /* @__PURE__ */ ((OperatorPrecedence2) => { })(OperatorPrecedence || {}); function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return 0 /* Comma */; - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return 1 /* Spread */; - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return 2 /* Yield */; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return 4 /* Conditional */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (operatorKind) { case 27 /* CommaToken */: return 0 /* Comma */; @@ -17825,27 +17837,27 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { default: return getBinaryOperatorPrecedence(operatorKind); } - case 216 /* TypeAssertionExpression */: - case 236 /* NonNullExpression */: - case 225 /* PrefixUnaryExpression */: - case 222 /* TypeOfExpression */: - case 223 /* VoidExpression */: - case 221 /* DeleteExpression */: - case 224 /* AwaitExpression */: + case 218 /* TypeAssertionExpression */: + case 238 /* NonNullExpression */: + case 227 /* PrefixUnaryExpression */: + case 224 /* TypeOfExpression */: + case 225 /* VoidExpression */: + case 223 /* DeleteExpression */: + case 226 /* AwaitExpression */: return 16 /* Unary */; - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return 17 /* Update */; - case 213 /* CallExpression */: + case 215 /* CallExpression */: return 18 /* LeftHandSide */; - case 214 /* NewExpression */: + case 216 /* NewExpression */: return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */; - case 215 /* TaggedTemplateExpression */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 237 /* MetaProperty */: + case 217 /* TaggedTemplateExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 239 /* MetaProperty */: return 19 /* Member */; - case 235 /* AsExpression */: - case 239 /* SatisfiesExpression */: + case 237 /* AsExpression */: + case 241 /* SatisfiesExpression */: return 11 /* Relational */; case 109 /* ThisKeyword */: case 107 /* SuperKeyword */: @@ -17857,19 +17869,19 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 232 /* ClassExpression */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 234 /* ClassExpression */: case 13 /* RegularExpressionLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 229 /* TemplateExpression */: - case 217 /* ParenthesizedExpression */: - case 233 /* OmittedExpression */: - case 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: + case 231 /* TemplateExpression */: + case 219 /* ParenthesizedExpression */: + case 235 /* OmittedExpression */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: return 20 /* Primary */; default: return -1 /* Invalid */; @@ -17922,7 +17934,7 @@ function getBinaryOperatorPrecedence(kind) { function getSemanticJsxChildren(children) { return filter(children, (i) => { switch (i.kind) { - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return !!i.expression; case 11 /* JsxText */: return !i.containsOnlyTriviaWhiteSpaces; @@ -18313,7 +18325,7 @@ function isThisInTypeQuery(node) { while (isQualifiedName(node.parent) && node.parent.left === node) { node = node.parent; } - return node.parent.kind === 186 /* TypeQuery */; + return node.parent.kind === 188 /* TypeQuery */; } function identifierIsThisKeyword(id) { return id.originalKeywordKind === 109 /* ThisKeyword */; @@ -18325,9 +18337,9 @@ function getAllAccessorDeclarations(declarations, accessor) { let setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 177 /* GetAccessor */) { + if (accessor.kind === 179 /* GetAccessor */) { getAccessor = accessor; - } else if (accessor.kind === 178 /* SetAccessor */) { + } else if (accessor.kind === 180 /* SetAccessor */) { setAccessor = accessor; } else { Debug.fail("Accessor has wrong kind"); @@ -18343,10 +18355,10 @@ function getAllAccessorDeclarations(declarations, accessor) { } else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 177 /* GetAccessor */ && !getAccessor) { + if (member.kind === 179 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 178 /* SetAccessor */ && !setAccessor) { + if (member.kind === 180 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -18378,7 +18390,7 @@ function getJSDocTypeParameterDeclarations(node) { return flatMap(getJSDocTags(node), (tag) => isNonTypeAliasTemplate(tag) ? tag.typeParameters : void 0); } function isNonTypeAliasTemplate(tag) { - return isJSDocTemplateTag(tag) && !(tag.parent.kind === 329 /* JSDoc */ && tag.parent.tags.some(isJSDocTypeAlias)); + return isJSDocTemplateTag(tag) && !(tag.parent.kind === 332 /* JSDoc */ && tag.parent.tags.some(isJSDocTypeAlias)); } function getEffectiveSetAccessorTypeAnnotationNode(node) { const parameter = getSetAccessorValueParameter(node); @@ -18563,7 +18575,7 @@ function getSelectedSyntacticModifierFlags(node, flags) { return getSyntacticModifierFlags(node) & flags; } function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { - if (node.kind >= 0 /* FirstToken */ && node.kind <= 164 /* LastToken */) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 165 /* LastToken */) { return 0 /* None */; } if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { @@ -18654,7 +18666,7 @@ function modifierToFlag(token) { return 32768 /* In */; case 146 /* OutKeyword */: return 65536 /* Out */; - case 169 /* Decorator */: + case 170 /* Decorator */: return 131072 /* Decorator */; } return 0 /* None */; @@ -18687,7 +18699,7 @@ function isLeftHandSideOfAssignment(node) { function isDestructuringAssignment(node) { if (isAssignmentExpression(node, true)) { const kind = node.left.kind; - return kind === 210 /* ObjectLiteralExpression */ || kind === 209 /* ArrayLiteralExpression */; + return kind === 212 /* ObjectLiteralExpression */ || kind === 211 /* ArrayLiteralExpression */; } return false; } @@ -18701,12 +18713,12 @@ function getFirstIdentifier(node) { switch (node.kind) { case 79 /* Identifier */: return node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.left; } while (node.kind !== 79 /* Identifier */); return node; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: do { node = node.expression; } while (node.kind !== 79 /* Identifier */); @@ -18714,7 +18726,7 @@ function getFirstIdentifier(node) { } } function isDottedName(node) { - return node.kind === 79 /* Identifier */ || node.kind === 109 /* ThisKeyword */ || node.kind === 107 /* SuperKeyword */ || node.kind === 237 /* MetaProperty */ || node.kind === 211 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 217 /* ParenthesizedExpression */ && isDottedName(node.expression); + return node.kind === 79 /* Identifier */ || node.kind === 109 /* ThisKeyword */ || node.kind === 107 /* SuperKeyword */ || node.kind === 239 /* MetaProperty */ || node.kind === 213 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 219 /* ParenthesizedExpression */ && isDottedName(node.expression); } function isPropertyAccessEntityNameExpression(node) { return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); @@ -18739,7 +18751,7 @@ function isPrototypeAccess(node) { return isBindableStaticAccessExpression(node) && getElementOrPropertyAccessName(node) === "prototype"; } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return node.parent.kind === 165 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node; + return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 213 /* PropertyAccessExpression */ && node.parent.name === node; } function isRightSideOfAccessExpression(node) { return isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node; @@ -18748,10 +18760,10 @@ 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 === 210 /* ObjectLiteralExpression */ && expression.properties.length === 0; + return expression.kind === 212 /* ObjectLiteralExpression */ && expression.properties.length === 0; } function isEmptyArrayLiteral(expression) { - return expression.kind === 209 /* ArrayLiteralExpression */ && expression.elements.length === 0; + return expression.kind === 211 /* ArrayLiteralExpression */ && expression.elements.length === 0; } function getLocalSymbolForExportDefault(symbol) { if (!isExportDefaultSymbol(symbol) || !symbol.declarations) @@ -18979,8 +18991,8 @@ function isDeclarationNameOfEnumOrNamespace(node) { const parseNode = getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 269 /* EnumDeclaration */: - case 270 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 273 /* ModuleDeclaration */: return parseNode === parseNode.parent.name; } } @@ -19041,30 +19053,30 @@ function accessKind(node) { if (!parent2) return 0 /* Read */; switch (parent2.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return accessKind(parent2); - case 226 /* PostfixUnaryExpression */: - case 225 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: const { operator } = parent2; return operator === 45 /* PlusPlusToken */ || operator === 46 /* MinusMinusToken */ ? writeOrReadWrite() : 0 /* Read */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const { left, operatorToken } = parent2; return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 63 /* EqualsToken */ ? 1 /* Write */ : writeOrReadWrite() : 0 /* Read */; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return parent2.name !== node ? 0 /* Read */ : accessKind(parent2); - case 305 /* PropertyAssignment */: { + case 308 /* PropertyAssignment */: { const parentAccess = accessKind(parent2.parent); return node === parent2.name ? reverseAccessKind(parentAccess) : parentAccess; } - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return node === parent2.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent2.parent); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return accessKind(parent2); default: return 0 /* Read */; } function writeOrReadWrite() { - return parent2.parent && walkUpParenthesizedExpressions(parent2.parent).kind === 245 /* ExpressionStatement */ ? 1 /* Write */ : 2 /* ReadWrite */; + return parent2.parent && walkUpParenthesizedExpressions(parent2.parent).kind === 247 /* ExpressionStatement */ ? 1 /* Write */ : 2 /* ReadWrite */; } } function reverseAccessKind(a) { @@ -19177,16 +19189,16 @@ function isObjectTypeDeclaration(node) { return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node); } function isTypeNodeKind(kind) { - return kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */ || kind === 132 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 149 /* NumberKeyword */ || kind === 162 /* BigIntKeyword */ || kind === 150 /* ObjectKeyword */ || kind === 135 /* BooleanKeyword */ || kind === 153 /* StringKeyword */ || kind === 154 /* SymbolKeyword */ || kind === 115 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 145 /* NeverKeyword */ || kind === 234 /* ExpressionWithTypeArguments */ || kind === 321 /* JSDocAllType */ || kind === 322 /* JSDocUnknownType */ || kind === 323 /* JSDocNullableType */ || kind === 324 /* JSDocNonNullableType */ || kind === 325 /* JSDocOptionalType */ || kind === 326 /* JSDocFunctionType */ || kind === 327 /* JSDocVariadicType */; + return kind >= 184 /* FirstTypeNode */ && kind <= 207 /* LastTypeNode */ || kind === 132 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 149 /* NumberKeyword */ || kind === 162 /* BigIntKeyword */ || kind === 150 /* ObjectKeyword */ || kind === 135 /* BooleanKeyword */ || kind === 153 /* StringKeyword */ || kind === 154 /* SymbolKeyword */ || kind === 115 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 145 /* NeverKeyword */ || kind === 236 /* ExpressionWithTypeArguments */ || kind === 324 /* JSDocAllType */ || kind === 325 /* JSDocUnknownType */ || kind === 326 /* JSDocNullableType */ || kind === 327 /* JSDocNonNullableType */ || kind === 328 /* JSDocOptionalType */ || kind === 329 /* JSDocFunctionType */ || kind === 330 /* JSDocVariadicType */; } function isAccessExpression(node) { - return node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */; + return node.kind === 213 /* PropertyAccessExpression */ || node.kind === 214 /* ElementAccessExpression */; } function getNameOfAccessExpression(node) { - if (node.kind === 211 /* PropertyAccessExpression */) { + if (node.kind === 213 /* PropertyAccessExpression */) { return node.name; } - Debug.assert(node.kind === 212 /* ElementAccessExpression */); + Debug.assert(node.kind === 214 /* ElementAccessExpression */); return node.argumentExpression; } function isBundleFileTextLike(section) { @@ -19199,7 +19211,7 @@ function isBundleFileTextLike(section) { } } function isNamedImportsOrExports(node) { - return node.kind === 278 /* NamedImports */ || node.kind === 282 /* NamedExports */; + return node.kind === 281 /* NamedImports */ || node.kind === 285 /* NamedExports */; } function getLeftmostAccessExpression(expr) { while (isAccessExpression(expr)) { @@ -19212,12 +19224,12 @@ function forEachNameInAccessChainWalkingLeft(name, action) { return walkAccessExpression(name.parent); } function walkAccessExpression(access) { - if (access.kind === 211 /* PropertyAccessExpression */) { + if (access.kind === 213 /* PropertyAccessExpression */) { const res = action(access.name); if (res !== void 0) { return res; } - } else if (access.kind === 212 /* ElementAccessExpression */) { + } else if (access.kind === 214 /* ElementAccessExpression */) { if (isIdentifier(access.argumentExpression) || isStringLiteralLike(access.argumentExpression)) { const res = action(access.argumentExpression); if (res !== void 0) { @@ -19239,28 +19251,28 @@ function forEachNameInAccessChainWalkingLeft(name, action) { function getLeftmostExpression(node, stopAtCallExpressions) { while (true) { switch (node.kind) { - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: node = node.operand; continue; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: node = node.left; continue; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: node = node.condition; continue; - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: node = node.tag; continue; - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (stopAtCallExpressions) { return node; } - case 235 /* AsExpression */: - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: - case 236 /* NonNullExpression */: - case 359 /* PartiallyEmittedExpression */: - case 239 /* SatisfiesExpression */: + case 237 /* AsExpression */: + case 214 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 238 /* NonNullExpression */: + case 362 /* PartiallyEmittedExpression */: + case 241 /* SatisfiesExpression */: node = node.expression; continue; } @@ -20224,33 +20236,33 @@ function isShorthandPropertyNameUseSite(useSite) { return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite; } function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { - while (node.kind === 79 /* Identifier */ || node.kind === 211 /* PropertyAccessExpression */) { + while (node.kind === 79 /* Identifier */ || node.kind === 213 /* PropertyAccessExpression */) { node = node.parent; } - if (node.kind !== 166 /* ComputedPropertyName */) { + if (node.kind !== 167 /* ComputedPropertyName */) { return false; } if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) { return true; } const containerKind = node.parent.parent.kind; - return containerKind === 267 /* InterfaceDeclaration */ || containerKind === 187 /* TypeLiteral */; + return containerKind === 270 /* InterfaceDeclaration */ || containerKind === 189 /* TypeLiteral */; } function isIdentifierInNonEmittingHeritageClause(node) { if (node.kind !== 79 /* Identifier */) return false; const heritageClause = findAncestor(node.parent, (parent2) => { switch (parent2.kind) { - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return true; - case 211 /* PropertyAccessExpression */: - case 234 /* ExpressionWithTypeArguments */: + case 213 /* PropertyAccessExpression */: + case 236 /* ExpressionWithTypeArguments */: return false; default: return "quit"; } }); - return (heritageClause == null ? void 0 : heritageClause.token) === 118 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 267 /* InterfaceDeclaration */; + return (heritageClause == null ? void 0 : heritageClause.token) === 118 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 270 /* InterfaceDeclaration */; } function isIdentifierTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName); @@ -20339,20 +20351,20 @@ function getContainingNodeArray(node) { if (!node.parent) return void 0; switch (node.kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: const { parent: parent3 } = node; - return parent3.kind === 195 /* InferType */ ? void 0 : parent3.typeParameters; - case 168 /* Parameter */: + return parent3.kind === 197 /* InferType */ ? void 0 : parent3.typeParameters; + case 169 /* Parameter */: return node.parent.parameters; - case 204 /* TemplateLiteralTypeSpan */: + case 206 /* TemplateLiteralTypeSpan */: return node.parent.templateSpans; - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return node.parent.templateSpans; - case 169 /* Decorator */: { + case 170 /* Decorator */: { const { parent: parent4 } = node; return canHaveDecorators(parent4) ? parent4.modifiers : canHaveIllegalDecorators(parent4) ? parent4.illegalDecorators : void 0; } - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return node.parent.heritageClauses; } const { parent: parent2 } = node; @@ -20360,43 +20372,43 @@ function getContainingNodeArray(node) { return isJSDocTypeLiteral(node.parent) ? void 0 : node.parent.tags; } switch (parent2.kind) { - case 187 /* TypeLiteral */: - case 267 /* InterfaceDeclaration */: + case 189 /* TypeLiteral */: + case 270 /* InterfaceDeclaration */: return isTypeElement(node) ? parent2.members : void 0; - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return parent2.types; - case 189 /* TupleType */: - case 209 /* ArrayLiteralExpression */: - case 360 /* CommaListExpression */: - case 278 /* NamedImports */: - case 282 /* NamedExports */: + case 191 /* TupleType */: + case 211 /* ArrayLiteralExpression */: + case 363 /* CommaListExpression */: + case 281 /* NamedImports */: + case 285 /* NamedExports */: return parent2.elements; - case 210 /* ObjectLiteralExpression */: - case 295 /* JsxAttributes */: + case 212 /* ObjectLiteralExpression */: + case 298 /* JsxAttributes */: return parent2.properties; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: return isTypeNode(node) ? parent2.typeArguments : parent2.expression === node ? void 0 : parent2.arguments; - case 287 /* JsxElement */: - case 291 /* JsxFragment */: + case 290 /* JsxElement */: + case 294 /* JsxFragment */: return isJsxChild(node) ? parent2.children : void 0; - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return isTypeNode(node) ? parent2.typeArguments : void 0; - case 242 /* Block */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 274 /* ModuleBlock */: return parent2.statements; - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return parent2.clauses; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return isClassElement(node) ? parent2.members : void 0; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return isEnumMember(node) ? parent2.members : void 0; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return parent2.statements; } } @@ -20405,7 +20417,7 @@ function hasContextSensitiveParameters(node) { if (some(node.parameters, (p) => !getEffectiveTypeAnnotationNode(p))) { return true; } - if (node.kind !== 219 /* ArrowFunction */) { + if (node.kind !== 221 /* ArrowFunction */) { const parameter = firstOrUndefined(node.parameters); if (!(parameter && parameterIsThisKeyword(parameter))) { return true; @@ -20418,14 +20430,14 @@ function isInfinityOrNaNString(name) { return name === "Infinity" || name === "-Infinity" || name === "NaN"; } function isCatchClauseVariableDeclaration(node) { - return node.kind === 261 /* VariableDeclaration */ && node.parent.kind === 301 /* CatchClause */; + return node.kind === 263 /* VariableDeclaration */ && node.parent.kind === 304 /* CatchClause */; } function isParameterOrCatchClauseVariable(symbol) { const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration); return !!declaration && (isParameter(declaration) || isCatchClauseVariableDeclaration(declaration)); } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */; + return node.kind === 220 /* FunctionExpression */ || node.kind === 221 /* ArrowFunction */; } function escapeSnippetText(text) { return text.replace(/\$/gm, () => "\\$"); @@ -20488,23 +20500,23 @@ function getNodeModulePathParts(fullPath, modulePathPart) { } function getParameterTypeNode(parameter) { var _a2; - return parameter.kind === 349 /* JSDocParameterTag */ ? (_a2 = parameter.typeExpression) == null ? void 0 : _a2.type : parameter.type; + return parameter.kind === 352 /* JSDocParameterTag */ ? (_a2 = parameter.typeExpression) == null ? void 0 : _a2.type : parameter.type; } function isTypeDeclaration(node) { switch (node.kind) { - case 167 /* TypeParameter */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 168 /* TypeParameter */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return true; - case 276 /* ImportClause */: + case 279 /* ImportClause */: return node.isTypeOnly; - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return node.parent.parent.isTypeOnly; default: return false; @@ -20517,7 +20529,7 @@ function isCalledStructDeclaration(declarations) { if (!declarations) { return false; } - return declarations.some((declaration) => declaration.kind === 265 /* StructDeclaration */); + return declarations.some((declaration) => declaration.kind === 267 /* StructDeclaration */); } function getNameOfDecorator(node) { const expression = node.expression; @@ -20749,16 +20761,16 @@ function createParenthesizerRules(factory2) { return parenthesizerRule; } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(227 /* BinaryExpression */, binaryOperator); + const binaryOperatorPrecedence = getOperatorPrecedence(229 /* BinaryExpression */, binaryOperator); + const binaryOperatorAssociativity = getOperatorAssociativity(229 /* BinaryExpression */, binaryOperator); const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 219 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { + if (!isLeftSideOfBinary && operand.kind === 221 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { return true; } const operandPrecedence = getExpressionPrecedence(emittedOperand); switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 230 /* YieldExpression */) { + if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 232 /* YieldExpression */) { return false; } return true; @@ -20792,7 +20804,7 @@ function createParenthesizerRules(factory2) { if (isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { + if (node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { if (node.cachedLiteralKind !== void 0) { return node.cachedLiteralKind; } @@ -20805,7 +20817,7 @@ function createParenthesizerRules(factory2) { } function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 217 /* ParenthesizedExpression */) { + if (skipped.kind === 219 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; @@ -20820,7 +20832,7 @@ function createParenthesizerRules(factory2) { return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; } function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(228 /* ConditionalExpression */, 57 /* QuestionToken */); + const conditionalPrecedence = getOperatorPrecedence(230 /* ConditionalExpression */, 57 /* QuestionToken */); const emittedCondition = skipPartiallyEmittedExpressions(condition); const conditionPrecedence = getExpressionPrecedence(emittedCondition); if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { @@ -20837,8 +20849,8 @@ function createParenthesizerRules(factory2) { let needsParens = isCommaSequence(check); if (!needsParens) { switch (getLeftmostExpression(check, false).kind) { - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: needsParens = true; } } @@ -20847,16 +20859,16 @@ function createParenthesizerRules(factory2) { function parenthesizeExpressionOfNew(expression) { const leftmostExpr = getLeftmostExpression(expression, true); switch (leftmostExpr.kind) { - case 213 /* CallExpression */: + case 215 /* CallExpression */: return factory2.createParenthesizedExpression(expression); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; } return parenthesizeLeftSideOfAccess(expression); } function parenthesizeLeftSideOfAccess(expression, optionalChain) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 214 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { + if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 216 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { return expression; } return setTextRange(factory2.createParenthesizedExpression(expression), expression); @@ -20874,7 +20886,7 @@ function createParenthesizerRules(factory2) { function parenthesizeExpressionForDisallowedComma(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, 27 /* CommaToken */); + const commaPrecedence = getOperatorPrecedence(229 /* BinaryExpression */, 27 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); } function parenthesizeExpressionOfExpressionStatement(expression) { @@ -20882,7 +20894,7 @@ function createParenthesizerRules(factory2) { if (isCallExpression(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */) { + if (kind === 220 /* FunctionExpression */ || kind === 221 /* ArrowFunction */) { const updated = factory2.updateCallExpression( emittedExpression, setTextRange(factory2.createParenthesizedExpression(callee), callee), @@ -20893,37 +20905,37 @@ function createParenthesizerRules(factory2) { } } const leftmostExpressionKind = getLeftmostExpression(emittedExpression, false).kind; - if (leftmostExpressionKind === 210 /* ObjectLiteralExpression */ || leftmostExpressionKind === 218 /* FunctionExpression */) { + if (leftmostExpressionKind === 212 /* ObjectLiteralExpression */ || leftmostExpressionKind === 220 /* FunctionExpression */) { return setTextRange(factory2.createParenthesizedExpression(expression), expression); } return expression; } function parenthesizeConciseBodyOfArrowFunction(body) { - if (!isBlock(body) && (isCommaSequence(body) || getLeftmostExpression(body, false).kind === 210 /* ObjectLiteralExpression */)) { + if (!isBlock(body) && (isCommaSequence(body) || getLeftmostExpression(body, false).kind === 212 /* ObjectLiteralExpression */)) { return setTextRange(factory2.createParenthesizedExpression(body), body); } return body; } function parenthesizeCheckTypeOfConditionalType(checkType) { switch (checkType.kind) { - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 194 /* ConditionalType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 196 /* ConditionalType */: return factory2.createParenthesizedType(checkType); } return checkType; } function parenthesizeExtendsTypeOfConditionalType(extendsType) { switch (extendsType.kind) { - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return factory2.createParenthesizedType(extendsType); } return extendsType; } function parenthesizeConstituentTypeOfUnionType(type) { switch (type.kind) { - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeCheckTypeOfConditionalType(type); @@ -20933,8 +20945,8 @@ function createParenthesizerRules(factory2) { } function parenthesizeConstituentTypeOfIntersectionType(type) { switch (type.kind) { - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfUnionType(type); @@ -20944,23 +20956,23 @@ function createParenthesizerRules(factory2) { } function parenthesizeOperandOfTypeOperator(type) { switch (type.kind) { - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } function parenthesizeOperandOfReadonlyTypeOperator(type) { switch (type.kind) { - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } function parenthesizeNonArrayTypeOfPostfixType(type) { switch (type.kind) { - case 195 /* InferType */: - case 198 /* TypeOperator */: - case 186 /* TypeQuery */: + case 197 /* InferType */: + case 200 /* TypeOperator */: + case 188 /* TypeQuery */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); @@ -21114,11 +21126,11 @@ function createNodeConverters(factory2) { } function convertToAssignmentPattern(node) { switch (node.kind) { - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 209 /* ArrayBindingPattern */: + case 211 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 206 /* ObjectBindingPattern */: - case 210 /* ObjectLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 212 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -21243,6 +21255,8 @@ function createNodeFactory(flags, baseFactory2) { updatePropertyDeclaration: updatePropertyDeclaration2, createAnnotationPropertyDeclaration, updateAnnotationPropertyDeclaration, + createOverloadPropertyDeclaration, + updateOverloadPropertyDeclaration, createMethodSignature: createMethodSignature3, updateMethodSignature: updateMethodSignature3, createMethodDeclaration, @@ -21438,6 +21452,8 @@ function createNodeFactory(flags, baseFactory2) { updateStructDeclaration, createAnnotationDeclaration, updateAnnotationDeclaration, + createOverloadDeclaration, + updateOverloadDeclaration, createInterfaceDeclaration: createInterfaceDeclaration2, updateInterfaceDeclaration: updateInterfaceDeclaration2, createTypeAliasDeclaration: createTypeAliasDeclaration2, @@ -21484,40 +21500,40 @@ function createNodeFactory(flags, baseFactory2) { createExternalModuleReference: createExternalModuleReference2, updateExternalModuleReference: updateExternalModuleReference2, get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(321 /* JSDocAllType */); + return getJSDocPrimaryTypeCreateFunction(324 /* JSDocAllType */); }, get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(322 /* JSDocUnknownType */); + return getJSDocPrimaryTypeCreateFunction(325 /* JSDocUnknownType */); }, get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(324 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(327 /* JSDocNonNullableType */); }, get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(324 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(327 /* JSDocNonNullableType */); }, get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(323 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(326 /* JSDocNullableType */); }, get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(323 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(326 /* JSDocNullableType */); }, get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(325 /* JSDocOptionalType */); + return getJSDocUnaryTypeCreateFunction(328 /* JSDocOptionalType */); }, get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(325 /* JSDocOptionalType */); + return getJSDocUnaryTypeUpdateFunction(328 /* JSDocOptionalType */); }, get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(327 /* JSDocVariadicType */); + return getJSDocUnaryTypeCreateFunction(330 /* JSDocVariadicType */); }, get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(327 /* JSDocVariadicType */); + return getJSDocUnaryTypeUpdateFunction(330 /* JSDocVariadicType */); }, get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(328 /* JSDocNamepathType */); + return getJSDocUnaryTypeCreateFunction(331 /* JSDocNamepathType */); }, get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(328 /* JSDocNamepathType */); + return getJSDocUnaryTypeUpdateFunction(331 /* JSDocNamepathType */); }, createJSDocFunctionType, updateJSDocFunctionType, @@ -21554,76 +21570,76 @@ function createNodeFactory(flags, baseFactory2) { createJSDocLinkPlain, updateJSDocLinkPlain, get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(352 /* JSDocTypeTag */); + return getJSDocTypeLikeTagCreateFunction(355 /* JSDocTypeTag */); }, get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocTypeTag */); + return getJSDocTypeLikeTagUpdateFunction(355 /* JSDocTypeTag */); }, get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(350 /* JSDocReturnTag */); + return getJSDocTypeLikeTagCreateFunction(353 /* JSDocReturnTag */); }, get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocReturnTag */); + return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocReturnTag */); }, get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(351 /* JSDocThisTag */); + return getJSDocTypeLikeTagCreateFunction(354 /* JSDocThisTag */); }, get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocThisTag */); + return getJSDocTypeLikeTagUpdateFunction(354 /* JSDocThisTag */); }, get createJSDocEnumTag() { - return getJSDocTypeLikeTagCreateFunction(348 /* JSDocEnumTag */); + return getJSDocTypeLikeTagCreateFunction(351 /* JSDocEnumTag */); }, get updateJSDocEnumTag() { - return getJSDocTypeLikeTagUpdateFunction(348 /* JSDocEnumTag */); + return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocEnumTag */); }, get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(339 /* JSDocAuthorTag */); + return getJSDocSimpleTagCreateFunction(342 /* JSDocAuthorTag */); }, get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(339 /* JSDocAuthorTag */); + return getJSDocSimpleTagUpdateFunction(342 /* JSDocAuthorTag */); }, get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(341 /* JSDocClassTag */); + return getJSDocSimpleTagCreateFunction(344 /* JSDocClassTag */); }, get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(341 /* JSDocClassTag */); + return getJSDocSimpleTagUpdateFunction(344 /* JSDocClassTag */); }, get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(342 /* JSDocPublicTag */); + return getJSDocSimpleTagCreateFunction(345 /* JSDocPublicTag */); }, get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(342 /* JSDocPublicTag */); + return getJSDocSimpleTagUpdateFunction(345 /* JSDocPublicTag */); }, get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(343 /* JSDocPrivateTag */); + return getJSDocSimpleTagCreateFunction(346 /* JSDocPrivateTag */); }, get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(343 /* JSDocPrivateTag */); + return getJSDocSimpleTagUpdateFunction(346 /* JSDocPrivateTag */); }, get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(344 /* JSDocProtectedTag */); + return getJSDocSimpleTagCreateFunction(347 /* JSDocProtectedTag */); }, get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(344 /* JSDocProtectedTag */); + return getJSDocSimpleTagUpdateFunction(347 /* JSDocProtectedTag */); }, get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(345 /* JSDocReadonlyTag */); + return getJSDocSimpleTagCreateFunction(348 /* JSDocReadonlyTag */); }, get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(345 /* JSDocReadonlyTag */); + return getJSDocSimpleTagUpdateFunction(348 /* JSDocReadonlyTag */); }, get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(346 /* JSDocOverrideTag */); + return getJSDocSimpleTagCreateFunction(349 /* JSDocOverrideTag */); }, get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(346 /* JSDocOverrideTag */); + return getJSDocSimpleTagUpdateFunction(349 /* JSDocOverrideTag */); }, get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(340 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagCreateFunction(343 /* JSDocDeprecatedTag */); }, get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(340 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagUpdateFunction(343 /* JSDocDeprecatedTag */); }, createJSDocUnknownTag, updateJSDocUnknownTag, @@ -21874,12 +21890,13 @@ function createNodeFactory(flags, baseFactory2) { } if (name) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 305 /* PropertyAssignment */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 308 /* PropertyAssignment */: if (isIdentifier(name)) { node.transformFlags |= propagateIdentifierNameFlags(name); break; @@ -22146,7 +22163,7 @@ function createNodeFactory(flags, baseFactory2) { return baseFactory2.createBaseTokenNode(kind); } function createToken3(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 164 /* LastToken */, "Invalid token"); + Debug.assert(token >= 0 /* FirstToken */ && token <= 165 /* 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"); @@ -22250,7 +22267,7 @@ function createNodeFactory(flags, baseFactory2) { return result.length ? result : void 0; } function createQualifiedName2(left, right) { - const node = createBaseNode(165 /* QualifiedName */); + const node = createBaseNode(166 /* QualifiedName */); node.left = left; node.right = asName(right); node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); @@ -22260,7 +22277,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createQualifiedName2(left, right), node) : node; } function createComputedPropertyName2(expression) { - const node = createBaseNode(166 /* ComputedPropertyName */); + const node = createBaseNode(167 /* ComputedPropertyName */); node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; return node; @@ -22270,7 +22287,7 @@ function createNodeFactory(flags, baseFactory2) { } function createTypeParameterDeclaration2(modifiers, name, constraint, defaultType) { const node = createBaseNamedDeclaration( - 167 /* TypeParameter */, + 168 /* TypeParameter */, modifiers, name ); @@ -22284,7 +22301,7 @@ function createNodeFactory(flags, baseFactory2) { } function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { const node = createBaseVariableLikeDeclaration( - 168 /* Parameter */, + 169 /* Parameter */, modifiers, name, type, @@ -22309,7 +22326,7 @@ function createNodeFactory(flags, baseFactory2) { 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 createDecorator2(expression, annotationDeclaration) { - const node = createBaseNode(169 /* Decorator */); + const node = createBaseNode(170 /* Decorator */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.annotationDeclaration = annotationDeclaration; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */ | 8192 /* ContainsTypeScriptClassSyntax */ | 33554432 /* ContainsDecorators */; @@ -22320,7 +22337,7 @@ function createNodeFactory(flags, baseFactory2) { } function createPropertySignature3(modifiers, name, questionToken, type) { const node = createBaseNamedDeclaration( - 170 /* PropertySignature */, + 171 /* PropertySignature */, modifiers, name ); @@ -22333,6 +22350,21 @@ function createNodeFactory(flags, baseFactory2) { function updatePropertySignature3(node, modifiers, name, questionToken, type) { return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.type !== type ? finishUpdatePropertySignature(createPropertySignature3(modifiers, name, questionToken, type), node) : node; } + function createOverloadPropertyDeclaration(modifiers, name, questionToken, type) { + const node = createBaseNamedDeclaration( + 174 /* OverloadPropertyDeclaration */, + modifiers, + name + ); + node.type = type; + node.questionToken = questionToken; + node.transformFlags = 1 /* ContainsTypeScript */; + node.initializer = void 0; + return node; + } + function updateOverloadPropertyDeclaration(node, modifiers, name, questionToken, type) { + return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createOverloadPropertyDeclaration(modifiers, name, questionToken, type), node) : node; + } function finishUpdatePropertySignature(updated, original) { if (updated !== original) { updated.initializer = original.initializer; @@ -22341,7 +22373,7 @@ function createNodeFactory(flags, baseFactory2) { } function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { const node = createBaseVariableLikeDeclaration( - 171 /* PropertyDeclaration */, + 172 /* PropertyDeclaration */, modifiers, name, type, @@ -22363,7 +22395,7 @@ function createNodeFactory(flags, baseFactory2) { } function createAnnotationPropertyDeclaration(name, type, initializer) { const node = createBaseVariableLikeDeclaration( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, void 0, name, type, @@ -22377,7 +22409,7 @@ function createNodeFactory(flags, baseFactory2) { } function createMethodSignature3(modifiers, name, questionToken, typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 173 /* MethodSignature */, + 175 /* MethodSignature */, modifiers, name, typeParameters, @@ -22393,7 +22425,7 @@ function createNodeFactory(flags, baseFactory2) { } function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 174 /* MethodDeclaration */, + 176 /* MethodDeclaration */, modifiers, name, typeParameters, @@ -22430,7 +22462,7 @@ function createNodeFactory(flags, baseFactory2) { } function createClassStaticBlockDeclaration(body) { const node = createBaseGenericNamedDeclaration( - 175 /* ClassStaticBlockDeclaration */, + 177 /* ClassStaticBlockDeclaration */, void 0, void 0, void 0 @@ -22453,7 +22485,7 @@ function createNodeFactory(flags, baseFactory2) { } function createConstructorDeclaration(modifiers, parameters, body) { const node = createBaseFunctionLikeDeclaration( - 176 /* Constructor */, + 178 /* Constructor */, modifiers, void 0, void 0, @@ -22480,7 +22512,7 @@ function createNodeFactory(flags, baseFactory2) { } function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 177 /* GetAccessor */, + 179 /* GetAccessor */, modifiers, name, void 0, @@ -22502,7 +22534,7 @@ function createNodeFactory(flags, baseFactory2) { } function createSetAccessorDeclaration(modifiers, name, parameters, body) { const node = createBaseFunctionLikeDeclaration( - 178 /* SetAccessor */, + 180 /* SetAccessor */, modifiers, name, void 0, @@ -22526,7 +22558,7 @@ function createNodeFactory(flags, baseFactory2) { } function createCallSignature2(typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 179 /* CallSignature */, + 181 /* CallSignature */, void 0, void 0, typeParameters, @@ -22541,7 +22573,7 @@ function createNodeFactory(flags, baseFactory2) { } function createConstructSignature2(typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 180 /* ConstructSignature */, + 182 /* ConstructSignature */, void 0, void 0, typeParameters, @@ -22556,7 +22588,7 @@ function createNodeFactory(flags, baseFactory2) { } function createIndexSignature3(modifiers, parameters, type) { const node = createBaseSignatureDeclaration( - 181 /* IndexSignature */, + 183 /* IndexSignature */, modifiers, void 0, void 0, @@ -22570,7 +22602,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature3(modifiers, parameters, type), node) : node; } function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(204 /* TemplateLiteralTypeSpan */); + const node = createBaseNode(206 /* TemplateLiteralTypeSpan */); node.type = type; node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; @@ -22583,7 +22615,7 @@ function createNodeFactory(flags, baseFactory2) { return createToken3(kind); } function createTypePredicateNode3(assertsModifier, parameterName, type) { - const node = createBaseNode(182 /* TypePredicate */); + const node = createBaseNode(184 /* TypePredicate */); node.assertsModifier = assertsModifier; node.parameterName = asName(parameterName); node.type = type; @@ -22594,7 +22626,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode3(assertsModifier, parameterName, type), node) : node; } function createTypeReferenceNode2(typeName, typeArguments) { - const node = createBaseNode(183 /* TypeReference */); + const node = createBaseNode(185 /* TypeReference */); node.typeName = asName(typeName); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray2(typeArguments)); node.transformFlags = 1 /* ContainsTypeScript */; @@ -22605,7 +22637,7 @@ function createNodeFactory(flags, baseFactory2) { } function createFunctionTypeNode2(typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 184 /* FunctionType */, + 186 /* FunctionType */, void 0, void 0, typeParameters, @@ -22630,7 +22662,7 @@ function createNodeFactory(flags, baseFactory2) { } function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 185 /* ConstructorType */, + 187 /* ConstructorType */, modifiers, void 0, typeParameters, @@ -22653,7 +22685,7 @@ function createNodeFactory(flags, baseFactory2) { return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); } function createTypeQueryNode2(exprName, typeArguments) { - const node = createBaseNode(186 /* TypeQuery */); + const node = createBaseNode(188 /* TypeQuery */); node.exprName = exprName; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags = 1 /* ContainsTypeScript */; @@ -22663,7 +22695,7 @@ function createNodeFactory(flags, baseFactory2) { return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode2(exprName, typeArguments), node) : node; } function createTypeLiteralNode2(members) { - const node = createBaseNode(187 /* TypeLiteral */); + const node = createBaseNode(189 /* TypeLiteral */); node.members = createNodeArray2(members); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22672,7 +22704,7 @@ function createNodeFactory(flags, baseFactory2) { return node.members !== members ? update(createTypeLiteralNode2(members), node) : node; } function createArrayTypeNode2(elementType) { - const node = createBaseNode(188 /* ArrayType */); + const node = createBaseNode(190 /* ArrayType */); node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22681,7 +22713,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elementType !== elementType ? update(createArrayTypeNode2(elementType), node) : node; } function createTupleTypeNode2(elements) { - const node = createBaseNode(189 /* TupleType */); + const node = createBaseNode(191 /* TupleType */); node.elements = createNodeArray2(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22690,7 +22722,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createTupleTypeNode2(elements), node) : node; } function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseNode(202 /* NamedTupleMember */); + const node = createBaseNode(204 /* NamedTupleMember */); node.dotDotDotToken = dotDotDotToken; node.name = name; node.questionToken = questionToken; @@ -22702,7 +22734,7 @@ function createNodeFactory(flags, baseFactory2) { return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createNamedTupleMember(dotDotDotToken, name, questionToken, type), node) : node; } function createOptionalTypeNode2(type) { - const node = createBaseNode(190 /* OptionalType */); + const node = createBaseNode(192 /* OptionalType */); node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22711,7 +22743,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createOptionalTypeNode2(type), node) : node; } function createRestTypeNode2(type) { - const node = createBaseNode(191 /* RestType */); + const node = createBaseNode(193 /* RestType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22729,19 +22761,19 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; } function createUnionTypeNode2(types) { - return createUnionOrIntersectionTypeNode(192 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); + return createUnionOrIntersectionTypeNode(194 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function updateUnionTypeNode2(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function createIntersectionTypeNode2(types) { - return createUnionOrIntersectionTypeNode(193 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); + return createUnionOrIntersectionTypeNode(195 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function updateIntersectionTypeNode2(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function createConditionalTypeNode2(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(194 /* ConditionalType */); + const node = createBaseNode(196 /* ConditionalType */); node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); node.trueType = trueType; @@ -22753,7 +22785,7 @@ function createNodeFactory(flags, baseFactory2) { return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? update(createConditionalTypeNode2(checkType, extendsType, trueType, falseType), node) : node; } function createInferTypeNode2(typeParameter) { - const node = createBaseNode(195 /* InferType */); + const node = createBaseNode(197 /* InferType */); node.typeParameter = typeParameter; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22762,7 +22794,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameter !== typeParameter ? update(createInferTypeNode2(typeParameter), node) : node; } function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(203 /* TemplateLiteralType */); + const node = createBaseNode(205 /* TemplateLiteralType */); node.head = head; node.templateSpans = createNodeArray2(templateSpans); node.transformFlags = 1 /* ContainsTypeScript */; @@ -22772,7 +22804,7 @@ function createNodeFactory(flags, baseFactory2) { return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } function createImportTypeNode2(argument, assertions, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(205 /* ImportType */); + const node = createBaseNode(207 /* ImportType */); node.argument = argument; node.assertions = assertions; node.qualifier = qualifier; @@ -22785,7 +22817,7 @@ function createNodeFactory(flags, baseFactory2) { return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode2(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType2(type) { - const node = createBaseNode(196 /* ParenthesizedType */); + const node = createBaseNode(198 /* ParenthesizedType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22794,12 +22826,12 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createParenthesizedType2(type), node) : node; } function createThisTypeNode2() { - const node = createBaseNode(197 /* ThisType */); + const node = createBaseNode(199 /* ThisType */); node.transformFlags = 1 /* ContainsTypeScript */; return node; } function createTypeOperatorNode3(operator, type) { - const node = createBaseNode(198 /* TypeOperator */); + const node = createBaseNode(200 /* TypeOperator */); node.operator = operator; node.type = operator === 147 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); node.transformFlags = 1 /* ContainsTypeScript */; @@ -22809,7 +22841,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createTypeOperatorNode3(node.operator, type), node) : node; } function createIndexedAccessTypeNode2(objectType, indexType) { - const node = createBaseNode(199 /* IndexedAccessType */); + const node = createBaseNode(201 /* IndexedAccessType */); node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); node.indexType = indexType; node.transformFlags = 1 /* ContainsTypeScript */; @@ -22819,7 +22851,7 @@ function createNodeFactory(flags, baseFactory2) { return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode2(objectType, indexType), node) : node; } function createMappedTypeNode2(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseNode(200 /* MappedType */); + const node = createBaseNode(202 /* MappedType */); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; node.nameType = nameType; @@ -22833,7 +22865,7 @@ function createNodeFactory(flags, baseFactory2) { return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? update(createMappedTypeNode2(readonlyToken, typeParameter, nameType, questionToken, type, members), node) : node; } function createLiteralTypeNode2(literal) { - const node = createBaseNode(201 /* LiteralType */); + const node = createBaseNode(203 /* LiteralType */); node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -22842,7 +22874,7 @@ function createNodeFactory(flags, baseFactory2) { return node.literal !== literal ? update(createLiteralTypeNode2(literal), node) : node; } function createObjectBindingPattern2(elements) { - const node = createBaseNode(206 /* ObjectBindingPattern */); + const node = createBaseNode(208 /* ObjectBindingPattern */); node.elements = createNodeArray2(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { @@ -22854,7 +22886,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createObjectBindingPattern2(elements), node) : node; } function createArrayBindingPattern2(elements) { - const node = createBaseNode(207 /* ArrayBindingPattern */); + const node = createBaseNode(209 /* ArrayBindingPattern */); node.elements = createNodeArray2(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; return node; @@ -22864,7 +22896,7 @@ function createNodeFactory(flags, baseFactory2) { } function createBindingElement2(dotDotDotToken, propertyName, name, initializer) { const node = createBaseBindingLikeDeclaration( - 208 /* BindingElement */, + 210 /* BindingElement */, void 0, name, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer) @@ -22887,7 +22919,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseExpression(209 /* ArrayLiteralExpression */); + const node = createBaseExpression(211 /* ArrayLiteralExpression */); const lastElement = elements && lastOrUndefined(elements); const elementsArray = createNodeArray2(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); @@ -22899,7 +22931,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; } function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseExpression(210 /* ObjectLiteralExpression */); + const node = createBaseExpression(212 /* ObjectLiteralExpression */); node.properties = createNodeArray2(properties); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.properties); @@ -22909,7 +22941,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; } function createPropertyAccessExpression(expression, name) { - const node = createBaseExpression(211 /* PropertyAccessExpression */); + const node = createBaseExpression(213 /* PropertyAccessExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.name = asName(name); node.transformFlags = propagateChildFlags(node.expression) | (isIdentifier(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912 /* ContainsPrivateIdentifierInExpression */); @@ -22925,7 +22957,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.name !== name ? update(createPropertyAccessExpression(expression, name), node) : node; } function createPropertyAccessChain2(expression, questionDotToken, name) { - const node = createBaseExpression(211 /* PropertyAccessExpression */); + const node = createBaseExpression(213 /* PropertyAccessExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.questionDotToken = questionDotToken; @@ -22938,7 +22970,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain2(expression, questionDotToken, name), node) : node; } function createElementAccessExpression(expression, index) { - const node = createBaseExpression(212 /* ElementAccessExpression */); + const node = createBaseExpression(214 /* ElementAccessExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.argumentExpression = asExpression(index); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.argumentExpression); @@ -22954,7 +22986,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.argumentExpression !== argumentExpression ? update(createElementAccessExpression(expression, argumentExpression), node) : node; } function createElementAccessChain2(expression, questionDotToken, index) { - const node = createBaseExpression(212 /* ElementAccessExpression */); + const node = createBaseExpression(214 /* ElementAccessExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.questionDotToken = questionDotToken; @@ -22967,7 +22999,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain2(expression, questionDotToken, argumentExpression), node) : node; } function createCallExpression(expression, typeArguments, argumentsArray) { - const node = createBaseExpression(213 /* CallExpression */); + const node = createBaseExpression(215 /* CallExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.typeArguments = asNodeArray(typeArguments); node.arguments = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray2(argumentsArray)); @@ -22989,7 +23021,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallExpression(expression, typeArguments, argumentsArray), node) : node; } function createCallChain2(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseExpression(213 /* CallExpression */); + const node = createBaseExpression(215 /* CallExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.questionDotToken = questionDotToken; @@ -23009,7 +23041,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain2(expression, questionDotToken, typeArguments, argumentsArray), node) : node; } function createNewExpression(expression, typeArguments, argumentsArray) { - const node = createBaseExpression(214 /* NewExpression */); + const node = createBaseExpression(216 /* NewExpression */); node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; @@ -23023,7 +23055,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; } function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseExpression(215 /* TaggedTemplateExpression */); + const node = createBaseExpression(217 /* TaggedTemplateExpression */); node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess(tag, false); node.typeArguments = asNodeArray(typeArguments); node.template = template; @@ -23040,7 +23072,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; } function createTypeAssertion2(type, expression) { - const node = createBaseExpression(216 /* TypeAssertionExpression */); + const node = createBaseExpression(218 /* TypeAssertionExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -23050,7 +23082,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type || node.expression !== expression ? update(createTypeAssertion2(type, expression), node) : node; } function createParenthesizedExpression(expression) { - const node = createBaseExpression(217 /* ParenthesizedExpression */); + const node = createBaseExpression(219 /* ParenthesizedExpression */); node.expression = expression; node.transformFlags = propagateChildFlags(node.expression); return node; @@ -23060,7 +23092,7 @@ function createNodeFactory(flags, baseFactory2) { } function createFunctionExpression2(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 218 /* FunctionExpression */, + 220 /* FunctionExpression */, modifiers, name, typeParameters, @@ -23088,7 +23120,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression2(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node; } function createEtsComponentExpression(name, argumentsArray, body) { - const node = createBaseExpression(220 /* EtsComponentExpression */); + const node = createBaseExpression(222 /* EtsComponentExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(name); node.arguments = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray2(argumentsArray)); node.body = body; @@ -23099,7 +23131,7 @@ function createNodeFactory(flags, baseFactory2) { } function createArrowFunction3(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { const node = createBaseFunctionLikeDeclaration( - 219 /* ArrowFunction */, + 221 /* ArrowFunction */, modifiers, void 0, typeParameters, @@ -23118,7 +23150,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction3(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node; } function createDeleteExpression(expression) { - const node = createBaseExpression(221 /* DeleteExpression */); + const node = createBaseExpression(223 /* DeleteExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23127,7 +23159,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; } function createTypeOfExpression(expression) { - const node = createBaseExpression(222 /* TypeOfExpression */); + const node = createBaseExpression(224 /* TypeOfExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23136,7 +23168,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; } function createVoidExpression(expression) { - const node = createBaseExpression(223 /* VoidExpression */); + const node = createBaseExpression(225 /* VoidExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23145,7 +23177,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createVoidExpression(expression), node) : node; } function createAwaitExpression(expression) { - const node = createBaseExpression(224 /* AwaitExpression */); + const node = createBaseExpression(226 /* AwaitExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; return node; @@ -23154,7 +23186,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; } function createPrefixUnaryExpression(operator, operand) { - const node = createBaseExpression(225 /* PrefixUnaryExpression */); + const node = createBaseExpression(227 /* PrefixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -23167,7 +23199,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; } function createPostfixUnaryExpression(operand, operator) { - const node = createBaseExpression(226 /* PostfixUnaryExpression */); + const node = createBaseExpression(228 /* PostfixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -23180,7 +23212,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; } function createBinaryExpression(left, operator, right) { - const node = createBaseExpression(227 /* BinaryExpression */); + const node = createBaseExpression(229 /* BinaryExpression */); const operatorToken = asToken(operator); const operatorKind = operatorToken.kind; node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); @@ -23229,7 +23261,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseExpression(228 /* ConditionalExpression */); + const node = createBaseExpression(230 /* ConditionalExpression */); node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); node.questionToken = questionToken != null ? questionToken : createToken3(57 /* QuestionToken */); node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); @@ -23242,7 +23274,7 @@ function createNodeFactory(flags, baseFactory2) { 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 createTemplateExpression2(head, templateSpans) { - const node = createBaseExpression(229 /* TemplateExpression */); + const node = createBaseExpression(231 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray2(templateSpans); node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; @@ -23295,7 +23327,7 @@ function createNodeFactory(flags, baseFactory2) { } function createYieldExpression(asteriskToken, expression) { Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseExpression(230 /* YieldExpression */); + const node = createBaseExpression(232 /* YieldExpression */); node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.asteriskToken = asteriskToken; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; @@ -23305,7 +23337,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; } function createSpreadElement(expression) { - const node = createBaseExpression(231 /* SpreadElement */); + const node = createBaseExpression(233 /* SpreadElement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; return node; @@ -23315,7 +23347,7 @@ function createNodeFactory(flags, baseFactory2) { } function createClassExpression3(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseClassLikeDeclaration( - 232 /* ClassExpression */, + 234 /* ClassExpression */, modifiers, name, typeParameters, @@ -23329,10 +23361,10 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression3(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createOmittedExpression2() { - return createBaseExpression(233 /* OmittedExpression */); + return createBaseExpression(235 /* OmittedExpression */); } function createExpressionWithTypeArguments3(expression, typeArguments) { - const node = createBaseNode(234 /* ExpressionWithTypeArguments */); + const node = createBaseNode(236 /* ExpressionWithTypeArguments */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.typeArguments) | 1024 /* ContainsES2015 */; @@ -23342,7 +23374,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments3(expression, typeArguments), node) : node; } function createAsExpression2(expression, type) { - const node = createBaseExpression(235 /* AsExpression */); + const node = createBaseExpression(237 /* AsExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -23352,7 +23384,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createAsExpression2(expression, type), node) : node; } function createNonNullExpression2(expression) { - const node = createBaseExpression(236 /* NonNullExpression */); + const node = createBaseExpression(238 /* NonNullExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; return node; @@ -23364,7 +23396,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createNonNullExpression2(expression), node) : node; } function createSatisfiesExpression(expression, type) { - const node = createBaseExpression(239 /* SatisfiesExpression */); + const node = createBaseExpression(241 /* SatisfiesExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -23374,7 +23406,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; } function createNonNullChain2(expression) { - const node = createBaseExpression(236 /* NonNullExpression */); + const node = createBaseExpression(238 /* NonNullExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -23385,7 +23417,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createNonNullChain2(expression), node) : node; } function createMetaProperty2(keywordToken, name) { - const node = createBaseExpression(237 /* MetaProperty */); + const node = createBaseExpression(239 /* MetaProperty */); node.keywordToken = keywordToken; node.name = name; node.transformFlags |= propagateChildFlags(node.name); @@ -23405,7 +23437,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createMetaProperty2(node.keywordToken, name), node) : node; } function createTemplateSpan2(expression, literal) { - const node = createBaseNode(240 /* TemplateSpan */); + const node = createBaseNode(242 /* TemplateSpan */); node.expression = expression; node.literal = literal; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; @@ -23415,12 +23447,12 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan2(expression, literal), node) : node; } function createSemicolonClassElement2() { - const node = createBaseNode(241 /* SemicolonClassElement */); + const node = createBaseNode(243 /* SemicolonClassElement */); node.transformFlags |= 1024 /* ContainsES2015 */; return node; } function createBlock2(statements, multiLine) { - const node = createBaseNode(242 /* Block */); + const node = createBaseNode(244 /* Block */); node.statements = createNodeArray2(statements); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.statements); @@ -23430,7 +23462,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createBlock2(statements, node.multiLine), node) : node; } function createVariableStatement2(modifiers, declarationList) { - const node = createBaseDeclaration(244 /* VariableStatement */); + const node = createBaseDeclaration(246 /* VariableStatement */); node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList2(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); @@ -23443,10 +23475,10 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement2(modifiers, declarationList), node) : node; } function createEmptyStatement2() { - return createBaseNode(243 /* EmptyStatement */); + return createBaseNode(245 /* EmptyStatement */); } function createExpressionStatement2(expression) { - const node = createBaseNode(245 /* ExpressionStatement */); + const node = createBaseNode(247 /* ExpressionStatement */); node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23455,7 +23487,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createExpressionStatement2(expression), node) : node; } function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(246 /* IfStatement */); + const node = createBaseNode(248 /* IfStatement */); node.expression = expression; node.thenStatement = asEmbeddedStatement(thenStatement); node.elseStatement = asEmbeddedStatement(elseStatement); @@ -23466,7 +23498,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; } function createDoStatement(statement, expression) { - const node = createBaseNode(247 /* DoStatement */); + const node = createBaseNode(249 /* DoStatement */); node.statement = asEmbeddedStatement(statement); node.expression = expression; node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); @@ -23476,7 +23508,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; } function createWhileStatement(expression, statement) { - const node = createBaseNode(248 /* WhileStatement */); + const node = createBaseNode(250 /* WhileStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -23486,7 +23518,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; } function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(249 /* ForStatement */); + const node = createBaseNode(251 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -23498,7 +23530,7 @@ function createNodeFactory(flags, baseFactory2) { 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(250 /* ForInStatement */); + const node = createBaseNode(252 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = asEmbeddedStatement(statement); @@ -23509,7 +23541,7 @@ function createNodeFactory(flags, baseFactory2) { 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(251 /* ForOfStatement */); + const node = createBaseNode(253 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); @@ -23523,7 +23555,7 @@ function createNodeFactory(flags, baseFactory2) { 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(252 /* ContinueStatement */); + const node = createBaseNode(254 /* ContinueStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; return node; @@ -23532,7 +23564,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createContinueStatement(label), node) : node; } function createBreakStatement(label) { - const node = createBaseNode(253 /* BreakStatement */); + const node = createBaseNode(255 /* BreakStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; return node; @@ -23541,7 +23573,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createBreakStatement(label), node) : node; } function createReturnStatement(expression) { - const node = createBaseNode(254 /* ReturnStatement */); + const node = createBaseNode(256 /* ReturnStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; return node; @@ -23550,7 +23582,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createReturnStatement(expression), node) : node; } function createWithStatement(expression, statement) { - const node = createBaseNode(255 /* WithStatement */); + const node = createBaseNode(257 /* WithStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -23560,7 +23592,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; } function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(256 /* SwitchStatement */); + const node = createBaseNode(258 /* SwitchStatement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.caseBlock = caseBlock; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); @@ -23570,7 +23602,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; } function createLabeledStatement(label, statement) { - const node = createBaseNode(257 /* LabeledStatement */); + const node = createBaseNode(259 /* LabeledStatement */); node.label = asName(label); node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); @@ -23580,7 +23612,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; } function createThrowStatement(expression) { - const node = createBaseNode(258 /* ThrowStatement */); + const node = createBaseNode(260 /* ThrowStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -23589,7 +23621,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createThrowStatement(expression), node) : node; } function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(259 /* TryStatement */); + const node = createBaseNode(261 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -23600,11 +23632,11 @@ function createNodeFactory(flags, baseFactory2) { return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; } function createDebuggerStatement2() { - return createBaseNode(260 /* DebuggerStatement */); + return createBaseNode(262 /* DebuggerStatement */); } function createVariableDeclaration3(name, exclamationToken, type, initializer) { const node = createBaseVariableLikeDeclaration( - 261 /* VariableDeclaration */, + 263 /* VariableDeclaration */, void 0, name, type, @@ -23621,7 +23653,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.type !== type || node.exclamationToken !== exclamationToken || node.initializer !== initializer ? update(createVariableDeclaration3(name, exclamationToken, type, initializer), node) : node; } function createVariableDeclarationList2(declarations, flags2 = 0 /* None */) { - const node = createBaseNode(262 /* VariableDeclarationList */); + const node = createBaseNode(264 /* VariableDeclarationList */); node.flags |= flags2 & 3 /* BlockScoped */; node.declarations = createNodeArray2(declarations); node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -23635,7 +23667,7 @@ function createNodeFactory(flags, baseFactory2) { } function createFunctionDeclaration2(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 263 /* FunctionDeclaration */, + 265 /* FunctionDeclaration */, modifiers, name, typeParameters, @@ -23672,7 +23704,7 @@ function createNodeFactory(flags, baseFactory2) { } function createClassDeclaration2(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseClassLikeDeclaration( - 264 /* ClassDeclaration */, + 266 /* ClassDeclaration */, modifiers, name, typeParameters, @@ -23694,7 +23726,7 @@ function createNodeFactory(flags, baseFactory2) { } function createStructDeclaration(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseClassLikeDeclaration( - 265 /* StructDeclaration */, + 267 /* StructDeclaration */, modifiers, name, typeParameters, @@ -23716,7 +23748,7 @@ function createNodeFactory(flags, baseFactory2) { } function createAnnotationDeclaration(modifiers, name, members) { const node = createBaseNamedDeclaration( - 266 /* AnnotationDeclaration */, + 268 /* AnnotationDeclaration */, modifiers, name ); @@ -23733,9 +23765,28 @@ function createNodeFactory(flags, baseFactory2) { function updateAnnotationDeclaration(node, modifiers, name, members) { return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createAnnotationDeclaration(modifiers, name, members), node) : node; } + function createOverloadDeclaration(modifiers, name, members) { + const node = createBaseNamedDeclaration( + 269 /* OverloadDeclaration */, + modifiers, + name + ); + node.members = createNodeArray2(members); + node.transformFlags |= propagateChildrenFlags(node.members); + if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + node.transformFlags = 1 /* ContainsTypeScript */; + } else { + node.transformFlags |= 1024 /* ContainsES2015 */; + node.transformFlags |= 1 /* ContainsTypeScript */; + } + return node; + } + function updateOverloadDeclaration(node, modifiers, name, members) { + return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createOverloadDeclaration(modifiers, name, members), node) : node; + } function createInterfaceDeclaration2(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseInterfaceOrClassLikeDeclaration( - 267 /* InterfaceDeclaration */, + 270 /* InterfaceDeclaration */, modifiers, name, typeParameters, @@ -23757,7 +23808,7 @@ function createNodeFactory(flags, baseFactory2) { } function createTypeAliasDeclaration2(modifiers, name, typeParameters, type) { const node = createBaseGenericNamedDeclaration( - 268 /* TypeAliasDeclaration */, + 271 /* TypeAliasDeclaration */, modifiers, name, typeParameters @@ -23778,7 +23829,7 @@ function createNodeFactory(flags, baseFactory2) { } function createEnumDeclaration2(modifiers, name, members) { const node = createBaseNamedDeclaration( - 269 /* EnumDeclaration */, + 272 /* EnumDeclaration */, modifiers, name ); @@ -23798,7 +23849,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createModuleDeclaration2(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(270 /* ModuleDeclaration */); + const node = createBaseDeclaration(273 /* ModuleDeclaration */); node.modifiers = asNodeArray(modifiers); node.flags |= flags2 & (16 /* Namespace */ | 4 /* NestedNamespace */ | 1024 /* GlobalAugmentation */); node.name = name; @@ -23822,7 +23873,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createModuleBlock2(statements) { - const node = createBaseNode(271 /* ModuleBlock */); + const node = createBaseNode(274 /* ModuleBlock */); node.statements = createNodeArray2(statements); node.transformFlags |= propagateChildrenFlags(node.statements); return node; @@ -23831,7 +23882,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createModuleBlock2(statements), node) : node; } function createCaseBlock2(clauses) { - const node = createBaseNode(272 /* CaseBlock */); + const node = createBaseNode(275 /* CaseBlock */); node.clauses = createNodeArray2(clauses); node.transformFlags |= propagateChildrenFlags(node.clauses); return node; @@ -23841,7 +23892,7 @@ function createNodeFactory(flags, baseFactory2) { } function createNamespaceExportDeclaration2(name) { const node = createBaseNamedDeclaration( - 273 /* NamespaceExportDeclaration */, + 276 /* NamespaceExportDeclaration */, void 0, name ); @@ -23862,7 +23913,7 @@ function createNodeFactory(flags, baseFactory2) { } function createImportEqualsDeclaration2(modifiers, isTypeOnly, name, moduleReference) { const node = createBaseNamedDeclaration( - 274 /* ImportEqualsDeclaration */, + 277 /* ImportEqualsDeclaration */, modifiers, name ); @@ -23885,7 +23936,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createImportDeclaration2(modifiers, importClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(275 /* ImportDeclaration */); + const node = createBaseDeclaration(278 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; @@ -23905,7 +23956,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createImportClause3(isTypeOnly, name, namedBindings) { - const node = createBaseNode(276 /* ImportClause */); + const node = createBaseNode(279 /* ImportClause */); node.isTypeOnly = isTypeOnly; node.name = name; node.namedBindings = namedBindings; @@ -23927,7 +23978,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createAssertClause(elements, multiLine) { - const node = createBaseNode(302 /* AssertClause */); + const node = createBaseNode(305 /* AssertClause */); node.elements = createNodeArray2(elements); node.multiLine = multiLine; node.transformFlags |= 4 /* ContainsESNext */; @@ -23937,7 +23988,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; } function createAssertEntry(name, value) { - const node = createBaseNode(303 /* AssertEntry */); + const node = createBaseNode(306 /* AssertEntry */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -23947,7 +23998,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; } function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(304 /* ImportTypeAssertionContainer */); + const node = createBaseNode(307 /* ImportTypeAssertionContainer */); node.assertClause = clause; node.multiLine = multiLine; return node; @@ -23956,7 +24007,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } function createNamespaceImport2(name) { - const node = createBaseNode(277 /* NamespaceImport */); + const node = createBaseNode(280 /* NamespaceImport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -23966,7 +24017,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceImport2(name), node) : node; } function createNamespaceExport2(name) { - const node = createBaseNode(283 /* NamespaceExport */); + const node = createBaseNode(286 /* NamespaceExport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name) | 4 /* ContainsESNext */; node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -23976,7 +24027,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceExport2(name), node) : node; } function createNamedImports2(elements) { - const node = createBaseNode(278 /* NamedImports */); + const node = createBaseNode(281 /* NamedImports */); node.elements = createNodeArray2(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -23986,7 +24037,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedImports2(elements), node) : node; } function createImportSpecifier2(isTypeOnly, propertyName, name) { - const node = createBaseNode(279 /* ImportSpecifier */); + const node = createBaseNode(282 /* ImportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = propertyName; node.name = name; @@ -23998,7 +24049,7 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createImportSpecifier2(isTypeOnly, propertyName, name), node) : node; } function createExportAssignment3(modifiers, isExportEquals, expression) { - const node = createBaseDeclaration(280 /* ExportAssignment */); + const node = createBaseDeclaration(283 /* ExportAssignment */); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary(63 /* EqualsToken */, void 0, expression) : parenthesizerRules().parenthesizeExpressionOfExportDefault(expression); @@ -24017,7 +24068,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createExportDeclaration3(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(281 /* ExportDeclaration */); + const node = createBaseDeclaration(284 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; @@ -24038,7 +24089,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createNamedExports2(elements) { - const node = createBaseNode(282 /* NamedExports */); + const node = createBaseNode(285 /* NamedExports */); node.elements = createNodeArray2(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24048,7 +24099,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedExports2(elements), node) : node; } function createExportSpecifier2(isTypeOnly, propertyName, name) { - const node = createBaseNode(284 /* ExportSpecifier */); + const node = createBaseNode(287 /* ExportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = asName(propertyName); node.name = asName(name); @@ -24060,11 +24111,11 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier2(isTypeOnly, propertyName, name), node) : node; } function createMissingDeclaration() { - const node = createBaseDeclaration(285 /* MissingDeclaration */); + const node = createBaseDeclaration(288 /* MissingDeclaration */); return node; } function createExternalModuleReference2(expression) { - const node = createBaseNode(286 /* ExternalModuleReference */); + const node = createBaseNode(289 /* ExternalModuleReference */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24097,7 +24148,7 @@ function createNodeFactory(flags, baseFactory2) { } function createJSDocFunctionType(parameters, type) { const node = createBaseSignatureDeclaration( - 326 /* JSDocFunctionType */, + 329 /* JSDocFunctionType */, void 0, void 0, void 0, @@ -24110,7 +24161,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; } function createJSDocTypeLiteral2(propertyTags, isArrayType = false) { - const node = createBaseNode(331 /* JSDocTypeLiteral */); + const node = createBaseNode(334 /* JSDocTypeLiteral */); node.jsDocPropertyTags = asNodeArray(propertyTags); node.isArrayType = isArrayType; return node; @@ -24119,7 +24170,7 @@ function createNodeFactory(flags, baseFactory2) { return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral2(propertyTags, isArrayType), node) : node; } function createJSDocTypeExpression2(type) { - const node = createBaseNode(318 /* JSDocTypeExpression */); + const node = createBaseNode(321 /* JSDocTypeExpression */); node.type = type; return node; } @@ -24127,7 +24178,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createJSDocTypeExpression2(type), node) : node; } function createJSDocSignature2(typeParameters, parameters, type) { - const node = createBaseNode(332 /* JSDocSignature */); + const node = createBaseNode(335 /* JSDocSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray2(parameters); node.type = type; @@ -24147,7 +24198,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createJSDocTemplateTag2(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(353 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier3("template"), comment); + const node = createBaseJSDocTag(356 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier3("template"), comment); node.constraint = constraint; node.typeParameters = createNodeArray2(typeParameters); return node; @@ -24156,7 +24207,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag2(tagName, constraint, typeParameters, comment), node) : node; } function createJSDocTypedefTag2(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTag(354 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier3("typedef"), comment); + const node = createBaseJSDocTag(357 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier3("typedef"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -24166,7 +24217,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag2(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocParameterTag2(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTag(349 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier3("param"), comment); + const node = createBaseJSDocTag(352 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier3("param"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -24177,7 +24228,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag2(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocPropertyTag2(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTag(356 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier3("prop"), comment); + const node = createBaseJSDocTag(359 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier3("prop"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -24188,7 +24239,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag2(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocCallbackTag2(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTag(347 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier3("callback"), comment); + const node = createBaseJSDocTag(350 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier3("callback"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -24198,7 +24249,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag2(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocAugmentsTag2(tagName, className, comment) { - const node = createBaseJSDocTag(337 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier3("augments"), comment); + const node = createBaseJSDocTag(340 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier3("augments"), comment); node.class = className; return node; } @@ -24206,12 +24257,12 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocAugmentsTag2(tagName, className, comment), node) : node; } function createJSDocImplementsTag2(tagName, className, comment) { - const node = createBaseJSDocTag(338 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier3("implements"), comment); + const node = createBaseJSDocTag(341 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier3("implements"), comment); node.class = className; return node; } function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(355 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier3("see"), comment); + const node = createBaseJSDocTag(358 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier3("see"), comment); node.name = name; return node; } @@ -24219,7 +24270,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; } function createJSDocNameReference(name) { - const node = createBaseNode(319 /* JSDocNameReference */); + const node = createBaseNode(322 /* JSDocNameReference */); node.name = name; return node; } @@ -24227,7 +24278,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocNameReference(name), node) : node; } function createJSDocMemberName(left, right) { - const node = createBaseNode(320 /* JSDocMemberName */); + const node = createBaseNode(323 /* JSDocMemberName */); node.left = left; node.right = right; node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); @@ -24237,7 +24288,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; } function createJSDocLink(name, text) { - const node = createBaseNode(333 /* JSDocLink */); + const node = createBaseNode(336 /* JSDocLink */); node.name = name; node.text = text; return node; @@ -24246,7 +24297,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLink(name, text), node) : node; } function createJSDocLinkCode(name, text) { - const node = createBaseNode(334 /* JSDocLinkCode */); + const node = createBaseNode(337 /* JSDocLinkCode */); node.name = name; node.text = text; return node; @@ -24255,7 +24306,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; } function createJSDocLinkPlain(name, text) { - const node = createBaseNode(335 /* JSDocLinkPlain */); + const node = createBaseNode(338 /* JSDocLinkPlain */); node.name = name; node.text = text; return node; @@ -24282,14 +24333,14 @@ function createNodeFactory(flags, baseFactory2) { 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(336 /* JSDocTag */, tagName, comment); + const node = createBaseJSDocTag(339 /* JSDocTag */, tagName, comment); return node; } function updateJSDocUnknownTag(node, tagName, comment) { return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; } function createJSDocText(text) { - const node = createBaseNode(330 /* JSDocText */); + const node = createBaseNode(333 /* JSDocText */); node.text = text; return node; } @@ -24297,7 +24348,7 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text ? update(createJSDocText(text), node) : node; } function createJSDocComment2(comment, tags) { - const node = createBaseNode(329 /* JSDoc */); + const node = createBaseNode(332 /* JSDoc */); node.comment = comment; node.tags = asNodeArray(tags); return node; @@ -24306,7 +24357,7 @@ function createNodeFactory(flags, baseFactory2) { return node.comment !== comment || node.tags !== tags ? update(createJSDocComment2(comment, tags), node) : node; } function createJsxElement2(openingElement, children, closingElement) { - const node = createBaseNode(287 /* JsxElement */); + const node = createBaseNode(290 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray2(children); node.closingElement = closingElement; @@ -24317,7 +24368,7 @@ function createNodeFactory(flags, baseFactory2) { return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? update(createJsxElement2(openingElement, children, closingElement), node) : node; } function createJsxSelfClosingElement2(tagName, typeArguments, attributes) { - const node = createBaseNode(288 /* JsxSelfClosingElement */); + const node = createBaseNode(291 /* JsxSelfClosingElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -24331,7 +24382,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxSelfClosingElement2(tagName, typeArguments, attributes), node) : node; } function createJsxOpeningElement2(tagName, typeArguments, attributes) { - const node = createBaseNode(289 /* JsxOpeningElement */); + const node = createBaseNode(292 /* JsxOpeningElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -24345,7 +24396,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement2(tagName, typeArguments, attributes), node) : node; } function createJsxClosingElement2(tagName) { - const node = createBaseNode(290 /* JsxClosingElement */); + const node = createBaseNode(293 /* JsxClosingElement */); node.tagName = tagName; node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; return node; @@ -24354,7 +24405,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName ? update(createJsxClosingElement2(tagName), node) : node; } function createJsxFragment2(openingFragment, children, closingFragment) { - const node = createBaseNode(291 /* JsxFragment */); + const node = createBaseNode(294 /* JsxFragment */); node.openingFragment = openingFragment; node.children = createNodeArray2(children); node.closingFragment = closingFragment; @@ -24375,17 +24426,17 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText2(text, containsOnlyTriviaWhiteSpaces), node) : node; } function createJsxOpeningFragment2() { - const node = createBaseNode(292 /* JsxOpeningFragment */); + const node = createBaseNode(295 /* JsxOpeningFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxJsxClosingFragment2() { - const node = createBaseNode(293 /* JsxClosingFragment */); + const node = createBaseNode(296 /* JsxClosingFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxAttribute2(name, initializer) { - const node = createBaseNode(294 /* JsxAttribute */); + const node = createBaseNode(297 /* JsxAttribute */); node.name = name; node.initializer = initializer; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; @@ -24395,7 +24446,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute2(name, initializer), node) : node; } function createJsxAttributes2(properties) { - const node = createBaseNode(295 /* JsxAttributes */); + const node = createBaseNode(298 /* JsxAttributes */); node.properties = createNodeArray2(properties); node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; return node; @@ -24404,7 +24455,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createJsxAttributes2(properties), node) : node; } function createJsxSpreadAttribute2(expression) { - const node = createBaseNode(296 /* JsxSpreadAttribute */); + const node = createBaseNode(299 /* JsxSpreadAttribute */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; return node; @@ -24413,7 +24464,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxSpreadAttribute2(expression), node) : node; } function createJsxExpression2(dotDotDotToken, expression) { - const node = createBaseNode(297 /* JsxExpression */); + const node = createBaseNode(300 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; @@ -24423,7 +24474,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxExpression2(node.dotDotDotToken, expression), node) : node; } function createCaseClause2(expression, statements) { - const node = createBaseNode(298 /* CaseClause */); + const node = createBaseNode(301 /* CaseClause */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.statements = createNodeArray2(statements); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); @@ -24433,7 +24484,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statements !== statements ? update(createCaseClause2(expression, statements), node) : node; } function createDefaultClause2(statements) { - const node = createBaseNode(299 /* DefaultClause */); + const node = createBaseNode(302 /* DefaultClause */); node.statements = createNodeArray2(statements); node.transformFlags = propagateChildrenFlags(node.statements); return node; @@ -24442,7 +24493,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createDefaultClause2(statements), node) : node; } function createHeritageClause2(token, types) { - const node = createBaseNode(300 /* HeritageClause */); + const node = createBaseNode(303 /* HeritageClause */); node.token = token; node.types = createNodeArray2(types); node.transformFlags |= propagateChildrenFlags(node.types); @@ -24462,7 +24513,7 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createHeritageClause2(node.token, types), node) : node; } function createCatchClause2(variableDeclaration, block) { - const node = createBaseNode(301 /* CatchClause */); + const node = createBaseNode(304 /* CatchClause */); if (typeof variableDeclaration === "string" || variableDeclaration && !isVariableDeclaration(variableDeclaration)) { variableDeclaration = createVariableDeclaration3( variableDeclaration, @@ -24483,7 +24534,7 @@ function createNodeFactory(flags, baseFactory2) { } function createPropertyAssignment2(name, initializer) { const node = createBaseNamedDeclaration( - 305 /* PropertyAssignment */, + 308 /* PropertyAssignment */, void 0, name ); @@ -24509,7 +24560,7 @@ function createNodeFactory(flags, baseFactory2) { } function createShorthandPropertyAssignment2(name, objectAssignmentInitializer) { const node = createBaseNamedDeclaration( - 306 /* ShorthandPropertyAssignment */, + 309 /* ShorthandPropertyAssignment */, void 0, name ); @@ -24536,7 +24587,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createSpreadAssignment2(expression) { - const node = createBaseNode(307 /* SpreadAssignment */); + const node = createBaseNode(310 /* SpreadAssignment */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; return node; @@ -24545,7 +24596,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createSpreadAssignment2(expression), node) : node; } function createEnumMember2(name, initializer) { - const node = createBaseNode(308 /* EnumMember */); + const node = createBaseNode(311 /* EnumMember */); node.name = asName(name); node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; @@ -24555,7 +24606,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createEnumMember2(name, initializer), node) : node; } function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(314 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(317 /* SourceFile */); node.statements = createNodeArray2(statements); node.endOfFileToken = endOfFileToken; node.flags |= flags2; @@ -24570,7 +24621,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) { - const node = source.redirectInfo ? Object.create(source.redirectInfo.redirectTarget) : baseFactory2.createBaseSourceFileNode(314 /* SourceFile */); + const node = source.redirectInfo ? Object.create(source.redirectInfo.redirectTarget) : baseFactory2.createBaseSourceFileNode(317 /* SourceFile */); for (const p in source) { if (p === "emitNode" || hasProperty(node, p) || !hasProperty(source, p)) continue; @@ -24592,7 +24643,7 @@ function createNodeFactory(flags, baseFactory2) { 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 createBundle2(sourceFiles, prepends = emptyArray) { - const node = createBaseNode(315 /* Bundle */); + const node = createBaseNode(318 /* Bundle */); node.prepends = prepends; node.sourceFiles = sourceFiles; return node; @@ -24601,7 +24652,7 @@ function createNodeFactory(flags, baseFactory2) { return node.sourceFiles !== sourceFiles || node.prepends !== prepends ? update(createBundle2(sourceFiles, prepends), node) : node; } function createUnparsedSource(prologues, syntheticReferences, texts) { - const node = createBaseNode(316 /* UnparsedSource */); + const node = createBaseNode(319 /* UnparsedSource */); node.prologues = prologues; node.syntheticReferences = syntheticReferences; node.texts = texts; @@ -24618,48 +24669,48 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createUnparsedPrologue(data) { - return createBaseUnparsedNode(309 /* UnparsedPrologue */, data); + return createBaseUnparsedNode(312 /* UnparsedPrologue */, data); } function createUnparsedPrepend(data, texts) { - const node = createBaseUnparsedNode(310 /* UnparsedPrepend */, data); + const node = createBaseUnparsedNode(313 /* UnparsedPrepend */, data); node.texts = texts; return node; } function createUnparsedTextLike(data, internal) { - return createBaseUnparsedNode(internal ? 312 /* UnparsedInternalText */ : 311 /* UnparsedText */, data); + return createBaseUnparsedNode(internal ? 315 /* UnparsedInternalText */ : 314 /* UnparsedText */, data); } function createUnparsedSyntheticReference(section) { - const node = createBaseNode(313 /* UnparsedSyntheticReference */); + const node = createBaseNode(316 /* UnparsedSyntheticReference */); node.data = section.data; node.section = section; return node; } function createInputFiles2() { - const node = createBaseNode(317 /* InputFiles */); + const node = createBaseNode(320 /* InputFiles */); node.javascriptText = ""; node.declarationText = ""; return node; } function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(238 /* SyntheticExpression */); + const node = createBaseNode(240 /* SyntheticExpression */); node.type = type; node.isSpread = isSpread; node.tupleNameSource = tupleNameSource; return node; } function createSyntaxList3(children) { - const node = createBaseNode(357 /* SyntaxList */); + const node = createBaseNode(360 /* SyntaxList */); node._children = children; return node; } function createNotEmittedStatement2(original) { - const node = createBaseNode(358 /* NotEmittedStatement */); + const node = createBaseNode(361 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; } function createPartiallyEmittedExpression2(expression, original) { - const node = createBaseNode(359 /* PartiallyEmittedExpression */); + const node = createBaseNode(362 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -24681,7 +24732,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createCommaListExpression(elements) { - const node = createBaseNode(360 /* CommaListExpression */); + const node = createBaseNode(363 /* CommaListExpression */); node.elements = createNodeArray2(sameFlatMap(elements, flattenCommaElements)); node.transformFlags |= propagateChildrenFlags(node.elements); return node; @@ -24690,19 +24741,19 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; } function createEndOfDeclarationMarker(original) { - const node = createBaseNode(362 /* EndOfDeclarationMarker */); + const node = createBaseNode(365 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createMergeDeclarationMarker(original) { - const node = createBaseNode(361 /* MergeDeclarationMarker */); + const node = createBaseNode(364 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(363 /* SyntheticReferenceExpression */); + const node = createBaseNode(366 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); @@ -24715,7 +24766,7 @@ function createNodeFactory(flags, baseFactory2) { if (node === void 0) { return node; } - const clone2 = isSourceFile(node) ? baseFactory2.createBaseSourceFileNode(314 /* SourceFile */) : isIdentifier(node) ? baseFactory2.createBaseIdentifierNode(79 /* Identifier */) : isPrivateIdentifier(node) ? baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */) : !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind); + const clone2 = isSourceFile(node) ? baseFactory2.createBaseSourceFileNode(317 /* SourceFile */) : isIdentifier(node) ? baseFactory2.createBaseIdentifierNode(79 /* Identifier */) : isPrivateIdentifier(node) ? baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */) : !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind); clone2.flags |= node.flags & ~8 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); @@ -24840,17 +24891,17 @@ function createNodeFactory(flags, baseFactory2) { } function updateOuterExpression(outerExpression, expression) { switch (outerExpression.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return updateParenthesizedExpression(outerExpression, expression); - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: return updateTypeAssertion2(outerExpression, outerExpression.type, expression); - case 235 /* AsExpression */: + case 237 /* AsExpression */: return updateAsExpression2(outerExpression, expression, outerExpression.type); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return updateNonNullExpression2(outerExpression, expression); - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression2(outerExpression, expression); } } @@ -24890,13 +24941,13 @@ function createNodeFactory(flags, baseFactory2) { case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: return false; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: const elements = target.elements; if (elements.length === 0) { return false; } return true; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -25143,7 +25194,7 @@ function createNodeFactory(flags, baseFactory2) { } else { modifierArray = modifiers; } - return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration2(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature3(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, (_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature3(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature2(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression2(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction3(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression3(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isStructDeclaration(node) ? updateStructDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isAnnotationDeclaration(node) ? updateAnnotationDeclaration(node, modifierArray, node.name, node.members) : isVariableStatement(node) ? updateVariableStatement2(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration2(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration2(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration2(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration2(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration2(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration2(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration2(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration2(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment2(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration3(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); + return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration2(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature3(node, modifierArray, node.name, node.questionToken, node.type) : isOverloadPropertyDeclaration(node) ? updateOverloadPropertyDeclaration(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, (_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature3(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature2(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression2(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction3(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression3(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isStructDeclaration(node) ? updateStructDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isAnnotationDeclaration(node) ? updateAnnotationDeclaration(node, modifierArray, node.name, node.members) : isOverloadDeclaration(node) ? updateOverloadDeclaration(node, modifierArray, node.name, node.members) : isVariableStatement(node) ? updateVariableStatement2(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration2(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration2(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration2(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration2(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration2(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration2(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration2(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration2(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment2(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration3(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); } function asNodeArray(array) { return array ? createNodeArray2(array) : void 0; @@ -25176,41 +25227,41 @@ function updateWithOriginal(updated, original) { } function getDefaultTagNameForKind(kind) { switch (kind) { - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: return "type"; - case 350 /* JSDocReturnTag */: + case 353 /* JSDocReturnTag */: return "returns"; - case 351 /* JSDocThisTag */: + case 354 /* JSDocThisTag */: return "this"; - case 348 /* JSDocEnumTag */: + case 351 /* JSDocEnumTag */: return "enum"; - case 339 /* JSDocAuthorTag */: + case 342 /* JSDocAuthorTag */: return "author"; - case 341 /* JSDocClassTag */: + case 344 /* JSDocClassTag */: return "class"; - case 342 /* JSDocPublicTag */: + case 345 /* JSDocPublicTag */: return "public"; - case 343 /* JSDocPrivateTag */: + case 346 /* JSDocPrivateTag */: return "private"; - case 344 /* JSDocProtectedTag */: + case 347 /* JSDocProtectedTag */: return "protected"; - case 345 /* JSDocReadonlyTag */: + case 348 /* JSDocReadonlyTag */: return "readonly"; - case 346 /* JSDocOverrideTag */: + case 349 /* JSDocOverrideTag */: return "override"; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return "template"; - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return "typedef"; - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: return "param"; - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: return "prop"; - case 347 /* JSDocCallbackTag */: + case 350 /* JSDocCallbackTag */: return "callback"; - case 337 /* JSDocAugmentsTag */: + case 340 /* JSDocAugmentsTag */: return "augments"; - case 338 /* JSDocImplementsTag */: + case 341 /* JSDocImplementsTag */: return "implements"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); @@ -25283,35 +25334,35 @@ function aggregateChildrenFlags(children) { children.transformFlags = subtreeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */) { + if (kind >= 184 /* FirstTypeNode */ && kind <= 207 /* LastTypeNode */) { return -2 /* TypeExcludes */; } switch (kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 209 /* ArrayLiteralExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 211 /* ArrayLiteralExpression */: return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return -1941676032 /* ModuleExcludes */; - case 168 /* Parameter */: + case 169 /* Parameter */: return -2147483648 /* ParameterExcludes */; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return -2072174592 /* ArrowFunctionExcludes */; - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: return -1937940480 /* FunctionExcludes */; - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return -2146893824 /* VariableDeclarationListExcludes */; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return -2147344384 /* ClassExcludes */; - case 176 /* Constructor */: + case 178 /* Constructor */: return -1937948672 /* ConstructorExcludes */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return -2013249536 /* PropertyExcludes */; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return -2005057536 /* MethodOrAccessorExcludes */; case 132 /* AnyKeyword */: case 149 /* NumberKeyword */: @@ -25322,31 +25373,31 @@ function getTransformFlagsSubtreeExclusions(kind) { case 135 /* BooleanKeyword */: case 154 /* SymbolKeyword */: case 115 /* VoidKeyword */: - case 167 /* TypeParameter */: - case 170 /* PropertySignature */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: + case 171 /* PropertySignature */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return -2 /* TypeExcludes */; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return -2147278848 /* ObjectLiteralExcludes */; - case 301 /* CatchClause */: + case 304 /* CatchClause */: return -2147418112 /* CatchClauseExcludes */; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: return -2147450880 /* BindingPatternExcludes */; - case 216 /* TypeAssertionExpression */: - case 239 /* SatisfiesExpression */: - case 235 /* AsExpression */: - case 359 /* PartiallyEmittedExpression */: - case 217 /* ParenthesizedExpression */: + case 218 /* TypeAssertionExpression */: + case 241 /* SatisfiesExpression */: + case 237 /* AsExpression */: + case 362 /* PartiallyEmittedExpression */: + case 219 /* ParenthesizedExpression */: case 107 /* SuperKeyword */: return -2147483648 /* OuterExpressionExcludes */; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return -2147483648 /* PropertyAccessExcludes */; default: return -2147483648 /* NodeExcludes */; @@ -25647,7 +25698,7 @@ function getOrCreateEmitNode(node) { var _a2; if (!node.emitNode) { if (isParseTreeNode(node)) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } const sourceFile = (_a2 = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node)))) != null ? _a2 : Debug.fail("Could not determine parsed source file."); @@ -26646,589 +26697,595 @@ function isImportKeyword(node) { return node.kind === 101 /* ImportKeyword */; } function isQualifiedName(node) { - return node.kind === 165 /* QualifiedName */; + return node.kind === 166 /* QualifiedName */; } function isComputedPropertyName(node) { - return node.kind === 166 /* ComputedPropertyName */; + return node.kind === 167 /* ComputedPropertyName */; } function isTypeParameterDeclaration(node) { - return node.kind === 167 /* TypeParameter */; + return node.kind === 168 /* TypeParameter */; } function isParameter(node) { - return node.kind === 168 /* Parameter */; + return node.kind === 169 /* Parameter */; } function isDecoratorOrAnnotation(node) { - return node.kind === 169 /* Decorator */; + return node.kind === 170 /* Decorator */; } function isDecorator(node) { - return node.kind === 169 /* Decorator */ && node.annotationDeclaration === void 0; + return node.kind === 170 /* Decorator */ && node.annotationDeclaration === void 0; } function isAnnotation(node) { - return node.kind === 169 /* Decorator */ && node.annotationDeclaration !== void 0; + return node.kind === 170 /* Decorator */ && node.annotationDeclaration !== void 0; } function isPropertySignature(node) { - return node.kind === 170 /* PropertySignature */; + return node.kind === 171 /* PropertySignature */; +} +function isOverloadPropertyDeclaration(node) { + return node.kind === 174 /* OverloadPropertyDeclaration */; } function isPropertyDeclaration(node) { - return node.kind === 171 /* PropertyDeclaration */; + return node.kind === 172 /* PropertyDeclaration */; } function isAnnotationPropertyDeclaration(node) { - return node.kind === 172 /* AnnotationPropertyDeclaration */; + return node.kind === 173 /* AnnotationPropertyDeclaration */; } function isMethodSignature(node) { - return node.kind === 173 /* MethodSignature */; + return node.kind === 175 /* MethodSignature */; } function isMethodDeclaration(node) { - return node.kind === 174 /* MethodDeclaration */; + return node.kind === 176 /* MethodDeclaration */; } function isClassStaticBlockDeclaration(node) { - return node.kind === 175 /* ClassStaticBlockDeclaration */; + return node.kind === 177 /* ClassStaticBlockDeclaration */; } function isConstructorDeclaration(node) { - return node.kind === 176 /* Constructor */; + return node.kind === 178 /* Constructor */; } function isGetAccessorDeclaration(node) { - return node.kind === 177 /* GetAccessor */; + return node.kind === 179 /* GetAccessor */; } function isSetAccessorDeclaration(node) { - return node.kind === 178 /* SetAccessor */; + return node.kind === 180 /* SetAccessor */; } function isCallSignatureDeclaration(node) { - return node.kind === 179 /* CallSignature */; + return node.kind === 181 /* CallSignature */; } function isConstructSignatureDeclaration(node) { - return node.kind === 180 /* ConstructSignature */; + return node.kind === 182 /* ConstructSignature */; } function isIndexSignatureDeclaration(node) { - return node.kind === 181 /* IndexSignature */; + return node.kind === 183 /* IndexSignature */; } function isTypePredicateNode(node) { - return node.kind === 182 /* TypePredicate */; + return node.kind === 184 /* TypePredicate */; } function isTypeReferenceNode(node) { - return node.kind === 183 /* TypeReference */; + return node.kind === 185 /* TypeReference */; } function isFunctionTypeNode(node) { - return node.kind === 184 /* FunctionType */; + return node.kind === 186 /* FunctionType */; } function isConstructorTypeNode(node) { - return node.kind === 185 /* ConstructorType */; + return node.kind === 187 /* ConstructorType */; } function isTypeQueryNode(node) { - return node.kind === 186 /* TypeQuery */; + return node.kind === 188 /* TypeQuery */; } function isTypeLiteralNode(node) { - return node.kind === 187 /* TypeLiteral */; + return node.kind === 189 /* TypeLiteral */; } function isArrayTypeNode(node) { - return node.kind === 188 /* ArrayType */; + return node.kind === 190 /* ArrayType */; } function isTupleTypeNode(node) { - return node.kind === 189 /* TupleType */; + return node.kind === 191 /* TupleType */; } function isNamedTupleMember(node) { - return node.kind === 202 /* NamedTupleMember */; + return node.kind === 204 /* NamedTupleMember */; } function isOptionalTypeNode(node) { - return node.kind === 190 /* OptionalType */; + return node.kind === 192 /* OptionalType */; } function isRestTypeNode(node) { - return node.kind === 191 /* RestType */; + return node.kind === 193 /* RestType */; } function isUnionTypeNode(node) { - return node.kind === 192 /* UnionType */; + return node.kind === 194 /* UnionType */; } function isIntersectionTypeNode(node) { - return node.kind === 193 /* IntersectionType */; + return node.kind === 195 /* IntersectionType */; } function isConditionalTypeNode(node) { - return node.kind === 194 /* ConditionalType */; + return node.kind === 196 /* ConditionalType */; } function isInferTypeNode(node) { - return node.kind === 195 /* InferType */; + return node.kind === 197 /* InferType */; } function isParenthesizedTypeNode(node) { - return node.kind === 196 /* ParenthesizedType */; + return node.kind === 198 /* ParenthesizedType */; } function isThisTypeNode(node) { - return node.kind === 197 /* ThisType */; + return node.kind === 199 /* ThisType */; } function isTypeOperatorNode(node) { - return node.kind === 198 /* TypeOperator */; + return node.kind === 200 /* TypeOperator */; } function isIndexedAccessTypeNode(node) { - return node.kind === 199 /* IndexedAccessType */; + return node.kind === 201 /* IndexedAccessType */; } function isMappedTypeNode(node) { - return node.kind === 200 /* MappedType */; + return node.kind === 202 /* MappedType */; } function isLiteralTypeNode(node) { - return node.kind === 201 /* LiteralType */; + return node.kind === 203 /* LiteralType */; } function isImportTypeNode(node) { - return node.kind === 205 /* ImportType */; + return node.kind === 207 /* ImportType */; } function isTemplateLiteralTypeSpan(node) { - return node.kind === 204 /* TemplateLiteralTypeSpan */; + return node.kind === 206 /* TemplateLiteralTypeSpan */; } function isTemplateLiteralTypeNode(node) { - return node.kind === 203 /* TemplateLiteralType */; + return node.kind === 205 /* TemplateLiteralType */; } function isObjectBindingPattern(node) { - return node.kind === 206 /* ObjectBindingPattern */; + return node.kind === 208 /* ObjectBindingPattern */; } function isArrayBindingPattern(node) { - return node.kind === 207 /* ArrayBindingPattern */; + return node.kind === 209 /* ArrayBindingPattern */; } function isBindingElement(node) { - return node.kind === 208 /* BindingElement */; + return node.kind === 210 /* BindingElement */; } function isArrayLiteralExpression(node) { - return node.kind === 209 /* ArrayLiteralExpression */; + return node.kind === 211 /* ArrayLiteralExpression */; } function isObjectLiteralExpression(node) { - return node.kind === 210 /* ObjectLiteralExpression */; + return node.kind === 212 /* ObjectLiteralExpression */; } function isPropertyAccessExpression(node) { - return node.kind === 211 /* PropertyAccessExpression */; + return node.kind === 213 /* PropertyAccessExpression */; } function isElementAccessExpression(node) { - return node.kind === 212 /* ElementAccessExpression */; + return node.kind === 214 /* ElementAccessExpression */; } function isCallExpression(node) { - return node.kind === 213 /* CallExpression */; + return node.kind === 215 /* CallExpression */; } function isNewExpression(node) { - return node.kind === 214 /* NewExpression */; + return node.kind === 216 /* NewExpression */; } function isTaggedTemplateExpression(node) { - return node.kind === 215 /* TaggedTemplateExpression */; + return node.kind === 217 /* TaggedTemplateExpression */; } function isTypeAssertionExpression(node) { - return node.kind === 216 /* TypeAssertionExpression */; + return node.kind === 218 /* TypeAssertionExpression */; } function isParenthesizedExpression(node) { - return node.kind === 217 /* ParenthesizedExpression */; + return node.kind === 219 /* ParenthesizedExpression */; } function isFunctionExpression(node) { - return node.kind === 218 /* FunctionExpression */; + return node.kind === 220 /* FunctionExpression */; } function isEtsComponentExpression(node) { - return node.kind === 220 /* EtsComponentExpression */; + return node.kind === 222 /* EtsComponentExpression */; } function isArrowFunction(node) { - return node.kind === 219 /* ArrowFunction */; + return node.kind === 221 /* ArrowFunction */; } function isDeleteExpression(node) { - return node.kind === 221 /* DeleteExpression */; + return node.kind === 223 /* DeleteExpression */; } function isTypeOfExpression(node) { - return node.kind === 222 /* TypeOfExpression */; + return node.kind === 224 /* TypeOfExpression */; } function isVoidExpression(node) { - return node.kind === 223 /* VoidExpression */; + return node.kind === 225 /* VoidExpression */; } function isAwaitExpression(node) { - return node.kind === 224 /* AwaitExpression */; + return node.kind === 226 /* AwaitExpression */; } function isPrefixUnaryExpression(node) { - return node.kind === 225 /* PrefixUnaryExpression */; + return node.kind === 227 /* PrefixUnaryExpression */; } function isPostfixUnaryExpression(node) { - return node.kind === 226 /* PostfixUnaryExpression */; + return node.kind === 228 /* PostfixUnaryExpression */; } function isBinaryExpression(node) { - return node.kind === 227 /* BinaryExpression */; + return node.kind === 229 /* BinaryExpression */; } function isConditionalExpression(node) { - return node.kind === 228 /* ConditionalExpression */; + return node.kind === 230 /* ConditionalExpression */; } function isTemplateExpression(node) { - return node.kind === 229 /* TemplateExpression */; + return node.kind === 231 /* TemplateExpression */; } function isYieldExpression(node) { - return node.kind === 230 /* YieldExpression */; + return node.kind === 232 /* YieldExpression */; } function isSpreadElement(node) { - return node.kind === 231 /* SpreadElement */; + return node.kind === 233 /* SpreadElement */; } function isClassExpression(node) { - return node.kind === 232 /* ClassExpression */; + return node.kind === 234 /* ClassExpression */; } function isOmittedExpression(node) { - return node.kind === 233 /* OmittedExpression */; + return node.kind === 235 /* OmittedExpression */; } function isExpressionWithTypeArguments(node) { - return node.kind === 234 /* ExpressionWithTypeArguments */; + return node.kind === 236 /* ExpressionWithTypeArguments */; } function isAsExpression(node) { - return node.kind === 235 /* AsExpression */; + return node.kind === 237 /* AsExpression */; } function isSatisfiesExpression(node) { - return node.kind === 239 /* SatisfiesExpression */; + return node.kind === 241 /* SatisfiesExpression */; } function isNonNullExpression(node) { - return node.kind === 236 /* NonNullExpression */; + return node.kind === 238 /* NonNullExpression */; } function isMetaProperty(node) { - return node.kind === 237 /* MetaProperty */; + return node.kind === 239 /* MetaProperty */; } function isSyntheticExpression(node) { - return node.kind === 238 /* SyntheticExpression */; + return node.kind === 240 /* SyntheticExpression */; } function isPartiallyEmittedExpression(node) { - return node.kind === 359 /* PartiallyEmittedExpression */; + return node.kind === 362 /* PartiallyEmittedExpression */; } function isCommaListExpression(node) { - return node.kind === 360 /* CommaListExpression */; + return node.kind === 363 /* CommaListExpression */; } function isTemplateSpan(node) { - return node.kind === 240 /* TemplateSpan */; + return node.kind === 242 /* TemplateSpan */; } function isSemicolonClassElement(node) { - return node.kind === 241 /* SemicolonClassElement */; + return node.kind === 243 /* SemicolonClassElement */; } function isBlock(node) { - return node.kind === 242 /* Block */; + return node.kind === 244 /* Block */; } function isVariableStatement(node) { - return node.kind === 244 /* VariableStatement */; + return node.kind === 246 /* VariableStatement */; } function isEmptyStatement(node) { - return node.kind === 243 /* EmptyStatement */; + return node.kind === 245 /* EmptyStatement */; } function isExpressionStatement(node) { - return node.kind === 245 /* ExpressionStatement */; + return node.kind === 247 /* ExpressionStatement */; } function isIfStatement(node) { - return node.kind === 246 /* IfStatement */; + return node.kind === 248 /* IfStatement */; } function isDoStatement(node) { - return node.kind === 247 /* DoStatement */; + return node.kind === 249 /* DoStatement */; } function isWhileStatement(node) { - return node.kind === 248 /* WhileStatement */; + return node.kind === 250 /* WhileStatement */; } function isForStatement(node) { - return node.kind === 249 /* ForStatement */; + return node.kind === 251 /* ForStatement */; } function isForInStatement(node) { - return node.kind === 250 /* ForInStatement */; + return node.kind === 252 /* ForInStatement */; } function isForOfStatement(node) { - return node.kind === 251 /* ForOfStatement */; + return node.kind === 253 /* ForOfStatement */; } function isContinueStatement(node) { - return node.kind === 252 /* ContinueStatement */; + return node.kind === 254 /* ContinueStatement */; } function isBreakStatement(node) { - return node.kind === 253 /* BreakStatement */; + return node.kind === 255 /* BreakStatement */; } function isReturnStatement(node) { - return node.kind === 254 /* ReturnStatement */; + return node.kind === 256 /* ReturnStatement */; } function isWithStatement(node) { - return node.kind === 255 /* WithStatement */; + return node.kind === 257 /* WithStatement */; } function isSwitchStatement(node) { - return node.kind === 256 /* SwitchStatement */; + return node.kind === 258 /* SwitchStatement */; } function isLabeledStatement(node) { - return node.kind === 257 /* LabeledStatement */; + return node.kind === 259 /* LabeledStatement */; } function isThrowStatement(node) { - return node.kind === 258 /* ThrowStatement */; + return node.kind === 260 /* ThrowStatement */; } function isTryStatement(node) { - return node.kind === 259 /* TryStatement */; + return node.kind === 261 /* TryStatement */; } function isDebuggerStatement(node) { - return node.kind === 260 /* DebuggerStatement */; + return node.kind === 262 /* DebuggerStatement */; } function isVariableDeclaration(node) { - return node.kind === 261 /* VariableDeclaration */; + return node.kind === 263 /* VariableDeclaration */; } function isVariableDeclarationList(node) { - return node.kind === 262 /* VariableDeclarationList */; + return node.kind === 264 /* VariableDeclarationList */; } function isFunctionDeclaration(node) { - return node.kind === 263 /* FunctionDeclaration */; + return node.kind === 265 /* FunctionDeclaration */; } function isClassDeclaration(node) { - return node.kind === 264 /* ClassDeclaration */; + return node.kind === 266 /* ClassDeclaration */; } function isStructDeclaration(node) { - return node.kind === 265 /* StructDeclaration */; + return node.kind === 267 /* StructDeclaration */; } function isAnnotationDeclaration(node) { - return node.kind === 266 /* AnnotationDeclaration */; + return node.kind === 268 /* AnnotationDeclaration */; +} +function isOverloadDeclaration(node) { + return node.kind === 269 /* OverloadDeclaration */; } function isInterfaceDeclaration(node) { - return node.kind === 267 /* InterfaceDeclaration */; + return node.kind === 270 /* InterfaceDeclaration */; } function isTypeAliasDeclaration(node) { - return node.kind === 268 /* TypeAliasDeclaration */; + return node.kind === 271 /* TypeAliasDeclaration */; } function isEnumDeclaration(node) { - return node.kind === 269 /* EnumDeclaration */; + return node.kind === 272 /* EnumDeclaration */; } function isModuleDeclaration(node) { - return node.kind === 270 /* ModuleDeclaration */; + return node.kind === 273 /* ModuleDeclaration */; } function isModuleBlock(node) { - return node.kind === 271 /* ModuleBlock */; + return node.kind === 274 /* ModuleBlock */; } function isCaseBlock(node) { - return node.kind === 272 /* CaseBlock */; + return node.kind === 275 /* CaseBlock */; } function isNamespaceExportDeclaration(node) { - return node.kind === 273 /* NamespaceExportDeclaration */; + return node.kind === 276 /* NamespaceExportDeclaration */; } function isImportEqualsDeclaration(node) { - return node.kind === 274 /* ImportEqualsDeclaration */; + return node.kind === 277 /* ImportEqualsDeclaration */; } function isImportDeclaration(node) { - return node.kind === 275 /* ImportDeclaration */; + return node.kind === 278 /* ImportDeclaration */; } function isImportClause(node) { - return node.kind === 276 /* ImportClause */; + return node.kind === 279 /* ImportClause */; } function isImportTypeAssertionContainer(node) { - return node.kind === 304 /* ImportTypeAssertionContainer */; + return node.kind === 307 /* ImportTypeAssertionContainer */; } function isAssertClause(node) { - return node.kind === 302 /* AssertClause */; + return node.kind === 305 /* AssertClause */; } function isAssertEntry(node) { - return node.kind === 303 /* AssertEntry */; + return node.kind === 306 /* AssertEntry */; } function isNamespaceImport(node) { - return node.kind === 277 /* NamespaceImport */; + return node.kind === 280 /* NamespaceImport */; } function isNamespaceExport(node) { - return node.kind === 283 /* NamespaceExport */; + return node.kind === 286 /* NamespaceExport */; } function isNamedImports(node) { - return node.kind === 278 /* NamedImports */; + return node.kind === 281 /* NamedImports */; } function isImportSpecifier(node) { - return node.kind === 279 /* ImportSpecifier */; + return node.kind === 282 /* ImportSpecifier */; } function isExportAssignment(node) { - return node.kind === 280 /* ExportAssignment */; + return node.kind === 283 /* ExportAssignment */; } function isExportDeclaration(node) { - return node.kind === 281 /* ExportDeclaration */; + return node.kind === 284 /* ExportDeclaration */; } function isNamedExports(node) { - return node.kind === 282 /* NamedExports */; + return node.kind === 285 /* NamedExports */; } function isExportSpecifier(node) { - return node.kind === 284 /* ExportSpecifier */; + return node.kind === 287 /* ExportSpecifier */; } function isMissingDeclaration(node) { - return node.kind === 285 /* MissingDeclaration */; + return node.kind === 288 /* MissingDeclaration */; } function isNotEmittedStatement(node) { - return node.kind === 358 /* NotEmittedStatement */; + return node.kind === 361 /* NotEmittedStatement */; } function isSyntheticReference(node) { - return node.kind === 363 /* SyntheticReferenceExpression */; + return node.kind === 366 /* SyntheticReferenceExpression */; } function isMergeDeclarationMarker(node) { - return node.kind === 361 /* MergeDeclarationMarker */; + return node.kind === 364 /* MergeDeclarationMarker */; } function isEndOfDeclarationMarker(node) { - return node.kind === 362 /* EndOfDeclarationMarker */; + return node.kind === 365 /* EndOfDeclarationMarker */; } function isExternalModuleReference(node) { - return node.kind === 286 /* ExternalModuleReference */; + return node.kind === 289 /* ExternalModuleReference */; } function isJsxElement(node) { - return node.kind === 287 /* JsxElement */; + return node.kind === 290 /* JsxElement */; } function isJsxSelfClosingElement(node) { - return node.kind === 288 /* JsxSelfClosingElement */; + return node.kind === 291 /* JsxSelfClosingElement */; } function isJsxOpeningElement(node) { - return node.kind === 289 /* JsxOpeningElement */; + return node.kind === 292 /* JsxOpeningElement */; } function isJsxClosingElement(node) { - return node.kind === 290 /* JsxClosingElement */; + return node.kind === 293 /* JsxClosingElement */; } function isJsxFragment(node) { - return node.kind === 291 /* JsxFragment */; + return node.kind === 294 /* JsxFragment */; } function isJsxOpeningFragment(node) { - return node.kind === 292 /* JsxOpeningFragment */; + return node.kind === 295 /* JsxOpeningFragment */; } function isJsxClosingFragment(node) { - return node.kind === 293 /* JsxClosingFragment */; + return node.kind === 296 /* JsxClosingFragment */; } function isJsxAttribute(node) { - return node.kind === 294 /* JsxAttribute */; + return node.kind === 297 /* JsxAttribute */; } function isJsxAttributes(node) { - return node.kind === 295 /* JsxAttributes */; + return node.kind === 298 /* JsxAttributes */; } function isJsxSpreadAttribute(node) { - return node.kind === 296 /* JsxSpreadAttribute */; + return node.kind === 299 /* JsxSpreadAttribute */; } function isJsxExpression(node) { - return node.kind === 297 /* JsxExpression */; + return node.kind === 300 /* JsxExpression */; } function isCaseClause(node) { - return node.kind === 298 /* CaseClause */; + return node.kind === 301 /* CaseClause */; } function isDefaultClause(node) { - return node.kind === 299 /* DefaultClause */; + return node.kind === 302 /* DefaultClause */; } function isHeritageClause(node) { - return node.kind === 300 /* HeritageClause */; + return node.kind === 303 /* HeritageClause */; } function isCatchClause(node) { - return node.kind === 301 /* CatchClause */; + return node.kind === 304 /* CatchClause */; } function isPropertyAssignment(node) { - return node.kind === 305 /* PropertyAssignment */; + return node.kind === 308 /* PropertyAssignment */; } function isShorthandPropertyAssignment(node) { - return node.kind === 306 /* ShorthandPropertyAssignment */; + return node.kind === 309 /* ShorthandPropertyAssignment */; } function isSpreadAssignment(node) { - return node.kind === 307 /* SpreadAssignment */; + return node.kind === 310 /* SpreadAssignment */; } function isEnumMember(node) { - return node.kind === 308 /* EnumMember */; + return node.kind === 311 /* EnumMember */; } function isUnparsedPrepend(node) { - return node.kind === 310 /* UnparsedPrepend */; + return node.kind === 313 /* UnparsedPrepend */; } function isSourceFile(node) { - return node.kind === 314 /* SourceFile */; + return node.kind === 317 /* SourceFile */; } function isBundle(node) { - return node.kind === 315 /* Bundle */; + return node.kind === 318 /* Bundle */; } function isUnparsedSource(node) { - return node.kind === 316 /* UnparsedSource */; + return node.kind === 319 /* UnparsedSource */; } function isJSDocTypeExpression(node) { - return node.kind === 318 /* JSDocTypeExpression */; + return node.kind === 321 /* JSDocTypeExpression */; } function isJSDocNameReference(node) { - return node.kind === 319 /* JSDocNameReference */; + return node.kind === 322 /* JSDocNameReference */; } function isJSDocMemberName(node) { - return node.kind === 320 /* JSDocMemberName */; + return node.kind === 323 /* JSDocMemberName */; } function isJSDocLink(node) { - return node.kind === 333 /* JSDocLink */; + return node.kind === 336 /* JSDocLink */; } function isJSDocLinkCode(node) { - return node.kind === 334 /* JSDocLinkCode */; + return node.kind === 337 /* JSDocLinkCode */; } function isJSDocLinkPlain(node) { - return node.kind === 335 /* JSDocLinkPlain */; + return node.kind === 338 /* JSDocLinkPlain */; } function isJSDocAllType(node) { - return node.kind === 321 /* JSDocAllType */; + return node.kind === 324 /* JSDocAllType */; } function isJSDocUnknownType(node) { - return node.kind === 322 /* JSDocUnknownType */; + return node.kind === 325 /* JSDocUnknownType */; } function isJSDocNullableType(node) { - return node.kind === 323 /* JSDocNullableType */; + return node.kind === 326 /* JSDocNullableType */; } function isJSDocNonNullableType(node) { - return node.kind === 324 /* JSDocNonNullableType */; + return node.kind === 327 /* JSDocNonNullableType */; } function isJSDocOptionalType(node) { - return node.kind === 325 /* JSDocOptionalType */; + return node.kind === 328 /* JSDocOptionalType */; } function isJSDocFunctionType(node) { - return node.kind === 326 /* JSDocFunctionType */; + return node.kind === 329 /* JSDocFunctionType */; } function isJSDocVariadicType(node) { - return node.kind === 327 /* JSDocVariadicType */; + return node.kind === 330 /* JSDocVariadicType */; } function isJSDocNamepathType(node) { - return node.kind === 328 /* JSDocNamepathType */; + return node.kind === 331 /* JSDocNamepathType */; } function isJSDoc(node) { - return node.kind === 329 /* JSDoc */; + return node.kind === 332 /* JSDoc */; } function isJSDocTypeLiteral(node) { - return node.kind === 331 /* JSDocTypeLiteral */; + return node.kind === 334 /* JSDocTypeLiteral */; } function isJSDocSignature(node) { - return node.kind === 332 /* JSDocSignature */; + return node.kind === 335 /* JSDocSignature */; } function isJSDocAugmentsTag(node) { - return node.kind === 337 /* JSDocAugmentsTag */; + return node.kind === 340 /* JSDocAugmentsTag */; } function isJSDocAuthorTag(node) { - return node.kind === 339 /* JSDocAuthorTag */; + return node.kind === 342 /* JSDocAuthorTag */; } function isJSDocClassTag(node) { - return node.kind === 341 /* JSDocClassTag */; + return node.kind === 344 /* JSDocClassTag */; } function isJSDocCallbackTag(node) { - return node.kind === 347 /* JSDocCallbackTag */; + return node.kind === 350 /* JSDocCallbackTag */; } function isJSDocPublicTag(node) { - return node.kind === 342 /* JSDocPublicTag */; + return node.kind === 345 /* JSDocPublicTag */; } function isJSDocPrivateTag(node) { - return node.kind === 343 /* JSDocPrivateTag */; + return node.kind === 346 /* JSDocPrivateTag */; } function isJSDocProtectedTag(node) { - return node.kind === 344 /* JSDocProtectedTag */; + return node.kind === 347 /* JSDocProtectedTag */; } function isJSDocReadonlyTag(node) { - return node.kind === 345 /* JSDocReadonlyTag */; + return node.kind === 348 /* JSDocReadonlyTag */; } function isJSDocOverrideTag(node) { - return node.kind === 346 /* JSDocOverrideTag */; + return node.kind === 349 /* JSDocOverrideTag */; } function isJSDocDeprecatedTag(node) { - return node.kind === 340 /* JSDocDeprecatedTag */; + return node.kind === 343 /* JSDocDeprecatedTag */; } function isJSDocSeeTag(node) { - return node.kind === 355 /* JSDocSeeTag */; + return node.kind === 358 /* JSDocSeeTag */; } function isJSDocEnumTag(node) { - return node.kind === 348 /* JSDocEnumTag */; + return node.kind === 351 /* JSDocEnumTag */; } function isJSDocParameterTag(node) { - return node.kind === 349 /* JSDocParameterTag */; + return node.kind === 352 /* JSDocParameterTag */; } function isJSDocReturnTag(node) { - return node.kind === 350 /* JSDocReturnTag */; + return node.kind === 353 /* JSDocReturnTag */; } function isJSDocThisTag(node) { - return node.kind === 351 /* JSDocThisTag */; + return node.kind === 354 /* JSDocThisTag */; } function isJSDocTypeTag(node) { - return node.kind === 352 /* JSDocTypeTag */; + return node.kind === 355 /* JSDocTypeTag */; } function isJSDocTemplateTag(node) { - return node.kind === 353 /* JSDocTemplateTag */; + return node.kind === 356 /* JSDocTemplateTag */; } function isJSDocTypedefTag(node) { - return node.kind === 354 /* JSDocTypedefTag */; + return node.kind === 357 /* JSDocTypedefTag */; } function isJSDocUnknownTag(node) { - return node.kind === 336 /* JSDocTag */; + return node.kind === 339 /* JSDocTag */; } function isJSDocPropertyTag(node) { - return node.kind === 356 /* JSDocPropertyTag */; + return node.kind === 359 /* JSDocPropertyTag */; } function isJSDocImplementsTag(node) { - return node.kind === 338 /* JSDocImplementsTag */; + return node.kind === 341 /* JSDocImplementsTag */; } function isSyntaxList(n) { - return n.kind === 357 /* SyntaxList */; + return n.kind === 360 /* SyntaxList */; } // src/compiler/factory/utilities.ts @@ -27472,14 +27529,14 @@ function createExpressionForObjectLiteralElementLike(factory2, node, property, r Debug.failBadSyntaxKind(property.name, "Private identifiers are not allowed in object literals."); } switch (property.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return createExpressionForAccessorDeclaration(factory2, node.properties, property, receiver, !!node.multiLine); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return createExpressionForPropertyAssignment(factory2, property, receiver); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return createExpressionForShorthandPropertyAssignment(factory2, property, receiver); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return createExpressionForMethodDeclaration(factory2, property, receiver); } } @@ -27532,7 +27589,7 @@ function startsWithUseStrict(statements) { return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement); } function isCommaSequence(node) { - return node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 360 /* CommaListExpression */; + return node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 363 /* CommaListExpression */; } function isJSDocTypeAssertion(node) { return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node); @@ -27544,18 +27601,18 @@ function getJSDocTypeAssertionType(node) { } function isOuterExpression(node, kinds = 15 /* All */) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { return false; } return (kinds & 1 /* Parentheses */) !== 0; - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: - case 239 /* SatisfiesExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: + case 241 /* SatisfiesExpression */: return (kinds & 2 /* TypeAssertions */) !== 0; - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return (kinds & 4 /* NonNullAssertions */) !== 0; - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -27661,10 +27718,10 @@ function getLocalNameForExternalImport(factory2, node, sourceFile) { const name = namespaceDeclaration.name; return isGeneratedIdentifier(name) ? name : factory2.createIdentifier(getSourceTextOfNodeFromSourceFile(sourceFile, name) || idText(name)); } - if (node.kind === 275 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 278 /* ImportDeclaration */ && node.importClause) { return factory2.getGeneratedNameForNode(node); } - if (node.kind === 281 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 284 /* ExportDeclaration */ && node.moduleSpecifier) { return factory2.getGeneratedNameForNode(node); } return void 0; @@ -27719,11 +27776,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } if (isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return bindingElement.name; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } } @@ -27737,11 +27794,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 168 /* Parameter */: - case 208 /* BindingElement */: + case 169 /* Parameter */: + case 210 /* BindingElement */: return bindingElement.dotDotDotToken; - case 231 /* SpreadElement */: - case 307 /* SpreadAssignment */: + case 233 /* SpreadElement */: + case 310 /* SpreadAssignment */: return bindingElement; } return void 0; @@ -27753,7 +27810,7 @@ function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { } function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 208 /* BindingElement */: + case 210 /* BindingElement */: if (bindingElement.propertyName) { const propertyName = bindingElement.propertyName; if (isPrivateIdentifier(propertyName)) { @@ -27762,7 +27819,7 @@ function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (bindingElement.name) { const propertyName = bindingElement.name; if (isPrivateIdentifier(propertyName)) { @@ -27771,7 +27828,7 @@ function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: if (bindingElement.name && isPrivateIdentifier(bindingElement.name)) { return Debug.failBadSyntaxKind(bindingElement.name); } @@ -27788,11 +27845,11 @@ function isStringOrNumericLiteral(node) { } function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: + case 211 /* ArrayLiteralExpression */: return name.elements; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return name.properties; } } @@ -27809,19 +27866,19 @@ function getJSDocTypeAliasName(fullName) { } function canHaveIllegalType(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 178 /* SetAccessor */; + return kind === 178 /* Constructor */ || kind === 180 /* SetAccessor */; } function canHaveIllegalTypeParameters(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 178 /* Constructor */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function canHaveIllegalDecorators(node) { const kind = node.kind; - return kind === 305 /* PropertyAssignment */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 263 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 285 /* MissingDeclaration */ || kind === 244 /* VariableStatement */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 269 /* EnumDeclaration */ || kind === 270 /* ModuleDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 273 /* NamespaceExportDeclaration */ || kind === 281 /* ExportDeclaration */ || kind === 280 /* ExportAssignment */; + return kind === 308 /* PropertyAssignment */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 265 /* FunctionDeclaration */ || kind === 178 /* Constructor */ || kind === 183 /* IndexSignature */ || kind === 177 /* ClassStaticBlockDeclaration */ || kind === 288 /* MissingDeclaration */ || kind === 246 /* VariableStatement */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 272 /* EnumDeclaration */ || kind === 273 /* ModuleDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 276 /* NamespaceExportDeclaration */ || kind === 284 /* ExportDeclaration */ || kind === 283 /* ExportAssignment */; } function canHaveIllegalModifiers(node) { const kind = node.kind; - return kind === 175 /* ClassStaticBlockDeclaration */ || kind === 305 /* PropertyAssignment */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 184 /* FunctionType */ || kind === 285 /* MissingDeclaration */ || kind === 273 /* NamespaceExportDeclaration */; + return kind === 177 /* ClassStaticBlockDeclaration */ || kind === 308 /* PropertyAssignment */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 186 /* FunctionType */ || kind === 288 /* MissingDeclaration */ || kind === 276 /* NamespaceExportDeclaration */; } var isTypeNodeOrTypeParameterDeclaration = or(isTypeNode, isTypeParameterDeclaration); var isQuestionOrExclamationToken = or(isQuestionToken, isExclamationToken); @@ -28107,11 +28164,11 @@ function setTextRange(range, location) { } function canHaveModifiers(node) { const kind = node.kind; - return kind === 167 /* TypeParameter */ || kind === 168 /* Parameter */ || kind === 170 /* PropertySignature */ || kind === 171 /* PropertyDeclaration */ || kind === 173 /* MethodSignature */ || kind === 174 /* MethodDeclaration */ || kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 185 /* ConstructorType */ || kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || kind === 232 /* ClassExpression */ || kind === 265 /* StructDeclaration */ || kind === 266 /* AnnotationDeclaration */ || kind === 244 /* VariableStatement */ || kind === 263 /* FunctionDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 269 /* EnumDeclaration */ || kind === 270 /* ModuleDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 280 /* ExportAssignment */ || kind === 281 /* ExportDeclaration */; + return kind === 168 /* TypeParameter */ || kind === 169 /* Parameter */ || kind === 171 /* PropertySignature */ || kind === 172 /* PropertyDeclaration */ || kind === 175 /* MethodSignature */ || kind === 176 /* MethodDeclaration */ || kind === 178 /* Constructor */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 183 /* IndexSignature */ || kind === 187 /* ConstructorType */ || kind === 220 /* FunctionExpression */ || kind === 221 /* ArrowFunction */ || kind === 234 /* ClassExpression */ || kind === 267 /* StructDeclaration */ || kind === 268 /* AnnotationDeclaration */ || kind === 246 /* VariableStatement */ || kind === 265 /* FunctionDeclaration */ || kind === 266 /* ClassDeclaration */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 272 /* EnumDeclaration */ || kind === 273 /* ModuleDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 283 /* ExportAssignment */ || kind === 284 /* ExportDeclaration */; } function canHaveDecorators(node) { const kind = node.kind; - return kind === 168 /* Parameter */ || kind === 171 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 232 /* ClassExpression */ || kind === 264 /* ClassDeclaration */ || kind === 265 /* StructDeclaration */; + return kind === 169 /* Parameter */ || kind === 172 /* PropertyDeclaration */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 234 /* ClassExpression */ || kind === 266 /* ClassDeclaration */ || kind === 267 /* StructDeclaration */; } // src/compiler/parser.ts @@ -28181,430 +28238,434 @@ function isImportMeta2(node) { return isMetaProperty(node) && node.keywordToken === 101 /* ImportKeyword */ && node.name.escapedText === "meta"; } var forEachChildTable = { - [165 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { + [166 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [167 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { + [168 /* 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); }, - [306 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { + [309 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || 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); }, - [307 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { + [310 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [168 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { + [169 /* 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); }, - [171 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { + [172 /* 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); }, - [172 /* AnnotationPropertyDeclaration */]: function forEachChildInAnnotationPropertyDeclaration(node, cbNode, _cbNodes) { + [173 /* AnnotationPropertyDeclaration */]: function forEachChildInAnnotationPropertyDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [170 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { + [171 /* 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); + }, + [174 /* OverloadPropertyDeclaration */]: function forEachChildInOverloadPropertyDeclaration(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); }, - [305 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { + [308 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); }, - [261 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { + [263 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [208 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { + [210 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [181 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { + [183 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [185 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { + [187 /* 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); }, - [184 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { + [186 /* 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); }, - [179 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [180 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [220 /* EtsComponentExpression */]: function forEachChildInEtsComponentExpression(node, cbNode, cbNodes) { + [181 /* CallSignature */]: forEachChildInCallOrConstructSignature, + [182 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, + [222 /* EtsComponentExpression */]: function forEachChildInEtsComponentExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.arguments) || visitNode2(cbNode, node.body); }, - [174 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { + [176 /* 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); }, - [173 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { + [175 /* 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); }, - [176 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { + [178 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || 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); }, - [177 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { + [179 /* 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); }, - [178 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { + [180 /* 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); }, - [263 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { + [265 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || 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); }, - [218 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { + [220 /* 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); }, - [219 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { + [221 /* 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); }, - [175 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { + [177 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); }, - [183 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { + [185 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [182 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { + [184 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); }, - [186 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { + [188 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [187 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { + [189 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.members); }, - [188 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { + [190 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.elementType); }, - [189 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { + [191 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [192 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [193 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [194 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { + [194 /* UnionType */]: forEachChildInUnionOrIntersectionType, + [195 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, + [196 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); }, - [195 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { + [197 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.typeParameter); }, - [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { + [207 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [304 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { + [307 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); }, - [196 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [198 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [199 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { + [198 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, + [200 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, + [201 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); }, - [200 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { + [202 /* 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); }, - [201 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { + [203 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.literal); }, - [202 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { + [204 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); }, - [206 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [207 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [209 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { + [208 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [209 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [211 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [210 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { + [212 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [211 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { + [213 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); }, - [212 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { + [214 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); }, - [213 /* CallExpression */]: forEachChildInCallOrNewExpression, - [214 /* NewExpression */]: forEachChildInCallOrNewExpression, - [215 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { + [215 /* CallExpression */]: forEachChildInCallOrNewExpression, + [216 /* NewExpression */]: forEachChildInCallOrNewExpression, + [217 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); }, - [216 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { + [218 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); }, - [217 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { + [219 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [221 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { + [223 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [222 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { + [224 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [223 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { + [225 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [225 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { + [227 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [230 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { + [232 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); }, - [224 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { + [226 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [226 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { + [228 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [227 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { + [229 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); }, - [235 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { + [237 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [236 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { + [238 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [239 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { + [241 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [237 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { + [239 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [228 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { + [230 /* 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); }, - [231 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { + [233 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [242 /* Block */]: forEachChildInBlock, - [271 /* ModuleBlock */]: forEachChildInBlock, - [314 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { + [244 /* Block */]: forEachChildInBlock, + [274 /* ModuleBlock */]: forEachChildInBlock, + [317 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); }, - [244 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { + [246 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); }, - [262 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { + [264 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.declarations); }, - [245 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { + [247 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [246 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { + [248 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); }, - [247 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { + [249 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); }, - [248 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { + [250 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [249 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { + [251 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); }, - [250 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { + [252 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [251 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { + [253 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [252 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [253 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [254 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { + [254 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, + [255 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, + [256 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [255 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { + [257 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [256 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { + [258 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); }, - [272 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { + [275 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.clauses); }, - [298 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { + [301 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); }, - [299 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { + [302 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements); }, - [257 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { + [259 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); }, - [258 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { + [260 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [259 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { + [261 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); }, - [301 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { + [304 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); }, - [169 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { + [170 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [264 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [232 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [265 /* StructDeclaration */]: forEachChildInClassDeclarationOrExpression, - [266 /* AnnotationDeclaration */]: forEachChildInAnnotationDeclaration, - [267 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { + [266 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, + [234 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, + [267 /* StructDeclaration */]: forEachChildInClassDeclarationOrExpression, + [268 /* AnnotationDeclaration */]: forEachChildInAnnotationDeclaration, + [269 /* OverloadDeclaration */]: forEachChildInOverloadDeclaration, + [270 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); }, - [268 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { + [271 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); }, - [269 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { + [272 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); }, - [308 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { + [311 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [270 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { + [273 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); }, - [274 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { + [277 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, - [275 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { + [278 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [276 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { + [279 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [302 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [305 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [303 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [306 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, - [273 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { + [276 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNode2(cbNode, node.name); }, - [277 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { + [280 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [283 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { + [286 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [278 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [282 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [281 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { + [281 /* NamedImports */]: forEachChildInNamedImportsOrExports, + [285 /* NamedExports */]: forEachChildInNamedImportsOrExports, + [284 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [279 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [284 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [280 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { + [282 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, + [287 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, + [283 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); }, - [229 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { + [231 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [240 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { + [242 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); }, - [203 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { + [205 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [204 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { + [206 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); }, - [166 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { + [167 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [300 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { + [303 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.types); }, - [234 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { + [236 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [286 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { + [289 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [285 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { + [288 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers); }, - [360 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { + [363 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [287 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { + [290 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); }, - [291 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { + [294 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); }, - [288 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [289 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [295 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { + [291 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [292 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [298 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [294 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { + [297 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [296 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { + [299 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [297 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { + [300 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); }, - [290 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { + [293 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tagName); }, - [190 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [191 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [318 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [324 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [323 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [325 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [327 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [326 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { + [192 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [193 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [321 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [327 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [326 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [328 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [330 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [329 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [329 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { + [332 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); }, - [355 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { + [358 /* 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)); }, - [319 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { + [322 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [320 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { + [323 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [349 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [356 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [339 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { + [352 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, + [359 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, + [342 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [338 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { + [341 /* 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)); }, - [337 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { + [340 /* 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)); }, - [353 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { + [356 /* 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)); }, - [354 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 318 /* 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))); + [357 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { + return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 321 /* 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))); }, - [347 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { + [350 /* 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)); }, - [350 /* JSDocReturnTag */]: forEachChildInJSDocReturnTag, - [352 /* JSDocTypeTag */]: forEachChildInJSDocReturnTag, - [351 /* JSDocThisTag */]: forEachChildInJSDocReturnTag, - [348 /* JSDocEnumTag */]: forEachChildInJSDocReturnTag, - [332 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { + [353 /* JSDocReturnTag */]: forEachChildInJSDocReturnTag, + [355 /* JSDocTypeTag */]: forEachChildInJSDocReturnTag, + [354 /* JSDocThisTag */]: forEachChildInJSDocReturnTag, + [351 /* JSDocEnumTag */]: forEachChildInJSDocReturnTag, + [335 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); }, - [333 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [334 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [335 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [331 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { + [336 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, + [337 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, + [338 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, + [334 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { return forEach(node.jsDocPropertyTags, cbNode); }, - [336 /* JSDocTag */]: forEachChildInJSDocTag, - [341 /* JSDocClassTag */]: forEachChildInJSDocTag, - [342 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [343 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [344 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [345 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [340 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [346 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [359 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression + [339 /* JSDocTag */]: forEachChildInJSDocTag, + [344 /* JSDocClassTag */]: forEachChildInJSDocTag, + [345 /* JSDocPublicTag */]: forEachChildInJSDocTag, + [346 /* JSDocPrivateTag */]: forEachChildInJSDocTag, + [347 /* JSDocProtectedTag */]: forEachChildInJSDocTag, + [348 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, + [343 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, + [349 /* JSDocOverrideTag */]: forEachChildInJSDocTag, + [362 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression }; function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); @@ -28633,6 +28694,9 @@ function forEachChildInClassDeclarationOrExpression(node, cbNode, cbNodes) { function forEachChildInAnnotationDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); } +function forEachChildInOverloadDeclaration(node, cbNode, cbNodes) { + return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); +} function forEachChildInNamedImportsOrExports(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); } @@ -28661,7 +28725,7 @@ function forEachChildInPartiallyEmittedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); } function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 164 /* LastToken */) { + if (node === void 0 || node.kind <= 165 /* LastToken */) { return; } const fn = forEachChildTable[node.kind]; @@ -28696,7 +28760,7 @@ function forEachChildRecursively(rootNode, cbNode, cbNodes) { continue; return res; } - if (current.kind >= 165 /* FirstNode */) { + if (current.kind >= 166 /* FirstNode */) { for (const child of gatherPossibleChildren(current)) { queue.push(child); parents.push(current); @@ -29668,7 +29732,7 @@ var Parser; parseErrorAtCurrentToken(diagnosticMessage, arg0); } const pos = getNodePos(); - const result = kind === 79 /* Identifier */ ? factory2.createIdentifier("", void 0, void 0) : isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(kind, "", "", void 0) : kind === 8 /* NumericLiteral */ ? factory2.createNumericLiteral("", void 0) : kind === 10 /* StringLiteral */ ? factory2.createStringLiteral("", void 0) : kind === 285 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factory2.createToken(kind); + const result = kind === 79 /* Identifier */ ? factory2.createIdentifier("", void 0, void 0) : isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(kind, "", "", void 0) : kind === 8 /* NumericLiteral */ ? factory2.createNumericLiteral("", void 0) : kind === 10 /* StringLiteral */ ? factory2.createStringLiteral("", void 0) : kind === 288 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factory2.createToken(kind); return finishNode(result, pos); } function internIdentifier(text) { @@ -29793,6 +29857,9 @@ var Parser; if (inAllowAnnotationContext() && token() === 59 /* AtToken */) { return lookAhead(() => nextToken() === 119 /* InterfaceKeyword */); } + if (token() === 164 /* OverloadKeyword */) { + return true; + } return canFollowExportModifier(); case 89 /* DefaultKeyword */: return nextTokenCanFollowDefaultKeyword(); @@ -29817,7 +29884,7 @@ var Parser; return isModifierKind(token()) && tryParse(nextTokenCanFollowModifier); } function canFollowModifier() { - return token() === 22 /* OpenBracketToken */ || token() === 18 /* OpenBraceToken */ || token() === 41 /* AsteriskToken */ || token() === 25 /* DotDotDotToken */ || token() === 59 /* AtToken */ && inAllowAnnotationContext() && lookAhead(() => nextToken() === 119 /* InterfaceKeyword */) || isLiteralPropertyName(); + return token() === 22 /* OpenBracketToken */ || token() === 18 /* OpenBraceToken */ || token() === 41 /* AsteriskToken */ || token() === 25 /* DotDotDotToken */ || token() === 59 /* AtToken */ && inAllowAnnotationContext() && lookAhead(() => nextToken() === 119 /* InterfaceKeyword */) || token() === 164 /* OverloadKeyword */ || isLiteralPropertyName(); } function nextTokenCanFollowDefaultKeyword() { nextToken(); @@ -30092,15 +30159,15 @@ var Parser; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 176 /* Constructor */: - case 181 /* IndexSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 241 /* SemicolonClassElement */: + case 178 /* Constructor */: + case 183 /* IndexSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 243 /* SemicolonClassElement */: return true; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return !inStructContext(); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: const methodDeclaration = node; const nameIsConstructor = methodDeclaration.name.kind === 79 /* Identifier */ && methodDeclaration.name.originalKeywordKind === 136 /* ConstructorKeyword */; return !nameIsConstructor; @@ -30111,8 +30178,8 @@ var Parser; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: return true; } } @@ -30121,66 +30188,66 @@ var Parser; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 244 /* VariableStatement */: - case 242 /* Block */: - case 246 /* IfStatement */: - case 245 /* ExpressionStatement */: - case 258 /* ThrowStatement */: - case 254 /* ReturnStatement */: - case 256 /* SwitchStatement */: - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 249 /* ForStatement */: - case 248 /* WhileStatement */: - case 255 /* WithStatement */: - case 243 /* EmptyStatement */: - case 259 /* TryStatement */: - case 257 /* LabeledStatement */: - case 247 /* DoStatement */: - case 260 /* DebuggerStatement */: - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 265 /* FunctionDeclaration */: + case 246 /* VariableStatement */: + case 244 /* Block */: + case 248 /* IfStatement */: + case 247 /* ExpressionStatement */: + case 260 /* ThrowStatement */: + case 256 /* ReturnStatement */: + case 258 /* SwitchStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 251 /* ForStatement */: + case 250 /* WhileStatement */: + case 257 /* WithStatement */: + case 245 /* EmptyStatement */: + case 261 /* TryStatement */: + case 259 /* LabeledStatement */: + case 249 /* DoStatement */: + case 262 /* DebuggerStatement */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 308 /* EnumMember */; + return node.kind === 311 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 170 /* PropertySignature */: - case 179 /* CallSignature */: + case 182 /* ConstructSignature */: + case 175 /* MethodSignature */: + case 183 /* IndexSignature */: + case 171 /* PropertySignature */: + case 181 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 261 /* VariableDeclaration */) { + if (node.kind !== 263 /* VariableDeclaration */) { return false; } const variableDeclarator = node; return variableDeclarator.initializer === void 0; } function isReusableParameter(node) { - if (node.kind !== 168 /* Parameter */) { + if (node.kind !== 169 /* Parameter */) { return false; } const parameter = node; @@ -30471,14 +30538,14 @@ var Parser; } function typeHasArrowFunctionBlockingParseError(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return nodeIsMissing(node.typeName); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: { + case 186 /* FunctionType */: + case 187 /* ConstructorType */: { const { parameters, type } = node; return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); } - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return typeHasArrowFunctionBlockingParseError(node.type); default: return false; @@ -30719,14 +30786,14 @@ var Parser; function parseSignatureMember(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 180 /* ConstructSignature */) { + if (kind === 182 /* ConstructSignature */) { parseExpected(104 /* NewKeyword */); } const typeParameters = parseTypeParameters(); const parameters = parseParameters(4 /* Type */); const type = parseReturnType(58 /* ColonToken */, true); parseTypeMemberSemicolon(); - const node = kind === 179 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); + const node = kind === 181 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } function isIndexSignature() { @@ -30764,6 +30831,17 @@ var Parser; node.illegalDecorators = decorators; return withJSDoc(finishNode(node, pos), hasJSDoc); } + function parseOverloadPropertyDeclaration(pos, hasJSDoc, modifiers) { + const name = parsePropertyName(); + const questionToken = parseOptionalToken(57 /* QuestionToken */); + let node; + const type = parseTypeAnnotation(); + node = factory2.createOverloadPropertyDeclaration(modifiers, name, questionToken, type); + if (token() === 63 /* EqualsToken */) + node.initializer = parseInitializer(); + parseTypeMemberSemicolon(); + return withJSDoc(finishNode(node, pos), hasJSDoc); + } function parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers) { const name = parsePropertyName(); const questionToken = parseOptionalToken(57 /* QuestionToken */); @@ -30805,19 +30883,19 @@ var Parser; } function parseTypeMember() { if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */) { - return parseSignatureMember(179 /* CallSignature */); + return parseSignatureMember(181 /* CallSignature */); } if (token() === 104 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(180 /* ConstructSignature */); + return parseSignatureMember(182 /* ConstructSignature */); } const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); const modifiers = parseModifiers(); if (parseContextualModifier(138 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 177 /* GetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 179 /* GetAccessor */, 4 /* Type */); } if (parseContextualModifier(152 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 178 /* SetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 180 /* SetAccessor */, 4 /* Type */); } if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, void 0, modifiers); @@ -31693,7 +31771,7 @@ var Parser; return void 0; } let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 196 /* ParenthesizedType */) { + while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 198 /* ParenthesizedType */) { unwrappedType = unwrappedType.type; } const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); @@ -31756,7 +31834,7 @@ var Parser; return parseBinaryExpressionRest(precedence, leftOperand, pos); } function isInOrOfKeyword(t) { - return t === 102 /* InKeyword */ || t === 164 /* OfKeyword */; + return t === 102 /* InKeyword */ || t === 165 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand, pos) { while (true) { @@ -31838,7 +31916,7 @@ var Parser; if (token() === 42 /* AsteriskAsteriskToken */) { const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 216 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 218 /* 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)); @@ -31961,11 +32039,11 @@ var Parser; const pos = getNodePos(); const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); let result; - if (opening.kind === 289 /* JsxOpeningElement */) { + if (opening.kind === 292 /* JsxOpeningElement */) { let children = parseJsxChildren(opening); let closingElement; const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 287 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { + if ((lastChild == null ? void 0 : lastChild.kind) === 290 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { const end = lastChild.children.end; const newLast = finishNode( factory2.createJsxElement( @@ -31989,10 +32067,10 @@ var Parser; } } result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 292 /* JsxOpeningFragment */) { + } else if (opening.kind === 295 /* JsxOpeningFragment */) { result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { - Debug.assert(opening.kind === 288 /* JsxSelfClosingElement */); + Debug.assert(opening.kind === 291 /* JsxSelfClosingElement */); result = opening; } if (inExpressionContext && token() === 29 /* LessThanToken */) { @@ -32048,7 +32126,7 @@ var Parser; if (!child) break; list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 287 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { + if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 290 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { break; } } @@ -32256,7 +32334,7 @@ var Parser; continue; } if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 234 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest(pos, expression, questionDotToken, void 0); + expression = !questionDotToken && expression.kind === 236 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest(pos, expression, questionDotToken, void 0); continue; } if (!questionDotToken) { @@ -32304,7 +32382,7 @@ var Parser; } } if (typeArguments || token() === 20 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 234 /* ExpressionWithTypeArguments */) { + if (!questionDotToken && expression.kind === 236 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -32531,10 +32609,10 @@ var Parser; const decorators = parseDecorators(); const modifiers = parseModifiers(); if (parseContextualModifier(138 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 177 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 179 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(152 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 178 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 180 /* SetAccessor */, 0 /* None */); } const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const tokenIsIdentifier = isIdentifier2(); @@ -32604,7 +32682,7 @@ var Parser; const expressionPos = getNodePos(); let expression = parseMemberExpressionRest(expressionPos, parsePrimaryExpression(), false); let typeArguments; - if (expression.kind === 234 /* ExpressionWithTypeArguments */) { + if (expression.kind === 236 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -32712,7 +32790,7 @@ var Parser; } } let node; - if (awaitToken ? parseExpected(164 /* OfKeyword */) : parseOptional(164 /* OfKeyword */)) { + if (awaitToken ? parseExpected(165 /* OfKeyword */) : parseOptional(165 /* OfKeyword */)) { const expression = allowInAnd(() => parseAssignmentExpressionOrHigher(true)); parseExpected(21 /* CloseParenToken */); node = factory2.createForOfStatement(awaitToken, initializer, expression, parseStatement()); @@ -32733,10 +32811,10 @@ var Parser; function parseBreakOrContinueStatement(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 253 /* BreakStatement */ ? 81 /* BreakKeyword */ : 87 /* ContinueKeyword */); + parseExpected(kind === 255 /* BreakStatement */ ? 81 /* BreakKeyword */ : 87 /* ContinueKeyword */); const label = canParseSemicolon() ? void 0 : parseIdentifier(); parseSemicolon(); - const node = kind === 253 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); + const node = kind === 255 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseReturnStatement() { @@ -32890,6 +32968,8 @@ var Parser; return inEtsContext(); case 59 /* AtToken */: return inAllowAnnotationContext() && nextToken() === 119 /* InterfaceKeyword */; + case 164 /* OverloadKeyword */: + return nextTokenIsIdentifierOnSameLine(); case 119 /* InterfaceKeyword */: case 155 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); @@ -33024,9 +33104,9 @@ var Parser; case 98 /* ForKeyword */: return parseForOrForInOrForOfStatement(); case 87 /* ContinueKeyword */: - return parseBreakOrContinueStatement(252 /* ContinueStatement */); + return parseBreakOrContinueStatement(254 /* ContinueStatement */); case 81 /* BreakKeyword */: - return parseBreakOrContinueStatement(253 /* BreakStatement */); + return parseBreakOrContinueStatement(255 /* BreakStatement */); case 106 /* ReturnKeyword */: return parseReturnStatement(); case 117 /* WithKeyword */: @@ -33042,6 +33122,7 @@ var Parser; case 88 /* DebuggerKeyword */: return parseDebuggerStatement(); case 59 /* AtToken */: + case 164 /* OverloadKeyword */: return parseDeclaration(); case 133 /* AsyncKeyword */: case 119 /* InterfaceKeyword */: @@ -33090,6 +33171,19 @@ var Parser; const node = factory2.createAnnotationDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } + function parseOverloadDeclaration(pos, hasJSDoc, decorators, modifiers) { + parseExpected(164 /* OverloadKeyword */); + const name = createIdentifier3(isBindingIdentifier()); + let members; + if (parseExpected(18 /* OpenBraceToken */)) { + members = parseOverloadMembers(); + parseExpected(19 /* CloseBraceToken */); + } else { + members = createMissingList(); + } + const node = factory2.createOverloadDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, members); + return withJSDoc(finishNode(node, pos), hasJSDoc); + } function parseDeclaration() { var _a2, _b; const pos = getNodePos(); @@ -33159,6 +33253,8 @@ var Parser; return parseAnnotationDeclaration(pos, hasJSDoc, decorators, modifiers); } return parseDeclarationDefault(pos, decorators, modifiers); + case 164 /* OverloadKeyword */: + return parseOverloadDeclaration(pos, hasJSDoc, decorators, modifiers); case 119 /* InterfaceKeyword */: return parseInterfaceDeclaration(pos, hasJSDoc, decorators, modifiers); case 155 /* TypeKeyword */: @@ -33188,7 +33284,7 @@ var Parser; } function parseDeclarationDefault(pos, decorators, modifiers) { if (decorators || modifiers) { - const missing = createMissingNode(285 /* MissingDeclaration */, true, Diagnostics.Declaration_expected); + const missing = createMissingNode(288 /* MissingDeclaration */, true, Diagnostics.Declaration_expected); setTextRangePos(missing, pos); missing.illegalDecorators = decorators; missing.modifiers = modifiers; @@ -33298,7 +33394,7 @@ var Parser; } nextToken(); let declarations; - if (token() === 164 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 165 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { declarations = createMissingList(); } else { const savedDisallowIn = inDisallowInContext(); @@ -33328,7 +33424,7 @@ var Parser; const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const name = modifierFlags & 1024 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); if (name && hasEtsStylesDecoratorNames(decorators, sourceFileCompilerOptions)) { - fileStylesComponents.set(name.escapedText.toString(), 263 /* FunctionDeclaration */); + fileStylesComponents.set(name.escapedText.toString(), 265 /* FunctionDeclaration */); } const originalUICallbackContext = inUICallbackContext(); setEtsBuilderContext(hasEtsBuilderDecoratorNames(decorators, sourceFileCompilerOptions)); @@ -33432,7 +33528,7 @@ var Parser; setUICallbackContext(inBuildContext() || inBuilderContext()); if (inStructContext() && hasEtsStylesDecoratorNames(decorators, sourceFileCompilerOptions)) { if (methodName && currentStructName) { - structStylesComponents.set(methodName, { structName: currentStructName, kind: 174 /* MethodDeclaration */ }); + structStylesComponents.set(methodName, { structName: currentStructName, kind: 176 /* MethodDeclaration */ }); } const stylesEtsComponentDecoratorNames = getEtsStylesDecoratorComponentNames(decorators, sourceFileCompilerOptions); if (stylesEtsComponentDecoratorNames.length > 0) { @@ -33521,7 +33617,7 @@ var Parser; const parameters = parseParameters(0 /* None */); const type = parseReturnType(58 /* ColonToken */, false); const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 177 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, type, body) : factory2.createSetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, body); + const node = kind === 179 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, type, body) : factory2.createSetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, body); node.typeParameters = typeParameters; if (isSetAccessorDeclaration(node)) node.type = type; @@ -33733,10 +33829,10 @@ var Parser; return parseClassStaticBlockDeclaration(pos, hasJSDoc, decorators, modifiers); } if (parseContextualModifier(138 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 177 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 179 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(152 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 178 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 180 /* SetAccessor */, 0 /* None */); } if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, decorators, modifiers); @@ -33772,35 +33868,35 @@ var Parser; const hasJSDoc = hasPrecedingJSDocComment(); if (token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (parseContextualModifier(138 /* GetKeyword */)) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (parseContextualModifier(152 /* SetKeyword */)) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (isIndexSignature()) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); @@ -33811,11 +33907,66 @@ var Parser; } return Debug.fail("Should not have attempted to parse annotation member declaration."); } + function parseOverloadElement() { + const pos = getNodePos(); + if (token() === 26 /* SemicolonToken */) { + parseErrorAt(pos, pos, Diagnostics.Unexpected_keyword_or_identifier); + } + const hasJSDoc = hasPrecedingJSDocComment(); + if (token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (parseContextualModifier(138 /* GetKeyword */)) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (parseContextualModifier(152 /* SetKeyword */)) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (isIndexSignature()) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (tokenIsIdentifierOrKeyword(token())) { + const modifiers = parseModifiers(); + let overloadPropertyDeclaration = parseOverloadPropertyDeclaration(pos, hasJSDoc, modifiers); + if (overloadPropertyDeclaration.kind === 174 /* OverloadPropertyDeclaration */) { + return overloadPropertyDeclaration; + } + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + return Debug.fail("Should not have attempted to parse annotation member declaration."); + } function parseClassExpression() { - return parseClassDeclarationOrExpression(getNodePos(), hasPrecedingJSDocComment(), void 0, void 0, 232 /* ClassExpression */); + return parseClassDeclarationOrExpression(getNodePos(), hasPrecedingJSDocComment(), void 0, void 0, 234 /* ClassExpression */); } function parseClassDeclaration(pos, hasJSDoc, decorators, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers, 264 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers, 266 /* ClassDeclaration */); } function parseStructDeclaration(pos, hasJSDoc, decorators, modifiers) { return parseStructDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers); @@ -33836,7 +33987,7 @@ var Parser; members = createMissingList(); } setAwaitContext(savedAwaitContext); - const node = kind === 264 /* ClassDeclaration */ ? factory2.createClassDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members) : factory2.createClassExpression(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members); + const node = kind === 266 /* ClassDeclaration */ ? factory2.createClassDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members) : factory2.createClassExpression(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseStructDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers) { @@ -33900,7 +34051,7 @@ var Parser; function parseExpressionWithTypeArguments() { const pos = getNodePos(); const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 234 /* ExpressionWithTypeArguments */) { + if (expression.kind === 236 /* ExpressionWithTypeArguments */) { return expression; } const typeArguments = tryParseTypeArguments(); @@ -33918,13 +34069,16 @@ var Parser; function parseAnnotationMembers() { return parseList(ParsingContext.AnnotationMembers, parseAnnotationElement); } + function parseOverloadMembers() { + return parseList(ParsingContext.TypeMembers, parseOverloadElement); + } function parseStructMembers(pos) { const structMembers = parseList(ParsingContext.ClassMembers, parseClassElement); const virtualStructMembers = []; const virtualParameterProperties = []; structMembers.forEach((member) => { virtualStructMembers.push(member); - if (member.kind === 171 /* PropertyDeclaration */) { + if (member.kind === 172 /* PropertyDeclaration */) { const property = member; virtualParameterProperties.push( finishVirtualNode( @@ -34171,7 +34325,7 @@ var Parser; function parseImportClause(identifier, pos, isTypeOnly) { let namedBindings; if (!identifier || parseOptional(27 /* CommaToken */)) { - namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(278 /* NamedImports */); + namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(281 /* NamedImports */); } return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); } @@ -34204,15 +34358,15 @@ var Parser; } function parseNamedImportsOrExports(kind) { const pos = getNodePos(); - const node = kind === 278 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); + const node = kind === 281 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); return finishNode(node, pos); } function parseExportSpecifier() { const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(284 /* ExportSpecifier */), hasJSDoc); + return withJSDoc(parseImportOrExportSpecifier(287 /* ExportSpecifier */), hasJSDoc); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(279 /* ImportSpecifier */); + return parseImportOrExportSpecifier(282 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { const pos = getNodePos(); @@ -34256,10 +34410,10 @@ var Parser; parseExpected(129 /* AsKeyword */); name = parseNameWithKeywordCheck(); } - if (kind === 279 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 282 /* ImportSpecifier */ && checkIdentifierIsKeyword) { parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); } - const node = kind === 279 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); + const node = kind === 282 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); return finishNode(node, pos); function parseNameWithKeywordCheck() { checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); @@ -34286,7 +34440,7 @@ var Parser; parseExpected(160 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } else { - exportClause = parseNamedImportsOrExports(282 /* NamedExports */); + exportClause = parseNamedImportsOrExports(285 /* NamedExports */); if (token() === 160 /* FromKeyword */ || token() === 10 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { parseExpected(160 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); @@ -34860,7 +35014,7 @@ var Parser; switch (node.kind) { case 150 /* ObjectKeyword */: return true; - case 188 /* ArrayType */: + case 190 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; @@ -34890,12 +35044,12 @@ var Parser; let child; let children; while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent2, name))) { - if (child.kind === 349 /* JSDocParameterTag */ || child.kind === 356 /* JSDocPropertyTag */) { + if (child.kind === 352 /* JSDocParameterTag */ || child.kind === 359 /* JSDocPropertyTag */) { children = append(children, child); } } if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 188 /* ArrayType */), pos); + const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 190 /* ArrayType */), pos); return finishNode(factory2.createJSDocTypeExpression(literal), pos); } } @@ -35008,7 +35162,7 @@ var Parser; let hasChildren = false; while (child = tryParse(() => parseChildPropertyTag(indent2))) { hasChildren = true; - if (child.kind === 352 /* JSDocTypeTag */) { + if (child.kind === 355 /* JSDocTypeTag */) { if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { @@ -35023,7 +35177,7 @@ var Parser; } } if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 188 /* ArrayType */; + const isArrayType = typeExpression && typeExpression.type.kind === 190 /* ArrayType */; const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start2); end2 = typeExpression.end; @@ -35074,7 +35228,7 @@ var Parser; const returnTag = tryParse(() => { if (parseOptionalJsdoc(59 /* AtToken */)) { const tag = parseTag(indent2); - if (tag && tag.kind === 350 /* JSDocReturnTag */) { + if (tag && tag.kind === 353 /* JSDocReturnTag */) { return tag; } } @@ -35108,7 +35262,7 @@ var Parser; case 59 /* AtToken */: if (canParseTag) { const child = tryParseChildTag(target, indent2); - if (child && (child.kind === 349 /* JSDocParameterTag */ || child.kind === 356 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 352 /* JSDocParameterTag */ || child.kind === 359 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -37628,7 +37782,7 @@ function convertConfigFileToObject(sourceFile, errors, reportOptionsErrors, opti var _a2; const rootExpression = (_a2 = sourceFile.statements[0]) == null ? void 0 : _a2.expression; const knownRootOptions = reportOptionsErrors ? getTsconfigRootOptionsMap() : void 0; - if (rootExpression && rootExpression.kind !== 210 /* ObjectLiteralExpression */) { + if (rootExpression && rootExpression.kind !== 212 /* ObjectLiteralExpression */) { errors.push(createDiagnosticForNodeInSourceFile( sourceFile, rootExpression, @@ -37660,7 +37814,7 @@ function convertToObjectWorker(sourceFile, rootExpression, errors, returnValue, function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) { const result = returnValue ? {} : void 0; for (const element of node.properties) { - if (element.kind !== 305 /* PropertyAssignment */) { + if (element.kind !== 308 /* PropertyAssignment */) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); continue; } @@ -37748,13 +37902,13 @@ function convertToObjectWorker(sourceFile, rootExpression, errors, returnValue, case 8 /* NumericLiteral */: reportInvalidOptionValue(option && option.type !== "number"); return validateValue(Number(valueExpression.text)); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: if (valueExpression.operator !== 40 /* MinusToken */ || valueExpression.operand.kind !== 8 /* NumericLiteral */) { break; } reportInvalidOptionValue(option && option.type !== "number"); return validateValue(-Number(valueExpression.operand.text)); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: reportInvalidOptionValue(option && option.type !== "object"); const objectLiteralExpression = valueExpression; if (option) { @@ -37773,7 +37927,7 @@ function convertToObjectWorker(sourceFile, rootExpression, errors, returnValue, void 0 )); } - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: reportInvalidOptionValue(option && option.type !== "list"); return validateValue(convertArrayLiteralExpressionToJson( valueExpression.elements, @@ -40817,7 +40971,7 @@ function getReservedDecoratorsOfEtsFile(node, host) { } function getReservedDecoratorsOfStructDeclaration(node, host) { let reservedDecorators; - if (node.parent.kind === 265 /* StructDeclaration */) { + if (node.parent.kind === 267 /* StructDeclaration */) { reservedDecorators = ensureEtsDecorators(node, host); } return reservedDecorators; @@ -41034,10 +41188,10 @@ function isTokenInsideBuilder(decorators, compilerOptions) { return false; } function getEtsComponentExpressionInnerCallExpressionNode(node) { - while (node && node.kind !== 220 /* EtsComponentExpression */) { - if (node.kind === 213 /* CallExpression */) { + while (node && node.kind !== 222 /* EtsComponentExpression */) { + if (node.kind === 215 /* CallExpression */) { node = node.expression; - } else if (node.kind === 211 /* PropertyAccessExpression */) { + } else if (node.kind === 213 /* PropertyAccessExpression */) { node = node.expression; } else { node = void 0; @@ -41050,7 +41204,7 @@ function getRootEtsComponentInnerCallExpressionNode(node) { return node; } while (node) { - const ancestor = getAncestor(isCallExpression(node) ? node.parent : node, 213 /* CallExpression */); + const ancestor = getAncestor(isCallExpression(node) ? node.parent : node, 215 /* CallExpression */); const target = getRootEtsComponent(ancestor); if (target && isInStateStylesObject(node)) { return target; @@ -41079,7 +41233,7 @@ function getEtsComponentExpressionInnerExpressionStatementNode(node) { return void 0; } function isInStateStylesObject(node) { - const ancestor = getAncestor(node, 210 /* ObjectLiteralExpression */); + const ancestor = getAncestor(node, 212 /* ObjectLiteralExpression */); return ancestor !== void 0 && ancestor.parent !== void 0 && isPropertyAssignment(ancestor.parent); } function getEtsExtendDecoratorsComponentNames(decorators, compilerOptions) { @@ -41087,7 +41241,7 @@ function getEtsExtendDecoratorsComponentNames(decorators, compilerOptions) { const extendComponents = []; const extendDecorator = (_c = (_b = (_a2 = compilerOptions.ets) == null ? void 0 : _a2.extend) == null ? void 0 : _b.decorator) != null ? _c : "Extend"; decorators == null ? void 0 : decorators.forEach((decorator) => { - if (decorator.expression.kind === 213 /* CallExpression */) { + if (decorator.expression.kind === 215 /* CallExpression */) { const identifier = decorator.expression.expression; const args = decorator.expression.arguments; if (identifier.kind === 79 /* Identifier */ && (extendDecorator == null ? void 0 : extendDecorator.includes(identifier.escapedText.toString())) && args.length) { @@ -41104,7 +41258,7 @@ function getEtsStylesDecoratorComponentNames(decorators, compilerOptions) { const stylesComponents = []; const stylesDecorator = (_c = (_b = (_a2 = compilerOptions.ets) == null ? void 0 : _a2.styles) == null ? void 0 : _b.decorator) != null ? _c : "Styles"; decorators == null ? void 0 : decorators.forEach((decorator) => { - if (decorator.kind === 169 /* Decorator */ && decorator.expression.kind === 79 /* Identifier */) { + if (decorator.kind === 170 /* Decorator */ && decorator.expression.kind === 79 /* Identifier */) { const identifier = decorator.expression; if (identifier.kind === 79 /* Identifier */ && identifier.escapedText === stylesDecorator) { stylesComponents.push(identifier.escapedText); @@ -41150,7 +41304,7 @@ function transformAnnotation(context) { } function visitAnnotationsDeclarations(node) { switch (node.kind) { - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return visitAnnotationDeclaration(node); default: return visitEachChild(node, visitAnnotationsDeclarations, context); @@ -41158,9 +41312,9 @@ function transformAnnotation(context) { } function visitAnnotations(node) { switch (node.kind) { - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return visitImportSpecifier(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return visitAnnotation(node); default: return visitEachChild(node, visitAnnotations, context); @@ -41200,14 +41354,14 @@ function transformAnnotation(context) { return factory.createIdentifier( annotationMagicNamePrefix + expr.escapedText ); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: const propAccessExpr = expr; return factory.updatePropertyAccessExpression( propAccessExpr, propAccessExpr.expression, addMagicPrefixToAnnotationNameIdentifier(propAccessExpr.name) ); - case 213 /* CallExpression */: + case 215 /* CallExpression */: const callExpr = expr; return factory.updateCallExpression( callExpr, @@ -41288,16 +41442,16 @@ function transformTypeExportImportAndConstEnumInTypeScript(context) { } function visitImportExportAndConstEnumMember(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return visitImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return visitExportDeclaration(node); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return visitConstEnum(node); - case 308 /* EnumMember */: + case 311 /* EnumMember */: return visitEnumMember(node); default: return visitEachChild(node, visitImportExportAndConstEnumMember, context); @@ -41343,7 +41497,7 @@ function transformTypeExportImportAndConstEnumInTypeScript(context) { return name || namedBindings ? factory.updateImportClause(node, false, name, namedBindings) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 277 /* NamespaceImport */) { + if (node.kind === 280 /* NamespaceImport */) { if (resolver.isReferencedAliasDeclaration(node)) { return node; } @@ -41929,23 +42083,23 @@ function getModuleInstanceStateCached(node, visited = new Map2()) { } function getModuleInstanceStateWorker(node, visited) { switch (node.kind) { - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return 0 /* NonInstantiated */; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: if (isEnumConst(node)) { return 2 /* ConstEnumOnly */; } break; - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: if (!hasSyntacticModifier(node, 1 /* Export */)) { return 0 /* NonInstantiated */; } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: const exportDeclaration = node; - if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 282 /* NamedExports */) { + if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 285 /* NamedExports */) { let state = 0 /* NonInstantiated */; for (const specifier of exportDeclaration.exportClause.elements) { const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); @@ -41959,7 +42113,7 @@ function getModuleInstanceStateWorker(node, visited) { return state; } break; - case 271 /* ModuleBlock */: { + case 274 /* ModuleBlock */: { let state = 0 /* NonInstantiated */; forEachChild(node, (n) => { const childState = getModuleInstanceStateCached(n, visited); @@ -41978,7 +42132,7 @@ function getModuleInstanceStateWorker(node, visited) { }); return state; } - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return getModuleInstanceState(node, visited); case 79 /* Identifier */: if (node.isInJSDocNamespace) { @@ -42150,7 +42304,7 @@ function createBinder() { } } function getDeclarationName(node) { - if (node.kind === 280 /* ExportAssignment */) { + if (node.kind === 283 /* ExportAssignment */) { return node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; } const name = getNameOfDeclaration(node); @@ -42159,7 +42313,7 @@ function createBinder() { const moduleName = getTextOfIdentifierOrLiteral(name); return isGlobalScopeAugmentation(node) ? "__global" : `"${moduleName}"`; } - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -42181,30 +42335,30 @@ function createBinder() { return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0; } switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: return "__constructor" /* Constructor */; - case 184 /* FunctionType */: - case 179 /* CallSignature */: - case 332 /* JSDocSignature */: + case 186 /* FunctionType */: + case 181 /* CallSignature */: + case 335 /* JSDocSignature */: return "__call" /* Call */; - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 187 /* ConstructorType */: + case 182 /* ConstructSignature */: return "__new" /* New */; - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return "__index" /* Index */; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return "__export" /* ExportStar */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return "export=" /* ExportEquals */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) === 2 /* ModuleExports */) { return "export=" /* ExportEquals */; } Debug.fail("Unknown binary declaration kind"); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: return isJSDocConstructSignature(node) ? "__new" /* New */ : "__call" /* Call */; - case 168 /* Parameter */: - Debug.assert(node.parent.kind === 326 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); + case 169 /* Parameter */: + Debug.assert(node.parent.kind === 329 /* 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; @@ -42251,7 +42405,7 @@ function createBinder() { messageNeedsName = false; multipleDefaultExports = true; } else { - if (symbol.declarations && symbol.declarations.length && (node.kind === 280 /* ExportAssignment */ && !node.isExportEquals)) { + if (symbol.declarations && symbol.declarations.length && (node.kind === 283 /* ExportAssignment */ && !node.isExportEquals)) { message = Diagnostics.A_module_cannot_have_multiple_default_exports; messageNeedsName = false; multipleDefaultExports = true; @@ -42290,7 +42444,7 @@ function createBinder() { function declareModuleMember(node, symbolFlags, symbolExcludes) { const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { - if (node.kind === 284 /* ExportSpecifier */ || node.kind === 274 /* ImportEqualsDeclaration */ && hasExportModifier) { + if (node.kind === 287 /* ExportSpecifier */ || node.kind === 277 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { return declareSymbol(container.locals, void 0, node, symbolFlags, symbolExcludes); @@ -42334,7 +42488,7 @@ function createBinder() { const saveThisParentContainer = thisParentContainer; const savedBlockScopeContainer = blockScopeContainer; if (containerFlags & 1 /* IsContainer */) { - if (node.kind !== 219 /* ArrowFunction */) { + if (node.kind !== 221 /* ArrowFunction */) { thisParentContainer = container; } container = blockScopeContainer = node; @@ -42354,14 +42508,14 @@ function createBinder() { const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 177 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { currentFlow.node = node; } } - currentReturnTarget = isImmediatelyInvoked || node.kind === 176 /* Constructor */ || isInJSFile(node) && (node.kind === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */) ? createBranchLabel() : void 0; + currentReturnTarget = isImmediatelyInvoked || node.kind === 178 /* Constructor */ || isInJSFile(node) && (node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */) ? createBranchLabel() : void 0; currentExceptionTarget = void 0; currentBreakTarget = void 0; currentContinueTarget = void 0; @@ -42375,14 +42529,14 @@ function createBinder() { node.flags |= 512 /* HasExplicitReturn */; node.endFlowNode = currentFlow; } - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { node.flags |= emitFlags; node.endFlowNode = currentFlow; } if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); currentFlow = finishFlowLabel(currentReturnTarget); - if (node.kind === 176 /* Constructor */ || node.kind === 175 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { + if (node.kind === 178 /* Constructor */ || node.kind === 177 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */)) { node.returnFlowNode = currentFlow; } } @@ -42407,8 +42561,8 @@ function createBinder() { blockScopeContainer = savedBlockScopeContainer; } function bindEachFunctionsFirst(nodes) { - bindEach(nodes, (n) => n.kind === 263 /* FunctionDeclaration */ ? bind(n) : void 0); - bindEach(nodes, (n) => n.kind !== 263 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind === 265 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind !== 265 /* FunctionDeclaration */ ? bind(n) : void 0); } function bindEach(nodes, bindFunction = bind) { if (nodes === void 0) { @@ -42428,59 +42582,59 @@ function createBinder() { inAssignmentPattern = saveInAssignmentPattern; return; } - if (node.kind >= 244 /* FirstStatement */ && node.kind <= 260 /* LastStatement */ && !options.allowUnreachableCode) { + if (node.kind >= 246 /* FirstStatement */ && node.kind <= 262 /* LastStatement */ && !options.allowUnreachableCode) { node.flowNode = currentFlow; } switch (node.kind) { - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: bindWhileStatement(node); break; - case 247 /* DoStatement */: + case 249 /* DoStatement */: bindDoStatement(node); break; - case 249 /* ForStatement */: + case 251 /* ForStatement */: bindForStatement(node); break; - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 246 /* IfStatement */: + case 248 /* IfStatement */: bindIfStatement(node); break; - case 254 /* ReturnStatement */: - case 258 /* ThrowStatement */: + case 256 /* ReturnStatement */: + case 260 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 259 /* TryStatement */: + case 261 /* TryStatement */: bindTryStatement(node); break; - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: bindSwitchStatement(node); break; - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: bindCaseBlock(node); break; - case 298 /* CaseClause */: + case 301 /* CaseClause */: bindCaseClause(node); break; - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: bindExpressionStatement(node); break; - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: bindLabeledStatement(node); break; - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: bindPrefixUnaryExpressionFlow(node); break; - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: bindPostfixUnaryExpressionFlow(node); break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isDestructuringAssignment(node)) { inAssignmentPattern = saveInAssignmentPattern; bindDestructuringAssignmentFlow(node); @@ -42488,49 +42642,49 @@ function createBinder() { } bindBinaryExpressionFlow(node); break; - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: bindDeleteExpressionFlow(node); break; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: bindConditionalExpressionFlow(node); break; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: bindVariableDeclarationFlow(node); break; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: bindAccessExpressionFlow(node); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: bindCallExpressionFlow(node); break; - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: bindNonNullExpressionFlow(node); break; - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 314 /* SourceFile */: { + case 317 /* SourceFile */: { bindEachFunctionsFirst(node.statements); bind(node.endOfFileToken); break; } - case 242 /* Block */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 274 /* ModuleBlock */: bindEachFunctionsFirst(node.statements); break; - case 208 /* BindingElement */: + case 210 /* BindingElement */: bindBindingElementFlow(node); break; - case 168 /* Parameter */: + case 169 /* Parameter */: bindParameterFlow(node); break; - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: - case 305 /* PropertyAssignment */: - case 231 /* SpreadElement */: + case 212 /* ObjectLiteralExpression */: + case 211 /* ArrayLiteralExpression */: + case 308 /* PropertyAssignment */: + case 233 /* SpreadElement */: inAssignmentPattern = saveInAssignmentPattern; default: bindEachChild(node); @@ -42544,19 +42698,19 @@ function createBinder() { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: case 109 /* ThisKeyword */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return containsNarrowableReference(expr); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return hasNarrowableArgument(expr); - case 217 /* ParenthesizedExpression */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: return isNarrowingExpression(expr.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isNarrowingBinaryExpression(expr); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return expr.operator === 53 /* ExclamationToken */ && isNarrowingExpression(expr.operand); - case 222 /* TypeOfExpression */: + case 224 /* TypeOfExpression */: return isNarrowingExpression(expr.expression); } return false; @@ -42575,7 +42729,7 @@ function createBinder() { } } } - if (expr.expression.kind === 211 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { + if (expr.expression.kind === 213 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { return true; } return false; @@ -42606,9 +42760,9 @@ function createBinder() { } function isNarrowableOperand(expr) { switch (expr.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return isNarrowableOperand(expr.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (expr.operatorToken.kind) { case 63 /* EqualsToken */: return isNarrowableOperand(expr.left); @@ -42681,24 +42835,24 @@ function createBinder() { function isStatementCondition(node) { const parent3 = node.parent; switch (parent3.kind) { - case 246 /* IfStatement */: - case 248 /* WhileStatement */: - case 247 /* DoStatement */: + case 248 /* IfStatement */: + case 250 /* WhileStatement */: + case 249 /* DoStatement */: return parent3.expression === node; - case 249 /* ForStatement */: - case 228 /* ConditionalExpression */: + case 251 /* ForStatement */: + case 230 /* ConditionalExpression */: return parent3.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 217 /* ParenthesizedExpression */) { + if (node.kind === 219 /* ParenthesizedExpression */) { node = node.expression; - } else if (node.kind === 225 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { + } else if (node.kind === 227 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { node = node.operand; } else { - return node.kind === 227 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */); + return node.kind === 229 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */); } } } @@ -42739,7 +42893,7 @@ function createBinder() { } function setContinueTarget(node, target) { let label = activeLabelList; - while (label && node.parent.kind === 257 /* LabeledStatement */) { + while (label && node.parent.kind === 259 /* LabeledStatement */) { label.continueTarget = target; label = label.next; node = node.parent; @@ -42790,12 +42944,12 @@ function createBinder() { bind(node.expression); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 251 /* ForOfStatement */) { + if (node.kind === 253 /* ForOfStatement */) { bind(node.awaitModifier); } addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 262 /* VariableDeclarationList */) { + if (node.initializer.kind !== 264 /* VariableDeclarationList */) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -42817,7 +42971,7 @@ function createBinder() { } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 254 /* ReturnStatement */) { + if (node.kind === 256 /* ReturnStatement */) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -42834,7 +42988,7 @@ function createBinder() { return void 0; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - const flowLabel = node.kind === 253 /* BreakStatement */ ? breakTarget : continueTarget; + const flowLabel = node.kind === 255 /* BreakStatement */ ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -42904,7 +43058,7 @@ function createBinder() { preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 299 /* DefaultClause */); + const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 302 /* DefaultClause */); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -42947,7 +43101,7 @@ function createBinder() { maybeBindExpressionFlowIfCall(node.expression); } function maybeBindExpressionFlowIfCall(node) { - if (node.kind === 213 /* CallExpression */) { + if (node.kind === 215 /* CallExpression */) { const call = node; if (call.expression.kind !== 107 /* SuperKeyword */ && isDottedName(call.expression)) { currentFlow = createFlowCall(currentFlow, call); @@ -42973,7 +43127,7 @@ function createBinder() { currentFlow = finishFlowLabel(postStatementLabel); } function bindDestructuringTargetFlow(node) { - if (node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { + if (node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { bindAssignmentTargetFlow(node.left); } else { bindAssignmentTargetFlow(node); @@ -42982,21 +43136,21 @@ function createBinder() { function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); - } else if (node.kind === 209 /* ArrayLiteralExpression */) { + } else if (node.kind === 211 /* ArrayLiteralExpression */) { for (const e of node.elements) { - if (e.kind === 231 /* SpreadElement */) { + if (e.kind === 233 /* SpreadElement */) { bindAssignmentTargetFlow(e.expression); } else { bindDestructuringTargetFlow(e); } } - } else if (node.kind === 210 /* ObjectLiteralExpression */) { + } else if (node.kind === 212 /* ObjectLiteralExpression */) { for (const p of node.properties) { - if (p.kind === 305 /* PropertyAssignment */) { + if (p.kind === 308 /* PropertyAssignment */) { bindDestructuringTargetFlow(p.initializer); - } else if (p.kind === 306 /* ShorthandPropertyAssignment */) { + } else if (p.kind === 309 /* ShorthandPropertyAssignment */) { bindAssignmentTargetFlow(p.name); - } else if (p.kind === 307 /* SpreadAssignment */) { + } else if (p.kind === 310 /* SpreadAssignment */) { bindAssignmentTargetFlow(p.expression); } } @@ -43119,7 +43273,7 @@ function createBinder() { const operator = node.operatorToken.kind; if (isAssignmentOperator(operator) && !isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 63 /* EqualsToken */ && node.left.kind === 212 /* ElementAccessExpression */) { + if (operator === 63 /* EqualsToken */ && node.left.kind === 214 /* ElementAccessExpression */) { const elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -43147,7 +43301,7 @@ function createBinder() { } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 211 /* PropertyAccessExpression */) { + if (node.expression.kind === 213 /* PropertyAccessExpression */) { bindAssignmentTargetFlow(node.expression); } } @@ -43212,7 +43366,7 @@ function createBinder() { } function bindJSDocTypeAlias(node) { bind(node.tagName); - if (node.kind !== 348 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 351 /* JSDocEnumTag */ && node.fullName) { setParent(node.fullName, node); setParentRecursive(node.fullName, false); } @@ -43223,7 +43377,7 @@ function createBinder() { function bindJSDocClassTag(node) { bindEachChild(node); const host = getHostSignatureFromJSDoc(node); - if (host && host.kind !== 174 /* MethodDeclaration */) { + if (host && host.kind !== 176 /* MethodDeclaration */) { addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } @@ -43236,15 +43390,15 @@ function createBinder() { } function bindOptionalChainRest(node) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: bind(node.questionDotToken); bind(node.name); break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: bind(node.questionDotToken); bind(node.argumentExpression); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: bind(node.questionDotToken); bindEach(node.typeArguments); bindEach(node.arguments); @@ -43291,7 +43445,7 @@ function createBinder() { bindOptionalChainFlow(node); } else { const expr = skipParentheses(node.expression); - if (expr.kind === 218 /* FunctionExpression */ || expr.kind === 219 /* ArrowFunction */) { + if (expr.kind === 220 /* FunctionExpression */ || expr.kind === 221 /* ArrowFunction */) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); @@ -43302,7 +43456,7 @@ function createBinder() { } } } - if (node.expression.kind === 211 /* PropertyAccessExpression */) { + if (node.expression.kind === 213 /* PropertyAccessExpression */) { const propertyAccess = node.expression; if (isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -43311,58 +43465,60 @@ function createBinder() { } function getContainerFlags(node) { switch (node.kind) { - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 269 /* EnumDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 295 /* JsxAttributes */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 272 /* EnumDeclaration */: + case 212 /* ObjectLiteralExpression */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 298 /* JsxAttributes */: return 1 /* IsContainer */; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return 1 /* IsContainer */ | 64 /* IsInterface */; - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 200 /* MappedType */: - case 181 /* IndexSignature */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 202 /* MappedType */: + case 183 /* IndexSignature */: return 1 /* IsContainer */ | 32 /* HasLocals */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */; } - case 176 /* Constructor */: - case 263 /* FunctionDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 332 /* JSDocSignature */: - case 326 /* JSDocFunctionType */: - case 184 /* FunctionType */: - case 180 /* ConstructSignature */: - case 185 /* ConstructorType */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 265 /* FunctionDeclaration */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 335 /* JSDocSignature */: + case 329 /* JSDocFunctionType */: + case 186 /* FunctionType */: + case 182 /* ConstructSignature */: + case 187 /* ConstructorType */: + case 177 /* ClassStaticBlockDeclaration */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return 4 /* IsControlFlowContainer */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 301 /* CatchClause */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 272 /* CaseBlock */: + case 304 /* CatchClause */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 275 /* CaseBlock */: return 2 /* IsBlockScopedContainer */; - case 242 /* Block */: + case 244 /* Block */: return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */; } return 0 /* None */; @@ -43375,43 +43531,44 @@ function createBinder() { } function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 314 /* SourceFile */: + case 317 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 210 /* ObjectLiteralExpression */: - case 267 /* InterfaceDeclaration */: - case 295 /* JsxAttributes */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 212 /* ObjectLiteralExpression */: + case 270 /* InterfaceDeclaration */: + case 298 /* JsxAttributes */: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 332 /* JSDocSignature */: - case 181 /* IndexSignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 326 /* JSDocFunctionType */: - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 175 /* ClassStaticBlockDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 200 /* MappedType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 335 /* JSDocSignature */: + case 183 /* IndexSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 329 /* JSDocFunctionType */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 177 /* ClassStaticBlockDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 202 /* MappedType */: return declareSymbol(container.locals, void 0, node, symbolFlags, symbolExcludes); } } @@ -43497,10 +43654,10 @@ function createBinder() { } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (isExternalOrCommonJsModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -43690,7 +43847,7 @@ function createBinder() { } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2 /* ES2015 */) { - if (blockScopeContainer.kind !== 314 /* SourceFile */ && blockScopeContainer.kind !== 270 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { + if (blockScopeContainer.kind !== 317 /* SourceFile */ && blockScopeContainer.kind !== 273 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); file.bindDiagnostics.push(createFileDiagnostic( file, @@ -43757,7 +43914,7 @@ function createBinder() { node.tracingPath = file.path; const saveInStrictMode = inStrictMode; bindWorker(node); - if (node.kind > 164 /* LastToken */) { + if (node.kind > 165 /* LastToken */) { const saveParent = parent2; parent2 = node; const containerFlags = getContainerFlags(node); @@ -43819,23 +43976,23 @@ function createBinder() { break; } case 109 /* ThisKeyword */: - if (currentFlow && (isExpression(node) || parent2.kind === 306 /* ShorthandPropertyAssignment */)) { + if (currentFlow && (isExpression(node) || parent2.kind === 309 /* ShorthandPropertyAssignment */)) { node.flowNode = currentFlow; } return checkContextualIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: if (currentFlow && isPartOfTypeQuery(node)) { node.flowNode = currentFlow; } break; - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: case 107 /* SuperKeyword */: node.flowNode = currentFlow; break; case 80 /* PrivateIdentifier */: return checkPrivateIdentifier(node); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: const expr = node; if (currentFlow && isNarrowableReference(expr)) { expr.flowNode = currentFlow; @@ -43853,7 +44010,7 @@ function createBinder() { ); } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const specialKind = getAssignmentDeclarationKind(node); switch (specialKind) { case 1 /* ExportsProperty */: @@ -43888,79 +44045,80 @@ function createBinder() { Debug.fail("Unknown binary expression special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return checkStrictModeCatchClause(node); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); case 8 /* NumericLiteral */: return checkStrictModeNumericLiteral(node); - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return checkStrictModeWithStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return checkStrictModeLabeledStatement(node); - case 197 /* ThisType */: + case 199 /* ThisType */: seenThisKeyword = true; return; - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return bindTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return bindParameter(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return bindVariableDeclarationOrBindingElement(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: node.flowNode = currentFlow; return bindVariableDeclarationOrBindingElement(node); - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* OverloadPropertyDeclaration */: return bindPropertyWorker(node); - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 308 /* EnumMember */: + case 311 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return bindPropertyOrMethodOrAccessor( node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ ); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, 0 /* None */); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */); - case 184 /* FunctionType */: - case 326 /* JSDocFunctionType */: - case 332 /* JSDocSignature */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 329 /* JSDocFunctionType */: + case 335 /* JSDocSignature */: + case 187 /* ConstructorType */: return bindFunctionOrConstructorType(node); - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 200 /* MappedType */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 202 /* MappedType */: return bindAnonymousTypeWorker(node); - case 341 /* JSDocClassTag */: + case 344 /* JSDocClassTag */: return bindJSDocClassTag(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return bindFunctionExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: const assignmentKind = getAssignmentDeclarationKind(node); switch (assignmentKind) { case 7 /* ObjectDefinePropertyValue */: @@ -43978,61 +44136,63 @@ function createBinder() { bindCallExpression(node); } break; - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: inStrictMode = true; return bindClassLikeDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return bindAnnotationDeclaration(node); - case 267 /* InterfaceDeclaration */: + case 269 /* OverloadDeclaration */: + return bindOverloadDeclaration(node); + case 270 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return bindModuleDeclaration(node); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return bindJsxAttributes(node); - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 274 /* ImportEqualsDeclaration */: - case 277 /* NamespaceImport */: - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 277 /* ImportEqualsDeclaration */: + case 280 /* NamespaceImport */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return bindNamespaceExportDeclaration(node); - case 276 /* ImportClause */: + case 279 /* ImportClause */: return bindImportClause(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return bindExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return bindExportAssignment(node); - case 314 /* SourceFile */: + case 317 /* SourceFile */: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 242 /* Block */: + case 244 /* Block */: if (!isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) { return; } - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 349 /* JSDocParameterTag */: - if (node.parent.kind === 332 /* JSDocSignature */) { + case 352 /* JSDocParameterTag */: + if (node.parent.kind === 335 /* JSDocSignature */) { return bindParameter(node); } - if (node.parent.kind !== 331 /* JSDocTypeLiteral */) { + if (node.parent.kind !== 334 /* JSDocTypeLiteral */) { break; } - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: const propTag = node; - const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 325 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; + const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 328 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); } } @@ -44170,8 +44330,8 @@ function createBinder() { } const thisContainer = getThisContainer(node, false); switch (thisContainer.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: let constructorSymbol = thisContainer.symbol; if (isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 63 /* EqualsToken */) { const l = thisContainer.parent.left; @@ -44189,13 +44349,14 @@ function createBinder() { addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32 /* Class */); } break; - case 176 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 177 /* ClassStaticBlockDeclaration */: const containingClass = thisContainer.parent; const symbolTable = isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members; if (hasDynamicName(node)) { @@ -44204,7 +44365,7 @@ function createBinder() { declareSymbol(symbolTable, containingClass.symbol, node, 4 /* Property */ | 67108864 /* Assignment */, 0 /* None */, true); } break; - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (hasDynamicName(node)) { break; } else if (thisContainer.commonJsModuleIndicator) { @@ -44229,7 +44390,7 @@ function createBinder() { function bindSpecialPropertyDeclaration(node) { if (node.expression.kind === 109 /* ThisKeyword */) { bindThisPropertyAssignment(node); - } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 314 /* SourceFile */) { + } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 317 /* SourceFile */) { if (isPrototypeAccess(node.expression)) { bindPrototypePropertyAssignment(node, node.parent); } else { @@ -44259,7 +44420,7 @@ function createBinder() { } function bindObjectDefinePropertyAssignment(node) { let namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]); - const isToplevel = node.parent.parent.kind === 314 /* SourceFile */; + const isToplevel = node.parent.parent.kind === 317 /* SourceFile */; namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, node.arguments[0], isToplevel, false, false); bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, false); } @@ -44345,7 +44506,7 @@ function createBinder() { declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */); } function isTopLevelNamespaceAssignment(propertyAccess) { - return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 314 /* SourceFile */ : propertyAccess.parent.parent.kind === 314 /* SourceFile */; + return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 317 /* SourceFile */ : propertyAccess.parent.parent.kind === 317 /* SourceFile */; } function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) { let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer); @@ -44403,7 +44564,7 @@ function createBinder() { } } function bindClassLikeDeclaration(node) { - if (node.kind === 264 /* ClassDeclaration */ || node.kind === 265 /* StructDeclaration */) { + if (node.kind === 266 /* ClassDeclaration */ || node.kind === 267 /* StructDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); } else { const bindingName = node.name ? node.name.escapedText : "__class" /* Class */; @@ -44425,7 +44586,7 @@ function createBinder() { prototypeSymbol.parent = symbol; } function bindAnnotationDeclaration(node) { - Debug.assert(node.kind === 266 /* AnnotationDeclaration */); + Debug.assert(node.kind === 268 /* AnnotationDeclaration */); bindBlockScopedDeclaration(node, 32 /* Class */ | 268435456 /* Annotation */, 899503 /* ClassExcludes */); const { symbol } = node; const prototypeSymbol = createSymbol(4 /* Property */ | 4194304 /* Prototype */, "prototype"); @@ -44439,6 +44600,21 @@ function createBinder() { symbol.exports.set(prototypeSymbol.escapedName, prototypeSymbol); prototypeSymbol.parent = symbol; } + function bindOverloadDeclaration(node) { + Debug.assert(node.kind === 269 /* OverloadDeclaration */); + bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); + const { symbol } = node; + const prototypeSymbol = createSymbol(4 /* Property */ | 4194304 /* Prototype */, "prototype"); + const symbolExport = symbol.exports.get(prototypeSymbol.escapedName); + if (symbolExport) { + if (node.name) { + setParent(node.name, node); + } + file.bindDiagnostics.push(createDiagnosticForNode2(symbolExport.declarations[0], Diagnostics.Duplicate_identifier_0, symbolName(prototypeSymbol))); + } + symbol.exports.set(prototypeSymbol.escapedName, prototypeSymbol); + prototypeSymbol.parent = symbol; + } function bindEnumDeclaration(node) { return isEnumConst(node) ? bindBlockScopedDeclaration(node, 128 /* ConstEnum */, 899967 /* ConstEnumExcludes */) : bindBlockScopedDeclaration(node, 256 /* RegularEnum */, 899327 /* RegularEnumExcludes */); } @@ -44447,7 +44623,7 @@ function createBinder() { checkStrictModeEvalOrArguments(node, node.name); } if (!isBindingPattern(node.name)) { - const possibleVariableDecl = node.kind === 261 /* VariableDeclaration */ ? node : node.parent.parent; + const possibleVariableDecl = node.kind === 263 /* VariableDeclaration */ ? node : node.parent.parent; if (isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { @@ -44460,7 +44636,7 @@ function createBinder() { } } function bindParameter(node) { - if (node.kind === 349 /* JSDocParameterTag */ && container.kind !== 332 /* JSDocSignature */) { + if (node.kind === 352 /* JSDocParameterTag */ && container.kind !== 335 /* JSDocSignature */) { return; } if (inStrictMode && !(node.flags & 16777216 /* Ambient */)) { @@ -44527,7 +44703,7 @@ function createBinder() { } else { declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } - } else if (node.parent.kind === 195 /* InferType */) { + } else if (node.parent.kind === 197 /* InferType */) { const container2 = getInferTypeContainer(node.parent); if (container2) { if (!container2.locals) { @@ -44550,7 +44726,7 @@ function createBinder() { return false; } if (currentFlow === unreachableFlow) { - const reportError = isStatementButNotDeclaration(node) && node.kind !== 243 /* EmptyStatement */ || node.kind === 264 /* ClassDeclaration */ || node.kind === 270 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node); + const reportError = isStatementButNotDeclaration(node) && node.kind !== 245 /* EmptyStatement */ || node.kind === 266 /* ClassDeclaration */ || node.kind === 273 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node); if (reportError) { currentFlow = reportedUnreachableFlow; if (!options.allowUnreachableCode) { @@ -44576,12 +44752,12 @@ function isExecutableStatement(s) { } function isPurelyTypeDeclaration(s) { switch (s.kind) { - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return true; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return getModuleInstanceState(s) !== 1 /* Instantiated */; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return hasSyntacticModifier(s, 2048 /* Const */); default: return false; @@ -44763,7 +44939,7 @@ function createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignatu symbol.exports.forEach(visitSymbol); } forEach(symbol.declarations, (d) => { - if (d.type && d.type.kind === 186 /* TypeQuery */) { + if (d.type && d.type.kind === 188 /* TypeQuery */) { const query = d.type; const entity = getResolvedSymbol(getFirstIdentifier2(query.exprName)); visitSymbol(entity); @@ -46827,7 +47003,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks()); } function isGlobalSourceFile(node) { - return node.kind === 314 /* SourceFile */ && !isExternalOrCommonJsModule(node); + return node.kind === 317 /* SourceFile */ && !isExternalOrCommonJsModule(node); } function isValidFromLibs(symbol, node) { var _a2; @@ -46904,13 +47080,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile); } if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { - if (declaration.kind === 208 /* BindingElement */) { - const errorBindingElement = getAncestor(usage, 208 /* BindingElement */); + if (declaration.kind === 210 /* BindingElement */) { + const errorBindingElement = getAncestor(usage, 210 /* BindingElement */); if (errorBindingElement) { return findAncestor(errorBindingElement, isBindingElement) !== findAncestor(declaration, isBindingElement) || declaration.pos < errorBindingElement.pos; } - return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 261 /* VariableDeclaration */), usage); - } else if (declaration.kind === 261 /* VariableDeclaration */) { + return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 263 /* VariableDeclaration */), usage); + } else if (declaration.kind === 263 /* VariableDeclaration */) { return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } else if (isClassDeclaration(declaration)) { return !findAncestor(usage, (n) => isComputedPropertyName(n) && n.parent.parent === declaration); @@ -46921,10 +47097,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } return true; } - if (usage.parent.kind === 284 /* ExportSpecifier */ || usage.parent.kind === 280 /* ExportAssignment */ && usage.parent.isExportEquals) { + if (usage.parent.kind === 287 /* ExportSpecifier */ || usage.parent.kind === 283 /* ExportAssignment */ && usage.parent.isExportEquals) { return true; } - if (usage.kind === 280 /* ExportAssignment */ && usage.isExportEquals) { + if (usage.kind === 283 /* ExportAssignment */ && usage.isExportEquals) { return true; } if (!!(usage.flags & 8388608 /* JSDoc */) || isInTypeQuery(usage) || usageInTypeDeclaration()) { @@ -46943,9 +47119,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration2, usage2) { switch (declaration2.parent.parent.kind) { - case 244 /* VariableStatement */: - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: + case 246 /* VariableStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) { return true; } @@ -46970,7 +47146,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const initializerOfProperty = propertyDeclaration.initializer === current; if (initializerOfProperty) { if (isStatic(current.parent)) { - if (declaration2.kind === 174 /* MethodDeclaration */) { + if (declaration2.kind === 176 /* MethodDeclaration */) { return true; } if (isPropertyDeclaration(declaration2) && getContainingClass(usage2) === getContainingClass(declaration2)) { @@ -46984,7 +47160,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } else { - const isDeclarationInstanceProperty = declaration2.kind === 171 /* PropertyDeclaration */ && !isStatic(declaration2); + const isDeclarationInstanceProperty = declaration2.kind === 172 /* PropertyDeclaration */ && !isStatic(declaration2); if (!isDeclarationInstanceProperty || getContainingClass(usage2) !== getContainingClass(declaration2)) { return true; } @@ -47003,15 +47179,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return "quit"; } switch (node.kind) { - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return true; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return stopAtAnyPropertyDeclaration && (isPropertyDeclaration(declaration2) && node.parent === declaration2.parent || isParameterPropertyDeclaration(declaration2, declaration2.parent) && node.parent === declaration2.parent.parent) ? "quit" : true; - case 242 /* Block */: + case 244 /* Block */: switch (node.parent.kind) { - case 177 /* GetAccessor */: - case 174 /* MethodDeclaration */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 176 /* MethodDeclaration */: + case 180 /* SetAccessor */: return true; default: return false; @@ -47041,22 +47217,22 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function requiresScopeChangeWorker(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 176 /* Constructor */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 178 /* Constructor */: return false; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 305 /* PropertyAssignment */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 308 /* PropertyAssignment */: return requiresScopeChangeWorker(node.name); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (hasStaticModifier(node)) { return target < 99 /* ESNext */ || !useDefineForClassFields; } return requiresScopeChangeWorker(node.name); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return requiresScopeChangeWorker(node.name); default: if (isNullishCoalesce(node) || isOptionalChain(node)) { @@ -47098,17 +47274,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 329 /* JSDoc */) { - useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 168 /* Parameter */ || lastLocation.kind === 349 /* JSDocParameterTag */ || lastLocation.kind === 350 /* JSDocReturnTag */ || lastLocation.kind === 167 /* TypeParameter */ : false; + if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 332 /* JSDoc */) { + useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 169 /* Parameter */ || lastLocation.kind === 352 /* JSDocParameterTag */ || lastLocation.kind === 353 /* JSDocReturnTag */ || lastLocation.kind === 168 /* TypeParameter */ : false; } if (meaning & result.flags & 3 /* Variable */) { if (useOuterVariableScopeInParameter(result, location, lastLocation)) { useResult = false; } else if (result.flags & 1 /* FunctionScopedVariable */) { - useResult = lastLocation.kind === 168 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); + useResult = lastLocation.kind === 169 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); } } - } else if (location.kind === 194 /* ConditionalType */) { + } else if (location.kind === 196 /* ConditionalType */) { useResult = lastLocation === location.trueType; } if (useResult) { @@ -47120,13 +47296,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation); switch (location.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) break; isInExternalModule = true; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: const moduleExports = getSymbolOfNode(location) ? ((_a2 = getSymbolOfNode(location)) == null ? void 0 : _a2.exports) || emptySymbols : emptySymbols; - if (location.kind === 314 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location)) { + if (location.kind === 317 /* 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) { @@ -47135,7 +47311,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { result = void 0; } const moduleExport = moduleExports.get(name); - if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 284 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 283 /* NamespaceExport */))) { + if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 287 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 286 /* NamespaceExport */))) { break; } } @@ -47147,12 +47323,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: if (result = lookup(((_c = getSymbolOfNode(location)) == null ? void 0 : _c.exports) || emptySymbols, name, meaning & 8 /* EnumMember */)) { break loop; } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (!isStatic(location)) { const ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -47163,9 +47339,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: if (result = lookup(getSymbolOfNode(location).members || emptySymbols, name, meaning & 788968 /* Type */)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { result = void 0; @@ -47179,7 +47355,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } break loop; } - if (location.kind === 232 /* ClassExpression */ && meaning & 32 /* Class */) { + if (location.kind === 234 /* ClassExpression */ && meaning & 32 /* Class */) { const className = location.name; if (className && name === className.escapedText) { result = location.symbol; @@ -47187,7 +47363,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: if (lastLocation === location.expression && location.parent.token === 95 /* ExtendsKeyword */) { const container = location.parent.parent; if (isClassLike(container) && (result = lookup(getSymbolOfNode(container).members, name, meaning & 788968 /* Type */))) { @@ -47198,9 +47374,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (isClassLike(grandparent) || grandparent.kind === 267 /* InterfaceDeclaration */) { + if (isClassLike(grandparent) || grandparent.kind === 270 /* InterfaceDeclaration */) { if (result = lookup(getSymbolOfNode(grandparent).members, name, meaning & 788968 /* Type */)) { if (nameNotFoundMessage) { error(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); @@ -47209,21 +47385,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: if (getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */) { break; } - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -47236,37 +47412,37 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 169 /* Decorator */: - if (location.parent && location.parent.kind === 168 /* Parameter */) { + case 170 /* Decorator */: + if (location.parent && location.parent.kind === 169 /* Parameter */) { location = location.parent; } - if (location.parent && (isClassElement(location.parent) || location.parent.kind === 264 /* ClassDeclaration */)) { + if (location.parent && (isClassElement(location.parent) || location.parent.kind === 266 /* ClassDeclaration */)) { location = location.parent; } break; - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: const root = getJSDocRoot(location); if (root) { location = root.parent; } break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (!associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 208 /* BindingElement */: + case 210 /* BindingElement */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (isParameterDeclaration(location) && !associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 195 /* InferType */: + case 197 /* InferType */: if (meaning & 262144 /* TypeParameter */) { const parameterName = location.typeParameter.name; if (parameterName && name === parameterName.escapedText) { @@ -47287,7 +47463,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (!result) { if (lastLocation) { - Debug.assert(lastLocation.kind === 314 /* SourceFile */); + Debug.assert(lastLocation.kind === 317 /* SourceFile */); if (lastLocation.commonJsModuleIndicator && name === "exports" && meaning & lastLocation.symbol.flags) { return lastLocation.symbol; } @@ -47384,7 +47560,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 284 /* ExportSpecifier */ ? 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 === 287 /* ExportSpecifier */ ? 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), @@ -47404,14 +47580,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { diagnostic, createDiagnosticForNode( typeOnlyDeclaration, - typeOnlyDeclaration.kind === 284 /* ExportSpecifier */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, + typeOnlyDeclaration.kind === 287 /* ExportSpecifier */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, unescapedName ) ); } function getIsDeferredContext(location, lastLocation) { - if (location.kind !== 219 /* ArrowFunction */ && location.kind !== 218 /* FunctionExpression */) { - return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 171 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); + if (location.kind !== 221 /* ArrowFunction */ && location.kind !== 220 /* FunctionExpression */) { + return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 172 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); } if (lastLocation && lastLocation === location.name) { return false; @@ -47423,12 +47599,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isSelfReferenceLocation(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 270 /* ModuleDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 273 /* ModuleDeclaration */: return true; default: return false; @@ -47440,7 +47616,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isTypeParameterSymbolDeclaredInContainer(symbol, container) { if (symbol.declarations) { for (const decl of symbol.declarations) { - if (decl.kind === 167 /* TypeParameter */) { + if (decl.kind === 168 /* TypeParameter */) { const parent2 = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent; if (parent2 === container) { return !(isJSDocTemplateTag(decl.parent) && find(decl.parent.parent.tags, isJSDocTypeAlias)); @@ -47490,9 +47666,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getEntityNameForExtendingInterface(node) { switch (node.kind) { case 79 /* Identifier */: - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : void 0; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: if (isEntityNameExpression(node.expression)) { return node.expression; } @@ -47540,7 +47716,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; } function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { - if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 284 /* ExportSpecifier */) { + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 287 /* ExportSpecifier */) { error(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); return true; } @@ -47629,7 +47805,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const declaration = (_a2 = result.declarations) == null ? void 0 : _a2.find( - (d) => isBlockOrCatchScoped(d) || isClassLike(d) || isAnnotationDeclaration(d) || d.kind === 269 /* EnumDeclaration */ + (d) => isBlockOrCatchScoped(d) || isClassLike(d) || isAnnotationDeclaration(d) || d.kind === 272 /* EnumDeclaration */ ); if (declaration === void 0) return Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration"); @@ -47663,13 +47839,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getAnyImportSyntax(node) { switch (node.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return node; - case 276 /* ImportClause */: + case 279 /* ImportClause */: return node.parent; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return node.parent.parent; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return node.parent.parent.parent; default: return void 0; @@ -47679,7 +47855,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration2); } function isAliasSymbolDeclaration2(node) { - return node.kind === 274 /* ImportEqualsDeclaration */ || node.kind === 273 /* NamespaceExportDeclaration */ || node.kind === 276 /* ImportClause */ && !!node.name || node.kind === 277 /* NamespaceImport */ || node.kind === 283 /* NamespaceExport */ || node.kind === 279 /* ImportSpecifier */ || node.kind === 284 /* ExportSpecifier */ || node.kind === 280 /* 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 === 306 /* ShorthandPropertyAssignment */ || node.kind === 305 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 261 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 208 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); + return node.kind === 277 /* ImportEqualsDeclaration */ || node.kind === 276 /* NamespaceExportDeclaration */ || node.kind === 279 /* ImportClause */ && !!node.name || node.kind === 280 /* NamespaceImport */ || node.kind === 286 /* NamespaceExport */ || node.kind === 282 /* ImportSpecifier */ || node.kind === 287 /* ExportSpecifier */ || node.kind === 283 /* 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 === 309 /* ShorthandPropertyAssignment */ || node.kind === 308 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 263 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 210 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); } function isAliasableOrJsExpression(e) { return isAliasableExpression(e) || isFunctionExpression(e) && isJSConstructor(e); @@ -47690,7 +47866,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 286 /* ExternalModuleReference */) { + if (isVariableDeclaration(node) || node.moduleReference.kind === 289 /* ExternalModuleReference */) { const immediate = resolveExternalModuleName( node, getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node) @@ -47706,7 +47882,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) { if (markSymbolOfAliasDeclarationIfTypeOnly(node, void 0, resolved, false) && !node.isTypeOnly) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node)); - const isExport = typeOnlyDeclaration.kind === 284 /* ExportSpecifier */; + const isExport = typeOnlyDeclaration.kind === 287 /* ExportSpecifier */; 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 = unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); @@ -47808,15 +47984,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getModuleSpecifierForImportOrExport(node) { switch (node.kind) { - case 276 /* ImportClause */: + case 279 /* ImportClause */: return node.parent.moduleSpecifier; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : void 0; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return node.parent.parent.moduleSpecifier; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return node.parent.parent.parent.moduleSpecifier; - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: return node.parent.parent.moduleSpecifier; default: return Debug.assertNever(node); @@ -48061,31 +48237,31 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve = false) { switch (node.kind) { - case 274 /* ImportEqualsDeclaration */: - case 261 /* VariableDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 263 /* VariableDeclaration */: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 276 /* ImportClause */: + case 279 /* ImportClause */: return getTargetOfImportClause(node, dontRecursivelyResolve); - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: return getTargetOfNamespaceExport(node, dontRecursivelyResolve); - case 279 /* ImportSpecifier */: - case 208 /* BindingElement */: + case 282 /* ImportSpecifier */: + case 210 /* BindingElement */: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: return getTargetOfExportSpecifier(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve); - case 280 /* ExportAssignment */: - case 227 /* BinaryExpression */: + case 283 /* ExportAssignment */: + case 229 /* BinaryExpression */: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return resolveEntityName(node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, true, dontRecursivelyResolve); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return getTargetOfAliasLikeExpression(node.initializer, dontRecursivelyResolve); - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: return getTargetOfAccessExpression(node, dontRecursivelyResolve); default: return Debug.fail(); @@ -48216,10 +48392,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (entityName.kind === 79 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 79 /* Identifier */ || entityName.parent.kind === 165 /* QualifiedName */) { + if (entityName.kind === 79 /* Identifier */ || entityName.parent.kind === 166 /* QualifiedName */) { return resolveEntityName(entityName, 1920 /* Namespace */, false, dontResolveAlias); } else { - Debug.assert(entityName.parent.kind === 274 /* ImportEqualsDeclaration */); + Debug.assert(entityName.parent.kind === 277 /* ImportEqualsDeclaration */); return resolveEntityName(entityName, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, false, dontResolveAlias); } } @@ -48279,9 +48455,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!symbol) { return getMergedSymbol(symbolFromJSPrototype); } - } else if (name.kind === 165 /* QualifiedName */ || name.kind === 211 /* PropertyAccessExpression */) { - const left = name.kind === 165 /* QualifiedName */ ? name.left : name.expression; - const right = name.kind === 165 /* QualifiedName */ ? name.right : name.name; + } else if (name.kind === 166 /* QualifiedName */ || name.kind === 213 /* PropertyAccessExpression */) { + const left = name.kind === 166 /* QualifiedName */ ? name.left : name.expression; + const right = name.kind === 166 /* QualifiedName */ ? name.right : name.name; let namespace = resolveEntityName(left, namespaceMeaning, ignoreErrors, false, location); if (!namespace || nodeIsMissing(right)) { return void 0; @@ -48338,7 +48514,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 280 /* ExportAssignment */)) { + if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 283 /* ExportAssignment */)) { markSymbolOfAliasDeclarationIfTypeOnly(getAliasDeclarationFromName(name), symbol, void 0, true); } return symbol.flags & meaning || dontResolveAlias ? symbol : resolveAlias(symbol); @@ -48641,7 +48817,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { var _a2; const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias); if (!dontResolveAlias && symbol) { - if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 314 /* SourceFile */)) { + if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 317 /* 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; @@ -48959,7 +49135,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function findConstructorDeclaration(node) { const members = node.members; for (const member of members) { - if (member.kind === 176 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 178 /* Constructor */ && nodeIsPresent(member.body)) { return member; } } @@ -49069,19 +49245,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } switch (location.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) { break; } - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: const sym = getSymbolOfNode(location); if (result = callback((sym == null ? void 0 : sym.exports) || emptySymbols, void 0, true, location)) { return result; } break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: let table; (getSymbolOfNode(location).members || emptySymbols).forEach((memberSymbol, key) => { if (memberSymbol.flags & (788968 /* Type */ & ~67108864 /* Assignment */)) { @@ -49137,7 +49313,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 284 /* 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, 287 /* ExportSpecifier */))) { const resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); const candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification); if (candidate) { @@ -49173,7 +49349,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (symbolFromSymbolTable === symbol) { return true; } - const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 284 /* ExportSpecifier */); + const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 287 /* ExportSpecifier */); symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; const flags = shouldResolveAlias ? getAllSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; if (flags & meaning) { @@ -49188,10 +49364,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (symbol.declarations && symbol.declarations.length) { for (const declaration of symbol.declarations) { switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: continue; default: return false; @@ -49290,10 +49466,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return node && getSymbolOfNode(node); } function hasExternalModuleSymbol(declaration) { - return isAmbientModule(declaration) || declaration.kind === 314 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isAmbientModule(declaration) || declaration.kind === 317 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasNonGlobalAugmentationExternalModuleSymbol(declaration) { - return isModuleWithStringLiteralName(declaration) || declaration.kind === 314 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isModuleWithStringLiteralName(declaration) || declaration.kind === 317 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { let aliasesToMakeVisible; @@ -49339,9 +49515,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isEntityNameVisible(entityName, enclosingDeclaration) { let meaning; - if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 234 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 166 /* ComputedPropertyName */) { + if (entityName.parent.kind === 188 /* TypeQuery */ || entityName.parent.kind === 236 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; - } else if (entityName.kind === 165 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 274 /* ImportEqualsDeclaration */) { + } else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 213 /* PropertyAccessExpression */ || entityName.parent.kind === 277 /* ImportEqualsDeclaration */) { meaning = 1920 /* Namespace */; } else { meaning = 788968 /* Type */; @@ -49381,7 +49557,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker); function symbolToStringWorker(writer2) { const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); - const printer3 = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 314 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); + const printer3 = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 317 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); printer3.writeNode(4 /* Unspecified */, entity, sourceFile, writer2); return writer2; @@ -49392,9 +49568,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function signatureToStringWorker(writer2) { let sigOutput; if (flags & 262144 /* WriteArrowStyleSignature */) { - sigOutput = kind === 1 /* Construct */ ? 185 /* ConstructorType */ : 184 /* FunctionType */; + sigOutput = kind === 1 /* Construct */ ? 187 /* ConstructorType */ : 186 /* FunctionType */; } else { - sigOutput = kind === 1 /* Construct */ ? 180 /* ConstructSignature */ : 179 /* CallSignature */; + sigOutput = kind === 1 /* Construct */ ? 182 /* ConstructSignature */ : 181 /* CallSignature */; } const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */); const printer3 = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); @@ -49888,7 +50064,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function shouldWriteTypeOfFunctionSymbol() { var _a3; const isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */) && some(symbol.declarations, (declaration) => isStatic(declaration)); - const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || forEach(symbol.declarations, (declaration) => declaration.parent.kind === 314 /* SourceFile */ || declaration.parent.kind === 271 /* ModuleBlock */)); + const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || forEach(symbol.declarations, (declaration) => declaration.parent.kind === 317 /* SourceFile */ || declaration.parent.kind === 274 /* ModuleBlock */)); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a3 = context.visitedTypes) == null ? void 0 : _a3.has(typeId))) && (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration)); } @@ -49967,12 +50143,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { const signature = resolved.callSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 184 /* FunctionType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 186 /* FunctionType */, context); return signatureNode; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { const signature = resolved.constructSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 185 /* ConstructorType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 187 /* ConstructorType */, context); return signatureNode; } } @@ -50140,12 +50316,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const typeElements = []; for (const signature of resolvedType.callSignatures) { - typeElements.push(signatureToSignatureDeclarationHelper(signature, 179 /* CallSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 181 /* CallSignature */, context)); } for (const signature of resolvedType.constructSignatures) { if (signature.flags & 4 /* Abstract */) continue; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 180 /* ConstructSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 182 /* ConstructSignature */, context)); } for (const info of resolvedType.indexInfos) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0)); @@ -50217,7 +50393,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 173 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); + const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 175 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); typeElements.push(preserveCommentsOn(methodDeclaration)); } } else { @@ -50248,8 +50424,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function preserveCommentsOn(node) { var _a3; - if (some(propertySymbol.declarations, (d) => d.kind === 356 /* JSDocPropertyTag */)) { - const d = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d2) => d2.kind === 356 /* JSDocPropertyTag */); + if (some(propertySymbol.declarations, (d) => d.kind === 359 /* JSDocPropertyTag */)) { + const d = (_a3 = propertySymbol.declarations) == null ? void 0 : _a3.find((d2) => d2.kind === 359 /* 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 }]); @@ -50352,7 +50528,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { typeParameters = signature.typeParameters && signature.typeParameters.map((parameter) => typeParameterToDeclaration(parameter, context)); } const expandedParams = getExpandedParameters(signature, true)[0]; - const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 176 /* 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 === 178 /* 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); @@ -50373,11 +50549,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } let modifiers = options == null ? void 0 : options.modifiers; - if (kind === 185 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { + if (kind === 187 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { const flags = modifiersToFlags(modifiers); modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */); } - const node = kind === 179 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 180 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_a2 = options == null ? void 0 : options.name) != null ? _a2 : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 174 /* MethodDeclaration */ ? factory.createMethodDeclaration(modifiers, void 0, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), void 0, typeParameters, parameters, returnTypeNode, void 0) : kind === 176 /* Constructor */ ? factory.createConstructorDeclaration(modifiers, parameters, void 0) : kind === 177 /* GetAccessor */ ? factory.createGetAccessorDeclaration(modifiers, (_c = options == null ? void 0 : options.name) != null ? _c : factory.createIdentifier(""), parameters, returnTypeNode, void 0) : kind === 178 /* SetAccessor */ ? factory.createSetAccessorDeclaration(modifiers, (_d = options == null ? void 0 : options.name) != null ? _d : factory.createIdentifier(""), parameters, void 0) : kind === 181 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 326 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 184 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 185 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 263 /* FunctionDeclaration */ ? factory.createFunctionDeclaration(modifiers, void 0, (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, void 0) : kind === 218 /* FunctionExpression */ ? factory.createFunctionExpression(modifiers, void 0, (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, factory.createBlock([])) : kind === 219 /* ArrowFunction */ ? factory.createArrowFunction(modifiers, typeParameters, parameters, returnTypeNode, void 0, factory.createBlock([])) : Debug.assertNever(kind); + const node = kind === 181 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 182 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 175 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (_a2 = options == null ? void 0 : options.name) != null ? _a2 : factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 176 /* MethodDeclaration */ ? factory.createMethodDeclaration(modifiers, void 0, (_b = options == null ? void 0 : options.name) != null ? _b : factory.createIdentifier(""), void 0, typeParameters, parameters, returnTypeNode, void 0) : kind === 178 /* Constructor */ ? factory.createConstructorDeclaration(modifiers, parameters, void 0) : kind === 179 /* GetAccessor */ ? factory.createGetAccessorDeclaration(modifiers, (_c = options == null ? void 0 : options.name) != null ? _c : factory.createIdentifier(""), parameters, returnTypeNode, void 0) : kind === 180 /* SetAccessor */ ? factory.createSetAccessorDeclaration(modifiers, (_d = options == null ? void 0 : options.name) != null ? _d : factory.createIdentifier(""), parameters, void 0) : kind === 183 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 329 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 186 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 187 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode != null ? returnTypeNode : factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 265 /* FunctionDeclaration */ ? factory.createFunctionDeclaration(modifiers, void 0, (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, void 0) : kind === 220 /* FunctionExpression */ ? factory.createFunctionExpression(modifiers, void 0, (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, factory.createBlock([])) : kind === 221 /* ArrowFunction */ ? factory.createArrowFunction(modifiers, typeParameters, parameters, returnTypeNode, void 0, factory.createBlock([])) : Debug.assertNever(kind); if (typeArguments) { node.typeArguments = factory.createNodeArray(typeArguments); } @@ -50415,9 +50591,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return typeParameterToDeclarationWithConstraint(type, context, constraintNode); } function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { - let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 168 /* Parameter */); + let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */); if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = getDeclarationOfKind(parameterSymbol, 349 /* JSDocParameterTag */); + parameterDeclaration = getDeclarationOfKind(parameterSymbol, 352 /* JSDocParameterTag */); } let parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -50427,7 +50603,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 165 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); + const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 79 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* 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( @@ -50575,11 +50751,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) { var _a2; - let file = getDeclarationOfKind(symbol, 314 /* SourceFile */); + let file = getDeclarationOfKind(symbol, 317 /* SourceFile */); if (!file) { const equivalentFileSymbol = firstDefined(symbol.declarations, (d) => getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol)); if (equivalentFileSymbol) { - file = getDeclarationOfKind(equivalentFileSymbol, 314 /* SourceFile */); + file = getDeclarationOfKind(equivalentFileSymbol, 317 /* SourceFile */); } } if (file && file.moduleName !== void 0) { @@ -51019,7 +51195,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } return transformed === existing ? setTextRange(factory.cloneNode(existing), existing) : transformed; function visitExistingNodeTreeSymbols(node) { - if (isJSDocAllType(node) || node.kind === 328 /* JSDocNamepathType */) { + if (isJSDocAllType(node) || node.kind === 331 /* JSDocNamepathType */) { return factory.createKeywordTypeNode(132 /* AnyKeyword */); } if (isJSDocUnknownType(node)) { @@ -51159,8 +51335,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function symbolTableToDeclarationStatements(symbolTable, context, bundled) { - const serializePropertySymbolForClass = makeSerializePropertySymbol(factory.createPropertyDeclaration, 174 /* MethodDeclaration */, true); - const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol((mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), 173 /* MethodSignature */, false); + const serializePropertySymbolForClass = makeSerializePropertySymbol(factory.createPropertyDeclaration, 176 /* MethodDeclaration */, true); + const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol((mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), 175 /* MethodSignature */, false); const enclosingDeclaration = context.enclosingDeclaration; let results = []; const visitedSymbols = new Set2(); @@ -51534,8 +51710,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 179 /* CallSignature */); - const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 180 /* ConstructSignature */); + const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 181 /* CallSignature */); + const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 182 /* ConstructSignature */); const indexSignatures = serializeIndexSignatures(interfaceType, baseType); const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(95 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; addResult(factory.createInterfaceDeclaration( @@ -51603,7 +51779,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { const signatures = getSignaturesOfType(type, 0 /* Call */); for (const sig of signatures) { - const decl = signatureToSignatureDeclarationHelper(sig, 263 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); + const decl = signatureToSignatureDeclarationHelper(sig, 265 /* 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)) { @@ -51738,7 +51914,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { (p) => serializePropertySymbolForClass(p, true, staticBaseType) ); const isNonConstructableClassLikeInJsFile = !isClass && !!symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && !some(getSignaturesOfType(staticType, 1 /* Construct */)); - const constructors = isNonConstructableClassLikeInJsFile ? [factory.createConstructorDeclaration(factory.createModifiersFromModifierFlags(8 /* Private */), [], void 0)] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 176 /* Constructor */); + const constructors = isNonConstructableClassLikeInJsFile ? [factory.createConstructorDeclaration(factory.createModifiersFromModifierFlags(8 /* Private */), [], void 0)] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 178 /* Constructor */); const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); context.enclosingDeclaration = oldEnclosing; addResult(setTextRange(factory.createClassDeclaration( @@ -51785,8 +51961,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const targetName = getInternalSymbolName(target, verbatimTargetName); includePrivateSymbol(target); switch (node.kind) { - case 208 /* BindingElement */: - if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 261 /* VariableDeclaration */) { + case 210 /* BindingElement */: + if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 263 /* VariableDeclaration */) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; addResult(factory.createImportDeclaration( @@ -51802,15 +51978,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { break; } Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); - case 306 /* ShorthandPropertyAssignment */: - if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 227 /* BinaryExpression */) { + case 309 /* ShorthandPropertyAssignment */: + if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 229 /* BinaryExpression */) { serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), targetName ); } break; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: if (isPropertyAccessExpression(node.initializer)) { const initializer = node.initializer; const uniqueName = factory.createUniqueName(localName); @@ -51829,7 +52005,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { ), modifierFlags); break; } - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, isJsonSourceFile)) { serializeMaybeAliasAssignment(symbol); break; @@ -51842,10 +52018,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { isLocalImport ? symbolToName(target, context, 67108863 /* All */, false) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) ), isLocalImport ? modifierFlags : 0 /* None */); break; - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); break; - case 276 /* ImportClause */: + case 279 /* ImportClause */: addResult(factory.createImportDeclaration( void 0, factory.createImportClause(false, factory.createIdentifier(localName), void 0), @@ -51853,7 +52029,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { void 0 ), 0 /* None */); break; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: addResult(factory.createImportDeclaration( void 0, factory.createImportClause(false, void 0, factory.createNamespaceImport(factory.createIdentifier(localName))), @@ -51861,7 +52037,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { void 0 ), 0 /* None */); break; - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: addResult(factory.createExportDeclaration( void 0, false, @@ -51869,7 +52045,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) ), 0 /* None */); break; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: addResult(factory.createImportDeclaration( void 0, factory.createImportClause( @@ -51887,7 +52063,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { void 0 ), 0 /* None */); break; - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: const specifier = node.parent.parent.moduleSpecifier; serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), @@ -51895,12 +52071,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { specifier && isStringLiteralLike(specifier) ? factory.createStringLiteral(specifier.text) : void 0 ); break; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: serializeMaybeAliasAssignment(symbol); break; - case 227 /* BinaryExpression */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 229 /* BinaryExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: if (symbol.escapedName === "default" /* Default */ || symbol.escapedName === "export=" /* ExportEquals */) { serializeMaybeAliasAssignment(symbol); } else { @@ -52276,17 +52452,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getTypeAliasForTypeLiteral(type) { if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */ && type.symbol.declarations) { const node = walkUpParenthesizedTypes(type.symbol.declarations[0].parent); - if (node.kind === 268 /* TypeAliasDeclaration */) { + if (node.kind === 271 /* TypeAliasDeclaration */) { return getSymbolOfNode(node); } } return void 0; } function isTopLevelInExternalModuleAugmentation(node) { - return node && node.parent && node.parent.kind === 271 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); + return node && node.parent && node.parent.kind === 274 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); } function isDefaultBindingContext(location) { - return location.kind === 314 /* SourceFile */ || isAmbientModule(location); + return location.kind === 317 /* SourceFile */ || isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { const nameType = getSymbolLinks(symbol).nameType; @@ -52331,17 +52507,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!declaration) { declaration = symbol.declarations[0]; } - if (declaration.parent && declaration.parent.kind === 261 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 263 /* VariableDeclaration */) { return declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: if (context && !context.encounteredError && !(context.flags & 131072 /* AllowAnonymousIdentifier */)) { context.encounteredError = true; } - return declaration.kind === 232 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; + return declaration.kind === 234 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; } } const name = getNameOfSymbolFromNameType(symbol, context); @@ -52358,68 +52534,68 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: - case 348 /* JSDocEnumTag */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: + case 351 /* JSDocEnumTag */: return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent)); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: if (isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 263 /* FunctionDeclaration */: - case 269 /* EnumDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 266 /* AnnotationDeclaration */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 265 /* FunctionDeclaration */: + case 272 /* EnumDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 268 /* AnnotationDeclaration */: if (isExternalModuleAugmentation(node)) { return true; } const parent2 = getDeclarationContainer(node); - if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 274 /* ImportEqualsDeclaration */ && parent2.kind !== 314 /* SourceFile */ && parent2.flags & 16777216 /* Ambient */)) { + if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 277 /* ImportEqualsDeclaration */ && parent2.kind !== 317 /* SourceFile */ && parent2.flags & 16777216 /* Ambient */)) { return isGlobalSourceFile(parent2); } return isDeclarationVisible(parent2); - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) { return false; } - case 176 /* Constructor */: - case 180 /* ConstructSignature */: - case 179 /* CallSignature */: - case 181 /* IndexSignature */: - case 168 /* Parameter */: - case 271 /* ModuleBlock */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 187 /* TypeLiteral */: - case 183 /* TypeReference */: - case 188 /* ArrayType */: - case 189 /* TupleType */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: + case 178 /* Constructor */: + case 182 /* ConstructSignature */: + case 181 /* CallSignature */: + case 183 /* IndexSignature */: + case 169 /* Parameter */: + case 274 /* ModuleBlock */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 189 /* TypeLiteral */: + case 185 /* TypeReference */: + case 190 /* ArrayType */: + case 191 /* TupleType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: + case 198 /* ParenthesizedType */: + case 204 /* NamedTupleMember */: return isDeclarationVisible(node.parent); - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: - case 279 /* ImportSpecifier */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: + case 282 /* ImportSpecifier */: return false; - case 167 /* TypeParameter */: - case 314 /* SourceFile */: - case 273 /* NamespaceExportDeclaration */: + case 168 /* TypeParameter */: + case 317 /* SourceFile */: + case 276 /* NamespaceExportDeclaration */: return true; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return false; default: return false; @@ -52428,9 +52604,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function collectLinkedAliases(node, setVisibility) { let exportSymbol; - if (node.parent && node.parent.kind === 280 /* ExportAssignment */) { + if (node.parent && node.parent.kind === 283 /* ExportAssignment */) { exportSymbol = resolveName(node, node.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, void 0, node, false); - } else if (node.parent.kind === 284 /* ExportSpecifier */) { + } else if (node.parent.kind === 287 /* ExportSpecifier */) { exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); } let result; @@ -52525,12 +52701,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getDeclarationContainer(node) { return findAncestor(getRootDeclaration(node), (node2) => { switch (node2.kind) { - case 261 /* VariableDeclaration */: - case 262 /* VariableDeclarationList */: - case 279 /* ImportSpecifier */: - case 278 /* NamedImports */: - case 277 /* NamespaceImport */: - case 276 /* ImportClause */: + case 263 /* VariableDeclaration */: + case 264 /* VariableDeclarationList */: + case 282 /* ImportSpecifier */: + case 281 /* NamedImports */: + case 280 /* NamespaceImport */: + case 279 /* ImportClause */: return false; default: return true; @@ -52634,23 +52810,23 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getParentElementAccess(node) { const ancestor = node.parent.parent; switch (ancestor.kind) { - case 208 /* BindingElement */: - case 305 /* PropertyAssignment */: + case 210 /* BindingElement */: + case 308 /* PropertyAssignment */: return getSyntheticElementAccess(ancestor); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return getSyntheticElementAccess(node.parent); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return ancestor.initializer; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return ancestor.right; } } function getDestructuringPropertyName(node) { const parent2 = node.parent; - if (node.kind === 208 /* BindingElement */ && parent2.kind === 206 /* ObjectBindingPattern */) { + if (node.kind === 210 /* BindingElement */ && parent2.kind === 208 /* ObjectBindingPattern */) { return getLiteralPropertyNameText(node.propertyName || node.name); } - if (node.kind === 305 /* PropertyAssignment */ || node.kind === 306 /* ShorthandPropertyAssignment */) { + if (node.kind === 308 /* PropertyAssignment */ || node.kind === 309 /* ShorthandPropertyAssignment */) { return getLiteralPropertyNameText(node.name); } return "" + parent2.elements.indexOf(node); @@ -52675,7 +52851,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); } let type; - if (pattern.kind === 206 /* ObjectBindingPattern */) { + if (pattern.kind === 208 /* ObjectBindingPattern */) { if (declaration.dotDotDotToken) { parentType = getReducedType(parentType); if (parentType.flags & 2 /* Unknown */ || !isValidSpreadType(parentType)) { @@ -52730,17 +52906,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isEmptyArrayLiteral2(node) { const expr = skipParentheses(node, true); - return expr.kind === 209 /* ArrayLiteralExpression */ && expr.elements.length === 0; + return expr.kind === 211 /* 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 === 250 /* ForInStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 252 /* ForInStatement */) { const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression(declaration.parent.parent.expression, checkMode))); return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType; } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 251 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 253 /* ForOfStatement */) { const forOfStatement = declaration.parent.parent; return checkRightHandSideOfForOf(forOfStatement) || anyType; } @@ -52763,8 +52939,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (isParameter(declaration)) { const func = declaration.parent; - if (func.kind === 178 /* SetAccessor */ && hasBindableName(func)) { - const getter = getDeclarationOfKind(getSymbolOfNode(declaration.parent), 177 /* GetAccessor */); + if (func.kind === 180 /* SetAccessor */ && hasBindableName(func)) { + const getter = getDeclarationOfKind(getSymbolOfNode(declaration.parent), 179 /* GetAccessor */); if (getter) { const getterSignature = getSignatureFromDeclaration(getter); const thisParameter = getAccessorThisParameter(func); @@ -52817,7 +52993,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 212 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration(void 0, declaration, symbol, declaration)); + links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 214 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration(void 0, declaration, symbol, declaration)); } return links.isConstructorDeclaredProperty; } @@ -52833,7 +53009,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } for (const declaration of symbol.declarations) { const container = getThisContainer(declaration, false); - if (container && (container.kind === 176 /* Constructor */ || isJSConstructor(container))) { + if (container && (container.kind === 178 /* Constructor */ || isJSConstructor(container))) { return container; } } @@ -53095,7 +53271,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isDeclarationInConstructor(expression) { const thisContainer = getThisContainer(expression, false); - return thisContainer.kind === 176 /* Constructor */ || thisContainer.kind === 263 /* FunctionDeclaration */ || thisContainer.kind === 218 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); + return thisContainer.kind === 178 /* Constructor */ || thisContainer.kind === 265 /* FunctionDeclaration */ || thisContainer.kind === 220 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); } function getConstructorDefinedThisAssignmentTypes(types, declarations) { Debug.assert(types.length === declarations.length); @@ -53151,7 +53327,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2) { const elements = pattern.elements; const lastElement = lastOrUndefined(elements); - const restElement = lastElement && lastElement.kind === 208 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; + const restElement = lastElement && lastElement.kind === 210 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; if (elements.length === 0 || elements.length === 1 && restElement) { return languageVersion >= 2 /* ES2015 */ ? createIterableType(anyType) : anyArrayType; } @@ -53167,7 +53343,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return result; } function getTypeFromBindingPattern(pattern, includePatternInType = false, reportErrors2 = false) { - return pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); + return pattern.kind === 208 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors2) { return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration(declaration, true, 0 /* Normal */), declaration, reportErrors2); @@ -53200,7 +53376,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function declarationBelongsToPrivateAmbientMember(declaration) { const root = getRootDeclaration(declaration); - const memberDeclaration = root.kind === 168 /* Parameter */ ? root.parent : root; + const memberDeclaration = root.kind === 169 /* Parameter */ ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function tryGetTypeFromEffectiveTypeNode(node) { @@ -53268,7 +53444,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return reportCircularityError(symbol); } let type; - if (declaration.kind === 280 /* ExportAssignment */) { + if (declaration.kind === 283 /* 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); @@ -53285,7 +53461,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { type = tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionForMutableLocation(declaration.name, 0 /* Normal */); } else if (isObjectLiteralMethod(declaration)) { type = tryGetTypeFromEffectiveTypeNode(declaration) || checkObjectLiteralMethod(declaration, 0 /* Normal */); - } else if (isParameter(declaration) || isPropertyDeclaration(declaration) || isPropertySignature(declaration) || isAnnotationPropertyDeclaration(declaration) || isVariableDeclaration(declaration) || isBindingElement(declaration) || isJSDocPropertyLikeTag(declaration)) { + } else if (isParameter(declaration) || isPropertyDeclaration(declaration) || isPropertySignature(declaration) || isAnnotationPropertyDeclaration(declaration) || isVariableDeclaration(declaration) || isBindingElement(declaration) || isOverloadPropertyDeclaration(declaration) || isJSDocPropertyLikeTag(declaration)) { type = getWidenedTypeForVariableLikeDeclaration(declaration, true); } else if (isEnumDeclaration(declaration)) { type = getTypeOfFuncClassEnumModule(symbol); @@ -53305,13 +53481,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getAnnotatedAccessorTypeNode(accessor) { if (accessor) { switch (accessor.kind) { - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: const getterTypeAnnotation = getEffectiveReturnTypeNode(accessor); return getterTypeAnnotation; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: const setterTypeAnnotation = getEffectiveSetAccessorTypeAnnotationNode(accessor); return setterTypeAnnotation; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: Debug.assert(hasAccessorModifier(accessor)); const accessorTypeAnnotation = getEffectiveTypeAnnotationNode(accessor); return accessorTypeAnnotation; @@ -53336,9 +53512,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!pushTypeResolution(symbol, 0 /* Type */)) { return errorType; } - const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); - const accessor = tryCast(getDeclarationOfKind(symbol, 171 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const getter = getDeclarationOfKind(symbol, 179 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 180 /* SetAccessor */); + const accessor = tryCast(getDeclarationOfKind(symbol, 172 /* 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, true); if (!type) { if (setter && !isPrivateWithinAmbient(setter)) { @@ -53373,7 +53549,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!pushTypeResolution(symbol, 8 /* WriteType */)) { return errorType; } - const setter = (_a2 = getDeclarationOfKind(symbol, 178 /* SetAccessor */)) != null ? _a2 : tryCast(getDeclarationOfKind(symbol, 171 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const setter = (_a2 = getDeclarationOfKind(symbol, 180 /* SetAccessor */)) != null ? _a2 : tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let writeType = getAnnotatedAccessorType(setter); if (!popTypeResolution()) { if (getAnnotatedAccessorTypeNode(setter)) { @@ -53408,7 +53584,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const declaration = symbol.valueDeclaration; if (symbol.flags & 1536 /* Module */ && isShorthandAmbientModuleSymbol(symbol)) { return anyType; - } else if (declaration && (declaration.kind === 227 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 227 /* BinaryExpression */)) { + } else if (declaration && (declaration.kind === 229 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 229 /* BinaryExpression */)) { return getWidenedTypeForAssignmentDeclaration(symbol); } else if (symbol.flags & 512 /* ValueModule */ && declaration && isSourceFile(declaration) && declaration.commonJsModuleIndicator) { const resolvedModule = resolveExternalModuleSymbol(symbol); @@ -53464,7 +53640,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { ); return errorType; } - if (noImplicitAny && (declaration.kind !== 168 /* Parameter */ || declaration.initializer)) { + if (noImplicitAny && (declaration.kind !== 169 /* 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, @@ -53575,43 +53751,43 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return void 0; } switch (node.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 326 /* JSDocFunctionType */: - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 268 /* TypeAliasDeclaration */: - case 353 /* JSDocTemplateTag */: - case 354 /* JSDocTypedefTag */: - case 348 /* JSDocEnumTag */: - case 347 /* JSDocCallbackTag */: - case 200 /* MappedType */: - case 194 /* ConditionalType */: { + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 175 /* MethodSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 329 /* JSDocFunctionType */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 271 /* TypeAliasDeclaration */: + case 356 /* JSDocTemplateTag */: + case 357 /* JSDocTypedefTag */: + case 351 /* JSDocEnumTag */: + case 350 /* JSDocCallbackTag */: + case 202 /* MappedType */: + case 196 /* ConditionalType */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); - if (node.kind === 200 /* MappedType */) { + if (node.kind === 202 /* MappedType */) { return append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfNode(node.typeParameter))); - } else if (node.kind === 194 /* ConditionalType */) { + } else if (node.kind === 196 /* ConditionalType */) { return concatenate(outerTypeParameters, getInferTypeParameters(node)); } const outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, getEffectiveTypeParameterDeclarations(node)); - const thisType = includeThisTypes && (node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */ || node.kind === 267 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType; + const thisType = includeThisTypes && (node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */ || node.kind === 270 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType; return thisType ? append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters; } - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: const paramSymbol = getParameterSymbolFromJSDoc(node); if (paramSymbol) { node = paramSymbol.valueDeclaration; } break; - case 329 /* JSDoc */: { + case 332 /* JSDoc */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); return node.tags ? appendTypeParameters(outerTypeParameters, flatMap(node.tags, (t) => isJSDocTemplateTag(t) ? t.typeParameters : void 0)) : outerTypeParameters; } @@ -53619,7 +53795,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getOuterTypeParametersOfClassOrInterface(symbol) { - const declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : getDeclarationOfKind(symbol, 267 /* InterfaceDeclaration */); + const declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : getDeclarationOfKind(symbol, 270 /* InterfaceDeclaration */); Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); } @@ -53629,7 +53805,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let result; for (const node of symbol.declarations) { - if (node.kind === 267 /* InterfaceDeclaration */ || node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { + if (node.kind === 270 /* InterfaceDeclaration */ || node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { const declaration = node; result = appendTypeParameters(result, getEffectiveTypeParameterDeclarations(declaration)); } @@ -53762,7 +53938,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (!popTypeResolution() && type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 264 /* ClassDeclaration */ || declaration.kind === 267 /* InterfaceDeclaration */) { + if (declaration.kind === 266 /* ClassDeclaration */ || declaration.kind === 270 /* InterfaceDeclaration */) { reportCircularBaseType(declaration, type); } } @@ -53845,7 +54021,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; if (type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 267 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 270 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { for (const node of getInterfaceBaseTypeNodes(declaration)) { const baseType = getReducedType(getTypeFromTypeNode(node)); if (!isErrorType(baseType)) { @@ -53873,7 +54049,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; } for (const declaration of symbol.declarations) { - if (declaration.kind === 267 /* InterfaceDeclaration */) { + if (declaration.kind === 270 /* InterfaceDeclaration */) { if (declaration.flags & 128 /* ContainsThis */) { return false; } @@ -53939,7 +54115,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } else { type = errorType; - if (declaration.kind === 348 /* JSDocEnumTag */) { + if (declaration.kind === 351 /* 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)); @@ -53952,7 +54128,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isStringConcatExpression(expr) { if (isStringLiteralLike(expr)) { return true; - } else if (expr.kind === 227 /* BinaryExpression */) { + } else if (expr.kind === 229 /* BinaryExpression */) { return isStringConcatExpression(expr.left) && isStringConcatExpression(expr.right); } return false; @@ -53967,11 +54143,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 8 /* NumericLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return true; - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; case 79 /* Identifier */: return nodeIsMissing(expr) || !!getSymbolOfNode(member.parent).exports.get(expr.escapedText); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isStringConcatExpression(expr); default: return false; @@ -53985,7 +54161,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let hasNonLiteralMember = false; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 269 /* EnumDeclaration */) { + if (declaration.kind === 272 /* EnumDeclaration */) { for (const member of declaration.members) { if (member.initializer && isStringLiteralLike(member.initializer)) { return links.enumKind = 1 /* Literal */; @@ -54012,7 +54188,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const memberTypeList = []; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 269 /* EnumDeclaration */) { + if (declaration.kind === 272 /* EnumDeclaration */) { for (const member of declaration.members) { const value = getEnumMemberValue(member); const memberType = getFreshTypeOfLiteralType(getEnumLiteralType(value !== void 0 ? value : 0, enumCount, getSymbolOfNode(member))); @@ -54090,11 +54266,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 115 /* VoidKeyword */: case 157 /* UndefinedKeyword */: case 145 /* NeverKeyword */: - case 201 /* LiteralType */: + case 203 /* LiteralType */: return true; - case 188 /* ArrayType */: + case 190 /* ArrayType */: return isThislessType(node.elementType); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return !node.typeArguments || node.typeArguments.every(isThislessType); } return false; @@ -54110,21 +54286,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isThislessFunctionLikeDeclaration(node) { const returnType = getEffectiveReturnTypeNode(node); const typeParameters = getEffectiveTypeParameterDeclarations(node); - return (node.kind === 176 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); + return (node.kind === 178 /* 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 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return isThislessVariableLikeDeclaration(declaration); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return isThislessFunctionLikeDeclaration(declaration); } } @@ -54989,7 +55165,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isMappedTypeWithKeyofConstraintDeclaration(type) { const constraintDeclaration = getConstraintDeclarationForMappedType(type); - return constraintDeclaration.kind === 198 /* TypeOperator */ && constraintDeclaration.operator === 142 /* KeyOfKeyword */; + return constraintDeclaration.kind === 200 /* TypeOperator */ && constraintDeclaration.operator === 142 /* KeyOfKeyword */; } function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { @@ -55716,7 +55892,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return result; } function isJSDocOptionalParameter(node) { - return isInJSFile(node) && (node.type && node.type.kind === 325 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 325 /* JSDocOptionalType */)); + return isInJSFile(node) && (node.type && node.type.kind === 328 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 328 /* JSDocOptionalType */)); } function tryFindAmbientModule(moduleName, withAugmentations) { if (isExternalModuleNameRelative(moduleName)) { @@ -55749,7 +55925,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } const { isBracketed, typeExpression } = node; - return isBracketed || !!typeExpression && typeExpression.type.kind === 325 /* JSDocOptionalType */; + return isBracketed || !!typeExpression && typeExpression.type.kind === 328 /* JSDocOptionalType */; } function createTypePredicate(kind, parameterName, parameterIndex, type) { return { kind, parameterName, parameterIndex, type }; @@ -55817,7 +55993,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { parameters.push(paramSymbol); } - if (type && type.kind === 201 /* LiteralType */) { + if (type && type.kind === 203 /* LiteralType */) { flags |= 2 /* HasLiteralTypes */; } const isOptionalParameter2 = isOptionalJSDocPropertyLikeTag(param) || param.initializer || param.questionToken || isRestParameter(param) || iife && parameters.length > iife.arguments.length && !type || isJSDocOptionalParameter(param); @@ -55825,14 +56001,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { minArgumentCount = parameters.length; } } - if ((declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { - const otherKind = declaration.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; + if ((declaration.kind === 179 /* GetAccessor */ || declaration.kind === 180 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { + const otherKind = declaration.kind === 179 /* GetAccessor */ ? 180 /* SetAccessor */ : 179 /* GetAccessor */; const other = getDeclarationOfKind(getSymbolOfNode(declaration), otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); } } - const classType = declaration.kind === 176 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0; + const classType = declaration.kind === 178 /* 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 */; @@ -55908,15 +56084,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (node.kind) { case 79 /* Identifier */: return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol; - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return node.name.kind === 166 /* ComputedPropertyName */ && traverse(node.name); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + return node.name.kind === 167 /* ComputedPropertyName */ && traverse(node.name); + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return traverse(node.expression); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return traverse(node.initializer); default: return !nodeStartsNewLexicalEnvironment(node) && !isPartOfTypeNode(node) && !!forEachChild(node, traverse); @@ -55983,7 +56159,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function createTypePredicateFromTypePredicateNode(node, signature) { const parameterName = node.parameterName; const type = node.type && getTypeFromTypeNode(node.type); - return parameterName.kind === 197 /* ThisType */ ? createTypePredicate(node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, void 0, void 0, type) : createTypePredicate( + return parameterName.kind === 199 /* ThisType */ ? createTypePredicate(node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, void 0, void 0, type) : createTypePredicate( node.assertsModifier ? 3 /* AssertsIdentifier */ : 1 /* Identifier */, parameterName.escapedText, findIndex(signature.parameters, (p) => p.escapedName === parameterName.escapedText), @@ -56026,7 +56202,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return signature.resolvedReturnType; } function getReturnTypeFromAnnotation(declaration) { - if (declaration.kind === 176 /* Constructor */) { + if (declaration.kind === 178 /* Constructor */) { return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)); } if (isJSDocConstructSignature(declaration)) { @@ -56036,12 +56212,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (typeNode) { return getTypeFromTypeNode(typeNode); } - if (declaration.kind === 177 /* GetAccessor */ && hasBindableName(declaration)) { + if (declaration.kind === 179 /* GetAccessor */ && hasBindableName(declaration)) { const jsDocType = isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration); if (jsDocType) { return jsDocType; } - const setter = getDeclarationOfKind(getSymbolOfNode(declaration), 178 /* SetAccessor */); + const setter = getDeclarationOfKind(getSymbolOfNode(declaration), 180 /* SetAccessor */); const setterType = getAnnotatedAccessorType(setter); if (setterType) { return setterType; @@ -56129,7 +56305,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { var _a2; if (!signature.isolatedSignatureType) { const kind = (_a2 = signature.declaration) == null ? void 0 : _a2.kind; - const isConstructor = kind === void 0 || kind === 176 /* Constructor */ || kind === 180 /* ConstructSignature */ || kind === 185 /* ConstructorType */; + const isConstructor = kind === void 0 || kind === 178 /* Constructor */ || kind === 182 /* ConstructSignature */ || kind === 187 /* ConstructorType */; const type = createObjectType(16 /* Anonymous */); type.members = emptySymbols; type.properties = emptyArray; @@ -56188,9 +56364,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let inferences; if ((_a2 = typeParameter.symbol) == null ? void 0 : _a2.declarations) { for (const declaration of typeParameter.symbol.declarations) { - if (declaration.parent.kind === 195 /* InferType */) { + if (declaration.parent.kind === 197 /* InferType */) { const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent); - if (grandParent.kind === 183 /* TypeReference */ && !omitTypeReferences) { + if (grandParent.kind === 185 /* TypeReference */ && !omitTypeReferences) { const typeReference = grandParent; const typeParameters = getTypeParametersForTypeReference(typeReference); if (typeParameters) { @@ -56208,13 +56384,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - } else if (grandParent.kind === 168 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 191 /* RestType */ || grandParent.kind === 202 /* NamedTupleMember */ && grandParent.dotDotDotToken) { + } else if (grandParent.kind === 169 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 193 /* RestType */ || grandParent.kind === 204 /* NamedTupleMember */ && grandParent.dotDotDotToken) { inferences = append(inferences, createArrayType(unknownType)); - } else if (grandParent.kind === 204 /* TemplateLiteralTypeSpan */) { + } else if (grandParent.kind === 206 /* TemplateLiteralTypeSpan */) { inferences = append(inferences, stringType); - } else if (grandParent.kind === 167 /* TypeParameter */ && grandParent.parent.kind === 200 /* MappedType */) { + } else if (grandParent.kind === 168 /* TypeParameter */ && grandParent.parent.kind === 202 /* MappedType */) { inferences = append(inferences, keyofConstraintType); - } else if (grandParent.kind === 200 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 194 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 200 /* MappedType */ && grandParent.parent.checkType.type) { + } else if (grandParent.kind === 202 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 196 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 202 /* MappedType */ && grandParent.parent.checkType.type) { const checkMappedType2 = grandParent.parent.checkType; const nodeType = getTypeFromTypeNode(checkMappedType2.type); inferences = append(inferences, instantiateType( @@ -56239,7 +56415,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { let type = getTypeFromTypeNode(constraintDeclaration); if (type.flags & 1 /* Any */ && !isErrorType(type)) { - type = constraintDeclaration.parent.parent.kind === 200 /* MappedType */ ? keyofConstraintType : unknownType; + type = constraintDeclaration.parent.parent.kind === 202 /* MappedType */ ? keyofConstraintType : unknownType; } typeParameter.constraint = type; } @@ -56248,7 +56424,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return typeParameter.constraint === noConstraintType ? void 0 : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - const tp = getDeclarationOfKind(typeParameter.symbol, 167 /* TypeParameter */); + const tp = getDeclarationOfKind(typeParameter.symbol, 168 /* TypeParameter */); const host2 = isJSDocTemplateTag(tp.parent) ? getEffectiveContainerForJSDocTemplateTag(tp.parent) : tp.parent; return host2 && getSymbolOfNode(host2); } @@ -56328,7 +56504,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return ((_a2 = type.target.localTypeParameters) == null ? void 0 : _a2.map(() => errorType)) || emptyArray; } const node = type.node; - const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const typeArguments = !node ? emptyArray : node.kind === 185 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 190 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); if (popTypeResolution()) { type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; } else { @@ -56362,7 +56538,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return errorType; } } - if (node.kind === 183 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { + if (node.kind === 185 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference(type, node, void 0); } const typeArguments = concatenate(type.outerTypeParameters, fillMissingTypeArguments(typeArgumentsFromTypeReferenceNode(node), typeParameters, minTypeArgumentCount, isJs)); @@ -56430,9 +56606,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTypeReferenceName(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return node.typeName; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: const expr = node.expression; if (isEntityNameExpression(expr)) { return expr; @@ -56444,10 +56620,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return symbol.parent ? `${getSymbolPath(symbol.parent)}.${symbol.escapedName}` : symbol.escapedName; } function getUnresolvedSymbolForEntityName(name) { - const identifier = name.kind === 165 /* QualifiedName */ ? name.right : name.kind === 211 /* PropertyAccessExpression */ ? name.name : name; + const identifier = name.kind === 166 /* QualifiedName */ ? name.right : name.kind === 213 /* PropertyAccessExpression */ ? name.name : name; const text = identifier.escapedText; if (text) { - const parentSymbol = name.kind === 165 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 211 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; + const parentSymbol = name.kind === 166 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 213 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; const path = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text; let result = unresolvedSymbols.get(path); if (!result) { @@ -56499,7 +56675,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const valueType = getTypeOfSymbol(symbol); let typeType = valueType; if (symbol.valueDeclaration) { - const isImportTypeWithQualifier = node.kind === 205 /* ImportType */ && node.qualifier; + const isImportTypeWithQualifier = node.kind === 207 /* ImportType */ && node.qualifier; if (valueType.symbol && valueType.symbol !== symbol && isImportTypeWithQualifier) { typeType = getTypeReferenceType(node, valueType.symbol); } @@ -56527,7 +56703,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getIntersectionType([substitutionType.constraint, substitutionType.baseType]); } function isUnaryTupleTypeNode(node) { - return node.kind === 189 /* TupleType */ && node.elements.length === 1; + return node.kind === 191 /* 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; @@ -56535,17 +56711,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getConditionalFlowTypeOfType(type, node) { let constraints; let covariant = true; - while (node && !isStatement(node) && node.kind !== 329 /* JSDoc */) { + while (node && !isStatement(node) && node.kind !== 332 /* JSDoc */) { const parent2 = node.parent; - if (parent2.kind === 168 /* Parameter */) { + if (parent2.kind === 169 /* Parameter */) { covariant = !covariant; } - if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 194 /* ConditionalType */ && node === parent2.trueType) { + if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 196 /* 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 === 200 /* MappedType */ && node === parent2.type) { + } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 202 /* MappedType */ && node === parent2.type) { const mappedType = getTypeFromTypeNode(parent2); if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) { const typeParameter = getHomomorphicTypeVariable(mappedType); @@ -56562,7 +56738,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return constraints ? getSubstitutionType(type, getIntersectionType(constraints)) : type; } function isJSDocTypeReference(node) { - return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 183 /* TypeReference */ || node.kind === 205 /* ImportType */); + return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 185 /* TypeReference */ || node.kind === 207 /* ImportType */); } function checkNoTypeArguments(node, symbol) { if (node.typeArguments) { @@ -56668,9 +56844,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (declarations) { for (const declaration of declarations) { switch (declaration.kind) { - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: return declaration; } } @@ -56831,11 +57007,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTupleElementFlags(node) { switch (node.kind) { - case 190 /* OptionalType */: + case 192 /* OptionalType */: return 2 /* Optional */; - case 191 /* RestType */: + case 193 /* RestType */: return getRestTypeElementFlags(node); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return node.questionToken ? 2 /* Optional */ : node.dotDotDotToken ? getRestTypeElementFlags(node) : 1 /* Required */; default: return 1 /* Required */; @@ -56851,55 +57027,55 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return readonly ? globalReadonlyArrayType : globalArrayType; } const elementFlags = map(node.elements, getTupleElementFlags); - const missingName = some(node.elements, (e) => e.kind !== 202 /* NamedTupleMember */); + const missingName = some(node.elements, (e) => e.kind !== 204 /* NamedTupleMember */); return getTupleTargetType(elementFlags, readonly, missingName ? void 0 : node.elements); } function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { - return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 188 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 189 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 190 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 191 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); } function isResolvedByTypeAlias(node) { const parent2 = node.parent; switch (parent2.kind) { - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: - case 183 /* TypeReference */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 199 /* IndexedAccessType */: - case 194 /* ConditionalType */: - case 198 /* TypeOperator */: - case 188 /* ArrayType */: - case 189 /* TupleType */: + case 198 /* ParenthesizedType */: + case 204 /* NamedTupleMember */: + case 185 /* TypeReference */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: + case 201 /* IndexedAccessType */: + case 196 /* ConditionalType */: + case 200 /* TypeOperator */: + case 190 /* ArrayType */: + case 191 /* TupleType */: return isResolvedByTypeAlias(parent2); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return true; } return false; } function mayResolveTypeAlias(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node, 788968 /* Type */).flags & 524288 /* TypeAlias */); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return true; - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return node.operator !== 158 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); - case 196 /* ParenthesizedType */: - case 190 /* OptionalType */: - case 202 /* NamedTupleMember */: - case 325 /* JSDocOptionalType */: - case 323 /* JSDocNullableType */: - case 324 /* JSDocNonNullableType */: - case 318 /* JSDocTypeExpression */: + case 198 /* ParenthesizedType */: + case 192 /* OptionalType */: + case 204 /* NamedTupleMember */: + case 328 /* JSDocOptionalType */: + case 326 /* JSDocNullableType */: + case 327 /* JSDocNonNullableType */: + case 321 /* JSDocTypeExpression */: return mayResolveTypeAlias(node.type); - case 191 /* RestType */: - return node.type.kind !== 188 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 193 /* RestType */: + return node.type.kind !== 190 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 194 /* UnionType */: + case 195 /* IntersectionType */: return some(node.types, mayResolveTypeAlias); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); } return false; @@ -56910,10 +57086,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const target = getArrayOrTupleTargetType(node); if (target === emptyGenericType) { links.resolvedType = emptyObjectType; - } else if (!(node.kind === 189 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { - links.resolvedType = node.kind === 189 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference(target, node, void 0); + } else if (!(node.kind === 191 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { + links.resolvedType = node.kind === 191 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference(target, node, void 0); } else { - const elementTypes = node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const elementTypes = node.kind === 190 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); links.resolvedType = createNormalizedTypeReference(target, elementTypes); } } @@ -57894,7 +58070,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) { var _a2; - const accessExpression = accessNode && accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode : void 0; + const accessExpression = accessNode && accessNode.kind === 214 /* ElementAccessExpression */ ? accessNode : void 0; const propName = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode); if (propName !== void 0) { if (accessFlags & 256 /* Contextual */) { @@ -58062,7 +58238,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getIndexNodeForAccessExpression(accessNode) { - return accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 199 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 166 /* ComputedPropertyName */ ? accessNode.expression : accessNode; + return accessNode.kind === 214 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 201 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 167 /* ComputedPropertyName */ ? accessNode.expression : accessNode; } function isPatternLiteralPlaceholderType(type) { return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type); @@ -58193,7 +58369,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */) accessFlags |= 1 /* IncludeUndefined */; - if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 199 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) { + if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 201 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) { if (objectType.flags & 3 /* AnyOrUnknown */) { return objectType; } @@ -58733,7 +58909,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getThisType(node) { const container = getThisContainer(node, false); const parent2 = container && container.parent; - if (parent2 && (isClassLike(parent2) || parent2.kind === 267 /* InterfaceDeclaration */)) { + if (parent2 && (isClassLike(parent2) || parent2.kind === 270 /* InterfaceDeclaration */)) { if (!isStatic(container) && (!isConstructorDeclaration(container) || isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent2)).thisType; } @@ -58763,17 +58939,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getArrayElementTypeNode(node) { switch (node.kind) { - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return getArrayElementTypeNode(node.type); - case 189 /* TupleType */: + case 191 /* TupleType */: if (node.elements.length === 1) { node = node.elements[0]; - if (node.kind === 191 /* RestType */ || node.kind === 202 /* NamedTupleMember */ && node.dotDotDotToken) { + if (node.kind === 193 /* RestType */ || node.kind === 204 /* NamedTupleMember */ && node.dotDotDotToken) { return getArrayElementTypeNode(node.type); } } break; - case 188 /* ArrayType */: + case 190 /* ArrayType */: return node.elementType; } return void 0; @@ -58788,8 +58964,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getTypeFromTypeNodeWorker(node) { switch (node.kind) { case 132 /* AnyKeyword */: - case 321 /* JSDocAllType */: - case 322 /* JSDocUnknownType */: + case 324 /* JSDocAllType */: + case 325 /* JSDocUnknownType */: return anyType; case 159 /* UnknownKeyword */: return unknownType; @@ -58815,66 +58991,66 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return node.flags & 262144 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; case 140 /* IntrinsicKeyword */: return intrinsicMarkerType; - case 197 /* ThisType */: + case 199 /* ThisType */: case 109 /* ThisKeyword */: return getTypeFromThisTypeNode(node); - case 201 /* LiteralType */: + case 203 /* LiteralType */: return getTypeFromLiteralTypeNode(node); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return getTypeFromTypeReference(node); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return node.assertsModifier ? voidType : booleanType; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 188 /* ArrayType */: - case 189 /* TupleType */: + case 190 /* ArrayType */: + case 191 /* TupleType */: return getTypeFromArrayOrTupleTypeNode(node); - case 190 /* OptionalType */: + case 192 /* OptionalType */: return getTypeFromOptionalTypeNode(node); - case 192 /* UnionType */: + case 194 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 323 /* JSDocNullableType */: + case 326 /* JSDocNullableType */: return getTypeFromJSDocNullableTypeNode(node); - case 325 /* JSDocOptionalType */: + case 328 /* JSDocOptionalType */: return addOptionality(getTypeFromTypeNode(node.type)); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return getTypeFromNamedTupleTypeNode(node); - case 196 /* ParenthesizedType */: - case 324 /* JSDocNonNullableType */: - case 318 /* JSDocTypeExpression */: + case 198 /* ParenthesizedType */: + case 327 /* JSDocNonNullableType */: + case 321 /* JSDocTypeExpression */: return getTypeFromTypeNode(node.type); - case 191 /* RestType */: + case 193 /* RestType */: return getTypeFromRestTypeNode(node); - case 327 /* JSDocVariadicType */: + case 330 /* JSDocVariadicType */: return getTypeFromJSDocVariadicType(node); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 326 /* JSDocFunctionType */: - case 332 /* JSDocSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 329 /* JSDocFunctionType */: + case 335 /* JSDocSignature */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return getTypeFromTypeOperatorNode(node); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return getTypeFromIndexedAccessTypeNode(node); - case 200 /* MappedType */: + case 202 /* MappedType */: return getTypeFromMappedTypeNode(node); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return getTypeFromConditionalTypeNode(node); - case 195 /* InferType */: + case 197 /* InferType */: return getTypeFromInferTypeNode(node); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: return getTypeFromTemplateTypeNode(node); - case 205 /* ImportType */: + case 207 /* ImportType */: return getTypeFromImportTypeNode(node); case 79 /* Identifier */: - case 165 /* QualifiedName */: - case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: const symbol = getSymbolAtLocation(node); return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType; default: @@ -59069,13 +59245,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return type; } function maybeTypeParameterReference(node) { - return !(node.parent.kind === 183 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 205 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); + return !(node.parent.kind === 185 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 207 /* 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 === 242 /* Block */ || n.kind === 194 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { + if (!n || n.kind === 244 /* Block */ || n.kind === 196 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { return true; } } @@ -59084,17 +59260,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; function containsReference(node2) { switch (node2.kind) { - case 197 /* ThisType */: + case 199 /* ThisType */: return !!tp.isThisType; case 79 /* Identifier */: return !tp.isThisType && isPartOfTypeNode(node2) && maybeTypeParameterReference(node2) && getTypeFromTypeNodeWorker(node2) === tp; - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: const entityName = node2.exprName; const firstIdentifier = getFirstIdentifier(entityName); const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier); const tpDeclaration = tp.symbol.declarations[0]; let tpScope; - if (tpDeclaration.kind === 167 /* TypeParameter */) { + if (tpDeclaration.kind === 168 /* TypeParameter */) { tpScope = tpDeclaration.parent; } else if (tp.isThisType) { tpScope = tpDeclaration; @@ -59105,8 +59281,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return some(firstIdentifierSymbol.declarations, (idDecl) => isNodeDescendantOf(idDecl, tpScope)) || some(node2.typeArguments, containsReference); } return true; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return !node2.type && !!node2.body || some(node2.typeParameters, containsReference) || some(node2.parameters, containsReference) || !!node2.type && containsReference(node2.type); } return !!forEachChild(node2, containsReference); @@ -59337,32 +59513,32 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration); } function isContextSensitive(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 176 /* MethodDeclaration */ || isObjectLiteralMethod(node)); switch (node.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 263 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: return isContextSensitiveFunctionLikeDeclaration(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return some(node.properties, isContextSensitive); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return some(node.elements, isContextSensitive); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return (node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return isContextSensitive(node.expression); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive); - case 294 /* JsxAttribute */: { + case 297 /* JsxAttribute */: { const { initializer } = node; return !!initializer && isContextSensitive(initializer); } - case 297 /* JsxExpression */: { + case 300 /* JsxExpression */: { const { expression } = node; return !!expression && isContextSensitive(expression); } @@ -59373,7 +59549,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node); } function hasContextSensitiveReturnExpression(node) { - return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 242 /* Block */ && isContextSensitive(node.body); + return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 244 /* Block */ && isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { return (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func); @@ -59446,23 +59622,23 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; } switch (node.kind) { - case 297 /* JsxExpression */: - case 217 /* ParenthesizedExpression */: + case 300 /* JsxExpression */: + case 219 /* ParenthesizedExpression */: return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 27 /* CommaToken */: return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); } break; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer); } return false; @@ -59636,16 +59812,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) { switch (child.kind) { - case 297 /* JsxExpression */: + case 300 /* 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 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: return { errorNode: child, innerExpression: child, nameType }; default: return Debug.assertNever(child, "Found invalid jsx child"); @@ -59771,13 +59947,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue; } switch (prop.kind) { - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: - case 174 /* MethodDeclaration */: - case 306 /* ShorthandPropertyAssignment */: + case 180 /* SetAccessor */: + case 179 /* GetAccessor */: + case 176 /* MethodDeclaration */: + case 309 /* ShorthandPropertyAssignment */: yield { errorNode: prop.name, innerExpression: void 0, nameType: type }; break; - case 305 /* PropertyAssignment */: + case 308 /* 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: @@ -59831,7 +60007,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); } const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 174 /* MethodDeclaration */ && kind !== 173 /* MethodSignature */ && kind !== 176 /* Constructor */; + const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 176 /* MethodDeclaration */ && kind !== 175 /* MethodSignature */ && kind !== 178 /* Constructor */; let result = -1 /* True */; const sourceThisType = getThisTypeOfSignature(source); if (sourceThisType && sourceThisType !== voidType) { @@ -61679,7 +61855,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const sourceSignature = first(sourceSignatures); const targetSignature = first(targetSignatures); result2 = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors2, incompatibleReporter(sourceSignature, targetSignature)); - if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 176 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 176 /* Constructor */)) { + if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a3 = targetSignature.declaration) == null ? void 0 : _a3.kind) === 178 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 178 /* Constructor */)) { const constructSignatureToString = (signature) => signatureToString(signature, void 0, 262144 /* WriteArrowStyleSignature */, kind); reportError(Diagnostics.Type_0_is_not_assignable_to_type_1, constructSignatureToString(sourceSignature), constructSignatureToString(targetSignature)); reportError(Diagnostics.Types_of_construct_signatures_are_incompatible); @@ -62297,7 +62473,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const target = type.target; if (getObjectFlags(target) & 1 /* Class */) { const baseTypeNode = getBaseTypeNodeOfClass(target); - if (baseTypeNode && baseTypeNode.expression.kind !== 79 /* Identifier */ && baseTypeNode.expression.kind !== 211 /* PropertyAccessExpression */) { + if (baseTypeNode && baseTypeNode.expression.kind !== 79 /* Identifier */ && baseTypeNode.expression.kind !== 213 /* PropertyAccessExpression */) { return void 0; } } @@ -62664,12 +62840,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let diagnostic; switch (declaration.kind) { - case 227 /* BinaryExpression */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 229 /* BinaryExpression */: + case 172 /* PropertyDeclaration */: + case 171 /* 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 168 /* Parameter */: + case 169 /* Parameter */: const param = declaration; if (isIdentifier(param.name) && (isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && (resolveName(param, param.name.escapedText, 788968 /* Type */, void 0, param.name.escapedText, true) || param.name.originalKeywordKind && isTypeNodeKind(param.name.originalKeywordKind))) { const newName = "arg" + param.parent.parameters.indexOf(param); @@ -62679,22 +62855,22 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } 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 208 /* BindingElement */: + case 210 /* BindingElement */: diagnostic = Diagnostics.Binding_element_0_implicitly_has_an_1_type; if (!noImplicitAny) { return; } break; - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 221 /* 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); @@ -62705,7 +62881,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } 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 200 /* MappedType */: + case 202 /* MappedType */: if (noImplicitAny) { error(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); } @@ -62802,7 +62978,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function inferFromIntraExpressionSites(context) { if (context.intraExpressionInferenceSites) { for (const { node, type } of context.intraExpressionInferenceSites) { - const contextualType = node.kind === 174 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); + const contextualType = node.kind === 176 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); if (contextualType) { inferTypes(context.inferences, type, contextualType); } @@ -62854,8 +63030,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isNonGenericTopLevelType(type) { if (type.aliasSymbol && !type.aliasTypeArguments) { - const declaration = getDeclarationOfKind(type.aliasSymbol, 268 /* TypeAliasDeclaration */); - return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 314 /* SourceFile */ ? true : n.kind === 270 /* ModuleDeclaration */ ? false : "quit")); + const declaration = getDeclarationOfKind(type.aliasSymbol, 271 /* TypeAliasDeclaration */); + return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 317 /* SourceFile */ ? true : n.kind === 273 /* ModuleDeclaration */ ? false : "quit")); } return false; } @@ -63600,7 +63776,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function inferFromSignature(source, target) { const saveBivariant = bivariant; const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - bivariant = bivariant || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 176 /* Constructor */; + bivariant = bivariant || kind === 176 /* MethodDeclaration */ || kind === 175 /* MethodSignature */ || kind === 178 /* Constructor */; applyToParameterTypes(source, target, inferFromContravariantTypesIfStrictFunctionTypes); bivariant = saveBivariant; applyToReturnTypes(source, target, inferFromTypes); @@ -63756,7 +63932,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; } default: - if (node.parent.kind === 306 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 309 /* 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; @@ -63781,7 +63957,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isInTypeQuery(node) { return !!findAncestor( node, - (n) => n.kind === 186 /* TypeQuery */ ? true : n.kind === 79 /* Identifier */ || n.kind === 165 /* QualifiedName */ ? false : "quit" + (n) => n.kind === 188 /* TypeQuery */ ? true : n.kind === 79 /* Identifier */ || n.kind === 166 /* QualifiedName */ ? false : "quit" ); } function getFlowCacheKey(node, declaredType, initialType, flowContainer) { @@ -63793,59 +63969,59 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } case 109 /* ThisKeyword */: return `0|${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`; - case 236 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: const left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer); return left && left + "." + node.right.escapedText; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: const propName = getAccessedPropertyName(node); if (propName !== void 0) { const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); return key && key + "." + propName; } break; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: return `${getNodeId(node)}#${getTypeId(declaredType)}`; } return void 0; } function isMatchingReference(source, target) { switch (target.kind) { - case 217 /* ParenthesizedExpression */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: return isMatchingReference(source, target.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression(target) && target.operatorToken.kind === 27 /* CommaToken */ && isMatchingReference(source, target.right); } switch (source.kind) { - case 237 /* MetaProperty */: - return target.kind === 237 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; + case 239 /* MetaProperty */: + return target.kind === 239 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - return isThisInTypeQuery(source) ? target.kind === 109 /* ThisKeyword */ : target.kind === 79 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (target.kind === 261 /* VariableDeclaration */ || target.kind === 208 /* BindingElement */) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target); + return isThisInTypeQuery(source) ? target.kind === 109 /* ThisKeyword */ : target.kind === 79 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (target.kind === 263 /* VariableDeclaration */ || target.kind === 210 /* BindingElement */) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target); case 109 /* ThisKeyword */: return target.kind === 109 /* ThisKeyword */; case 107 /* SuperKeyword */: return target.kind === 107 /* SuperKeyword */; - case 236 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: return isMatchingReference(source.expression, target); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* 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 165 /* QualifiedName */: + case 166 /* QualifiedName */: return isAccessExpression(target) && source.right.escapedText === getAccessedPropertyName(target) && isMatchingReference(source.left, target.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isBinaryExpression(source) && source.operatorToken.kind === 27 /* CommaToken */ && isMatchingReference(source.right, target); } return false; @@ -63995,7 +64171,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getMatchingUnionConstituentForObjectLiteral(unionType, node) { const keyPropertyName = getKeyPropertyName(unionType); - const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 305 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); + const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 308 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); const propType = propNode && getContextFreeTypeOfExpression(propNode.initializer); return propType && getConstituentTypeForKeyType(unionType, propType); } @@ -64010,7 +64186,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - if (expression.expression.kind === 211 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { + if (expression.expression.kind === 213 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { return true; } return false; @@ -64171,11 +64347,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return createArrayType(checkIteratedTypeOrElementType(65 /* Destructuring */, type, undefinedType, void 0) || errorType); } function getAssignedTypeOfBinaryExpression(node) { - const isDestructuringDefaultAssignment = node.parent.kind === 209 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 305 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); + const isDestructuringDefaultAssignment = node.parent.kind === 211 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 308 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent2) { - return parent2.parent.kind === 227 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 251 /* ForOfStatement */ && parent2.parent.initializer === parent2; + return parent2.parent.kind === 229 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 253 /* ForOfStatement */ && parent2.parent.initializer === parent2; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element)); @@ -64192,21 +64368,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getAssignedType(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return stringType; - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return checkRightHandSideOfForOf(parent2) || errorType; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return getAssignedTypeOfBinaryExpression(parent2); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return undefinedType; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return getAssignedTypeOfArrayLiteralElement(parent2, node); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return getAssignedTypeOfSpreadExpression(parent2); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return getAssignedTypeOfPropertyAssignment(parent2); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return getAssignedTypeOfShorthandPropertyAssignment(parent2); } return errorType; @@ -64214,7 +64390,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getInitialTypeOfBindingElement(node) { const pattern = node.parent; const parentType = getInitialType(pattern.parent); - const type = pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); + const type = pattern.kind === 208 /* 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) { @@ -64225,25 +64401,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 250 /* ForInStatement */) { + if (node.parent.parent.kind === 252 /* ForInStatement */) { return stringType; } - if (node.parent.parent.kind === 251 /* ForOfStatement */) { + if (node.parent.parent.kind === 253 /* ForOfStatement */) { return checkRightHandSideOfForOf(node.parent.parent) || errorType; } return errorType; } function getInitialType(node) { - return node.kind === 261 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); + return node.kind === 263 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function isEmptyArrayAssignment(node) { - return node.kind === 261 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 208 /* BindingElement */ && node.parent.kind === 227 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); + return node.kind === 263 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 210 /* BindingElement */ && node.parent.kind === 229 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return getReferenceCandidate(node.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (node.operatorToken.kind) { case 63 /* EqualsToken */: case 75 /* BarBarEqualsToken */: @@ -64258,10 +64434,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getReferenceRoot(node) { const { parent: parent2 } = node; - return parent2.kind === 217 /* ParenthesizedExpression */ || parent2.kind === 227 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */ && parent2.left === node || parent2.kind === 227 /* BinaryExpression */ && parent2.operatorToken.kind === 27 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; + return parent2.kind === 219 /* ParenthesizedExpression */ || parent2.kind === 229 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */ && parent2.left === node || parent2.kind === 229 /* BinaryExpression */ && parent2.operatorToken.kind === 27 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 298 /* CaseClause */) { + if (clause.kind === 301 /* CaseClause */) { return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); } return neverType; @@ -64277,12 +64453,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return links.switchTypes; } function getSwitchClauseTypeOfWitnesses(switchStatement) { - if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 298 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { + if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 301 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { return void 0; } const witnesses = []; for (const clause of switchStatement.caseBlock.clauses) { - const text = clause.kind === 298 /* CaseClause */ ? clause.expression.text : void 0; + const text = clause.kind === 301 /* CaseClause */ ? clause.expression.text : void 0; witnesses.push(text && !contains(witnesses, text) ? text : void 0); } return witnesses; @@ -64432,8 +64608,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isEvolvingArrayOperationTarget(node) { const root = getReferenceRoot(node); const parent2 = root.parent; - const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 213 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); - const isElementAssignment = parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 227 /* 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 === 215 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); + const isElementAssignment = parent2.kind === 214 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 229 /* 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) { @@ -64456,7 +64632,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isDeclarationWithExplicitTypeAnnotation(declaration)) { return getTypeOfSymbol(symbol); } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 251 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 253 /* ForOfStatement */) { const statement = declaration.parent.parent; const expressionType = getTypeOfDottedName(statement.expression, void 0); if (expressionType) { @@ -64480,7 +64656,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getExplicitThisType(node); case 107 /* SuperKeyword */: return checkSuperExpression(node); - case 211 /* PropertyAccessExpression */: { + case 213 /* PropertyAccessExpression */: { const type = getTypeOfDottedName(node.expression, diagnostic); if (type) { const name = node.name; @@ -64497,7 +64673,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } return void 0; } - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return getTypeOfDottedName(node.expression, diagnostic); } } @@ -64507,7 +64683,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let signature = links.effectsSignature; if (signature === void 0) { let funcType; - if (node.parent.kind === 245 /* ExpressionStatement */) { + if (node.parent.kind === 247 /* ExpressionStatement */) { funcType = getTypeOfDottedName(node.expression, void 0); } else if (node.expression.kind !== 107 /* SuperKeyword */) { if (isOptionalChain(node)) { @@ -64549,7 +64725,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isFalseExpression(expr) { const node = skipParentheses(expr, true); - return node.kind === 96 /* FalseKeyword */ || node.kind === 227 /* 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 === 229 /* 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) { @@ -64648,8 +64824,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const symbol = getResolvedSymbol(node); return isConstVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); } - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol); } return false; @@ -64669,7 +64845,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 236 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { + if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 238 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { return declaredType; } return resultType === nonNullUnknownType ? unknownType : resultType; @@ -64738,7 +64914,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { target.antecedents = saveAntecedents; } else if (flags & 2 /* Start */) { const container = flow.node; - if (container && container !== flowContainer && reference.kind !== 211 /* PropertyAccessExpression */ && reference.kind !== 212 /* ElementAccessExpression */ && reference.kind !== 109 /* ThisKeyword */) { + if (container && container !== flowContainer && reference.kind !== 213 /* PropertyAccessExpression */ && reference.kind !== 214 /* ElementAccessExpression */ && reference.kind !== 109 /* ThisKeyword */) { flow = container.flowNode; continue; } @@ -64757,7 +64933,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getInitialOrAssignedType(flow) { const node = flow.node; - return getNarrowableTypeForReference(node.kind === 261 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); + return getNarrowableTypeForReference(node.kind === 263 /* VariableDeclaration */ || node.kind === 210 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); } function getTypeAtFlowAssignment(flow) { const node = flow.node; @@ -64787,13 +64963,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConst(node))) { const init = getDeclaredExpandoInitializer(node); - if (init && (init.kind === 218 /* FunctionExpression */ || init.kind === 219 /* ArrowFunction */)) { + if (init && (init.kind === 220 /* FunctionExpression */ || init.kind === 221 /* ArrowFunction */)) { return getTypeAtFlowNode(flow.antecedent); } } return declaredType; } - if (isVariableDeclaration(node) && node.parent.parent.kind === 250 /* ForInStatement */ && isMatchingReference(reference, node.parent.parent.expression)) { + if (isVariableDeclaration(node) && node.parent.parent.kind === 252 /* ForInStatement */ && isMatchingReference(reference, node.parent.parent.expression)) { return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent)))); } return void 0; @@ -64803,7 +64979,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.kind === 96 /* FalseKeyword */) { return unreachableNeverType; } - if (node.kind === 227 /* BinaryExpression */) { + if (node.kind === 229 /* BinaryExpression */) { if (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); } @@ -64832,13 +65008,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getTypeAtFlowArrayMutation(flow) { if (declaredType === autoType || declaredType === autoArrayType) { const node = flow.node; - const expr = node.kind === 213 /* CallExpression */ ? node.expression.expression : node.left.expression; + const expr = node.kind === 215 /* 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 === 213 /* CallExpression */) { + if (node.kind === 215 /* CallExpression */) { for (const arg of node.arguments) { evolvedType2 = addEvolvingArrayElementType(evolvedType2, arg); } @@ -64875,7 +65051,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let type = getTypeFromFlowType(flowType); if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); - } else if (expr.kind === 222 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { + } else if (expr.kind === 224 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else { if (strictNullChecks) { @@ -64887,7 +65063,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { flow.clauseEnd, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)) ); - } else if (expr.kind === 222 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + } else if (expr.kind === 224 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { type = narrowTypeBySwitchOptionalChainContainment( type, flow.switchStatement, @@ -65136,10 +65312,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const operator = expr.operatorToken.kind; const left = getReferenceCandidate(expr.left); const right = getReferenceCandidate(expr.right); - if (left.kind === 222 /* TypeOfExpression */ && isStringLiteralLike(right)) { + if (left.kind === 224 /* TypeOfExpression */ && isStringLiteralLike(right)) { return narrowTypeByTypeof(type, left, operator, right, assumeTrue); } - if (right.kind === 222 /* TypeOfExpression */ && isStringLiteralLike(left)) { + if (right.kind === 224 /* TypeOfExpression */ && isStringLiteralLike(left)) { return narrowTypeByTypeof(type, right, operator, left, assumeTrue); } if (isMatchingReference(reference, left)) { @@ -65337,7 +65513,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!witnesses) { return type; } - const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 299 /* DefaultClause */); + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 302 /* DefaultClause */); const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; if (hasDefaultClause) { const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); @@ -65490,17 +65666,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } case 109 /* ThisKeyword */: case 107 /* SuperKeyword */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return narrowTypeByCallExpression(type, expr, assumeTrue); - case 217 /* ParenthesizedExpression */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: return narrowType(type, expr.expression, assumeTrue); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: if (expr.operator === 53 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } @@ -65538,7 +65714,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getNonMissingTypeOfSymbol(symbol); } function getControlFlowContainer(node) { - return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 271 /* ModuleBlock */ || node2.kind === 314 /* SourceFile */ || node2.kind === 171 /* PropertyDeclaration */ || node2.kind === 172 /* AnnotationPropertyDeclaration */); + return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 274 /* ModuleBlock */ || node2.kind === 317 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */ || node2.kind === 173 /* AnnotationPropertyDeclaration */); } function isSymbolAssigned(symbol) { if (!symbol.valueDeclaration) { @@ -65574,7 +65750,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function removeOptionalityFromDeclaredType(declaredType, declaration) { if (pushTypeResolution(declaration.symbol, 2 /* DeclaredType */)) { - const annotationIncludesUndefined = strictNullChecks && declaration.kind === 168 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !(getTypeFacts(checkExpression(declaration.initializer)) & 16777216 /* IsUndefined */); + const annotationIncludesUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !(getTypeFacts(checkExpression(declaration.initializer)) & 16777216 /* IsUndefined */); popTypeResolution(); return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; } else { @@ -65584,7 +65760,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isConstraintPosition(type, node) { const parent2 = node.parent; - return parent2.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 165 /* QualifiedName */ || parent2.kind === 213 /* CallExpression */ && parent2.expression === node || parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); + return parent2.kind === 213 /* PropertyAccessExpression */ || parent2.kind === 166 /* QualifiedName */ || parent2.kind === 215 /* CallExpression */ && parent2.expression === node || parent2.kind === 214 /* 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 */)); @@ -65632,14 +65808,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (declaration) { if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) { const parent2 = declaration.parent.parent; - if (parent2.kind === 261 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 168 /* Parameter */) { + if (parent2.kind === 263 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 169 /* Parameter */) { const links = getNodeLinks(parent2); if (!(links.flags & 268435456 /* InCheckIdentifier */)) { links.flags |= 268435456 /* InCheckIdentifier */; const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */); const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType); links.flags &= ~268435456 /* InCheckIdentifier */; - if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 168 /* Parameter */ && isSymbolAssigned(symbol))) { + if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 169 /* Parameter */ && isSymbolAssigned(symbol))) { const pattern = declaration.parent; const narrowedType = getFlowTypeOfReference(pattern, parentTypeConstraint, parentTypeConstraint, void 0, location.flowNode); if (narrowedType.flags & 131072 /* Never */) { @@ -65682,7 +65858,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const container = getContainingFunction(node); if (languageVersion < 2 /* ES2015 */) { - if (container.kind === 219 /* ArrowFunction */) { + if (container.kind === 221 /* 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); @@ -65703,7 +65879,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let declaration = localOrExportSymbol.valueDeclaration; if (declaration && localOrExportSymbol.flags & 32 /* Class */) { - if (declaration.kind === 264 /* ClassDeclaration */ && nodeIsDecorated(declaration)) { + if (declaration.kind === 266 /* ClassDeclaration */ && nodeIsDecorated(declaration)) { let container = getContainingClass(node); while (container !== void 0) { if (container === declaration && container.name !== node) { @@ -65713,9 +65889,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } container = getContainingClass(container); } - } else if (declaration.kind === 232 /* ClassExpression */) { + } else if (declaration.kind === 234 /* ClassExpression */) { let container = getThisContainer(node, false); - while (container.kind !== 314 /* SourceFile */) { + while (container.kind !== 317 /* SourceFile */) { if (container.parent === declaration) { if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) { getNodeLinks(declaration).flags |= 16777216 /* ClassWithConstructorReference */; @@ -65763,16 +65939,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return type; } type = getNarrowableTypeForReference(type, node, checkMode); - const isParameter2 = getRootDeclaration(declaration).kind === 168 /* Parameter */; + const isParameter2 = getRootDeclaration(declaration).kind === 169 /* 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 === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { + while (flowContainer !== declarationContainer && (flowContainer.kind === 220 /* FunctionExpression */ || flowContainer.kind === 221 /* 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) || node.parent.kind === 284 /* ExportSpecifier */) || node.parent.kind === 236 /* NonNullExpression */ || declaration.kind === 261 /* 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) || node.parent.kind === 287 /* ExportSpecifier */) || node.parent.kind === 238 /* NonNullExpression */ || declaration.kind === 263 /* 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)) { @@ -65822,7 +65998,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return findAncestor(node, (n) => !n || nodeStartsNewLexicalEnvironment(n) ? "quit" : isIterationStatement(n, false)); } function checkNestedBlockScopedBinding(node, symbol) { - if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 301 /* CatchClause */) { + if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 304 /* CatchClause */) { return; } const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); @@ -65832,7 +66008,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isCaptured) { let capturesBlockScopeBindingInLoopBody = true; if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 262 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 264 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container) { const part = getPartOfForStatementContainingNode(node.parent, container); if (part) { @@ -65851,7 +66027,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 262 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 264 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) { getNodeLinks(symbol.valueDeclaration).flags |= 4194304 /* NeedsLoopOutParameter */; } @@ -65868,13 +66044,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isAssignedInBodyOfForStatement(node, container) { let current = node; - while (current.parent.kind === 217 /* ParenthesizedExpression */) { + while (current.parent.kind === 219 /* ParenthesizedExpression */) { current = current.parent; } let isAssigned = false; if (isAssignmentTarget(current)) { isAssigned = true; - } else if (current.parent.kind === 225 /* PrefixUnaryExpression */ || current.parent.kind === 226 /* PostfixUnaryExpression */) { + } else if (current.parent.kind === 227 /* PrefixUnaryExpression */ || current.parent.kind === 228 /* PostfixUnaryExpression */) { const expr = current.parent; isAssigned = expr.operator === 45 /* PlusPlusToken */ || expr.operator === 46 /* MinusMinusToken */; } @@ -65885,7 +66061,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 171 /* PropertyDeclaration */ || container.kind === 176 /* Constructor */) { + if (container.kind === 172 /* PropertyDeclaration */ || container.kind === 178 /* Constructor */) { const classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } else { @@ -65919,27 +66095,27 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const isNodeInTypeQuery = isInTypeQuery(node); let container = getThisContainer(node, true); let capturedByArrowFunction = false; - if (container.kind === 176 /* Constructor */) { + if (container.kind === 178 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } - if (container.kind === 219 /* ArrowFunction */) { + if (container.kind === 221 /* ArrowFunction */) { container = getThisContainer(container, false); capturedByArrowFunction = true; } checkThisInStaticClassFieldInitializerInDecoratedClass(node, container); switch (container.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 176 /* Constructor */: + case 178 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } break; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: error(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); break; } @@ -66013,13 +66189,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getClassNameFromPrototypeMethod(container) { - if (container.kind === 218 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { + if (container.kind === 220 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { return container.parent.left.expression.expression; - } else if (container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 176 /* MethodDeclaration */ && container.parent.kind === 212 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { return container.parent.parent.left.expression; - } else if (container.kind === 218 /* FunctionExpression */ && container.parent.kind === 305 /* PropertyAssignment */ && container.parent.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 220 /* FunctionExpression */ && container.parent.kind === 308 /* PropertyAssignment */ && container.parent.parent.kind === 212 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { return container.parent.parent.parent.left.expression; - } else if (container.kind === 218 /* 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 === 220 /* 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; @@ -66027,7 +66203,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTypeForThisExpressionFromJSDoc(node) { const jsdocType = getJSDocType(node); - if (jsdocType && jsdocType.kind === 326 /* JSDocFunctionType */) { + if (jsdocType && jsdocType.kind === 329 /* 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); @@ -66039,16 +66215,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 168 /* Parameter */ && n.parent === constructorDecl); + return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 169 /* Parameter */ && n.parent === constructorDecl); } function checkSuperExpression(node) { - const isCallExpression2 = node.parent.kind === 213 /* CallExpression */ && node.parent.expression === node; + const isCallExpression2 = node.parent.kind === 215 /* CallExpression */ && node.parent.expression === node; const immediateContainer = getSuperContainer(node, true); let container = immediateContainer; let needToCaptureLexicalThis = false; let inAsyncFunction = false; if (!isCallExpression2) { - while (container && container.kind === 219 /* ArrowFunction */) { + while (container && container.kind === 221 /* ArrowFunction */) { if (hasSyntacticModifier(container, 512 /* Async */)) inAsyncFunction = true; container = getSuperContainer(container, true); @@ -66060,19 +66236,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const canUseSuperExpression = isLegalUsageOfSuperExpression(container); let nodeCheckFlag = 0; if (!canUseSuperExpression) { - const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 166 /* ComputedPropertyName */); - if (current && current.kind === 166 /* ComputedPropertyName */) { + const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 167 /* ComputedPropertyName */); + if (current && current.kind === 167 /* 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 === 210 /* ObjectLiteralExpression */)) { + } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 212 /* 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 === 176 /* Constructor */) { + if (!isCallExpression2 && immediateContainer.kind === 178 /* 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) { @@ -66088,7 +66264,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { nodeCheckFlag = 256 /* SuperInstance */; } getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 174 /* MethodDeclaration */ && inAsyncFunction) { + if (container.kind === 176 /* MethodDeclaration */ && inAsyncFunction) { if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 4096 /* MethodWithSuperPropertyAssignmentInAsync */; } else { @@ -66098,7 +66274,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 210 /* ObjectLiteralExpression */) { + if (container.parent.kind === 212 /* 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; @@ -66116,7 +66292,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!baseClassType) { return errorType; } - if (container.kind === 176 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 178 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return errorType; } @@ -66126,13 +66302,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } if (isCallExpression2) { - return container2.kind === 176 /* Constructor */; + return container2.kind === 178 /* Constructor */; } else { - if (isClassLike(container2.parent) || container2.parent.kind === 210 /* ObjectLiteralExpression */) { + if (isClassLike(container2.parent) || container2.parent.kind === 212 /* ObjectLiteralExpression */) { if (isStatic(container2)) { - return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 171 /* PropertyDeclaration */ || container2.kind === 175 /* ClassStaticBlockDeclaration */; + return container2.kind === 176 /* MethodDeclaration */ || container2.kind === 175 /* MethodSignature */ || container2.kind === 179 /* GetAccessor */ || container2.kind === 180 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 177 /* ClassStaticBlockDeclaration */; } else { - return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 171 /* PropertyDeclaration */ || container2.kind === 170 /* PropertySignature */ || container2.kind === 176 /* Constructor */; + return container2.kind === 176 /* MethodDeclaration */ || container2.kind === 175 /* MethodSignature */ || container2.kind === 179 /* GetAccessor */ || container2.kind === 180 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 171 /* PropertySignature */ || container2.kind === 178 /* Constructor */; } } } @@ -66140,7 +66316,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getContainingObjectLiteral(func) { - return (func.kind === 174 /* MethodDeclaration */ || func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) && func.parent.kind === 210 /* ObjectLiteralExpression */ ? func.parent : func.kind === 218 /* FunctionExpression */ && func.parent.kind === 305 /* PropertyAssignment */ ? func.parent.parent : void 0; + return (func.kind === 176 /* MethodDeclaration */ || func.kind === 179 /* GetAccessor */ || func.kind === 180 /* SetAccessor */) && func.parent.kind === 212 /* ObjectLiteralExpression */ ? func.parent : func.kind === 220 /* FunctionExpression */ && func.parent.kind === 308 /* PropertyAssignment */ ? func.parent.parent : void 0; } function getThisTypeArgument(type) { return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? getTypeArguments(type)[0] : void 0; @@ -66151,7 +66327,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }); } function getContextualThisParameterType(func) { - if (func.kind === 219 /* ArrowFunction */) { + if (func.kind === 221 /* ArrowFunction */) { return void 0; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -66175,7 +66351,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (thisType) { return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); } - if (literal.parent.kind !== 305 /* PropertyAssignment */) { + if (literal.parent.kind !== 308 /* PropertyAssignment */) { break; } literal = literal.parent.parent; @@ -66184,7 +66360,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getWidenedType(contextualType ? getNonNullableType3(contextualType) : checkExpressionCached(containingLiteral)); } const parent2 = walkUpParenthesizedExpressions(func.parent); - if (parent2.kind === 227 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */) { + if (parent2.kind === 229 /* BinaryExpression */ && parent2.operatorToken.kind === 63 /* EqualsToken */) { const target = parent2.left; if (isAccessExpression(target)) { const { expression } = target; @@ -66231,11 +66407,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getTypeFromTypeNode(typeNode); } switch (declaration.kind) { - case 168 /* Parameter */: + case 169 /* Parameter */: return getContextuallyTypedParameterType(declaration); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return getContextualTypeForBindingElement(declaration, contextFlags); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (isStatic(declaration)) { return getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags); } @@ -66244,10 +66420,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getContextualTypeForBindingElement(declaration, contextFlags) { const parent2 = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 208 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); + const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 210 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0; - if (parent2.name.kind === 207 /* ArrayBindingPattern */) { + if (parent2.name.kind === 209 /* ArrayBindingPattern */) { const index = indexOfNode(declaration.parent.elements, declaration); if (index < 0) return void 0; @@ -66380,7 +66556,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return signatureHasRestParameter(signature) && argIndex >= restIndex ? getIndexedAccessType(getTypeOfSymbol(signature.parameters[restIndex]), getNumberLiteralType(argIndex - restIndex), 256 /* Contextual */) : getTypeAtPosition(signature, argIndex); } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 215 /* TaggedTemplateExpression */) { + if (template.parent.kind === 217 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return void 0; @@ -66639,10 +66815,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: case 157 /* UndefinedKeyword */: return true; - case 211 /* PropertyAccessExpression */: - case 217 /* ParenthesizedExpression */: + case 213 /* PropertyAccessExpression */: + case 219 /* ParenthesizedExpression */: return isPossiblyDiscriminantValue(node.expression); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return !node.expression || isPossiblyDiscriminantValue(node.expression); } return false; @@ -66652,7 +66828,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 305 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), + filter(node.properties, (p) => !!p.symbol && p.kind === 308 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), (prop) => [() => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -66672,7 +66848,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 294 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), + filter(node.properties, (p) => !!p.symbol && p.kind === 297 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), (prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -66729,63 +66905,63 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const { parent: parent2 } = node; switch (parent2.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 208 /* BindingElement */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 210 /* BindingElement */: return getContextualTypeForInitializerExpression(node, contextFlags); - case 219 /* ArrowFunction */: - case 254 /* ReturnStatement */: + case 221 /* ArrowFunction */: + case 256 /* ReturnStatement */: return getContextualTypeForReturnExpression(node, contextFlags); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return getContextualTypeForYieldOperand(parent2, contextFlags); - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return getContextualTypeForAwaitOperand(parent2, contextFlags); - case 213 /* CallExpression */: - case 220 /* EtsComponentExpression */: + case 215 /* CallExpression */: + case 222 /* EtsComponentExpression */: if (isInEtsFile(parent2) && parent2.expression.kind === 101 /* ImportKeyword */) { return stringType; } - case 214 /* NewExpression */: + case 216 /* NewExpression */: return getContextualTypeForArgument(parent2, node); - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: return isConstTypeReference(parent2.type) ? tryFindWhenConstTypeReference(parent2) : getTypeFromTypeNode(parent2.type); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node, contextFlags); - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent2, contextFlags); - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: return getContextualType2(parent2.parent, contextFlags); - case 209 /* ArrayLiteralExpression */: { + case 211 /* ArrayLiteralExpression */: { const arrayLiteral = parent2; const type = getApparentTypeOfContextualType(arrayLiteral, contextFlags); return getContextualTypeForElementExpression(type, indexOfNode(arrayLiteral.elements, node)); } - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node, contextFlags); - case 240 /* TemplateSpan */: - Debug.assert(parent2.parent.kind === 229 /* TemplateExpression */); + case 242 /* TemplateSpan */: + Debug.assert(parent2.parent.kind === 231 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent2.parent, node); - case 217 /* ParenthesizedExpression */: { + case 219 /* ParenthesizedExpression */: { const tag = isInJSFile(parent2) ? getJSDocTypeTag(parent2) : void 0; return !tag ? getContextualType2(parent2, contextFlags) : isJSDocTypeTag(tag) && isConstTypeReference(tag.typeExpression.type) ? tryFindWhenConstTypeReference(parent2) : getTypeFromTypeNode(tag.typeExpression.type); } - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return getContextualType2(parent2, contextFlags); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return getTypeFromTypeNode(parent2.type); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return tryGetTypeFromEffectiveTypeNode(parent2); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return getContextualTypeForJsxExpression(parent2, contextFlags); - case 294 /* JsxAttribute */: - case 296 /* JsxSpreadAttribute */: + case 297 /* JsxAttribute */: + case 299 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent2, contextFlags); - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return getContextualJsxElementAttributesType(parent2, contextFlags); } return void 0; @@ -67007,7 +67183,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return isFunctionExpressionOrArrowFunction(node) || isObjectLiteralMethod(node) ? getContextualSignature(node) : void 0; } function getContextualSignature(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 176 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const typeTagSignature = getSignatureOfTypeTag(node); if (typeTagSignature) { return typeTagSignature; @@ -67048,7 +67224,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return node.isSpread ? getIndexedAccessType(node.type, numberType) : node.type; } function hasDefaultValue(node) { - return node.kind === 208 /* BindingElement */ && !!node.initializer || node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */; + return node.kind === 210 /* BindingElement */ && !!node.initializer || node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */; } function checkArrayLiteral(node, checkMode, forceTuple) { const elements = node.elements; @@ -67061,7 +67237,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let hasOmittedExpression = false; for (let i = 0; i < elementCount; i++) { const e = elements[i]; - if (e.kind === 231 /* SpreadElement */) { + if (e.kind === 233 /* SpreadElement */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */); } @@ -67077,7 +67253,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { elementTypes.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, e.expression)); elementFlags.push(4 /* Rest */); } - } else if (exactOptionalPropertyTypes && e.kind === 233 /* OmittedExpression */) { + } else if (exactOptionalPropertyTypes && e.kind === 235 /* OmittedExpression */) { hasOmittedExpression = true; elementTypes.push(missingType); elementFlags.push(2 /* Optional */); @@ -67114,7 +67290,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isNumericName(name) { switch (name.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return isNumericComputedName(name); case 79 /* Identifier */: return isNumericLiteralName(name.escapedText); @@ -67131,7 +67307,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 102 /* InKeyword */ && node.parent.kind !== 177 /* GetAccessor */ && node.parent.kind !== 178 /* 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 !== 179 /* GetAccessor */ && node.parent.kind !== 180 /* SetAccessor */) { return links.resolvedType = errorType; } links.resolvedType = checkExpression(node.expression); @@ -67190,7 +67366,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let propertiesArray = []; let spread = emptyObjectType; const contextualType = getApparentTypeOfContextualType(node, void 0); - const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 206 /* ObjectBindingPattern */ || contextualType.pattern.kind === 210 /* ObjectLiteralExpression */); + const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 208 /* ObjectBindingPattern */ || contextualType.pattern.kind === 212 /* ObjectLiteralExpression */); const inConstContext = isConstContext(node); const checkFlags = inConstContext ? 8 /* Readonly */ : 0; const isInJavascript = isInJSFile(node) && !isInJsonFile(node); @@ -67209,9 +67385,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let offset = 0; for (const memberDecl of node.properties) { let member = getSymbolOfNode(memberDecl); - const computedNameType = memberDecl.name && memberDecl.name.kind === 166 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; - if (memberDecl.kind === 305 /* PropertyAssignment */ || memberDecl.kind === 306 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { - let type = memberDecl.kind === 305 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : memberDecl.kind === 306 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode); + const computedNameType = memberDecl.name && memberDecl.name.kind === 167 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; + if (memberDecl.kind === 308 /* PropertyAssignment */ || memberDecl.kind === 309 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { + let type = memberDecl.kind === 308 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : memberDecl.kind === 309 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode); if (isInJavascript) { const jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl); if (jsDocType) { @@ -67228,7 +67404,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { prop.nameType = nameType; } if (inDestructuringPattern) { - const isOptional = memberDecl.kind === 305 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 306 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; + const isOptional = memberDecl.kind === 308 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 309 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; if (isOptional) { prop.flags |= 16777216 /* Optional */; } @@ -67254,16 +67430,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { prop.target = member; member = prop; allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop); - if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 305 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { + if (contextualType && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 308 /* PropertyAssignment */ || memberDecl.kind === 176 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { const inferenceContext = getInferenceContext(node); Debug.assert(inferenceContext); - const inferenceNode = memberDecl.kind === 305 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; + const inferenceNode = memberDecl.kind === 308 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; addIntraExpressionInferenceSite(inferenceContext, inferenceNode, type); } if (type.symbol && type.symbol.flags & 268435456 /* Annotation */) { error(memberDecl, Diagnostics.Annotation_cannot_be_used_as_a_value); } - } else if (memberDecl.kind === 307 /* SpreadAssignment */) { + } else if (memberDecl.kind === 310 /* SpreadAssignment */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(memberDecl, 2 /* Assign */); } @@ -67292,7 +67468,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } continue; } else { - Debug.assert(memberDecl.kind === 177 /* GetAccessor */ || memberDecl.kind === 178 /* SetAccessor */); + Debug.assert(memberDecl.kind === 179 /* GetAccessor */ || memberDecl.kind === 180 /* SetAccessor */); checkNodeDeferred(memberDecl); } if (computedNameType && !(computedNameType.flags & 8576 /* StringOrNumberLiteralOrUnique */)) { @@ -67316,13 +67492,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (contextualTypeHasPattern) { const rootPatternParent = findAncestor( contextualType.pattern.parent, - (n) => n.kind === 261 /* VariableDeclaration */ || n.kind === 227 /* BinaryExpression */ || n.kind === 168 /* Parameter */ + (n) => n.kind === 263 /* VariableDeclaration */ || n.kind === 229 /* BinaryExpression */ || n.kind === 169 /* Parameter */ ); const spreadOrOutsideRootObject = findAncestor( node, - (n) => n === rootPatternParent || n.kind === 307 /* SpreadAssignment */ + (n) => n === rootPatternParent || n.kind === 310 /* SpreadAssignment */ ); - if (spreadOrOutsideRootObject.kind !== 307 /* SpreadAssignment */) { + if (spreadOrOutsideRootObject.kind !== 310 /* SpreadAssignment */) { for (const prop of getPropertiesOfType(contextualType)) { if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { @@ -67451,7 +67627,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } else { - Debug.assert(attributeDecl.kind === 296 /* JsxSpreadAttribute */); + Debug.assert(attributeDecl.kind === 299 /* JsxSpreadAttribute */); if (attributesTable.size > 0) { spread = getSpreadType(spread, createJsxAttributesType(), attributes.symbol, objectFlags, false); attributesTable = createSymbolTable(); @@ -67476,7 +67652,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { spread = getSpreadType(spread, createJsxAttributesType(), attributes.symbol, objectFlags, false); } } - const parent2 = openingLikeElement.parent.kind === 287 /* JsxElement */ ? openingLikeElement.parent : void 0; + const parent2 = openingLikeElement.parent.kind === 290 /* JsxElement */ ? openingLikeElement.parent : void 0; if (parent2 && parent2.openingElement === openingLikeElement && parent2.children.length > 0) { const childrenTypes = checkJsxChildren(parent2, checkMode); if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { @@ -67522,7 +67698,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!child.containsOnlyTriviaWhiteSpaces) { childrenTypes.push(stringType); } - } else if (child.kind === 297 /* JsxExpression */ && !child.expression) { + } else if (child.kind === 300 /* JsxExpression */ && !child.expression) { continue; } else { childrenTypes.push(checkExpressionForMutableLocation(child, checkMode)); @@ -67839,7 +68015,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError = true) { - const errorNode = !reportError ? void 0 : node.kind === 165 /* QualifiedName */ ? node.right : node.kind === 205 /* ImportType */ ? node : node.kind === 208 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; + const errorNode = !reportError ? void 0 : node.kind === 166 /* QualifiedName */ ? node.right : node.kind === 207 /* ImportType */ ? node : node.kind === 210 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); } function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) { @@ -68052,7 +68228,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return checkPropertyAccessExpressionOrQualifiedName(node, node.left, leftType, node.right, checkMode); } function isMethodAccessForCall(node) { - while (node.parent.kind === 217 /* ParenthesizedExpression */) { + while (node.parent.kind === 219 /* ParenthesizedExpression */) { node = node.parent; } return isCallOrNewExpression(node.parent) && node.parent.expression === node; @@ -68207,7 +68383,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } return isErrorType(apparentType) ? errorType : apparentType; } - prop = getPropertyOfType(apparentType, right.escapedText, false, node.kind === 165 /* QualifiedName */); + prop = getPropertyOfType(apparentType, right.escapedText, false, node.kind === 166 /* QualifiedName */); if (!prop) { const etsComponentExpressionNode = getEtsComponentExpressionInnerCallExpressionNode(node) || getRootEtsComponentInnerCallExpressionNode(node); const locals = getSourceFileOfNode(node).locals; @@ -68232,7 +68408,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - if (isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 308 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { + if (isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 311 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { markAliasReferenced(parentSymbol, node); } let propType; @@ -68330,7 +68506,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (declaration && isPropertyWithoutInitializer(declaration)) { if (!isStatic(declaration)) { const flowContainer = getControlFlowContainer(node); - if (flowContainer.kind === 176 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { + if (flowContainer.kind === 178 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { assumeUninitialized = true; } } @@ -68374,7 +68550,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!needInitialization && !(hasRequireDecorator && checkStructPropertyPosition(valueDeclaration, node))) { diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); } - } else if (valueDeclaration.kind === 264 /* ClassDeclaration */ && node.parent.kind !== 183 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { + } else if (valueDeclaration.kind === 266 /* ClassDeclaration */ && node.parent.kind !== 185 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { diagnosticMessage = error(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { @@ -68387,25 +68563,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function isInPropertyInitializerOrClassStaticBlock(node) { return !!findAncestor(node, (node2) => { switch (node2.kind) { - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return true; - case 305 /* PropertyAssignment */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 307 /* SpreadAssignment */: - case 166 /* ComputedPropertyName */: - case 240 /* TemplateSpan */: - case 297 /* JsxExpression */: - case 294 /* JsxAttribute */: - case 295 /* JsxAttributes */: - case 296 /* JsxSpreadAttribute */: - case 289 /* JsxOpeningElement */: - case 234 /* ExpressionWithTypeArguments */: - case 300 /* HeritageClause */: + case 308 /* PropertyAssignment */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 310 /* SpreadAssignment */: + case 167 /* ComputedPropertyName */: + case 242 /* TemplateSpan */: + case 300 /* JsxExpression */: + case 297 /* JsxAttribute */: + case 298 /* JsxAttributes */: + case 299 /* JsxSpreadAttribute */: + case 292 /* JsxOpeningElement */: + case 236 /* ExpressionWithTypeArguments */: + case 303 /* HeritageClause */: return false; - case 219 /* ArrowFunction */: - case 245 /* ExpressionStatement */: + case 221 /* ArrowFunction */: + case 247 /* ExpressionStatement */: return isBlock(node2.parent) && isClassStaticBlockDeclaration(node2.parent.parent) ? true : "quit"; default: return isExpressionNode(node2) ? false : "quit"; @@ -68640,18 +68816,18 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isValidPropertyAccess(node, propertyName) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return isValidPropertyAccessWithType(node, node.expression.kind === 107 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return isValidPropertyAccessWithType(node, false, propertyName, getWidenedType(checkExpression(node.left))); - case 205 /* ImportType */: + case 207 /* ImportType */: return isValidPropertyAccessWithType(node, false, propertyName, getTypeFromTypeNode(node)); } } function isValidPropertyAccessForCompletions(node, type, property) { return isPropertyAccessible( node, - node.kind === 211 /* PropertyAccessExpression */ && node.expression.kind === 107 /* SuperKeyword */, + node.kind === 213 /* PropertyAccessExpression */ && node.expression.kind === 107 /* SuperKeyword */, false, type, property @@ -68676,7 +68852,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getForInVariableSymbol(node) { const initializer = node.initializer; - if (initializer.kind === 262 /* VariableDeclarationList */) { + if (initializer.kind === 264 /* VariableDeclarationList */) { const variable = initializer.declarations[0]; if (variable && !isBindingPattern(variable.name)) { return getSymbolOfNode(variable); @@ -68697,7 +68873,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let child = expr; let node = expr.parent; while (node) { - if (node.kind === 250 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { + if (node.kind === 252 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { return true; } child = node; @@ -68741,11 +68917,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (callLikeExpressionMayHaveTypeArguments(node)) { forEach(node.typeArguments, checkSourceElement); } - if (node.kind === 215 /* TaggedTemplateExpression */) { + if (node.kind === 217 /* TaggedTemplateExpression */) { checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); - } else if (node.kind !== 169 /* Decorator */) { + } else if (node.kind !== 170 /* Decorator */) { forEach(node.arguments, (argument) => { checkExpression(argument); }); @@ -68790,7 +68966,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function isSpreadArgument(arg) { - return !!arg && (arg.kind === 231 /* SpreadElement */ || arg.kind === 238 /* SyntheticExpression */ && arg.isSpread); + return !!arg && (arg.kind === 233 /* SpreadElement */ || arg.kind === 240 /* SyntheticExpression */ && arg.isSpread); } function getSpreadArgumentIndex(args) { return findIndex(args, isSpreadArgument); @@ -68806,9 +68982,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let callIsIncomplete = false; let effectiveParameterCount = getParameterCount(signature); let effectiveMinimumArguments = getMinArgumentCount(signature); - if (node.kind === 215 /* TaggedTemplateExpression */) { + if (node.kind === 217 /* TaggedTemplateExpression */) { argCount = args.length; - if (node.template.kind === 229 /* TemplateExpression */) { + if (node.template.kind === 231 /* TemplateExpression */) { const lastSpan = last(node.template.templateSpans); callIsIncomplete = nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated; } else { @@ -68816,7 +68992,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { Debug.assert(templateLiteral.kind === 14 /* NoSubstitutionTemplateLiteral */); callIsIncomplete = !!templateLiteral.isUnterminated; } - } else if (node.kind === 169 /* Decorator */) { + } else if (node.kind === 170 /* Decorator */) { argCount = getDecoratorArgumentCount(node, signature); } else if (isJsxOpeningLikeElement(node)) { callIsIncomplete = node.attributes.end === node.end; @@ -68827,7 +69003,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { effectiveParameterCount = args.length === 0 ? effectiveParameterCount : 1; effectiveMinimumArguments = Math.min(effectiveMinimumArguments, 1); } else if (!node.arguments) { - Debug.assert(node.kind === 214 /* NewExpression */); + Debug.assert(node.kind === 216 /* NewExpression */); return getMinArgumentCount(signature) === 0; } else { argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -68908,7 +69084,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isJsxOpeningLikeElement(node)) { return inferJsxTypeArguments(node, signature, checkMode, context); } - if (node.kind !== 169 /* Decorator */) { + if (node.kind !== 170 /* Decorator */) { const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); const contextualType = getContextualType2(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); if (contextualType) { @@ -68945,7 +69121,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 233 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { + if (arg.kind !== 235 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { const paramType = getTypeAtPosition(signature, i); if (couldContainTypeVariables(paramType)) { const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode); @@ -68966,7 +69142,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (index >= argCount - 1) { const arg = args[argCount - 1]; if (isSpreadArgument(arg)) { - return getMutableArrayOrTupleType(arg.kind === 238 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode)); + return getMutableArrayOrTupleType(arg.kind === 240 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode)); } } const types = []; @@ -68975,12 +69151,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { for (let i = index; i < argCount; i++) { const arg = args[i]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 238 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); + const spreadType = arg.kind === 240 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); if (isArrayLikeType2(spreadType)) { types.push(spreadType); flags.push(8 /* Variadic */); } else { - types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 231 /* SpreadElement */ ? arg.expression : arg)); + types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 233 /* SpreadElement */ ? arg.expression : arg)); flags.push(4 /* Rest */); } } else { @@ -68990,7 +69166,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType)); flags.push(1 /* Required */); } - if (arg.kind === 238 /* SyntheticExpression */ && arg.tupleNameSource) { + if (arg.kind === 240 /* SyntheticExpression */ && arg.tupleNameSource) { names.push(arg.tupleNameSource); } } @@ -69133,7 +69309,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return void 0; } const thisType = getThisTypeOfSignature(signature); - if (thisType && thisType !== voidType && node.kind !== 214 /* NewExpression */) { + if (thisType && thisType !== voidType && node.kind !== 216 /* NewExpression */) { const thisArgumentNode = getThisArgumentOfCall(node); const thisArgumentType = getThisArgumentType(thisArgumentNode); const errorNode = reportErrors2 ? thisArgumentNode || node : void 0; @@ -69148,7 +69324,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 233 /* OmittedExpression */) { + if (arg.kind !== 235 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); const argType = checkExpressionWithContextualType(arg, paramType, void 0, checkMode); const checkArgType = checkMode & 4 /* SkipContextSensitive */ ? getRegularTypeOfObjectLiteral(argType) : argType; @@ -69183,7 +69359,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getThisArgumentOfCall(node) { - const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : void 0; + const expression = node.kind === 215 /* CallExpression */ ? node.expression : node.kind === 217 /* TaggedTemplateExpression */ ? node.tag : void 0; if (expression) { const callee = skipOuterExpressions(expression); if (isAccessExpression(callee)) { @@ -69198,17 +69374,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return result; } function getEffectiveCallArguments(node) { - if (node.kind === 215 /* TaggedTemplateExpression */) { + if (node.kind === 217 /* TaggedTemplateExpression */) { const template = node.template; const args2 = [createSyntheticExpression(template, getGlobalTemplateStringsArrayType())]; - if (template.kind === 229 /* TemplateExpression */) { + if (template.kind === 231 /* TemplateExpression */) { forEach(template.templateSpans, (span) => { args2.push(span.expression); }); } return args2; } - if (node.kind === 169 /* Decorator */) { + if (node.kind === 170 /* Decorator */) { return getEffectiveDecoratorArguments(node); } if (isJsxOpeningLikeElement(node)) { @@ -69220,7 +69396,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const effectiveArgs = args.slice(0, spreadIndex); for (let i = spreadIndex; i < args.length; i++) { const arg = args[i]; - const spreadType = arg.kind === 231 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); + const spreadType = arg.kind === 233 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); if (spreadType && isTupleType(spreadType)) { forEach(getTypeArguments(spreadType), (t, i2) => { var _a2; @@ -69245,30 +69421,30 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const parent2 = node.parent; const expr = node.expression; switch (parent2.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: return [ createSyntheticExpression(expr, getTypeOfSymbol(getSymbolOfNode(parent2))) ]; - case 168 /* Parameter */: + case 169 /* Parameter */: const func = parent2.parent; return [ - createSyntheticExpression(expr, parent2.parent.kind === 176 /* Constructor */ ? getTypeOfSymbol(getSymbolOfNode(func)) : errorType), + createSyntheticExpression(expr, parent2.parent.kind === 178 /* Constructor */ ? getTypeOfSymbol(getSymbolOfNode(func)) : errorType), createSyntheticExpression(expr, anyType), createSyntheticExpression(expr, numberType) ]; - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: const hasPropDesc = languageVersion !== 0 /* ES3 */ && (!isPropertyDeclaration(parent2) || hasAccessorModifier(parent2)); return [ createSyntheticExpression(expr, getParentTypeOfClassElement(parent2)), createSyntheticExpression(expr, getClassElementPropertyKeyType(parent2)), createSyntheticExpression(expr, hasPropDesc ? createTypedPropertyDescriptorType(getTypeOfNode(parent2)) : anyType) ]; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: if (isEtsFunctionDecorators(getNameOfDecorator(node), compilerOptions)) { const symbol = getSymbolOfNode(expr); return symbol ? [ @@ -69281,19 +69457,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getDecoratorArgumentCount(node, signature) { switch (node.parent.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: return 1; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return hasAccessorModifier(node.parent) ? 3 : 2; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return languageVersion === 0 /* ES3 */ || signature.parameters.length <= 2 ? 2 : 3; - case 168 /* Parameter */: + case 169 /* Parameter */: return 3; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: if (isEtsFunctionDecorators(getNameOfDecorator(node), compilerOptions)) { return isCallExpression(node.expression) ? 1 : 0; } @@ -69420,10 +69596,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, fallbackError) { - const isTaggedTemplate = node.kind === 215 /* TaggedTemplateExpression */; - const isDecorator2 = node.kind === 169 /* Decorator */; + const isTaggedTemplate = node.kind === 217 /* TaggedTemplateExpression */; + const isDecorator2 = node.kind === 170 /* Decorator */; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); - const isEtsComponentExpression2 = node.kind === 220 /* EtsComponentExpression */; + const isEtsComponentExpression2 = node.kind === 222 /* EtsComponentExpression */; const reportErrors2 = !candidatesOutArray; let typeArguments; let virtual; @@ -69453,7 +69629,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let candidateForArgumentArityError; let candidateForTypeArgumentError; let result; - const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 213 /* CallExpression */ && node.arguments.hasTrailingComma; + const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 215 /* CallExpression */ && node.arguments.hasTrailingComma; if (candidates.length > 1) { result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma); } @@ -69903,7 +70079,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const declaration = signature.declaration; const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */); - if (!modifiers || declaration.kind !== 176 /* Constructor */) { + if (!modifiers || declaration.kind !== 178 /* Constructor */) { return true; } const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(declaration.parent.symbol); @@ -70045,19 +70221,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 168 /* Parameter */: + case 169 /* Parameter */: return Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: const decoratorName = getNameOfDecorator(node); if (isEtsFunctionDecorators(decoratorName, compilerOptions)) { return Diagnostics.Unable_to_resolve_signature_of_function_decorator_when_decorators_are_not_valid; @@ -70217,20 +70393,20 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function resolveSignature(node, candidatesOutArray, checkMode) { switch (node.kind) { - case 213 /* CallExpression */: - case 220 /* EtsComponentExpression */: + case 215 /* CallExpression */: + case 222 /* EtsComponentExpression */: return resolveCallExpression(node, candidatesOutArray, checkMode); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return resolveNewExpression(node, candidatesOutArray, checkMode); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode); - case 169 /* Decorator */: + case 170 /* Decorator */: if (isAnnotation(node)) { return resolveAnnotation(node); } return resolveDecorator(node, candidatesOutArray, checkMode); - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); } } @@ -70335,7 +70511,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } let parent2 = node.parent; - while (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) { + while (parent2 && parent2.kind === 213 /* PropertyAccessExpression */) { parent2 = parent2.parent; } if (parent2 && isBinaryExpression(parent2) && isPrototypeAccess(parent2.left) && parent2.operatorToken.kind === 63 /* EqualsToken */) { @@ -70354,9 +70530,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.expression.kind === 107 /* SuperKeyword */) { return voidType; } - if (node.kind === 214 /* NewExpression */) { + if (node.kind === 216 /* NewExpression */) { const declaration = signature.declaration; - if (declaration && declaration.kind !== 176 /* Constructor */ && declaration.kind !== 180 /* ConstructSignature */ && declaration.kind !== 185 /* ConstructorType */ && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { + if (declaration && declaration.kind !== 178 /* Constructor */ && declaration.kind !== 182 /* ConstructSignature */ && declaration.kind !== 187 /* ConstructorType */ && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { if (noImplicitAny) { error(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } @@ -70370,7 +70546,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (returnType.flags & 12288 /* ESSymbolLike */ && isSymbolOrSymbolForCall(node)) { return getESSymbolLikeTypeForNode(walkUpParenthesizedExpressions(node.parent)); } - if (node.kind === 213 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 245 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { + if (node.kind === 215 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 247 /* 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)) { @@ -70390,7 +70566,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(node.expression, Diagnostics.UI_component_0_cannot_be_used_in_this_place, diagnosticName(node.expression)); } const signatureDeclaration = signature.declaration; - if (node.kind === 213 /* CallExpression */ && signatureDeclaration && !isJSDocSignature(signatureDeclaration) && (isMethodDeclaration(signatureDeclaration) || isMethodSignature(signatureDeclaration) || isFunctionDeclaration(signatureDeclaration))) { + if (node.kind === 215 /* CallExpression */ && signatureDeclaration && !isJSDocSignature(signatureDeclaration) && (isMethodDeclaration(signatureDeclaration) || isMethodSignature(signatureDeclaration) || isFunctionDeclaration(signatureDeclaration))) { if (shouldCheckThrows(signatureDeclaration) && !hasAsyncErrorCallbacks(signatureDeclaration)) { checkThrowableFunction(node); } @@ -70730,20 +70906,20 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getDeprecatedSuggestionNode(node) { node = skipParentheses(node); switch (node.kind) { - case 213 /* CallExpression */: - case 169 /* Decorator */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 170 /* Decorator */: + case 216 /* NewExpression */: return getDeprecatedSuggestionNode(node.expression); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return getDeprecatedSuggestionNode(node.tag); - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return getDeprecatedSuggestionNode(node.tagName); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return node.argumentExpression; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return node.name; - case 183 /* TypeReference */: + case 185 /* TypeReference */: const typeReference = node; return isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference; default: @@ -70852,7 +71028,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (resolvedRequire.flags & 2097152 /* Alias */) { return false; } - const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 263 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 261 /* VariableDeclaration */ : 0 /* Unknown */; + const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 265 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 263 /* VariableDeclaration */ : 0 /* Unknown */; if (targetDeclarationKind !== 0 /* Unknown */) { const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind); return !!decl && !!(decl.flags & 16777216 /* Ambient */); @@ -70870,7 +71046,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getReturnTypeOfSignature(signature); } function checkAssertion(node) { - if (node.kind === 216 /* TypeAssertionExpression */) { + if (node.kind === 218 /* 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); @@ -70886,18 +71062,18 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 9 /* BigIntLiteral */: case 111 /* TrueKeyword */: case 96 /* FalseKeyword */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 229 /* TemplateExpression */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 231 /* TemplateExpression */: return true; - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return isValidConstAssertionArgument(node.expression); - case 225 /* PrefixUnaryExpression */: + case 227 /* 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 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: const expr = node.expression; let symbol = getTypeOfNode(expr).symbol; if (symbol && symbol.flags & 2097152 /* Alias */) { @@ -70943,7 +71119,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkExpressionWithTypeArguments(node) { checkGrammarExpressionWithTypeArguments(node); - const exprType = node.kind === 234 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); + const exprType = node.kind === 236 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); const typeArguments = node.typeArguments; if (exprType === silentNeverType || isErrorType(exprType) || !some(typeArguments)) { return exprType; @@ -71038,7 +71214,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 176 /* Constructor */) { + } else if (container.kind === 178 /* Constructor */) { const symbol = getSymbolOfNode(container.parent); return getTypeOfSymbol(symbol); } else { @@ -71088,7 +71264,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getParameterIdentifierNameAtPosition(signature, pos) { var _a2; - if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 326 /* JSDocFunctionType */) { + if (((_a2 = signature.declaration) == null ? void 0 : _a2.kind) === 329 /* JSDocFunctionType */) { return void 0; } const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -71120,7 +71296,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name); } function isValidDeclarationForTupleLabel(d) { - return d.kind === 202 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); + return d.kind === 204 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); } function getNameableDeclarationAtPosition(signature, pos) { const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -71379,7 +71555,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let yieldType; let nextType; let fallbackReturnType = voidType; - if (func.body.kind !== 242 /* Block */) { + if (func.body.kind !== 244 /* Block */) { returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */); if (isAsync) { returnType = unwrapAwaitedType(checkAwaitedType(returnType, false, func, Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)); @@ -71513,7 +71689,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return links.isExhaustive; } function computeExhaustiveSwitchStatement(node) { - if (node.expression.kind === 222 /* TypeOfExpression */) { + if (node.expression.kind === 224 /* TypeOfExpression */) { const witnesses = getSwitchClauseTypeOfWitnesses(node); if (!witnesses) { return false; @@ -71568,11 +71744,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function mayReturnNever(func) { switch (func.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return true; - case 174 /* MethodDeclaration */: - return func.parent.kind === 210 /* ObjectLiteralExpression */; + case 176 /* MethodDeclaration */: + return func.parent.kind === 212 /* ObjectLiteralExpression */; default: return false; } @@ -71614,7 +71790,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return judgeReturnTypeOfStyles(); } } - if (func.kind === 173 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 242 /* Block */ || !functionHasImplicitReturn(func)) { + if (func.kind === 175 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 244 /* Block */ || !functionHasImplicitReturn(func)) { return; } const hasExplicitReturn = func.flags & 512 /* HasExplicitReturn */; @@ -71650,7 +71826,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 176 /* MethodDeclaration */ || isObjectLiteralMethod(node)); checkNodeDeferred(node); if (isFunctionExpression(node)) { checkCollisionsForDeclarationName(node, node.name); @@ -71673,7 +71849,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return anyFunctionType; } const hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 218 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 220 /* FunctionExpression */) { checkGrammarForGenerator(node); } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -71717,7 +71893,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 176 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const functionFlags = getFunctionFlags(node); const returnType = getReturnTypeFromAnnotation(node); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); @@ -71725,7 +71901,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!getEffectiveReturnTypeNode(node)) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 242 /* Block */) { + if (node.body.kind === 244 /* Block */) { checkSourceElement(node.body); } else { const exprType = checkExpression(node.body); @@ -71791,7 +71967,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isReadonlySymbol(symbol)) { if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 109 /* ThisKeyword */) { const ctor = getContainingFunction(expr); - if (!(ctor && (ctor.kind === 176 /* Constructor */ || isJSConstructor(ctor)))) { + if (!(ctor && (ctor.kind === 178 /* Constructor */ || isJSConstructor(ctor)))) { return true; } if (symbol.valueDeclaration) { @@ -71812,7 +71988,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const symbol2 = getNodeLinks(node).resolvedSymbol; if (symbol2.flags & 2097152 /* Alias */) { const declaration = getDeclarationOfAliasSymbol(symbol2); - return !!declaration && declaration.kind === 277 /* NamespaceImport */; + return !!declaration && declaration.kind === 280 /* NamespaceImport */; } } } @@ -71917,7 +72093,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 176 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { + if (container && container.kind !== 178 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { const relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); } @@ -72110,7 +72286,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkObjectLiteralDestructuringPropertyAssignment(node, objectLiteralType, propertyIndex, allProperties, rightIsThis = false) { const properties = node.properties; const property = properties[propertyIndex]; - if (property.kind === 305 /* PropertyAssignment */ || property.kind === 306 /* ShorthandPropertyAssignment */) { + if (property.kind === 308 /* PropertyAssignment */ || property.kind === 309 /* ShorthandPropertyAssignment */) { const name = property.name; const exprType = getLiteralTypeFromPropertyName(name); if (isTypeUsableAsPropertyName(exprType)) { @@ -72123,8 +72299,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */, name); const type = getFlowTypeOfDestructuring(property, elementType); - return checkDestructuringAssignment(property.kind === 306 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); - } else if (property.kind === 307 /* SpreadAssignment */) { + return checkDestructuringAssignment(property.kind === 309 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); + } else if (property.kind === 310 /* SpreadAssignment */) { if (propertyIndex < properties.length - 1) { error(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { @@ -72156,7 +72332,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let inBoundsType = compilerOptions.noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType; for (let i = 0; i < elements.length; i++) { let type = possiblyOutOfBoundsType; - if (node.elements[i].kind === 231 /* SpreadElement */) { + if (node.elements[i].kind === 233 /* SpreadElement */) { type = inBoundsType = inBoundsType != null ? inBoundsType : checkIteratedTypeOrElementType(65 /* Destructuring */, sourceType, undefinedType, node) || errorType; } checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode); @@ -72166,8 +72342,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { const elements = node.elements; const element = elements[elementIndex]; - if (element.kind !== 233 /* OmittedExpression */) { - if (element.kind !== 231 /* SpreadElement */) { + if (element.kind !== 235 /* OmittedExpression */) { + if (element.kind !== 233 /* SpreadElement */) { const indexType = getNumberLiteralType(elementIndex); if (isArrayLikeType2(sourceType)) { const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(element) ? 16 /* NoTupleBoundsCheck */ : 0); @@ -72182,7 +72358,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { const restExpression = element.expression; - if (restExpression.kind === 227 /* BinaryExpression */ && restExpression.operatorToken.kind === 63 /* EqualsToken */) { + if (restExpression.kind === 229 /* 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); @@ -72195,7 +72371,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) { let target; - if (exprOrAssignment.kind === 306 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 309 /* ShorthandPropertyAssignment */) { const prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) { @@ -72207,25 +72383,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { target = exprOrAssignment; } - if (target.kind === 227 /* BinaryExpression */ && target.operatorToken.kind === 63 /* EqualsToken */) { + if (target.kind === 229 /* BinaryExpression */ && target.operatorToken.kind === 63 /* EqualsToken */) { checkBinaryExpression(target, checkMode); target = target.left; if (strictNullChecks) { sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); } } - if (target.kind === 210 /* ObjectLiteralExpression */) { + if (target.kind === 212 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType, rightIsThis); } - if (target.kind === 209 /* ArrayLiteralExpression */) { + if (target.kind === 211 /* 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 === 307 /* 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 === 307 /* 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 === 310 /* 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 === 310 /* 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); } @@ -72240,8 +72416,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: case 10 /* StringLiteral */: case 13 /* RegularExpressionLiteral */: - case 215 /* TaggedTemplateExpression */: - case 229 /* TemplateExpression */: + case 217 /* TaggedTemplateExpression */: + case 231 /* TemplateExpression */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: @@ -72249,25 +72425,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 96 /* FalseKeyword */: case 105 /* NullKeyword */: case 157 /* UndefinedKeyword */: - case 218 /* FunctionExpression */: - case 232 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 222 /* TypeOfExpression */: - case 236 /* NonNullExpression */: - case 288 /* JsxSelfClosingElement */: - case 287 /* JsxElement */: + case 220 /* FunctionExpression */: + case 234 /* ClassExpression */: + case 221 /* ArrowFunction */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 224 /* TypeOfExpression */: + case 238 /* NonNullExpression */: + case 291 /* JsxSelfClosingElement */: + case 290 /* JsxElement */: return true; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: switch (node.operator) { case 53 /* ExclamationToken */: case 39 /* PlusToken */: @@ -72276,9 +72452,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; } return false; - case 223 /* VoidExpression */: - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 225 /* VoidExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: default: return false; } @@ -72314,7 +72490,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } checkGrammarNullishCoalesceWithLogicalExpression(node); const operator = node.operatorToken.kind; - if (operator === 63 /* EqualsToken */ && (node.left.kind === 210 /* ObjectLiteralExpression */ || node.left.kind === 209 /* ArrayLiteralExpression */)) { + if (operator === 63 /* EqualsToken */ && (node.left.kind === 212 /* ObjectLiteralExpression */ || node.left.kind === 211 /* ArrayLiteralExpression */)) { state.skip = true; setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 109 /* ThisKeyword */)); return state; @@ -72336,7 +72512,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) { if (operator === 55 /* AmpersandAmpersandToken */) { let parent2 = node.parent; - while (parent2.kind === 217 /* ParenthesizedExpression */ || isBinaryExpression(parent2) && (parent2.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || parent2.operatorToken.kind === 56 /* BarBarToken */)) { + while (parent2.kind === 219 /* ParenthesizedExpression */ || isBinaryExpression(parent2) && (parent2.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || parent2.operatorToken.kind === 56 /* BarBarToken */)) { parent2 = parent2.parent; } checkTestingKnownTruthyCallableOrAwaitableType(node.left, leftType, isIfStatement(parent2) ? parent2.thenStatement : void 0); @@ -72403,7 +72579,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { const operator = operatorToken.kind; - if (operator === 63 /* EqualsToken */ && (left.kind === 210 /* ObjectLiteralExpression */ || left.kind === 209 /* ArrayLiteralExpression */)) { + if (operator === 63 /* EqualsToken */ && (left.kind === 212 /* ObjectLiteralExpression */ || left.kind === 211 /* ArrayLiteralExpression */)) { return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 109 /* ThisKeyword */); } let leftType; @@ -72841,7 +73017,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return !!(type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */) || type.flags & 58982400 /* InstantiableNonPrimitive */ && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 402653316 /* StringLike */)); } function getContextNode2(node) { - if (node.kind === 295 /* JsxAttributes */ && !isJsxSelfClosingElement(node.parent)) { + if (node.kind === 298 /* JsxAttributes */ && !isJsxSelfClosingElement(node.parent)) { return node.parent.parent; } return node; @@ -72882,12 +73058,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isTypeAssertion3(node) { node = skipParentheses(node, true); - return node.kind === 216 /* TypeAssertionExpression */ || node.kind === 235 /* AsExpression */ || isJSDocTypeAssertion(node); + return node.kind === 218 /* TypeAssertionExpression */ || node.kind === 237 /* AsExpression */ || isJSDocTypeAssertion(node); } function checkDeclarationInitializer(declaration, checkMode, contextualType) { const initializer = getEffectiveInitializer(declaration); const type = getQuickTypeOfExpression(initializer) || (contextualType ? checkExpressionWithContextualType(initializer, contextualType, void 0, checkMode || 0 /* Normal */) : checkExpressionCached(initializer, checkMode)); - return isParameter(declaration) && declaration.name.kind === 207 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; + return isParameter(declaration) && declaration.name.kind === 209 /* 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; @@ -72895,7 +73071,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 208 /* BindingElement */ && e.dotDotDotToken)) { + if (i < patternElements.length - 1 || !(e.kind === 210 /* BindingElement */ && e.dotDotDotToken)) { elementTypes.push(!isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement(e, false, false) : anyType); elementFlags.push(2 /* Optional */); if (!isOmittedExpression(e) && !hasDefaultValue(e)) { @@ -72941,14 +73117,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return isConstContext(node) || isCommonJsExportedExpression(node) ? getRegularTypeOfLiteralType(type) : isTypeAssertion3(node) ? type : getWidenedLiteralLikeTypeForContextualType(type, instantiateContextualType(arguments.length === 2 ? getContextualType2(node, void 0) : contextualType, node, void 0)); } function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); } function checkObjectLiteralMethod(node, checkMode) { checkGrammarMethod(node); - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } const uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -73154,7 +73330,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return type; } function checkConstEnumAccess(node, type) { - const ok = node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 79 /* Identifier */ || node.kind === 165 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 186 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 284 /* ExportSpecifier */; + const ok = node.parent.kind === 213 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 214 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 79 /* Identifier */ || node.kind === 166 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 188 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 287 /* 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); } @@ -73177,9 +73353,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const kind = node.kind; if (cancellationToken) { switch (kind) { - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -73210,87 +73386,87 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return trueType; case 96 /* FalseKeyword */: return falseType; - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: return checkTemplateExpression(node); case 13 /* RegularExpressionLiteral */: return globalRegExpType; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return checkArrayLiteral(node, checkMode, forceTuple); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return checkObjectLiteral(node, checkMode); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node, checkMode); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return checkQualifiedName(node, checkMode); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return checkIndexedAccess(node, checkMode); - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (node.expression.kind === 101 /* ImportKeyword */) { return checkImportCallExpression(node); } - case 214 /* NewExpression */: + case 216 /* NewExpression */: return checkCallExpression(node, checkMode); - case 220 /* EtsComponentExpression */: + case 222 /* EtsComponentExpression */: const newNode = node; if (newNode.body && newNode.body.statements.length) { traverseEtsComponentStatements(newNode.body.statements, checkMode); } return checkCallExpression(node, checkMode); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return checkParenthesizedExpression(node, checkMode); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return checkClassExpression(node); - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 222 /* TypeOfExpression */: + case 224 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: return checkAssertion(node); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return checkNonNullAssertion(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return checkExpressionWithTypeArguments(node); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return checkSatisfiesExpression(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return checkMetaProperty(node); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return checkDeleteExpression(node); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return checkVoidExpression(node); - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return checkAwaitExpression(node); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return checkBinaryExpression(node, checkMode); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return checkConditionalExpression(node, checkMode); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return checkSpreadExpression(node, checkMode); - case 233 /* OmittedExpression */: + case 235 /* OmittedExpression */: return undefinedWideningType; - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return checkYieldExpression(node); - case 238 /* SyntheticExpression */: + case 240 /* SyntheticExpression */: return checkSyntheticExpression(node); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return checkJsxExpression(node, checkMode); - case 287 /* JsxElement */: + case 290 /* JsxElement */: return checkJsxElement(node, checkMode); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node, checkMode); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return checkJsxFragment(node); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return checkJsxAttributes(node, checkMode); - case 289 /* JsxOpeningElement */: + case 292 /* JsxOpeningElement */: Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return errorType; @@ -73375,10 +73551,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkVariableLikeDeclaration(node); const func = getContainingFunction(node); if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { - if (!(func.kind === 176 /* Constructor */ && nodeIsPresent(func.body))) { + if (!(func.kind === 178 /* Constructor */ && nodeIsPresent(func.body))) { error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } - if (func.kind === 176 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { + if (func.kind === 178 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { error(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); } } @@ -73389,13 +73565,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (func.parameters.indexOf(node) !== 0) { error(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); } - if (func.kind === 176 /* Constructor */ || func.kind === 180 /* ConstructSignature */ || func.kind === 185 /* ConstructorType */) { + if (func.kind === 178 /* Constructor */ || func.kind === 182 /* ConstructSignature */ || func.kind === 187 /* ConstructorType */) { error(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); } - if (func.kind === 219 /* ArrowFunction */) { + if (func.kind === 221 /* ArrowFunction */) { error(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); } - if (func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) { + if (func.kind === 179 /* GetAccessor */ || func.kind === 180 /* SetAccessor */) { error(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); } } @@ -73450,13 +73626,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getTypePredicateParent(node) { switch (node.parent.kind) { - case 219 /* ArrowFunction */: - case 179 /* CallSignature */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 184 /* FunctionType */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 221 /* ArrowFunction */: + case 181 /* CallSignature */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 186 /* FunctionType */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: const parent2 = node.parent; if (node === parent2.type) { return parent2; @@ -73476,7 +73652,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { predicateVariableName ); return true; - } else if (name.kind === 207 /* ArrayBindingPattern */ || name.kind === 206 /* ObjectBindingPattern */) { + } else if (name.kind === 209 /* ArrayBindingPattern */ || name.kind === 208 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( name, predicateVariableNode, @@ -73488,9 +73664,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkSignatureDeclaration(node) { - if (node.kind === 181 /* IndexSignature */) { + if (node.kind === 183 /* IndexSignature */) { checkGrammarIndexSignature(node); - } else if (node.kind === 184 /* FunctionType */ || node.kind === 263 /* FunctionDeclaration */ || node.kind === 185 /* ConstructorType */ || node.kind === 179 /* CallSignature */ || node.kind === 176 /* Constructor */ || node.kind === 180 /* ConstructSignature */) { + } else if (node.kind === 186 /* FunctionType */ || node.kind === 265 /* FunctionDeclaration */ || node.kind === 187 /* ConstructorType */ || node.kind === 181 /* CallSignature */ || node.kind === 178 /* Constructor */ || node.kind === 182 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } const functionFlags = getFunctionFlags(node); @@ -73517,10 +73693,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const returnTypeNode = getEffectiveReturnTypeNode(node); if (noImplicitAny && !returnTypeNode) { switch (node.kind) { - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: error(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 179 /* CallSignature */: + case 181 /* CallSignature */: error(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -73542,7 +73718,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkAsyncFunctionReturnType(node, returnTypeNode); } } - if (node.kind !== 181 /* IndexSignature */ && node.kind !== 326 /* JSDocFunctionType */) { + if (node.kind !== 183 /* IndexSignature */ && node.kind !== 329 /* JSDocFunctionType */) { registerForUnusedIdentifiersCheck(node); } } @@ -73552,7 +73728,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const staticNames = new Map2(); const privateIdentifiers = new Map2(); for (const member of node.members) { - if (member.kind === 176 /* Constructor */) { + if (member.kind === 178 /* Constructor */) { for (const param of member.parameters) { if (isParameterPropertyDeclaration(param, member) && !isBindingPattern(param.name)) { addName(instanceNames, param.name, param.name.escapedText, 3 /* GetOrSetAccessor */); @@ -73570,19 +73746,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const memberName = name && getPropertyNameForPropertyNameNode(name); if (memberName) { switch (member.kind) { - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: addName(names, name, memberName, 1 /* GetAccessor */ | privateStaticFlags); break; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: addName(names, name, memberName, 2 /* SetAccessor */ | privateStaticFlags); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: addName(names, name, memberName, 8 /* Method */ | privateStaticFlags); break; } @@ -73635,7 +73811,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkObjectTypeForDuplicateDeclarations(node) { const names = new Map2(); for (const member of node.members) { - if (member.kind === 170 /* PropertySignature */) { + if (member.kind === 171 /* PropertySignature */) { let memberName; const name = member.name; switch (name.kind) { @@ -73659,7 +73835,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 267 /* InterfaceDeclaration */) { + if (node.kind === 270 /* InterfaceDeclaration */) { const nodeSymbol = getSymbolOfNode(node); if (nodeSymbol.declarations && nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -73695,7 +73871,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (type.symbol.declarations) { for (const decl of type.symbol.declarations) { - if (decl.kind === 269 /* EnumDeclaration */) { + if (decl.kind === 272 /* EnumDeclaration */) { const members = decl.members; for (let i = 0; i < members.length; ++i) { if (i > 1 && typeof getConstantValue2(members[i - 1]) !== typeof getConstantValue2(members[i])) { @@ -73767,7 +73943,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function evaluateAnnotationPropertyConstantExpression(expr) { switch (expr.kind) { - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: const value = evaluateAnnotationPropertyConstantExpression(expr.operand); if (typeof value === "number" || typeof value === "string" || typeof value === "boolean") { switch (expr.operator) { @@ -73786,7 +73962,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const left = evaluateAnnotationPropertyConstantExpression(expr.left); const right = evaluateAnnotationPropertyConstantExpression(expr.right); if (left !== void 0 && right !== void 0 && typeof left === typeof right) { @@ -73855,7 +74031,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: const elements = expr.elements; const result = new Array(elements.length); for (let i = 0; i < elements.length; ++i) { @@ -73879,7 +74055,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 8 /* NumericLiteral */: checkGrammarNumericLiteral(expr); return +expr.text; - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return evaluateAnnotationPropertyConstantExpression(expr.expression); case 79 /* Identifier */: if (isInfinityOrNaNString(expr.escapedText)) { @@ -73893,7 +74069,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return evaluateAnnotationPropertyConstantExpression(symbol.valueDeclaration.initializer); } break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (isConstantMemberAccess(expr)) { return getConstantValue2(expr); } @@ -73912,7 +74088,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } checkVariableLikeDeclaration(node); setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 171 /* PropertyDeclaration */ && node.initializer) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) { error(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); } if (isAnnotationPropertyDeclaration(node)) { @@ -74003,7 +74179,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 176 /* 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)) { @@ -74051,7 +74227,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isPrivateIdentifierClassElementDeclaration(n)) { return true; } - return n.kind === 171 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; + return n.kind === 172 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; } function checkConstructorDeclarationDiagnostics() { const containingClassDecl = node.parent; @@ -74114,20 +74290,20 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 177 /* GetAccessor */) { + if (node.kind === 179 /* 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 === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { const symbol = getSymbolOfNode(node); - const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); + const getter = getDeclarationOfKind(symbol, 179 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 180 /* SetAccessor */); if (getter && setter && !(getNodeCheckFlags(getter) & 1 /* TypeChecked */)) { getNodeLinks(getter).flags |= 1 /* TypeChecked */; const getterFlags = getEffectiveModifierFlags(getter); @@ -74148,7 +74324,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } const returnType = getTypeOfAccessors(getSymbolOfNode(node)); - if (node.kind === 177 /* GetAccessor */) { + if (node.kind === 179 /* GetAccessor */) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -74203,7 +74379,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkTypeReferenceNode(node) { checkGrammarTypeArguments(node, node.typeArguments); - if (node.kind === 183 /* TypeReference */ && node.typeName.jsdocDotPos !== void 0 && !isInJSFile(node) && !isInJSDoc(node)) { + if (node.kind === 185 /* TypeReference */ && node.typeName.jsdocDotPos !== void 0 && !isInJSFile(node) && !isInJSDoc(node)) { grammarErrorAtPos(node, node.typeName.jsdocDotPos, 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); } forEach(node.typeArguments, checkSourceElement); @@ -74267,7 +74443,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let seenRestElement = false; const hasNamedElement = some(elementTypes, isNamedTupleMember); for (const e of elementTypes) { - if (e.kind !== 202 /* NamedTupleMember */ && hasNamedElement) { + if (e.kind !== 204 /* NamedTupleMember */ && hasNamedElement) { grammarErrorOnNode(e, Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names); break; } @@ -74312,7 +74488,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const objectType = type.objectType; const indexType = type.indexType; if (isTypeAssignableTo(indexType, getIndexType(objectType, false))) { - if (accessNode.kind === 212 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { + if (accessNode.kind === 214 /* 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; @@ -74373,7 +74549,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { forEachChild(node, checkSourceElement); } function checkInferType(node) { - if (!findAncestor(node, (n) => n.parent && n.parent.kind === 194 /* ConditionalType */ && n.parent.extendsType === n)) { + if (!findAncestor(node, (n) => n.parent && n.parent.kind === 196 /* ConditionalType */ && n.parent.extendsType === n)) { grammarErrorOnNode(node, Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type); } checkSourceElement(node.typeParameter); @@ -74383,7 +74559,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!links.typeParametersChecked) { links.typeParametersChecked = true; const typeParameter = getDeclaredTypeOfTypeParameter(symbol); - const declarations = getDeclarationsOfKind(symbol, 167 /* TypeParameter */); + const declarations = getDeclarationsOfKind(symbol, 168 /* TypeParameter */); if (!areTypeParametersIdentical(declarations, [typeParameter], (decl) => [decl])) { const name = symbolToString(symbol); for (const declaration of declarations) { @@ -74421,10 +74597,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.dotDotDotToken && node.questionToken) { grammarErrorOnNode(node, Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest); } - if (node.type.kind === 190 /* OptionalType */) { + if (node.type.kind === 192 /* 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 === 191 /* RestType */) { + if (node.type.kind === 193 /* 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); @@ -74435,7 +74611,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function getEffectiveDeclarationFlags(n, flagsToCheck) { let flags = getCombinedModifierFlags(n); - if (n.parent.kind !== 267 /* InterfaceDeclaration */ && n.parent.kind !== 264 /* ClassDeclaration */ && n.parent.kind !== 232 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { + if (n.parent.kind !== 270 /* InterfaceDeclaration */ && n.parent.kind !== 266 /* ClassDeclaration */ && n.parent.kind !== 234 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { if (!(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { flags |= 1 /* Export */; } @@ -74508,7 +74684,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const errorNode2 = subsequentNode.name || subsequentNode; const subsequentName = subsequentNode.name; if (node.name && subsequentName && (isPrivateIdentifier(node.name) && isPrivateIdentifier(subsequentName) && node.name.escapedText === subsequentName.escapedText || isComputedPropertyName(node.name) && isComputedPropertyName(subsequentName) || isPropertyNameLiteral(node.name) && isPropertyNameLiteral(subsequentName) && getEscapedTextOfIdentifierOrLiteral(node.name) === getEscapedTextOfIdentifierOrLiteral(subsequentName))) { - const reportError = (node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); + const reportError = (node.kind === 176 /* MethodDeclaration */ || node.kind === 175 /* 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); @@ -74540,14 +74716,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { for (const current of declarations) { const node = current; const inAmbientContext = node.flags & 16777216 /* Ambient */; - const inAmbientContextOrInterface = node.parent && (node.parent.kind === 267 /* InterfaceDeclaration */ || node.parent.kind === 187 /* TypeLiteral */) || inAmbientContext; + const inAmbientContextOrInterface = node.parent && (node.parent.kind === 270 /* InterfaceDeclaration */ || node.parent.kind === 189 /* TypeLiteral */) || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = void 0; } - if ((node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */) && !inAmbientContext) { + if ((node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */) && !inAmbientContext) { hasNonAmbientClass = true; } - if (node.kind === 263 /* FunctionDeclaration */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 176 /* Constructor */) { + if (node.kind === 265 /* FunctionDeclaration */ || node.kind === 176 /* MethodDeclaration */ || node.kind === 175 /* MethodSignature */ || node.kind === 178 /* Constructor */) { functionDeclarations.push(node); const currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; @@ -74589,9 +74765,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }); } if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 /* Function */ && declarations) { - const relatedDiagnostics = filter(declarations, (d) => d.kind === 264 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); + const relatedDiagnostics = filter(declarations, (d) => d.kind === 266 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); forEach(declarations, (declaration) => { - const diagnostic = declaration.kind === 264 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 263 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; + const diagnostic = declaration.kind === 266 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 265 /* 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)), @@ -74670,43 +74846,43 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getDeclarationSpaces(decl) { let d = decl; switch (d.kind) { - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return 2 /* ExportType */; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return isAmbientModule(d) || getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4 /* ExportNamespace */ | 1 /* ExportValue */ : 4 /* ExportNamespace */; - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; - case 280 /* ExportAssignment */: - case 227 /* BinaryExpression */: + case 283 /* ExportAssignment */: + case 229 /* BinaryExpression */: const node2 = d; const expression = isExportAssignment(node2) ? node2.expression : node2.right; if (!isEntityNameExpression(expression)) { return 1 /* ExportValue */; } d = expression; - case 274 /* ImportEqualsDeclaration */: - case 277 /* NamespaceImport */: - case 276 /* ImportClause */: + case 277 /* ImportEqualsDeclaration */: + case 280 /* NamespaceImport */: + case 279 /* ImportClause */: let result = 0 /* None */; const target = resolveAlias(getSymbolOfNode(d)); forEach(target.declarations, (d2) => { result |= getDeclarationSpaces(d2); }); return result; - case 261 /* VariableDeclaration */: - case 208 /* BindingElement */: - case 263 /* FunctionDeclaration */: - case 279 /* ImportSpecifier */: + case 263 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 265 /* FunctionDeclaration */: + case 282 /* ImportSpecifier */: case 79 /* Identifier */: return 1 /* ExportValue */; default: @@ -74957,21 +75133,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { let headMessage; let expectedReturnType; switch (node.parent.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; const classSymbol = getSymbolOfNode(node.parent); const classConstructorType = getTypeOfSymbol(classSymbol); expectedReturnType = getUnionType([classConstructorType, voidType]); break; - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: headMessage = Diagnostics.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any; expectedReturnType = voidType; break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; const methodType = getTypeOfNode(node.parent); const descriptorType = createTypedPropertyDescriptorType(methodType); @@ -75017,15 +75193,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getEntityNameForDecoratorMetadata(node) { if (node) { switch (node.kind) { - case 193 /* IntersectionType */: - case 192 /* UnionType */: + case 195 /* IntersectionType */: + case 194 /* UnionType */: return getEntityNameForDecoratorMetadataFromTypeList(node.types); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return getEntityNameForDecoratorMetadataFromTypeList([node.trueType, node.falseType]); - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: + case 198 /* ParenthesizedType */: + case 204 /* NamedTupleMember */: return getEntityNameForDecoratorMetadata(node.type); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return node.typeName; } } @@ -75033,13 +75209,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function getEntityNameForDecoratorMetadataFromTypeList(types) { let commonEntityName; for (let typeNode of types) { - while (typeNode.kind === 196 /* ParenthesizedType */ || typeNode.kind === 202 /* NamedTupleMember */) { + while (typeNode.kind === 198 /* ParenthesizedType */ || typeNode.kind === 204 /* NamedTupleMember */) { typeNode = typeNode.type; } if (typeNode.kind === 145 /* NeverKeyword */) { continue; } - if (!strictNullChecks && (typeNode.kind === 201 /* LiteralType */ && typeNode.literal.kind === 105 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { + if (!strictNullChecks && (typeNode.kind === 203 /* LiteralType */ && typeNode.literal.kind === 105 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { continue; } const individualEntityName = getEntityNameForDecoratorMetadata(typeNode); @@ -75099,9 +75275,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } switch (annotatedDecl.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: const enclosingDecl = annotatedDecl.parent; Debug.assert(isClassDeclaration(enclosingDecl)); if (hasSyntacticModifier(enclosingDecl, 256 /* Abstract */)) { @@ -75132,10 +75308,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: ident = da.expression; break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: ident = da.expression; break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: ident = getIdentifierFromEntityNameExpression(da.expression.expression); break; default: @@ -75190,13 +75366,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */); - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { checkExternalEmitHelpers(firstDecorator, 32 /* Param */); } if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */); switch (node.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: const constructor = getFirstConstructorWithBody(node); if (constructor) { for (const parameter of constructor.parameters) { @@ -75204,22 +75380,22 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - const otherKind = node.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + const otherKind = node.kind === 179 /* GetAccessor */ ? 180 /* SetAccessor */ : 179 /* GetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfNode(node), otherKind); markDecoratorMedataDataTypeNodeAsReferenced(getAnnotatedAccessorTypeNode(node) || otherAccessor && getAnnotatedAccessorTypeNode(otherAccessor)); break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: for (const parameter of node.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(node)); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveTypeAnnotationNode(node)); break; - case 168 /* Parameter */: + case 169 /* Parameter */: markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); const containingSignature = node.parent; for (const parameter of containingSignature.parameters) { @@ -75317,7 +75493,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (node.kind) { case 79 /* Identifier */: return node; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return node.name; default: return void 0; @@ -75328,7 +75504,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkDecorators(node); checkSignatureDeclaration(node); const functionFlags = getFunctionFlags(node); - if (node.name && node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { @@ -75344,7 +75520,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkFunctionOrConstructorSymbol(symbol); } } - const body = node.kind === 173 /* MethodSignature */ ? void 0 : node.body; + const body = node.kind === 175 /* MethodSignature */ ? void 0 : node.body; checkSourceElement(body); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node)); addLazyDiagnostic(checkFunctionOrMethodDeclarationDiagnostics); @@ -75380,43 +75556,43 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) { for (const node of potentiallyUnusedIdentifiers) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: checkUnusedClassMembers(node, addDiagnostic); checkUnusedTypeParameters(node, addDiagnostic); break; - case 314 /* SourceFile */: - case 270 /* ModuleDeclaration */: - case 242 /* Block */: - case 272 /* CaseBlock */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 317 /* SourceFile */: + case 273 /* ModuleDeclaration */: + case 244 /* Block */: + case 275 /* CaseBlock */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: checkUnusedLocalsAndParameters(node, addDiagnostic); break; - case 176 /* Constructor */: - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* Constructor */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: if (node.body) { checkUnusedLocalsAndParameters(node, addDiagnostic); } checkUnusedTypeParameters(node, addDiagnostic); break; - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: checkUnusedTypeParameters(node, addDiagnostic); break; - case 195 /* InferType */: + case 197 /* InferType */: checkUnusedInferTypeParameter(node, addDiagnostic); break; default: @@ -75435,11 +75611,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkUnusedClassMembers(node, addDiagnostic) { for (const member of node.members) { switch (member.kind) { - case 174 /* MethodDeclaration */: - case 171 /* PropertyDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - if (member.kind === 178 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { + case 176 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + if (member.kind === 180 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { break; } const symbol = getSymbolOfNode(member); @@ -75447,16 +75623,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; - case 176 /* Constructor */: + case 178 /* 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 181 /* IndexSignature */: - case 241 /* SemicolonClassElement */: - case 175 /* ClassStaticBlockDeclaration */: + case 183 /* IndexSignature */: + case 243 /* SemicolonClassElement */: + case 177 /* ClassStaticBlockDeclaration */: break; default: Debug.fail("Unexpected class member"); @@ -75480,7 +75656,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue; const name = idText(typeParameter.name); const { parent: parent2 } = typeParameter; - if (parent2.kind !== 195 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { + if (parent2.kind !== 197 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { if (tryAddToSet(seenParentsWithEveryUnused, parent2)) { const sourceFile = getSourceFileOfNode(parent2); const range = isJSDocTemplateTag(parent2) ? rangeOfNode(parent2) : rangeOfTypeParameters(sourceFile, parent2.typeParameters); @@ -75560,7 +75736,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }); unusedImports.forEach(([importClause, unuseds]) => { const importDecl = importClause.parent; - const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 277 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); + const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 280 /* 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 { @@ -75571,7 +75747,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 261 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 262 /* VariableDeclarationList */) { + if (bindingElements.length === 1 && bindingPattern.parent.kind === 263 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 264 /* 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)); @@ -75584,7 +75760,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }); 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 === 244 /* 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 === 246 /* 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))); @@ -75613,21 +75789,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (name.kind) { case 79 /* Identifier */: return idText(name); - case 207 /* ArrayBindingPattern */: - case 206 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: return bindingNameText(cast(first(name.elements), isBindingElement).name); default: return Debug.assertNever(name); } } function isImportedDeclaration(node) { - return node.kind === 276 /* ImportClause */ || node.kind === 279 /* ImportSpecifier */ || node.kind === 277 /* NamespaceImport */; + return node.kind === 279 /* ImportClause */ || node.kind === 282 /* ImportSpecifier */ || node.kind === 280 /* NamespaceImport */; } function importClauseFromImported(decl) { - return decl.kind === 276 /* ImportClause */ ? decl : decl.kind === 277 /* NamespaceImport */ ? decl.parent : decl.parent.parent; + return decl.kind === 279 /* ImportClause */ ? decl : decl.kind === 280 /* NamespaceImport */ ? decl.parent : decl.parent.parent; } function checkBlock(node) { - if (node.kind === 242 /* Block */) { + if (node.kind === 244 /* Block */) { checkGrammarStatementInAmbientContext(node); } if (isFunctionOrModuleBlock(node)) { @@ -75655,7 +75831,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if ((identifier == null ? void 0 : identifier.escapedText) !== name) { return false; } - if (node.kind === 171 /* PropertyDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */ || node.kind === 305 /* PropertyAssignment */) { + if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 176 /* MethodDeclaration */ || node.kind === 175 /* MethodSignature */ || node.kind === 179 /* GetAccessor */ || node.kind === 180 /* SetAccessor */ || node.kind === 308 /* PropertyAssignment */) { return false; } if (node.flags & 16777216 /* Ambient */) { @@ -75711,7 +75887,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 314 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { + if (parent2.kind === 317 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { errorSkippedOn( "noEmit", name, @@ -75729,7 +75905,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 314 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 2048 /* HasAsyncFunctions */) { + if (parent2.kind === 317 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 2048 /* HasAsyncFunctions */) { errorSkippedOn( "noEmit", name, @@ -75811,7 +75987,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if ((getCombinedNodeFlags(node) & 3 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { return; } - if (node.kind === 261 /* VariableDeclaration */ && !node.initializer) { + if (node.kind === 263 /* VariableDeclaration */ && !node.initializer) { return; } const symbol = getSymbolOfNode(node); @@ -75821,9 +75997,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const localDeclarationSymbol = resolveName(node, node.name.escapedText, 3 /* Variable */, void 0, void 0, false); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3 /* BlockScoped */) { - const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 262 /* VariableDeclarationList */); - const container = varDeclList.parent.kind === 244 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; - const namesShareScope = container && (container.kind === 242 /* Block */ && isFunctionLike(container.parent) || container.kind === 271 /* ModuleBlock */ || container.kind === 270 /* ModuleDeclaration */ || container.kind === 314 /* SourceFile */); + const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 264 /* VariableDeclarationList */); + const container = varDeclList.parent.kind === 246 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; + const namesShareScope = container && (container.kind === 244 /* Block */ && isFunctionLike(container.parent) || container.kind === 274 /* ModuleBlock */ || container.kind === 273 /* ModuleDeclaration */ || container.kind === 317 /* 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); @@ -75844,7 +76020,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!node.name) { return; } - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (hasOnlyExpressionInitializer(node) && node.initializer) { checkExpressionCached(node.initializer); @@ -75858,7 +76034,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < 5 /* ES2018 */) { checkExternalEmitHelpers(node, 4 /* Rest */); } - if (node.propertyName && node.propertyName.kind === 166 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } const parent2 = node.parent.parent; @@ -75878,7 +76054,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } if (isBindingPattern(node.name)) { - if (node.name.kind === 207 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { + if (node.name.kind === 209 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512 /* Read */); } forEach(node.name.elements, checkSourceElement); @@ -75888,7 +76064,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } if (isBindingPattern(node.name)) { - const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 250 /* ForInStatement */; + const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 252 /* ForInStatement */; const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression)); if (needCheckInitializer || needCheckWidenedType) { const widenedType = getWidenedTypeForVariableLikeDeclaration(node); @@ -75911,7 +76087,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const symbol = getSymbolOfNode(node); - if (symbol.flags & 2097152 /* Alias */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.kind === 208 /* BindingElement */ ? node.parent.parent : node)) { + if (symbol.flags & 2097152 /* Alias */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.kind === 210 /* BindingElement */ ? node.parent.parent : node)) { checkAliasSymbol(node); return; } @@ -75920,7 +76096,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 250 /* ForInStatement */) { + if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 252 /* ForInStatement */) { checkTypeAssignableToAndOptionallyElaborate(checkExpressionCached(initializer), type, node, initializer, void 0); } } @@ -75941,9 +76117,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } } - if (node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 170 /* PropertySignature */ && node.kind !== 172 /* AnnotationPropertyDeclaration */) { + if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 173 /* AnnotationPropertyDeclaration */) { checkExportsOnMergedDeclarations(node); - if (node.kind === 261 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { + if (node.kind === 263 /* VariableDeclaration */ || node.kind === 210 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionsForDeclarationName(node, node.name); @@ -75951,7 +76127,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) { const nextDeclarationName = getNameOfDeclaration(nextDeclaration); - const message = nextDeclaration.kind === 171 /* PropertyDeclaration */ || nextDeclaration.kind === 170 /* 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 === 172 /* PropertyDeclaration */ || nextDeclaration.kind === 171 /* 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, @@ -75968,7 +76144,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function areDeclarationFlagsIdentical(left, right) { - if (left.kind === 168 /* Parameter */ && right.kind === 261 /* VariableDeclaration */ || left.kind === 261 /* VariableDeclaration */ && right.kind === 168 /* Parameter */) { + if (left.kind === 169 /* Parameter */ && right.kind === 263 /* VariableDeclaration */ || left.kind === 263 /* VariableDeclaration */ && right.kind === 169 /* Parameter */) { return true; } if (hasQuestionToken(left) !== hasQuestionToken(right)) { @@ -76004,7 +76180,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const type = checkTruthinessExpression(node.expression); checkTestingKnownTruthyCallableOrAwaitableType(node.expression, type, node.thenStatement); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 243 /* EmptyStatement */) { + if (node.thenStatement.kind === 245 /* EmptyStatement */) { error(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -76120,12 +76296,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 262 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 264 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 262 /* VariableDeclarationList */) { + if (node.initializer.kind === 264 /* VariableDeclarationList */) { forEach(node.initializer.declarations, checkVariableDeclaration); } else { checkExpression(node.initializer); @@ -76155,12 +76331,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(node, 256 /* ForOfIncludes */); } - if (node.initializer.kind === 262 /* VariableDeclarationList */) { + if (node.initializer.kind === 264 /* VariableDeclarationList */) { checkForInOrForOfVariableDeclaration(node); } else { const varExpr = node.initializer; const iteratedType = checkRightHandSideOfForOf(node); - if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { + if (varExpr.kind === 211 /* ArrayLiteralExpression */ || varExpr.kind === 212 /* ObjectLiteralExpression */) { checkDestructuringAssignment(varExpr, iteratedType || errorType); } else { const leftType = checkExpression(varExpr); @@ -76182,7 +76358,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); const rightType = getNonNullableTypeIfNeeded(checkExpression(node.expression)); - if (node.initializer.kind === 262 /* VariableDeclarationList */) { + if (node.initializer.kind === 264 /* 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); @@ -76191,7 +76367,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { const varExpr = node.initializer; const leftType = checkExpression(varExpr); - if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { + if (varExpr.kind === 211 /* ArrayLiteralExpression */ || varExpr.kind === 212 /* 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); @@ -76748,11 +76924,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const functionFlags = getFunctionFlags(container); if (strictNullChecks || node.expression || returnType.flags & 131072 /* Never */) { const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType; - if (container.kind === 178 /* SetAccessor */) { + if (container.kind === 180 /* SetAccessor */) { if (node.expression) { error(node, Diagnostics.Setters_cannot_return_a_value); } - } else if (container.kind === 176 /* Constructor */) { + } else if (container.kind === 178 /* 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); } @@ -76763,7 +76939,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression); } } - } else if (container.kind !== 176 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) { + } else if (container.kind !== 178 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) { error(node, Diagnostics.Not_all_code_paths_return_a_value); } } @@ -76788,7 +76964,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const expressionType = checkExpression(node.expression); const expressionIsLiteral = isLiteralType3(expressionType); forEach(node.caseBlock.clauses, (clause) => { - if (clause.kind === 299 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 302 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === void 0) { firstDefaultClause = clause; } else { @@ -76796,7 +76972,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { hasDuplicateDefaultClause = true; } } - if (clause.kind === 298 /* CaseClause */) { + if (clause.kind === 301 /* CaseClause */) { addLazyDiagnostic(createLazyCaseClauseDiagnostics(clause)); } forEach(clause.statements, checkSourceElement); @@ -76828,7 +77004,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isFunctionLike(current)) { return "quit"; } - if (current.kind === 257 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { + if (current.kind === 259 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { grammarErrorOnNode(node.label, Diagnostics.Duplicate_label_0, getTextOfNode(node.label)); return true; } @@ -76912,8 +77088,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return; } const indexInfos = getApplicableIndexInfos(type, propNameType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 267 /* InterfaceDeclaration */) : void 0; - const propDeclaration = declaration && declaration.kind === 227 /* BinaryExpression */ || name && name.kind === 166 /* ComputedPropertyName */ ? declaration : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 270 /* InterfaceDeclaration */) : void 0; + const propDeclaration = declaration && declaration.kind === 229 /* BinaryExpression */ || name && name.kind === 167 /* ComputedPropertyName */ ? declaration : void 0; const localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : void 0; for (const info of indexInfos) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : void 0; @@ -76937,7 +77113,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkIndexConstraintForIndexSignature(type, checkInfo) { const declaration = checkInfo.declaration; const indexInfos = getApplicableIndexInfos(type, checkInfo.keyType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 267 /* InterfaceDeclaration */) : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 270 /* InterfaceDeclaration */) : void 0; const localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfNode(declaration)) === type.symbol ? declaration : void 0; for (const info of indexInfos) { if (info === checkInfo) @@ -77042,7 +77218,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkTypeParametersNotReferenced(root, typeParameters, index) { visit(root); function visit(node) { - if (node.kind === 183 /* TypeReference */) { + if (node.kind === 185 /* TypeReference */) { const type = getTypeFromTypeReference(node); if (type.flags & 262144 /* TypeParameter */) { for (let i = index; i < typeParameters.length; i++) { @@ -77469,7 +77645,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getCheckFlags(s) & 1 /* Instantiated */ ? s.target : s; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { - return filter(symbol.declarations, (d) => d.kind === 264 /* ClassDeclaration */ || d.kind === 267 /* InterfaceDeclaration */); + return filter(symbol.declarations, (d) => d.kind === 266 /* ClassDeclaration */ || d.kind === 270 /* InterfaceDeclaration */); } function checkKindsOfPropertyMemberOverrides(type, baseType) { var _a2, _b, _c, _d; @@ -77499,7 +77675,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue basePropertyCheck; } } - if (derivedClassDecl.kind === 232 /* ClassExpression */) { + if (derivedClassDecl.kind === 234 /* ClassExpression */) { error( derivedClassDecl, Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, @@ -77534,7 +77710,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 171 /* PropertyDeclaration */ && !d.initializer); + const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 172 /* 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; @@ -77637,7 +77813,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function isPropertyWithoutInitializer(node) { - return node.kind === 171 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; + return node.kind === 172 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; } function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) { for (const staticBlock of staticBlocks) { @@ -77671,7 +77847,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkExportsOnMergedDeclarations(node); const symbol = getSymbolOfNode(node); checkTypeParameterListsIdentical(symbol); - const firstInterfaceDecl = getDeclarationOfKind(symbol, 267 /* InterfaceDeclaration */); + const firstInterfaceDecl = getDeclarationOfKind(symbol, 270 /* InterfaceDeclaration */); if (node === firstInterfaceDecl) { const type = getDeclaredTypeOfSymbol(symbol); const typeWithThis = getTypeWithThisArgument(type); @@ -77770,7 +77946,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return value; function evaluate(expr) { switch (expr.kind) { - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: const value2 = evaluate(expr.operand); if (typeof value2 === "number") { switch (expr.operator) { @@ -77783,7 +77959,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const left = evaluate(expr.left); const right = evaluate(expr.right); if (typeof left === "number" && typeof right === "number") { @@ -77823,7 +77999,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 8 /* NumericLiteral */: checkGrammarNumericLiteral(expr); return +expr.text; - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return evaluate(expr.expression); case 79 /* Identifier */: const identifier = expr; @@ -77831,13 +78007,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return +identifier.escapedText; } return nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText); - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: if (isConstantMemberAccess(expr)) { const type = getTypeOfExpression(expr.expression); if (type.symbol && type.symbol.flags & 384 /* Enum */) { let name; - if (expr.kind === 211 /* PropertyAccessExpression */) { + if (expr.kind === 213 /* PropertyAccessExpression */) { name = expr.name.escapedText; } else { name = escapeLeadingUnderscores(cast(expr.argumentExpression, isLiteralExpression).text); @@ -77871,7 +78047,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (type === errorType) { return false; } - return node.kind === 79 /* Identifier */ || node.kind === 211 /* PropertyAccessExpression */ && isConstantMemberAccess(node.expression) || node.kind === 212 /* ElementAccessExpression */ && isConstantMemberAccess(node.expression) && isStringLiteralLike(node.argumentExpression); + return node.kind === 79 /* Identifier */ || node.kind === 213 /* PropertyAccessExpression */ && isConstantMemberAccess(node.expression) || node.kind === 214 /* ElementAccessExpression */ && isConstantMemberAccess(node.expression) && isStringLiteralLike(node.argumentExpression); } function checkEnumDeclaration(node) { addLazyDiagnostic(() => checkEnumDeclarationWorker(node)); @@ -77895,7 +78071,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let seenEnumMissingInitialInitializer = false; forEach(enumSymbol.declarations, (declaration) => { - if (declaration.kind !== 269 /* EnumDeclaration */) { + if (declaration.kind !== 272 /* EnumDeclaration */) { return false; } const enumDeclaration = declaration; @@ -77922,7 +78098,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const declarations = symbol.declarations; if (declarations) { for (const declaration of declarations) { - if ((declaration.kind === 264 /* ClassDeclaration */ || declaration.kind === 263 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { + if ((declaration.kind === 266 /* ClassDeclaration */ || declaration.kind === 265 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { return declaration; } } @@ -77978,7 +78154,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 264 /* ClassDeclaration */); + const mergedClass = getDeclarationOfKind(symbol, 266 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 32768 /* LexicalModuleMergesWithClass */; } @@ -78009,21 +78185,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: for (const decl of node.declarationList.declarations) { checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 280 /* ExportAssignment */: - case 281 /* ExportDeclaration */: + case 283 /* ExportAssignment */: + case 284 /* ExportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 274 /* ImportEqualsDeclaration */: - case 275 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 208 /* BindingElement */: - case 261 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 263 /* VariableDeclaration */: const name = node.name; if (isBindingPattern(name)) { for (const el of name.elements) { @@ -78031,12 +78207,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } break; } - case 264 /* ClassDeclaration */: - case 269 /* EnumDeclaration */: - case 263 /* FunctionDeclaration */: - case 267 /* InterfaceDeclaration */: - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 266 /* ClassDeclaration */: + case 272 /* EnumDeclaration */: + case 265 /* FunctionDeclaration */: + case 270 /* InterfaceDeclaration */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: if (isGlobalAugmentation) { return; } @@ -78047,12 +78223,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (node.kind) { case 79 /* Identifier */: return node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.left; } while (node.kind !== 79 /* Identifier */); return node; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: do { if (isModuleExportsAccessExpression(node.expression) && !isPrivateIdentifier(node.name)) { return node.name; @@ -78071,9 +78247,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { error(moduleName, Diagnostics.String_literal_expected); return false; } - const inAmbientExternalModule = node.parent.kind === 271 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - if (node.parent.kind !== 314 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 281 /* 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 === 274 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + if (node.parent.kind !== 317 /* SourceFile */ && !inAmbientExternalModule) { + error(moduleName, node.kind === 284 /* 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)) { @@ -78102,8 +78278,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 283 /* NamespaceExport */); - if (node.kind === 284 /* ExportSpecifier */) { + Debug.assert(node.kind !== 286 /* NamespaceExport */); + if (node.kind === 287 /* 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) { @@ -78117,7 +78293,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } else { - Debug.assert(node.kind !== 261 /* VariableDeclaration */); + Debug.assert(node.kind !== 263 /* 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); @@ -78133,7 +78309,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 284 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + const message = node.kind === 287 /* 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 (compilerOptions.isolatedModules && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 16777216 /* Ambient */)) { @@ -78141,25 +78317,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const isType3 = !(targetFlags & 111551 /* Value */); if (isType3 || typeOnlyAlias) { switch (node.kind) { - case 276 /* ImportClause */: - case 279 /* ImportSpecifier */: - case 274 /* ImportEqualsDeclaration */: { + case 279 /* ImportClause */: + case 282 /* ImportSpecifier */: + case 277 /* ImportEqualsDeclaration */: { if (compilerOptions.preserveValueImports) { Debug.assertIsDefined(node.name, "An ImportClause with a symbol should have a name"); const message = isType3 ? Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_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 === 279 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); + const name = idText(node.kind === 282 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); addTypeOnlyDeclarationRelatedInfo( error(node, message, name), isType3 ? void 0 : typeOnlyAlias, name ); } - if (isType3 && node.kind === 274 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { + if (isType3 && node.kind === 277 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { error(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided); } break; } - case 284 /* ExportSpecifier */: { + case 287 /* ExportSpecifier */: { if (getSourceFileOfNode(typeOnlyAlias) !== getSourceFileOfNode(node)) { const message = isType3 ? Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isolatedModules_is_enabled; const name = idText(node.propertyName || node.name); @@ -78228,7 +78404,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkImportBinding(node) { checkCollisionsForDeclarationName(node, node.name); checkAliasSymbol(node); - if (node.kind === 279 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (node.kind === 282 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { checkExternalEmitHelpers(node, 131072 /* ImportDefault */); } } @@ -78275,7 +78451,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 277 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 280 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); if (moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && getESModuleInterop(compilerOptions)) { checkExternalEmitHelpers(node, 65536 /* ImportStar */); @@ -78301,7 +78477,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (hasSyntacticModifier(node, 1 /* Export */)) { markExportAsReferenced(node); } - if (node.moduleReference.kind !== 286 /* ExternalModuleReference */) { + if (node.moduleReference.kind !== 289 /* ExternalModuleReference */) { const target = resolveAlias(getSymbolOfNode(node)); if (target !== unknownSymbol) { const targetFlags = getAllSymbolFlags(target); @@ -78339,9 +78515,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause && !isNamespaceExport(node.exportClause)) { forEach(node.exportClause.elements, checkExportSpecifier); - const inAmbientExternalModule = node.parent.kind === 271 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 271 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; - if (node.parent.kind !== 314 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + const inAmbientExternalModule = node.parent.kind === 274 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 274 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; + if (node.parent.kind !== 317 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { error(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } else { @@ -78367,7 +78543,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkGrammarExportDeclaration(node) { var _a2; if (node.isTypeOnly) { - if (((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 282 /* NamedExports */) { + if (((_a2 = node.exportClause) == null ? void 0 : _a2.kind) === 285 /* NamedExports */) { return checkGrammarNamedImportsOrExports(node.exportClause); } else { return grammarErrorOnNode(node, Diagnostics.Only_named_exports_may_use_export_type); @@ -78376,7 +78552,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function checkGrammarModuleElementContext(node, errorMessage) { - const isInAppropriateContext = node.parent.kind === 314 /* SourceFile */ || node.parent.kind === 271 /* ModuleBlock */ || node.parent.kind === 270 /* ModuleDeclaration */; + const isInAppropriateContext = node.parent.kind === 317 /* SourceFile */ || node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 273 /* ModuleDeclaration */; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -78449,7 +78625,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: ident = node.expression; break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: ident = node.expression; break; default: @@ -78474,8 +78650,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (checkGrammarModuleElementContext(node, illegalContextMessage)) { return; } - const container = node.parent.kind === 314 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 270 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 317 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 273 /* ModuleDeclaration */ && !isAmbientModule(container)) { if (node.isExportEquals) { error(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } else { @@ -78587,186 +78763,188 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { const kind = node.kind; if (cancellationToken) { switch (kind) { - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } - if (kind >= 244 /* FirstStatement */ && kind <= 260 /* LastStatement */ && node.flowNode && !isReachableFlowNode(node.flowNode)) { + if (kind >= 246 /* FirstStatement */ && kind <= 262 /* LastStatement */ && node.flowNode && !isReachableFlowNode(node.flowNode)) { errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected); } switch (kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return checkTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return checkParameter(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return checkPropertyDeclaration(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return checkPropertySignature(node); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return checkPropertyDeclaration(node); - case 185 /* ConstructorType */: - case 184 /* FunctionType */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: + case 187 /* ConstructorType */: + case 186 /* FunctionType */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: return checkSignatureDeclaration(node); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return checkMethodDeclaration(node); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return checkClassStaticBlockDeclaration(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return checkConstructorDeclaration(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return checkAccessorDeclaration(node); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return checkTypeReferenceNode(node); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return checkTypePredicate(node); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return checkTypeQuery(node); - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: return checkTypeLiteral(node); - case 188 /* ArrayType */: + case 190 /* ArrayType */: return checkArrayType(node); - case 189 /* TupleType */: + case 191 /* TupleType */: return checkTupleType(node); - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 196 /* ParenthesizedType */: - case 190 /* OptionalType */: - case 191 /* RestType */: + case 198 /* ParenthesizedType */: + case 192 /* OptionalType */: + case 193 /* RestType */: return checkSourceElement(node.type); - case 197 /* ThisType */: + case 199 /* ThisType */: return checkThisType(node); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return checkTypeOperator(node); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return checkConditionalType(node); - case 195 /* InferType */: + case 197 /* InferType */: return checkInferType(node); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: return checkTemplateLiteralType(node); - case 205 /* ImportType */: + case 207 /* ImportType */: return checkImportType(node); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return checkNamedTupleMember(node); - case 337 /* JSDocAugmentsTag */: + case 340 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 338 /* JSDocImplementsTag */: + case 341 /* JSDocImplementsTag */: return checkJSDocImplementsTag(node); - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 333 /* JSDocLink */: - case 334 /* JSDocLinkCode */: - case 335 /* JSDocLinkPlain */: + case 336 /* JSDocLink */: + case 337 /* JSDocLinkCode */: + case 338 /* JSDocLinkPlain */: return checkJSDocLinkLikeTag(node); - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: return checkJSDocParameterTag(node); - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: return checkJSDocPropertyTag(node); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: checkJSDocFunctionType(node); - case 324 /* JSDocNonNullableType */: - case 323 /* JSDocNullableType */: - case 321 /* JSDocAllType */: - case 322 /* JSDocUnknownType */: - case 331 /* JSDocTypeLiteral */: + case 327 /* JSDocNonNullableType */: + case 326 /* JSDocNullableType */: + case 324 /* JSDocAllType */: + case 325 /* JSDocUnknownType */: + case 334 /* JSDocTypeLiteral */: checkJSDocTypeIsInJsFile(node); forEachChild(node, checkSourceElement); return; - case 327 /* JSDocVariadicType */: + case 330 /* JSDocVariadicType */: checkJSDocVariadicType(node); return; - case 318 /* JSDocTypeExpression */: + case 321 /* JSDocTypeExpression */: return checkSourceElement(node.type); - case 342 /* JSDocPublicTag */: - case 344 /* JSDocProtectedTag */: - case 343 /* JSDocPrivateTag */: + case 345 /* JSDocPublicTag */: + case 347 /* JSDocProtectedTag */: + case 346 /* JSDocPrivateTag */: return checkJSDocAccessibilityModifiers(node); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return checkIndexedAccessType(node); - case 200 /* MappedType */: + case 202 /* MappedType */: return checkMappedType(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 242 /* Block */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 274 /* ModuleBlock */: return checkBlock(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return checkVariableStatement(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return checkExpressionStatement(node); - case 246 /* IfStatement */: + case 248 /* IfStatement */: return checkIfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return checkDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return checkWhileStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return checkForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return checkForInStatement(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return checkForOfStatement(node); - case 252 /* ContinueStatement */: - case 253 /* BreakStatement */: + case 254 /* ContinueStatement */: + case 255 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return checkReturnStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return checkWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return checkSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return checkLabeledStatement(node); - case 258 /* ThrowStatement */: + case 260 /* ThrowStatement */: return checkThrowStatement(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return checkTryStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return checkBindingElement(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return checkClassDeclaration(node); - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return checkStructDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return checkAnnotationDeclaration(node); - case 267 /* InterfaceDeclaration */: + case 269 /* OverloadDeclaration */: + return; + case 270 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return checkImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return checkExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return checkExportAssignment(node); - case 243 /* EmptyStatement */: - case 260 /* DebuggerStatement */: + case 245 /* EmptyStatement */: + case 262 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 285 /* MissingDeclaration */: + case 288 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -78853,33 +79031,33 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { currentNode = node; instantiationCount = 0; switch (node.kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 169 /* Decorator */: - case 289 /* JsxOpeningElement */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 217 /* TaggedTemplateExpression */: + case 170 /* Decorator */: + case 292 /* JsxOpeningElement */: resolveUntypedCall(node); break; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: checkAccessorDeclaration(node); break; - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: checkClassExpressionDeferred(node); break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: checkTypeParameterDeferred(node); break; - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: checkJsxSelfClosingElementDeferred(node); break; - case 287 /* JsxElement */: + case 290 /* JsxElement */: checkJsxElementDeferred(node); break; } @@ -79043,27 +79221,27 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { copySymbols(location.locals, meaning); } switch (location.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (!isExternalModule(location)) break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: copyLocallyVisibleExportSymbols(getSymbolOfNode(location).exports, meaning & 2623475 /* ModuleMember */); break; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 8 /* EnumMember */); break; - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: const className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: if (!isStaticSymbol) { copySymbols(getMembersOfSymbol(getSymbolOfNode(location)), meaning & 788968 /* Type */); } break; - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: const funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -79096,7 +79274,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function copyLocallyVisibleExportSymbols(source, meaning2) { if (meaning2) { source.forEach((symbol) => { - if (!getDeclarationOfKind(symbol, 284 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 283 /* NamespaceExport */)) { + if (!getDeclarationOfKind(symbol, 287 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 286 /* NamespaceExport */)) { copySymbol(symbol, meaning2); } }); @@ -79107,16 +79285,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return name.kind === 79 /* Identifier */ && isTypeDeclaration(name.parent) && getNameOfDeclaration(name.parent) === name; } function isTypeReferenceIdentifier(node) { - while (node.parent.kind === 165 /* QualifiedName */) { + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 183 /* TypeReference */; + return node.parent.kind === 185 /* TypeReference */; } function isHeritageClauseElementIdentifier(node) { - while (node.parent.kind === 211 /* PropertyAccessExpression */) { + while (node.parent.kind === 213 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent.kind === 234 /* ExpressionWithTypeArguments */; + return node.parent.kind === 236 /* ExpressionWithTypeArguments */; } function forEachEnclosingClass(node, callback) { let result; @@ -79143,13 +79321,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return !!forEachEnclosingClass(node, (n) => n === classDeclaration); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 165 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 166 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 274 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 277 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } - if (nodeOnRightSide.parent.kind === 280 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 283 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } return void 0; @@ -79175,7 +79353,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { node = parent2; parent2 = parent2.parent; } - if (parent2 && parent2.kind === 205 /* ImportType */ && parent2.qualifier === node) { + if (parent2 && parent2.kind === 207 /* ImportType */ && parent2.qualifier === node) { return parent2; } return void 0; @@ -79184,7 +79362,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isDeclarationName(name)) { return getSymbolOfNode(name.parent); } - if (isInJSFile(name) && name.parent.kind === 211 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { + if (isInJSFile(name) && name.parent.kind === 213 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { if (!isPrivateIdentifier(name) && !isJSDocMemberName(name)) { const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(name); if (specialPropertyAssignmentSymbol) { @@ -79192,7 +79370,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - if (name.parent.kind === 280 /* ExportAssignment */ && isEntityNameExpression(name)) { + if (name.parent.kind === 283 /* ExportAssignment */ && isEntityNameExpression(name)) { const success = resolveEntityName( name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, @@ -79202,7 +79380,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return success; } } else if (isEntityName(name) && isInRightSideOfImportOrExportAssignment(name)) { - const importEqualsDeclaration = getAncestor(name, 274 /* ImportEqualsDeclaration */); + const importEqualsDeclaration = getAncestor(name, 277 /* ImportEqualsDeclaration */); Debug.assert(importEqualsDeclaration !== void 0); return getSymbolOfPartOfRightHandSideOfImportEquals(name, true); } @@ -79219,7 +79397,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (isHeritageClauseElementIdentifier(name)) { let meaning = 0 /* None */; - if (name.parent.kind === 234 /* ExpressionWithTypeArguments */) { + if (name.parent.kind === 236 /* ExpressionWithTypeArguments */) { meaning = 788968 /* Type */; if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) { meaning |= 111551 /* Value */; @@ -79233,10 +79411,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return entityNameSymbol; } } - if (name.parent.kind === 349 /* JSDocParameterTag */) { + if (name.parent.kind === 352 /* JSDocParameterTag */) { return getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 167 /* TypeParameter */ && name.parent.parent.kind === 353 /* JSDocTemplateTag */) { + if (name.parent.kind === 168 /* TypeParameter */ && name.parent.parent.kind === 356 /* JSDocTemplateTag */) { Debug.assert(!isInJSFile(name)); const typeParameter = getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -79268,12 +79446,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return result; } else if (isPrivateIdentifier(name)) { return getSymbolForPrivateIdentifierExpression(name); - } else if (name.kind === 211 /* PropertyAccessExpression */ || name.kind === 165 /* QualifiedName */) { + } else if (name.kind === 213 /* PropertyAccessExpression */ || name.kind === 166 /* QualifiedName */) { const links = getNodeLinks(name); if (links.resolvedSymbol) { return links.resolvedSymbol; } - if (name.kind === 211 /* PropertyAccessExpression */) { + if (name.kind === 213 /* PropertyAccessExpression */) { checkPropertyAccessExpression(name, 0 /* Normal */); if (!links.resolvedSymbol) { const expressionType = checkExpressionCached(name.expression); @@ -79313,11 +79491,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return resolveJSDocMemberName(name); } } else if (isTypeReferenceIdentifier(name)) { - const meaning = name.parent.kind === 183 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; + const meaning = name.parent.kind === 185 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; const symbol = resolveEntityName(name, meaning, true, true); return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name); } - if (name.parent.kind === 182 /* TypePredicate */) { + if (name.parent.kind === 184 /* TypePredicate */) { return resolveEntityName(name, 1 /* FunctionScopedVariable */, true); } return void 0; @@ -79342,7 +79520,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getSymbolAtLocation(node, ignoreErrors) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { return isExternalModule(node) ? getMergedSymbol(node.symbol) : void 0; } const { parent: parent2 } = node; @@ -79359,7 +79537,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (node.kind === 79 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); - } else if (parent2.kind === 208 /* BindingElement */ && grandParent.kind === 206 /* ObjectBindingPattern */ && node === parent2.propertyName) { + } else if (parent2.kind === 210 /* BindingElement */ && grandParent.kind === 208 /* ObjectBindingPattern */ && node === parent2.propertyName) { const typeOfPattern = getTypeOfNode(grandParent); const propertyDeclaration = getPropertyOfType(typeOfPattern, node.escapedText); if (propertyDeclaration) { @@ -79378,8 +79556,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { switch (node.kind) { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: - case 211 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: if (!isThisInTypeQuery(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); } @@ -79394,19 +79572,19 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isInExpressionContext(node)) { return checkExpression(node).symbol; } - case 197 /* ThisType */: + case 199 /* ThisType */: return getTypeFromThisTypeNode(node).symbol; case 107 /* SuperKeyword */: return checkExpression(node).symbol; case 136 /* ConstructorKeyword */: const constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 176 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 178 /* 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 === 275 /* ImportDeclaration */ || node.parent.kind === 281 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && isRequireCall(node.parent, false) || isImportCall(node.parent)) || isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent) { + if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 278 /* ImportDeclaration */ || node.parent.kind === 284 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && isRequireCall(node.parent, false) || isImportCall(node.parent)) || isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent) { return resolveExternalModuleName(node, node, ignoreErrors); } if (isCallExpression(parent2) && isBindableObjectDefinePropertyCall(parent2) && parent2.arguments[1] === node) { @@ -79420,14 +79598,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 38 /* EqualsGreaterThanToken */: case 84 /* ClassKeyword */: return getSymbolOfNode(node.parent); - case 205 /* ImportType */: + case 207 /* ImportType */: return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : void 0; case 94 /* ExportKeyword */: return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0; case 101 /* ImportKeyword */: case 104 /* NewKeyword */: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return checkExpression(node).symbol; default: return void 0; @@ -79443,7 +79621,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return void 0; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 306 /* ShorthandPropertyAssignment */) { + if (location && location.kind === 309 /* ShorthandPropertyAssignment */) { return resolveEntityName(location.name, 111551 /* Value */ | 2097152 /* Alias */, true); } return void 0; @@ -79528,16 +79706,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return getTypeOfNode(node); } function getTypeOfAssignmentPattern(expr) { - Debug.assert(expr.kind === 210 /* ObjectLiteralExpression */ || expr.kind === 209 /* ArrayLiteralExpression */); - if (expr.parent.kind === 251 /* ForOfStatement */) { + Debug.assert(expr.kind === 212 /* ObjectLiteralExpression */ || expr.kind === 211 /* ArrayLiteralExpression */); + if (expr.parent.kind === 253 /* ForOfStatement */) { const iteratedType = checkRightHandSideOfForOf(expr.parent); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 227 /* BinaryExpression */) { + if (expr.parent.kind === 229 /* BinaryExpression */) { const iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 305 /* PropertyAssignment */) { + if (expr.parent.kind === 308 /* PropertyAssignment */) { const node2 = cast(expr.parent.parent, isObjectLiteralExpression); const typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node2) || errorType; const propertyIndex = indexOfNode(node2.properties, expr.parent); @@ -79570,7 +79748,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 8 /* NumericLiteral */: case 10 /* StringLiteral */: return getStringLiteralType(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: const nameType = checkComputedPropertyName(name); return isTypeAssignableToKind(nameType, 12288 /* ESSymbolLike */) ? nameType : stringType; default: @@ -79661,7 +79839,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } const parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 314 /* SourceFile */) { + if (parentSymbol.flags & 512 /* ValueModule */ && ((_a2 = parentSymbol.valueDeclaration) == null ? void 0 : _a2.kind) === 317 /* SourceFile */) { const symbolFile = parentSymbol.valueDeclaration; const referenceFile = getSourceFileOfNode(node); const symbolIsUmdExport = symbolFile !== referenceFile; @@ -79686,7 +79864,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return void 0; } function isSymbolOfDestructuredElementOfCatchBinding(symbol) { - return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 301 /* CatchClause */; + return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 304 /* CatchClause */; } function isSymbolOfDeclarationWithCollidingName(symbol) { if (symbol.flags & 418 /* BlockScoped */ && symbol.valueDeclaration && !isSourceFile(symbol.valueDeclaration)) { @@ -79700,7 +79878,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else if (nodeLinks2.flags & 262144 /* CapturedBlockScopedBinding */) { const isDeclaredInLoop = nodeLinks2.flags & 524288 /* BlockScopedBindingInLoop */; const inLoopInitializer = isIterationStatement(container, false); - const inLoopBodyBlock = container.kind === 242 /* Block */ && isIterationStatement(container.parent, false); + const inLoopBodyBlock = container.kind === 244 /* Block */ && isIterationStatement(container.parent, false); links.isDeclarationWithCollidingName = !isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || !inLoopInitializer && !inLoopBodyBlock); } else { links.isDeclarationWithCollidingName = false; @@ -79735,25 +79913,25 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function isValueAliasDeclaration(node) { switch (node.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return isAliasResolvedToValue(getSymbolOfNode(node)); - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: const symbol = getSymbolOfNode(node); return !!symbol && isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: const exportClause = node.exportClause; return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration)); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return node.expression && node.expression.kind === 79 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfNode(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(nodeIn) { const node = getParseTreeNode(nodeIn, isImportEqualsDeclaration); - if (node === void 0 || node.parent.kind !== 314 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { + if (node === void 0 || node.parent.kind !== 317 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { return false; } const isValue = isAliasResolvedToValue(getSymbolOfNode(node)); @@ -79842,15 +80020,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function canHaveConstantValue(node) { switch (node.kind) { - case 308 /* EnumMember */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 311 /* EnumMember */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return true; } return false; } function getConstantValue2(node) { - if (node.kind === 308 /* EnumMember */) { + if (node.kind === 311 /* EnumMember */) { return getEnumMemberValue(node); } const symbol = getNodeLinks(node).resolvedSymbol; @@ -80048,7 +80226,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 79 /* Identifier */: ident = node.expression; break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: ident = node.expression; break; default: @@ -80155,12 +80333,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { getJsxFragmentFactoryEntity, getAllAccessorDeclarations(accessor) { accessor = getParseTreeNode(accessor, isGetOrSetAccessorDeclaration); - const otherKind = accessor.kind === 178 /* SetAccessor */ ? 177 /* GetAccessor */ : 178 /* SetAccessor */; + const otherKind = accessor.kind === 180 /* SetAccessor */ ? 179 /* GetAccessor */ : 180 /* SetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfNode(accessor), otherKind); const firstAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? otherAccessor : accessor; const secondAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? accessor : otherAccessor; - const setAccessor = accessor.kind === 178 /* SetAccessor */ ? accessor : otherAccessor; - const getAccessor = accessor.kind === 177 /* GetAccessor */ ? accessor : otherAccessor; + const setAccessor = accessor.kind === 180 /* SetAccessor */ ? accessor : otherAccessor; + const getAccessor = accessor.kind === 179 /* GetAccessor */ ? accessor : otherAccessor; return { firstAccessor, secondAccessor, @@ -80176,7 +80354,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { }, getDeclarationStatementsForSourceFile: (node, flags, tracker, bundled) => { const n = getParseTreeNode(node); - Debug.assert(n && n.kind === 314 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); + Debug.assert(n && n.kind === 317 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); const sym = getSymbolOfNode(node); if (!sym) { return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled); @@ -80288,18 +80466,18 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function isInHeritageClause(node) { - return node.parent && node.parent.kind === 234 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 300 /* HeritageClause */; + return node.parent && node.parent.kind === 236 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 303 /* HeritageClause */; } function getTypeReferenceDirectivesForEntityName(node) { if (!fileToDirective) { return void 0; } let meaning; - if (node.parent.kind === 166 /* ComputedPropertyName */) { + if (node.parent.kind === 167 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } else { meaning = 788968 /* Type */ | 1920 /* Namespace */; - if (node.kind === 79 /* Identifier */ && isInTypeQuery(node) || node.kind === 211 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { + if (node.kind === 79 /* Identifier */ && isInTypeQuery(node) || node.kind === 213 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } } @@ -80337,7 +80515,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 314 /* SourceFile */ && current.flags & 512 /* ValueModule */) { + if (current.valueDeclaration && current.valueDeclaration.kind === 317 /* SourceFile */ && current.flags & 512 /* ValueModule */) { return false; } for (const decl of symbol.declarations) { @@ -80362,12 +80540,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function getExternalModuleFileFromDeclaration(declaration) { - const specifier = declaration.kind === 270 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); + const specifier = declaration.kind === 273 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); const moduleSymbol = resolveExternalModuleNameWorker(specifier, specifier, void 0); if (!moduleSymbol) { return void 0; } - return getDeclarationOfKind(moduleSymbol, 314 /* SourceFile */); + return getDeclarationOfKind(moduleSymbol, 317 /* SourceFile */); } function initializeTypeChecker() { for (const file of host.getSourceFiles()) { @@ -80596,7 +80774,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return true; } if (!nodeCanBeDecorated(node, node.parent, node.parent.parent, compilerOptions)) { - const isMethodDeclarationAndNodeIsNotPresent = node.kind === 174 /* MethodDeclaration */ && !nodeIsPresent(node.body); + const isMethodDeclarationAndNodeIsNotPresent = node.kind === 176 /* MethodDeclaration */ && !nodeIsPresent(node.body); const message = isMethodDeclarationAndNodeIsNotPresent ? Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload : Diagnostics.Decorators_are_not_valid_here; for (const decorator of decorators) { if (!grammarErrorOnNode(decorator, message)) { @@ -80604,7 +80782,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } return true; - } else if (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */) { + } else if (node.kind === 179 /* GetAccessor */ || node.kind === 180 /* 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); @@ -80624,21 +80802,21 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue; } if (modifier.kind !== 147 /* ReadonlyKeyword */) { - if (node.kind === 170 /* PropertySignature */ || node.kind === 173 /* MethodSignature */) { + if (node.kind === 171 /* PropertySignature */ || node.kind === 175 /* MethodSignature */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_member, tokenToString(modifier.kind)); } - if (node.kind === 181 /* IndexSignature */ && (modifier.kind !== 125 /* StaticKeyword */ || !isClassLike(node.parent))) { + if (node.kind === 183 /* 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 !== 102 /* InKeyword */ && modifier.kind !== 146 /* OutKeyword */) { - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_parameter, tokenToString(modifier.kind)); } } switch (modifier.kind) { case 86 /* ConstKeyword */: - if (node.kind !== 269 /* EnumDeclaration */) { + if (node.kind !== 272 /* EnumDeclaration */) { return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(86 /* ConstKeyword */)); } break; @@ -80673,7 +80851,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 271 /* ModuleBlock */ || node.parent.kind === 314 /* SourceFile */) { + } else if (node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 317 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 256 /* Abstract */) { if (modifier.kind === 122 /* PrivateKeyword */) { @@ -80695,9 +80873,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 271 /* ModuleBlock */ || node.parent.kind === 314 /* SourceFile */) { + } else if (node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 317 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* 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"); @@ -80714,7 +80892,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 171 /* PropertyDeclaration */) { + } else if (node.kind !== 172 /* PropertyDeclaration */) { return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); } flags |= 128 /* Accessor */; @@ -80722,7 +80900,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 147 /* ReadonlyKeyword */: if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); - } else if (node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 170 /* PropertySignature */ && node.kind !== 181 /* IndexSignature */ && node.kind !== 168 /* Parameter */) { + } else if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 183 /* IndexSignature */ && node.kind !== 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } flags |= 64 /* Readonly */; @@ -80738,14 +80916,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } flags |= 1 /* Export */; break; case 89 /* DefaultKeyword */: - const container = node.parent.kind === 314 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 270 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 317 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 273 /* 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"); @@ -80761,9 +80939,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); - } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 271 /* ModuleBlock */) { + } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 274 /* 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"); @@ -80775,11 +80953,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 264 /* ClassDeclaration */ && node.kind !== 185 /* ConstructorType */) { - if (node.kind !== 174 /* MethodDeclaration */ && node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 177 /* GetAccessor */ && node.kind !== 178 /* SetAccessor */) { + if (node.kind !== 266 /* ClassDeclaration */ && node.kind !== 187 /* ConstructorType */) { + if (node.kind !== 176 /* MethodDeclaration */ && node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 179 /* GetAccessor */ && node.kind !== 180 /* SetAccessor */) { return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 264 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { + if (!(node.parent.kind === 266 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { return grammarErrorOnNode(modifier, Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } if (flags & 32 /* Static */) { @@ -80808,7 +80986,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } if (flags & 256 /* Abstract */) { @@ -80821,7 +80999,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { case 146 /* OutKeyword */: const inOutFlag = modifier.kind === 102 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; const inOutText = modifier.kind === 102 /* InKeyword */ ? "in" : "out"; - if (node.kind !== 167 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { + if (node.kind !== 168 /* 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) { @@ -80834,7 +81012,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { break; } } - if (node.kind === 176 /* Constructor */) { + if (node.kind === 178 /* Constructor */) { if (flags & 32 /* Static */) { return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -80845,11 +81023,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } return false; - } else if ((node.kind === 275 /* ImportDeclaration */ || node.kind === 274 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + } else if ((node.kind === 278 /* ImportDeclaration */ || node.kind === 277 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 168 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { + } else if (node.kind === 169 /* 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 === 168 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { + } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 512 /* Async */) { @@ -80862,49 +81040,51 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function shouldReportBadModifier(node) { switch (node.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 270 /* ModuleDeclaration */: - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 168 /* Parameter */: - case 167 /* TypeParameter */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 178 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* OverloadPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 183 /* IndexSignature */: + case 273 /* ModuleDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 169 /* Parameter */: + case 168 /* TypeParameter */: return false; - case 175 /* ClassStaticBlockDeclaration */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 273 /* NamespaceExportDeclaration */: - case 184 /* FunctionType */: - case 285 /* MissingDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 276 /* NamespaceExportDeclaration */: + case 186 /* FunctionType */: + case 288 /* MissingDeclaration */: return true; default: - if (node.parent.kind === 271 /* ModuleBlock */ || node.parent.kind === 314 /* SourceFile */) { + if (node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 317 /* SourceFile */) { return false; } switch (node.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return nodeHasAnyModifiersExcept(node, 133 /* AsyncKeyword */); - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 185 /* ConstructorType */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 187 /* ConstructorType */: return nodeHasAnyModifiersExcept(node, 127 /* AbstractKeyword */); - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 244 /* VariableStatement */: - case 268 /* TypeAliasDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 246 /* VariableStatement */: + case 271 /* TypeAliasDeclaration */: return true; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return nodeHasAnyModifiersExcept(node, 86 /* ConstKeyword */); default: Debug.assertNever(node); @@ -80922,10 +81102,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return false; } return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -81138,11 +81318,11 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 166 /* ComputedPropertyName */) { + if (node.kind !== 167 /* ComputedPropertyName */) { return false; } const computedPropertyName = node; - if (computedPropertyName.expression.kind === 227 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 27 /* CommaToken */) { + if (computedPropertyName.expression.kind === 229 /* 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; @@ -81150,7 +81330,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkGrammarForGenerator(node) { if (node.asteriskToken) { Debug.assert( - node.kind === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */ || node.kind === 174 /* MethodDeclaration */ + node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */ || node.kind === 176 /* MethodDeclaration */ ); if (node.flags & 16777216 /* Ambient */) { return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_allowed_in_an_ambient_context); @@ -81169,7 +81349,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { function checkGrammarObjectLiteralExpression(node, inDestructuring) { const seen = new Map2(); for (const prop of node.properties) { - if (prop.kind === 307 /* SpreadAssignment */) { + if (prop.kind === 310 /* SpreadAssignment */) { if (inDestructuring) { const expression = skipParentheses(prop.expression); if (isArrayLiteralExpression(expression) || isObjectLiteralExpression(expression)) { @@ -81179,10 +81359,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { continue; } const name = prop.name; - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { checkGrammarComputedPropertyName(name); } - if (prop.kind === 306 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 309 /* 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 */) { @@ -81190,7 +81370,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } if (canHaveModifiers(prop) && prop.modifiers) { for (const mod of prop.modifiers) { - if (isModifier(mod) && (mod.kind !== 133 /* AsyncKeyword */ || prop.kind !== 174 /* MethodDeclaration */)) { + if (isModifier(mod) && (mod.kind !== 133 /* AsyncKeyword */ || prop.kind !== 176 /* MethodDeclaration */)) { grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod)); } } @@ -81201,8 +81381,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } let currentKind; switch (prop.kind) { - case 306 /* ShorthandPropertyAssignment */: - case 305 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 308 /* 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 */) { @@ -81210,13 +81390,13 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } currentKind = 4 /* PropertyAssignment */; break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: currentKind = 8 /* Method */; break; - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: currentKind = 1 /* GetAccessor */; break; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: currentKind = 2 /* SetAccessor */; break; default: @@ -81253,7 +81433,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { checkGrammarTypeArguments(node, node.typeArguments); const seen = new Map2(); for (const attr of node.attributes.properties) { - if (attr.kind === 296 /* JsxSpreadAttribute */) { + if (attr.kind === 299 /* JsxSpreadAttribute */) { continue; } const { name, initializer } = attr; @@ -81262,7 +81442,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } else { return grammarErrorOnNode(name, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } - if (initializer && initializer.kind === 297 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 300 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(initializer, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -81297,7 +81477,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 251 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { + if (forInOrOfStatement.kind === 253 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { if (!(forInOrOfStatement.flags & 32768 /* AwaitContext */)) { const sourceFile = getSourceFileOfNode(forInOrOfStatement); if (isInTopLevelContext(forInOrOfStatement)) { @@ -81337,7 +81517,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 !== 176 /* Constructor */) { + if (func && func.kind !== 178 /* 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); @@ -81353,7 +81533,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { grammarErrorOnNode(forInOrOfStatement.initializer, Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async); return false; } - if (forInOrOfStatement.initializer.kind === 262 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 264 /* VariableDeclarationList */) { const variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { const declarations = variableList.declarations; @@ -81361,16 +81541,16 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } if (declarations.length > 1) { - const diagnostic = forInOrOfStatement.kind === 250 /* 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 === 252 /* 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 === 250 /* 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 === 252 /* 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 === 250 /* 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 === 252 /* 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); } } @@ -81378,7 +81558,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function checkGrammarAccessor(accessor) { - if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 187 /* TypeLiteral */ && accessor.parent.kind !== 267 /* InterfaceDeclaration */) { + if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 189 /* TypeLiteral */ && accessor.parent.kind !== 270 /* InterfaceDeclaration */) { if (languageVersion < 1 /* ES5 */) { return grammarErrorOnNode(accessor.name, Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); } @@ -81393,7 +81573,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (hasSyntacticModifier(accessor, 256 /* Abstract */)) { return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } - if (accessor.parent.kind === 187 /* TypeLiteral */ || accessor.parent.kind === 267 /* InterfaceDeclaration */) { + if (accessor.parent.kind === 189 /* TypeLiteral */ || accessor.parent.kind === 270 /* InterfaceDeclaration */) { return grammarErrorOnNode(accessor.body, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } } @@ -81403,10 +81583,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (!doesAccessorHaveCorrectParameterCount(accessor)) { return grammarErrorOnNode( accessor.name, - accessor.kind === 177 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter + accessor.kind === 179 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter ); } - if (accessor.kind === 178 /* SetAccessor */) { + if (accessor.kind === 180 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -81424,10 +81604,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return false; } function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 179 /* GetAccessor */ ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 179 /* GetAccessor */ ? 1 : 2)) { return getThisParameter(accessor); } } @@ -81444,7 +81624,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } switch (parent2.kind) { - case 261 /* VariableDeclaration */: + case 263 /* 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); @@ -81456,12 +81636,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return grammarErrorOnNode(parent2.name, Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const); } break; - case 171 /* PropertyDeclaration */: + case 172 /* 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 170 /* PropertySignature */: + case 171 /* 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); } @@ -81470,7 +81650,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_not_allowed_here); } } else if (node.operator === 147 /* ReadonlyKeyword */) { - if (node.type.kind !== 188 /* ArrayType */ && node.type.kind !== 189 /* TupleType */) { + if (node.type.kind !== 190 /* ArrayType */ && node.type.kind !== 191 /* TupleType */) { return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(154 /* SymbolKeyword */)); } } @@ -81484,8 +81664,8 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (checkGrammarFunctionLikeDeclaration(node)) { return true; } - if (node.kind === 174 /* MethodDeclaration */) { - if (node.parent.kind === 210 /* ObjectLiteralExpression */) { + if (node.kind === 176 /* MethodDeclaration */) { + if (node.parent.kind === 212 /* 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)) { @@ -81506,12 +81686,12 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } 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 === 174 /* MethodDeclaration */ && !node.body) { + } else if (node.kind === 176 /* 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 === 267 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 270 /* 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 === 187 /* TypeLiteral */) { + } else if (node.parent.kind === 189 /* 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); } } @@ -81522,17 +81702,17 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: if (node.label && current.label.escapedText === node.label.escapedText) { - const isMisplacedContinueLabel = node.kind === 252 /* ContinueStatement */ && !isIterationStatement(current.statement, true); + const isMisplacedContinueLabel = node.kind === 254 /* ContinueStatement */ && !isIterationStatement(current.statement, true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); } return false; } break; - case 256 /* SwitchStatement */: - if (node.kind === 253 /* BreakStatement */ && !node.label) { + case 258 /* SwitchStatement */: + if (node.kind === 255 /* BreakStatement */ && !node.label) { return false; } break; @@ -81545,10 +81725,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { current = current.parent; } if (node.label) { - const message = node.kind === 253 /* 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 === 255 /* 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 === 253 /* 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 === 255 /* 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); } } @@ -81568,10 +81748,10 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function isStringOrNumberLiteralExpression(expr) { - return isStringOrNumericLiteralLike(expr) || expr.kind === 225 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; + return isStringOrNumericLiteralLike(expr) || expr.kind === 227 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 8 /* NumericLiteral */; } function isBigIntLiteralExpression(expr) { - return expr.kind === 9 /* BigIntLiteral */ || expr.kind === 225 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 9 /* BigIntLiteral */; + return expr.kind === 9 /* BigIntLiteral */ || expr.kind === 227 /* PrefixUnaryExpression */ && expr.operator === 40 /* MinusToken */ && expr.operand.kind === 9 /* BigIntLiteral */; } function isSimpleLiteralEnumReference(expr) { if ((isPropertyAccessExpression(expr) || isElementAccessExpression(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) { @@ -81593,7 +81773,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 250 /* ForInStatement */ && node.parent.parent.kind !== 251 /* ForOfStatement */) { + if (node.parent.parent.kind !== 252 /* ForInStatement */ && node.parent.parent.kind !== 253 /* ForOfStatement */) { if (node.flags & 16777216 /* Ambient */) { checkAmbientInitializer(node); } else if (!node.initializer) { @@ -81605,7 +81785,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } } - if (node.exclamationToken && (node.parent.parent.kind !== 244 /* VariableStatement */ || !node.type || node.initializer || node.flags & 16777216 /* Ambient */)) { + if (node.exclamationToken && (node.parent.parent.kind !== 246 /* 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); } @@ -81657,15 +81837,15 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } function allowLetAndConstDeclarations(parent2) { switch (parent2.kind) { - case 246 /* IfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 255 /* WithStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 248 /* IfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 257 /* WithStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: return false; - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return allowLetAndConstDeclarations(parent2.parent); } return true; @@ -81767,7 +81947,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) { return true; } - } else if (node.parent.kind === 267 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 270 /* 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; } @@ -81793,14 +81973,14 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 267 /* InterfaceDeclaration */ || node.kind === 268 /* TypeAliasDeclaration */ || node.kind === 275 /* ImportDeclaration */ || node.kind === 274 /* ImportEqualsDeclaration */ || node.kind === 281 /* ExportDeclaration */ || node.kind === 280 /* ExportAssignment */ || node.kind === 273 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { + if (node.kind === 270 /* InterfaceDeclaration */ || node.kind === 271 /* TypeAliasDeclaration */ || node.kind === 278 /* ImportDeclaration */ || node.kind === 277 /* ImportEqualsDeclaration */ || node.kind === 284 /* ExportDeclaration */ || node.kind === 283 /* ExportAssignment */ || node.kind === 276 /* 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 === 244 /* VariableStatement */) { + if (isDeclaration(decl) || decl.kind === 246 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -81817,7 +81997,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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 === 242 /* Block */ || node.parent.kind === 271 /* ModuleBlock */ || node.parent.kind === 314 /* SourceFile */) { + if (node.parent.kind === 244 /* Block */ || node.parent.kind === 274 /* ModuleBlock */ || node.parent.kind === 317 /* SourceFile */) { const links2 = getNodeLinks(node.parent); if (!links2.hasReportedStatementInAmbientContext) { return links2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -81832,9 +82012,9 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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, 201 /* LiteralType */)) { + } else if (isChildOfNodeWithKind(node, 203 /* LiteralType */)) { diagnosticMessage = Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0; - } else if (isChildOfNodeWithKind(node, 308 /* EnumMember */)) { + } else if (isChildOfNodeWithKind(node, 311 /* EnumMember */)) { diagnosticMessage = Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0; } if (diagnosticMessage) { @@ -81894,7 +82074,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { 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) === 278 /* NamedImports */) { + if (node.isTypeOnly && ((_a2 = node.namedBindings) == null ? void 0 : _a2.kind) === 281 /* NamedImports */) { return checkGrammarNamedImportsOrExports(node.namedBindings); } return false; @@ -81904,7 +82084,7 @@ function createTypeChecker(host, isTypeCheckerForLinter = false) { if (specifier.isTypeOnly) { return grammarErrorOnFirstToken( specifier, - specifier.kind === 279 /* 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 === 282 /* 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 ); } }); @@ -82013,12 +82193,12 @@ function isNotAccessor(declaration) { return !isAccessor(declaration); } function isNotOverload(declaration) { - return declaration.kind !== 263 /* FunctionDeclaration */ && declaration.kind !== 174 /* MethodDeclaration */ || !!declaration.body; + return declaration.kind !== 265 /* FunctionDeclaration */ && declaration.kind !== 176 /* MethodDeclaration */ || !!declaration.body; } function isDeclarationNameOrImportPropertyName(name) { switch (name.parent.kind) { - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return isIdentifier(name); default: return isDeclarationName(name); @@ -82296,20 +82476,20 @@ var visitEachChildTable = { nodesVisitor(node.typeArguments, visitor, isTypeNodeOrTypeParameterDeclaration) ); }, - [165 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [166 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateQualifiedName( node, nodeVisitor(node.left, visitor, isEntityName), nodeVisitor(node.right, visitor, isIdentifier) ); }, - [166 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [167 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateComputedPropertyName( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [167 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [168 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82318,7 +82498,7 @@ var visitEachChildTable = { nodeVisitor(node.default, visitor, isTypeNode) ); }, - [168 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [169 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -82329,14 +82509,14 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [169 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [170 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDecorator( node, nodeVisitor(node.expression, visitor, isExpression), node.annotationDeclaration ); }, - [170 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [171 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertySignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82345,7 +82525,16 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [171 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [174 /* OverloadPropertyDeclaration */]: function visitEachChildOfOverloadPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + return context.factory.updateOverloadPropertyDeclaration( + node, + nodesVisitor(node.modifiers, visitor, isModifier), + nodeVisitor(node.name, visitor, isPropertyName), + nodeVisitor(node.questionToken, tokenVisitor, isToken), + nodeVisitor(node.type, visitor, isTypeNode) + ); + }, + [172 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { var _a2; return context.factory.updatePropertyDeclaration( node, @@ -82356,7 +82545,7 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [172 /* AnnotationPropertyDeclaration */]: function visitEachChildOfAnnotationPropertyDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [173 /* AnnotationPropertyDeclaration */]: function visitEachChildOfAnnotationPropertyDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAnnotationPropertyDeclaration( node, nodeVisitor(node.name, visitor, isPropertyName), @@ -82364,7 +82553,7 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [173 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [175 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82375,7 +82564,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [174 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [176 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -82388,7 +82577,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [176 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [178 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82396,7 +82585,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [177 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [179 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { if (context.isLexicalEnvironmentSuspended && context.isLexicalEnvironmentSuspended()) { return context.factory.updateGetAccessorDeclaration( node, @@ -82417,7 +82606,7 @@ var visitEachChildTable = { ); } }, - [178 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [180 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { if (context.isLexicalEnvironmentSuspended && context.isLexicalEnvironmentSuspended()) { return context.factory.updateSetAccessorDeclaration( node, @@ -82436,7 +82625,7 @@ var visitEachChildTable = { ); } }, - [175 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [177 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { context.startLexicalEnvironment(); context.suspendLexicalEnvironment(); return context.factory.updateClassStaticBlockDeclaration( @@ -82444,7 +82633,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [179 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [181 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCallSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -82452,7 +82641,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [180 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [182 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -82460,7 +82649,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [181 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [183 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82468,7 +82657,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [182 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [184 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypePredicateNode( node, nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), @@ -82476,14 +82665,14 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [183 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [185 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeReferenceNode( node, nodeVisitor(node.typeName, visitor, isEntityName), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [184 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [186 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateFunctionTypeNode( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -82491,7 +82680,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [185 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [187 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorTypeNode( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82500,56 +82689,56 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [186 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [188 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeQueryNode( node, nodeVisitor(node.exprName, visitor, isEntityName), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [187 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [189 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTypeLiteralNode( node, nodesVisitor(node.members, visitor, isTypeElement) ); }, - [188 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [190 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateArrayTypeNode( node, nodeVisitor(node.elementType, visitor, isTypeNode) ); }, - [189 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [191 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTupleTypeNode( node, nodesVisitor(node.elements, visitor, isTypeNode) ); }, - [190 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [192 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateOptionalTypeNode( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [191 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [193 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateRestTypeNode( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [192 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [194 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateUnionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [193 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [195 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateIntersectionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [194 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [196 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConditionalTypeNode( node, nodeVisitor(node.checkType, visitor, isTypeNode), @@ -82558,13 +82747,13 @@ var visitEachChildTable = { nodeVisitor(node.falseType, visitor, isTypeNode) ); }, - [195 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [197 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInferTypeNode( node, nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration) ); }, - [205 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [207 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeNode( node, nodeVisitor(node.argument, visitor, isTypeNode), @@ -82574,14 +82763,14 @@ var visitEachChildTable = { node.isTypeOf ); }, - [304 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [307 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeAssertionContainer( node, nodeVisitor(node.assertClause, visitor, isAssertClause), node.multiLine ); }, - [202 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [204 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateNamedTupleMember( node, nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken), @@ -82590,26 +82779,26 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [196 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [198 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedType( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [198 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [200 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOperatorNode( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [199 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [201 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexedAccessTypeNode( node, nodeVisitor(node.objectType, visitor, isTypeNode), nodeVisitor(node.indexType, visitor, isTypeNode) ); }, - [200 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [202 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMappedTypeNode( node, nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken), @@ -82620,39 +82809,39 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [201 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [203 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLiteralTypeNode( node, nodeVisitor(node.literal, visitor, isExpression) ); }, - [203 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [205 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralType( node, nodeVisitor(node.head, visitor, isTemplateHead), nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) ); }, - [204 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [206 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralTypeSpan( node, nodeVisitor(node.type, visitor, isTypeNode), nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail) ); }, - [206 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [208 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectBindingPattern( node, nodesVisitor(node.elements, visitor, isBindingElement) ); }, - [207 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [209 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayBindingPattern( node, nodesVisitor(node.elements, visitor, isArrayBindingElement) ); }, - [208 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [210 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBindingElement( node, nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken), @@ -82661,19 +82850,19 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [209 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [211 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayLiteralExpression( node, nodesVisitor(node.elements, visitor, isExpression) ); }, - [210 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [212 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectLiteralExpression( node, nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) ); }, - [211 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [213 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82685,7 +82874,7 @@ var visitEachChildTable = { nodeVisitor(node.name, visitor, isMemberName) ); }, - [212 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [214 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isElementAccessChain(node) ? context.factory.updateElementAccessChain( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82697,7 +82886,7 @@ var visitEachChildTable = { nodeVisitor(node.argumentExpression, visitor, isExpression) ); }, - [213 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [215 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return isCallChain(node) ? context.factory.updateCallChain( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82711,7 +82900,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [220 /* EtsComponentExpression */]: function visitEachChildOfEtsComponentExpression(node, visitor, context, nodesVisitor, nodeVisitor) { + [222 /* EtsComponentExpression */]: function visitEachChildOfEtsComponentExpression(node, visitor, context, nodesVisitor, nodeVisitor) { return context.factory.updateEtsComponentExpression( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82719,7 +82908,7 @@ var visitEachChildTable = { nodeVisitor(node.body, visitor, isBlock) ); }, - [214 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [216 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNewExpression( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82727,7 +82916,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [215 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [217 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTaggedTemplateExpression( node, nodeVisitor(node.tag, visitor, isExpression), @@ -82735,20 +82924,20 @@ var visitEachChildTable = { nodeVisitor(node.template, visitor, isTemplateLiteral) ); }, - [216 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [218 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAssertion( node, nodeVisitor(node.type, visitor, isTypeNode), nodeVisitor(node.expression, visitor, isExpression) ); }, - [217 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [219 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [218 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [220 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionExpression( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82760,7 +82949,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [219 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [221 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateArrowFunction( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -82771,43 +82960,43 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [221 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [223 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDeleteExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [222 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [224 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOfExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [223 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [225 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVoidExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [224 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [226 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAwaitExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [225 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [227 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePrefixUnaryExpression( node, nodeVisitor(node.operand, visitor, isExpression) ); }, - [226 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [228 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePostfixUnaryExpression( node, nodeVisitor(node.operand, visitor, isExpression) ); }, - [227 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [229 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBinaryExpression( node, nodeVisitor(node.left, visitor, isExpression), @@ -82815,7 +83004,7 @@ var visitEachChildTable = { nodeVisitor(node.right, visitor, isExpression) ); }, - [228 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [230 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateConditionalExpression( node, nodeVisitor(node.condition, visitor, isExpression), @@ -82825,27 +83014,27 @@ var visitEachChildTable = { nodeVisitor(node.whenFalse, visitor, isExpression) ); }, - [229 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [231 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateExpression( node, nodeVisitor(node.head, visitor, isTemplateHead), nodesVisitor(node.templateSpans, visitor, isTemplateSpan) ); }, - [230 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [232 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateYieldExpression( node, nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken), nodeVisitor(node.expression, visitor, isExpression) ); }, - [231 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [233 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadElement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [232 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [234 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -82855,28 +83044,28 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [234 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [236 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionWithTypeArguments( node, nodeVisitor(node.expression, visitor, isExpression), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [235 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [237 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAsExpression( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.type, visitor, isTypeNode) ); }, - [239 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [241 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSatisfiesExpression( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.type, visitor, isTypeNode) ); }, - [236 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [238 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return isOptionalChain(node) ? context.factory.updateNonNullChain( node, nodeVisitor(node.expression, visitor, isExpression) @@ -82885,39 +83074,39 @@ var visitEachChildTable = { nodeVisitor(node.expression, visitor, isExpression) ); }, - [237 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [239 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [240 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [242 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateSpan( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail) ); }, - [242 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [244 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [244 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [246 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVariableStatement( node, nodesVisitor(node.modifiers, visitor, isModifier), nodeVisitor(node.declarationList, visitor, isVariableDeclarationList) ); }, - [245 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [247 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [246 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [248 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIfStatement( node, nodeVisitor(node.expression, visitor, isExpression), @@ -82925,21 +83114,21 @@ var visitEachChildTable = { nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) ); }, - [247 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [249 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDoStatement( node, visitIterationBody(node.statement, visitor, context, nodeVisitor), nodeVisitor(node.expression, visitor, isExpression) ); }, - [248 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [250 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWhileStatement( node, nodeVisitor(node.expression, visitor, isExpression), visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [249 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [251 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -82948,7 +83137,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [250 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [252 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForInStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -82956,7 +83145,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [251 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [253 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateForOfStatement( node, nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword), @@ -82965,52 +83154,52 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [252 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [254 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [253 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [255 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [254 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [256 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateReturnStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [255 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [257 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWithStatement( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock) ); }, - [256 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [258 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSwitchStatement( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.caseBlock, visitor, isCaseBlock) ); }, - [257 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [259 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, nodeVisitor(node.label, visitor, isIdentifier), nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock) ); }, - [258 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [260 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateThrowStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [259 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [261 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, nodeVisitor(node.tryBlock, visitor, isBlock), @@ -83018,7 +83207,7 @@ var visitEachChildTable = { nodeVisitor(node.finallyBlock, visitor, isBlock) ); }, - [261 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [263 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateVariableDeclaration( node, nodeVisitor(node.name, visitor, isBindingName), @@ -83027,13 +83216,13 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [262 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [264 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateVariableDeclarationList( node, nodesVisitor(node.declarations, visitor, isVariableDeclaration) ); }, - [263 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [265 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83045,7 +83234,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [264 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [266 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83055,7 +83244,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [265 /* StructDeclaration */]: function visitEachChildOfStructDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [267 /* StructDeclaration */]: function visitEachChildOfStructDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateStructDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83065,7 +83254,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [266 /* AnnotationDeclaration */]: function visitEachChildOfAnnotationDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [268 /* AnnotationDeclaration */]: function visitEachChildOfAnnotationDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAnnotationDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83073,7 +83262,15 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isAnnotationElement) ); }, - [267 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [269 /* OverloadDeclaration */]: function visitEachChildOfOverloadDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + return context.factory.updateOverloadDeclaration( + node, + nodesVisitor(node.modifiers, visitor, isModifier), + nodeVisitor(node.name, visitor, isIdentifier), + nodesVisitor(node.members, visitor, isOverloadElement) + ); + }, + [270 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83083,7 +83280,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [268 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [271 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83092,7 +83289,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [269 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [272 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83100,7 +83297,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isEnumMember) ); }, - [270 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [273 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateModuleDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83108,25 +83305,25 @@ var visitEachChildTable = { nodeVisitor(node.body, visitor, isModuleBody) ); }, - [271 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [274 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateModuleBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [272 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [275 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCaseBlock( node, nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) ); }, - [273 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [276 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [274 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [277 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportEqualsDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83135,7 +83332,7 @@ var visitEachChildTable = { nodeVisitor(node.moduleReference, visitor, isModuleReference) ); }, - [275 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [278 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83144,21 +83341,21 @@ var visitEachChildTable = { nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [302 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [305 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateAssertClause( node, nodesVisitor(node.elements, visitor, isAssertEntry), node.multiLine ); }, - [303 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [306 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAssertEntry( node, nodeVisitor(node.name, visitor, isAssertionKey), nodeVisitor(node.value, visitor, isExpression) ); }, - [276 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [279 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, node.isTypeOnly, @@ -83166,25 +83363,25 @@ var visitEachChildTable = { nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, - [277 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [280 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [283 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [286 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [278 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [281 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedImports( node, nodesVisitor(node.elements, visitor, isImportSpecifier) ); }, - [279 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [282 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportSpecifier( node, node.isTypeOnly, @@ -83192,14 +83389,14 @@ var visitEachChildTable = { nodeVisitor(node.name, visitor, isIdentifier) ); }, - [280 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [283 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportAssignment( node, nodesVisitor(node.modifiers, visitor, isModifier), nodeVisitor(node.expression, visitor, isExpression) ); }, - [281 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [284 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83209,13 +83406,13 @@ var visitEachChildTable = { nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [282 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [285 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedExports( node, nodesVisitor(node.elements, visitor, isExportSpecifier) ); }, - [284 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [287 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportSpecifier( node, node.isTypeOnly, @@ -83223,13 +83420,13 @@ var visitEachChildTable = { nodeVisitor(node.name, visitor, isIdentifier) ); }, - [286 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [289 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExternalModuleReference( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [287 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [290 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxElement( node, nodeVisitor(node.openingElement, visitor, isJsxOpeningElement), @@ -83237,7 +83434,7 @@ var visitEachChildTable = { nodeVisitor(node.closingElement, visitor, isJsxClosingElement) ); }, - [288 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [291 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSelfClosingElement( node, nodeVisitor(node.tagName, visitor, isJsxTagNameExpression), @@ -83245,7 +83442,7 @@ var visitEachChildTable = { nodeVisitor(node.attributes, visitor, isJsxAttributes) ); }, - [289 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [292 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxOpeningElement( node, nodeVisitor(node.tagName, visitor, isJsxTagNameExpression), @@ -83253,13 +83450,13 @@ var visitEachChildTable = { nodeVisitor(node.attributes, visitor, isJsxAttributes) ); }, - [290 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [293 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxClosingElement( node, nodeVisitor(node.tagName, visitor, isJsxTagNameExpression) ); }, - [291 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [294 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxFragment( node, nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment), @@ -83267,97 +83464,97 @@ var visitEachChildTable = { nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment) ); }, - [294 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [297 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttribute( node, nodeVisitor(node.name, visitor, isIdentifier), nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) ); }, - [295 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [298 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttributes( node, nodesVisitor(node.properties, visitor, isJsxAttributeLike) ); }, - [296 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [299 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSpreadAttribute( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [297 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [300 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [298 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [301 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCaseClause( node, nodeVisitor(node.expression, visitor, isExpression), nodesVisitor(node.statements, visitor, isStatement) ); }, - [299 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [302 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateDefaultClause( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [300 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [303 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateHeritageClause( node, nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) ); }, - [301 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [304 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), nodeVisitor(node.block, visitor, isBlock) ); }, - [305 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [308 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePropertyAssignment( node, nodeVisitor(node.name, visitor, isPropertyName), nodeVisitor(node.initializer, visitor, isExpression) ); }, - [306 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [309 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, nodeVisitor(node.name, visitor, isIdentifier), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, - [307 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [310 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadAssignment( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [308 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [311 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumMember( node, nodeVisitor(node.name, visitor, isPropertyName), nodeVisitor(node.initializer, visitor, isExpression) ); }, - [314 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { + [317 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile( node, visitLexicalEnvironment(node.statements, visitor, context) ); }, - [359 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [362 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePartiallyEmittedExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [360 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [363 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCommaListExpression( node, nodesVisitor(node.elements, visitor, isExpression) @@ -83931,7 +84128,7 @@ function isNamedDefaultReference(e) { function chainBundle(context, transformSourceFile) { return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - return node.kind === 314 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 317 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -83974,7 +84171,7 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption let hasImportDefault = false; for (const node of sourceFile.statements) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: externalImports.push(node); if (!hasImportStar && getImportNeedsImportStarHelper(node)) { hasImportStar = true; @@ -83983,12 +84180,12 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption hasImportDefault = true; } break; - case 274 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 286 /* ExternalModuleReference */) { + case 277 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 289 /* ExternalModuleReference */) { externalImports.push(node); } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { externalImports.push(node); @@ -84011,19 +84208,19 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption addExportedNamesForExportDeclaration(node); } break; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { exportEquals = node; } break; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: if (hasSyntacticModifier(node, 1 /* Export */)) { for (const decl of node.declarationList.declarations) { exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames); } } break; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -84040,7 +84237,7 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption } } break; - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -84184,7 +84381,7 @@ function isStaticPropertyDeclaration(member) { return isPropertyDeclaration(member) && hasStaticModifier(member); } function isInitializedProperty(member) { - return member.kind === 171 /* PropertyDeclaration */ && member.initializer !== void 0; + return member.kind === 172 /* PropertyDeclaration */ && member.initializer !== void 0; } function isNonStaticMethodOrAccessorWithPrivateName(member) { return !isStatic(member) && (isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member)) && isPrivateIdentifier(member.name); @@ -84221,12 +84418,12 @@ function getAllDecoratorsOfClass(node) { } function getAllDecoratorsOfClassElement(member, parent2) { switch (member.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return getAllDecoratorsOfAccessors(member, parent2); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return getAllDecoratorsOfMethod(member); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return getAllDecoratorsOfProperty(member); default: return void 0; @@ -84719,8 +84916,8 @@ function transformTypeScript(context) { const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); + context.enableSubstitution(213 /* PropertyAccessExpression */); + context.enableSubstitution(214 /* ElementAccessExpression */); let currentSourceFile; let currentNamespace; let currentNamespaceContainerName; @@ -84731,14 +84928,14 @@ function transformTypeScript(context) { let applicableSubstitutions; return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - if (node.kind === 315 /* Bundle */) { + if (node.kind === 318 /* Bundle */) { return transformBundle(node); } return transformSourceFile(node); } function transformBundle(node) { return factory2.createBundle(node.sourceFiles.map(transformSourceFile), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 317 /* InputFiles */) { + if (prepend.kind === 320 /* InputFiles */) { return createUnparsedSourceFile(prepend, "js"); } return prepend; @@ -84769,22 +84966,22 @@ function transformTypeScript(context) { } function onBeforeVisitNode(node) { switch (node.kind) { - case 314 /* SourceFile */: - case 272 /* CaseBlock */: - case 271 /* ModuleBlock */: - case 242 /* Block */: + case 317 /* SourceFile */: + case 275 /* CaseBlock */: + case 274 /* ModuleBlock */: + case 244 /* Block */: currentLexicalScope = node; currentScopeFirstDeclarationsOfName = void 0; break; - case 264 /* ClassDeclaration */: - case 263 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 265 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 2 /* Ambient */)) { break; } if (node.name) { recordEmittedDeclarationInScope(node); } else { - Debug.assert(node.kind === 264 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); + Debug.assert(node.kind === 266 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); } break; } @@ -84803,10 +85000,10 @@ function transformTypeScript(context) { } function sourceElementVisitorWorker(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 280 /* ExportAssignment */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 283 /* ExportAssignment */: + case 284 /* ExportDeclaration */: return visitElidableStatement(node); default: return visitorWorker(node); @@ -84824,13 +85021,13 @@ function transformTypeScript(context) { return node; } switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return visitImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return visitExportAssignment(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return visitExportDeclaration(node); default: Debug.fail("Unhandled ellided statement"); @@ -84840,7 +85037,7 @@ function transformTypeScript(context) { return saveStateAndInvoke(node, namespaceElementVisitorWorker); } function namespaceElementVisitorWorker(node) { - if (node.kind === 281 /* ExportDeclaration */ || node.kind === 275 /* ImportDeclaration */ || node.kind === 276 /* ImportClause */ || node.kind === 274 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 286 /* ExternalModuleReference */) { + if (node.kind === 284 /* ExportDeclaration */ || node.kind === 278 /* ImportDeclaration */ || node.kind === 279 /* ImportClause */ || node.kind === 277 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 289 /* ExternalModuleReference */) { return void 0; } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) { return visitTypeScript(node); @@ -84852,21 +85049,21 @@ function transformTypeScript(context) { } function classElementVisitorWorker(node, parent2) { switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: return visitConstructor(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node, parent2); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return visitEachChild(node, visitor, context); - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: return node; - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return; default: return Debug.failBadSyntaxKind(node); @@ -84877,15 +85074,15 @@ function transformTypeScript(context) { } function objectLiteralElementVisitorWorker(node, parent2) { switch (node.kind) { - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 307 /* SpreadAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 310 /* SpreadAssignment */: return visitor(node); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); default: return Debug.failBadSyntaxKind(node); @@ -84920,13 +85117,13 @@ function transformTypeScript(context) { case 147 /* ReadonlyKeyword */: case 102 /* InKeyword */: case 146 /* OutKeyword */: - case 188 /* ArrayType */: - case 189 /* TupleType */: - case 190 /* OptionalType */: - case 191 /* RestType */: - case 187 /* TypeLiteral */: - case 182 /* TypePredicate */: - case 167 /* TypeParameter */: + case 190 /* ArrayType */: + case 191 /* TupleType */: + case 192 /* OptionalType */: + case 193 /* RestType */: + case 189 /* TypeLiteral */: + case 184 /* TypePredicate */: + case 168 /* TypeParameter */: case 132 /* AnyKeyword */: case 159 /* UnknownKeyword */: case 135 /* BooleanKeyword */: @@ -84935,83 +85132,86 @@ function transformTypeScript(context) { case 145 /* NeverKeyword */: case 115 /* VoidKeyword */: case 154 /* SymbolKeyword */: - case 185 /* ConstructorType */: - case 184 /* FunctionType */: - case 186 /* TypeQuery */: - case 183 /* TypeReference */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 194 /* ConditionalType */: - case 196 /* ParenthesizedType */: - case 197 /* ThisType */: - case 198 /* TypeOperator */: - case 199 /* IndexedAccessType */: - case 200 /* MappedType */: - case 201 /* LiteralType */: - case 181 /* IndexSignature */: + case 187 /* ConstructorType */: + case 186 /* FunctionType */: + case 188 /* TypeQuery */: + case 185 /* TypeReference */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: + case 196 /* ConditionalType */: + case 198 /* ParenthesizedType */: + case 199 /* ThisType */: + case 200 /* TypeOperator */: + case 201 /* IndexedAccessType */: + case 202 /* MappedType */: + case 203 /* LiteralType */: + case 183 /* IndexSignature */: return void 0; - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return factory2.createNotEmittedStatement(node); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return void 0; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return factory2.createNotEmittedStatement(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return visitClassExpression(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: + return factory2.createNotEmittedStatement(node); + case 269 /* OverloadDeclaration */: return factory2.createNotEmittedStatement(node); - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return visitHeritageClause(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArguments(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 176 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 177 /* ClassStaticBlockDeclaration */: return Debug.fail("Class and object literal elements must be visited with their respective visitors"); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return visitFunctionExpression(node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return visitArrowFunction(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node); - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: return visitAssertionExpression(node); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return visitSatisfiesExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return visitNewExpression(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return visitNonNullExpression(node); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return visitEnumDeclaration(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return visitModuleDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node); - case 289 /* JsxOpeningElement */: + case 292 /* JsxOpeningElement */: return visitJsxJsxOpeningElement(node); default: return visitEachChild(node, visitor, context); @@ -85243,19 +85443,19 @@ function transformTypeScript(context) { } function shouldAddTypeMetadata(node) { const kind = node.kind; - return kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 171 /* PropertyDeclaration */; + return kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 172 /* PropertyDeclaration */; } function shouldAddReturnTypeMetadata(node) { - return node.kind === 174 /* MethodDeclaration */; + return node.kind === 176 /* MethodDeclaration */; } function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return getFirstConstructorWithBody(node) !== void 0; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return true; } return false; @@ -85788,12 +85988,12 @@ function transformTypeScript(context) { factory2.createVariableDeclaration( factory2.getLocalName(node, false, true) ) - ], currentLexicalScope.kind === 314 /* SourceFile */ ? 0 /* None */ : 1 /* Let */) + ], currentLexicalScope.kind === 317 /* SourceFile */ ? 0 /* None */ : 1 /* Let */) ); setOriginalNode(statement, node); recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 269 /* EnumDeclaration */) { + if (node.kind === 272 /* EnumDeclaration */) { setSourceMapRange(statement.declarationList, node); } else { setSourceMapRange(statement, node); @@ -85875,7 +86075,7 @@ function transformTypeScript(context) { let statementsLocation; let blockLocation; if (node.body) { - if (node.body.kind === 271 /* ModuleBlock */) { + if (node.body.kind === 274 /* ModuleBlock */) { saveStateAndInvoke(node.body, (body) => addRange(statements, visitNodes2(body.statements, namespaceElementVisitor, isStatement))); statementsLocation = node.body.statements; blockLocation = node.body; @@ -85904,13 +86104,13 @@ function transformTypeScript(context) { true ); setTextRange(block, blockLocation); - if (!node.body || node.body.kind !== 271 /* ModuleBlock */) { + if (!node.body || node.body.kind !== 274 /* ModuleBlock */) { setEmitFlags(block, getEmitFlags(block) | 1536 /* NoComments */); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 270 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 273 /* ModuleDeclaration */) { const recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -85938,7 +86138,7 @@ function transformTypeScript(context) { return name || namedBindings ? factory2.updateImportClause(node, false, name, namedBindings) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 277 /* NamespaceImport */) { + if (node.kind === 280 /* NamespaceImport */) { return shouldEmitAliasDeclaration(node) ? node : void 0; } else { const allowEmpty = compilerOptions.preserveValueImports && (compilerOptions.importsNotUsedAsValues === 1 /* Preserve */ || compilerOptions.importsNotUsedAsValues === 2 /* Error */); @@ -86108,15 +86308,15 @@ function transformTypeScript(context) { if ((enabledSubstitutions & 2 /* NamespaceExports */) === 0) { enabledSubstitutions |= 2 /* NamespaceExports */; context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(306 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(270 /* ModuleDeclaration */); + context.enableSubstitution(309 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(273 /* ModuleDeclaration */); } } function isTransformedModuleDeclaration(node) { - return getOriginalNode(node).kind === 270 /* ModuleDeclaration */; + return getOriginalNode(node).kind === 273 /* ModuleDeclaration */; } function isTransformedEnumDeclaration(node) { - return getOriginalNode(node).kind === 269 /* EnumDeclaration */; + return getOriginalNode(node).kind === 272 /* EnumDeclaration */; } function onEmitNode(hint, node, emitCallback) { const savedApplicableSubstitutions = applicableSubstitutions; @@ -86161,9 +86361,9 @@ function transformTypeScript(context) { switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return substituteElementAccessExpression(node); } return node; @@ -86174,8 +86374,8 @@ function transformTypeScript(context) { function trySubstituteNamespaceExportedName(node) { if (enabledSubstitutions & applicableSubstitutions && !isGeneratedIdentifier(node) && !isLocalName(node)) { const container = resolver.getReferencedExportContainer(node, false); - if (container && container.kind !== 314 /* SourceFile */) { - const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 270 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 269 /* EnumDeclaration */; + if (container && container.kind !== 317 /* SourceFile */) { + const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 273 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 272 /* EnumDeclaration */; if (substitute) { return setTextRange( factory2.createPropertyAccessExpression(factory2.getGeneratedNameForNode(container), node), @@ -86290,45 +86490,49 @@ function transformClassFields(context) { switch (node.kind) { case 128 /* AccessorKeyword */: return shouldTransformAutoAccessors ? void 0 : node; - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return void 0; - case 232 /* ClassExpression */: + case 269 /* OverloadDeclaration */: + return void 0; + case 234 /* ClassExpression */: return visitClassExpression(node); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + return void 0; + case 174 /* OverloadPropertyDeclaration */: return void 0; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); case 80 /* PrivateIdentifier */: return visitPrivateIdentifier(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, false); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node, false); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitCallExpression(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node); - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: { + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: { return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( void 0, fallbackVisitor, @@ -86344,10 +86548,10 @@ function transformClassFields(context) { } function discardedValueVisitor(node) { switch (node.kind) { - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, true); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node, true); default: return visitor(node); @@ -86355,9 +86559,9 @@ function transformClassFields(context) { } function heritageClauseVisitor(node) { switch (node.kind) { - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return visitEachChild(node, heritageClauseVisitor, context); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArgumentsInHeritageClause(node); default: return visitor(node); @@ -86365,8 +86569,8 @@ function transformClassFields(context) { } function assignmentTargetVisitor(node) { switch (node.kind) { - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return visitAssignmentPattern(node); default: return visitor(node); @@ -86374,25 +86578,25 @@ function transformClassFields(context) { } function classElementVisitor(node) { switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: return visitConstructorDeclaration(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( void 0, visitMethodOrAccessorDeclaration, node ); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( void 0, visitPropertyDeclaration, node ); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: return node; default: return visitor(node); @@ -86400,10 +86604,10 @@ function transformClassFields(context) { } function accessorFieldResultVisitor(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return transformFieldInitializer(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return classElementVisitor(node); default: Debug.assertMissingNode(node, "Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration"); @@ -87487,14 +87691,14 @@ function transformClassFields(context) { if ((enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */) === 0) { enabledSubstitutions |= 2 /* ClassStaticThisOrSuperReference */; context.enableSubstitution(109 /* ThisKeyword */); - context.enableEmitNotification(263 /* FunctionDeclaration */); - context.enableEmitNotification(218 /* FunctionExpression */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(171 /* PropertyDeclaration */); - context.enableEmitNotification(166 /* ComputedPropertyName */); + context.enableEmitNotification(265 /* FunctionDeclaration */); + context.enableEmitNotification(220 /* FunctionExpression */); + context.enableEmitNotification(178 /* Constructor */); + context.enableEmitNotification(179 /* GetAccessor */); + context.enableEmitNotification(180 /* SetAccessor */); + context.enableEmitNotification(176 /* MethodDeclaration */); + context.enableEmitNotification(172 /* PropertyDeclaration */); + context.enableEmitNotification(167 /* ComputedPropertyName */); } } function addMethodStatements(statements, methods, receiver) { @@ -87536,12 +87740,12 @@ function transformClassFields(context) { } } switch (node.kind) { - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: if (isArrowFunction(original) || getEmitFlags(node) & 262144 /* AsyncFunctionBody */) { break; } - case 263 /* FunctionDeclaration */: - case 176 /* Constructor */: { + case 265 /* FunctionDeclaration */: + case 178 /* Constructor */: { const savedClassLexicalEnvironment = currentClassLexicalEnvironment; const savedCurrentComputedPropertyNameClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment; currentClassLexicalEnvironment = void 0; @@ -87551,10 +87755,10 @@ function transformClassFields(context) { currentComputedPropertyNameClassLexicalEnvironment = savedCurrentComputedPropertyNameClassLexicalEnvironment; return; } - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - case 171 /* PropertyDeclaration */: { + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { const savedClassLexicalEnvironment = currentClassLexicalEnvironment; const savedCurrentComputedPropertyNameClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment; currentComputedPropertyNameClassLexicalEnvironment = currentClassLexicalEnvironment; @@ -87564,7 +87768,7 @@ function transformClassFields(context) { currentComputedPropertyNameClassLexicalEnvironment = savedCurrentComputedPropertyNameClassLexicalEnvironment; return; } - case 166 /* ComputedPropertyName */: { + case 167 /* ComputedPropertyName */: { const savedClassLexicalEnvironment = currentClassLexicalEnvironment; const savedCurrentComputedPropertyNameClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment; currentClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment; @@ -88038,15 +88242,15 @@ function createRuntimeTypeSerializer(context) { } function serializeTypeOfNode(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: return serializeTypeNode(node.type); - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: + case 180 /* SetAccessor */: + case 179 /* GetAccessor */: return serializeTypeNode(getAccessorTypeNode(node)); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 174 /* MethodDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 176 /* MethodDeclaration */: return factory.createIdentifier("Function"); default: return factory.createVoidZero(); @@ -88073,7 +88277,7 @@ function createRuntimeTypeSerializer(context) { return factory.createArrayLiteralExpression(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 177 /* GetAccessor */) { + if (container && node.kind === 179 /* GetAccessor */) { const { setAccessor } = getAllAccessorDeclarations(container.members, node); if (setAccessor) { return setAccessor.parameters; @@ -88099,22 +88303,22 @@ function createRuntimeTypeSerializer(context) { case 157 /* UndefinedKeyword */: case 145 /* NeverKeyword */: return factory.createVoidZero(); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: return factory.createIdentifier("Function"); - case 188 /* ArrayType */: - case 189 /* TupleType */: + case 190 /* ArrayType */: + case 191 /* TupleType */: return factory.createIdentifier("Array"); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return node.assertsModifier ? factory.createVoidZero() : factory.createIdentifier("Boolean"); case 135 /* BooleanKeyword */: return factory.createIdentifier("Boolean"); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: case 153 /* StringKeyword */: return factory.createIdentifier("String"); case 150 /* ObjectKeyword */: return factory.createIdentifier("Object"); - case 201 /* LiteralType */: + case 203 /* LiteralType */: return serializeLiteralOfLiteralTypeNode(node.literal); case 149 /* NumberKeyword */: return factory.createIdentifier("Number"); @@ -88122,37 +88326,37 @@ function createRuntimeTypeSerializer(context) { return getGlobalConstructor("BigInt", 7 /* ES2020 */); case 154 /* SymbolKeyword */: return getGlobalConstructor("Symbol", 2 /* ES2015 */); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return serializeTypeReferenceNode(node); - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return serializeUnionOrIntersectionConstituents(node.types, true); - case 192 /* UnionType */: + case 194 /* UnionType */: return serializeUnionOrIntersectionConstituents(node.types, false); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return serializeUnionOrIntersectionConstituents([node.trueType, node.falseType], false); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: if (node.operator === 147 /* ReadonlyKeyword */) { return serializeTypeNode(node.type); } break; - case 186 /* TypeQuery */: - case 199 /* IndexedAccessType */: - case 200 /* MappedType */: - case 187 /* TypeLiteral */: + case 188 /* TypeQuery */: + case 201 /* IndexedAccessType */: + case 202 /* MappedType */: + case 189 /* TypeLiteral */: case 132 /* AnyKeyword */: case 159 /* UnknownKeyword */: - case 197 /* ThisType */: - case 205 /* ImportType */: + case 199 /* ThisType */: + case 207 /* ImportType */: break; - case 321 /* JSDocAllType */: - case 322 /* JSDocUnknownType */: - case 326 /* JSDocFunctionType */: - case 327 /* JSDocVariadicType */: - case 328 /* JSDocNamepathType */: + case 324 /* JSDocAllType */: + case 325 /* JSDocUnknownType */: + case 329 /* JSDocFunctionType */: + case 330 /* JSDocVariadicType */: + case 331 /* JSDocNamepathType */: break; - case 323 /* JSDocNullableType */: - case 324 /* JSDocNonNullableType */: - case 325 /* JSDocOptionalType */: + case 326 /* JSDocNullableType */: + case 327 /* JSDocNonNullableType */: + case 328 /* JSDocOptionalType */: return serializeTypeNode(node.type); default: return Debug.failBadSyntaxKind(node); @@ -88164,7 +88368,7 @@ function createRuntimeTypeSerializer(context) { case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return factory.createIdentifier("String"); - case 225 /* PrefixUnaryExpression */: { + case 227 /* PrefixUnaryExpression */: { const operand = node.operand; switch (operand.kind) { case 8 /* NumericLiteral */: @@ -88297,7 +88501,7 @@ function createRuntimeTypeSerializer(context) { name.original = void 0; setParent(name, getParseTreeNode(currentLexicalScope)); return name; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return serializeQualifiedNameAsExpression(node); } } @@ -88345,23 +88549,23 @@ function transformLegacyDecorators(context) { return node; } switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return void 0; - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return visitClassExpression(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return visitConstructorDeclaration(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameterDeclaration(node); default: return visitEachChild(node, visitor, context); @@ -88779,34 +88983,34 @@ function transformES2017(context) { switch (node.kind) { case 133 /* AsyncKeyword */: return void 0; - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return visitAwaitExpression(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitMethodDeclaration, node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionDeclaration, node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionExpression, node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return doWithContext(1 /* NonTopLevel */, visitArrowFunction, node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 107 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 107 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitGetAccessorDeclaration, node); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitSetAccessorDeclaration, node); - case 176 /* Constructor */: + case 178 /* Constructor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitConstructorDeclaration, node); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitDefault, node); default: return visitEachChild(node, visitor, context); @@ -88815,27 +89019,27 @@ function transformES2017(context) { function asyncBodyVisitor(node) { if (isNodeWithPossibleHoistedDeclaration(node)) { switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatementInAsyncBody(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatementInAsyncBody(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatementInAsyncBody(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatementInAsyncBody(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClauseInAsyncBody(node); - case 242 /* Block */: - case 256 /* SwitchStatement */: - case 272 /* CaseBlock */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 259 /* TryStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 246 /* IfStatement */: - case 255 /* WithStatement */: - case 257 /* LabeledStatement */: + case 244 /* Block */: + case 258 /* SwitchStatement */: + case 275 /* CaseBlock */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 261 /* TryStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 248 /* IfStatement */: + case 257 /* WithStatement */: + case 259 /* LabeledStatement */: return visitEachChild(node, asyncBodyVisitor, context); default: return Debug.assertNever(node, "Unhandled node."); @@ -89085,7 +89289,7 @@ function transformES2017(context) { const original = getOriginalNode(node, isFunctionLike); const nodeType = original.type; const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0; - const isArrowFunction2 = node.kind === 219 /* ArrowFunction */; + const isArrowFunction2 = node.kind === 221 /* ArrowFunction */; const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192 /* CaptureArguments */) !== 0; const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames; enclosingFunctionParameterNames = new Set2(); @@ -89174,15 +89378,15 @@ function transformES2017(context) { function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); - context.enableEmitNotification(264 /* ClassDeclaration */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(244 /* VariableStatement */); + context.enableSubstitution(215 /* CallExpression */); + context.enableSubstitution(213 /* PropertyAccessExpression */); + context.enableSubstitution(214 /* ElementAccessExpression */); + context.enableEmitNotification(266 /* ClassDeclaration */); + context.enableEmitNotification(176 /* MethodDeclaration */); + context.enableEmitNotification(179 /* GetAccessor */); + context.enableEmitNotification(180 /* SetAccessor */); + context.enableEmitNotification(178 /* Constructor */); + context.enableEmitNotification(246 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -89213,11 +89417,11 @@ function transformES2017(context) { } function substituteExpression(node) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -89260,7 +89464,7 @@ function transformES2017(context) { } function isSuperContainer(node) { const kind = node.kind; - return kind === 264 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 266 /* ClassDeclaration */ || kind === 178 /* Constructor */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 4096 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -89487,115 +89691,115 @@ function transformES2018(context) { return node; } switch (node.kind) { - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return visitAwaitExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return visitYieldExpression(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return visitReturnStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return visitLabeledStatement(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClause(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 250 /* ForInStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 252 /* ForInStatement */: return doWithHierarchyFacts( visitDefault, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatement(node, void 0); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return doWithHierarchyFacts( visitForStatement, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return visitVoidExpression(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return doWithHierarchyFacts( visitConstructorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return doWithHierarchyFacts( visitMethodDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return doWithHierarchyFacts( visitGetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return doWithHierarchyFacts( visitSetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return doWithHierarchyFacts( visitFunctionDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return doWithHierarchyFacts( visitFunctionExpression, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return doWithHierarchyFacts( visitArrowFunction, node, 2 /* ArrowFunctionExcludes */, 0 /* ArrowFunctionIncludes */ ); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 107 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 107 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return doWithHierarchyFacts( visitDefault, node, @@ -89673,7 +89877,7 @@ function transformES2018(context) { function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 /* Async */) { const statement = unwrapInnermostStatementOfLabel(node); - if (statement.kind === 251 /* ForOfStatement */ && statement.awaitModifier) { + if (statement.kind === 253 /* ForOfStatement */ && statement.awaitModifier) { return visitForOfStatement(statement, node); } return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node); @@ -89684,7 +89888,7 @@ function transformES2018(context) { let chunkObject; const objects = []; for (const e of elements) { - if (e.kind === 307 /* SpreadAssignment */) { + if (e.kind === 310 /* SpreadAssignment */) { if (chunkObject) { objects.push(factory2.createObjectLiteralExpression(chunkObject)); chunkObject = void 0; @@ -89692,7 +89896,7 @@ function transformES2018(context) { const target = e.expression; objects.push(visitNode(target, visitor, isExpression)); } else { - chunkObject = append(chunkObject, e.kind === 305 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); + chunkObject = append(chunkObject, e.kind === 308 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); } } if (chunkObject) { @@ -89703,7 +89907,7 @@ function transformES2018(context) { function visitObjectLiteralExpression(node) { if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { const objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 210 /* ObjectLiteralExpression */) { + if (objects.length && objects[0].kind !== 212 /* ObjectLiteralExpression */) { objects.unshift(factory2.createObjectLiteralExpression()); } let expression = objects[0]; @@ -90356,15 +90560,15 @@ function transformES2018(context) { function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); - context.enableEmitNotification(264 /* ClassDeclaration */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(244 /* VariableStatement */); + context.enableSubstitution(215 /* CallExpression */); + context.enableSubstitution(213 /* PropertyAccessExpression */); + context.enableSubstitution(214 /* ElementAccessExpression */); + context.enableEmitNotification(266 /* ClassDeclaration */); + context.enableEmitNotification(176 /* MethodDeclaration */); + context.enableEmitNotification(179 /* GetAccessor */); + context.enableEmitNotification(180 /* SetAccessor */); + context.enableEmitNotification(178 /* Constructor */); + context.enableEmitNotification(246 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -90395,11 +90599,11 @@ function transformES2018(context) { } function substituteExpression(node) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -90442,7 +90646,7 @@ function transformES2018(context) { } function isSuperContainer(node) { const kind = node.kind; - return kind === 264 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 266 /* ClassDeclaration */ || kind === 178 /* Constructor */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 4096 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -90485,7 +90689,7 @@ function transformES2019(context) { return node; } switch (node.kind) { - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClause(node); default: return visitEachChild(node, visitor, context); @@ -90521,25 +90725,25 @@ function transformES2020(context) { return node; } switch (node.kind) { - case 213 /* CallExpression */: { + case 215 /* CallExpression */: { const updated = visitNonOptionalCallExpression(node, false); Debug.assertNotNode(updated, isSyntheticReference); return updated; } - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: if (isOptionalChain(node)) { const updated = visitOptionalExpression(node, false, false); Debug.assertNotNode(updated, isSyntheticReference); return updated; } return visitEachChild(node, visitor, context); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (node.operatorToken.kind === 60 /* QuestionQuestionToken */) { return transformNullishCoalescingExpression(node); } return visitEachChild(node, visitor, context); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return visitDeleteExpression(node); default: return visitEachChild(node, visitor, context); @@ -90577,7 +90781,7 @@ function transformES2020(context) { thisArg = expression; } } - expression = node.kind === 211 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); + expression = node.kind === 213 /* 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) { @@ -90596,12 +90800,12 @@ function transformES2020(context) { } function visitNonOptionalExpression(node, captureThisArg, isDelete) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return visitNode(node, visitor, isExpression); @@ -90622,8 +90826,8 @@ function transformES2020(context) { for (let i = 0; i < chain.length; i++) { const segment = chain[i]; switch (segment.kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { if (!isSimpleCopiableExpression(rightExpression)) { thisArg = factory2.createTempVariable(hoistVariableDeclaration); @@ -90632,9 +90836,9 @@ function transformES2020(context) { thisArg = rightExpression; } } - rightExpression = segment.kind === 211 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); + rightExpression = segment.kind === 213 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (i === 0 && leftThisArg) { if (!isGeneratedIdentifier(leftThisArg)) { leftThisArg = factory2.cloneNode(leftThisArg); @@ -90713,7 +90917,7 @@ function transformES2021(context) { return node; } switch (node.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const binaryExpression = node; if (isLogicalOrCoalescingAssignmentExpression(binaryExpression)) { return transformLogicalAssignment(binaryExpression); @@ -90891,13 +91095,13 @@ function transformJsx(context) { } function visitorWorker(node) { switch (node.kind) { - case 287 /* JsxElement */: + case 290 /* JsxElement */: return visitJsxElement(node, false); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node, false); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return visitJsxFragment(node, false); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return visitJsxExpression(node); default: return visitEachChild(node, visitor, context); @@ -90907,13 +91111,13 @@ function transformJsx(context) { switch (node.kind) { case 11 /* JsxText */: return visitJsxText(node); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return visitJsxExpression(node); - case 287 /* JsxElement */: + case 290 /* JsxElement */: return visitJsxElement(node, true); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node, true); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return visitJsxFragment(node, true); default: return Debug.failBadSyntaxKind(node); @@ -91108,7 +91312,7 @@ function transformJsx(context) { const literal = factory2.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote); return setTextRange(literal, node); } - if (node.kind === 297 /* JsxExpression */) { + if (node.kind === 300 /* JsxExpression */) { if (node.expression === void 0) { return factory2.createTrue(); } @@ -91170,7 +91374,7 @@ function transformJsx(context) { return decoded === text ? void 0 : decoded; } function getTagName(node) { - if (node.kind === 287 /* JsxElement */) { + if (node.kind === 290 /* JsxElement */) { return getTagName(node.openingElement); } else { const name = node.tagName; @@ -91469,7 +91673,7 @@ function transformES2016(context) { return node; } switch (node.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node); default: return visitEachChild(node, visitor, context); @@ -91673,7 +91877,7 @@ function transformES2015(context) { hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 254 /* ReturnStatement */ && !node.expression; + return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 256 /* 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(node, false) || isBlock(node)); @@ -91713,65 +91917,65 @@ function transformES2015(context) { switch (node.kind) { case 125 /* StaticKeyword */: return void 0; - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return visitClassExpression(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return visitArrowFunction(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return visitFunctionExpression(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return visitVariableDeclaration(node); case 79 /* Identifier */: return visitIdentifier(node); - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return visitVariableDeclarationList(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return visitSwitchStatement(node); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return visitCaseBlock(node); - case 242 /* Block */: + case 244 /* Block */: return visitBlock(node, false); - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: return visitBreakOrContinueStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return visitLabeledStatement(node); - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return visitDoOrWhileStatement(node, void 0); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node, void 0); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatement(node, void 0); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatement(node, void 0); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClause(node); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return visitShorthandPropertyAssignment(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return visitNewExpression(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); case 14 /* NoSubstitutionTemplateLiteral */: case 15 /* TemplateHead */: @@ -91782,30 +91986,30 @@ function transformES2015(context) { return visitStringLiteral(node); case 8 /* NumericLiteral */: return visitNumericLiteral(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: return visitTemplateExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return visitYieldExpression(node); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return visitSpreadElement(node); case 107 /* SuperKeyword */: return visitSuperKeyword(false); case 109 /* ThisKeyword */: return visitThisKeyword(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return visitMetaProperty(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return visitAccessorDeclaration(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return visitReturnStatement(node); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return visitVoidExpression(node); default: return visitEachChild(node, visitor, context); @@ -91906,13 +92110,13 @@ function transformES2015(context) { } function visitBreakOrContinueStatement(node) { if (convertedLoopState) { - const jump = node.kind === 253 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + const jump = node.kind === 255 /* 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 === 253 /* BreakStatement */) { + if (node.kind === 255 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; labelMarker = "break"; } else { @@ -91920,7 +92124,7 @@ function transformES2015(context) { labelMarker = "continue"; } } else { - if (node.kind === 253 /* BreakStatement */) { + if (node.kind === 255 /* BreakStatement */) { labelMarker = `break-${label.escapedText}`; setLabeledJump(convertedLoopState, true, idText(label), labelMarker); } else { @@ -92164,14 +92368,14 @@ function transformES2015(context) { }; } function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 254 /* ReturnStatement */) { + if (statement.kind === 256 /* ReturnStatement */) { return true; - } else if (statement.kind === 246 /* IfStatement */) { + } else if (statement.kind === 248 /* IfStatement */) { const ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } - } else if (statement.kind === 242 /* Block */) { + } else if (statement.kind === 244 /* Block */) { const lastStatement = lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -92413,7 +92617,7 @@ function transformES2015(context) { return true; } function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) { + if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 221 /* ArrowFunction */) { insertCaptureThisForNode(statements, node, factory2.createThis()); return true; } @@ -92452,21 +92656,21 @@ function transformES2015(context) { if (hierarchyFacts & 32768 /* NewTarget */) { let newTarget; switch (node.kind) { - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return statements; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: newTarget = factory2.createVoidZero(); break; - case 176 /* Constructor */: + case 178 /* Constructor */: newTarget = factory2.createPropertyAccessExpression( setEmitFlags(factory2.createThis(), 4 /* NoSubstitution */), "constructor" ); break; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: newTarget = factory2.createConditionalExpression( factory2.createLogicalAnd( setEmitFlags(factory2.createThis(), 4 /* NoSubstitution */), @@ -92510,21 +92714,21 @@ function transformES2015(context) { function addClassMembers(statements, node) { for (const member of node.members) { switch (member.kind) { - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 176 /* Constructor */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 177 /* ClassStaticBlockDeclaration */: break; default: Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName); @@ -92677,7 +92881,7 @@ function transformES2015(context) { 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 === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { + if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */)) { name = factory2.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); @@ -92723,7 +92927,7 @@ function transformES2015(context) { multiLine = true; } } else { - Debug.assert(node.kind === 219 /* ArrowFunction */); + Debug.assert(node.kind === 221 /* ArrowFunction */); statementsLocation = moveRangeEnd(body, -1); const equalsGreaterThanToken = node.equalsGreaterThanToken; if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { @@ -92926,14 +93130,14 @@ function transformES2015(context) { } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return visitDoOrWhileStatement(node, outermostLabeledStatement); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node, outermostLabeledStatement); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatement(node, outermostLabeledStatement); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -93210,7 +93414,7 @@ function transformES2015(context) { 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 === 166 /* ComputedPropertyName */)) { + if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 167 /* ComputedPropertyName */)) { numInitialProperties = i; break; } @@ -93322,15 +93526,15 @@ function transformES2015(context) { } function convertIterationStatementCore(node, initializerFunction, convertedLoopBody) { switch (node.kind) { - case 249 /* ForStatement */: + case 251 /* ForStatement */: return convertForStatement(node, initializerFunction, convertedLoopBody); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return convertForInStatement(node, convertedLoopBody); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return convertForOfStatement(node, convertedLoopBody); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return convertDoStatement(node, convertedLoopBody); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return convertWhileStatement(node, convertedLoopBody); default: return Debug.failBadSyntaxKind(node, "IterationStatement expected"); @@ -93381,11 +93585,11 @@ function transformES2015(context) { function createConvertedLoopState(node) { let loopInitializer; switch (node.kind) { - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: const initializer = node.initializer; - if (initializer && initializer.kind === 262 /* VariableDeclarationList */) { + if (initializer && initializer.kind === 264 /* VariableDeclarationList */) { loopInitializer = initializer; } break; @@ -93739,20 +93943,20 @@ function transformES2015(context) { for (let i = start; i < numProperties; i++) { const property = properties[i]; switch (property.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, !!node.multiLine)); } break; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -93855,7 +94059,7 @@ function transformES2015(context) { let updated; const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (node.kind === 177 /* GetAccessor */) { + if (node.kind === 179 /* GetAccessor */) { updated = factory2.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body); } else { updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); @@ -94157,13 +94361,13 @@ function transformES2015(context) { if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) { enabledSubstitutions |= 1 /* CapturedThis */; context.enableSubstitution(109 /* ThisKeyword */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(219 /* ArrowFunction */); - context.enableEmitNotification(218 /* FunctionExpression */); - context.enableEmitNotification(263 /* FunctionDeclaration */); + context.enableEmitNotification(178 /* Constructor */); + context.enableEmitNotification(176 /* MethodDeclaration */); + context.enableEmitNotification(179 /* GetAccessor */); + context.enableEmitNotification(180 /* SetAccessor */); + context.enableEmitNotification(221 /* ArrowFunction */); + context.enableEmitNotification(220 /* FunctionExpression */); + context.enableEmitNotification(265 /* FunctionDeclaration */); } } function onSubstituteNode(hint, node) { @@ -94187,10 +94391,10 @@ function transformES2015(context) { } function isNameOfDeclarationWithCollidingName(node) { switch (node.parent.kind) { - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: - case 269 /* EnumDeclaration */: - case 261 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: + case 272 /* EnumDeclaration */: + case 263 /* VariableDeclaration */: return node.parent.name === node && resolver.isDeclarationWithCollidingName(node.parent); } return false; @@ -94247,11 +94451,11 @@ function transformES2015(context) { return false; } const statement = firstOrUndefined(constructor.body.statements); - if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 245 /* ExpressionStatement */) { + if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 247 /* ExpressionStatement */) { return false; } const statementExpression = statement.expression; - if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 213 /* CallExpression */) { + if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 215 /* CallExpression */) { return false; } const callTarget = statementExpression.expression; @@ -94259,7 +94463,7 @@ function transformES2015(context) { return false; } const callArgument = singleOrUndefined(statementExpression.arguments); - if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 231 /* SpreadElement */) { + if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 233 /* SpreadElement */) { return false; } const expression = callArgument.expression; @@ -94276,24 +94480,24 @@ function transformES5(context) { if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(289 /* JsxOpeningElement */); - context.enableEmitNotification(290 /* JsxClosingElement */); - context.enableEmitNotification(288 /* JsxSelfClosingElement */); + context.enableEmitNotification(292 /* JsxOpeningElement */); + context.enableEmitNotification(293 /* JsxClosingElement */); + context.enableEmitNotification(291 /* JsxSelfClosingElement */); noSubstitution = []; } const previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(305 /* PropertyAssignment */); + context.enableSubstitution(213 /* PropertyAccessExpression */); + context.enableSubstitution(308 /* PropertyAssignment */); return chainBundle(context, transformSourceFile); function transformSourceFile(node) { return node; } function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 289 /* JsxOpeningElement */: - case 290 /* JsxClosingElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 293 /* JsxClosingElement */: + case 291 /* JsxSelfClosingElement */: const tagName = node.tagName; noSubstitution[getOriginalNodeId(tagName)] = true; break; @@ -94464,13 +94668,13 @@ function transformGenerators(context) { } function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 247 /* DoStatement */: + case 249 /* DoStatement */: return visitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return visitWhileStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return visitSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -94478,24 +94682,24 @@ function transformGenerators(context) { } function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return visitFunctionExpression(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return visitAccessorDeclaration(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatement(node); - case 253 /* BreakStatement */: + case 255 /* BreakStatement */: return visitBreakStatement(node); - case 252 /* ContinueStatement */: + case 254 /* ContinueStatement */: return visitContinueStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return visitReturnStatement(node); default: if (node.transformFlags & 1048576 /* ContainsYield */) { @@ -94509,23 +94713,23 @@ function transformGenerators(context) { } function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return visitBinaryExpression(node); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return visitCommaListExpression(node); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return visitConditionalExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return visitYieldExpression(node); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return visitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return visitNewExpression(node); default: return visitEachChild(node, visitor, context); @@ -94533,9 +94737,9 @@ function transformGenerators(context) { } function visitGenerator(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return visitFunctionExpression(node); default: return Debug.failBadSyntaxKind(node); @@ -94702,14 +94906,14 @@ function transformGenerators(context) { if (containsYield(right)) { let target; switch (left.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: target = factory2.updatePropertyAccessExpression( left, cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)), left.name ); break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: target = factory2.updateElementAccessExpression( left, cacheExpression(visitNode(left.expression, visitor, isLeftHandSideExpression)), @@ -94981,35 +95185,35 @@ function transformGenerators(context) { } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 242 /* Block */: + case 244 /* Block */: return transformAndEmitBlock(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return transformAndEmitExpressionStatement(node); - case 246 /* IfStatement */: + case 248 /* IfStatement */: return transformAndEmitIfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return transformAndEmitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return transformAndEmitWhileStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return transformAndEmitForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return transformAndEmitForInStatement(node); - case 252 /* ContinueStatement */: + case 254 /* ContinueStatement */: return transformAndEmitContinueStatement(node); - case 253 /* BreakStatement */: + case 255 /* BreakStatement */: return transformAndEmitBreakStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return transformAndEmitReturnStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return transformAndEmitWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return transformAndEmitSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return transformAndEmitLabeledStatement(node); - case 258 /* ThrowStatement */: + case 260 /* ThrowStatement */: return transformAndEmitThrowStatement(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return transformAndEmitTryStatement(node); default: return emitStatement(visitNode(node, visitor, isStatement)); @@ -95334,7 +95538,7 @@ function transformGenerators(context) { for (let i = 0; i < numClauses; i++) { const clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 299 /* DefaultClause */ && defaultClauseIndex === -1) { + if (clause.kind === 302 /* DefaultClause */ && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -95344,7 +95548,7 @@ function transformGenerators(context) { let defaultClausesSkipped = 0; for (let i = clausesWritten; i < numClauses; i++) { const clause = caseBlock.clauses[i]; - if (clause.kind === 298 /* CaseClause */) { + if (clause.kind === 301 /* CaseClause */) { if (containsYield(clause.expression) && pendingClauses.length > 0) { break; } @@ -96269,12 +96473,12 @@ function transformModule(context) { const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(215 /* TaggedTemplateExpression */); + context.enableSubstitution(215 /* CallExpression */); + context.enableSubstitution(217 /* TaggedTemplateExpression */); context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(227 /* BinaryExpression */); - context.enableSubstitution(306 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(314 /* SourceFile */); + context.enableSubstitution(229 /* BinaryExpression */); + context.enableSubstitution(309 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(317 /* SourceFile */); const moduleInfoMap = []; const deferredExports = []; let currentSourceFile; @@ -96582,23 +96786,23 @@ function transformModule(context) { } function topLevelVisitor(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return visitImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return visitExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return visitExportAssignment(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 361 /* MergeDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 362 /* EndOfDeclarationMarker */: + case 365 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return visitor(node); @@ -96609,26 +96813,26 @@ function transformModule(context) { return node; } switch (node.kind) { - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) { return visitImportCallExpression(node); } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -96643,24 +96847,24 @@ function transformModule(context) { if (isObjectLiteralExpression(node)) { for (const elem of node.properties) { switch (elem.kind) { - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (destructuringNeedsFlattening(elem.initializer)) { return true; } break; - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: if (destructuringNeedsFlattening(elem.name)) { return true; } break; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: if (destructuringNeedsFlattening(elem.expression)) { return true; } break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return false; default: Debug.assertNever(elem, "Unhandled object member kind"); @@ -97317,7 +97521,7 @@ function transformModule(context) { } } function visitMergeDeclarationMarker(node) { - if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 244 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 246 /* VariableStatement */) { const id = getOriginalNodeId(node); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original); } @@ -97349,10 +97553,10 @@ function transformModule(context) { const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 278 /* NamedImports */: + case 281 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding, true); } @@ -97496,7 +97700,7 @@ function transformModule(context) { return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)]; previousOnEmitNode(hint, node, emitCallback); @@ -97534,11 +97738,11 @@ function transformModule(context) { switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return substituteCallExpression(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return substituteTaggedTemplateExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return substituteBinaryExpression(node); } return node; @@ -97589,7 +97793,7 @@ function transformModule(context) { return node; } else if (!(isGeneratedIdentifier(node) && !(node.autoGenerateFlags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) { const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); - if (exportContainer && exportContainer.kind === 314 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 317 /* SourceFile */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createIdentifier("exports"), @@ -97668,10 +97872,10 @@ function transformSystemModule(context) { context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; context.enableSubstitution(79 /* Identifier */); - context.enableSubstitution(306 /* ShorthandPropertyAssignment */); - context.enableSubstitution(227 /* BinaryExpression */); - context.enableSubstitution(237 /* MetaProperty */); - context.enableEmitNotification(314 /* SourceFile */); + context.enableSubstitution(309 /* ShorthandPropertyAssignment */); + context.enableSubstitution(229 /* BinaryExpression */); + context.enableSubstitution(239 /* MetaProperty */); + context.enableEmitNotification(317 /* SourceFile */); const moduleInfoMap = []; const deferredExports = []; const exportFunctionsMap = []; @@ -97821,7 +98025,7 @@ function transformSystemModule(context) { if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) { let hasExportDeclarationWithExportClause = false; for (const externalImport of moduleInfo.externalImports) { - if (externalImport.kind === 281 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 284 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -97940,11 +98144,11 @@ function transformSystemModule(context) { for (const entry of group2.externalImports) { const importVariableName = getLocalNameForExternalImport(factory2, entry, currentSourceFile); switch (entry.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: if (!entry.importClause) { break; } - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: Debug.assert(importVariableName !== void 0); statements.push( factory2.createExpressionStatement( @@ -97966,7 +98170,7 @@ function transformSystemModule(context) { ); } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: Debug.assert(importVariableName !== void 0); if (entry.exportClause) { if (isNamedExports(entry.exportClause)) { @@ -98035,13 +98239,13 @@ function transformSystemModule(context) { } function topLevelVisitor(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return visitImportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return visitExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return visitExportAssignment(node); default: return topLevelNestedVisitor(node); @@ -98186,7 +98390,7 @@ function transformSystemModule(context) { } } function shouldHoistVariableDeclarationList(node) { - return (getEmitFlags(node) & 2097152 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 314 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); + return (getEmitFlags(node) & 2097152 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 317 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); } function transformInitializedVariable(node, isExportedDeclaration) { const createAssignment3 = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; @@ -98210,7 +98414,7 @@ function transformSystemModule(context) { 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 === 244 /* VariableStatement */) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 246 /* VariableStatement */) { const id = getOriginalNodeId(node); const isExportedDeclaration = hasSyntacticModifier(node.original, 1 /* Export */); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration); @@ -98248,10 +98452,10 @@ function transformSystemModule(context) { const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 278 /* NamedImports */: + case 281 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding); } @@ -98346,43 +98550,43 @@ function transformSystemModule(context) { } function topLevelNestedVisitor(node) { switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return visitVariableStatement(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return visitClassDeclaration(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node, true); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return visitForInStatement(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return visitForOfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return visitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return visitWhileStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return visitLabeledStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return visitWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return visitSwitchStatement(node); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return visitCaseBlock(node); - case 298 /* CaseClause */: + case 301 /* CaseClause */: return visitCaseClause(node); - case 299 /* DefaultClause */: + case 302 /* DefaultClause */: return visitDefaultClause(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return visitTryStatement(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return visitCatchClause(node); - case 242 /* Block */: + case 244 /* Block */: return visitBlock(node); - case 361 /* MergeDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 362 /* EndOfDeclarationMarker */: + case 365 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return visitor(node); @@ -98524,26 +98728,26 @@ function transformSystemModule(context) { return node; } switch (node.kind) { - case 249 /* ForStatement */: + case 251 /* ForStatement */: return visitForStatement(node, false); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (isImportCall(node)) { return visitImportCallExpression(node); } break; - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -98603,7 +98807,7 @@ function transformSystemModule(context) { return hasExportedReferenceInDestructuringTarget(node.initializer); } else if (isIdentifier(node)) { const container = resolver.getReferencedExportContainer(node); - return container !== void 0 && container.kind === 314 /* SourceFile */; + return container !== void 0 && container.kind === 317 /* SourceFile */; } else { return false; } @@ -98647,7 +98851,7 @@ function transformSystemModule(context) { return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { const id = getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -98681,7 +98885,7 @@ function transformSystemModule(context) { } function substituteUnspecified(node) { switch (node.kind) { - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return substituteShorthandPropertyAssignment(node); } return node; @@ -98723,9 +98927,9 @@ function transformSystemModule(context) { switch (node.kind) { case 79 /* Identifier */: return substituteExpressionIdentifier(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return substituteBinaryExpression(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return substituteMetaProperty(node); } return node; @@ -98788,7 +98992,7 @@ function transformSystemModule(context) { const valueDeclaration = resolver.getReferencedImportDeclaration(name) || resolver.getReferencedValueDeclaration(name); if (valueDeclaration) { const exportContainer = resolver.getReferencedExportContainer(name, false); - if (exportContainer && exportContainer.kind === 314 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 317 /* SourceFile */) { exportedNames = append(exportedNames, factory2.getDeclarationName(valueDeclaration)); } exportedNames = addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]); @@ -98821,7 +99025,7 @@ function transformECMAScriptModule(context) { const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(314 /* SourceFile */); + context.enableEmitNotification(317 /* SourceFile */); context.enableSubstitution(79 /* Identifier */); let helperNameSubstitutions; let currentSourceFile; @@ -98872,11 +99076,11 @@ function transformECMAScriptModule(context) { } function visitor(node) { switch (node.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return getEmitModuleKind(compilerOptions) >= 100 /* Node16 */ ? visitImportEqualsDeclaration(node) : void 0; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return visitExportAssignment(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: const exportDecl = node; return visitExportDeclaration(exportDecl); } @@ -99038,8 +99242,8 @@ function transformNodeModule(context) { const cjsOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(314 /* SourceFile */); - context.enableEmitNotification(314 /* SourceFile */); + context.enableSubstitution(317 /* SourceFile */); + context.enableEmitNotification(317 /* SourceFile */); let currentSourceFile; return transformSourceFileOrBundle; function onSubstituteNode(hint, node) { @@ -99082,7 +99286,7 @@ function transformNodeModule(context) { return result; } function transformSourceFileOrBundle(node) { - return node.kind === 314 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 317 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -99112,7 +99316,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.kind === 266 /* 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; @@ -99129,7 +99333,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.kind === 266 /* 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; @@ -99137,7 +99341,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { } } function createGetSymbolAccessibilityDiagnosticForNode(node) { - if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isAnnotationPropertyDeclaration(node) || isPropertyAccessExpression(node) || isBindingElement(node) || isConstructorDeclaration(node)) { + if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isAnnotationPropertyDeclaration(node) || isPropertyAccessExpression(node) || isBindingElement(node) || isConstructorDeclaration(node) || isOverloadPropertyDeclaration(node)) { return getVariableDeclarationTypeVisibilityError; } else if (isSetAccessor(node) || isGetAccessor(node)) { return getAccessorDeclarationTypeVisibilityError; @@ -99160,12 +99364,12 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { 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 === 261 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { + if (node.kind === 263 /* VariableDeclaration */ || node.kind === 210 /* 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 === 171 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 170 /* PropertySignature */ || node.kind === 168 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { + } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 213 /* PropertyAccessExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* 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 === 264 /* ClassDeclaration */ || node.kind === 168 /* Parameter */) { + } else if (node.parent.kind === 266 /* ClassDeclaration */ || node.kind === 169 /* 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; @@ -99182,7 +99386,7 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; - if (node.kind === 178 /* SetAccessor */) { + if (node.kind === 180 /* 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 { @@ -99204,26 +99408,26 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { function getReturnTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; switch (node.kind) { - case 180 /* ConstructSignature */: + case 182 /* 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 179 /* CallSignature */: + case 181 /* 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 181 /* IndexSignature */: + case 183 /* 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 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.kind === 266 /* 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 263 /* FunctionDeclaration */: + case 265 /* 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: @@ -99244,29 +99448,29 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 176 /* Constructor */: + case 178 /* 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 180 /* ConstructSignature */: - case 185 /* ConstructorType */: + case 182 /* ConstructSignature */: + case 187 /* 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 179 /* CallSignature */: + case 181 /* 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 181 /* IndexSignature */: + case 183 /* 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 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 266 /* 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 263 /* FunctionDeclaration */: - case 184 /* FunctionType */: + case 265 /* FunctionDeclaration */: + case 186 /* 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 178 /* SetAccessor */: - case 177 /* GetAccessor */: + case 180 /* SetAccessor */: + case 179 /* 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)}`); @@ -99275,37 +99479,37 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { function getTypeParameterConstraintVisibilityError() { let diagnosticMessage; switch (node.parent.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 200 /* MappedType */: + case 202 /* MappedType */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1; break; - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 187 /* ConstructorType */: + case 182 /* ConstructSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 179 /* CallSignature */: + case 181 /* CallSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* 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 === 264 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 266 /* 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 184 /* FunctionType */: - case 263 /* FunctionDeclaration */: + case 186 /* FunctionType */: + case 265 /* FunctionDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -99358,7 +99562,7 @@ function hasInternalAnnotation(range, currentSourceFile) { } function isInternalDeclaration(node, currentSourceFile) { const parseTreeNode = getParseTreeNode(node); - if (parseTreeNode && parseTreeNode.kind === 168 /* Parameter */) { + if (parseTreeNode && parseTreeNode.kind === 169 /* Parameter */) { const paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode); const previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : void 0; const text = currentSourceFile.text; @@ -99567,10 +99771,10 @@ function transformDeclarations(context) { return result; } function transformRoot(node) { - if (node.kind === 314 /* SourceFile */ && node.isDeclarationFile) { + if (node.kind === 317 /* SourceFile */ && node.isDeclarationFile) { return node; } - if (node.kind === 315 /* Bundle */) { + if (node.kind === 318 /* Bundle */) { isBundledEmit = true; refs = new Map2(); libs2 = new Map2(); @@ -99607,7 +99811,7 @@ function transformDeclarations(context) { return factory2.updateSourceFile(sourceFile, transformAndReplaceLatePaintedStatements(updated2), true, [], [], false, []); } ), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 317 /* InputFiles */) { + if (prepend.kind === 320 /* InputFiles */) { const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; collectReferences(sourceFile, refs); @@ -99749,14 +99953,14 @@ function transformDeclarations(context) { if (name.kind === 79 /* Identifier */) { return name; } else { - if (name.kind === 207 /* ArrayBindingPattern */) { + if (name.kind === 209 /* ArrayBindingPattern */) { return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement)); } else { return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement)); } } function visitBindingElement(elem) { - if (elem.kind === 233 /* OmittedExpression */) { + if (elem.kind === 235 /* OmittedExpression */) { return elem; } if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced) { @@ -99816,14 +100020,14 @@ function transformDeclarations(context) { if (type !== void 0 && isTypeReferenceNode(type) && type.typeName.virtual) { return; } - const shouldUseResolverType = node.kind === 168 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); + const shouldUseResolverType = node.kind === 169 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); if (type && !shouldUseResolverType) { return visitNode(type, visitDeclarationSubtree); } if (!getParseTreeNode(node)) { return type ? visitNode(type, visitDeclarationSubtree) : factory2.createKeywordTypeNode(132 /* AnyKeyword */); } - if (node.kind === 178 /* SetAccessor */) { + if (node.kind === 180 /* SetAccessor */) { return factory2.createKeywordTypeNode(132 /* AnyKeyword */); } errorNameNode = node.name; @@ -99832,10 +100036,10 @@ function transformDeclarations(context) { oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); } - if (node.kind === 261 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { + if (node.kind === 263 /* VariableDeclaration */ || node.kind === 210 /* BindingElement */) { return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); } - if (node.kind === 168 /* Parameter */ || node.kind === 171 /* PropertyDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 172 /* AnnotationPropertyDeclaration */) { + if (node.kind === 169 /* Parameter */ || node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 173 /* AnnotationPropertyDeclaration */ || node.kind === 174 /* OverloadPropertyDeclaration */) { 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)); @@ -99852,23 +100056,23 @@ function transformDeclarations(context) { function isDeclarationAndNotVisible(node) { node = getParseTreeNode(node); switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 270 /* ModuleDeclaration */: - case 267 /* InterfaceDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 266 /* AnnotationDeclaration */: + case 265 /* FunctionDeclaration */: + case 273 /* ModuleDeclaration */: + case 270 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 268 /* AnnotationDeclaration */: return !resolver.isDeclarationVisible(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return !getBindingNameVisible(node); - case 274 /* ImportEqualsDeclaration */: - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: + case 277 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: return false; - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return true; } return false; @@ -99933,7 +100137,7 @@ function transformDeclarations(context) { return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree); } function isEnclosingDeclaration(node) { - return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isStructDeclaration(node) || isAnnotationDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node); + return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isStructDeclaration(node) || isAnnotationDeclaration(node) || isOverloadDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node); } function checkEntityNameVisibility(entityName, enclosingDeclaration2) { const visibilityResult = resolver.isEntityNameVisible(entityName, enclosingDeclaration2); @@ -99949,7 +100153,7 @@ function transformDeclarations(context) { function rewriteModuleSpecifier(parent2, input) { if (!input) return void 0; - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 270 /* ModuleDeclaration */ && parent2.kind !== 205 /* ImportType */; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 273 /* ModuleDeclaration */ && parent2.kind !== 207 /* ImportType */; if (isStringLiteralLike(input)) { if (isBundledEmit) { const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent2); @@ -99968,7 +100172,7 @@ function transformDeclarations(context) { function transformImportEqualsDeclaration(decl) { if (!resolver.isDeclarationVisible(decl)) return; - if (decl.moduleReference.kind === 286 /* ExternalModuleReference */) { + if (decl.moduleReference.kind === 289 /* ExternalModuleReference */) { const specifier = getExternalModuleImportEqualsDeclarationExpression(decl); return factory2.updateImportEqualsDeclaration( decl, @@ -100004,7 +100208,7 @@ function transformDeclarations(context) { void 0 ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); } - if (decl.importClause.namedBindings.kind === 277 /* NamespaceImport */) { + if (decl.importClause.namedBindings.kind === 280 /* NamespaceImport */) { const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : void 0; return visibleDefaultBinding || namedBindings ? factory2.updateImportDeclaration(decl, decl.modifiers, factory2.updateImportClause( decl.importClause, @@ -100115,7 +100319,7 @@ function transformDeclarations(context) { const oldDiag = getSymbolAccessibilityDiagnostic; const canProduceDiagnostic = canProduceDiagnostics(input); const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; - let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 187 /* TypeLiteral */ || input.kind === 200 /* MappedType */) && input.parent.kind !== 268 /* TypeAliasDeclaration */; + let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 189 /* TypeLiteral */ || input.kind === 202 /* MappedType */) && input.parent.kind !== 271 /* TypeAliasDeclaration */; if (isMethodDeclaration(input) || isMethodSignature(input)) { if (hasEffectiveModifier(input, 8 /* Private */)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) @@ -100134,26 +100338,26 @@ function transformDeclarations(context) { } if (isProcessedComponent(input)) { switch (input.kind) { - case 234 /* ExpressionWithTypeArguments */: { + case 236 /* 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 183 /* TypeReference */: { + case 185 /* TypeReference */: { checkEntityNameVisibility(input.typeName, enclosingDeclaration); const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateTypeReferenceNode(node, node.typeName, node.typeArguments)); } - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: return cleanup(factory2.updateConstructSignature( input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type) )); - case 176 /* Constructor */: { + case 178 /* Constructor */: { const ctor = factory2.createConstructorDeclaration( ensureModifiers(input), updateParamsList(input, input.parameters, 0 /* None */), @@ -100161,7 +100365,7 @@ function transformDeclarations(context) { ); return cleanup(ctor); } - case 174 /* MethodDeclaration */: { + case 176 /* MethodDeclaration */: { if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -100179,7 +100383,7 @@ function transformDeclarations(context) { ); return cleanup(sig); } - case 177 /* GetAccessor */: { + case 179 /* GetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -100193,7 +100397,7 @@ function transformDeclarations(context) { void 0 )); } - case 178 /* SetAccessor */: { + case 180 /* SetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -100205,7 +100409,7 @@ function transformDeclarations(context) { void 0 )); } - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -100218,14 +100422,14 @@ function transformDeclarations(context) { ensureType(input, input.type), ensureNoInitializer(input) )); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return cleanup(factory2.updateAnnotationPropertyDeclaration( input, input.name, ensureType(input, input.type), input.initializer )); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -100236,7 +100440,18 @@ function transformDeclarations(context) { input.questionToken, ensureType(input, input.type) )); - case 173 /* MethodSignature */: { + case 174 /* OverloadPropertyDeclaration */: + if (isPrivateIdentifier(input.name)) { + return cleanup(void 0); + } + return cleanup(factory2.updateOverloadPropertyDeclaration( + input, + ensureModifiers(input), + input.name, + input.questionToken, + ensureType(input, input.type) + )); + case 175 /* MethodSignature */: { if (isPrivateIdentifier(input.name)) { return cleanup(void 0); } @@ -100250,7 +100465,7 @@ function transformDeclarations(context) { ensureType(input, input.type) )); } - case 179 /* CallSignature */: { + case 181 /* CallSignature */: { return cleanup(factory2.updateCallSignature( input, ensureTypeParams(input, input.typeParameters), @@ -100258,7 +100473,7 @@ function transformDeclarations(context) { ensureType(input, input.type) )); } - case 181 /* IndexSignature */: { + case 183 /* IndexSignature */: { return cleanup(factory2.updateIndexSignature( input, ensureModifiers(input), @@ -100266,7 +100481,7 @@ function transformDeclarations(context) { visitNode(input.type, visitDeclarationSubtree) || factory2.createKeywordTypeNode(132 /* AnyKeyword */) )); } - case 261 /* VariableDeclaration */: { + case 263 /* VariableDeclaration */: { if (isBindingPattern(input.name)) { return recreateBindingPattern(input.name); } @@ -100274,13 +100489,13 @@ function transformDeclarations(context) { suppressNewDiagnosticContexts = true; return cleanup(factory2.updateVariableDeclaration(input, input.name, void 0, ensureType(input, input.type), ensureNoInitializer(input))); } - case 167 /* TypeParameter */: { + case 168 /* TypeParameter */: { if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { return cleanup(factory2.updateTypeParameterDeclaration(input, input.modifiers, input.name, void 0, void 0)); } return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); } - case 194 /* ConditionalType */: { + case 196 /* ConditionalType */: { const checkType = visitNode(input.checkType, visitDeclarationSubtree); const extendsType = visitNode(input.extendsType, visitDeclarationSubtree); const oldEnclosingDecl = enclosingDeclaration; @@ -100290,13 +100505,13 @@ function transformDeclarations(context) { const falseType = visitNode(input.falseType, visitDeclarationSubtree); return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType)); } - case 184 /* FunctionType */: { + case 186 /* FunctionType */: { return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree))); } - case 185 /* ConstructorType */: { + case 187 /* ConstructorType */: { return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree))); } - case 205 /* ImportType */: { + case 207 /* ImportType */: { if (!isLiteralImportTypeNode(input)) return cleanup(input); return cleanup(factory2.updateImportTypeNode( @@ -100336,7 +100551,7 @@ function transformDeclarations(context) { } } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); + return node.parent.kind === 176 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); } function visitDeclarationStatements(input) { if (!isPreservedDeclarationStatement(input)) { @@ -100345,7 +100560,7 @@ function transformDeclarations(context) { if (shouldStripInternal(input)) return; switch (input.kind) { - case 281 /* ExportDeclaration */: { + case 284 /* ExportDeclaration */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -100359,7 +100574,7 @@ function transformDeclarations(context) { getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0 ); } - case 280 /* ExportAssignment */: { + case 283 /* ExportAssignment */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -100401,10 +100616,10 @@ function transformDeclarations(context) { if (shouldStripInternal(input)) return; switch (input.kind) { - case 274 /* ImportEqualsDeclaration */: { + case 277 /* ImportEqualsDeclaration */: { return transformImportEqualsDeclaration(input); } - case 275 /* ImportDeclaration */: { + case 278 /* ImportDeclaration */: { return transformImportDeclaration(input); } } @@ -100424,7 +100639,7 @@ function transformDeclarations(context) { } const previousNeedsDeclare = needsDeclare; switch (input.kind) { - case 268 /* TypeAliasDeclaration */: { + case 271 /* TypeAliasDeclaration */: { needsDeclare = false; const clean2 = cleanup(factory2.updateTypeAliasDeclaration( input, @@ -100439,7 +100654,7 @@ function transformDeclarations(context) { needsDeclare = previousNeedsDeclare; return clean2; } - case 267 /* InterfaceDeclaration */: { + case 270 /* InterfaceDeclaration */: { return cleanup(factory2.updateInterfaceDeclaration( input, ensureModifiers(input), @@ -100449,7 +100664,7 @@ function transformDeclarations(context) { visitNodes2(input.members, visitDeclarationSubtree) )); } - case 263 /* FunctionDeclaration */: { + case 265 /* FunctionDeclaration */: { const clean2 = cleanup(factory2.updateFunctionDeclaration( input, ensureModifiers(input), @@ -100539,10 +100754,10 @@ function transformDeclarations(context) { return clean2; } } - case 270 /* ModuleDeclaration */: { + case 273 /* ModuleDeclaration */: { needsDeclare = false; const inner = input.body; - if (inner && inner.kind === 271 /* ModuleBlock */) { + if (inner && inner.kind === 274 /* ModuleBlock */) { const oldNeedsScopeFix = needsScopeFixMarker; const oldHasScopeFix = resultHasScopeMarker; resultHasScopeMarker = false; @@ -100586,7 +100801,7 @@ function transformDeclarations(context) { )); } } - case 265 /* StructDeclaration */: { + case 267 /* StructDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const decorators = ensureEtsDecorators(input, host); @@ -100603,7 +100818,7 @@ function transformDeclarations(context) { members )); } - case 266 /* AnnotationDeclaration */: { + case 268 /* AnnotationDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -100616,7 +100831,20 @@ function transformDeclarations(context) { members )); } - case 264 /* ClassDeclaration */: { + case 269 /* OverloadDeclaration */: { + errorNameNode = input.name; + errorFallbackNode = input; + const modifiers = factory2.createNodeArray(ensureModifiers(input)); + const memberNodes = visitNodes2(input.members, visitDeclarationSubtree); + const members = factory2.createNodeArray(memberNodes); + return cleanup(factory2.updateOverloadDeclaration( + input, + modifiers, + input.name, + members + )); + } + case 266 /* ClassDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -100719,10 +100947,10 @@ function transformDeclarations(context) { )); } } - case 244 /* VariableStatement */: { + case 246 /* VariableStatement */: { return cleanup(transformVariableStatement(input)); } - case 269 /* EnumDeclaration */: { + case 272 /* EnumDeclaration */: { return cleanup(factory2.updateEnumDeclaration(input, factory2.createNodeArray(ensureModifiers(input)), input.name, factory2.createNodeArray(mapDefined(input.members, (m) => { if (shouldStripInternal(m)) return; @@ -100738,7 +100966,7 @@ function transformDeclarations(context) { if (canProdiceDiagnostic) { getSymbolAccessibilityDiagnostic = oldDiag; } - if (input.kind === 270 /* ModuleDeclaration */) { + if (input.kind === 273 /* ModuleDeclaration */) { needsDeclare = previousNeedsDeclare; } if (node === input) { @@ -100761,7 +100989,7 @@ function transformDeclarations(context) { return flatten(mapDefined(d.elements, (e) => recreateBindingElement(e))); } function recreateBindingElement(e) { - if (e.kind === 233 /* OmittedExpression */) { + if (e.kind === 235 /* OmittedExpression */) { return; } if (e.name) { @@ -100810,7 +101038,7 @@ function transformDeclarations(context) { 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 === 314 /* SourceFile */; + const parentIsFile = node.parent.kind === 317 /* SourceFile */; if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { mask2 ^= 2 /* Ambient */; additions = 0 /* None */; @@ -100836,7 +101064,7 @@ function transformDeclarations(context) { } } function isAlwaysType(node) { - if (node.kind === 267 /* InterfaceDeclaration */) { + if (node.kind === 270 /* InterfaceDeclaration */) { return true; } return false; @@ -100856,60 +101084,62 @@ function maskModifierFlags(node, modifierMask = 258047 /* All */ ^ 4 /* Public * } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 177 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; + return accessor.kind === 179 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; } } function canHaveLiteralInitializer(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return !hasEffectiveModifier(node, 8 /* Private */); - case 168 /* Parameter */: - case 261 /* VariableDeclaration */: + case 169 /* Parameter */: + case 263 /* VariableDeclaration */: return true; } return false; } function isPreservedDeclarationStatement(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 270 /* ModuleDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 267 /* InterfaceDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 244 /* VariableStatement */: - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: + case 265 /* FunctionDeclaration */: + case 273 /* ModuleDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 270 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 246 /* VariableStatement */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: return true; } return false; } function isProcessedComponent(node) { switch (node.kind) { - case 180 /* ConstructSignature */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 181 /* IndexSignature */: - case 261 /* VariableDeclaration */: - case 167 /* TypeParameter */: - case 234 /* ExpressionWithTypeArguments */: - case 183 /* TypeReference */: - case 194 /* ConditionalType */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 205 /* ImportType */: + case 182 /* ConstructSignature */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 171 /* PropertySignature */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 183 /* IndexSignature */: + case 263 /* VariableDeclaration */: + case 168 /* TypeParameter */: + case 236 /* ExpressionWithTypeArguments */: + case 185 /* TypeReference */: + case 196 /* ConditionalType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 207 /* ImportType */: return true; } return false; @@ -101025,7 +101255,7 @@ function noEmitNotification(hint, node, callback) { } function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) { var _a2, _b; - const enabledSyntaxKindFeatures = new Array(364 /* Count */); + const enabledSyntaxKindFeatures = new Array(367 /* Count */); let lexicalEnvironmentVariableDeclarations; let lexicalEnvironmentFunctionDeclarations; let lexicalEnvironmentStatements; @@ -101104,7 +101334,7 @@ function transformNodes(resolver, host, factory2, options, nodes, transformers, state = 1 /* Initialized */; const transformed = []; for (const node of nodes) { - (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Emit, "transformNodes", node.kind === 314 /* 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 === 317 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); PerformanceDotting.start("transformRoot"); transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); PerformanceDotting.stop("transformRoot"); @@ -101421,7 +101651,7 @@ function getOutputPathsForBundle(options, forceDtsPaths) { } function getOutputPathsFor(sourceFile, host, forceDtsPaths) { const options = host.getCompilerOptions(); - if (sourceFile.kind === 315 /* Bundle */) { + if (sourceFile.kind === 318 /* Bundle */) { return getOutputPathsForBundle(options, forceDtsPaths); } else { const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options)); @@ -101794,8 +102024,8 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform2, printer3, mapOptions) { const sourceFileOrBundle = transform2.transformed[0]; - const bundle = sourceFileOrBundle.kind === 315 /* Bundle */ ? sourceFileOrBundle : void 0; - const sourceFile = sourceFileOrBundle.kind === 314 /* SourceFile */ ? sourceFileOrBundle : void 0; + const bundle = sourceFileOrBundle.kind === 318 /* Bundle */ ? sourceFileOrBundle : void 0; + const sourceFile = sourceFileOrBundle.kind === 317 /* SourceFile */ ? sourceFileOrBundle : void 0; const sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; let sourceMapGenerator; if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) { @@ -101849,7 +102079,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla writer.clear(); } function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) { - return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 314 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); + return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 317 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); } function getSourceRoot(mapOptions) { const sourceRoot = normalizeSlashes(mapOptions.sourceRoot || ""); @@ -102208,11 +102438,11 @@ function createPrinter(printerOptions = {}, handlers = {}) { break; } switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: return printFile(node); - case 315 /* Bundle */: + case 318 /* Bundle */: return printBundle(node); - case 316 /* UnparsedSource */: + case 319 /* UnparsedSource */: return printUnparsedSource(node); } writeNode(hint, node, sourceFile, beginPrint()); @@ -102526,300 +102756,304 @@ function createPrinter(printerOptions = {}, handlers = {}) { return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return emitQualifiedName(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return emitTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return emitParameter(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return emitDecorator(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return emitPropertySignature(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return emitPropertyDeclaration(node); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return emitAnnotationPropertyDeclaration(node); - case 173 /* MethodSignature */: + case 174 /* OverloadPropertyDeclaration */: + return emitOverloadPropertyDeclaration(node); + case 175 /* MethodSignature */: return emitMethodSignature(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return emitMethodDeclaration(node); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return emitClassStaticBlockDeclaration(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return emitConstructor(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return emitAccessorDeclaration(node); - case 179 /* CallSignature */: + case 181 /* CallSignature */: return emitCallSignature(node); - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: return emitConstructSignature(node); - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return emitIndexSignature(node); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return emitTypePredicate(node); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return emitTypeReference(node); - case 184 /* FunctionType */: + case 186 /* FunctionType */: return emitFunctionType(node); - case 185 /* ConstructorType */: + case 187 /* ConstructorType */: return emitConstructorType(node); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return emitTypeQuery(node); - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: return emitTypeLiteral(node); - case 188 /* ArrayType */: + case 190 /* ArrayType */: return emitArrayType(node); - case 189 /* TupleType */: + case 191 /* TupleType */: return emitTupleType(node); - case 190 /* OptionalType */: + case 192 /* OptionalType */: return emitOptionalType(node); - case 192 /* UnionType */: + case 194 /* UnionType */: return emitUnionType(node); - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return emitIntersectionType(node); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return emitConditionalType(node); - case 195 /* InferType */: + case 197 /* InferType */: return emitInferType(node); - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return emitParenthesizedType(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 197 /* ThisType */: + case 199 /* ThisType */: return emitThisType(); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return emitTypeOperator(node); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return emitIndexedAccessType(node); - case 200 /* MappedType */: + case 202 /* MappedType */: return emitMappedType(node); - case 201 /* LiteralType */: + case 203 /* LiteralType */: return emitLiteralType(node); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return emitNamedTupleMember(node); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: return emitTemplateType(node); - case 204 /* TemplateLiteralTypeSpan */: + case 206 /* TemplateLiteralTypeSpan */: return emitTemplateTypeSpan(node); - case 205 /* ImportType */: + case 207 /* ImportType */: return emitImportTypeNode(node); - case 206 /* ObjectBindingPattern */: + case 208 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return emitBindingElement(node); - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return emitTemplateSpan(node); - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: return emitSemicolonClassElement(); - case 242 /* Block */: + case 244 /* Block */: return emitBlock(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return emitVariableStatement(node); - case 243 /* EmptyStatement */: + case 245 /* EmptyStatement */: return emitEmptyStatement(false); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return emitExpressionStatement(node); - case 246 /* IfStatement */: + case 248 /* IfStatement */: return emitIfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return emitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return emitWhileStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return emitForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return emitForInStatement(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return emitForOfStatement(node); - case 252 /* ContinueStatement */: + case 254 /* ContinueStatement */: return emitContinueStatement(node); - case 253 /* BreakStatement */: + case 255 /* BreakStatement */: return emitBreakStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return emitReturnStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return emitWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return emitSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return emitLabeledStatement(node); - case 258 /* ThrowStatement */: + case 260 /* ThrowStatement */: return emitThrowStatement(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return emitTryStatement(node); - case 260 /* DebuggerStatement */: + case 262 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return emitVariableDeclarationList(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return emitFunctionDeclaration(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return emitClassOrStructDeclaration(node); - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return emitClassOrStructDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return emitAnnotationDeclaration(node); - case 267 /* InterfaceDeclaration */: + case 269 /* OverloadDeclaration */: + return emitOverloadDeclaration(node); + case 270 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return emitModuleBlock(node); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return emitCaseBlock(node); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return emitNamespaceExportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return emitImportDeclaration(node); - case 276 /* ImportClause */: + case 279 /* ImportClause */: return emitImportClause(node); - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return emitNamespaceImport(node); - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: return emitNamespaceExport(node); - case 278 /* NamedImports */: + case 281 /* NamedImports */: return emitNamedImports(node); - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return emitImportSpecifier(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return emitExportAssignment(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return emitExportDeclaration(node); - case 282 /* NamedExports */: + case 285 /* NamedExports */: return emitNamedExports(node); - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: return emitExportSpecifier(node); - case 302 /* AssertClause */: + case 305 /* AssertClause */: return emitAssertClause(node); - case 303 /* AssertEntry */: + case 306 /* AssertEntry */: return emitAssertEntry(node); - case 285 /* MissingDeclaration */: + case 288 /* MissingDeclaration */: return; - case 286 /* ExternalModuleReference */: + case 289 /* ExternalModuleReference */: return emitExternalModuleReference(node); case 11 /* JsxText */: return emitJsxText(node); - case 289 /* JsxOpeningElement */: - case 292 /* JsxOpeningFragment */: + case 292 /* JsxOpeningElement */: + case 295 /* JsxOpeningFragment */: return emitJsxOpeningElementOrFragment(node); - case 290 /* JsxClosingElement */: - case 293 /* JsxClosingFragment */: + case 293 /* JsxClosingElement */: + case 296 /* JsxClosingFragment */: return emitJsxClosingElementOrFragment(node); - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: return emitJsxAttribute(node); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return emitJsxAttributes(node); - case 296 /* JsxSpreadAttribute */: + case 299 /* JsxSpreadAttribute */: return emitJsxSpreadAttribute(node); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return emitJsxExpression(node); - case 298 /* CaseClause */: + case 301 /* CaseClause */: return emitCaseClause(node); - case 299 /* DefaultClause */: + case 302 /* DefaultClause */: return emitDefaultClause(node); - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return emitHeritageClause(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return emitCatchClause(node); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: return emitSpreadAssignment(node); - case 308 /* EnumMember */: + case 311 /* EnumMember */: return emitEnumMember(node); - case 309 /* UnparsedPrologue */: + case 312 /* UnparsedPrologue */: return writeUnparsedNode(node); - case 316 /* UnparsedSource */: - case 310 /* UnparsedPrepend */: + case 319 /* UnparsedSource */: + case 313 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); - case 311 /* UnparsedText */: - case 312 /* UnparsedInternalText */: + case 314 /* UnparsedText */: + case 315 /* UnparsedInternalText */: return emitUnparsedTextLike(node); - case 313 /* UnparsedSyntheticReference */: + case 316 /* UnparsedSyntheticReference */: return emitUnparsedSyntheticReference(node); - case 314 /* SourceFile */: + case 317 /* SourceFile */: return emitSourceFile(node); - case 315 /* Bundle */: + case 318 /* Bundle */: return Debug.fail("Bundles should be printed using printBundle"); - case 317 /* InputFiles */: + case 320 /* InputFiles */: return Debug.fail("InputFiles should not be printed"); - case 318 /* JSDocTypeExpression */: + case 321 /* JSDocTypeExpression */: return emitJSDocTypeExpression(node); - case 319 /* JSDocNameReference */: + case 322 /* JSDocNameReference */: return emitJSDocNameReference(node); - case 321 /* JSDocAllType */: + case 324 /* JSDocAllType */: return writePunctuation("*"); - case 322 /* JSDocUnknownType */: + case 325 /* JSDocUnknownType */: return writePunctuation("?"); - case 323 /* JSDocNullableType */: + case 326 /* JSDocNullableType */: return emitJSDocNullableType(node); - case 324 /* JSDocNonNullableType */: + case 327 /* JSDocNonNullableType */: return emitJSDocNonNullableType(node); - case 325 /* JSDocOptionalType */: + case 328 /* JSDocOptionalType */: return emitJSDocOptionalType(node); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: return emitJSDocFunctionType(node); - case 191 /* RestType */: - case 327 /* JSDocVariadicType */: + case 193 /* RestType */: + case 330 /* JSDocVariadicType */: return emitRestOrJSDocVariadicType(node); - case 328 /* JSDocNamepathType */: + case 331 /* JSDocNamepathType */: return; - case 329 /* JSDoc */: + case 332 /* JSDoc */: return emitJSDoc(node); - case 331 /* JSDocTypeLiteral */: + case 334 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 332 /* JSDocSignature */: + case 335 /* JSDocSignature */: return emitJSDocSignature(node); - case 336 /* JSDocTag */: - case 341 /* JSDocClassTag */: - case 346 /* JSDocOverrideTag */: + case 339 /* JSDocTag */: + case 344 /* JSDocClassTag */: + case 349 /* JSDocOverrideTag */: return emitJSDocSimpleTag(node); - case 337 /* JSDocAugmentsTag */: - case 338 /* JSDocImplementsTag */: + case 340 /* JSDocAugmentsTag */: + case 341 /* JSDocImplementsTag */: return emitJSDocHeritageTag(node); - case 339 /* JSDocAuthorTag */: - case 340 /* JSDocDeprecatedTag */: + case 342 /* JSDocAuthorTag */: + case 343 /* JSDocDeprecatedTag */: return; - case 342 /* JSDocPublicTag */: - case 343 /* JSDocPrivateTag */: - case 344 /* JSDocProtectedTag */: - case 345 /* JSDocReadonlyTag */: + case 345 /* JSDocPublicTag */: + case 346 /* JSDocPrivateTag */: + case 347 /* JSDocProtectedTag */: + case 348 /* JSDocReadonlyTag */: return; - case 347 /* JSDocCallbackTag */: + case 350 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); - case 349 /* JSDocParameterTag */: - case 356 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: + case 359 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 348 /* JSDocEnumTag */: - case 350 /* JSDocReturnTag */: - case 351 /* JSDocThisTag */: - case 352 /* JSDocTypeTag */: + case 351 /* JSDocEnumTag */: + case 353 /* JSDocReturnTag */: + case 354 /* JSDocThisTag */: + case 355 /* JSDocTypeTag */: return emitJSDocSimpleTypedTag(node); - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 355 /* JSDocSeeTag */: + case 358 /* JSDocSeeTag */: return emitJSDocSeeTag(node); - case 358 /* NotEmittedStatement */: - case 362 /* EndOfDeclarationMarker */: - case 361 /* MergeDeclarationMarker */: + case 361 /* NotEmittedStatement */: + case 365 /* EndOfDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: return; } if (isExpression(node)) { @@ -102848,84 +103082,84 @@ function createPrinter(printerOptions = {}, handlers = {}) { return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return emitArrayLiteralExpression(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return emitObjectLiteralExpression(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return emitPropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return emitElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return emitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return emitNewExpression(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: return emitTypeAssertionExpression(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return emitParenthesizedExpression(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return emitFunctionExpression(node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return emitArrowFunction(node); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return emitDeleteExpression(node); - case 222 /* TypeOfExpression */: + case 224 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return emitVoidExpression(node); - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return emitAwaitExpression(node); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return emitBinaryExpression(node); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return emitConditionalExpression(node); - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: return emitTemplateExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return emitYieldExpression(node); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return emitSpreadElement(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return emitClassExpression(node); - case 233 /* OmittedExpression */: + case 235 /* OmittedExpression */: return; - case 235 /* AsExpression */: + case 237 /* AsExpression */: return emitAsExpression(node); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return emitNonNullExpression(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return emitSatisfiesExpression(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return emitMetaProperty(node); - case 238 /* SyntheticExpression */: + case 240 /* SyntheticExpression */: return Debug.fail("SyntheticExpression should never be printed."); - case 287 /* JsxElement */: + case 290 /* JsxElement */: return emitJsxElement(node); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return emitJsxSelfClosingElement(node); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return emitJsxFragment(node); - case 357 /* SyntaxList */: + case 360 /* SyntaxList */: return Debug.fail("SyntaxList should not be printed"); - case 358 /* NotEmittedStatement */: + case 361 /* NotEmittedStatement */: return; - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return emitCommaList(node); - case 361 /* MergeDeclarationMarker */: - case 362 /* EndOfDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: + case 365 /* EndOfDeclarationMarker */: return; - case 363 /* SyntheticReferenceExpression */: + case 366 /* SyntheticReferenceExpression */: return Debug.fail("SyntheticReferenceExpression should not be printed"); } } @@ -102976,7 +103210,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitHelpers(node) { let helpersEmitted = false; - const bundle = node.kind === 315 /* Bundle */ ? node : void 0; + const bundle = node.kind === 318 /* Bundle */ ? node : void 0; if (bundle && moduleKind === 0 /* None */) { return; } @@ -103047,7 +103281,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { updateOrPushBundleFileTextLike( pos, writer.getTextPos(), - unparsed.kind === 311 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ + unparsed.kind === 314 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ ); } } @@ -103078,7 +103312,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitTabStop(hint, node, snippet) { Debug.assert( - node.kind === 243 /* EmptyStatement */, + node.kind === 245 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` ); Debug.assert( @@ -103134,7 +103368,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emit(node.dotDotDotToken); emitNodeWithWriter(node.name, writeParameter); emit(node.questionToken); - if (node.parent && node.parent.kind === 326 /* JSDocFunctionType */ && !node.name) { + if (node.parent && node.parent.kind === 329 /* JSDocFunctionType */ && !node.name) { emit(node.type); } else { emitTypeAnnotation(node.type); @@ -103152,6 +103386,11 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitTypeAnnotation(node.type); writeTrailingSemicolon(); } + function emitOverloadPropertyDeclaration(node) { + emitModifiers(node, node.modifiers); + emitNodeWithWriter(node.name, writeProperty); + emit(node.questionToken); + } function emitPropertyDeclaration(node) { emitDecoratorsAndModifiers(node, node.modifiers); emit(node.name); @@ -103196,7 +103435,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitAccessorDeclaration(node) { emitDecoratorsAndModifiers(node, node.modifiers); - writeKeyword(node.kind === 177 /* GetAccessor */ ? "get" : "set"); + writeKeyword(node.kind === 179 /* GetAccessor */ ? "get" : "set"); writeSpace(); emit(node.name); emitSignatureAndBody(node, emitSignatureHead); @@ -103625,7 +103864,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function shouldEmitWhitespaceBeforeOperand(node) { const operand = node.operand; - return operand.kind === 225 /* 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 === 227 /* 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); @@ -103821,7 +104060,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (node.elseStatement) { writeLineOrSpace(node, node.thenStatement, node.elseStatement); emitTokenWithComment(92 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); - if (node.elseStatement.kind === 246 /* IfStatement */) { + if (node.elseStatement.kind === 248 /* IfStatement */) { writeSpace(); emit(node.elseStatement); } else { @@ -103882,7 +104121,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(164 /* OfKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(165 /* OfKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); @@ -103890,7 +104129,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitForBinding(node) { if (node !== void 0) { - if (node.kind === 262 /* VariableDeclarationList */) { + if (node.kind === 264 /* VariableDeclarationList */) { emit(node); } else { emitExpression(node); @@ -103926,7 +104165,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } pos = writeTokenText(token, writer2, pos); if (isSimilarNode && contextNode.end !== pos) { - const isJsxExprContext = contextNode.kind === 297 /* JsxExpression */; + const isJsxExprContext = contextNode.kind === 300 /* JsxExpression */; emitTrailingCommentsOfPosition(pos, !isJsxExprContext, isJsxExprContext); } return pos; @@ -104185,6 +104424,25 @@ function createPrinter(printerOptions = {}, handlers = {}) { decreaseIndent(); } } + function emitOverloadDeclaration(node) { + emitDecoratorsAndModifiers(node, node.modifiers); + writeKeyword("overload"); + if (node.name) { + writeSpace(); + emitIdentifierName(node.name); + } + const indentedFlag = getEmitFlags(node) & 65536 /* Indented */; + if (indentedFlag) { + increaseIndent(); + } + writeSpace(); + writePunctuation("{"); + emitList(node, node.members, 145 /* EnumMembers */); + writePunctuation("}"); + if (indentedFlag) { + decreaseIndent(); + } + } function emitTypeAliasDeclaration(node) { if (isSendableFunctionOrType(node, true)) { emitDecorators(node, node.illegalDecorators); @@ -104582,7 +104840,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 352 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 355 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } else { @@ -104626,7 +104884,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { function emitJSDocTypedefTag(tag) { emitJSDocTagName(tag.tagName); if (tag.typeExpression) { - if (tag.typeExpression.kind === 318 /* JSDocTypeExpression */) { + if (tag.typeExpression.kind === 321 /* JSDocTypeExpression */) { emitJSDocTypeExpression(tag.typeExpression); } else { writeSpace(); @@ -104644,7 +104902,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emit(tag.fullName); } emitJSDocComment(tag.comment); - if (tag.typeExpression && tag.typeExpression.kind === 331 /* JSDocTypeLiteral */) { + if (tag.typeExpression && tag.typeExpression.kind === 334 /* JSDocTypeLiteral */) { emitJSDocTypeLiteral(tag.typeExpression); } } @@ -105460,7 +105718,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { return block.statements.length === 0 && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile)); } function skipSynthesizedParentheses(node) { - while (node.kind === 217 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { + while (node.kind === 219 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -105530,84 +105788,84 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (!node) return; switch (node.kind) { - case 242 /* Block */: + case 244 /* Block */: forEach(node.statements, generateNames); break; - case 257 /* LabeledStatement */: - case 255 /* WithStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 259 /* LabeledStatement */: + case 257 /* WithStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: generateNames(node.statement); break; - case 246 /* IfStatement */: + case 248 /* IfStatement */: generateNames(node.thenStatement); generateNames(node.elseStatement); break; - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: - case 250 /* ForInStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: + case 252 /* ForInStatement */: generateNames(node.initializer); generateNames(node.statement); break; - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: generateNames(node.caseBlock); break; - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: forEach(node.clauses, generateNames); break; - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: forEach(node.statements, generateNames); break; - case 259 /* TryStatement */: + case 261 /* TryStatement */: generateNames(node.tryBlock); generateNames(node.catchClause); generateNames(node.finallyBlock); break; - case 301 /* CatchClause */: + case 304 /* CatchClause */: generateNames(node.variableDeclaration); generateNames(node.block); break; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: generateNames(node.declarationList); break; - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: forEach(node.declarations, generateNames); break; - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: generateNameIfNeeded(node.name); break; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: generateNameIfNeeded(node.name); if (getEmitFlags(node) & 524288 /* ReuseTempVariableScope */) { forEach(node.parameters, generateNames); generateNames(node.body); } break; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: forEach(node.elements, generateNames); break; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: generateNames(node.importClause); break; - case 276 /* ImportClause */: + case 279 /* ImportClause */: generateNameIfNeeded(node.name); generateNames(node.namedBindings); break; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: generateNameIfNeeded(node.name); break; - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: generateNameIfNeeded(node.name); break; - case 278 /* NamedImports */: + case 281 /* NamedImports */: forEach(node.elements, generateNames); break; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: generateNameIfNeeded(node.propertyName || node.name); break; } @@ -105616,13 +105874,13 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (!node) return; switch (node.kind) { - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: generateNameIfNeeded(node.name); break; } @@ -105796,27 +106054,27 @@ function createPrinter(printerOptions = {}, handlers = {}) { prefix, suffix ); - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForModuleOrEnum(node); - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForImportOrExportDeclaration(node); - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 280 /* ExportAssignment */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 283 /* ExportAssignment */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForExportDefault(); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForClassExpression(); - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return generateNameForMethodOrAccessor(node, privateName, prefix, suffix); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return makeTempVariableName(TempFlags.Auto, true, privateName, prefix, suffix); default: return makeTempVariableName(TempFlags.Auto, false, privateName, prefix, suffix); @@ -105907,14 +106165,14 @@ function createPrinter(printerOptions = {}, handlers = {}) { const skipTrailingComments = end < 0 || (emitFlags & 1024 /* NoTrailingComments */) !== 0 || node.kind === 11 /* JsxText */; if ((pos > 0 || end > 0) && pos !== end) { if (!skipLeadingComments) { - emitLeadingComments(pos, node.kind !== 358 /* NotEmittedStatement */); + emitLeadingComments(pos, node.kind !== 361 /* NotEmittedStatement */); } if (!skipLeadingComments || pos >= 0 && (emitFlags & 512 /* NoLeadingComments */) !== 0) { containerPos = pos; } if (!skipTrailingComments || end >= 0 && (emitFlags & 1024 /* NoTrailingComments */) !== 0) { containerEnd = end; - if (node.kind === 262 /* VariableDeclarationList */) { + if (node.kind === 264 /* VariableDeclarationList */) { declarationListContainerEnd = end; } } @@ -105930,7 +106188,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { containerPos = savedContainerPos; containerEnd = savedContainerEnd; declarationListContainerEnd = savedDeclarationListContainerEnd; - if (!skipTrailingComments && node.kind !== 358 /* NotEmittedStatement */) { + if (!skipTrailingComments && node.kind !== 361 /* NotEmittedStatement */) { emitTrailingComments(end); } } @@ -106182,7 +106440,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } } else { const source = sourceMapRange.source || sourceMapSource; - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { + if (node.kind !== 361 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos)); } if (emitFlags & 64 /* NoNestedSourceMaps */) { @@ -106197,7 +106455,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (emitFlags & 64 /* NoNestedSourceMaps */) { sourceMapsDisabled = false; } - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { + if (node.kind !== 361 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end); } } @@ -108599,89 +108857,89 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return diagnostics; function walk(node, parent2) { switch (parent2.kind) { - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: if (parent2.questionToken === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); return "skip"; } - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 261 /* VariableDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 221 /* ArrowFunction */: + case 263 /* 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 276 /* ImportClause */: + case 279 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(parent2, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); return "skip"; } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); return "skip"; } break; - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 287 /* 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 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.import_can_only_be_used_in_TypeScript_files)); return "skip"; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.export_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: const heritageClause = node; if (heritageClause.token === 118 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 267 /* InterfaceDeclaration */: + case 270 /* 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 270 /* ModuleDeclaration */: + case 273 /* 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 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); return "skip"; - case 269 /* EnumDeclaration */: + case 272 /* 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 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 235 /* AsExpression */: + case 237 /* AsExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: Debug.fail(); } } @@ -108690,27 +108948,27 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config diagnostics.push(createDiagnosticForNode2(parent2, Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning)); } switch (parent2.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 221 /* ArrowFunction */: if (nodes === parent2.typeParameters) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); return "skip"; } - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: if (nodes === parent2.modifiers) { - checkModifiers(parent2.modifiers, parent2.kind === 244 /* VariableStatement */); + checkModifiers(parent2.modifiers, parent2.kind === 246 /* VariableStatement */); return "skip"; } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (nodes === parent2.modifiers) { for (const modifier of nodes) { if (isModifier(modifier) && modifier.kind !== 125 /* StaticKeyword */ && modifier.kind !== 128 /* AccessorKeyword */) { @@ -108720,18 +108978,18 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return "skip"; } break; - case 168 /* Parameter */: + case 169 /* 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 213 /* CallExpression */: - case 214 /* NewExpression */: - case 234 /* ExpressionWithTypeArguments */: - case 288 /* JsxSelfClosingElement */: - case 289 /* JsxOpeningElement */: - case 215 /* TaggedTemplateExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 236 /* ExpressionWithTypeArguments */: + case 291 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 217 /* TaggedTemplateExpression */: if (nodes === parent2.typeArguments) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); return "skip"; @@ -116566,39 +116824,39 @@ var SemanticMeaning = /* @__PURE__ */ ((SemanticMeaning3) => { })(SemanticMeaning || {}); function getMeaningFromDeclaration(node) { switch (node.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return isInJSFile(node) && getJSDocEnumTag(node) ? 7 /* All */ : 1 /* Value */; - case 168 /* Parameter */: - case 208 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 301 /* CatchClause */: - case 294 /* JsxAttribute */: + case 169 /* Parameter */: + case 210 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 304 /* CatchClause */: + case 297 /* JsxAttribute */: return 1 /* Value */; - case 167 /* TypeParameter */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 187 /* TypeLiteral */: + case 168 /* TypeParameter */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 189 /* TypeLiteral */: return 2 /* Type */; - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return node.name === void 0 ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */; - case 308 /* EnumMember */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: + case 311 /* EnumMember */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: return 1 /* Value */ | 2 /* Type */; - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return 2 /* Type */; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: if (isAmbientModule(node)) { return 4 /* Namespace */ | 1 /* Value */; } else if (getModuleInstanceState(node) === 1 /* Instantiated */) { @@ -116606,15 +116864,15 @@ function getMeaningFromDeclaration(node) { } else { return 4 /* Namespace */; } - case 269 /* EnumDeclaration */: - case 278 /* NamedImports */: - case 279 /* ImportSpecifier */: - case 274 /* ImportEqualsDeclaration */: - case 275 /* ImportDeclaration */: - case 280 /* ExportAssignment */: - case 281 /* ExportDeclaration */: + case 272 /* EnumDeclaration */: + case 281 /* NamedImports */: + case 282 /* ImportSpecifier */: + case 277 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 283 /* ExportAssignment */: + case 284 /* ExportDeclaration */: return 7 /* All */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return 4 /* Namespace */ | 1 /* Value */; } return 7 /* All */; @@ -116622,7 +116880,7 @@ function getMeaningFromDeclaration(node) { function getMeaningFromLocation(node) { node = getAdjustedReferenceLocation(node); const parent2 = node.parent; - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { return 1 /* Value */; } else if (isExportAssignment(parent2) || isExportSpecifier(parent2) || isExternalModuleReference(parent2) || isImportSpecifier(parent2) || isImportClause(parent2) || isImportEqualsDeclaration(parent2) && node === parent2.name) { return 7 /* All */; @@ -116646,11 +116904,11 @@ function getMeaningFromLocation(node) { } } function getMeaningFromRightHandSideOfImportEquals(node) { - const name = node.kind === 165 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; - return name && name.parent.kind === 274 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; + const name = node.kind === 166 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; + return name && name.parent.kind === 277 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; } function isInRightSideOfInternalImportEqualsDeclaration(node) { - while (node.parent.kind === 165 /* QualifiedName */) { + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } return isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -116661,26 +116919,26 @@ function isNamespaceReference(node) { function isQualifiedNameNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 165 /* QualifiedName */) { - while (root.parent && root.parent.kind === 165 /* QualifiedName */) { + if (root.parent.kind === 166 /* QualifiedName */) { + while (root.parent && root.parent.kind === 166 /* QualifiedName */) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 183 /* TypeReference */ && !isLastClause; + return root.parent.kind === 185 /* TypeReference */ && !isLastClause; } function isPropertyAccessNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 211 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 211 /* PropertyAccessExpression */) { + if (root.parent.kind === 213 /* PropertyAccessExpression */) { + while (root.parent && root.parent.kind === 213 /* PropertyAccessExpression */) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 234 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 300 /* HeritageClause */) { + if (!isLastClause && root.parent.kind === 236 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 303 /* HeritageClause */) { const decl = root.parent.parent.parent; - return (decl.kind === 264 /* ClassDeclaration */ || decl.kind === 265 /* StructDeclaration */) && root.parent.parent.token === 118 /* ImplementsKeyword */ || decl.kind === 267 /* InterfaceDeclaration */ && root.parent.parent.token === 95 /* ExtendsKeyword */; + return (decl.kind === 266 /* ClassDeclaration */ || decl.kind === 267 /* StructDeclaration */) && root.parent.parent.token === 118 /* ImplementsKeyword */ || decl.kind === 270 /* InterfaceDeclaration */ && root.parent.parent.token === 95 /* ExtendsKeyword */; } return false; } @@ -116691,15 +116949,15 @@ function isTypeReference(node) { switch (node.kind) { case 109 /* ThisKeyword */: return !isExpressionNode(node); - case 197 /* ThisType */: + case 199 /* ThisType */: return true; } switch (node.parent.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return true; - case 205 /* ImportType */: + case 207 /* ImportType */: return !node.parent.isTypeOf; - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return isPartOfTypeNode(node.parent); } return false; @@ -116746,7 +117004,7 @@ function climbPastPropertyOrElementAccess(node) { } function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 257 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { + if (referenceNode.kind === 259 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -116796,22 +117054,22 @@ function isNameOfFunctionDeclaration(node) { } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { switch (node.parent.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 305 /* PropertyAssignment */: - case 308 /* EnumMember */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 270 /* ModuleDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 308 /* PropertyAssignment */: + case 311 /* EnumMember */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 273 /* ModuleDeclaration */: return getNameOfDeclaration(node.parent) === node; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return node.parent.argumentExpression === node; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return true; - case 201 /* LiteralType */: - return node.parent.parent.kind === 199 /* IndexedAccessType */; + case 203 /* LiteralType */: + return node.parent.parent.kind === 201 /* IndexedAccessType */; default: return false; } @@ -116829,86 +117087,86 @@ function getContainerNode(node) { return void 0; } switch (node.kind) { - case 314 /* SourceFile */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 270 /* ModuleDeclaration */: + case 317 /* SourceFile */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 273 /* ModuleDeclaration */: return node; } } } function getNodeKind(node) { switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: return isExternalModule(node) ? "module" /* moduleElement */ : "script" /* scriptElement */; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return "module" /* moduleElement */; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return "class" /* classElement */; - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return "struct" /* structElement */; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return "interface" /* interfaceElement */; - case 268 /* TypeAliasDeclaration */: - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: + case 271 /* TypeAliasDeclaration */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: return "type" /* typeElement */; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return "enum" /* enumElement */; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return getKindOfVariableDeclaration(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return getKindOfVariableDeclaration(getRootDeclaration(node)); - case 219 /* ArrowFunction */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return "function" /* functionElement */; - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return "getter" /* memberGetAccessorElement */; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return "setter" /* memberSetAccessorElement */; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return "method" /* memberFunctionElement */; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: const { initializer } = node; return isFunctionLike(initializer) ? "method" /* memberFunctionElement */ : "property" /* memberVariableElement */; - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 306 /* ShorthandPropertyAssignment */: - case 307 /* SpreadAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 309 /* ShorthandPropertyAssignment */: + case 310 /* SpreadAssignment */: return "property" /* memberVariableElement */; - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return "index" /* indexSignatureElement */; - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: return "construct" /* constructSignatureElement */; - case 179 /* CallSignature */: + case 181 /* CallSignature */: return "call" /* callSignatureElement */; - case 176 /* Constructor */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 177 /* ClassStaticBlockDeclaration */: return "constructor" /* constructorImplementationElement */; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return "type parameter" /* typeParameterElement */; - case 308 /* EnumMember */: + case 311 /* EnumMember */: return "enum member" /* enumMemberElement */; - case 168 /* Parameter */: + case 169 /* Parameter */: return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) ? "property" /* memberVariableElement */ : "parameter" /* parameterElement */; - case 274 /* ImportEqualsDeclaration */: - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: - case 277 /* NamespaceImport */: - case 283 /* NamespaceExport */: + case 277 /* ImportEqualsDeclaration */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: + case 280 /* NamespaceImport */: + case 286 /* NamespaceExport */: return "alias" /* alias */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const kind = getAssignmentDeclarationKind(node); const { right } = node; switch (kind) { @@ -116936,7 +117194,7 @@ function getNodeKind(node) { } case 79 /* Identifier */: return isImportClause(node.parent) ? "alias" /* alias */ : "" /* unknown */; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: const scriptKind = getNodeKind(node.expression); return scriptKind === "" /* unknown */ ? "const" /* constElement */ : scriptKind; default: @@ -116951,7 +117209,7 @@ function isThis(node) { case 109 /* ThisKeyword */: return true; case 79 /* Identifier */: - return identifierIsThisKeyword(node) && node.parent.kind === 168 /* Parameter */; + return identifierIsThisKeyword(node) && node.parent.kind === 169 /* Parameter */; default: return false; } @@ -117000,42 +117258,42 @@ function isCompletedNode(n, sourceFile) { return false; } switch (n.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 206 /* ObjectBindingPattern */: - case 187 /* TypeLiteral */: - case 242 /* Block */: - case 271 /* ModuleBlock */: - case 272 /* CaseBlock */: - case 278 /* NamedImports */: - case 282 /* NamedExports */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 212 /* ObjectLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 189 /* TypeLiteral */: + case 244 /* Block */: + case 274 /* ModuleBlock */: + case 275 /* CaseBlock */: + case 281 /* NamedImports */: + case 285 /* NamedExports */: return nodeEndsWith(n, 19 /* CloseBraceToken */, sourceFile); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return isCompletedNode(n.block, sourceFile); - case 214 /* NewExpression */: + case 216 /* NewExpression */: if (!n.arguments) { return true; } - case 213 /* CallExpression */: - case 217 /* ParenthesizedExpression */: - case 196 /* ParenthesizedType */: + case 215 /* CallExpression */: + case 219 /* ParenthesizedExpression */: + case 198 /* ParenthesizedType */: return nodeEndsWith(n, 21 /* CloseParenToken */, sourceFile); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: return isCompletedNode(n.type, sourceFile); - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 180 /* ConstructSignature */: - case 179 /* CallSignature */: - case 219 /* ArrowFunction */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 182 /* ConstructSignature */: + case 181 /* CallSignature */: + case 221 /* ArrowFunction */: if (n.body) { return isCompletedNode(n.body, sourceFile); } @@ -117043,60 +117301,60 @@ function isCompletedNode(n, sourceFile) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 21 /* CloseParenToken */, sourceFile); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return !!n.body && isCompletedNode(n.body, sourceFile); - case 246 /* IfStatement */: + case 248 /* IfStatement */: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return isCompletedNode(n.expression, sourceFile) || hasChildOfKind(n, 26 /* SemicolonToken */, sourceFile); - case 209 /* ArrayLiteralExpression */: - case 207 /* ArrayBindingPattern */: - case 212 /* ElementAccessExpression */: - case 166 /* ComputedPropertyName */: - case 189 /* TupleType */: + case 211 /* ArrayLiteralExpression */: + case 209 /* ArrayBindingPattern */: + case 214 /* ElementAccessExpression */: + case 167 /* ComputedPropertyName */: + case 191 /* TupleType */: return nodeEndsWith(n, 23 /* CloseBracketToken */, sourceFile); - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: if (n.type) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 23 /* CloseBracketToken */, sourceFile); - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: return false; - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 248 /* WhileStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 250 /* WhileStatement */: return isCompletedNode(n.statement, sourceFile); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return hasChildOfKind(n, 116 /* WhileKeyword */, sourceFile) ? nodeEndsWith(n, 21 /* CloseParenToken */, sourceFile) : isCompletedNode(n.statement, sourceFile); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return isCompletedNode(n.exprName, sourceFile); - case 222 /* TypeOfExpression */: - case 221 /* DeleteExpression */: - case 223 /* VoidExpression */: - case 230 /* YieldExpression */: - case 231 /* SpreadElement */: + case 224 /* TypeOfExpression */: + case 223 /* DeleteExpression */: + case 225 /* VoidExpression */: + case 232 /* YieldExpression */: + case 233 /* SpreadElement */: const unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return isCompletedNode(n.template, sourceFile); - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: const lastSpan = lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return nodeIsPresent(n.literal); - case 281 /* ExportDeclaration */: - case 275 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: return nodeIsPresent(n.moduleSpecifier); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return isCompletedNode(n.operand, sourceFile); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isCompletedNode(n.right, sourceFile); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -117198,14 +117456,14 @@ function getContextualTypeFromParentOrAncestorTypeNode(node, checker) { function getAdjustedLocationForDeclaration(node, forRename) { if (!forRename) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: return getAdjustedLocationForClass(node); - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return getAdjustedLocationForFunction(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return node; } } @@ -117355,7 +117613,7 @@ function getAdjustedLocation(node, forRename) { if (node.kind === 129 /* AsKeyword */ && isAsExpression(parent2) && isTypeReferenceNode(parent2.type)) { return parent2.type.typeName; } - if (node.kind === 102 /* InKeyword */ && isForInStatement(parent2) || node.kind === 164 /* OfKeyword */ && isForOfStatement(parent2)) { + if (node.kind === 102 /* InKeyword */ && isForInStatement(parent2) || node.kind === 165 /* OfKeyword */ && isForOfStatement(parent2)) { return skipOuterExpressions(parent2.expression); } } @@ -117494,7 +117752,7 @@ function findPrecedingToken(position, sourceFile, startNode2, excludeJsdoc) { } } } - Debug.assert(startNode2 !== void 0 || n.kind === 314 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); + Debug.assert(startNode2 !== void 0 || n.kind === 317 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); const candidate = findRightmostChildNodeWithTokens(children, children.length, sourceFile, n.kind); return candidate && findRightmostToken(candidate, sourceFile); } @@ -117517,7 +117775,7 @@ function findRightmostChildNodeWithTokens(children, exclusiveStartPosition, sour for (let i = exclusiveStartPosition - 1; i >= 0; i--) { const child = children[i]; if (isWhiteSpaceOnlyJsxText(child)) { - if (i === 0 && (parentKind === 11 /* JsxText */ || parentKind === 288 /* JsxSelfClosingElement */)) { + if (i === 0 && (parentKind === 11 /* JsxText */ || parentKind === 291 /* JsxSelfClosingElement */)) { Debug.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`"); } } else if (nodeHasTokens(children[i], sourceFile)) { @@ -117549,13 +117807,13 @@ function isInsideJsxElementOrAttribute(sourceFile, position) { if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 11 /* JsxText */) { return true; } - if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 297 /* JsxExpression */) { + if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 300 /* JsxExpression */) { return true; } - if (token && token.kind === 19 /* CloseBraceToken */ && token.parent.kind === 297 /* JsxExpression */) { + if (token && token.kind === 19 /* CloseBraceToken */ && token.parent.kind === 300 /* JsxExpression */) { return true; } - if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 290 /* JsxClosingElement */) { + if (token.kind === 29 /* LessThanToken */ && token.parent.kind === 293 /* JsxClosingElement */) { return true; } return false; @@ -117583,9 +117841,9 @@ function isInJSXText(sourceFile, position) { function isInsideJsxElement(sourceFile, position) { function isInsideJsxElementTraversal(node) { while (node) { - if (node.kind >= 288 /* JsxSelfClosingElement */ && node.kind <= 297 /* 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 >= 291 /* JsxSelfClosingElement */ && node.kind <= 300 /* 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 === 287 /* JsxElement */) { + } else if (node.kind === 290 /* JsxElement */) { if (position > node.getStart(sourceFile)) return true; node = node.parent; @@ -117746,15 +118004,15 @@ function getNodeModifiers(node, excludeFlags = 0 /* None */) { result.push("deprecated" /* deprecatedModifier */); if (node.flags & 16777216 /* Ambient */) result.push("declare" /* ambientModifier */); - if (node.kind === 280 /* ExportAssignment */) + if (node.kind === 283 /* ExportAssignment */) result.push("export" /* exportedModifier */); return result.length > 0 ? result.join(",") : "" /* none */; } function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 183 /* TypeReference */ || node.kind === 213 /* CallExpression */) { + if (node.kind === 185 /* TypeReference */ || node.kind === 215 /* CallExpression */) { return node.typeArguments; } - if (isFunctionLike(node) || node.kind === 264 /* ClassDeclaration */ || node.kind === 267 /* InterfaceDeclaration */) { + if (isFunctionLike(node) || node.kind === 266 /* ClassDeclaration */ || node.kind === 270 /* InterfaceDeclaration */) { return node.typeParameters; } return void 0; @@ -117789,14 +118047,14 @@ function cloneCompilerOptions(options) { return result; } function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { - if (node.kind === 209 /* ArrayLiteralExpression */ || node.kind === 210 /* ObjectLiteralExpression */) { - if (node.parent.kind === 227 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */) { + if (node.kind === 211 /* ArrayLiteralExpression */ || node.kind === 212 /* ObjectLiteralExpression */) { + if (node.parent.kind === 229 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 63 /* EqualsToken */) { return true; } - if (node.parent.kind === 251 /* ForOfStatement */ && node.parent.initializer === node) { + if (node.parent.kind === 253 /* ForOfStatement */ && node.parent.initializer === node) { return true; } - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 305 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 308 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { return true; } } @@ -117900,7 +118158,7 @@ function skipConstraint(type) { return type.isTypeParameter() ? type.getConstraint() || type : type; } function getNameFromPropertyName(name) { - return name.kind === 166 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); + return name.kind === 167 /* 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)); @@ -118024,7 +118282,7 @@ function findModifier(node, kind) { } function insertImports(changes, sourceFile, imports, blankLineBetween) { const decl = isArray(imports) ? imports[0] : imports; - const importKindPredicate = decl.kind === 244 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; + const importKindPredicate = decl.kind === 246 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; const existingImportStatements = filter(sourceFile.statements, importKindPredicate); const sortedNewImports = isArray(imports) ? stableSort(imports, ts_OrganizeImports_exports.compareImportsOrRequireStatements) : [imports]; if (!existingImportStatements.length) { @@ -118565,13 +118823,13 @@ function needsParentheses(expression) { function getContextualTypeFromParent(node, checker) { const { parent: parent2 } = node; switch (parent2.kind) { - case 214 /* NewExpression */: + case 216 /* NewExpression */: return checker.getContextualType(parent2); - case 227 /* BinaryExpression */: { + case 229 /* BinaryExpression */: { const { left, operatorToken, right } = parent2; return isEqualityOperatorKind(operatorToken.kind) ? checker.getTypeAtLocation(node === right ? left : right) : checker.getContextualType(node); } - case 298 /* CaseClause */: + case 301 /* CaseClause */: return parent2.expression === node ? getSwitchedType(parent2, checker) : void 0; default: return checker.getContextualType(node); @@ -118597,8 +118855,8 @@ function isStringLiteralOrTemplate(node) { switch (node.kind) { case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 229 /* TemplateExpression */: - case 215 /* TaggedTemplateExpression */: + case 231 /* TemplateExpression */: + case 217 /* TaggedTemplateExpression */: return true; default: return false; @@ -118628,16 +118886,16 @@ function getTypeNodeIfAccessible(type, enclosingScope, program, host) { return typeIsAccessible ? res : void 0; } function syntaxRequiresTrailingCommaOrSemicolonOrASI(kind) { - return kind === 179 /* CallSignature */ || kind === 180 /* ConstructSignature */ || kind === 181 /* IndexSignature */ || kind === 170 /* PropertySignature */ || kind === 173 /* MethodSignature */; + return kind === 181 /* CallSignature */ || kind === 182 /* ConstructSignature */ || kind === 183 /* IndexSignature */ || kind === 171 /* PropertySignature */ || kind === 175 /* MethodSignature */; } function syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) { - return kind === 263 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 265 /* FunctionDeclaration */ || kind === 178 /* Constructor */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) { - return kind === 270 /* ModuleDeclaration */; + return kind === 273 /* ModuleDeclaration */; } function syntaxRequiresTrailingSemicolonOrASI(kind) { - return kind === 244 /* VariableStatement */ || kind === 245 /* ExpressionStatement */ || kind === 247 /* DoStatement */ || kind === 252 /* ContinueStatement */ || kind === 253 /* BreakStatement */ || kind === 254 /* ReturnStatement */ || kind === 258 /* ThrowStatement */ || kind === 260 /* DebuggerStatement */ || kind === 171 /* PropertyDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 281 /* ExportDeclaration */ || kind === 273 /* NamespaceExportDeclaration */ || kind === 280 /* ExportAssignment */; + return kind === 246 /* VariableStatement */ || kind === 247 /* ExpressionStatement */ || kind === 249 /* DoStatement */ || kind === 254 /* ContinueStatement */ || kind === 255 /* BreakStatement */ || kind === 256 /* ReturnStatement */ || kind === 260 /* ThrowStatement */ || kind === 262 /* DebuggerStatement */ || kind === 172 /* PropertyDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 284 /* ExportDeclaration */ || kind === 276 /* NamespaceExportDeclaration */ || kind === 283 /* ExportAssignment */; } var syntaxMayBeASICandidate = or( syntaxRequiresTrailingCommaOrSemicolonOrASI, @@ -118667,7 +118925,7 @@ function nodeIsASICandidate(node, sourceFile) { } else if (!syntaxRequiresTrailingSemicolonOrASI(node.kind)) { return false; } - if (node.kind === 247 /* DoStatement */) { + if (node.kind === 249 /* DoStatement */) { return true; } const topNode = findAncestor(node, (ancestor) => !ancestor.parent); @@ -119829,13 +120087,13 @@ function getSemanticClassifications(typeChecker3, cancellationToken, sourceFile, } function checkForClassificationCancellation(cancellationToken, kind) { switch (kind) { - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -120039,46 +120297,46 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) pos = tag.tagName.end; let commentStart = tag.tagName.end; switch (tag.kind) { - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: const param = tag; processJSDocParameterTag(param); commentStart = param.isNameFirst && ((_a2 = param.typeExpression) == null ? void 0 : _a2.end) || param.name.end; break; - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: const prop = tag; commentStart = prop.isNameFirst && ((_b = prop.typeExpression) == null ? void 0 : _b.end) || prop.name.end; break; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); pos = tag.end; commentStart = tag.typeParameters.end; break; - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: const type = tag; - commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 318 /* 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) === 321 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; break; - case 347 /* JSDocCallbackTag */: + case 350 /* JSDocCallbackTag */: commentStart = tag.typeExpression.end; break; - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = tag.typeExpression.end; break; - case 351 /* JSDocThisTag */: - case 348 /* JSDocEnumTag */: + case 354 /* JSDocThisTag */: + case 351 /* JSDocEnumTag */: commentStart = tag.typeExpression.end; break; - case 350 /* JSDocReturnTag */: + case 353 /* JSDocReturnTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_f = tag.typeExpression) == null ? void 0 : _f.end) || commentStart; break; - case 355 /* JSDocSeeTag */: + case 358 /* JSDocSeeTag */: commentStart = ((_g = tag.name) == null ? void 0 : _g.end) || commentStart; break; - case 337 /* JSDocAugmentsTag */: - case 338 /* JSDocImplementsTag */: + case 340 /* JSDocAugmentsTag */: + case 341 /* JSDocImplementsTag */: commentStart = tag.class.end; break; } @@ -120221,22 +120479,22 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) } function tryClassifyJsxElementName(token) { switch (token.parent && token.parent.kind) { - case 289 /* JsxOpeningElement */: + case 292 /* JsxOpeningElement */: if (token.parent.tagName === token) { return 19 /* jsxOpenTagName */; } break; - case 290 /* JsxClosingElement */: + case 293 /* JsxClosingElement */: if (token.parent.tagName === token) { return 20 /* jsxCloseTagName */; } break; - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: if (token.parent.tagName === token) { return 21 /* jsxSelfClosingTagName */; } break; - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: if (token.parent.name === token) { return 22 /* jsxAttribute */; } @@ -120257,11 +120515,11 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) if (token) { const parent2 = token.parent; if (tokenKind === 63 /* EqualsToken */) { - if (parent2.kind === 261 /* VariableDeclaration */ || parent2.kind === 171 /* PropertyDeclaration */ || parent2.kind === 168 /* Parameter */ || parent2.kind === 294 /* JsxAttribute */) { + if (parent2.kind === 263 /* VariableDeclaration */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 169 /* Parameter */ || parent2.kind === 297 /* JsxAttribute */) { return 5 /* operator */; } } - if (parent2.kind === 227 /* BinaryExpression */ || parent2.kind === 225 /* PrefixUnaryExpression */ || parent2.kind === 226 /* PostfixUnaryExpression */ || parent2.kind === 228 /* ConditionalExpression */) { + if (parent2.kind === 229 /* BinaryExpression */ || parent2.kind === 227 /* PrefixUnaryExpression */ || parent2.kind === 228 /* PostfixUnaryExpression */ || parent2.kind === 230 /* ConditionalExpression */) { return 5 /* operator */; } } @@ -120271,7 +120529,7 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) } else if (tokenKind === 9 /* BigIntLiteral */) { return 25 /* bigintLiteral */; } else if (tokenKind === 10 /* StringLiteral */) { - return token && token.parent.kind === 294 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + return token && token.parent.kind === 297 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 13 /* RegularExpressionLiteral */) { return 6 /* stringLiteral */; } else if (isTemplateLiteralKind(tokenKind)) { @@ -120281,32 +120539,32 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) } else if (tokenKind === 79 /* Identifier */) { if (token) { switch (token.parent.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: if (token.parent.name === token) { return 11 /* className */; } return; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: if (token.parent.name === token) { return 15 /* typeParameterName */; } return; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: if (token.parent.name === token) { return 13 /* interfaceName */; } return; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: if (token.parent.name === token) { return 12 /* enumName */; } return; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: if (token.parent.name === token) { return 14 /* moduleName */; } return; - case 168 /* Parameter */: + case 169 /* Parameter */: if (token.parent.name === token) { return isThisIdentifier(token) ? 3 /* keyword */ : 17 /* parameterName */; } @@ -120449,7 +120707,7 @@ var DocumentHighlights2; let child = throwStatement; while (child.parent) { const parent2 = child.parent; - if (isFunctionBlock(parent2) || parent2.kind === 314 /* SourceFile */) { + if (isFunctionBlock(parent2) || parent2.kind === 317 /* SourceFile */) { return parent2; } if (isTryStatement(parent2) && parent2.tryBlock === child && parent2.catchClause) { @@ -120479,15 +120737,15 @@ var DocumentHighlights2; function getBreakOrContinueOwner(statement) { return findAncestor(statement, (node) => { switch (node.kind) { - case 256 /* SwitchStatement */: - if (statement.kind === 252 /* ContinueStatement */) { + case 258 /* SwitchStatement */: + if (statement.kind === 254 /* ContinueStatement */) { return false; } - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 248 /* WhileStatement */: - case 247 /* DoStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 250 /* WhileStatement */: + case 249 /* DoStatement */: return !statement.label || isLabeledBy(node, statement.label.escapedText); default: return isFunctionLike(node) && "quit"; @@ -120500,25 +120758,25 @@ var DocumentHighlights2; function getNodesToSearchForModifier(declaration, modifierFlag) { const container = declaration.parent; switch (container.kind) { - case 271 /* ModuleBlock */: - case 314 /* SourceFile */: - case 242 /* Block */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 274 /* ModuleBlock */: + case 317 /* SourceFile */: + case 244 /* Block */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: if (modifierFlag & 256 /* Abstract */ && isClassDeclaration(declaration)) { return [...declaration.members, declaration]; } else { return container.statements; } - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 263 /* FunctionDeclaration */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: return [...container.parameters, ...isClassLike(container.parent) ? container.parent.members : []]; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 187 /* TypeLiteral */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 189 /* TypeLiteral */: const nodes = container.members; if (modifierFlag & (28 /* AccessibilityModifier */ | 64 /* Readonly */)) { const constructor = find(container.members, isConstructorDeclaration); @@ -120529,7 +120787,7 @@ var DocumentHighlights2; return [...nodes, container]; } return nodes; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return void 0; default: Debug.assertNever(container, "Invalid container kind."); @@ -120545,7 +120803,7 @@ var DocumentHighlights2; function getLoopBreakContinueOccurrences(loopNode) { const keywords = []; if (pushKeywordIf(keywords, loopNode.getFirstToken(), 98 /* ForKeyword */, 116 /* WhileKeyword */, 91 /* DoKeyword */)) { - if (loopNode.kind === 247 /* DoStatement */) { + if (loopNode.kind === 249 /* DoStatement */) { const loopTokens = loopNode.getChildren(); for (let i = loopTokens.length - 1; i >= 0; i--) { if (pushKeywordIf(keywords, loopTokens[i], 116 /* WhileKeyword */)) { @@ -120565,13 +120823,13 @@ var DocumentHighlights2; const owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return getLoopBreakContinueOccurrences(owner); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return getSwitchCaseDefaultOccurrences(owner); } } @@ -121947,9 +122205,9 @@ function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) { function containsTopLevelCommonjs(sourceFile) { return sourceFile.statements.some((statement) => { switch (statement.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return statement.declarationList.declarations.some((decl) => !!decl.initializer && isRequireCall(propertyAccessLeftHandSide(decl.initializer), true)); - case 245 /* ExpressionStatement */: { + case 247 /* ExpressionStatement */: { const { expression } = statement; if (!isBinaryExpression(expression)) return isRequireCall(expression, true); @@ -121966,10 +122224,10 @@ function propertyAccessLeftHandSide(node) { } function importNameForConvertToDefaultImport(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: const { importClause, moduleSpecifier } = node; - return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 277 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; - case 274 /* ImportEqualsDeclaration */: + return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 280 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; + case 277 /* ImportEqualsDeclaration */: return node.name; default: return void 0; @@ -122033,18 +122291,18 @@ function hasSupportedNumberOfArguments(node) { } function isFixablePromiseArgument(arg, checker) { switch (arg.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: const functionFlags = getFunctionFlags(arg); if (functionFlags & 1 /* Generator */) { return false; } - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: visitedNestedConvertibleFunctions.set(getKeyFromNode(arg), true); case 105 /* NullKeyword */: return true; case 79 /* Identifier */: - case 211 /* PropertyAccessExpression */: { + case 213 /* PropertyAccessExpression */: { const symbol = checker.getSymbolAtLocation(arg); if (!symbol) { return false; @@ -122060,24 +122318,24 @@ function getKeyFromNode(exp) { } function canBeConvertedToClass(node, checker) { var _a2, _b, _c, _d; - if (node.kind === 218 /* FunctionExpression */) { + if (node.kind === 220 /* FunctionExpression */) { if (isVariableDeclaration(node.parent) && ((_a2 = node.symbol.members) == null ? void 0 : _a2.size)) { return true; } const symbol = checker.getSymbolOfExpando(node, false); return !!(symbol && (((_b = symbol.exports) == null ? void 0 : _b.size) || ((_c = symbol.members) == null ? void 0 : _c.size))); } - if (node.kind === 263 /* FunctionDeclaration */) { + if (node.kind === 265 /* FunctionDeclaration */) { return !!((_d = node.symbol.members) == null ? void 0 : _d.size); } return false; } function canBeConvertedToAsync(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return true; default: return false; @@ -122222,9 +122480,9 @@ function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checke } function shouldKeepItem(declaration, checker) { switch (declaration.kind) { - case 276 /* ImportClause */: - case 279 /* ImportSpecifier */: - case 274 /* ImportEqualsDeclaration */: + case 279 /* ImportClause */: + case 282 /* ImportSpecifier */: + case 277 /* ImportEqualsDeclaration */: const importer = checker.getSymbolAtLocation(declaration.name); const imported = checker.getAliasedSymbol(importer); return importer.escapedName !== imported.escapedName; @@ -122234,7 +122492,7 @@ function shouldKeepItem(declaration, checker) { } function tryAddSingleDeclarationName(declaration, containers) { const name = getNameOfDeclaration(declaration); - return !!name && (pushLiteral(name, containers) || name.kind === 166 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); + return !!name && (pushLiteral(name, containers) || name.kind === 167 /* 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); @@ -122245,7 +122503,7 @@ function pushLiteral(node, containers) { function getContainers(declaration) { const containers = []; const name = getNameOfDeclaration(declaration); - if (name && name.kind === 166 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { + if (name && name.kind === 167 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { return emptyArray; } containers.shift(); @@ -122415,7 +122673,7 @@ function addNodeWithRecursiveInitializer(node) { } } function hasNavigationBarName(node) { - return !hasDynamicName(node) || node.kind !== 227 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; + return !hasDynamicName(node) || node.kind !== 229 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; } function addChildrenRecursively(node) { curCancellationToken.throwIfCancellationRequested(); @@ -122423,7 +122681,7 @@ function addChildrenRecursively(node) { return; } switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: const ctr = node; addNodeWithRecursiveChild(ctr, ctr.body); for (const param of ctr.parameters) { @@ -122432,32 +122690,32 @@ function addChildrenRecursively(node) { } } break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 175 /* MethodSignature */: if (hasNavigationBarName(node)) { addNodeWithRecursiveChild(node, node.body); } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (hasNavigationBarName(node)) { addNodeWithRecursiveInitializer(node); } break; - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (hasNavigationBarName(node)) { addLeafNode(node); } break; - case 276 /* ImportClause */: + case 279 /* ImportClause */: const importClause = node; if (importClause.name) { addLeafNode(importClause.name); } const { namedBindings } = importClause; if (namedBindings) { - if (namedBindings.kind === 277 /* NamespaceImport */) { + if (namedBindings.kind === 280 /* NamespaceImport */) { addLeafNode(namedBindings); } else { for (const element of namedBindings.elements) { @@ -122466,16 +122724,16 @@ function addChildrenRecursively(node) { } } break; - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: addNodeWithRecursiveChild(node, node.name); break; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: const { expression } = node; isIdentifier(expression) ? addLeafNode(node, expression) : addLeafNode(node); break; - case 208 /* BindingElement */: - case 305 /* PropertyAssignment */: - case 261 /* VariableDeclaration */: { + case 210 /* BindingElement */: + case 308 /* PropertyAssignment */: + case 263 /* VariableDeclaration */: { const child = node; if (isBindingPattern(child.name)) { addChildrenRecursively(child.name); @@ -122484,18 +122742,18 @@ function addChildrenRecursively(node) { } break; } - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: const nameNode = node.name; if (nameNode && isIdentifier(nameNode)) { addTrackedEs5Class(nameNode.text); } addNodeWithRecursiveChild(node, node.body); break; - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: addNodeWithRecursiveChild(node, node.body); break; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: startNode(node); for (const member of node.members) { if (!isComputedProperty(member)) { @@ -122504,20 +122762,20 @@ function addChildrenRecursively(node) { } endNode(); break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: startNode(node); for (const member of node.members) { addChildrenRecursively(member); } endNode(); break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; - case 280 /* ExportAssignment */: { + case 283 /* ExportAssignment */: { const expression2 = node.expression; const child = isObjectLiteralExpression(expression2) || isCallExpression(expression2) ? expression2 : isArrowFunction(expression2) || isFunctionExpression(expression2) ? expression2.body : void 0; if (child) { @@ -122529,16 +122787,16 @@ function addChildrenRecursively(node) { } break; } - case 284 /* ExportSpecifier */: - case 274 /* ImportEqualsDeclaration */: - case 181 /* IndexSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 268 /* TypeAliasDeclaration */: + case 287 /* ExportSpecifier */: + case 277 /* ImportEqualsDeclaration */: + case 183 /* IndexSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 271 /* TypeAliasDeclaration */: addLeafNode(node); break; - case 213 /* CallExpression */: - case 227 /* BinaryExpression */: { + case 215 /* CallExpression */: + case 229 /* BinaryExpression */: { const special = getAssignmentDeclarationKind(node); switch (special) { case 1 /* ExportsProperty */: @@ -122748,12 +123006,12 @@ function shouldReallyMerge(a, b, parent2) { return false; } switch (a.kind) { - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return isStatic(a) === isStatic(b); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return areSameModule(a, b) && getFullyQualifiedModuleName(a) === getFullyQualifiedModuleName(b); default: return true; @@ -122770,7 +123028,7 @@ function areSameModule(a, b) { if (!a.body || !b.body) { return a.body === b.body; } - return a.body.kind === b.body.kind && (a.body.kind !== 270 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); + return a.body.kind === b.body.kind && (a.body.kind !== 273 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); } function merge(target, source) { target.additionalNodes = target.additionalNodes || []; @@ -122791,7 +123049,7 @@ function compareChildren(child1, child2) { return compareStringsCaseSensitiveUI(tryGetName(child1.node), tryGetName(child2.node)) || compareValues(navigationBarNodeKind(child1), navigationBarNodeKind(child2)); } function tryGetName(node) { - if (node.kind === 270 /* ModuleDeclaration */) { + if (node.kind === 273 /* ModuleDeclaration */) { return getModuleName(node); } const declName = getNameOfDeclaration(node); @@ -122800,16 +123058,16 @@ function tryGetName(node) { return propertyName && unescapeLeadingUnderscores(propertyName); } switch (node.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 232 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 234 /* ClassExpression */: return getFunctionOrClassName(node); default: return void 0; } } function getItemName(node, name) { - if (node.kind === 270 /* ModuleDeclaration */) { + if (node.kind === 273 /* ModuleDeclaration */) { return cleanText(getModuleName(node)); } if (name) { @@ -122819,28 +123077,28 @@ function getItemName(node, name) { } } switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: const sourceFile = node; return isExternalModule(sourceFile) ? `"${escapeString(getBaseFileName(removeFileExtension(normalizePath(sourceFile.fileName))))}"` : ""; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; - case 219 /* ArrowFunction */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 221 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: if (getSyntacticModifierFlags(node) & 1024 /* Default */) { return "default"; } return getFunctionOrClassName(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return "constructor"; - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: return "new()"; - case 179 /* CallSignature */: + case 181 /* CallSignature */: return "()"; - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return "[]"; default: return ""; @@ -122865,20 +123123,20 @@ function primaryNavBarMenuItems(root) { return true; } switch (navigationBarNodeKind(item)) { - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 269 /* EnumDeclaration */: - case 267 /* InterfaceDeclaration */: - case 270 /* ModuleDeclaration */: - case 314 /* SourceFile */: - case 268 /* TypeAliasDeclaration */: - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 272 /* EnumDeclaration */: + case 270 /* InterfaceDeclaration */: + case 273 /* ModuleDeclaration */: + case 317 /* SourceFile */: + case 271 /* TypeAliasDeclaration */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: return true; - case 219 /* ArrowFunction */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: return isTopLevelFunctionDeclaration(item); default: return false; @@ -122888,10 +123146,10 @@ function primaryNavBarMenuItems(root) { return false; } switch (navigationBarNodeKind(item2.parent)) { - case 271 /* ModuleBlock */: - case 314 /* SourceFile */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: + case 274 /* ModuleBlock */: + case 317 /* SourceFile */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: return true; default: return false; @@ -122950,7 +123208,7 @@ function getModuleName(moduleDeclaration) { } function getFullyQualifiedModuleName(moduleDeclaration) { const result = [getTextOfIdentifierOrLiteral(moduleDeclaration.name)]; - while (moduleDeclaration.body && moduleDeclaration.body.kind === 270 /* ModuleDeclaration */) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 273 /* ModuleDeclaration */) { moduleDeclaration = moduleDeclaration.body; result.push(getTextOfIdentifierOrLiteral(moduleDeclaration.name)); } @@ -122960,13 +123218,13 @@ function getInteriorModule(decl) { return decl.body && isModuleDeclaration(decl.body) ? getInteriorModule(decl.body) : decl; } function isComputedProperty(member) { - return !member.name || member.name.kind === 166 /* ComputedPropertyName */; + return !member.name || member.name.kind === 167 /* ComputedPropertyName */; } function getNodeSpan(node) { - return node.kind === 314 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); + return node.kind === 317 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); } function getModifiers2(node) { - if (node.parent && node.parent.kind === 261 /* VariableDeclaration */) { + if (node.parent && node.parent.kind === 263 /* VariableDeclaration */) { node = node.parent; } return getNodeModifiers(node); @@ -123011,9 +123269,9 @@ function getCalledExpressionName(expr) { } function isFunctionOrClassExpression(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 232 /* ClassExpression */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 234 /* ClassExpression */: return true; default: return false; @@ -123099,8 +123357,8 @@ var NodeObject = class { if (!children.length) { return void 0; } - const child = find(children, (kid) => kid.kind < 318 /* FirstJSDocNode */ || kid.kind > 356 /* LastJSDocNode */); - return child.kind < 165 /* FirstNode */ ? child : child.getFirstToken(sourceFile); + const child = find(children, (kid) => kid.kind < 321 /* FirstJSDocNode */ || kid.kind > 359 /* LastJSDocNode */); + return child.kind < 166 /* FirstNode */ ? child : child.getFirstToken(sourceFile); } getLastToken(sourceFile) { this.assertHasRealPosition(); @@ -123109,7 +123367,7 @@ var NodeObject = class { if (!child) { return void 0; } - return child.kind < 165 /* FirstNode */ ? child : child.getLastToken(sourceFile); + return child.kind < 166 /* FirstNode */ ? child : child.getLastToken(sourceFile); } forEachChild(cbNode, cbNodeArray) { return forEachChild(this, cbNode, cbNodeArray); @@ -123172,7 +123430,7 @@ function addSyntheticNodes(nodes, pos, end, parent2) { } } function createSyntaxList(nodes, parent2) { - const list = createNode(357 /* SyntaxList */, nodes.pos, nodes.end, parent2); + const list = createNode(360 /* SyntaxList */, nodes.pos, nodes.end, parent2); list._children = []; let pos = nodes.pos; for (const node of nodes) { @@ -123486,7 +123744,7 @@ function getJsDocTagsOfDeclarations(declarations, checker) { var _a2; if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) { + if (declaration.kind === 179 /* GetAccessor */ || declaration.kind === 180 /* SetAccessor */) { return symbol.getContextualJsDocTags(declaration, checker); } return ((_a2 = symbol.declarations) == null ? void 0 : _a2.length) === 1 ? symbol.getJsDocTags() : void 0; @@ -123509,7 +123767,7 @@ function getDocumentationComment(declarations, checker) { const inheritedDocs = findBaseOfDeclaration(checker, declaration, (symbol) => { if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) { + if (declaration.kind === 179 /* GetAccessor */ || declaration.kind === 180 /* SetAccessor */) { return symbol.getContextualDocumentationComment(declaration, checker); } return symbol.getDocumentationComment(checker); @@ -123523,7 +123781,7 @@ function getDocumentationComment(declarations, checker) { } function findBaseOfDeclaration(checker, declaration, cb) { var _a2; - const classOrInterfaceDeclaration = ((_a2 = declaration.parent) == null ? void 0 : _a2.kind) === 176 /* Constructor */ ? declaration.parent.parent : declaration.parent; + const classOrInterfaceDeclaration = ((_a2 = declaration.parent) == null ? void 0 : _a2.kind) === 178 /* Constructor */ ? declaration.parent.parent : declaration.parent; if (!classOrInterfaceDeclaration) return; const isStaticMember = hasStaticModifier(declaration); @@ -123537,7 +123795,7 @@ function findBaseOfDeclaration(checker, declaration, cb) { var SourceFileObject = class extends NodeObject { constructor(kind, pos, end) { super(kind, pos, end); - this.kind = 314 /* SourceFile */; + this.kind = 317 /* SourceFile */; } update(newText, textChangeRange) { return updateSourceFile(this, newText, textChangeRange); @@ -123593,10 +123851,10 @@ var SourceFileObject = class extends NodeObject { } function visit(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: const functionDeclaration = node; const declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -123612,30 +123870,30 @@ var SourceFileObject = class extends NodeObject { } forEachChild(node, visit); break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 270 /* ModuleDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 284 /* ExportSpecifier */: - case 279 /* ImportSpecifier */: - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 187 /* TypeLiteral */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 273 /* ModuleDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 287 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 189 /* TypeLiteral */: addDeclaration(node); forEachChild(node, visit); break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (!hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { break; } - case 261 /* VariableDeclaration */: - case 208 /* BindingElement */: { + case 263 /* VariableDeclaration */: + case 210 /* BindingElement */: { const decl = node; if (isBindingPattern(decl.name)) { forEachChild(decl.name, visit); @@ -123645,12 +123903,12 @@ var SourceFileObject = class extends NodeObject { visit(decl.initializer); } } - case 308 /* EnumMember */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 311 /* EnumMember */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: addDeclaration(node); break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: const exportDeclaration = node; if (exportDeclaration.exportClause) { if (isNamedExports(exportDeclaration.exportClause)) { @@ -123660,14 +123918,14 @@ var SourceFileObject = class extends NodeObject { } } break; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: const importClause = node.importClause; if (importClause) { if (importClause.name) { addDeclaration(importClause.name); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 277 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 280 /* NamespaceImport */) { addDeclaration(importClause.namedBindings); } else { forEach(importClause.namedBindings.elements, visit); @@ -123675,7 +123933,7 @@ var SourceFileObject = class extends NodeObject { } } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) !== 0 /* None */) { addDeclaration(node); } @@ -124315,15 +124573,15 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h switch (node.kind) { case 79 /* Identifier */: return !isLabelName(node) && !isTagName(node) && !isConstTypeReference(node.parent); - case 211 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: return !isInComment(sourceFile, position); case 109 /* ThisKeyword */: - case 197 /* ThisType */: + case 199 /* ThisType */: case 107 /* SuperKeyword */: - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return true; - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return isImportMeta(node); default: return false; @@ -124433,15 +124691,15 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h return void 0; } switch (node.kind) { - case 211 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 213 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: case 10 /* StringLiteral */: case 96 /* FalseKeyword */: case 111 /* TrueKeyword */: case 105 /* NullKeyword */: case 107 /* SuperKeyword */: case 109 /* ThisKeyword */: - case 197 /* ThisType */: + case 199 /* ThisType */: case 79 /* Identifier */: break; default: @@ -124452,7 +124710,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h if (isRightSideOfPropertyAccess(nodeForStartPos) || isRightSideOfQualifiedName(nodeForStartPos)) { nodeForStartPos = nodeForStartPos.parent; } else if (isNameOfModuleDeclaration(nodeForStartPos)) { - if (nodeForStartPos.parent.parent.kind === 270 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { + if (nodeForStartPos.parent.parent.kind === 273 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { nodeForStartPos = nodeForStartPos.parent.parent.name; } else { break; @@ -125069,7 +125327,7 @@ function initializeNameTable(sourceFile) { }); } function literalIsName(node) { - return isDeclarationName(node) || node.parent.kind === 286 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); + return isDeclarationName(node) || node.parent.kind === 289 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); } function getContainingObjectLiteralElement(node) { const element = getContainingObjectLiteralElementWorker(node); @@ -125080,11 +125338,11 @@ function getContainingObjectLiteralElementWorker(node) { case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: case 8 /* NumericLiteral */: - if (node.parent.kind === 166 /* ComputedPropertyName */) { + if (node.parent.kind === 167 /* ComputedPropertyName */) { return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : void 0; } case 79 /* Identifier */: - return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.parent.kind === 295 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; + return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 212 /* ObjectLiteralExpression */ || node.parent.parent.kind === 298 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; } return void 0; } @@ -125119,7 +125377,7 @@ function getPropertySymbolsFromContextualType(node, checker, contextualType, uni return discriminatedPropertySymbols; } function isArgumentOfElementAccessExpression(node) { - return node && node.parent && node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.argumentExpression === node; + return node && node.parent && node.parent.kind === 214 /* ElementAccessExpression */ && node.parent.argumentExpression === node; } function getDefaultLibFilePath(options) { if (sys) { @@ -126041,89 +126299,89 @@ function spanInSourceFileAtLocation(sourceFile, position) { if (node) { const { parent: parent2 } = node; switch (node.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 261 /* VariableDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 263 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return spanInVariableDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return spanInParameterDeclaration(node); - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 178 /* Constructor */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return spanInFunctionDeclaration(node); - case 242 /* Block */: + case 244 /* Block */: if (isFunctionBlock(node)) { return spanInFunctionBlock(node); } - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return spanInBlock(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return spanInBlock(node.block); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return textSpan(node.expression); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return textSpan(node.getChildAt(0), node.expression); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return spanInNode(node.statement); - case 260 /* DebuggerStatement */: + case 262 /* DebuggerStatement */: return textSpan(node.getChildAt(0)); - case 246 /* IfStatement */: + case 248 /* IfStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return spanInNode(node.statement); - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: return textSpan(node.getChildAt(0), node.label); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return spanInForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return spanInInitializerOfForLike(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: return spanInNode(node.statements[0]); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return spanInBlock(node.tryBlock); - case 258 /* ThrowStatement */: + case 260 /* ThrowStatement */: return textSpan(node, node.expression); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return textSpan(node, node.expression); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return textSpan(node, node.moduleReference); - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: if (getModuleInstanceState(node) !== 1 /* Instantiated */) { return void 0; } - case 264 /* ClassDeclaration */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: - case 208 /* BindingElement */: + case 266 /* ClassDeclaration */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: + case 210 /* BindingElement */: return textSpan(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return spanInNode(node.statement); - case 169 /* Decorator */: + case 170 /* Decorator */: return spanInNodeArray(parent2.modifiers, node, isDecorator); - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: return spanInBindingPattern(node); - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return void 0; case 26 /* SemicolonToken */: case 1 /* EndOfFileToken */: @@ -126151,16 +126409,16 @@ function spanInSourceFileAtLocation(sourceFile, position) { case 83 /* CatchKeyword */: case 97 /* FinallyKeyword */: return spanInNextNode(node); - case 164 /* OfKeyword */: + case 165 /* OfKeyword */: return spanInOfKeyword(node); default: if (isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); } - if ((node.kind === 79 /* Identifier */ || node.kind === 231 /* SpreadElement */ || node.kind === 305 /* PropertyAssignment */ || node.kind === 306 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { + if ((node.kind === 79 /* Identifier */ || node.kind === 233 /* SpreadElement */ || node.kind === 308 /* PropertyAssignment */ || node.kind === 309 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { return textSpan(node); } - if (node.kind === 227 /* BinaryExpression */) { + if (node.kind === 229 /* BinaryExpression */) { const { left, operatorToken } = node; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern( @@ -126176,19 +126434,19 @@ function spanInSourceFileAtLocation(sourceFile, position) { } if (isExpressionNode(node)) { switch (parent2.kind) { - case 247 /* DoStatement */: + case 249 /* DoStatement */: return spanInPreviousNode(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return spanInNode(node.parent); - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: return textSpan(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (node.parent.operatorToken.kind === 27 /* CommaToken */) { return textSpan(node); } break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: if (node.parent.body === node) { return textSpan(node); } @@ -126196,25 +126454,25 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } switch (node.parent.kind) { - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (node.parent.name === node && !isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } break; - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: if (node.parent.type === node) { return spanInNextNode(node.parent.type); } break; - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: { + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: { const { initializer, type } = node.parent; if (initializer === node || type === node || isAssignmentOperator(node.kind)) { return spanInPreviousNode(node); } break; } - case 227 /* BinaryExpression */: { + case 229 /* BinaryExpression */: { const { left } = node.parent; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left) && node !== left) { return spanInPreviousNode(node); @@ -126237,14 +126495,14 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function spanInVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.parent.kind === 250 /* ForInStatement */) { + if (variableDeclaration.parent.parent.kind === 252 /* 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 === 251 /* ForOfStatement */) { + if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 253 /* ForOfStatement */) { return textSpanFromVariableDeclaration(variableDeclaration); } if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] !== variableDeclaration) { @@ -126271,7 +126529,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 264 /* ClassDeclaration */ && functionDeclaration.kind !== 176 /* Constructor */; + return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 266 /* ClassDeclaration */ && functionDeclaration.kind !== 178 /* Constructor */; } function spanInFunctionDeclaration(functionDeclaration) { if (!functionDeclaration.body) { @@ -126291,22 +126549,22 @@ function spanInSourceFileAtLocation(sourceFile, position) { } function spanInBlock(block) { switch (block.parent.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: if (getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { return void 0; } - case 248 /* WhileStatement */: - case 246 /* IfStatement */: - case 250 /* ForInStatement */: + case 250 /* WhileStatement */: + case 248 /* IfStatement */: + case 252 /* ForInStatement */: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: return spanInNodeIfStartsOnSameLine(findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } return spanInNode(block.statements[0]); } function spanInInitializerOfForLike(forLikeStatement) { - if (forLikeStatement.initializer.kind === 262 /* VariableDeclarationList */) { + if (forLikeStatement.initializer.kind === 264 /* VariableDeclarationList */) { const variableDeclarationList = forLikeStatement.initializer; if (variableDeclarationList.declarations.length > 0) { return spanInNode(variableDeclarationList.declarations[0]); @@ -126329,64 +126587,64 @@ function spanInSourceFileAtLocation(sourceFile, position) { function spanInBindingPattern(bindingPattern) { const firstBindingElement = forEach( bindingPattern.elements, - (element) => element.kind !== 233 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 235 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - if (bindingPattern.parent.kind === 208 /* BindingElement */) { + if (bindingPattern.parent.kind === 210 /* BindingElement */) { return textSpan(bindingPattern.parent); } return textSpanFromVariableDeclaration(bindingPattern.parent); } function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node2) { - Debug.assert(node2.kind !== 207 /* ArrayBindingPattern */ && node2.kind !== 206 /* ObjectBindingPattern */); - const elements = node2.kind === 209 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; + Debug.assert(node2.kind !== 209 /* ArrayBindingPattern */ && node2.kind !== 208 /* ObjectBindingPattern */); + const elements = node2.kind === 211 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; const firstBindingElement = forEach( elements, - (element) => element.kind !== 233 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 235 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - return textSpan(node2.parent.kind === 227 /* BinaryExpression */ ? node2.parent : node2); + return textSpan(node2.parent.kind === 229 /* BinaryExpression */ ? node2.parent : node2); } function spanInOpenBraceToken(node2) { switch (node2.parent.kind) { - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: const enumDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: const classDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return spanInNodeIfStartsOnSameLine(node2.parent.parent, node2.parent.clauses[0]); } return spanInNode(node2.parent); } function spanInCloseBraceToken(node2) { switch (node2.parent.kind) { - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: if (getModuleInstanceState(node2.parent.parent) !== 1 /* Instantiated */) { return void 0; } - case 269 /* EnumDeclaration */: - case 264 /* ClassDeclaration */: + case 272 /* EnumDeclaration */: + case 266 /* ClassDeclaration */: return textSpan(node2); - case 242 /* Block */: + case 244 /* Block */: if (isFunctionBlock(node2.parent)) { return textSpan(node2); } - case 301 /* CatchClause */: + case 304 /* CatchClause */: return spanInNode(lastOrUndefined(node2.parent.statements)); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: const caseBlock = node2.parent; const lastClause = lastOrUndefined(caseBlock.clauses); if (lastClause) { return spanInNode(lastOrUndefined(lastClause.statements)); } return void 0; - case 206 /* ObjectBindingPattern */: + case 208 /* ObjectBindingPattern */: const bindingPattern = node2.parent; return spanInNode(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -126399,7 +126657,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { } function spanInCloseBracketToken(node2) { switch (node2.parent.kind) { - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: const bindingPattern = node2.parent; return textSpan(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -126411,56 +126669,56 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function spanInOpenParenToken(node2) { - if (node2.parent.kind === 247 /* DoStatement */ || node2.parent.kind === 213 /* CallExpression */ || node2.parent.kind === 214 /* NewExpression */) { + if (node2.parent.kind === 249 /* DoStatement */ || node2.parent.kind === 215 /* CallExpression */ || node2.parent.kind === 216 /* NewExpression */) { return spanInPreviousNode(node2); } - if (node2.parent.kind === 217 /* ParenthesizedExpression */) { + if (node2.parent.kind === 219 /* ParenthesizedExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInCloseParenToken(node2) { switch (node2.parent.kind) { - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - case 248 /* WhileStatement */: - case 247 /* DoStatement */: - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 217 /* ParenthesizedExpression */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 178 /* Constructor */: + case 250 /* WhileStatement */: + case 249 /* DoStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 219 /* ParenthesizedExpression */: return spanInPreviousNode(node2); default: return spanInNode(node2.parent); } } function spanInColonToken(node2) { - if (isFunctionLike(node2.parent) || node2.parent.kind === 305 /* PropertyAssignment */ || node2.parent.kind === 168 /* Parameter */) { + if (isFunctionLike(node2.parent) || node2.parent.kind === 308 /* PropertyAssignment */ || node2.parent.kind === 169 /* Parameter */) { return spanInPreviousNode(node2); } return spanInNode(node2.parent); } function spanInGreaterThanOrLessThanToken(node2) { - if (node2.parent.kind === 216 /* TypeAssertionExpression */) { + if (node2.parent.kind === 218 /* TypeAssertionExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInWhileKeyword(node2) { - if (node2.parent.kind === 247 /* DoStatement */) { + if (node2.parent.kind === 249 /* DoStatement */) { return textSpanEndingAtNextToken(node2, node2.parent.expression); } return spanInNode(node2.parent); } function spanInOfKeyword(node2) { - if (node2.parent.kind === 251 /* ForOfStatement */) { + if (node2.parent.kind === 253 /* ForOfStatement */) { return spanInNextNode(node2); } return spanInNode(node2.parent); @@ -126549,17 +126807,17 @@ function getCallHierarchItemContainerName(node) { return; } switch (node.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - if (node.parent.kind === 210 /* ObjectLiteralExpression */) { + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: + if (node.parent.kind === 212 /* ObjectLiteralExpression */) { return (_a2 = getAssignedName(node.parent)) == null ? void 0 : _a2.getText(); } return (_b = getNameOfDeclaration(node.parent)) == null ? void 0 : _b.getText(); - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 270 /* ModuleDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 273 /* ModuleDeclaration */: if (isModuleBlock(node.parent) && isIdentifier(node.parent.parent.name)) { return node.parent.parent.name.getText(); } @@ -126737,55 +126995,55 @@ function createCallSiteCollector(program, callSites) { } switch (node.kind) { case 79 /* Identifier */: - case 274 /* ImportEqualsDeclaration */: - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return; - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: recordCallSite(node); return; - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: collect(node.expression); return; - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: collect(node.name); collect(node.initializer); return; - case 213 /* CallExpression */: + case 215 /* CallExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 214 /* NewExpression */: + case 216 /* NewExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: recordCallSite(node); collect(node.tag); collect(node.template); return; - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: recordCallSite(node); collect(node.tagName); collect(node.attributes); return; - case 169 /* Decorator */: + case 170 /* Decorator */: recordCallSite(node); collect(node.expression); return; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: recordCallSite(node); forEachChild(node, collect); break; - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: collect(node.expression); return; } @@ -126838,26 +127096,26 @@ function collectCallSites(program, node) { const callSites = []; const collect = createCallSiteCollector(program, callSites); switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: collectCallSitesOfSourceFile(node, collect); break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: collectCallSitesOfModuleDeclaration(node, collect); break; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: collectCallSitesOfFunctionLikeDeclaration(program.getTypeChecker(), node, collect); break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: collectCallSitesOfClassLikeDeclaration(node, collect); break; - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: collectCallSitesOfClassStaticBlockDeclaration(node, collect); break; default: @@ -126958,13 +127216,13 @@ function collectTokens(program, sourceFile, span, collector, cancellationToken) let inJSXElement = false; function visit(node) { switch (node.kind) { - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!node || !textSpanIntersectsWith(span, node.pos, node.getFullWidth()) || node.getFullWidth() === 0) { @@ -127104,25 +127362,25 @@ function isRightSideOfQualifiedNameOrPropertyAccess2(node) { return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node; } var tokenFromDeclarationMapping = new Map2([ - [261 /* VariableDeclaration */, 7 /* variable */], - [168 /* Parameter */, 6 /* parameter */], - [171 /* PropertyDeclaration */, 9 /* property */], - [270 /* ModuleDeclaration */, 3 /* namespace */], - [269 /* EnumDeclaration */, 1 /* enum */], - [308 /* EnumMember */, 8 /* enumMember */], - [264 /* ClassDeclaration */, 0 /* class */], - [174 /* MethodDeclaration */, 11 /* member */], - [263 /* FunctionDeclaration */, 10 /* function */], - [218 /* FunctionExpression */, 10 /* function */], - [173 /* MethodSignature */, 11 /* member */], - [177 /* GetAccessor */, 9 /* property */], - [178 /* SetAccessor */, 9 /* property */], - [170 /* PropertySignature */, 9 /* property */], - [267 /* InterfaceDeclaration */, 2 /* interface */], - [268 /* TypeAliasDeclaration */, 5 /* type */], - [167 /* TypeParameter */, 4 /* typeParameter */], - [305 /* PropertyAssignment */, 9 /* property */], - [306 /* ShorthandPropertyAssignment */, 9 /* property */] + [263 /* VariableDeclaration */, 7 /* variable */], + [169 /* Parameter */, 6 /* parameter */], + [172 /* PropertyDeclaration */, 9 /* property */], + [273 /* ModuleDeclaration */, 3 /* namespace */], + [272 /* EnumDeclaration */, 1 /* enum */], + [311 /* EnumMember */, 8 /* enumMember */], + [266 /* ClassDeclaration */, 0 /* class */], + [176 /* MethodDeclaration */, 11 /* member */], + [265 /* FunctionDeclaration */, 10 /* function */], + [220 /* FunctionExpression */, 10 /* function */], + [175 /* MethodSignature */, 11 /* member */], + [179 /* GetAccessor */, 9 /* property */], + [180 /* SetAccessor */, 9 /* property */], + [171 /* PropertySignature */, 9 /* property */], + [270 /* InterfaceDeclaration */, 2 /* interface */], + [271 /* TypeAliasDeclaration */, 5 /* type */], + [168 /* TypeParameter */, 4 /* typeParameter */], + [308 /* PropertyAssignment */, 9 /* property */], + [309 /* ShorthandPropertyAssignment */, 9 /* property */] ]); // src/services/_namespaces/ts.codefix.ts @@ -127469,7 +127727,7 @@ function findAwaitableInitializers(expression, sourceFile, cancellationToken, pr } const declaration = tryCast(symbol.valueDeclaration, isVariableDeclaration); const variableName = declaration && tryCast(declaration.name, isIdentifier); - const variableStatement = getAncestor(declaration, 244 /* VariableStatement */); + const variableStatement = getAncestor(declaration, 246 /* VariableStatement */); if (!declaration || !variableStatement || declaration.type || !declaration.initializer || variableStatement.getSourceFile() !== sourceFile || hasSyntacticModifier(variableStatement, 1 /* Export */) || !variableName || !isInsideAwaitableBody(declaration.initializer)) { isCompleteFix = false; continue; @@ -127521,7 +127779,7 @@ function symbolReferenceIsAlsoMissingAwait(reference, diagnostics, sourceFile, c return diagnostic && contains(errorCodes3, diagnostic.code) || 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 === 263 /* FunctionDeclaration */ || ancestor.parent.kind === 218 /* FunctionExpression */ || ancestor.parent.kind === 219 /* ArrowFunction */ || ancestor.parent.kind === 174 /* MethodDeclaration */)); + return node.kind & 32768 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 265 /* FunctionDeclaration */ || ancestor.parent.kind === 220 /* FunctionExpression */ || ancestor.parent.kind === 221 /* ArrowFunction */ || ancestor.parent.kind === 176 /* MethodDeclaration */)); } function makeChange3(changeTracker, errorCode, sourceFile, checker, insertionSite, fixedDeclarations) { if (isForOfStatement(insertionSite.parent) && !insertionSite.parent.awaitModifier) { @@ -127643,10 +127901,10 @@ function applyChange(changeTracker, initializer, sourceFile, fixedNodes) { function isPossiblyPartOfDestructuring(node) { switch (node.kind) { case 79 /* Identifier */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 211 /* ArrayLiteralExpression */: + case 212 /* ObjectLiteralExpression */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return true; default: return false; @@ -127659,7 +127917,7 @@ function arrayElementCouldBeVariableDeclaration(expression, checker) { function isPossiblyPartOfCommaSeperatedInitializer(node) { switch (node.kind) { case 79 /* Identifier */: - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: case 27 /* CommaToken */: return true; default: @@ -127701,7 +127959,7 @@ function makeChange5(changeTracker, sourceFile, pos, fixedNodes) { return; } const declaration = token.parent; - if (declaration.kind === 171 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { + if (declaration.kind === 172 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { changeTracker.insertModifierBefore(sourceFile, 137 /* DeclareKeyword */, declaration); } } @@ -127835,7 +128093,7 @@ function addUndefinedToOptionalProperty(changes, toAdd) { const d = add.valueDeclaration; if (d && (isPropertySignature(d) || isPropertyDeclaration(d)) && d.type) { const t = factory.createUnionTypeNode([ - ...d.type.kind === 192 /* UnionType */ ? d.type.types : [d.type], + ...d.type.kind === 194 /* UnionType */ ? d.type.types : [d.type], factory.createTypeReferenceNode("undefined") ]); changes.replaceNode(d.getSourceFile(), d.type, t); @@ -127903,24 +128161,24 @@ function doChange(changes, sourceFile, decl) { } } function isDeclarationWithType(node) { - return isFunctionLikeDeclaration(node) || node.kind === 261 /* VariableDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 171 /* PropertyDeclaration */; + return isFunctionLikeDeclaration(node) || node.kind === 263 /* VariableDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 172 /* PropertyDeclaration */; } function transformJSDocType(node) { switch (node.kind) { - case 321 /* JSDocAllType */: - case 322 /* JSDocUnknownType */: + case 324 /* JSDocAllType */: + case 325 /* JSDocUnknownType */: return factory.createTypeReferenceNode("any", emptyArray); - case 325 /* JSDocOptionalType */: + case 328 /* JSDocOptionalType */: return transformJSDocOptionalType(node); - case 324 /* JSDocNonNullableType */: + case 327 /* JSDocNonNullableType */: return transformJSDocType(node.type); - case 323 /* JSDocNullableType */: + case 326 /* JSDocNullableType */: return transformJSDocNullableType(node); - case 327 /* JSDocVariadicType */: + case 330 /* JSDocVariadicType */: return transformJSDocVariadicType(node); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: return transformJSDocFunctionType(node); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return transformJSDocTypeReference(node); default: const visited = visitEachChild(node, transformJSDocType, nullTransformationContext); @@ -127943,7 +128201,7 @@ function transformJSDocFunctionType(node) { } function transformJSDocParameter(node) { const index = node.parent.parameters.indexOf(node); - const isRest = node.type.kind === 327 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; + const isRest = node.type.kind === 330 /* 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), node.initializer); @@ -128091,7 +128349,7 @@ function doChange2(changes, sourceFile, position, checker, preferences, compiler })) { return; } - const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 245 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; + const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 247 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; changes.delete(sourceFile, nodeToDelete); if (!assignmentExpr) { members.push(factory.createPropertyDeclaration( @@ -128161,7 +128419,7 @@ function doChange2(changes, sourceFile, position, checker, preferences, compiler function createArrowFunctionExpressionMember(members2, arrowFunction, name) { const arrowFunctionBody = arrowFunction.body; let bodyBlock; - if (arrowFunctionBody.kind === 242 /* Block */) { + if (arrowFunctionBody.kind === 244 /* Block */) { bodyBlock = arrowFunctionBody; } else { bodyBlock = factory.createBlock([factory.createReturnStatement(arrowFunctionBody)]); @@ -128613,7 +128871,7 @@ function transformCallbackArgument(func, hasContinuation, continuationArgName, i switch (func.kind) { case 105 /* NullKeyword */: break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: case 79 /* Identifier */: if (!inputArgName) { break; @@ -128633,8 +128891,8 @@ function transformCallbackArgument(func, hasContinuation, continuationArgName, i continuationArgName.types.push(transformer.checker.getAwaitedType(returnType) || returnType); } return varDeclOrAssignment; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: { + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: { const funcBody = func.body; const returnType2 = (_a2 = getLastCallSignature(transformer.checker.getTypeAtLocation(func), transformer.checker)) == null ? void 0 : _a2.getReturnType(); if (isBlock(funcBody)) { @@ -128848,10 +129106,10 @@ function fixImportOfModuleExports(importingFile, exportingFile, changes, quotePr } const importNode = importFromModuleSpecifier(moduleSpecifier); switch (importNode.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: changes.replaceNode(importingFile, importNode, makeImport(importNode.name, void 0, moduleSpecifier, quotePreference)); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (isRequireCall(importNode, false)) { changes.replaceNode(importingFile, importNode, factory.createPropertyAccessExpression(getSynthesizedDeepClone(importNode), "default")); } @@ -128910,19 +129168,19 @@ function forEachExportReference(sourceFile, cb) { } function convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports, useSitesToUnqualify, quotePreference) { switch (statement.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference); return false; - case 245 /* ExpressionStatement */: { + case 247 /* ExpressionStatement */: { const { expression } = statement; switch (expression.kind) { - case 213 /* CallExpression */: { + case 215 /* CallExpression */: { if (isRequireCall(expression, true)) { changes.replaceNode(sourceFile, statement, makeImport(void 0, void 0, expression.arguments[0], quotePreference)); } return false; } - case 227 /* BinaryExpression */: { + case 229 /* BinaryExpression */: { const { operatorToken } = expression; return operatorToken.kind === 63 /* EqualsToken */ && convertAssignment(sourceFile, checker, expression, changes, exports, useSitesToUnqualify); } @@ -128964,8 +129222,8 @@ function convertVariableStatement(sourceFile, statement, changes, checker, ident } function convertPropertyAccessImport(name, propertyName, moduleSpecifier, identifiers, quotePreference) { switch (name.kind) { - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: { + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: { const tmp = makeUniqueName(propertyName, identifiers); return convertedImports([ makeSingleImport(tmp, propertyName, moduleSpecifier, quotePreference), @@ -129004,14 +129262,14 @@ function convertAssignment(sourceFile, checker, assignment, changes, exports, us function tryChangeModuleExportsObject(object, useSitesToUnqualify) { const statements = mapAllOrFail(object.properties, (prop) => { switch (prop.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 306 /* ShorthandPropertyAssignment */: - case 307 /* SpreadAssignment */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 309 /* ShorthandPropertyAssignment */: + case 310 /* SpreadAssignment */: return void 0; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return !isIdentifier(prop.name) ? void 0 : convertExportsDotXEquals_replaceNode(prop.name.text, prop.initializer, useSitesToUnqualify); - case 174 /* MethodDeclaration */: + case 176 /* 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}`); @@ -129066,15 +129324,15 @@ function convertExportsPropertyAssignment({ left, right, parent: parent2 }, sour function convertExportsDotXEquals_replaceNode(name, exported, useSitesToUnqualify) { const modifiers = [factory.createToken(94 /* ExportKeyword */)]; switch (exported.kind) { - case 218 /* FunctionExpression */: { + case 220 /* FunctionExpression */: { const { name: expressionName } = exported; if (expressionName && expressionName.text !== name) { return exportConst(); } } - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return functionExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return classExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); default: return exportConst(); @@ -129089,7 +129347,7 @@ function replaceImportUseSites(nodeOrNodes, useSitesToUnqualify) { } return isArray(nodeOrNodes) ? getSynthesizedDeepClonesWithReplacements(nodeOrNodes, true, replaceNode) : getSynthesizedDeepCloneWithReplacements(nodeOrNodes, true, replaceNode); function replaceNode(original) { - if (original.kind === 211 /* PropertyAccessExpression */) { + if (original.kind === 213 /* PropertyAccessExpression */) { const replacement = useSitesToUnqualify.get(original); useSitesToUnqualify.delete(original); return replacement; @@ -129098,13 +129356,13 @@ function replaceImportUseSites(nodeOrNodes, useSitesToUnqualify) { } function convertSingleImport(name, moduleSpecifier, checker, identifiers, target, quotePreference) { switch (name.kind) { - case 206 /* ObjectBindingPattern */: { + case 208 /* 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(void 0, importSpecifiers, moduleSpecifier, quotePreference)]); } } - case 207 /* ArrayBindingPattern */: { + case 209 /* ArrayBindingPattern */: { const tmp = makeUniqueName(moduleSpecifierToValidIdentifier(moduleSpecifier.text, target), identifiers); return convertedImports([ makeImport(factory.createIdentifier(tmp), void 0, moduleSpecifier, quotePreference), @@ -129175,11 +129433,11 @@ function forEachFreeIdentifier(node, cb) { function isFreeIdentifier(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return parent2.name !== node; - case 208 /* BindingElement */: + case 210 /* BindingElement */: return parent2.propertyName !== node; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return parent2.propertyName !== node; default: return true; @@ -129849,11 +130107,11 @@ function tryUseExistingNamespaceImport(existingImports, symbolName2, position, c function getTargetModuleFromNamespaceLikeImport(declaration, checker) { var _a2; switch (declaration.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return checker.resolveExternalModuleName(declaration.initializer.arguments[0]); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return checker.getAliasedSymbol(declaration.symbol); - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: const namespaceImport = tryCast((_a2 = declaration.importClause) == null ? void 0 : _a2.namedBindings, isNamespaceImport); return namespaceImport && checker.getAliasedSymbol(namespaceImport.symbol); default: @@ -129863,11 +130121,11 @@ function getTargetModuleFromNamespaceLikeImport(declaration, checker) { function getNamespaceLikeImportText(declaration) { var _a2, _b, _c; switch (declaration.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return (_a2 = tryCast(declaration.name, isIdentifier)) == null ? void 0 : _a2.text; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return declaration.name.text; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return (_c = tryCast((_b = declaration.importClause) == null ? void 0 : _b.namedBindings, isNamespaceImport)) == null ? void 0 : _c.name.text; default: return Debug.assertNever(declaration); @@ -129887,11 +130145,11 @@ function getAddAsTypeOnly(isValidTypeOnlyUseSite, isForNewImportDeclaration, sym } function tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker, compilerOptions) { return firstDefined(existingImports, ({ declaration, importKind, symbol, targetFlags }) => { - if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 274 /* ImportEqualsDeclaration */) { + if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 277 /* ImportEqualsDeclaration */) { return void 0; } - if (declaration.kind === 261 /* VariableDeclaration */) { - return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 206 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; + if (declaration.kind === 263 /* VariableDeclaration */) { + return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 208 /* 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)) @@ -129902,7 +130160,7 @@ function tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker const addAsTypeOnly = getAddAsTypeOnly(isValidTypeOnlyUseSite, false, symbol, targetFlags, checker, compilerOptions); if (importKind === 1 /* Default */ && (name || addAsTypeOnly === 2 /* Required */ && namedBindings)) return void 0; - if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 277 /* NamespaceImport */) + if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 280 /* NamespaceImport */) return void 0; return { kind: 2 /* AddToExisting */, @@ -129922,7 +130180,7 @@ function createExistingImportMap(checker, importingFile, compilerOptions) { if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i.parent); } - } else if (i.kind === 275 /* ImportDeclaration */ || i.kind === 274 /* ImportEqualsDeclaration */) { + } else if (i.kind === 278 /* ImportDeclaration */ || i.kind === 277 /* ImportEqualsDeclaration */) { const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier); if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i); @@ -130263,7 +130521,7 @@ function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSy case 4 /* PromoteTypeOnly */: { const { typeOnlyAliasDeclaration } = fix; const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, compilerOptions, sourceFile); - return promotedDeclaration.kind === 279 /* 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 === 282 /* 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}`); @@ -130271,12 +130529,12 @@ function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSy } function getModuleSpecifierText(promotedDeclaration) { var _a2, _b; - return promotedDeclaration.kind === 274 /* 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 === 277 /* 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) { const convertExistingToTypeOnly = compilerOptions.preserveValueImports && compilerOptions.isolatedModules; switch (aliasDeclaration.kind) { - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: if (aliasDeclaration.isTypeOnly) { if (aliasDeclaration.parent.elements.length > 1 && ts_OrganizeImports_exports.importSpecifiersAreSorted(aliasDeclaration.parent.elements)) { changes.delete(sourceFile, aliasDeclaration); @@ -130292,13 +130550,13 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF promoteImportClause(aliasDeclaration.parent.parent); return aliasDeclaration.parent.parent; } - case 276 /* ImportClause */: + case 279 /* ImportClause */: promoteImportClause(aliasDeclaration); return aliasDeclaration; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: promoteImportClause(aliasDeclaration.parent); return aliasDeclaration.parent; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: changes.deleteRange(sourceFile, aliasDeclaration.getChildAt(1)); return aliasDeclaration; default: @@ -130309,7 +130567,7 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF if (convertExistingToTypeOnly) { const namedImports = tryCast(importClause.namedBindings, isNamedImports); if (namedImports && namedImports.elements.length > 1) { - if (ts_OrganizeImports_exports.importSpecifiersAreSorted(namedImports.elements) && aliasDeclaration.kind === 279 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { + if (ts_OrganizeImports_exports.importSpecifiersAreSorted(namedImports.elements) && aliasDeclaration.kind === 282 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { changes.delete(sourceFile, aliasDeclaration); changes.insertImportSpecifierAtIndex(sourceFile, aliasDeclaration, namedImports, 0); } @@ -130324,7 +130582,7 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF } function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, compilerOptions) { var _a2; - if (clause.kind === 206 /* ObjectBindingPattern */) { + if (clause.kind === 208 /* ObjectBindingPattern */) { if (defaultImport) { addElementToBindingPattern(clause, defaultImport.name, "default"); } @@ -130722,13 +130980,13 @@ function doRemoveOverrideModifierChange(changeTracker, sourceFile, pos) { } function isClassElementLikeHasJSDoc(node) { switch (node.kind) { - case 176 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return true; - case 168 /* Parameter */: + case 169 /* Parameter */: return isParameterPropertyDeclaration(node, node.parent); default: return false; @@ -130986,7 +131244,7 @@ registerCodeFix({ }); function getNamedTupleMember(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - return findAncestor(token, (t) => t.kind === 202 /* NamedTupleMember */); + return findAncestor(token, (t) => t.kind === 204 /* NamedTupleMember */); } function doChange8(changes, sourceFile, namedTupleMember) { if (!namedTupleMember) { @@ -130995,10 +131253,10 @@ function doChange8(changes, sourceFile, namedTupleMember) { let unwrappedType = namedTupleMember.type; let sawOptional = false; let sawRest = false; - while (unwrappedType.kind === 190 /* OptionalType */ || unwrappedType.kind === 191 /* RestType */ || unwrappedType.kind === 196 /* ParenthesizedType */) { - if (unwrappedType.kind === 190 /* OptionalType */) { + while (unwrappedType.kind === 192 /* OptionalType */ || unwrappedType.kind === 193 /* RestType */ || unwrappedType.kind === 198 /* ParenthesizedType */) { + if (unwrappedType.kind === 192 /* OptionalType */) { sawOptional = true; - } else if (unwrappedType.kind === 191 /* RestType */) { + } else if (unwrappedType.kind === 193 /* RestType */) { sawRest = true; } unwrappedType = unwrappedType.type; @@ -131305,19 +131563,19 @@ function getInfo6(checker, sourceFile, position, errorCode) { } function getVariableLikeInitializer(declaration) { switch (declaration.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 305 /* PropertyAssignment */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 308 /* PropertyAssignment */: return declaration.initializer; - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: return declaration.initializer && (isJsxExpression(declaration.initializer) ? declaration.initializer.expression : void 0); - case 306 /* ShorthandPropertyAssignment */: - case 170 /* PropertySignature */: - case 308 /* EnumMember */: - case 356 /* JSDocPropertyTag */: - case 349 /* JSDocParameterTag */: + case 309 /* ShorthandPropertyAssignment */: + case 171 /* PropertySignature */: + case 311 /* EnumMember */: + case 359 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: return void 0; } } @@ -131559,7 +131817,7 @@ function createActionForAddMissingMemberInJavascriptFile(context, { parentDeclar function addMissingMemberInJs(changeTracker, sourceFile, classDeclaration, token, makeStatic) { const tokenName = token.text; if (makeStatic) { - if (classDeclaration.kind === 232 /* ClassExpression */) { + if (classDeclaration.kind === 234 /* ClassExpression */) { return; } const className = classDeclaration.name.getText(); @@ -131608,7 +131866,7 @@ function createActionsForAddMissingMemberInTypeScriptFile(context, { parentDecla } function getTypeNode2(checker, node, token) { let typeNode; - if (token.parent.parent.kind === 227 /* BinaryExpression */) { + if (token.parent.parent.kind === 229 /* 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))); @@ -131674,7 +131932,7 @@ function getActionsForMissingMethodDeclaration(context, info) { } function addMethodDeclaration(context, changes, callExpression, name, modifierFlags, parentDeclaration, sourceFile) { const importAdder = createImportAdder(sourceFile, context.program, context.preferences, context.host); - const kind = isClassLike(parentDeclaration) ? 174 /* MethodDeclaration */ : 173 /* MethodSignature */; + const kind = isClassLike(parentDeclaration) ? 176 /* MethodDeclaration */ : 175 /* MethodSignature */; const signatureDeclaration = createSignatureDeclarationFromCallExpression(kind, context, importAdder, callExpression, name, modifierFlags, parentDeclaration); const containingMethodDeclaration = tryGetContainingMethodDeclaration(parentDeclaration, callExpression); if (containingMethodDeclaration) { @@ -131703,7 +131961,7 @@ function addEnumMemberDeclaration(changes, checker, { token, parentDeclaration } 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(263 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature(263 /* FunctionDeclaration */, context, quotePreference, info.signature, createStubbedBody(Diagnostics.Function_not_implemented.message, quotePreference), info.token, void 0, void 0, void 0, importAdder); + const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(265 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature(265 /* FunctionDeclaration */, context, quotePreference, info.signature, createStubbedBody(Diagnostics.Function_not_implemented.message, quotePreference), info.token, void 0, void 0, void 0, importAdder); if (functionDeclaration === void 0) { Debug.fail("fixMissingFunctionDeclaration codefix got unexpected error."); } @@ -131803,7 +132061,7 @@ function tryGetValueFromType(context, checker, importAdder, quotePreference, typ if (signature === void 0) return createUndefined(); const func = createSignatureDeclarationFromSignature( - 218 /* FunctionExpression */, + 220 /* FunctionExpression */, context, quotePreference, signature[0], @@ -132464,7 +132722,7 @@ registerCodeFix({ const importDeclaration = getImportDeclaration(context.sourceFile, context.program, context.span.start); if (!importDeclaration) return; - const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 279 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); + const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 282 /* 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) { @@ -132479,18 +132737,18 @@ registerCodeFix({ }); function getImportDeclaration(sourceFile, program, start) { const identifier = tryCast(getTokenAtPosition(sourceFile, start), isIdentifier); - if (!identifier || identifier.parent.kind !== 183 /* TypeReference */) + if (!identifier || identifier.parent.kind !== 185 /* 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 === 274 /* ImportEqualsDeclaration */) { + if (importDeclaration.kind === 277 /* ImportEqualsDeclaration */) { changes.insertModifierBefore(sourceFile, 155 /* TypeKeyword */, importDeclaration.name); return; } - const importClause = importDeclaration.kind === 276 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; + const importClause = importDeclaration.kind === 279 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; if (importClause.name && importClause.namedBindings) { return; } @@ -132648,7 +132906,7 @@ function deleteTypeParameters(changes, sourceFile, token) { changes.delete(sourceFile, Debug.checkDefined(cast(token.parent, isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); } function isImport(token) { - return token.kind === 101 /* ImportKeyword */ || token.kind === 79 /* Identifier */ && (token.parent.kind === 279 /* ImportSpecifier */ || token.parent.kind === 276 /* ImportClause */); + return token.kind === 101 /* ImportKeyword */ || token.kind === 79 /* Identifier */ && (token.parent.kind === 282 /* ImportSpecifier */ || token.parent.kind === 279 /* ImportClause */); } function tryGetFullImport(token) { return token.kind === 101 /* ImportKeyword */ ? tryCast(token.parent, isImportDeclaration) : void 0; @@ -132657,7 +132915,7 @@ 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 === 244 /* VariableStatement */ ? node.parent : node); + changes.delete(sourceFile, node.parent.kind === 246 /* VariableStatement */ ? node.parent : node); } function deleteDestructuringElements(changes, sourceFile, node) { forEach(node.elements, (n) => changes.delete(sourceFile, n)); @@ -132681,14 +132939,14 @@ function tryPrefixDeclaration(changes, errorCode, sourceFile, token) { } function canPrefix(token) { switch (token.parent.kind) { - case 168 /* Parameter */: - case 167 /* TypeParameter */: + case 169 /* Parameter */: + case 168 /* TypeParameter */: return true; - case 261 /* VariableDeclaration */: { + case 263 /* VariableDeclaration */: { const varDecl = token.parent; switch (varDecl.parent.parent.kind) { - case 251 /* ForOfStatement */: - case 250 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 252 /* ForInStatement */: return true; } } @@ -132737,8 +132995,8 @@ function isNotProvidedArguments(parameter, checker, sourceFiles) { function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program, cancellationToken, isFixAll) { const { parent: parent2 } = parameter; switch (parent2.kind) { - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: + case 176 /* MethodDeclaration */: + case 178 /* 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); @@ -132756,18 +133014,18 @@ function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program } } return true; - case 263 /* FunctionDeclaration */: { + case 265 /* FunctionDeclaration */: { if (parent2.name && isCallbackLike(checker, sourceFile, parent2.name)) { return isLastParameter(parent2, parameter, isFixAll); } return true; } - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return isLastParameter(parent2, parameter, isFixAll); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return false; - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return true; default: return Debug.failBadSyntaxKind(parent2); @@ -132817,7 +133075,7 @@ function doChange18(changes, sourceFile, start, length2, errorCode) { const container = (isBlock(statement.parent) ? statement.parent : statement).parent; if (!isBlock(statement.parent) || statement === first(statement.parent.statements)) { switch (container.kind) { - case 246 /* IfStatement */: + case 248 /* IfStatement */: if (container.elseStatement) { if (isBlock(statement.parent)) { break; @@ -132826,8 +133084,8 @@ function doChange18(changes, sourceFile, start, length2, errorCode) { } return; } - case 248 /* WhileStatement */: - case 249 /* ForStatement */: + case 250 /* WhileStatement */: + case 251 /* ForStatement */: changes.delete(sourceFile, container); return; } @@ -132886,7 +133144,7 @@ registerCodeFix({ 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 === 323 /* JSDocNullableType */) { + if (typeNode.kind === 326 /* JSDocNullableType */) { actions2.push(fix(checker.getNullableType(type, 32768 /* Undefined */), fixIdNullable, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)); } return actions2; @@ -132904,7 +133162,7 @@ registerCodeFix({ if (!info) return; const { typeNode, type } = info; - const fixedType = typeNode.kind === 323 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; + const fixedType = typeNode.kind === 326 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; doChange20(changes, sourceFile, typeNode, fixedType, checker); }); } @@ -132919,22 +133177,22 @@ function getInfo11(sourceFile, pos, checker) { } function isTypeContainer(node) { switch (node.kind) { - case 235 /* AsExpression */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 263 /* FunctionDeclaration */: - case 177 /* GetAccessor */: - case 181 /* IndexSignature */: - case 200 /* MappedType */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 178 /* SetAccessor */: - case 268 /* TypeAliasDeclaration */: - case 216 /* TypeAssertionExpression */: - case 261 /* VariableDeclaration */: + case 237 /* AsExpression */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 265 /* FunctionDeclaration */: + case 179 /* GetAccessor */: + case 183 /* IndexSignature */: + case 202 /* MappedType */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 180 /* SetAccessor */: + case 271 /* TypeAliasDeclaration */: + case 218 /* TypeAssertionExpression */: + case 263 /* VariableDeclaration */: return true; default: return false; @@ -133025,14 +133283,14 @@ function getNodes3(sourceFile, start) { } let insertBefore; switch (containingFunction.kind) { - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: insertBefore = containingFunction.name; break; - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: insertBefore = findChildOfKind(containingFunction, 99 /* FunctionKeyword */, sourceFile); break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: const kind = containingFunction.typeParameters ? 29 /* LessThanToken */ : 20 /* OpenParenToken */; insertBefore = findChildOfKind(containingFunction, kind, sourceFile) || first(containingFunction.parameters); break; @@ -133327,7 +133585,7 @@ function annotateSetAccessor(changes, importAdder, sourceFile, setAccessorDeclar function annotate(changes, importAdder, sourceFile, declaration, type, program, host) { const typeNode = getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { - if (isInJSFile(sourceFile) && declaration.kind !== 170 /* PropertySignature */) { + if (isInJSFile(sourceFile) && declaration.kind !== 171 /* PropertySignature */) { const parent2 = isVariableDeclaration(declaration) ? tryCast(declaration.parent.parent, isVariableStatement) : declaration; if (!parent2) { return; @@ -133403,17 +133661,17 @@ function inferTypeForParametersFromUsage(func, sourceFile, program, cancellation function getFunctionReferences(containingFunction, sourceFile, program, cancellationToken) { let searchToken; switch (containingFunction.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: searchToken = findChildOfKind(containingFunction, 136 /* ConstructorKeyword */, sourceFile); break; - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: const parent2 = containingFunction.parent; searchToken = (isVariableDeclaration(parent2) || isPropertyDeclaration(parent2)) && isIdentifier(parent2.name) ? parent2.name : containingFunction.name; break; - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: searchToken = containingFunction.name; break; } @@ -133548,44 +133806,44 @@ function inferTypeFromReferences(program, references, cancellationToken) { node = node.parent; } switch (node.parent.kind) { - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: inferTypeFromExpressionStatement(node, usage); break; - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: usage.isNumber = true; break; - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: inferTypeFromPrefixUnaryExpression(node.parent, usage); break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: inferTypeFromBinaryExpression(node, node.parent, usage); break; - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: inferTypeFromSwitchStatementLabel(node.parent, usage); break; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: if (node.parent.expression === node) { inferTypeFromCallExpression(node.parent, usage); } else { inferTypeFromContextualType(node, usage); } break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: inferTypeFromPropertyAccessExpression(node.parent, usage); break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: inferTypeFromPropertyElementExpression(node.parent, node, usage); break; - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: inferTypeFromPropertyAssignment(node.parent, usage); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: inferTypeFromPropertyDeclaration(node.parent, usage); break; - case 261 /* VariableDeclaration */: { + case 263 /* VariableDeclaration */: { const { name, initializer } = node.parent; if (node === name) { if (initializer) { @@ -133682,7 +133940,7 @@ function inferTypeFromReferences(program, references, cancellationToken) { break; case 56 /* BarBarToken */: case 60 /* QuestionQuestionToken */: - if (node === parent2.left && (node.parent.parent.kind === 261 /* VariableDeclaration */ || isAssignmentExpression(node.parent.parent, true))) { + if (node === parent2.left && (node.parent.parent.kind === 263 /* VariableDeclaration */ || isAssignmentExpression(node.parent.parent, true))) { addCandidateType(usage, checker.getTypeAtLocation(parent2.right)); } break; @@ -133706,7 +133964,7 @@ function inferTypeFromReferences(program, references, cancellationToken) { } } calculateUsageOfNode(parent2, call.return_); - if (parent2.kind === 213 /* CallExpression */) { + if (parent2.kind === 215 /* CallExpression */) { (usage.calls || (usage.calls = [])).push(call); } else { (usage.constructs || (usage.constructs = [])).push(call); @@ -134125,7 +134383,7 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con 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 : 170 /* PropertySignature */; + const kind = (_a2 = declaration == null ? void 0 : declaration.kind) != null ? _a2 : 171 /* PropertySignature */; const declarationName = getSynthesizedDeepClone(getNameOfDeclaration(declaration), false); const effectiveModifierFlags = declaration ? getEffectiveModifierFlags(declaration) : 0 /* None */; let modifierFlags = effectiveModifierFlags & 4 /* Public */ ? 4 /* Public */ : effectiveModifierFlags & 16 /* Protected */ ? 16 /* Protected */ : 0 /* None */; @@ -134138,8 +134396,8 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con const ambient = !!(enclosingDeclaration.flags & 16777216 /* Ambient */) || isAmbient; const quotePreference = getQuotePreference(sourceFile, preferences); switch (kind) { - case 170 /* PropertySignature */: - case 171 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 172 /* PropertyDeclaration */: const flags = quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : void 0; let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); if (importAdder) { @@ -134157,8 +134415,8 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con void 0 )); break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: { + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: { Debug.assertIsDefined(declarations); let typeNode2 = checker.typeToTypeNode(type, enclosingDeclaration, void 0, getNoopSymbolTrackerWithResolver(context)); const allAccessors = getAllAccessorDeclarations(declarations, declaration); @@ -134193,8 +134451,8 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con } break; } - case 173 /* MethodSignature */: - case 174 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 176 /* MethodDeclaration */: Debug.assertIsDefined(declarations); const signatures = type.isUnion() ? flatMap(type.types, (t) => t.getCallSignatures()) : type.getCallSignatures(); if (!some(signatures)) { @@ -134221,7 +134479,7 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con break; } function outputMethod(quotePreference2, signature, modifiers2, name, body2) { - const method = createSignatureDeclarationFromSignature(174 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); + const method = createSignatureDeclarationFromSignature(176 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); if (method) addClassElement(method); } @@ -134347,7 +134605,7 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder const parameters = createDummyParameters(args.length, names, argumentTypeNodes, void 0, isJs); const type = isJs || contextualType === void 0 ? void 0 : checker.typeToTypeNode(contextualType, contextNode, void 0, tracker); switch (kind) { - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return factory.createMethodDeclaration( modifiers, asteriskToken, @@ -134358,7 +134616,7 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder type, createStubbedMethodBody(quotePreference) ); - case 173 /* MethodSignature */: + case 175 /* MethodSignature */: return factory.createMethodSignature( modifiers, name, @@ -134367,7 +134625,7 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder parameters, type === void 0 ? factory.createKeywordTypeNode(159 /* UnknownKeyword */) : type ); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return factory.createFunctionDeclaration( modifiers, asteriskToken, @@ -134721,7 +134979,7 @@ function getAccessorConvertiblePropertyAtPosition(file, program, start, end, con isStatic: hasStaticModifier(declaration), isReadonly: hasEffectiveReadonlyModifier(declaration), type: getDeclarationType(declaration, program), - container: declaration.kind === 168 /* Parameter */ ? declaration.parent.parent : declaration.parent, + container: declaration.kind === 169 /* Parameter */ ? declaration.parent.parent : declaration.parent, originalName: declaration.name.text, declaration, fieldName, @@ -134869,7 +135127,7 @@ registerCodeFix({ }); function getActionsForUsageOfInvalidImport(context) { const sourceFile = context.sourceFile; - const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 213 /* CallExpression */ : 214 /* NewExpression */; + const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 215 /* CallExpression */ : 216 /* NewExpression */; const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), (a) => a.kind === targetKind); if (!node) { return []; @@ -135192,7 +135450,7 @@ registerCodeFix({ function getImportTypeNode(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); Debug.assert(token.kind === 101 /* ImportKeyword */, "This token should be an ImportKeyword"); - Debug.assert(token.parent.kind === 205 /* ImportType */, "Token parent should be an ImportType"); + Debug.assert(token.parent.kind === 207 /* ImportType */, "Token parent should be an ImportType"); return token.parent; } function doChange28(changes, sourceFile, importType) { @@ -135988,12 +136246,12 @@ function isMemberCompletionKind(kind) { function getJsxClosingTagCompletion(location, sourceFile) { const jsxClosingElement = findAncestor(location, (node) => { switch (node.kind) { - case 290 /* JsxClosingElement */: + case 293 /* JsxClosingElement */: return true; case 43 /* SlashToken */: case 31 /* GreaterThanToken */: case 79 /* Identifier */: - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return false; default: return "quit"; @@ -136312,10 +136570,10 @@ function createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, pro const quotePreference = getQuotePreference(sourceFile, preferences); const builderFlags = 33554432 /* OmitThisParameter */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */); switch (declaration.kind) { - case 170 /* PropertySignature */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodSignature */: - case 174 /* MethodDeclaration */: { + case 171 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 175 /* MethodSignature */: + case 176 /* 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); @@ -136835,11 +137093,11 @@ function getContextualType(previousToken, position, sourceFile, checker) { return getContextualTypeFromParent(previousToken, checker); case 63 /* EqualsToken */: switch (parent2.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return checker.getContextualType(parent2.initializer); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return checker.getTypeAtLocation(parent2.left); - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: return checker.getContextualTypeForJsxAttribute(parent2); default: return void 0; @@ -136864,7 +137122,7 @@ function getFirstSymbolInChain(symbol, enclosingDeclaration, checker) { } function isModuleSymbol(symbol) { var _a2; - return !!((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d.kind === 314 /* SourceFile */)); + return !!((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d.kind === 317 /* SourceFile */)); } function getCompletionData(program, log, sourceFile, compilerOptions, position, preferences, detailsEntryId, host, formatContext, cancellationToken) { var _a2; @@ -136898,7 +137156,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const typeExpression = tryGetTypeExpressionFromTag(tag); if (typeExpression) { currentToken = getTokenAtPosition(sourceFile, position); - if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 356 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { + if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 359 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression); } } @@ -136956,7 +137214,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, isRightOfDot = contextToken.kind === 24 /* DotToken */; isRightOfQuestionDot = contextToken.kind === 28 /* QuestionDotToken */; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: propertyAccessToConvert = parent2; node = propertyAccessToConvert.expression; const leftmostAccessExpression = getLeftmostAccessExpression(propertyAccessToConvert); @@ -136967,16 +137225,16 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return void 0; } break; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: node = parent2.left; break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: node = parent2.name; break; - case 205 /* ImportType */: + case 207 /* ImportType */: node = parent2; break; - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: node = parent2.getFirstToken(sourceFile); Debug.assert(node.kind === 101 /* ImportKeyword */ || node.kind === 104 /* NewKeyword */); break; @@ -136984,51 +137242,51 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return void 0; } } else if (!importStatementCompletion) { - if (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) { + if (parent2 && parent2.kind === 213 /* PropertyAccessExpression */) { contextToken = parent2; parent2 = parent2.parent; } if (currentToken.parent === location) { switch (currentToken.kind) { case 31 /* GreaterThanToken */: - if (currentToken.parent.kind === 287 /* JsxElement */ || currentToken.parent.kind === 289 /* JsxOpeningElement */) { + if (currentToken.parent.kind === 290 /* JsxElement */ || currentToken.parent.kind === 292 /* JsxOpeningElement */) { location = currentToken; } break; case 43 /* SlashToken */: - if (currentToken.parent.kind === 288 /* JsxSelfClosingElement */) { + if (currentToken.parent.kind === 291 /* JsxSelfClosingElement */) { location = currentToken; } break; } } switch (parent2.kind) { - case 290 /* JsxClosingElement */: + case 293 /* JsxClosingElement */: if (contextToken.kind === 43 /* SlashToken */) { isStartingCloseTag = true; location = contextToken; } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (!binaryExpressionMayBeOpenTag(parent2)) { break; } - case 288 /* JsxSelfClosingElement */: - case 287 /* JsxElement */: - case 289 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: + case 290 /* JsxElement */: + case 292 /* JsxOpeningElement */: isJsxIdentifierExpected = true; if (contextToken.kind === 29 /* LessThanToken */) { isRightOfOpenTag = true; location = contextToken; } break; - case 297 /* JsxExpression */: - case 296 /* JsxSpreadAttribute */: + case 300 /* JsxExpression */: + case 299 /* JsxSpreadAttribute */: if (previousToken.kind === 19 /* CloseBraceToken */ && currentToken.kind === 31 /* GreaterThanToken */) { isJsxIdentifierExpected = true; } break; - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: if (parent2.initializer === previousToken && previousToken.end < position) { isJsxIdentifierExpected = true; break; @@ -137132,13 +137390,13 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, }; function isTagWithTypeExpression(tag) { switch (tag.kind) { - case 349 /* JSDocParameterTag */: - case 356 /* JSDocPropertyTag */: - case 350 /* JSDocReturnTag */: - case 352 /* JSDocTypeTag */: - case 354 /* JSDocTypedefTag */: + case 352 /* JSDocParameterTag */: + case 359 /* JSDocPropertyTag */: + case 353 /* JSDocReturnTag */: + case 355 /* JSDocTypeTag */: + case 357 /* JSDocTypedefTag */: return true; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return !!tag.constraint; default: return false; @@ -137147,7 +137405,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, function tryGetTypeExpressionFromTag(tag) { if (isTagWithTypeExpression(tag)) { const typeExpression = isJSDocTemplateTag(tag) ? tag.constraint : tag.typeExpression; - return typeExpression && typeExpression.kind === 318 /* JSDocTypeExpression */ ? typeExpression : void 0; + return typeExpression && typeExpression.kind === 321 /* JSDocTypeExpression */ ? typeExpression : void 0; } return void 0; } @@ -137177,7 +137435,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, symbols.push(exportedSymbol); } } - if (!isTypeLocation && symbol.declarations && symbol.declarations.some((d) => d.kind !== 314 /* SourceFile */ && d.kind !== 270 /* ModuleDeclaration */ && d.kind !== 269 /* EnumDeclaration */)) { + if (!isTypeLocation && symbol.declarations && symbol.declarations.some((d) => d.kind !== 317 /* SourceFile */ && d.kind !== 273 /* ModuleDeclaration */ && d.kind !== 272 /* EnumDeclaration */)) { let type = typeChecker3.getTypeOfSymbolAtLocation(symbol, node).getNonOptionalType(); let insertQuestionDot = false; if (type.isNullableType()) { @@ -137216,7 +137474,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (isRightOfQuestionDot && some(type.getCallSignatures())) { isNewIdentifierLocation = true; } - const propertyAccess = node.kind === 205 /* ImportType */ ? node : node.parent; + const propertyAccess = node.kind === 207 /* ImportType */ ? node : node.parent; if (inCheckedFile) { const typeSymbols = type.getApparentProperties(); for (const symbol of typeSymbols) { @@ -137452,7 +137710,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } } } - if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 314 /* SourceFile */) { + if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 317 /* SourceFile */) { const thisType = typeChecker3.tryGetThisTypeAt(scopeNode, false, isClassLike(scopeNode.parent) ? scopeNode : void 0); if (thisType && !isProbablyGlobalType(thisType, sourceFile, typeChecker3)) { for (const symbol of getPropertiesForCompletion(thisType, typeChecker3)) { @@ -137482,10 +137740,10 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } function isSnippetScope(scopeNode) { switch (scopeNode.kind) { - case 314 /* SourceFile */: - case 229 /* TemplateExpression */: - case 297 /* JsxExpression */: - case 242 /* Block */: + case 317 /* SourceFile */: + case 231 /* TemplateExpression */: + case 300 /* JsxExpression */: + case 244 /* Block */: return true; default: return isStatement(scopeNode); @@ -137495,24 +137753,24 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return insideJsDocTagTypeExpression || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker3) || isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken)); } function isContextTokenValueLocation(contextToken2) { - return contextToken2 && (contextToken2.kind === 113 /* TypeOfKeyword */ && (contextToken2.parent.kind === 186 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 130 /* AssertsKeyword */ && contextToken2.parent.kind === 182 /* TypePredicate */); + return contextToken2 && (contextToken2.kind === 113 /* TypeOfKeyword */ && (contextToken2.parent.kind === 188 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 130 /* AssertsKeyword */ && contextToken2.parent.kind === 184 /* TypePredicate */); } function isContextTokenTypeLocation(contextToken2) { if (contextToken2) { const parentKind = contextToken2.parent.kind; switch (contextToken2.kind) { case 58 /* ColonToken */: - return parentKind === 171 /* PropertyDeclaration */ || parentKind === 170 /* PropertySignature */ || parentKind === 168 /* Parameter */ || parentKind === 261 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); + return parentKind === 172 /* PropertyDeclaration */ || parentKind === 171 /* PropertySignature */ || parentKind === 169 /* Parameter */ || parentKind === 263 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); case 63 /* EqualsToken */: - return parentKind === 268 /* TypeAliasDeclaration */; + return parentKind === 271 /* TypeAliasDeclaration */; case 129 /* AsKeyword */: - return parentKind === 235 /* AsExpression */; + return parentKind === 237 /* AsExpression */; case 29 /* LessThanToken */: - return parentKind === 183 /* TypeReference */ || parentKind === 216 /* TypeAssertionExpression */; + return parentKind === 185 /* TypeReference */ || parentKind === 218 /* TypeAssertionExpression */; case 95 /* ExtendsKeyword */: - return parentKind === 167 /* TypeParameter */; + return parentKind === 168 /* TypeParameter */; case 151 /* SatisfiesKeyword */: - return parentKind === 239 /* SatisfiesExpression */; + return parentKind === 241 /* SatisfiesExpression */; } } return false; @@ -137687,14 +137945,14 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return true; } if (contextToken2.kind === 31 /* GreaterThanToken */ && contextToken2.parent) { - if (location === contextToken2.parent && (location.kind === 289 /* JsxOpeningElement */ || location.kind === 288 /* JsxSelfClosingElement */)) { + if (location === contextToken2.parent && (location.kind === 292 /* JsxOpeningElement */ || location.kind === 291 /* JsxSelfClosingElement */)) { return false; } - if (contextToken2.parent.kind === 289 /* JsxOpeningElement */) { - return location.parent.kind !== 289 /* JsxOpeningElement */; + if (contextToken2.parent.kind === 292 /* JsxOpeningElement */) { + return location.parent.kind !== 292 /* JsxOpeningElement */; } - if (contextToken2.parent.kind === 290 /* JsxClosingElement */ || contextToken2.parent.kind === 288 /* JsxSelfClosingElement */) { - return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 287 /* JsxElement */; + if (contextToken2.parent.kind === 293 /* JsxClosingElement */ || contextToken2.parent.kind === 291 /* JsxSelfClosingElement */) { + return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 290 /* JsxElement */; } } return false; @@ -137705,29 +137963,29 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const tokenKind = keywordForNode(contextToken); switch (tokenKind) { case 27 /* CommaToken */: - return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 227 /* BinaryExpression */ || containingNodeKind === 184 /* FunctionType */ || containingNodeKind === 210 /* ObjectLiteralExpression */; + return containingNodeKind === 215 /* CallExpression */ || containingNodeKind === 178 /* Constructor */ || containingNodeKind === 216 /* NewExpression */ || containingNodeKind === 211 /* ArrayLiteralExpression */ || containingNodeKind === 229 /* BinaryExpression */ || containingNodeKind === 186 /* FunctionType */ || containingNodeKind === 212 /* ObjectLiteralExpression */; case 20 /* OpenParenToken */: - return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 217 /* ParenthesizedExpression */ || containingNodeKind === 196 /* ParenthesizedType */; + return containingNodeKind === 215 /* CallExpression */ || containingNodeKind === 178 /* Constructor */ || containingNodeKind === 216 /* NewExpression */ || containingNodeKind === 219 /* ParenthesizedExpression */ || containingNodeKind === 198 /* ParenthesizedType */; case 22 /* OpenBracketToken */: - return containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 181 /* IndexSignature */ || containingNodeKind === 166 /* ComputedPropertyName */; + return containingNodeKind === 211 /* ArrayLiteralExpression */ || containingNodeKind === 183 /* IndexSignature */ || containingNodeKind === 167 /* ComputedPropertyName */; case 143 /* ModuleKeyword */: case 144 /* NamespaceKeyword */: case 101 /* ImportKeyword */: return true; case 24 /* DotToken */: - return containingNodeKind === 270 /* ModuleDeclaration */; + return containingNodeKind === 273 /* ModuleDeclaration */; case 18 /* OpenBraceToken */: - return containingNodeKind === 264 /* ClassDeclaration */ || containingNodeKind === 265 /* StructDeclaration */ || containingNodeKind === 210 /* ObjectLiteralExpression */; + return containingNodeKind === 266 /* ClassDeclaration */ || containingNodeKind === 267 /* StructDeclaration */ || containingNodeKind === 212 /* ObjectLiteralExpression */; case 63 /* EqualsToken */: - return containingNodeKind === 261 /* VariableDeclaration */ || containingNodeKind === 227 /* BinaryExpression */; + return containingNodeKind === 263 /* VariableDeclaration */ || containingNodeKind === 229 /* BinaryExpression */; case 15 /* TemplateHead */: - return containingNodeKind === 229 /* TemplateExpression */; + return containingNodeKind === 231 /* TemplateExpression */; case 16 /* TemplateMiddle */: - return containingNodeKind === 240 /* TemplateSpan */; + return containingNodeKind === 242 /* TemplateSpan */; case 133 /* AsyncKeyword */: - return containingNodeKind === 174 /* MethodDeclaration */ || containingNodeKind === 306 /* ShorthandPropertyAssignment */; + return containingNodeKind === 176 /* MethodDeclaration */ || containingNodeKind === 309 /* ShorthandPropertyAssignment */; case 41 /* AsteriskToken */: - return containingNodeKind === 174 /* MethodDeclaration */; + return containingNodeKind === 176 /* MethodDeclaration */; } if (isClassMemberCompletionKeyword(tokenKind)) { return true; @@ -137765,7 +138023,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, completionKind = 0 /* ObjectPropertyDeclaration */; let typeMembers; let existingMembers; - if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */) { + if (objectLikeContainer.kind === 212 /* ObjectLiteralExpression */) { const instantiatedType = tryGetObjectLiteralContextualType(objectLikeContainer, typeChecker3); if (instantiatedType === void 0) { if (objectLikeContainer.flags & 33554432 /* InWithStatement */) { @@ -137787,16 +138045,16 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } } } else { - Debug.assert(objectLikeContainer.kind === 206 /* ObjectBindingPattern */); + Debug.assert(objectLikeContainer.kind === 208 /* 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 === 251 /* ForOfStatement */; - if (!canGetType && rootDeclaration.kind === 168 /* Parameter */) { + let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 253 /* ForOfStatement */; + if (!canGetType && rootDeclaration.kind === 169 /* Parameter */) { if (isExpression(rootDeclaration.parent)) { canGetType = !!typeChecker3.getContextualType(rootDeclaration.parent); - } else if (rootDeclaration.parent.kind === 174 /* MethodDeclaration */ || rootDeclaration.parent.kind === 178 /* SetAccessor */) { + } else if (rootDeclaration.parent.kind === 176 /* MethodDeclaration */ || rootDeclaration.parent.kind === 180 /* SetAccessor */) { canGetType = isExpression(rootDeclaration.parent.parent) && !!typeChecker3.getContextualType(rootDeclaration.parent.parent); } } @@ -137814,7 +138072,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const filteredMembers = filterObjectMembersList(typeMembers, Debug.checkDefined(existingMembers)); symbols = concatenate(symbols, filteredMembers); setSortTextToOptionalMember(); - if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { + if (objectLikeContainer.kind === 212 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { transformObjectLiteralMembersSortText(symbolsStartIndex); collectObjectLiteralMethodSymbols(filteredMembers, objectLikeContainer); } @@ -137830,10 +138088,10 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (!isTypeKeywordTokenOrIdentifier(contextToken)) { keywordFilters = 8 /* TypeKeyword */; } - const { moduleSpecifier } = namedImportsOrExports.kind === 278 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; + const { moduleSpecifier } = namedImportsOrExports.kind === 281 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; if (!moduleSpecifier) { isNewIdentifierLocation = true; - return namedImportsOrExports.kind === 278 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; + return namedImportsOrExports.kind === 281 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; } const moduleSpecifierSymbol = typeChecker3.getSymbolAtLocation(moduleSpecifier); if (!moduleSpecifierSymbol) { @@ -137948,31 +138206,31 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, case 30 /* LessThanSlashToken */: case 43 /* SlashToken */: case 79 /* Identifier */: - case 211 /* PropertyAccessExpression */: - case 295 /* JsxAttributes */: - case 294 /* JsxAttribute */: - case 296 /* JsxSpreadAttribute */: - if (parent2 && (parent2.kind === 288 /* JsxSelfClosingElement */ || parent2.kind === 289 /* JsxOpeningElement */)) { + case 213 /* PropertyAccessExpression */: + case 298 /* JsxAttributes */: + case 297 /* JsxAttribute */: + case 299 /* JsxSpreadAttribute */: + if (parent2 && (parent2.kind === 291 /* JsxSelfClosingElement */ || parent2.kind === 292 /* JsxOpeningElement */)) { if (contextToken2.kind === 31 /* GreaterThanToken */) { const precedingToken = findPrecedingToken(contextToken2.pos, sourceFile, void 0); if (!parent2.typeArguments || precedingToken && precedingToken.kind === 43 /* SlashToken */) break; } return parent2; - } else if (parent2.kind === 294 /* JsxAttribute */) { + } else if (parent2.kind === 297 /* JsxAttribute */) { return parent2.parent.parent; } break; case 10 /* StringLiteral */: - if (parent2 && (parent2.kind === 294 /* JsxAttribute */ || parent2.kind === 296 /* JsxSpreadAttribute */)) { + if (parent2 && (parent2.kind === 297 /* JsxAttribute */ || parent2.kind === 299 /* JsxSpreadAttribute */)) { return parent2.parent.parent; } break; case 19 /* CloseBraceToken */: - if (parent2 && parent2.kind === 297 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 294 /* JsxAttribute */) { + if (parent2 && parent2.kind === 300 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 297 /* JsxAttribute */) { return parent2.parent.parent.parent; } - if (parent2 && parent2.kind === 296 /* JsxSpreadAttribute */) { + if (parent2 && parent2.kind === 299 /* JsxSpreadAttribute */) { return parent2.parent.parent; } break; @@ -137985,34 +138243,34 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const containingNodeKind = parent2.kind; switch (contextToken2.kind) { case 27 /* CommaToken */: - return containingNodeKind === 261 /* VariableDeclaration */ || isVariableDeclarationListButNotTypeArgument(contextToken2) || containingNodeKind === 244 /* VariableStatement */ || containingNodeKind === 269 /* EnumDeclaration */ || isFunctionLikeButNotConstructor(containingNodeKind) || containingNodeKind === 267 /* InterfaceDeclaration */ || containingNodeKind === 207 /* ArrayBindingPattern */ || containingNodeKind === 268 /* TypeAliasDeclaration */ || isClassLike(parent2) && !!parent2.typeParameters && parent2.typeParameters.end >= contextToken2.pos; + return containingNodeKind === 263 /* VariableDeclaration */ || isVariableDeclarationListButNotTypeArgument(contextToken2) || containingNodeKind === 246 /* VariableStatement */ || containingNodeKind === 272 /* EnumDeclaration */ || isFunctionLikeButNotConstructor(containingNodeKind) || containingNodeKind === 270 /* InterfaceDeclaration */ || containingNodeKind === 209 /* ArrayBindingPattern */ || containingNodeKind === 271 /* TypeAliasDeclaration */ || isClassLike(parent2) && !!parent2.typeParameters && parent2.typeParameters.end >= contextToken2.pos; case 24 /* DotToken */: - return containingNodeKind === 207 /* ArrayBindingPattern */; + return containingNodeKind === 209 /* ArrayBindingPattern */; case 58 /* ColonToken */: - return containingNodeKind === 208 /* BindingElement */; + return containingNodeKind === 210 /* BindingElement */; case 22 /* OpenBracketToken */: - return containingNodeKind === 207 /* ArrayBindingPattern */; + return containingNodeKind === 209 /* ArrayBindingPattern */; case 20 /* OpenParenToken */: - return containingNodeKind === 301 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); + return containingNodeKind === 304 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); case 18 /* OpenBraceToken */: - return containingNodeKind === 269 /* EnumDeclaration */; + return containingNodeKind === 272 /* EnumDeclaration */; case 29 /* LessThanToken */: - return containingNodeKind === 264 /* ClassDeclaration */ || containingNodeKind === 232 /* ClassExpression */ || containingNodeKind === 267 /* InterfaceDeclaration */ || containingNodeKind === 268 /* TypeAliasDeclaration */ || isFunctionLikeKind(containingNodeKind); + return containingNodeKind === 266 /* ClassDeclaration */ || containingNodeKind === 234 /* ClassExpression */ || containingNodeKind === 270 /* InterfaceDeclaration */ || containingNodeKind === 271 /* TypeAliasDeclaration */ || isFunctionLikeKind(containingNodeKind); case 125 /* StaticKeyword */: - return containingNodeKind === 171 /* PropertyDeclaration */ && !isClassLike(parent2.parent); + return containingNodeKind === 172 /* PropertyDeclaration */ && !isClassLike(parent2.parent); case 25 /* DotDotDotToken */: - return containingNodeKind === 168 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 207 /* ArrayBindingPattern */; + return containingNodeKind === 169 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 209 /* ArrayBindingPattern */; case 124 /* PublicKeyword */: case 122 /* PrivateKeyword */: case 123 /* ProtectedKeyword */: - return containingNodeKind === 168 /* Parameter */ && !isConstructorDeclaration(parent2.parent); + return containingNodeKind === 169 /* Parameter */ && !isConstructorDeclaration(parent2.parent); case 129 /* AsKeyword */: - return containingNodeKind === 279 /* ImportSpecifier */ || containingNodeKind === 284 /* ExportSpecifier */ || containingNodeKind === 277 /* NamespaceImport */; + return containingNodeKind === 282 /* ImportSpecifier */ || containingNodeKind === 287 /* ExportSpecifier */ || containingNodeKind === 280 /* NamespaceImport */; case 138 /* GetKeyword */: case 152 /* SetKeyword */: return !isFromObjectTypeDeclaration(contextToken2); case 79 /* Identifier */: - if (containingNodeKind === 279 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { + if (containingNodeKind === 282 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { return false; } break; @@ -138028,7 +138286,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, case 139 /* InferKeyword */: return true; case 155 /* TypeKeyword */: - return containingNodeKind !== 279 /* ImportSpecifier */; + return containingNodeKind !== 282 /* ImportSpecifier */; case 41 /* AsteriskToken */: return isFunctionLike(contextToken2.parent) && !isMethodDeclaration(contextToken2.parent); } @@ -138063,7 +138321,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (ancestorClassLike && contextToken2 === previousToken && isPreviousPropertyDeclarationTerminated(contextToken2, position)) { return false; } - const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 171 /* PropertyDeclaration */); + const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 172 /* PropertyDeclaration */); if (ancestorPropertyDeclaraion && contextToken2 !== previousToken && isClassLike(previousToken.parent.parent) && position <= previousToken.end) { if (isPreviousPropertyDeclarationTerminated(contextToken2, previousToken.end)) { return false; @@ -138077,7 +138335,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return contextToken2.kind !== 63 /* EqualsToken */ && (contextToken2.kind === 26 /* SemicolonToken */ || !positionsAreOnSameLine(contextToken2.end, position2, sourceFile)); } function isFunctionLikeButNotConstructor(kind) { - return isFunctionLikeKind(kind) && kind !== 176 /* Constructor */; + return isFunctionLikeKind(kind) && kind !== 178 /* Constructor */; } function isDotOfNumericLiteral(contextToken2) { if (contextToken2.kind === 8 /* NumericLiteral */) { @@ -138087,7 +138345,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return false; } function isVariableDeclarationListButNotTypeArgument(node2) { - return node2.parent.kind === 262 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker3); + return node2.parent.kind === 264 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker3); } function filterObjectMembersList(contextualMemberSymbols, existingMembers) { if (existingMembers.length === 0) { @@ -138096,7 +138354,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const membersDeclaredBySpreadAssignment = new Set2(); const existingMemberNames = new Set2(); for (const m of existingMembers) { - if (m.kind !== 305 /* PropertyAssignment */ && m.kind !== 306 /* ShorthandPropertyAssignment */ && m.kind !== 208 /* BindingElement */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */ && m.kind !== 307 /* SpreadAssignment */) { + if (m.kind !== 308 /* PropertyAssignment */ && m.kind !== 309 /* ShorthandPropertyAssignment */ && m.kind !== 210 /* BindingElement */ && m.kind !== 176 /* MethodDeclaration */ && m.kind !== 179 /* GetAccessor */ && m.kind !== 180 /* SetAccessor */ && m.kind !== 310 /* SpreadAssignment */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -138175,7 +138433,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, function filterClassMembersList(baseSymbols, existingMembers, currentClassElementModifierFlags) { const existingMemberNames = new Set2(); for (const m of existingMembers) { - if (m.kind !== 171 /* PropertyDeclaration */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */) { + if (m.kind !== 172 /* PropertyDeclaration */ && m.kind !== 176 /* MethodDeclaration */ && m.kind !== 179 /* GetAccessor */ && m.kind !== 180 /* SetAccessor */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -138201,7 +138459,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (isCurrentlyEditingNode(attr)) { continue; } - if (attr.kind === 294 /* JsxAttribute */) { + if (attr.kind === 297 /* JsxAttribute */) { seenNames.add(attr.name.escapedText); } else if (isJsxSpreadAttribute(attr)) { setMembersDeclaredBySpreadAssignment(attr, membersDeclaredBySpreadAssignment); @@ -138281,7 +138539,7 @@ function getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind, js var _keywordCompletions = []; var allKeywordsCompletions = memoize(() => { const res = []; - for (let i = 81 /* FirstKeyword */; i <= 164 /* LastKeyword */; i++) { + for (let i = 81 /* FirstKeyword */; i <= 165 /* LastKeyword */; i++) { res.push({ name: tokenToString(i), kind: "keyword" /* keyword */, @@ -138427,7 +138685,7 @@ function getPropertiesForCompletion(type, checker) { } function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) { switch (location.kind) { - case 357 /* SyntaxList */: + case 360 /* SyntaxList */: return tryCast(location.parent, isObjectTypeDeclaration); case 1 /* EndOfFileToken */: const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration); @@ -138486,7 +138744,7 @@ function tryGetTypeLiteralNode(node) { case 26 /* SemicolonToken */: case 27 /* CommaToken */: case 79 /* Identifier */: - if (parent2.kind === 170 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { + if (parent2.kind === 171 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { return parent2.parent; } break; @@ -138503,11 +138761,11 @@ function getConstraintOfTypeArgumentProperty(node, checker) { if (!t) return void 0; switch (node.kind) { - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return checker.getTypeOfPropertyOfContextualType(t, node.symbol.escapedName); - case 193 /* IntersectionType */: - case 187 /* TypeLiteral */: - case 192 /* UnionType */: + case 195 /* IntersectionType */: + case 189 /* TypeLiteral */: + case 194 /* UnionType */: return t; } } @@ -138530,7 +138788,7 @@ function isValidTrigger(sourceFile, triggerCharacter, contextToken, position) { case "/": return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 43 /* SlashToken */ && isJsxClosingElement(contextToken.parent)); case " ": - return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 314 /* SourceFile */; + return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 317 /* SourceFile */; default: return Debug.assertNever(triggerCharacter); } @@ -138626,8 +138884,8 @@ function getSingleLineReplacementSpanForImportCompletionNode(node) { if (rangeIsOnSingleLine(top, sourceFile)) { return createTextSpanFromNode(top, sourceFile); } - Debug.assert(top.kind !== 101 /* ImportKeyword */ && top.kind !== 279 /* ImportSpecifier */); - const potentialSplitPoint = top.kind === 275 /* 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 !== 282 /* ImportSpecifier */); + const potentialSplitPoint = top.kind === 278 /* 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 @@ -138870,26 +139128,26 @@ var StringLiteralCompletionKind = /* @__PURE__ */ ((StringLiteralCompletionKind2 function getStringLiteralCompletionEntries(sourceFile, node, position, typeChecker3, compilerOptions, host, preferences) { const parent2 = walkUpParentheses(node.parent); switch (parent2.kind) { - case 201 /* LiteralType */: { + case 203 /* LiteralType */: { const grandParent = walkUpParentheses(parent2.parent); switch (grandParent.kind) { - case 234 /* ExpressionWithTypeArguments */: - case 183 /* TypeReference */: { + case 236 /* ExpressionWithTypeArguments */: + case 185 /* TypeReference */: { const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent); if (typeArgument) { return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker3.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false }; } return void 0; } - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: const { indexType, objectType } = grandParent; if (!rangeContainsPosition(indexType, position)) { return void 0; } return stringLiteralCompletionsFromProperties(typeChecker3.getTypeFromTypeNode(objectType)); - case 205 /* ImportType */: + case 207 /* ImportType */: return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker3, preferences) }; - case 192 /* UnionType */: { + case 194 /* UnionType */: { if (!isTypeReferenceNode(grandParent.parent)) { return void 0; } @@ -138901,28 +139159,28 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, typeCheck return void 0; } } - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: if (isObjectLiteralExpression(parent2.parent) && parent2.name === node) { return stringLiteralCompletionsForObjectLiteral(typeChecker3, parent2.parent); } return fromContextualType(); - case 212 /* ElementAccessExpression */: { + case 214 /* ElementAccessExpression */: { const { expression, argumentExpression } = parent2; if (node === skipParentheses(argumentExpression)) { return stringLiteralCompletionsFromProperties(typeChecker3.getTypeAtLocation(expression)); } return void 0; } - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 294 /* JsxAttribute */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 297 /* JsxAttribute */: if (!isRequireCallArgument(node) && !isImportCall(parent2)) { - const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 294 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); + const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 297 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker3) || fromContextualType(); } - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: - case 286 /* ExternalModuleReference */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: + case 289 /* ExternalModuleReference */: return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker3, preferences) }; default: return fromContextualType(); @@ -138933,9 +139191,9 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, typeCheck } function walkUpParentheses(node) { switch (node.kind) { - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return walkUpParenthesizedTypes(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return walkUpParenthesizedExpressions(node); default: return node; @@ -139513,14 +139771,14 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { if (cancellationToken) cancellationToken.throwIfCancellationRequested(); switch (direct.kind) { - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (isImportCall(direct)) { handleImportCall(direct); break; } if (!isAvailableThroughGlobal) { const parent2 = direct.parent; - if (exportKind === 2 /* ExportEquals */ && parent2.kind === 261 /* VariableDeclaration */) { + if (exportKind === 2 /* ExportEquals */ && parent2.kind === 263 /* VariableDeclaration */) { const { name } = parent2; if (name.kind === 79 /* Identifier */) { directImports.push(name); @@ -139531,28 +139789,28 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { break; case 79 /* Identifier */: break; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: handleNamespaceImport(direct, direct.name, hasSyntacticModifier(direct, 1 /* Export */), false); break; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: directImports.push(direct); const namedBindings = direct.importClause && direct.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 277 /* NamespaceImport */) { + if (namedBindings && namedBindings.kind === 280 /* NamespaceImport */) { handleNamespaceImport(direct, namedBindings.name, false, true); } else if (!isAvailableThroughGlobal && isDefaultImport(direct)) { addIndirectUser(getSourceFileLikeForImportDeclaration(direct)); } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: if (!direct.exportClause) { handleDirectImports(getContainingModuleSymbol(direct, checker)); - } else if (direct.exportClause.kind === 283 /* NamespaceExport */) { + } else if (direct.exportClause.kind === 286 /* NamespaceExport */) { addIndirectUser(getSourceFileLikeForImportDeclaration(direct), true); } else { directImports.push(direct); } break; - case 205 /* ImportType */: + case 207 /* ImportType */: if (!isAvailableThroughGlobal && direct.isTypeOf && !direct.qualifier && isExported2(direct)) { addIndirectUser(direct.getSourceFile(), true); } @@ -139581,7 +139839,7 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { directImports.push(importDeclaration); } else if (!isAvailableThroughGlobal) { const sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration); - Debug.assert(sourceFileLike.kind === 314 /* SourceFile */ || sourceFileLike.kind === 270 /* ModuleDeclaration */); + Debug.assert(sourceFileLike.kind === 317 /* SourceFile */ || sourceFileLike.kind === 273 /* ModuleDeclaration */); if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) { addIndirectUser(sourceFileLike, true); } else { @@ -139627,7 +139885,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c } return { importSearches, singleReferences }; function handleImport(decl) { - if (decl.kind === 274 /* ImportEqualsDeclaration */) { + if (decl.kind === 277 /* ImportEqualsDeclaration */) { if (isExternalModuleImportEquals(decl)) { handleNamespaceImportLike(decl.name); } @@ -139637,7 +139895,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c handleNamespaceImportLike(decl); return; } - if (decl.kind === 205 /* ImportType */) { + if (decl.kind === 207 /* ImportType */) { if (decl.qualifier) { const firstIdentifier = getFirstIdentifier(decl.qualifier); if (firstIdentifier.escapedText === symbolName(exportSymbol)) { @@ -139651,7 +139909,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c if (decl.moduleSpecifier.kind !== 10 /* StringLiteral */) { return; } - if (decl.kind === 281 /* ExportDeclaration */) { + if (decl.kind === 284 /* ExportDeclaration */) { if (decl.exportClause && isNamedExports(decl.exportClause)) { searchForNamedImport(decl.exportClause); } @@ -139660,10 +139918,10 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c const { name, namedBindings } = decl.importClause || { name: void 0, namedBindings: void 0 }; if (namedBindings) { switch (namedBindings.kind) { - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: handleNamespaceImportLike(namedBindings.name); break; - case 278 /* NamedImports */: + case 281 /* NamedImports */: if (exportKind === 0 /* Named */ || exportKind === 1 /* Default */) { searchForNamedImport(namedBindings); } @@ -139697,7 +139955,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c addSearch(name, checker.getSymbolAtLocation(name)); } } else { - const localSymbol = element.kind === 284 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); + const localSymbol = element.kind === 287 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); addSearch(name, localSymbol); } } @@ -139720,7 +139978,7 @@ function findModuleReferences(program, sourceFiles, searchModuleSymbol) { const checker = program.getTypeChecker(); for (const referencingFile of sourceFiles) { const searchSourceFile = searchModuleSymbol.valueDeclaration; - if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 314 /* SourceFile */) { + if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 317 /* SourceFile */) { for (const ref of referencingFile.referencedFiles) { if (program.getSourceFileFromReference(referencingFile, ref) === searchSourceFile) { refs.push({ kind: "reference", referencingFile, ref }); @@ -139762,7 +140020,7 @@ function getDirectImportsMap(sourceFiles, checker, cancellationToken) { return map2; } function forEachPossibleImportOrExportStatement(sourceFileLike, action) { - return forEach(sourceFileLike.kind === 314 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action)); + return forEach(sourceFileLike.kind === 317 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action)); } function forEachImport(sourceFile, action) { if (sourceFile.externalModuleIndicator || sourceFile.imports !== void 0) { @@ -139772,15 +140030,15 @@ function forEachImport(sourceFile, action) { } else { forEachPossibleImportOrExportStatement(sourceFile, (statement) => { switch (statement.kind) { - case 281 /* ExportDeclaration */: - case 275 /* ImportDeclaration */: { + case 284 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: { const decl = statement; if (decl.moduleSpecifier && isStringLiteral(decl.moduleSpecifier)) { action(decl, decl.moduleSpecifier); } break; } - case 274 /* ImportEqualsDeclaration */: { + case 277 /* ImportEqualsDeclaration */: { const decl = statement; if (isExternalModuleImportEquals(decl)) { action(decl, decl.moduleReference.expression); @@ -139798,7 +140056,7 @@ function getImportOrExportSymbol(node, symbol, checker, comingFromExport) { const { parent: parent2 } = node; const grandparent = parent2.parent; if (symbol.exportSymbol) { - if (parent2.kind === 211 /* PropertyAccessExpression */) { + if (parent2.kind === 213 /* PropertyAccessExpression */) { return ((_a2 = symbol.declarations) == null ? void 0 : _a2.some((d) => d === parent2)) && isBinaryExpression(grandparent) ? getSpecialPropertyExport(grandparent, false) : void 0; } else { return exportInfo(symbol.exportSymbol, getExportKindForDeclaration(parent2)); @@ -139902,15 +140160,15 @@ function getExportNode(parent2, node) { function isNodeImport(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return parent2.name === node && isExternalModuleImportEquals(parent2); - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return !parent2.propertyName; - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: Debug.assert(parent2.name === node); return true; - case 208 /* BindingElement */: + case 210 /* BindingElement */: return isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(parent2.parent.parent); default: return false; @@ -139941,21 +140199,21 @@ function getContainingModuleSymbol(importer, checker) { return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol); } function getSourceFileLikeForImportDeclaration(node) { - if (node.kind === 213 /* CallExpression */) { + if (node.kind === 215 /* CallExpression */) { return node.getSourceFile(); } const { parent: parent2 } = node; - if (parent2.kind === 314 /* SourceFile */) { + if (parent2.kind === 317 /* SourceFile */) { return parent2; } - Debug.assert(parent2.kind === 271 /* ModuleBlock */); + Debug.assert(parent2.kind === 274 /* ModuleBlock */); return cast(parent2.parent, isAmbientModuleDeclaration); } function isAmbientModuleDeclaration(node) { - return node.kind === 270 /* ModuleDeclaration */ && node.name.kind === 10 /* StringLiteral */; + return node.kind === 273 /* ModuleDeclaration */ && node.name.kind === 10 /* StringLiteral */; } function isExternalModuleImportEquals(eq) { - return eq.moduleReference.kind === 286 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 10 /* StringLiteral */; + return eq.moduleReference.kind === 289 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 10 /* StringLiteral */; } // src/services/findAllReferences.ts @@ -140025,28 +140283,28 @@ function getContextNode(node) { if (!node) return void 0; switch (node.kind) { - case 261 /* VariableDeclaration */: + case 263 /* 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 208 /* BindingElement */: + case 210 /* BindingElement */: return getContextNode(node.parent.parent); - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return node.parent.parent.parent; - case 284 /* ExportSpecifier */: - case 277 /* NamespaceImport */: + case 287 /* ExportSpecifier */: + case 280 /* NamespaceImport */: return node.parent.parent; - case 276 /* ImportClause */: - case 283 /* NamespaceExport */: + case 279 /* ImportClause */: + case 286 /* NamespaceExport */: return node.parent; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isExpressionStatement(node.parent) ? node.parent : node; - case 251 /* ForOfStatement */: - case 250 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 252 /* ForInStatement */: return { start: node.initializer, end: node.expression }; - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent) ? getContextNode( findAncestor( node.parent, @@ -140088,7 +140346,7 @@ function getImplementationsAtPosition(program, cancellationToken, sourceFiles, s const node = getTouchingPropertyName(sourceFile, position); let referenceEntries; const entries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position); - if (node.parent.kind === 211 /* PropertyAccessExpression */ || node.parent.kind === 208 /* BindingElement */ || node.parent.kind === 212 /* ElementAccessExpression */ || node.kind === 107 /* SuperKeyword */) { + if (node.parent.kind === 213 /* PropertyAccessExpression */ || node.parent.kind === 210 /* BindingElement */ || node.parent.kind === 214 /* ElementAccessExpression */ || node.kind === 107 /* SuperKeyword */) { referenceEntries = entries && [...entries]; } else if (entries) { const queue = createQueue(entries); @@ -140109,11 +140367,11 @@ function getImplementationsAtPosition(program, cancellationToken, sourceFiles, s return map(referenceEntries, (entry) => toImplementationLocation(entry, checker)); } function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { return void 0; } const checker = program.getTypeChecker(); - if (node.parent.kind === 306 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 309 /* ShorthandPropertyAssignment */) { const result = []; Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, (node2) => result.push(nodeEntry(node2))); return result; @@ -140304,12 +140562,12 @@ function implementationKindDisplayParts(node, checker) { const symbol = checker.getSymbolAtLocation(isDeclaration(node) && node.name ? node.name : node); if (symbol) { return getDefinitionKindAndDisplayParts(symbol, checker, node); - } else if (node.kind === 210 /* ObjectLiteralExpression */) { + } else if (node.kind === 212 /* ObjectLiteralExpression */) { return { kind: "interface" /* interfaceElement */, displayParts: [punctuationPart(20 /* OpenParenToken */), textPart("object literal"), punctuationPart(21 /* CloseParenToken */)] }; - } else if (node.kind === 232 /* ClassExpression */) { + } else if (node.kind === 234 /* ClassExpression */) { return { kind: "local class" /* localClassElement */, displayParts: [punctuationPart(20 /* OpenParenToken */), textPart("anonymous local class"), punctuationPart(21 /* CloseParenToken */)] @@ -140367,47 +140625,47 @@ function declarationIsWriteAccess(decl) { if (!!(decl.flags & 16777216 /* Ambient */)) return true; switch (decl.kind) { - case 227 /* BinaryExpression */: - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: + case 229 /* BinaryExpression */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: case 89 /* DefaultKeyword */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: - case 284 /* ExportSpecifier */: - case 276 /* ImportClause */: - case 274 /* ImportEqualsDeclaration */: - case 279 /* ImportSpecifier */: - case 267 /* InterfaceDeclaration */: - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: - case 294 /* JsxAttribute */: - case 270 /* ModuleDeclaration */: - case 273 /* NamespaceExportDeclaration */: - case 277 /* NamespaceImport */: - case 283 /* NamespaceExport */: - case 168 /* Parameter */: - case 306 /* ShorthandPropertyAssignment */: - case 268 /* TypeAliasDeclaration */: - case 167 /* TypeParameter */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: + case 287 /* ExportSpecifier */: + case 279 /* ImportClause */: + case 277 /* ImportEqualsDeclaration */: + case 282 /* ImportSpecifier */: + case 270 /* InterfaceDeclaration */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: + case 297 /* JsxAttribute */: + case 273 /* ModuleDeclaration */: + case 276 /* NamespaceExportDeclaration */: + case 280 /* NamespaceImport */: + case 286 /* NamespaceExport */: + case 169 /* Parameter */: + case 309 /* ShorthandPropertyAssignment */: + case 271 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: return true; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return !isArrayLiteralOrObjectLiteralDestructuringPattern(decl.parent); - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return !!decl.body; - case 261 /* VariableDeclaration */: - case 171 /* PropertyDeclaration */: + case 263 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: return !!decl.initializer || isCatchClause(decl.parent); - case 173 /* MethodSignature */: - case 170 /* PropertySignature */: - case 356 /* JSDocPropertyTag */: - case 349 /* JSDocParameterTag */: + case 175 /* MethodSignature */: + case 171 /* PropertySignature */: + case 359 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: return false; default: return Debug.failBadSyntaxKind(decl); @@ -140596,9 +140854,9 @@ var Core; if (symbol.declarations) { for (const decl of symbol.declarations) { switch (decl.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: if (sourceFilesSet.has(decl.getSourceFile().fileName)) { references.push(nodeEntry(decl.name)); } @@ -140688,7 +140946,7 @@ var Core; } function getSpecialSearchKind(node) { switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: case 136 /* ConstructorKeyword */: return SpecialSearchKind.Constructor; case 79 /* Identifier */: @@ -140864,7 +141122,7 @@ var Core; } function getSymbolScope(symbol) { const { declarations, flags, parent: parent2, valueDeclaration } = symbol; - if (valueDeclaration && (valueDeclaration.kind === 218 /* FunctionExpression */ || valueDeclaration.kind === 232 /* ClassExpression */)) { + if (valueDeclaration && (valueDeclaration.kind === 220 /* FunctionExpression */ || valueDeclaration.kind === 234 /* ClassExpression */)) { return valueDeclaration; } if (!declarations) { @@ -140873,7 +141131,7 @@ var Core; if (flags & (4 /* Property */ | 8192 /* Method */)) { const privateDeclaration = find(declarations, (d) => hasEffectiveModifier(d, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(d)); if (privateDeclaration) { - return getAncestor(privateDeclaration, 264 /* ClassDeclaration */); + return getAncestor(privateDeclaration, 266 /* ClassDeclaration */); } return void 0; } @@ -140890,7 +141148,7 @@ var Core; if (scope && scope !== container) { return void 0; } - if (!container || container.kind === 314 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { + if (!container || container.kind === 317 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { return void 0; } scope = container; @@ -141097,7 +141355,7 @@ var Core; default: Debug.assertNever(state.specialSearchKind); } - if (isInJSFile(referenceLocation) && referenceLocation.parent.kind === 208 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(referenceLocation.parent.parent.parent)) { + if (isInJSFile(referenceLocation) && referenceLocation.parent.kind === 210 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(referenceLocation.parent.parent.parent)) { referenceSymbol = referenceLocation.parent.symbol; if (!referenceSymbol) return; @@ -141234,14 +141492,14 @@ var Core; if (constructorSymbol && constructorSymbol.declarations) { for (const decl of constructorSymbol.declarations) { const ctrKeyword = findChildOfKind(decl, 136 /* ConstructorKeyword */, sourceFile); - Debug.assert(decl.kind === 176 /* Constructor */ && !!ctrKeyword); + Debug.assert(decl.kind === 178 /* Constructor */ && !!ctrKeyword); addNode(ctrKeyword); } } if (classSymbol.exports) { classSymbol.exports.forEach((member) => { const decl = member.valueDeclaration; - if (decl && decl.kind === 174 /* MethodDeclaration */) { + if (decl && decl.kind === 176 /* MethodDeclaration */) { const body = decl.body; if (body) { forEachDescendantOfKind(body, 109 /* ThisKeyword */, (thisKeyword) => { @@ -141263,7 +141521,7 @@ var Core; return; } for (const decl of constructor.declarations) { - Debug.assert(decl.kind === 176 /* Constructor */); + Debug.assert(decl.kind === 178 /* Constructor */); const body = decl.body; if (body) { forEachDescendantOfKind(body, 107 /* SuperKeyword */, (node) => { @@ -141292,7 +141550,7 @@ var Core; if (refNode.kind !== 79 /* Identifier */) { return; } - if (refNode.parent.kind === 306 /* ShorthandPropertyAssignment */) { + if (refNode.parent.kind === 309 /* ShorthandPropertyAssignment */) { getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference2); } const containingClass = getContainingClassIfInHeritageClause(refNode); @@ -141307,7 +141565,7 @@ var Core; addIfImplementation(typeHavingNode.initializer); } else if (isFunctionLike(typeHavingNode) && typeHavingNode.body) { const body = typeHavingNode.body; - if (body.kind === 242 /* Block */) { + if (body.kind === 244 /* Block */) { forEachReturnStatement(body, (returnStatement) => { if (returnStatement.expression) addIfImplementation(returnStatement.expression); @@ -141329,13 +141587,13 @@ var Core; } function isImplementationExpression(node) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return isImplementationExpression(node.expression); - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 210 /* ObjectLiteralExpression */: - case 232 /* ClassExpression */: - case 209 /* ArrayLiteralExpression */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 212 /* ObjectLiteralExpression */: + case 234 /* ClassExpression */: + case 211 /* ArrayLiteralExpression */: return true; default: return false; @@ -141365,13 +141623,13 @@ var Core; } let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; @@ -141389,38 +141647,38 @@ var Core; return [{ definition: { type: 0 /* Symbol */, symbol: searchSpaceNode.symbol }, references }]; } function isParameterName(node) { - return node.kind === 79 /* Identifier */ && node.parent.kind === 168 /* Parameter */ && node.parent.name === node; + return node.kind === 79 /* Identifier */ && node.parent.kind === 169 /* Parameter */ && node.parent.name === node; } function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) { let searchSpaceNode = getThisContainer(thisOrSuperKeyword, false); let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: if (isObjectLiteralMethod(searchSpaceNode)) { staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; } - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (isExternalModule(searchSpaceNode) || isParameterName(thisOrSuperKeyword)) { return void 0; } - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: break; default: return void 0; } - const references = flatMap(searchSpaceNode.kind === 314 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { + const references = flatMap(searchSpaceNode.kind === 317 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { cancellationToken.throwIfCancellationRequested(); return getPossibleSymbolReferenceNodes(sourceFile, "this", isSourceFile(searchSpaceNode) ? sourceFile : searchSpaceNode).filter((node) => { if (!isThis(node)) { @@ -141428,19 +141686,19 @@ var Core; } const container = getThisContainer(node, false); switch (searchSpaceNode.kind) { - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: return searchSpaceNode.symbol === container.symbol; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol; - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 265 /* StructDeclaration */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 212 /* ObjectLiteralExpression */: + case 267 /* StructDeclaration */: return container.parent && searchSpaceNode.symbol === container.parent.symbol && isStatic(container) === !!staticFlag; - case 314 /* SourceFile */: - return container.kind === 314 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); + case 317 /* SourceFile */: + return container.kind === 317 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); } }); }).map((n) => nodeEntry(n)); @@ -141528,7 +141786,7 @@ var Core; 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, 284 /* ExportSpecifier */); + const exportSpecifier = getDeclarationOfKind(symbol, 287 /* ExportSpecifier */); if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) { const localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); if (localSymbol) { @@ -141556,7 +141814,7 @@ var Core; return firstDefined(checker.getRootSymbols(sym), (rootSymbol) => cbSymbol(sym, rootSymbol, void 0, kind) || (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, 208 /* BindingElement */); + const bindingElement = getDeclarationOfKind(symbol2, 210 /* BindingElement */); if (bindingElement && isObjectBindingElementWithoutPropertyName(bindingElement)) { return getPropertySymbolFromBindingElement(checker2, bindingElement); } @@ -141734,9 +141992,9 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles } if (searchOtherFilesOnly && every(symbol.declarations, (d) => d.getSourceFile().fileName === sourceFile.fileName)) return void 0; - if (parent2.kind === 213 /* CallExpression */ || parent2.kind === 220 /* EtsComponentExpression */ && isCalledStructDeclaration(symbol.getDeclarations())) { + if (parent2.kind === 215 /* CallExpression */ || parent2.kind === 222 /* EtsComponentExpression */ && isCalledStructDeclaration(symbol.getDeclarations())) { const declarations = symbol.getDeclarations(); - if ((declarations == null ? void 0 : declarations.length) && declarations[0].kind === 265 /* StructDeclaration */) { + if ((declarations == null ? void 0 : declarations.length) && declarations[0].kind === 267 /* StructDeclaration */) { return getDefinitionFromSymbol(typeChecker3, symbol, node); } } @@ -141756,7 +142014,7 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles return node.kind === 107 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo]; } } - if (node.parent.kind === 306 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 309 /* ShorthandPropertyAssignment */) { const shorthandSymbol = typeChecker3.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); const definitions = (shorthandSymbol == null ? void 0 : shorthandSymbol.declarations) ? shorthandSymbol.declarations.map((decl) => createDefinitionInfo(decl, typeChecker3, shorthandSymbol, node, false, failedAliasResolution)) : emptyArray; return concatenate(definitions, getDefinitionFromObjectLiteralElement(typeChecker3, node) || emptyArray); @@ -141904,7 +142162,7 @@ function shouldSkipAlias(node, declaration) { if (node.parent === declaration) { return true; } - if (declaration.kind === 277 /* NamespaceImport */) { + if (declaration.kind === 280 /* NamespaceImport */) { return false; } return true; @@ -141982,19 +142240,19 @@ function isDefinitionVisible(checker, declaration) { if (hasInitializer(declaration.parent) && declaration.parent.initializer === declaration) return isDefinitionVisible(checker, declaration.parent); switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: if (hasEffectiveModifier(declaration, 8 /* Private */)) return false; - case 176 /* Constructor */: - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 210 /* ObjectLiteralExpression */: - case 232 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: + case 178 /* Constructor */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 212 /* ObjectLiteralExpression */: + case 234 /* ClassExpression */: + case 221 /* ArrowFunction */: + case 220 /* FunctionExpression */: return isDefinitionVisible(checker, declaration.parent); default: return false; @@ -142029,9 +142287,9 @@ function tryGetSignatureDeclaration(typeChecker3, node) { } function isConstructorLike(node) { switch (node.kind) { - case 176 /* Constructor */: - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 178 /* Constructor */: + case 187 /* ConstructorType */: + case 182 /* ConstructSignature */: return true; default: return false; @@ -142068,14 +142326,14 @@ function provideInlayHints(context) { return; } switch (node.kind) { - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 219 /* ArrowFunction */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 221 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!textSpanIntersectsWith(span, node.pos, node.getFullWidth())) { @@ -142215,7 +142473,7 @@ function provideInlayHints(context) { } function isHintableLiteral(node) { switch (node.kind) { - case 225 /* PrefixUnaryExpression */: { + case 227 /* PrefixUnaryExpression */: { const operand = node.operand; return isLiteralExpression(operand) || isIdentifier(operand) && isInfinityOrNaNString(operand.escapedText); } @@ -142223,7 +142481,7 @@ function provideInlayHints(context) { case 96 /* FalseKeyword */: case 105 /* NullKeyword */: case 14 /* NoSubstitutionTemplateLiteral */: - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: return true; case 79 /* Identifier */: { const name = node.escapedText; @@ -142423,8 +142681,8 @@ function getJsDocCommentsFromDeclarations(declarations, checker) { const parts = []; forEachUnique(declarations, (declaration) => { for (const jsdoc of getCommentHavingNodes(declaration)) { - const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 336 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); - if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 354 /* JSDocTypedefTag */ && declaration.kind !== 347 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 354 /* JSDocTypedefTag */ || t.kind === 347 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 349 /* JSDocParameterTag */ || t.kind === 350 /* JSDocReturnTag */)) { + const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 339 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); + if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 357 /* JSDocTypedefTag */ && declaration.kind !== 350 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 357 /* JSDocTypedefTag */ || t.kind === 350 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 352 /* JSDocParameterTag */ || t.kind === 353 /* JSDocReturnTag */)) { continue; } let newparts = jsdoc.comment ? getDisplayPartsFromComment(jsdoc.comment, checker) : []; @@ -142443,11 +142701,11 @@ function isIdenticalListOfDisplayParts(parts1, parts2) { } function getCommentHavingNodes(declaration) { switch (declaration.kind) { - case 349 /* JSDocParameterTag */: - case 356 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: + case 359 /* JSDocPropertyTag */: return [declaration]; - case 347 /* JSDocCallbackTag */: - case 354 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: return [declaration, declaration.parent]; default: return getJSDocCommentsAndTags(declaration); @@ -142457,7 +142715,7 @@ function getJsDocTagsFromDeclarations(declarations, checker) { const infos = []; forEachUnique(declarations, (declaration) => { const tags = getJSDocTags(declaration); - if (tags.some((t) => t.kind === 354 /* JSDocTypedefTag */ || t.kind === 347 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 349 /* JSDocParameterTag */ || t.kind === 350 /* JSDocReturnTag */)) { + if (tags.some((t) => t.kind === 357 /* JSDocTypedefTag */ || t.kind === 350 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 352 /* JSDocParameterTag */ || t.kind === 353 /* JSDocReturnTag */)) { return; } for (const tag of tags) { @@ -142472,18 +142730,18 @@ function getDisplayPartsFromComment(comment, checker) { } return flatMap( comment, - (node) => node.kind === 330 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) + (node) => node.kind === 333 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) ); } function getCommentDisplayParts(tag, checker) { const { comment, kind } = tag; const namePart = getTagNameDisplayPart(kind); switch (kind) { - case 338 /* JSDocImplementsTag */: + case 341 /* JSDocImplementsTag */: return withNode(tag.class); - case 337 /* JSDocAugmentsTag */: + case 340 /* JSDocAugmentsTag */: return withNode(tag.class); - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: const templateTag = tag; const displayParts = []; if (templateTag.constraint) { @@ -142505,13 +142763,13 @@ function getCommentDisplayParts(tag, checker) { displayParts.push(...[spacePart(), ...getDisplayPartsFromComment(comment, checker)]); } return displayParts; - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: return withNode(tag.typeExpression); - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 356 /* JSDocPropertyTag */: - case 349 /* JSDocParameterTag */: - case 355 /* JSDocSeeTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 359 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: + case 358 /* JSDocSeeTag */: const { name } = tag; return name ? withNode(name) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); default: @@ -142534,14 +142792,14 @@ function getCommentDisplayParts(tag, checker) { } function getTagNameDisplayPart(kind) { switch (kind) { - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: return parameterNamePart; - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: return propertyNamePart; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return typeParameterNamePart; - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: return typeAliasNamePart; default: return textPart; @@ -142666,47 +142924,47 @@ function getCommentOwnerInfo(tokenAtPos, options) { } function getCommentOwnerInfoWorker(commentOwner, options) { switch (commentOwner.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 173 /* MethodSignature */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 175 /* MethodSignature */: + case 221 /* ArrowFunction */: const host = commentOwner; return { commentOwner, parameters: host.parameters, hasReturn: hasReturn(host, options) }; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return getCommentOwnerInfoWorker(commentOwner.initializer, options); - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: - case 268 /* TypeAliasDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: + case 271 /* TypeAliasDeclaration */: return { commentOwner }; - case 170 /* PropertySignature */: { + case 171 /* PropertySignature */: { const host2 = commentOwner; return host2.type && isFunctionTypeNode(host2.type) ? { commentOwner, parameters: host2.type.parameters, hasReturn: hasReturn(host2.type, options) } : { commentOwner }; } - case 244 /* VariableStatement */: { + case 246 /* 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 314 /* SourceFile */: + case 317 /* SourceFile */: return "quit"; - case 270 /* ModuleDeclaration */: - return commentOwner.parent.kind === 270 /* ModuleDeclaration */ ? void 0 : { commentOwner }; - case 245 /* ExpressionStatement */: + case 273 /* ModuleDeclaration */: + return commentOwner.parent.kind === 273 /* ModuleDeclaration */ ? void 0 : { commentOwner }; + case 247 /* ExpressionStatement */: return getCommentOwnerInfoWorker(commentOwner.expression, options); - case 227 /* BinaryExpression */: { + case 229 /* 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 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: const init = commentOwner.initializer; if (init && (isFunctionExpression(init) || isArrowFunction(init))) { return { commentOwner, parameters: init.parameters, hasReturn: hasReturn(init, options) }; @@ -142717,14 +142975,14 @@ function hasReturn(node, options) { 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 === 217 /* ParenthesizedExpression */) { + while (rightHandSide.kind === 219 /* ParenthesizedExpression */) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return rightHandSide; - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return find(rightHandSide.members, isConstructorDeclaration); } } @@ -143048,11 +143306,11 @@ function compareIdentifiers(s1, s2) { function getModuleSpecifierExpression(declaration) { var _a2; switch (declaration.kind) { - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return (_a2 = tryCast(declaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a2.expression; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return declaration.moduleSpecifier; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return declaration.declarationList.declarations[0].initializer.arguments[0]; } } @@ -143079,19 +143337,19 @@ function compareImportKind(s1, s2) { function getImportKindOrder(s1) { var _a2; switch (s1.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: if (!s1.importClause) return 0; if (s1.importClause.isTypeOnly) return 1; - if (((_a2 = s1.importClause.namedBindings) == null ? void 0 : _a2.kind) === 277 /* NamespaceImport */) + if (((_a2 = s1.importClause.namedBindings) == null ? void 0 : _a2.kind) === 280 /* NamespaceImport */) return 2; if (s1.importClause.name) return 3; return 4; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return 5; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return 6; } } @@ -143265,21 +143523,21 @@ function createOutliningSpanFromBounds(pos, end, kind) { } function getOutliningSpanForNode(n, sourceFile) { switch (n.kind) { - case 242 /* Block */: + case 244 /* Block */: if (isFunctionLike(n.parent)) { return functionSpan(n.parent, n, sourceFile); } switch (n.parent.kind) { - case 247 /* DoStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 249 /* ForStatement */: - case 246 /* IfStatement */: - case 248 /* WhileStatement */: - case 255 /* WithStatement */: - case 301 /* CatchClause */: + case 249 /* DoStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 251 /* ForStatement */: + case 248 /* IfStatement */: + case 250 /* WhileStatement */: + case 257 /* WithStatement */: + case 304 /* CatchClause */: return spanForNode(n.parent); - case 259 /* TryStatement */: + case 261 /* TryStatement */: const tryStatement = n.parent; if (tryStatement.tryBlock === n) { return spanForNode(n.parent); @@ -143291,43 +143549,43 @@ function getOutliningSpanForNode(n, sourceFile) { default: return createOutliningSpan(createTextSpanFromNode(n, sourceFile), "code" /* Code */); } - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return spanForNode(n.parent); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 272 /* CaseBlock */: - case 187 /* TypeLiteral */: - case 206 /* ObjectBindingPattern */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 275 /* CaseBlock */: + case 189 /* TypeLiteral */: + case 208 /* ObjectBindingPattern */: return spanForNode(n); - case 189 /* TupleType */: + case 191 /* TupleType */: return spanForNode(n, false, !isTupleTypeNode(n.parent), 22 /* OpenBracketToken */); - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: return spanForNodeArray(n.statements); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return spanForObjectOrArrayLiteral(n); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return spanForObjectOrArrayLiteral(n, 22 /* OpenBracketToken */); - case 287 /* JsxElement */: + case 290 /* JsxElement */: return spanForJSXElement(n); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return spanForJSXFragment(n); - case 288 /* JsxSelfClosingElement */: - case 289 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: return spanForJSXAttributes(n.attributes); - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: case 14 /* NoSubstitutionTemplateLiteral */: return spanForTemplateLiteral(n); - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: return spanForNode(n, false, !isBindingElement(n.parent), 22 /* OpenBracketToken */); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return spanForArrowFunction(n); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return spanForCallExpression(n); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return spanForParenthesizedExpression(n); } function spanForCallExpression(node) { @@ -143392,7 +143650,7 @@ function getOutliningSpanForNode(n, sourceFile) { function functionSpan(node, body, sourceFile) { const openToken = tryGetFunctionOpenToken(node, body, sourceFile); const closeToken = findChildOfKind(body, 19 /* CloseBraceToken */, sourceFile); - return openToken && closeToken && spanBetweenTokens(openToken, closeToken, node, sourceFile, node.kind !== 219 /* ArrowFunction */); + return openToken && closeToken && spanBetweenTokens(openToken, closeToken, node, sourceFile, node.kind !== 221 /* ArrowFunction */); } function spanBetweenTokens(openToken, closeToken, hintSpanNode, sourceFile, autoCollapse = false, useFullStart = true) { const textSpan = createTextSpanFromBounds(useFullStart ? openToken.getFullStart() : openToken.getStart(sourceFile), closeToken.getEnd()); @@ -143506,18 +143764,18 @@ function getInfo19(context, considerPartialSpans = true) { } const noSymbolError = (id) => isIdentifier(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) }; switch (exportNode.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 270 /* ModuleDeclaration */: { + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 273 /* ModuleDeclaration */: { const node = exportNode; if (!node.name) return void 0; return noSymbolError(node.name) || { exportNode: node, exportName: node.name, wasDefault, exportingModuleSymbol }; } - case 244 /* VariableStatement */: { + case 246 /* VariableStatement */: { const vs = exportNode; if (!(vs.declarationList.flags & 2 /* Const */) || vs.declarationList.declarations.length !== 1) { return void 0; @@ -143528,7 +143786,7 @@ function getInfo19(context, considerPartialSpans = true) { Debug.assert(!wasDefault, "Can't have a default flag here"); return noSymbolError(decl.name) || { exportNode: vs, exportName: decl.name, wasDefault, exportingModuleSymbol }; } - case 280 /* ExportAssignment */: { + case 283 /* ExportAssignment */: { const node = exportNode; if (node.isExportEquals) return void 0; @@ -143554,20 +143812,20 @@ function changeExport(exportingSourceFile, { wasDefault, exportNode, exportName } else { const exportKeyword = Debug.checkDefined(findModifier(exportNode, 94 /* ExportKeyword */), "Should find an export keyword in modifier list"); switch (exportNode.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: changes.insertNodeAfter(exportingSourceFile, exportKeyword, factory.createToken(89 /* DefaultKeyword */)); break; - case 244 /* VariableStatement */: + case 246 /* 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 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 270 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 273 /* ModuleDeclaration */: changes.deleteModifier(exportingSourceFile, exportKeyword); changes.insertNodeAfter(exportingSourceFile, exportNode, factory.createExportDefault(factory.createIdentifier(exportName.text))); break; @@ -143593,23 +143851,23 @@ function changeImports(program, { wasDefault, exportName, exportingModuleSymbol function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportName) { const { parent: parent2 } = ref; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier(exportName)); break; - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: { + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: { const spec = parent2; changes.replaceNode(importingSourceFile, spec, makeImportSpecifier2(exportName, spec.name.text)); break; } - case 276 /* ImportClause */: { + case 279 /* 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 === 277 /* NamespaceImport */) { + } else if (namedBindings.kind === 280 /* 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(void 0, [makeImportSpecifier2(exportName, ref.text)], clause.parent.moduleSpecifier, quotePreference); @@ -143620,7 +143878,7 @@ function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportNam } break; } - case 205 /* ImportType */: + case 207 /* ImportType */: const importTypeNode = parent2; changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.assertions, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf)); break; @@ -143631,10 +143889,10 @@ function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportNam function changeNamedToDefaultImport(importingSourceFile, ref, changes) { const parent2 = ref.parent; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier("default")); break; - case 279 /* ImportSpecifier */: { + case 282 /* ImportSpecifier */: { const defaultImport = factory.createIdentifier(parent2.name.text); if (parent2.parent.elements.length === 1) { changes.replaceNode(importingSourceFile, parent2.parent, defaultImport); @@ -143644,7 +143902,7 @@ function changeNamedToDefaultImport(importingSourceFile, ref, changes) { } break; } - case 284 /* ExportSpecifier */: { + case 287 /* ExportSpecifier */: { changes.replaceNode(importingSourceFile, parent2, makeExportSpecifier("default", parent2.name.text)); break; } @@ -143734,7 +143992,7 @@ function getImportConversionInfo(context, considerPartialSpans = true) { if (!importClause.namedBindings) { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_namespace_import_or_named_imports) }; } - if (importClause.namedBindings.kind === 277 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 280 /* NamespaceImport */) { return { convertTo: 0 /* Named */, import: importClause.namedBindings }; } const shouldUseDefault = getShouldUseDefault(context.program, importClause); @@ -144155,11 +144413,11 @@ function isAllowedStatementToMove(statement) { } function isPureImport(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return true; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return !hasSyntacticModifier(node, 1 /* Export */); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return node.declarationList.declarations.every((d) => !!d.initializer && isRequireCall(d.initializer, true)); default: return false; @@ -144248,11 +144506,11 @@ function updateImportsInOtherFiles(changes, program, oldFile, movedSymbols, newM } function getNamespaceLikeImport(node) { switch (node.kind) { - case 275 /* ImportDeclaration */: - return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 277 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; - case 274 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 280 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; + case 277 /* ImportEqualsDeclaration */: return node.name; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return tryCast(node.name, isIdentifier); default: return Debug.assertNever(node, `Unexpected node kind ${node.kind}`); @@ -144282,23 +144540,23 @@ function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifie const newNamespaceId = factory.createIdentifier(newNamespaceName); const newModuleString = factory.createStringLiteral(newModuleSpecifier); switch (node.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return factory.createImportDeclaration( void 0, factory.createImportClause(false, void 0, factory.createNamespaceImport(newNamespaceId)), newModuleString, void 0 ); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return factory.createImportEqualsDeclaration(void 0, false, newNamespaceId, factory.createExternalModuleReference(newModuleString)); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return factory.createVariableDeclaration(newNamespaceId, void 0, void 0, createRequireCall(newModuleString)); default: return Debug.assertNever(node, `Unexpected node kind ${node.kind}`); } } function moduleSpecifierFromImport(i) { - return i.kind === 275 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 274 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; + return i.kind === 278 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 277 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; } function forEachImportInStatement(statement, cb) { if (isImportDeclaration(statement)) { @@ -144357,15 +144615,15 @@ function addExports(sourceFile, toMove, needExport, useEs6Exports) { } function deleteUnusedImports(sourceFile, importDecl, changes, isUnused) { switch (importDecl.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused); break; - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: if (isUnused(importDecl.name)) { changes.delete(sourceFile, importDecl); } break; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused); break; default: @@ -144377,7 +144635,7 @@ function deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnu return; const { name, namedBindings } = importDecl.importClause; const defaultUnused = !name || isUnused(name); - const namedBindingsUnused = !namedBindings || (namedBindings.kind === 277 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); + const namedBindingsUnused = !namedBindings || (namedBindings.kind === 280 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); if (defaultUnused && namedBindingsUnused) { changes.delete(sourceFile, importDecl); } else { @@ -144391,7 +144649,7 @@ function deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnu importDecl.importClause, factory.updateImportClause(importDecl.importClause, importDecl.importClause.isTypeOnly, name, void 0) ); - } else if (namedBindings.kind === 278 /* NamedImports */) { + } else if (namedBindings.kind === 281 /* NamedImports */) { for (const element of namedBindings.elements) { if (isUnused(element.name)) changes.delete(sourceFile, element); @@ -144415,9 +144673,9 @@ function deleteUnusedImportsInVariableDeclaration(sourceFile, varDecl, changes, } } break; - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: break; - case 206 /* ObjectBindingPattern */: + case 208 /* ObjectBindingPattern */: if (name.elements.every((e) => isIdentifier(e.name) && isUnused(e.name))) { changes.delete( sourceFile, @@ -144532,14 +144790,14 @@ function getUsageInfo(oldFile, toMove, checker) { } function isInImport(decl) { switch (decl.kind) { - case 274 /* ImportEqualsDeclaration */: - case 279 /* ImportSpecifier */: - case 276 /* ImportClause */: - case 277 /* NamespaceImport */: + case 277 /* ImportEqualsDeclaration */: + case 282 /* ImportSpecifier */: + case 279 /* ImportClause */: + case 280 /* NamespaceImport */: return true; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return isVariableDeclarationInImport(decl); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return isVariableDeclaration(decl.parent.parent) && isVariableDeclarationInImport(decl.parent.parent); default: return false; @@ -144550,7 +144808,7 @@ function isVariableDeclarationInImport(decl) { } function filterImport(i, moduleSpecifier, keep) { switch (i.kind) { - case 275 /* ImportDeclaration */: { + case 278 /* ImportDeclaration */: { const clause = i.importClause; if (!clause) return void 0; @@ -144558,9 +144816,9 @@ function filterImport(i, moduleSpecifier, keep) { const namedBindings = clause.namedBindings && filterNamedBindings(clause.namedBindings, keep); return defaultImport || namedBindings ? factory.createImportDeclaration(void 0, factory.createImportClause(false, defaultImport, namedBindings), moduleSpecifier, void 0) : void 0; } - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return keep(i.name) ? i : void 0; - case 261 /* VariableDeclaration */: { + case 263 /* VariableDeclaration */: { const name = filterBindingName(i.name, keep); return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : void 0; } @@ -144569,7 +144827,7 @@ function filterImport(i, moduleSpecifier, keep) { } } function filterNamedBindings(namedBindings, keep) { - if (namedBindings.kind === 277 /* NamespaceImport */) { + if (namedBindings.kind === 280 /* NamespaceImport */) { return keep(namedBindings.name) ? namedBindings : void 0; } else { const newElements = namedBindings.elements.filter((e) => keep(e.name)); @@ -144580,9 +144838,9 @@ function filterBindingName(name, keep) { switch (name.kind) { case 79 /* Identifier */: return keep(name) ? name : void 0; - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: return name; - case 206 /* ObjectBindingPattern */: { + case 208 /* ObjectBindingPattern */: { const newElements = name.elements.filter((prop) => prop.propertyName || !isIdentifier(prop.name) || keep(prop.name)); return newElements.length ? factory.createObjectBindingPattern(newElements) : void 0; } @@ -144639,13 +144897,13 @@ function isTopLevelDeclarationStatement(node) { } function isNonVariableTopLevelDeclaration(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 277 /* ImportEqualsDeclaration */: return true; default: return false; @@ -144653,17 +144911,17 @@ function isNonVariableTopLevelDeclaration(node) { } function forEachTopLevelDeclaration(statement, cb) { switch (statement.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 277 /* ImportEqualsDeclaration */: return cb(statement); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return firstDefined(statement.declarationList.declarations, (decl) => forEachTopLevelDeclarationInBindingName(decl.name, cb)); - case 245 /* ExpressionStatement */: { + case 247 /* ExpressionStatement */: { const { expression } = statement; return isBinaryExpression(expression) && getAssignmentDeclarationKind(expression) === 1 /* ExportsProperty */ ? cb(statement) : void 0; } @@ -144673,8 +144931,8 @@ function forEachTopLevelDeclarationInBindingName(name, cb) { switch (name.kind) { case 79 /* Identifier */: return cb(cast(name.parent, (x) => isVariableDeclaration(x) || isBindingElement(x))); - case 207 /* ArrayBindingPattern */: - case 206 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: return firstDefined(name.elements, (em) => isOmittedExpression(em) ? void 0 : forEachTopLevelDeclarationInBindingName(em.name, cb)); default: return Debug.assertNever(name, `Unexpected name kind ${name.kind}`); @@ -144685,9 +144943,9 @@ function nameOfTopLevelDeclaration(d) { } function getTopLevelDeclarationStatement(d) { switch (d.kind) { - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return d.parent.parent; - case 208 /* BindingElement */: + case 210 /* BindingElement */: return getTopLevelDeclarationStatement( cast(d.parent.parent, (p) => isVariableDeclaration(p) || isBindingElement(p)) ); @@ -144720,24 +144978,24 @@ function addExport(decl, useEs6Exports) { function addEs6Export(d) { const modifiers = canHaveModifiers(d) ? concatenate([factory.createModifier(94 /* ExportKeyword */)], getModifiers(d)) : void 0; switch (d.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return factory.updateFunctionDeclaration(d, modifiers, d.asteriskToken, d.name, d.typeParameters, d.parameters, d.type, d.body); - case 264 /* ClassDeclaration */: + case 266 /* 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 244 /* VariableStatement */: + case 246 /* VariableStatement */: return factory.updateVariableStatement(d, modifiers, d.declarationList); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return factory.updateModuleDeclaration(d, modifiers, d.name, d.body); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return factory.updateEnumDeclaration(d, modifiers, d.name, d.members); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return factory.updateTypeAliasDeclaration(d, modifiers, d.name, d.typeParameters, d.type); - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return factory.updateInterfaceDeclaration(d, modifiers, d.name, d.typeParameters, d.heritageClauses, d.members); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return factory.updateImportEqualsDeclaration(d, modifiers, d.isTypeOnly, d.name, d.moduleReference); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return Debug.fail(); default: return Debug.assertNever(d, `Unexpected declaration kind ${d.kind}`); @@ -144748,18 +145006,18 @@ function addCommonjsExport(decl) { } function getNamesToExportInCommonJS(decl) { switch (decl.kind) { - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: return [decl.name.text]; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return mapDefined(decl.declarationList.declarations, (d) => isIdentifier(d.name) ? d.name.text : void 0); - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 267 /* InterfaceDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 277 /* ImportEqualsDeclaration */: return emptyArray; - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return Debug.fail("Can't export an ExpressionStatement"); default: return Debug.assertNever(decl, `Unexpected decl kind ${decl.kind}`); @@ -144811,7 +145069,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { const lastDeclaration = signatureDecls[signatureDecls.length - 1]; let updated = lastDeclaration; switch (lastDeclaration.kind) { - case 173 /* MethodSignature */: { + case 175 /* MethodSignature */: { updated = factory.updateMethodSignature( lastDeclaration, lastDeclaration.modifiers, @@ -144823,7 +145081,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 174 /* MethodDeclaration */: { + case 176 /* MethodDeclaration */: { updated = factory.updateMethodDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -144837,7 +145095,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 179 /* CallSignature */: { + case 181 /* CallSignature */: { updated = factory.updateCallSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -144846,7 +145104,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 176 /* Constructor */: { + case 178 /* Constructor */: { updated = factory.updateConstructorDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -144855,7 +145113,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 180 /* ConstructSignature */: { + case 182 /* ConstructSignature */: { updated = factory.updateConstructSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -144864,7 +145122,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 263 /* FunctionDeclaration */: { + case 265 /* FunctionDeclaration */: { updated = factory.updateFunctionDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -144935,12 +145193,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isConvertableSignatureDeclaration(d) { switch (d.kind) { - case 173 /* MethodSignature */: - case 174 /* MethodDeclaration */: - case 179 /* CallSignature */: - case 176 /* Constructor */: - case 180 /* ConstructSignature */: - case 263 /* FunctionDeclaration */: + case 175 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 181 /* CallSignature */: + case 178 /* Constructor */: + case 182 /* ConstructSignature */: + case 265 /* FunctionDeclaration */: return true; } return false; @@ -145487,14 +145745,14 @@ function entryToFunctionCall(entry) { const functionReference = entry.node; const parent2 = functionReference.parent; switch (parent2.kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: const callOrNewExpression = tryCast(parent2, isCallOrNewExpression); if (callOrNewExpression && callOrNewExpression.expression === functionReference) { return callOrNewExpression; } break; - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.parent && propertyAccessExpression.name === functionReference) { const callOrNewExpression2 = tryCast(propertyAccessExpression.parent, isCallOrNewExpression); @@ -145503,7 +145761,7 @@ function entryToFunctionCall(entry) { } } break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.parent && elementAccessExpression.argumentExpression === functionReference) { const callOrNewExpression2 = tryCast(elementAccessExpression.parent, isCallOrNewExpression); @@ -145521,13 +145779,13 @@ function entryToAccessExpression(entry) { const reference = entry.node; const parent2 = reference.parent; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.expression === reference) { return propertyAccessExpression; } break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.expression === reference) { return elementAccessExpression; @@ -145569,22 +145827,22 @@ function isValidFunctionDeclaration(functionDeclaration, checker) { if (!isValidParameterNodeArray(functionDeclaration.parameters, checker)) return false; switch (functionDeclaration.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return hasNameOrDefault(functionDeclaration) && isSingleImplementation(functionDeclaration, checker); - case 174 /* MethodDeclaration */: + case 176 /* 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 176 /* Constructor */: + case 178 /* Constructor */: if (isClassDeclaration(functionDeclaration.parent)) { return hasNameOrDefault(functionDeclaration.parent) && isSingleImplementation(functionDeclaration, checker); } else { return isValidVariableDeclaration(functionDeclaration.parent.parent) && isSingleImplementation(functionDeclaration, checker); } - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return isValidVariableDeclaration(functionDeclaration.parent); } return false; @@ -145744,7 +146002,7 @@ function getParameterName(paramDeclaration) { } function getClassNames(constructorDeclaration) { switch (constructorDeclaration.parent.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: const classDeclaration = constructorDeclaration.parent; if (classDeclaration.name) return [classDeclaration.name]; @@ -145753,7 +146011,7 @@ function getClassNames(constructorDeclaration) { "Nameless class declaration should be a default export" ); return [defaultModifier]; - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: const classExpression = constructorDeclaration.parent; const variableDeclaration = constructorDeclaration.parent.parent; const className = classExpression.name; @@ -145764,7 +146022,7 @@ function getClassNames(constructorDeclaration) { } function getFunctionNames(functionDeclaration) { switch (functionDeclaration.kind) { - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: if (functionDeclaration.name) return [functionDeclaration.name]; const defaultModifier = Debug.checkDefined( @@ -145772,21 +146030,21 @@ function getFunctionNames(functionDeclaration) { "Nameless function declaration should be a default export" ); return [defaultModifier]; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return [functionDeclaration.name]; - case 176 /* Constructor */: + case 178 /* Constructor */: const ctrKeyword = Debug.checkDefined( findChildOfKind(functionDeclaration, 136 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword" ); - if (functionDeclaration.parent.kind === 232 /* ClassExpression */) { + if (functionDeclaration.parent.kind === 234 /* ClassExpression */) { const variableDeclaration = functionDeclaration.parent.parent; return [variableDeclaration.name, ctrKeyword]; } return [ctrKeyword]; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return [functionDeclaration.parent.name]; - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: if (functionDeclaration.name) return [functionDeclaration.name, functionDeclaration.parent.name]; return [functionDeclaration.parent.name]; @@ -145869,11 +146127,11 @@ function isNotEqualsOperator(node) { function getParentBinaryExpression(expr) { const container = findAncestor(expr.parent, (n) => { switch (n.kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return false; - case 229 /* TemplateExpression */: - case 227 /* BinaryExpression */: + case 231 /* TemplateExpression */: + case 229 /* BinaryExpression */: return !(isBinaryExpression(n.parent) && isNotEqualsOperator(n.parent)); default: return "quit"; @@ -146493,18 +146751,18 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { function checkForStaticContext(nodeToCheck, containingClass) { let current = nodeToCheck; while (current !== containingClass) { - if (current.kind === 171 /* PropertyDeclaration */) { + if (current.kind === 172 /* PropertyDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 168 /* Parameter */) { + } else if (current.kind === 169 /* Parameter */) { const ctorOrMethod = getContainingFunction(current); - if (ctorOrMethod.kind === 176 /* Constructor */) { + if (ctorOrMethod.kind === 178 /* Constructor */) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 174 /* MethodDeclaration */) { + } else if (current.kind === 176 /* MethodDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } @@ -146538,7 +146796,7 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { visit(nodeToCheck); if (rangeFacts & 8 /* UsesThis */) { const container = getThisContainer(nodeToCheck, false); - if (container.kind === 263 /* FunctionDeclaration */ || container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ || container.kind === 218 /* FunctionExpression */) { + if (container.kind === 265 /* FunctionDeclaration */ || container.kind === 176 /* MethodDeclaration */ && container.parent.kind === 212 /* ObjectLiteralExpression */ || container.kind === 220 /* FunctionExpression */) { rangeFacts |= 16 /* UsesThisInFunction */; } } @@ -146548,21 +146806,21 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { return true; } if (isDeclaration(node2)) { - const declaringNode = node2.kind === 261 /* VariableDeclaration */ ? node2.parent.parent : node2; + const declaringNode = node2.kind === 263 /* VariableDeclaration */ ? node2.parent.parent : node2; if (hasSyntacticModifier(declaringNode, 1 /* Export */)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; } } switch (node2.kind) { - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractImport)); return true; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; case 107 /* SuperKeyword */: - if (node2.parent.kind === 213 /* CallExpression */) { + if (node2.parent.kind === 215 /* 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)); @@ -146573,7 +146831,7 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { thisNode = node2; } break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: forEachChild(node2, function check(n) { if (isThis(n)) { rangeFacts |= 8 /* UsesThis */; @@ -146584,34 +146842,34 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { forEachChild(n, check); } }); - case 264 /* ClassDeclaration */: - case 263 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 265 /* FunctionDeclaration */: if (isSourceFile(node2.parent) && node2.parent.externalModuleIndicator === void 0) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.functionWillNotBeVisibleInTheNewScope)); } - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return false; } const savedPermittedJumps = permittedJumps; switch (node2.kind) { - case 246 /* IfStatement */: + case 248 /* IfStatement */: permittedJumps &= ~4 /* Return */; break; - case 259 /* TryStatement */: + case 261 /* TryStatement */: permittedJumps = 0 /* None */; break; - case 242 /* Block */: - if (node2.parent && node2.parent.kind === 259 /* TryStatement */ && node2.parent.finallyBlock === node2) { + case 244 /* Block */: + if (node2.parent && node2.parent.kind === 261 /* TryStatement */ && node2.parent.finallyBlock === node2) { permittedJumps = 4 /* Return */; } break; - case 299 /* DefaultClause */: - case 298 /* CaseClause */: + case 302 /* DefaultClause */: + case 301 /* CaseClause */: permittedJumps |= 1 /* Break */; break; default: @@ -146621,39 +146879,39 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { break; } switch (node2.kind) { - case 197 /* ThisType */: + case 199 /* ThisType */: case 109 /* ThisKeyword */: rangeFacts |= 8 /* UsesThis */; thisNode = node2; break; - case 257 /* LabeledStatement */: { + case 259 /* LabeledStatement */: { const label = node2.label; (seenLabels || (seenLabels = [])).push(label.escapedText); forEachChild(node2, visit); seenLabels.pop(); break; } - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: { + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: { const label = node2.label; if (label) { if (!contains(seenLabels, label.escapedText)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)); } } else { - if (!(permittedJumps & (node2.kind === 253 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { + if (!(permittedJumps & (node2.kind === 255 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingConditionalBreakOrContinueStatements)); } } break; } - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: rangeFacts |= 4 /* IsAsyncFunction */; break; - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: rangeFacts |= 2 /* IsGenerator */; break; - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: if (permittedJumps & 4 /* Return */) { rangeFacts |= 1 /* HasReturn */; } else { @@ -146703,12 +146961,12 @@ function collectEnclosingScopes(range) { const scopes = []; while (true) { current = current.parent; - if (current.kind === 168 /* Parameter */) { + if (current.kind === 169 /* Parameter */) { current = findAncestor(current, (parent2) => isFunctionLikeDeclaration(parent2)).parent; } if (isScope(current)) { scopes.push(current); - if (current.kind === 314 /* SourceFile */) { + if (current.kind === 317 /* SourceFile */) { return scopes; } } @@ -146784,28 +147042,28 @@ function getDescriptionForConstantInScope(scope) { } function getDescriptionForFunctionLikeDeclaration(scope) { switch (scope.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: return "constructor"; - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: return scope.name ? `function '${scope.name.text}'` : ANONYMOUS; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return "arrow function"; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return `method '${scope.name.getText()}'`; - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return `'get ${scope.name.getText()}'`; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return `'set ${scope.name.getText()}'`; default: throw Debug.assertNever(scope, `Unexpected scope kind ${scope.kind}`); } } function getDescriptionForClassLikeDeclaration(scope) { - return scope.kind === 264 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; + return scope.kind === 266 /* 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 === 271 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? SpecialScope.Module : SpecialScope.Global; + return scope.kind === 274 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? SpecialScope.Module : SpecialScope.Global; } var SpecialScope = /* @__PURE__ */ ((SpecialScope2) => { SpecialScope2[SpecialScope2["Module"] = 0] = "Module"; @@ -147101,7 +147359,7 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont changeTracker.insertNodeBefore(context.file, oldVariableDeclaration, newVariableDeclaration); const localReference = factory.createIdentifier(localNameText); changeTracker.replaceNode(context.file, node, localReference); - } else if (node.parent.kind === 245 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { + } else if (node.parent.kind === 247 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { const newVariableStatement = factory.createVariableStatement( void 0, factory.createVariableDeclarationList([newVariableDeclaration], 2 /* Const */) @@ -147118,7 +147376,7 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont } else { changeTracker.insertNodeBefore(context.file, nodeToInsertBefore, newVariableStatement, false); } - if (node.parent.kind === 245 /* ExpressionStatement */) { + if (node.parent.kind === 247 /* ExpressionStatement */) { changeTracker.delete(context.file, node.parent); } else { let localReference = factory.createIdentifier(localNameText); @@ -147639,27 +147897,27 @@ function getExtractableParent(node) { function isExtractableExpression(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 308 /* EnumMember */: + case 311 /* EnumMember */: return false; } switch (node.kind) { case 10 /* StringLiteral */: - return parent2.kind !== 275 /* ImportDeclaration */ && parent2.kind !== 279 /* ImportSpecifier */; - case 231 /* SpreadElement */: - case 206 /* ObjectBindingPattern */: - case 208 /* BindingElement */: + return parent2.kind !== 278 /* ImportDeclaration */ && parent2.kind !== 282 /* ImportSpecifier */; + case 233 /* SpreadElement */: + case 208 /* ObjectBindingPattern */: + case 210 /* BindingElement */: return false; case 79 /* Identifier */: - return parent2.kind !== 208 /* BindingElement */ && parent2.kind !== 279 /* ImportSpecifier */ && parent2.kind !== 284 /* ExportSpecifier */; + return parent2.kind !== 210 /* BindingElement */ && parent2.kind !== 282 /* ImportSpecifier */ && parent2.kind !== 287 /* ExportSpecifier */; } return true; } function isBlockLike(node) { switch (node.kind) { - case 242 /* Block */: - case 314 /* SourceFile */: - case 271 /* ModuleBlock */: - case 298 /* CaseClause */: + case 244 /* Block */: + case 317 /* SourceFile */: + case 274 /* ModuleBlock */: + case 301 /* CaseClause */: return true; default: return false; @@ -147799,10 +148057,10 @@ function getInfo21(context) { } function isConvertibleDeclaration(node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: return true; default: return false; @@ -147870,7 +148128,7 @@ function getRenameInfoForNode(node, typeChecker3, sourceFile, program, preferenc return getRenameInfoError(wouldRenameNodeModules); } const kind = ts_SymbolDisplay_exports.getSymbolKind(typeChecker3, symbol, node); - const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 166 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; + const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; const displayName = specifierName || typeChecker3.symbolToString(symbol); const fullDisplayName = specifierName || typeChecker3.getFullyQualifiedName(symbol); return getRenameInfoSuccess(displayName, fullDisplayName, kind, ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker3, symbol), node, sourceFile); @@ -148139,10 +148397,10 @@ function getImmediatelyContainingArgumentInfo(node, position, sourceFile) { return getArgumentListInfoForTemplate(parent2, 0, sourceFile); } return void 0; - } else if (isTemplateHead(node) && parent2.parent.kind === 215 /* TaggedTemplateExpression */) { + } else if (isTemplateHead(node) && parent2.parent.kind === 217 /* TaggedTemplateExpression */) { const templateExpression = parent2; const tagExpression = templateExpression.parent; - Debug.assert(templateExpression.kind === 229 /* TemplateExpression */); + Debug.assert(templateExpression.kind === 231 /* TemplateExpression */); const argumentIndex = isInsideTemplateLiteral(node, position, sourceFile) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); } else if (isTemplateSpan(parent2) && isTaggedTemplateExpression(parent2.parent.parent)) { @@ -148204,17 +148462,17 @@ function getContextualSignatureLocationInfo(startingToken, sourceFile, position, return void 0; const { parent: parent2 } = startingToken; switch (parent2.kind) { - case 217 /* ParenthesizedExpression */: - case 174 /* MethodDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 219 /* ParenthesizedExpression */: + case 176 /* MethodDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* 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 227 /* BinaryExpression */: { + case 229 /* BinaryExpression */: { const highestBinary = getHighestBinary(parent2); const contextualType2 = checker.getContextualType(highestBinary); const argumentIndex2 = startingToken.kind === 20 /* OpenParenToken */ ? 0 : countBinaryExpressionParameters(parent2) - 1; @@ -148280,7 +148538,7 @@ function getApplicableSpanForTaggedTemplate(taggedTemplate, sourceFile) { const template = taggedTemplate.template; const applicableSpanStart = template.getStart(); let applicableSpanEnd = template.getEnd(); - if (template.kind === 229 /* TemplateExpression */) { + if (template.kind === 231 /* TemplateExpression */) { const lastSpan = last(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = skipTrivia(sourceFile.text, applicableSpanEnd, false); @@ -148547,7 +148805,7 @@ function getSelectionChildren(node) { 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 === 167 /* TypeParameter */ || kind === 23 /* CloseBracketToken */ + ({ kind }) => kind === 22 /* OpenBracketToken */ || kind === 168 /* TypeParameter */ || kind === 23 /* CloseBracketToken */ ); return [ openBraceToken, @@ -148557,7 +148815,7 @@ function getSelectionChildren(node) { } 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) === 329 /* JSDoc */ ? children[0] : void 0; + const firstJSDocChild = ((_a2 = children[0]) == null ? void 0 : _a2.kind) === 332 /* 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; @@ -148618,19 +148876,19 @@ function createSyntaxList2(children) { } function isListOpener(token) { const kind = token && token.kind; - return kind === 18 /* OpenBraceToken */ || kind === 22 /* OpenBracketToken */ || kind === 20 /* OpenParenToken */ || kind === 289 /* JsxOpeningElement */; + return kind === 18 /* OpenBraceToken */ || kind === 22 /* OpenBracketToken */ || kind === 20 /* OpenParenToken */ || kind === 292 /* JsxOpeningElement */; } function isListCloser(token) { const kind = token && token.kind; - return kind === 19 /* CloseBraceToken */ || kind === 23 /* CloseBracketToken */ || kind === 21 /* CloseParenToken */ || kind === 290 /* JsxClosingElement */; + return kind === 19 /* CloseBraceToken */ || kind === 23 /* CloseBracketToken */ || kind === 21 /* CloseParenToken */ || kind === 293 /* JsxClosingElement */; } function getEndPos(sourceFile, node) { switch (node.kind) { - case 349 /* JSDocParameterTag */: - case 347 /* JSDocCallbackTag */: - case 356 /* JSDocPropertyTag */: - case 354 /* JSDocTypedefTag */: - case 351 /* JSDocThisTag */: + case 352 /* JSDocParameterTag */: + case 350 /* JSDocCallbackTag */: + case 359 /* JSDocPropertyTag */: + case 357 /* JSDocTypedefTag */: + case 354 /* JSDocThisTag */: return sourceFile.getLineEndOfPosition(node.getStart()); default: return node.getEnd(); @@ -148654,7 +148912,7 @@ function getSymbolKind(typeChecker3, symbol, location) { } const flags = getCombinedLocalAndExportSymbolFlags(symbol); if (flags & 32 /* Class */) { - return getDeclarationOfKind(symbol, 232 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; + return getDeclarationOfKind(symbol, 234 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; } if (flags & 384 /* Enum */) return "enum" /* enumElement */; @@ -148780,13 +149038,13 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s const declaration = find(symbol.declarations, (declaration2) => declaration2.name === location); if (declaration) { switch (declaration.kind) { - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: symbolKind = "getter" /* memberGetAccessorElement */; break; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: symbolKind = "setter" /* memberSetAccessorElement */; break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: symbolKind = "accessor" /* memberAccessorVariableElement */; break; default: @@ -148798,7 +149056,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s } let signature; type = isThisExpression ? typeChecker3.getTypeAtLocation(location) : typeChecker3.getTypeOfSymbolAtLocation(symbol, location); - if (location.parent && location.parent.kind === 211 /* PropertyAccessExpression */) { + if (location.parent && location.parent.kind === 213 /* PropertyAccessExpression */) { const right = location.parent.name; if (right === location || right && right.getFullWidth() === 0) { location = location.parent; @@ -148814,7 +149072,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s } if (callExpressionLike) { signature = typeChecker3.getResolvedSignature(callExpressionLike); - const useConstructSignatures = callExpressionLike.kind === 214 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 107 /* SuperKeyword */; + const useConstructSignatures = callExpressionLike.kind === 216 /* 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; @@ -148869,21 +149127,21 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s hasAddedSymbolInfo = true; hasMultipleSignatures = allSignatures.length > 1; } - } else if (isNameOfFunctionDeclaration(location) && !(symbolFlags & 98304 /* Accessor */) || location.kind === 136 /* ConstructorKeyword */ && location.parent.kind === 176 /* Constructor */) { + } else if (isNameOfFunctionDeclaration(location) && !(symbolFlags & 98304 /* Accessor */) || location.kind === 136 /* ConstructorKeyword */ && location.parent.kind === 178 /* Constructor */) { const functionDeclaration = location.parent; const locationIsSymbolDeclaration = symbol.declarations && find(symbol.declarations, (declaration) => declaration === (location.kind === 136 /* ConstructorKeyword */ ? functionDeclaration.parent : functionDeclaration)); if (locationIsSymbolDeclaration) { - const allSignatures = functionDeclaration.kind === 176 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); + const allSignatures = functionDeclaration.kind === 178 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); if (!typeChecker3.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker3.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 176 /* Constructor */) { + if (functionDeclaration.kind === 178 /* Constructor */) { symbolKind = "constructor" /* constructorImplementationElement */; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 179 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 181 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); } if (signature) { addSignatureDisplayParts(signature, allSignatures); @@ -148895,9 +149153,9 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s } if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) { addAliasPrefixIfNecessary(); - if (getDeclarationOfKind(symbol, 232 /* ClassExpression */)) { + if (getDeclarationOfKind(symbol, 234 /* ClassExpression */)) { pushSymbolKind("local class" /* localClassElement */); - } else if (getDeclarationOfKind(symbol, 265 /* StructDeclaration */)) { + } else if (getDeclarationOfKind(symbol, 267 /* StructDeclaration */)) { displayParts.push(keywordPart(85 /* StructKeyword */)); } else { displayParts.push(keywordPart(84 /* ClassKeyword */)); @@ -148936,7 +149194,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s } if (symbolFlags & 1536 /* Module */ && !isThisExpression) { prefixNextMeaning(); - const declaration = getDeclarationOfKind(symbol, 270 /* ModuleDeclaration */); + const declaration = getDeclarationOfKind(symbol, 273 /* ModuleDeclaration */); const isNamespace = declaration && declaration.name && declaration.name.kind === 79 /* Identifier */; displayParts.push(keywordPart(isNamespace ? 144 /* NamespaceKeyword */ : 143 /* ModuleKeyword */)); displayParts.push(spacePart()); @@ -148954,7 +149212,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s addFullSymbolName(symbol.parent, enclosingDeclaration); writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration); } else { - const decl = getDeclarationOfKind(symbol, 167 /* TypeParameter */); + const decl = getDeclarationOfKind(symbol, 168 /* TypeParameter */); if (decl === void 0) return Debug.fail(); const declaration = decl.parent; @@ -148962,14 +149220,14 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s if (isFunctionLikeKind(declaration.kind)) { addInPrefix(); const signature = typeChecker3.getSignatureFromDeclaration(declaration); - if (declaration.kind === 180 /* ConstructSignature */) { + if (declaration.kind === 182 /* ConstructSignature */) { displayParts.push(keywordPart(104 /* NewKeyword */)); displayParts.push(spacePart()); - } else if (declaration.kind !== 179 /* CallSignature */ && declaration.name) { + } else if (declaration.kind !== 181 /* CallSignature */ && declaration.name) { addFullSymbolName(declaration.symbol); } addRange(displayParts, signatureToDisplayParts(typeChecker3, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); - } else if (declaration.kind === 268 /* TypeAliasDeclaration */) { + } else if (declaration.kind === 271 /* TypeAliasDeclaration */) { addInPrefix(); displayParts.push(keywordPart(155 /* TypeKeyword */)); displayParts.push(spacePart()); @@ -148983,7 +149241,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s 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) === 308 /* EnumMember */) { + if ((declaration == null ? void 0 : declaration.kind) === 311 /* EnumMember */) { const constantValue = typeChecker3.getConstantValue(declaration); if (constantValue !== void 0) { displayParts.push(spacePart()); @@ -149027,17 +149285,17 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s } if (symbol.declarations) { switch (symbol.declarations[0].kind) { - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: displayParts.push(keywordPart(94 /* ExportKeyword */)); displayParts.push(spacePart()); displayParts.push(keywordPart(144 /* NamespaceKeyword */)); break; - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: displayParts.push(keywordPart(94 /* ExportKeyword */)); displayParts.push(spacePart()); displayParts.push(keywordPart(symbol.declarations[0].isExportEquals ? 63 /* EqualsToken */ : 89 /* DefaultKeyword */)); break; - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: displayParts.push(keywordPart(94 /* ExportKeyword */)); break; default: @@ -149047,7 +149305,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s displayParts.push(spacePart()); addFullSymbolName(symbol); forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 274 /* ImportEqualsDeclaration */) { + if (declaration.kind === 277 /* ImportEqualsDeclaration */) { const importEqualsDeclaration = declaration; if (isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(spacePart()); @@ -149115,9 +149373,9 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker3, symbol, s documentation = symbol.getContextualDocumentationComment(enclosingDeclaration, typeChecker3); } if (documentation.length === 0 && symbolFlags & 4 /* Property */) { - if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 314 /* SourceFile */)) { + if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 317 /* SourceFile */)) { for (const declaration of symbol.declarations) { - if (!declaration.parent || declaration.parent.kind !== 227 /* BinaryExpression */) { + if (!declaration.parent || declaration.parent.kind !== 229 /* BinaryExpression */) { continue; } const rhsSymbol = typeChecker3.getSymbolAtLocation(declaration.parent.right); @@ -149268,14 +149526,14 @@ function isLocalVariableOrFunction(symbol) { return false; } return forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 218 /* FunctionExpression */) { + if (declaration.kind === 220 /* FunctionExpression */) { return true; } - if (declaration.kind !== 261 /* VariableDeclaration */ && declaration.kind !== 263 /* FunctionDeclaration */) { + if (declaration.kind !== 263 /* VariableDeclaration */ && declaration.kind !== 265 /* FunctionDeclaration */) { return false; } for (let parent2 = declaration.parent; !isFunctionBlock(parent2); parent2 = parent2.parent) { - if (parent2.kind === 314 /* SourceFile */ || parent2.kind === 271 /* ModuleBlock */) { + if (parent2.kind === 317 /* SourceFile */ || parent2.kind === 274 /* ModuleBlock */) { return false; } } @@ -149440,7 +149698,7 @@ function getAdjustedEndPosition(sourceFile, node, options) { 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 === 210 /* ObjectLiteralExpression */); + return !!candidate && !!node.parent && (candidate.kind === 27 /* CommaToken */ || candidate.kind === 26 /* SemicolonToken */ && node.parent.kind === 212 /* ObjectLiteralExpression */); } function isThisTypeAnnotatable(containingFunction) { return isFunctionExpression(containingFunction) || isFunctionDeclaration(containingFunction); @@ -149637,7 +149895,7 @@ var ChangeTracker = class { endNode2 = first(node.parameters); } } else { - endNode2 = (_a2 = node.kind === 261 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) != null ? _a2 : node.name; + endNode2 = (_a2 = node.kind === 263 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) != null ? _a2 : node.name; } this.insertNodeAt(sourceFile, endNode2.end, type, { prefix: ": " }); return true; @@ -149779,19 +150037,19 @@ ${options.prefix}` : "\n" : options.prefix } getInsertNodeAfterOptionsWorker(node) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 270 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 273 /* ModuleDeclaration */: return { prefix: this.newLineCharacter, suffix: this.newLineCharacter }; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: case 10 /* StringLiteral */: case 79 /* Identifier */: return { prefix: ", " }; - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return { suffix: "," + this.newLineCharacter }; case 94 /* ExportKeyword */: return { prefix: " " }; - case 168 /* Parameter */: + case 169 /* Parameter */: return {}; default: Debug.assert(isStatement(node) || isClassOrTypeElement(node)); @@ -149800,7 +150058,7 @@ ${options.prefix}` : "\n" : options.prefix } insertName(sourceFile, node, name) { Debug.assert(!node.name); - if (node.kind === 219 /* ArrowFunction */) { + if (node.kind === 221 /* ArrowFunction */) { const arrow = findChildOfKind(node, 38 /* EqualsGreaterThanToken */, sourceFile); const lparen = findChildOfKind(node, 20 /* OpenParenToken */, sourceFile); if (lparen) { @@ -149810,12 +150068,12 @@ ${options.prefix}` : "\n" : options.prefix this.insertText(sourceFile, first(node.parameters).getStart(sourceFile), `function ${name}(`); this.replaceRange(sourceFile, arrow, factory.createToken(21 /* CloseParenToken */)); } - if (node.body.kind !== 242 /* Block */) { + if (node.body.kind !== 244 /* 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 === 218 /* FunctionExpression */ ? 99 /* FunctionKeyword */ : 84 /* ClassKeyword */, sourceFile).end; + const pos = findChildOfKind(node, node.kind === 220 /* FunctionExpression */ ? 99 /* FunctionKeyword */ : 84 /* ClassKeyword */, sourceFile).end; this.insertNodeAt(sourceFile, pos, factory.createIdentifier(name), { prefix: " " }); } } @@ -149936,10 +150194,10 @@ ${options.prefix}` : "\n" : options.prefix } }; function updateJSDocHost(parent2) { - if (parent2.kind !== 219 /* ArrowFunction */) { + if (parent2.kind !== 221 /* ArrowFunction */) { return parent2; } - const jsDocNode = parent2.parent.kind === 171 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; + const jsDocNode = parent2.parent.kind === 172 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; jsDocNode.jsDoc = parent2.jsDoc; jsDocNode.jsDocCache = parent2.jsDocCache; return jsDocNode; @@ -149949,14 +150207,14 @@ function tryMergeJsdocTags(oldTag, newTag) { return void 0; } switch (oldTag.kind) { - case 349 /* JSDocParameterTag */: { + case 352 /* JSDocParameterTag */: { const oldParam = oldTag; const newParam = newTag; return isIdentifier(oldParam.name) && isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? factory.createJSDocParameterTag(void 0, newParam.name, false, newParam.typeExpression, newParam.isNameFirst, oldParam.comment) : void 0; } - case 350 /* JSDocReturnTag */: + case 353 /* JSDocReturnTag */: return factory.createJSDocReturnTag(void 0, newTag.typeExpression, oldTag.comment); - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: return factory.createJSDocTypeTag(void 0, newTag.typeExpression, oldTag.comment); } } @@ -150337,13 +150595,13 @@ function isValidLocationToAddComment(sourceFile, position) { 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 === 166 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); + return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 167 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); } var deleteDeclaration; ((_deleteDeclaration) => { function deleteDeclaration2(changes, deletedNodesInLists, sourceFile, node) { switch (node.kind) { - case 168 /* Parameter */: { + case 169 /* Parameter */: { const oldFunction = node.parent; if (isArrowFunction(oldFunction) && oldFunction.parameters.length === 1 && !findChildOfKind(oldFunction, 20 /* OpenParenToken */, sourceFile)) { changes.replaceNodeWithText(sourceFile, node, "()"); @@ -150352,29 +150610,29 @@ var deleteDeclaration; } break; } - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* 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 208 /* BindingElement */: + case 210 /* BindingElement */: const pattern = node.parent; - const preserveComma = pattern.kind === 207 /* ArrayBindingPattern */ && node !== last(pattern.elements); + const preserveComma = pattern.kind === 209 /* ArrayBindingPattern */ && node !== last(pattern.elements); if (preserveComma) { deleteNode(changes, sourceFile, node); } else { deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node); break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); break; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: const namedImports = node.parent; if (namedImports.elements.length === 1) { deleteImportBinding(changes, sourceFile, namedImports); @@ -150382,7 +150640,7 @@ var deleteDeclaration; deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: deleteImportBinding(changes, sourceFile, node); break; case 26 /* SemicolonToken */: @@ -150391,9 +150649,9 @@ var deleteDeclaration; case 99 /* FunctionKeyword */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: 0 /* Exclude */ }); break; - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 263 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 265 /* FunctionDeclaration */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -150428,13 +150686,13 @@ var deleteDeclaration; const previousToken = Debug.checkDefined(getTokenAtPosition(sourceFile, node.pos - 1)); changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end }); } else { - const importDecl = getAncestor(node, 275 /* ImportDeclaration */); + const importDecl = getAncestor(node, 278 /* ImportDeclaration */); deleteNode(changes, sourceFile, importDecl); } } function deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node) { const { parent: parent2 } = node; - if (parent2.kind === 301 /* CatchClause */) { + if (parent2.kind === 304 /* CatchClause */) { changes.deleteNodeRange(sourceFile, findChildOfKind(parent2, 20 /* OpenParenToken */, sourceFile), findChildOfKind(parent2, 21 /* CloseParenToken */, sourceFile)); return; } @@ -150444,14 +150702,14 @@ var deleteDeclaration; } const gp = parent2.parent; switch (gp.kind) { - case 251 /* ForOfStatement */: - case 250 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 252 /* ForInStatement */: changes.replaceNode(sourceFile, node, factory.createObjectLiteralExpression()); break; - case 249 /* ForStatement */: + case 251 /* ForStatement */: deleteNode(changes, sourceFile, parent2); break; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: deleteNode(changes, sourceFile, gp, { leadingTriviaOption: hasJSDocNodes(gp) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -150663,10 +150921,10 @@ function getFormattingScanner(text, languageVariant, startPos, endPos, cb) { function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { - case 294 /* JsxAttribute */: - case 289 /* JsxOpeningElement */: - case 290 /* JsxClosingElement */: - case 288 /* JsxSelfClosingElement */: + case 297 /* JsxAttribute */: + case 292 /* JsxOpeningElement */: + case 293 /* JsxClosingElement */: + case 291 /* JsxSelfClosingElement */: return isKeyword(node.kind) || node.kind === 79 /* Identifier */; } } @@ -150833,7 +151091,7 @@ var RuleFlags = /* @__PURE__ */ ((RuleFlags2) => { // src/services/formatting/rules.ts function getAllRules() { const allTokens = []; - for (let token = 0 /* FirstToken */; token <= 164 /* LastToken */; token++) { + for (let token = 0 /* FirstToken */; token <= 165 /* LastToken */; token++) { if (token !== 1 /* EndOfFileToken */) { allTokens.push(token); } @@ -150844,9 +151102,9 @@ function getAllRules() { const anyToken = { tokens: allTokens, isSpecific: false }; const anyTokenIncludingMultilineComments = tokenRangeFrom([...allTokens, 3 /* MultiLineCommentTrivia */]); const anyTokenIncludingEOF = tokenRangeFrom([...allTokens, 1 /* EndOfFileToken */]); - const keywords = tokenRangeFromRange(81 /* FirstKeyword */, 164 /* LastKeyword */); + const keywords = tokenRangeFromRange(81 /* FirstKeyword */, 165 /* LastKeyword */); const binaryOperators = tokenRangeFromRange(29 /* FirstBinaryOperator */, 78 /* LastBinaryOperator */); - const binaryKeywordOperators = [102 /* InKeyword */, 103 /* InstanceOfKeyword */, 164 /* OfKeyword */, 129 /* AsKeyword */, 141 /* IsKeyword */]; + const binaryKeywordOperators = [102 /* InKeyword */, 103 /* InstanceOfKeyword */, 165 /* OfKeyword */, 129 /* AsKeyword */, 141 /* IsKeyword */]; const unaryPrefixOperators = [45 /* PlusPlusToken */, 46 /* MinusMinusToken */, 54 /* TildeToken */, 53 /* ExclamationToken */]; const unaryPrefixExpressions = [ 8 /* NumericLiteral */, @@ -151119,40 +151377,40 @@ function isOptionEnabledOrUndefined(optionName) { return (context) => !context.options || !hasProperty(context.options, optionName) || !!context.options[optionName]; } function isForContext(context) { - return context.contextNode.kind === 249 /* ForStatement */; + return context.contextNode.kind === 251 /* ForStatement */; } function isNotForContext(context) { return !isForContext(context); } function isBinaryOpContext(context) { switch (context.contextNode.kind) { - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return context.contextNode.operatorToken.kind !== 27 /* CommaToken */; - case 228 /* ConditionalExpression */: - case 194 /* ConditionalType */: - case 235 /* AsExpression */: - case 284 /* ExportSpecifier */: - case 279 /* ImportSpecifier */: - case 182 /* TypePredicate */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 239 /* SatisfiesExpression */: + case 230 /* ConditionalExpression */: + case 196 /* ConditionalType */: + case 237 /* AsExpression */: + case 287 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 184 /* TypePredicate */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: + case 241 /* SatisfiesExpression */: return true; - case 208 /* BindingElement */: - case 268 /* TypeAliasDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 280 /* ExportAssignment */: - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 308 /* EnumMember */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 210 /* BindingElement */: + case 271 /* TypeAliasDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 283 /* ExportAssignment */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 311 /* EnumMember */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return context.currentTokenSpan.kind === 63 /* EqualsToken */ || context.nextTokenSpan.kind === 63 /* EqualsToken */; - case 250 /* ForInStatement */: - case 167 /* TypeParameter */: + case 252 /* ForInStatement */: + case 168 /* TypeParameter */: return context.currentTokenSpan.kind === 102 /* InKeyword */ || context.nextTokenSpan.kind === 102 /* InKeyword */ || context.currentTokenSpan.kind === 63 /* EqualsToken */ || context.nextTokenSpan.kind === 63 /* EqualsToken */; - case 251 /* ForOfStatement */: - return context.currentTokenSpan.kind === 164 /* OfKeyword */ || context.nextTokenSpan.kind === 164 /* OfKeyword */; + case 253 /* ForOfStatement */: + return context.currentTokenSpan.kind === 165 /* OfKeyword */ || context.nextTokenSpan.kind === 165 /* OfKeyword */; } return false; } @@ -151164,16 +151422,16 @@ function isNotTypeAnnotationContext(context) { } function isTypeAnnotationContext(context) { const contextKind = context.contextNode.kind; - return contextKind === 171 /* PropertyDeclaration */ || contextKind === 170 /* PropertySignature */ || contextKind === 168 /* Parameter */ || contextKind === 261 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); + return contextKind === 172 /* PropertyDeclaration */ || contextKind === 171 /* PropertySignature */ || contextKind === 169 /* Parameter */ || contextKind === 263 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); } function isConditionalOperatorContext(context) { - return context.contextNode.kind === 228 /* ConditionalExpression */ || context.contextNode.kind === 194 /* ConditionalType */; + return context.contextNode.kind === 230 /* ConditionalExpression */ || context.contextNode.kind === 196 /* ConditionalType */; } function isSameLineTokenOrBeforeBlockContext(context) { return context.TokensAreOnSameLine() || isBeforeBlockContext(context); } function isBraceWrappedContext(context) { - return context.contextNode.kind === 206 /* ObjectBindingPattern */ || context.contextNode.kind === 200 /* MappedType */ || isSingleLineBlockContext(context); + return context.contextNode.kind === 208 /* ObjectBindingPattern */ || context.contextNode.kind === 202 /* MappedType */ || isSingleLineBlockContext(context); } function isBeforeMultilineBlockContext(context) { return isBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); @@ -151195,26 +151453,26 @@ function nodeIsBlockContext(node) { return true; } switch (node.kind) { - case 242 /* Block */: - case 272 /* CaseBlock */: - case 210 /* ObjectLiteralExpression */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 275 /* CaseBlock */: + case 212 /* ObjectLiteralExpression */: + case 274 /* ModuleBlock */: return true; } return false; } function isFunctionDeclContext(context) { switch (context.contextNode.kind) { - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 179 /* CallSignature */: - case 218 /* FunctionExpression */: - case 176 /* Constructor */: - case 219 /* ArrowFunction */: - case 267 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 181 /* CallSignature */: + case 220 /* FunctionExpression */: + case 178 /* Constructor */: + case 221 /* ArrowFunction */: + case 270 /* InterfaceDeclaration */: return true; } return false; @@ -151223,41 +151481,41 @@ function isNotFunctionDeclContext(context) { return !isFunctionDeclContext(context); } function isFunctionDeclarationOrFunctionExpressionContext(context) { - return context.contextNode.kind === 263 /* FunctionDeclaration */ || context.contextNode.kind === 218 /* FunctionExpression */; + return context.contextNode.kind === 265 /* FunctionDeclaration */ || context.contextNode.kind === 220 /* FunctionExpression */; } function isTypeScriptDeclWithBlockContext(context) { return nodeIsTypeScriptDeclWithBlockContext(context.contextNode); } function nodeIsTypeScriptDeclWithBlockContext(node) { switch (node.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 187 /* TypeLiteral */: - case 270 /* ModuleDeclaration */: - case 281 /* ExportDeclaration */: - case 282 /* NamedExports */: - case 275 /* ImportDeclaration */: - case 278 /* NamedImports */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 189 /* TypeLiteral */: + case 273 /* ModuleDeclaration */: + case 284 /* ExportDeclaration */: + case 285 /* NamedExports */: + case 278 /* ImportDeclaration */: + case 281 /* NamedImports */: return true; } return false; } function isAfterCodeBlockContext(context) { switch (context.currentTokenParent.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 301 /* CatchClause */: - case 271 /* ModuleBlock */: - case 256 /* SwitchStatement */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 304 /* CatchClause */: + case 274 /* ModuleBlock */: + case 258 /* SwitchStatement */: return true; - case 242 /* Block */: { + case 244 /* Block */: { const blockParent = context.currentTokenParent.parent; - if (!blockParent || blockParent.kind !== 219 /* ArrowFunction */ && blockParent.kind !== 218 /* FunctionExpression */) { + if (!blockParent || blockParent.kind !== 221 /* ArrowFunction */ && blockParent.kind !== 220 /* FunctionExpression */) { return true; } } @@ -151266,29 +151524,29 @@ function isAfterCodeBlockContext(context) { } function isControlDeclContext(context) { switch (context.contextNode.kind) { - case 246 /* IfStatement */: - case 256 /* SwitchStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 248 /* WhileStatement */: - case 259 /* TryStatement */: - case 247 /* DoStatement */: - case 255 /* WithStatement */: - case 301 /* CatchClause */: + case 248 /* IfStatement */: + case 258 /* SwitchStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 250 /* WhileStatement */: + case 261 /* TryStatement */: + case 249 /* DoStatement */: + case 257 /* WithStatement */: + case 304 /* CatchClause */: return true; default: return false; } } function isObjectContext(context) { - return context.contextNode.kind === 210 /* ObjectLiteralExpression */; + return context.contextNode.kind === 212 /* ObjectLiteralExpression */; } function isFunctionCallContext(context) { - return context.contextNode.kind === 213 /* CallExpression */; + return context.contextNode.kind === 215 /* CallExpression */; } function isNewContext(context) { - return context.contextNode.kind === 214 /* NewExpression */; + return context.contextNode.kind === 216 /* NewExpression */; } function isFunctionCallOrNewContext(context) { return isFunctionCallContext(context) || isNewContext(context); @@ -151303,10 +151561,10 @@ function isNextTokenNotCloseParen(context) { return context.nextTokenSpan.kind !== 21 /* CloseParenToken */; } function isArrowFunctionContext(context) { - return context.contextNode.kind === 219 /* ArrowFunction */; + return context.contextNode.kind === 221 /* ArrowFunction */; } function isImportTypeContext(context) { - return context.contextNode.kind === 205 /* ImportType */; + return context.contextNode.kind === 207 /* ImportType */; } function isNonJsxSameLineTokenContext(context) { return context.TokensAreOnSameLine() && context.contextNode.kind !== 11 /* JsxText */; @@ -151315,19 +151573,19 @@ function isNonJsxTextContext(context) { return context.contextNode.kind !== 11 /* JsxText */; } function isNonJsxElementOrFragmentContext(context) { - return context.contextNode.kind !== 287 /* JsxElement */ && context.contextNode.kind !== 291 /* JsxFragment */; + return context.contextNode.kind !== 290 /* JsxElement */ && context.contextNode.kind !== 294 /* JsxFragment */; } function isJsxExpressionContext(context) { - return context.contextNode.kind === 297 /* JsxExpression */ || context.contextNode.kind === 296 /* JsxSpreadAttribute */; + return context.contextNode.kind === 300 /* JsxExpression */ || context.contextNode.kind === 299 /* JsxSpreadAttribute */; } function isNextTokenParentJsxAttribute(context) { - return context.nextTokenParent.kind === 294 /* JsxAttribute */; + return context.nextTokenParent.kind === 297 /* JsxAttribute */; } function isJsxAttributeContext(context) { - return context.contextNode.kind === 294 /* JsxAttribute */; + return context.contextNode.kind === 297 /* JsxAttribute */; } function isJsxSelfClosingElementContext(context) { - return context.contextNode.kind === 288 /* JsxSelfClosingElement */; + return context.contextNode.kind === 291 /* JsxSelfClosingElement */; } function isNotBeforeBlockInFunctionDeclarationContext(context) { return !isFunctionDeclContext(context) && !isBeforeBlockContext(context); @@ -151339,45 +151597,45 @@ function nodeIsInDecoratorContext(node) { while (node && isExpression(node)) { node = node.parent; } - return node && node.kind === 169 /* Decorator */; + return node && node.kind === 170 /* Decorator */; } function isStartOfVariableDeclarationList(context) { - return context.currentTokenParent.kind === 262 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; + return context.currentTokenParent.kind === 264 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; } function isNotFormatOnEnter(context) { return context.formattingRequestKind !== 2 /* FormatOnEnter */; } function isModuleDeclContext(context) { - return context.contextNode.kind === 270 /* ModuleDeclaration */; + return context.contextNode.kind === 273 /* ModuleDeclaration */; } function isObjectTypeContext(context) { - return context.contextNode.kind === 187 /* TypeLiteral */; + return context.contextNode.kind === 189 /* TypeLiteral */; } function isConstructorSignatureContext(context) { - return context.contextNode.kind === 180 /* ConstructSignature */; + return context.contextNode.kind === 182 /* ConstructSignature */; } function isTypeArgumentOrParameterOrAssertion(token, parent2) { if (token.kind !== 29 /* LessThanToken */ && token.kind !== 31 /* GreaterThanToken */) { return false; } switch (parent2.kind) { - case 183 /* TypeReference */: - case 216 /* TypeAssertionExpression */: - case 268 /* TypeAliasDeclaration */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 234 /* ExpressionWithTypeArguments */: + case 185 /* TypeReference */: + case 218 /* TypeAssertionExpression */: + case 271 /* TypeAliasDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 236 /* ExpressionWithTypeArguments */: return true; default: return false; @@ -151387,28 +151645,28 @@ function isTypeArgumentOrParameterOrAssertionContext(context) { return isTypeArgumentOrParameterOrAssertion(context.currentTokenSpan, context.currentTokenParent) || isTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); } function isTypeAssertionContext(context) { - return context.contextNode.kind === 216 /* TypeAssertionExpression */; + return context.contextNode.kind === 218 /* TypeAssertionExpression */; } function isVoidOpContext(context) { - return context.currentTokenSpan.kind === 115 /* VoidKeyword */ && context.currentTokenParent.kind === 223 /* VoidExpression */; + return context.currentTokenSpan.kind === 115 /* VoidKeyword */ && context.currentTokenParent.kind === 225 /* VoidExpression */; } function isYieldOrYieldStarWithOperand(context) { - return context.contextNode.kind === 230 /* YieldExpression */ && context.contextNode.expression !== void 0; + return context.contextNode.kind === 232 /* YieldExpression */ && context.contextNode.expression !== void 0; } function isNonNullAssertionContext(context) { - return context.contextNode.kind === 236 /* NonNullExpression */; + return context.contextNode.kind === 238 /* NonNullExpression */; } function isNotStatementConditionContext(context) { return !isStatementConditionContext(context); } function isStatementConditionContext(context) { switch (context.contextNode.kind) { - case 246 /* IfStatement */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 248 /* IfStatement */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: return true; default: return false; @@ -151434,16 +151692,16 @@ function isSemicolonDeletionContext(context) { if (startLine === endLine) { return nextTokenKind === 19 /* CloseBraceToken */ || nextTokenKind === 1 /* EndOfFileToken */; } - if (nextTokenKind === 241 /* SemicolonClassElement */ || nextTokenKind === 26 /* SemicolonToken */) { + if (nextTokenKind === 243 /* SemicolonClassElement */ || nextTokenKind === 26 /* SemicolonToken */) { return false; } - if (context.contextNode.kind === 267 /* InterfaceDeclaration */ || context.contextNode.kind === 268 /* TypeAliasDeclaration */) { + if (context.contextNode.kind === 270 /* InterfaceDeclaration */ || context.contextNode.kind === 271 /* TypeAliasDeclaration */) { return !isPropertySignature(context.currentTokenParent) || !!context.currentTokenParent.type || nextTokenKind !== 20 /* OpenParenToken */; } if (isPropertyDeclaration(context.currentTokenParent)) { return !context.currentTokenParent.initializer; } - return context.currentTokenParent.kind !== 249 /* ForStatement */ && context.currentTokenParent.kind !== 243 /* EmptyStatement */ && context.currentTokenParent.kind !== 241 /* SemicolonClassElement */ && nextTokenKind !== 22 /* OpenBracketToken */ && nextTokenKind !== 20 /* OpenParenToken */ && nextTokenKind !== 39 /* PlusToken */ && nextTokenKind !== 40 /* MinusToken */ && nextTokenKind !== 43 /* SlashToken */ && nextTokenKind !== 13 /* RegularExpressionLiteral */ && nextTokenKind !== 27 /* CommaToken */ && nextTokenKind !== 229 /* TemplateExpression */ && nextTokenKind !== 15 /* TemplateHead */ && nextTokenKind !== 14 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 24 /* DotToken */; + return context.currentTokenParent.kind !== 251 /* ForStatement */ && context.currentTokenParent.kind !== 245 /* EmptyStatement */ && context.currentTokenParent.kind !== 243 /* SemicolonClassElement */ && nextTokenKind !== 22 /* OpenBracketToken */ && nextTokenKind !== 20 /* OpenParenToken */ && nextTokenKind !== 39 /* PlusToken */ && nextTokenKind !== 40 /* MinusToken */ && nextTokenKind !== 43 /* SlashToken */ && nextTokenKind !== 13 /* RegularExpressionLiteral */ && nextTokenKind !== 27 /* CommaToken */ && nextTokenKind !== 231 /* TemplateExpression */ && nextTokenKind !== 15 /* TemplateHead */ && nextTokenKind !== 14 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 24 /* DotToken */; } function isSemicolonInsertionContext(context) { return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile); @@ -151518,12 +151776,12 @@ function buildMap(rules) { return map2; } function getRuleBucketIndex(row, column) { - Debug.assert(row <= 164 /* LastKeyword */ && column <= 164 /* LastKeyword */, "Must compute formatting context from tokens"); + Debug.assert(row <= 165 /* LastKeyword */ && column <= 165 /* LastKeyword */, "Must compute formatting context from tokens"); return row * mapRowLength + column; } var maskBitSize = 5; var mask = 31; -var mapRowLength = 164 /* LastToken */ + 1; +var mapRowLength = 165 /* LastToken */ + 1; var RulesPosition = ((RulesPosition2) => { RulesPosition2[RulesPosition2["StopRulesSpecific"] = 0] = "StopRulesSpecific"; RulesPosition2[RulesPosition2["StopRulesAny"] = maskBitSize * 1] = "StopRulesAny"; @@ -151633,18 +151891,18 @@ function findOutermostNodeWithinListLevel(node) { } function isListElement(parent2, node) { switch (parent2.kind) { - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: return rangeContainsRange(parent2.members, node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: const body = parent2.body; - return !!body && body.kind === 271 /* ModuleBlock */ && rangeContainsRange(body.statements, node); - case 314 /* SourceFile */: - case 242 /* Block */: - case 271 /* ModuleBlock */: + return !!body && body.kind === 274 /* ModuleBlock */ && rangeContainsRange(body.statements, node); + case 317 /* SourceFile */: + case 244 /* Block */: + case 274 /* ModuleBlock */: return rangeContainsRange(parent2.statements, node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return rangeContainsRange(parent2.block.statements, node); } return false; @@ -151858,26 +152116,26 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt return modifier.kind; } switch (node.kind) { - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return 84 /* ClassKeyword */; - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return 85 /* StructKeyword */; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return 119 /* InterfaceKeyword */; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return 99 /* FunctionKeyword */; - case 269 /* EnumDeclaration */: - return 269 /* EnumDeclaration */; - case 177 /* GetAccessor */: + case 272 /* EnumDeclaration */: + return 272 /* EnumDeclaration */; + case 179 /* GetAccessor */: return 138 /* GetKeyword */; - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return 152 /* SetKeyword */; - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: if (node.asteriskToken) { return 41 /* AsteriskToken */; } - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: const name = getNameOfDeclaration(node); if (name) { return name.kind; @@ -151917,15 +152175,15 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt case 43 /* SlashToken */: case 31 /* GreaterThanToken */: switch (container.kind) { - case 289 /* JsxOpeningElement */: - case 290 /* JsxClosingElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 293 /* JsxClosingElement */: + case 291 /* JsxSelfClosingElement */: return false; } break; case 22 /* OpenBracketToken */: case 23 /* CloseBracketToken */: - if (container.kind !== 200 /* MappedType */) { + if (container.kind !== 202 /* MappedType */) { return false; } break; @@ -152009,11 +152267,11 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt return inheritedIndentation; } } - const effectiveParentStartLine = child.kind === 169 /* Decorator */ ? childStartLine : undecoratedParentStartLine; + const effectiveParentStartLine = child.kind === 170 /* 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 === 209 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { + if (isFirstListItem && parent2.kind === 211 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { inheritedIndentation = childIndentation.indentation; } return inheritedIndentation; @@ -152386,50 +152644,50 @@ function getRangeOfEnclosingComment(sourceFile, position, precedingToken, tokenA } function getOpenTokenForList(node, list) { switch (node.kind) { - case 176 /* Constructor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 219 /* ArrowFunction */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* Constructor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 221 /* ArrowFunction */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: if (node.typeParameters === list) { return 29 /* LessThanToken */; } else if (node.parameters === list) { return 20 /* OpenParenToken */; } break; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: if (node.typeArguments === list) { return 29 /* LessThanToken */; } else if (node.arguments === list) { return 20 /* OpenParenToken */; } break; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: if (node.typeParameters === list) { return 29 /* LessThanToken */; } break; - case 183 /* TypeReference */: - case 215 /* TaggedTemplateExpression */: - case 186 /* TypeQuery */: - case 234 /* ExpressionWithTypeArguments */: - case 205 /* ImportType */: + case 185 /* TypeReference */: + case 217 /* TaggedTemplateExpression */: + case 188 /* TypeQuery */: + case 236 /* ExpressionWithTypeArguments */: + case 207 /* ImportType */: if (node.typeArguments === list) { return 29 /* LessThanToken */; } break; - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: return 18 /* OpenBraceToken */; } return 0 /* Unknown */; @@ -152512,11 +152770,11 @@ var SmartIndenter; } const lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line; const currentToken = getTokenAtPosition(sourceFile, position); - const isObjectLiteral = currentToken.kind === 18 /* OpenBraceToken */ && currentToken.parent.kind === 210 /* ObjectLiteralExpression */; + const isObjectLiteral = currentToken.kind === 18 /* OpenBraceToken */ && currentToken.parent.kind === 212 /* ObjectLiteralExpression */; if (options.indentStyle === 1 /* Block */ || isObjectLiteral) { return getBlockIndent(sourceFile, position, options); } - if (precedingToken.kind === 27 /* CommaToken */ && precedingToken.parent.kind !== 227 /* BinaryExpression */) { + if (precedingToken.kind === 27 /* CommaToken */ && precedingToken.parent.kind !== 229 /* BinaryExpression */) { const actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1 /* Unknown */) { return actualIndentation; @@ -152524,7 +152782,7 @@ var SmartIndenter; } const containerList = getListByPosition(position, precedingToken.parent, sourceFile); if (containerList && !rangeContainsRange(containerList, precedingToken)) { - const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; + const useTheSameBaseIndentation = [220 /* FunctionExpression */, 221 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize; return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize; } @@ -152633,7 +152891,7 @@ var SmartIndenter; } } function getActualIndentationForNode(current, parent2, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { - const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 314 /* SourceFile */ || !parentAndChildShareLine); + const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 317 /* SourceFile */ || !parentAndChildShareLine); if (!useActualIndentation) { return -1 /* Unknown */; } @@ -152671,7 +152929,7 @@ var SmartIndenter; } SmartIndenter2.isArgumentAndStartLineOverlapsExpressionBeingCalled = isArgumentAndStartLineOverlapsExpressionBeingCalled; function childStartsOnTheSameLineWithElseInIfStatement(parent2, child, childStartLine, sourceFile) { - if (parent2.kind === 246 /* IfStatement */ && parent2.elseStatement === child) { + if (parent2.kind === 248 /* IfStatement */ && parent2.elseStatement === child) { const elseKeyword = findChildOfKind(parent2, 92 /* ElseKeyword */, sourceFile); Debug.assert(elseKeyword !== void 0); const elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; @@ -152722,43 +152980,43 @@ var SmartIndenter; } function getListByRange(start, end, node, sourceFile) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return getList(node.typeArguments); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return getList(node.properties); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return getList(node.elements); - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: return getList(node.members); - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 176 /* Constructor */: - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 178 /* Constructor */: + case 187 /* ConstructorType */: + case 182 /* ConstructSignature */: return getList(node.typeParameters) || getList(node.parameters); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return getList(node.parameters); - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 353 /* JSDocTemplateTag */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 356 /* JSDocTemplateTag */: return getList(node.typeParameters); - case 214 /* NewExpression */: - case 213 /* CallExpression */: + case 216 /* NewExpression */: + case 215 /* CallExpression */: return getList(node.typeArguments) || getList(node.arguments); - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return getList(node.declarations); - case 278 /* NamedImports */: - case 282 /* NamedExports */: + case 281 /* NamedImports */: + case 285 /* NamedExports */: return getList(node.elements); - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: return getList(node.elements); } function getList(list) { @@ -152781,7 +153039,7 @@ var SmartIndenter; return findColumnForFirstNonWhitespaceCharacterInLine(sourceFile.getLineAndCharacterOfPosition(list.pos), sourceFile, options); } function getActualIndentationForListItem(node, sourceFile, options, listIndentsChild) { - if (node.parent && node.parent.kind === 262 /* VariableDeclarationList */) { + if (node.parent && node.parent.kind === 264 /* VariableDeclarationList */) { return -1 /* Unknown */; } const containingList = getContainingList(node, sourceFile); @@ -152842,96 +153100,96 @@ var SmartIndenter; function nodeWillIndentChild(settings, parent2, child, sourceFile, indentByDefault) { const childKind = child ? child.kind : 0 /* Unknown */; switch (parent2.kind) { - case 245 /* ExpressionStatement */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 209 /* ArrayLiteralExpression */: - case 242 /* Block */: - case 271 /* ModuleBlock */: - case 210 /* ObjectLiteralExpression */: - case 187 /* TypeLiteral */: - case 200 /* MappedType */: - case 189 /* TupleType */: - case 272 /* CaseBlock */: - case 299 /* DefaultClause */: - case 298 /* CaseClause */: - case 217 /* ParenthesizedExpression */: - case 211 /* PropertyAccessExpression */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 244 /* VariableStatement */: - case 280 /* ExportAssignment */: - case 254 /* ReturnStatement */: - case 228 /* ConditionalExpression */: - case 207 /* ArrayBindingPattern */: - case 206 /* ObjectBindingPattern */: - case 289 /* JsxOpeningElement */: - case 292 /* JsxOpeningFragment */: - case 288 /* JsxSelfClosingElement */: - case 297 /* JsxExpression */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 168 /* Parameter */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 196 /* ParenthesizedType */: - case 215 /* TaggedTemplateExpression */: - case 224 /* AwaitExpression */: - case 282 /* NamedExports */: - case 278 /* NamedImports */: - case 284 /* ExportSpecifier */: - case 279 /* ImportSpecifier */: - case 171 /* PropertyDeclaration */: + case 247 /* ExpressionStatement */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 211 /* ArrayLiteralExpression */: + case 244 /* Block */: + case 274 /* ModuleBlock */: + case 212 /* ObjectLiteralExpression */: + case 189 /* TypeLiteral */: + case 202 /* MappedType */: + case 191 /* TupleType */: + case 275 /* CaseBlock */: + case 302 /* DefaultClause */: + case 301 /* CaseClause */: + case 219 /* ParenthesizedExpression */: + case 213 /* PropertyAccessExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 246 /* VariableStatement */: + case 283 /* ExportAssignment */: + case 256 /* ReturnStatement */: + case 230 /* ConditionalExpression */: + case 209 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 292 /* JsxOpeningElement */: + case 295 /* JsxOpeningFragment */: + case 291 /* JsxSelfClosingElement */: + case 300 /* JsxExpression */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 169 /* Parameter */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 198 /* ParenthesizedType */: + case 217 /* TaggedTemplateExpression */: + case 226 /* AwaitExpression */: + case 285 /* NamedExports */: + case 281 /* NamedImports */: + case 287 /* ExportSpecifier */: + case 282 /* ImportSpecifier */: + case 172 /* PropertyDeclaration */: return true; - case 261 /* VariableDeclaration */: - case 305 /* PropertyAssignment */: - case 227 /* BinaryExpression */: - if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 210 /* ObjectLiteralExpression */) { + case 263 /* VariableDeclaration */: + case 308 /* PropertyAssignment */: + case 229 /* BinaryExpression */: + if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 212 /* ObjectLiteralExpression */) { return rangeIsOnOneLine(sourceFile, child); } - if (parent2.kind === 227 /* BinaryExpression */ && sourceFile && child && childKind === 287 /* JsxElement */) { + if (parent2.kind === 229 /* BinaryExpression */ && sourceFile && child && childKind === 290 /* 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 !== 227 /* BinaryExpression */) { + if (parent2.kind !== 229 /* BinaryExpression */) { return true; } break; - case 247 /* DoStatement */: - case 248 /* WhileStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 249 /* ForStatement */: - case 246 /* IfStatement */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return childKind !== 242 /* Block */; - case 219 /* ArrowFunction */: - if (sourceFile && childKind === 217 /* ParenthesizedExpression */) { + case 249 /* DoStatement */: + case 250 /* WhileStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 251 /* ForStatement */: + case 248 /* IfStatement */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + return childKind !== 244 /* Block */; + case 221 /* ArrowFunction */: + if (sourceFile && childKind === 219 /* ParenthesizedExpression */) { return rangeIsOnOneLine(sourceFile, child); } - return childKind !== 242 /* Block */; - case 281 /* ExportDeclaration */: - return childKind !== 282 /* NamedExports */; - case 275 /* ImportDeclaration */: - return childKind !== 276 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 278 /* NamedImports */; - case 287 /* JsxElement */: - return childKind !== 290 /* JsxClosingElement */; - case 291 /* JsxFragment */: - return childKind !== 293 /* JsxClosingFragment */; - case 193 /* IntersectionType */: - case 192 /* UnionType */: - if (childKind === 187 /* TypeLiteral */ || childKind === 189 /* TupleType */) { + return childKind !== 244 /* Block */; + case 284 /* ExportDeclaration */: + return childKind !== 285 /* NamedExports */; + case 278 /* ImportDeclaration */: + return childKind !== 279 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 281 /* NamedImports */; + case 290 /* JsxElement */: + return childKind !== 293 /* JsxClosingElement */; + case 294 /* JsxFragment */: + return childKind !== 296 /* JsxClosingFragment */; + case 195 /* IntersectionType */: + case 194 /* UnionType */: + if (childKind === 189 /* TypeLiteral */ || childKind === 191 /* TupleType */) { return false; } break; @@ -152941,11 +153199,11 @@ var SmartIndenter; SmartIndenter2.nodeWillIndentChild = nodeWillIndentChild; function isControlFlowEndingStatement(kind, parent2) { switch (kind) { - case 254 /* ReturnStatement */: - case 258 /* ThrowStatement */: - case 252 /* ContinueStatement */: - case 253 /* BreakStatement */: - return parent2.kind !== 242 /* Block */; + case 256 /* ReturnStatement */: + case 260 /* ThrowStatement */: + case 254 /* ContinueStatement */: + case 255 /* BreakStatement */: + return parent2.kind !== 244 /* Block */; default: return false; } @@ -153494,7 +153752,7 @@ var createLogicalNot = Debug.deprecate(function createLogicalNot2(operand) { }, factoryDeprecation); var createNode2 = Debug.deprecate(function createNode3(kind, pos = 0, end = 0) { return setTextRangePosEnd( - kind === 314 /* SourceFile */ ? parseBaseNodeFactory.createBaseSourceFileNode(kind) : kind === 79 /* Identifier */ ? parseBaseNodeFactory.createBaseIdentifierNode(kind) : kind === 80 /* PrivateIdentifier */ ? parseBaseNodeFactory.createBasePrivateIdentifierNode(kind) : !isNodeKind(kind) ? parseBaseNodeFactory.createBaseTokenNode(kind) : parseBaseNodeFactory.createBaseNode(kind), + kind === 317 /* SourceFile */ ? parseBaseNodeFactory.createBaseSourceFileNode(kind) : kind === 79 /* Identifier */ ? parseBaseNodeFactory.createBaseIdentifierNode(kind) : kind === 80 /* PrivateIdentifier */ ? parseBaseNodeFactory.createBasePrivateIdentifierNode(kind) : !isNodeKind(kind) ? parseBaseNodeFactory.createBaseTokenNode(kind) : parseBaseNodeFactory.createBaseNode(kind), pos, end ); @@ -153508,7 +153766,7 @@ var getMutableClone = Debug.deprecate(function getMutableClone2(node) { // src/deprecatedCompat/4.0/renamedNodeTests.ts var isTypeAssertion = Debug.deprecate(function isTypeAssertion2(node) { - return node.kind === 216 /* TypeAssertionExpression */; + return node.kind === 218 /* TypeAssertionExpression */; }, { since: "4.0", warnAfter: "4.1", @@ -154715,7 +154973,7 @@ function unwrapParenthesizedType(tsType) { function findParentIf(asExpr) { let node = asExpr.parent; while (node) { - if (node.kind === 246 /* IfStatement */) { + if (node.kind === 248 /* IfStatement */) { return node; } node = node.parent; @@ -154791,14 +155049,14 @@ function clearTrueSymbolAtLocationCache() { trueSymbolAtLocationCache.clear(); } function isTypeDeclSyntaxKind(kind) { - return isStructDeclarationKind(kind) || kind === 269 /* EnumDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */; + return isStructDeclarationKind(kind) || kind === 272 /* EnumDeclaration */ || kind === 266 /* ClassDeclaration */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */; } function symbolHasDuplicateName(symbol, tsDeclKind) { const symbolDecls = symbol == null ? void 0 : symbol.getDeclarations(); if (symbolDecls) { for (const symDecl of symbolDecls) { const declKind = symDecl.kind; - const isNamespaceTypeCollision = isTypeDeclSyntaxKind(declKind) && tsDeclKind === 270 /* ModuleDeclaration */ || isTypeDeclSyntaxKind(tsDeclKind) && declKind === 270 /* ModuleDeclaration */; + const isNamespaceTypeCollision = isTypeDeclSyntaxKind(declKind) && tsDeclKind === 273 /* ModuleDeclaration */ || isTypeDeclSyntaxKind(tsDeclKind) && declKind === 273 /* ModuleDeclaration */; if (declKind !== 79 /* Identifier */ && declKind !== tsDeclKind && !isNamespaceTypeCollision) return true; } @@ -154910,12 +155168,12 @@ function isCompileTimeExpression(tsExpr) { return isCompileTimeExpression(tsExpr.expression); } switch (tsExpr.kind) { - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return isPrefixUnaryExprValidEnumMemberInit(tsExpr); - case 217 /* ParenthesizedExpression */: - case 227 /* BinaryExpression */: + case 219 /* ParenthesizedExpression */: + case 229 /* BinaryExpression */: return isBinaryExprValidEnumMemberInit(tsExpr); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isConditionalExprValidEnumMemberInit(tsExpr); case 79 /* Identifier */: return isIdentifierValidEnumMemberInit(tsExpr); @@ -154923,7 +155181,7 @@ function isCompileTimeExpression(tsExpr) { return true; case 10 /* StringLiteral */: return true; - case 211 /* PropertyAccessExpression */: { + case 213 /* PropertyAccessExpression */: { const propertyAccess = tsExpr; if (isNumberConstantValue(propertyAccess)) { return true; @@ -154954,7 +155212,7 @@ function isConditionalExprValidEnumMemberInit(tsExpr) { function isIdentifierValidEnumMemberInit(tsExpr) { const tsSymbol = typeChecker.getSymbolAtLocation(tsExpr); const tsDecl = getDeclaration2(tsSymbol); - return !!tsDecl && (isVarDeclaration(tsDecl) && isConst(tsDecl.parent) || tsDecl.kind === 308 /* EnumMember */); + return !!tsDecl && (isVarDeclaration(tsDecl) && isConst(tsDecl.parent) || tsDecl.kind === 311 /* EnumMember */); } function isUnaryOpAllowedForEnumMemberInit(tsPrefixUnaryOp) { return tsPrefixUnaryOp === 39 /* PlusToken */ || tsPrefixUnaryOp === 40 /* MinusToken */ || tsPrefixUnaryOp === 54 /* TildeToken */; @@ -155131,7 +155389,7 @@ function validateObjectLiteralType(type) { return type !== void 0 && type.isClassOrInterface() && hasDefaultCtor(type) && !hasReadonlyFields(type) && !isAbstractClass(type); } function isStructDeclarationKind(kind) { - return kind === 265 /* StructDeclaration */; + return kind === 267 /* StructDeclaration */; } function isStructDeclaration2(node) { return isStructDeclarationKind(node.kind); @@ -155300,7 +155558,7 @@ function validateFields(type, objectLiteral) { return true; } function isSupportedTypeNodeKind(kind) { - return kind !== 132 /* AnyKeyword */ && kind !== 159 /* UnknownKeyword */ && kind !== 154 /* SymbolKeyword */ && kind !== 199 /* IndexedAccessType */ && kind !== 194 /* ConditionalType */ && kind !== 200 /* MappedType */ && kind !== 195 /* InferType */; + return kind !== 132 /* AnyKeyword */ && kind !== 159 /* UnknownKeyword */ && kind !== 154 /* SymbolKeyword */ && kind !== 201 /* IndexedAccessType */ && kind !== 196 /* ConditionalType */ && kind !== 202 /* MappedType */ && kind !== 197 /* InferType */; } function isSupportedType(typeNode) { if (isParenthesizedTypeNode(typeNode)) @@ -156302,28 +156560,28 @@ LinterConfig.terminalTokens = new Set2([ LinterConfig.incrementOnlyTokens = new Map2([ [132 /* AnyKeyword */, 0 /* AnyType */], [154 /* SymbolKeyword */, 1 /* SymbolType */], - [197 /* ThisType */, 56 /* ThisType */], - [186 /* TypeQuery */, 6 /* TypeQuery */], - [221 /* DeleteExpression */, 33 /* DeleteOperator */], + [199 /* ThisType */, 56 /* ThisType */], + [188 /* TypeQuery */, 6 /* TypeQuery */], + [223 /* DeleteExpression */, 33 /* DeleteOperator */], [13 /* RegularExpressionLiteral */, 7 /* RegexLiteral */], - [182 /* TypePredicate */, 8 /* IsOperator */], - [230 /* YieldExpression */, 10 /* YieldExpression */], - [181 /* IndexSignature */, 14 /* IndexMember */], - [255 /* WithStatement */, 15 /* WithStatement */], - [199 /* IndexedAccessType */, 17 /* IndexedAccessType */], + [184 /* TypePredicate */, 8 /* IsOperator */], + [232 /* YieldExpression */, 10 /* YieldExpression */], + [183 /* IndexSignature */, 14 /* IndexMember */], + [257 /* WithStatement */, 15 /* WithStatement */], + [201 /* IndexedAccessType */, 17 /* IndexedAccessType */], [159 /* UnknownKeyword */, 18 /* UnknownType */], [102 /* InKeyword */, 20 /* InOperator */], - [179 /* CallSignature */, 39 /* CallSignature */], - [193 /* IntersectionType */, 23 /* IntersectionType */], - [187 /* TypeLiteral */, 24 /* ObjectTypeLiteral */], - [185 /* ConstructorType */, 38 /* ConstructorFuncs */], + [181 /* CallSignature */, 39 /* CallSignature */], + [195 /* IntersectionType */, 23 /* IntersectionType */], + [189 /* TypeLiteral */, 24 /* ObjectTypeLiteral */], + [187 /* ConstructorType */, 38 /* ConstructorFuncs */], [80 /* PrivateIdentifier */, 41 /* PrivateIdentifier */], - [194 /* ConditionalType */, 43 /* ConditionalType */], - [200 /* MappedType */, 44 /* MappedType */], - [287 /* JsxElement */, 51 /* JsxElement */], - [288 /* JsxSelfClosingElement */, 51 /* JsxElement */], - [274 /* ImportEqualsDeclaration */, 61 /* ImportAssignment */], - [273 /* NamespaceExportDeclaration */, 67 /* UMDModuleDefinition */] + [196 /* ConditionalType */, 43 /* ConditionalType */], + [202 /* MappedType */, 44 /* MappedType */], + [290 /* JsxElement */, 51 /* JsxElement */], + [291 /* JsxSelfClosingElement */, 51 /* JsxElement */], + [277 /* ImportEqualsDeclaration */, 61 /* ImportAssignment */], + [276 /* NamespaceExportDeclaration */, 67 /* UMDModuleDefinition */] ]); // src/linter/ArkTSLinter_1_0/TypeScriptLinter.ts @@ -156332,53 +156590,53 @@ var _TypeScriptLinter = class { this.sourceFile = sourceFile; this.tscStrictDiagnostics = tscStrictDiagnostics; this.handlersMap = new Map2([ - [210 /* ObjectLiteralExpression */, this.handleObjectLiteralExpression], - [209 /* ArrayLiteralExpression */, this.handleArrayLiteralExpression], - [168 /* Parameter */, this.handleParameter], - [269 /* EnumDeclaration */, this.handleEnumDeclaration], - [267 /* InterfaceDeclaration */, this.handleInterfaceDeclaration], - [258 /* ThrowStatement */, this.handleThrowStatement], - [276 /* ImportClause */, this.handleImportClause], - [249 /* ForStatement */, this.handleForStatement], - [250 /* ForInStatement */, this.handleForInStatement], - [251 /* ForOfStatement */, this.handleForOfStatement], - [275 /* ImportDeclaration */, this.handleImportDeclaration], - [211 /* PropertyAccessExpression */, this.handlePropertyAccessExpression], - [171 /* PropertyDeclaration */, this.handlePropertyAssignmentOrDeclaration], - [305 /* PropertyAssignment */, this.handlePropertyAssignmentOrDeclaration], - [218 /* FunctionExpression */, this.handleFunctionExpression], - [219 /* ArrowFunction */, this.handleArrowFunction], - [232 /* ClassExpression */, this.handleClassExpression], - [301 /* CatchClause */, this.handleCatchClause], - [263 /* FunctionDeclaration */, this.handleFunctionDeclaration], - [225 /* PrefixUnaryExpression */, this.handlePrefixUnaryExpression], - [227 /* BinaryExpression */, this.handleBinaryExpression], - [262 /* VariableDeclarationList */, this.handleVariableDeclarationList], - [261 /* VariableDeclaration */, this.handleVariableDeclaration], - [264 /* ClassDeclaration */, this.handleClassDeclaration], - [270 /* ModuleDeclaration */, this.handleModuleDeclaration], - [268 /* TypeAliasDeclaration */, this.handleTypeAliasDeclaration], - [279 /* ImportSpecifier */, this.handleImportSpecifier], - [277 /* NamespaceImport */, this.handleNamespaceImport], - [216 /* TypeAssertionExpression */, this.handleTypeAssertionExpression], - [174 /* MethodDeclaration */, this.handleMethodDeclaration], + [212 /* ObjectLiteralExpression */, this.handleObjectLiteralExpression], + [211 /* ArrayLiteralExpression */, this.handleArrayLiteralExpression], + [169 /* Parameter */, this.handleParameter], + [272 /* EnumDeclaration */, this.handleEnumDeclaration], + [270 /* InterfaceDeclaration */, this.handleInterfaceDeclaration], + [260 /* ThrowStatement */, this.handleThrowStatement], + [279 /* ImportClause */, this.handleImportClause], + [251 /* ForStatement */, this.handleForStatement], + [252 /* ForInStatement */, this.handleForInStatement], + [253 /* ForOfStatement */, this.handleForOfStatement], + [278 /* ImportDeclaration */, this.handleImportDeclaration], + [213 /* PropertyAccessExpression */, this.handlePropertyAccessExpression], + [172 /* PropertyDeclaration */, this.handlePropertyAssignmentOrDeclaration], + [308 /* PropertyAssignment */, this.handlePropertyAssignmentOrDeclaration], + [220 /* FunctionExpression */, this.handleFunctionExpression], + [221 /* ArrowFunction */, this.handleArrowFunction], + [234 /* ClassExpression */, this.handleClassExpression], + [304 /* CatchClause */, this.handleCatchClause], + [265 /* FunctionDeclaration */, this.handleFunctionDeclaration], + [227 /* PrefixUnaryExpression */, this.handlePrefixUnaryExpression], + [229 /* BinaryExpression */, this.handleBinaryExpression], + [264 /* VariableDeclarationList */, this.handleVariableDeclarationList], + [263 /* VariableDeclaration */, this.handleVariableDeclaration], + [266 /* ClassDeclaration */, this.handleClassDeclaration], + [273 /* ModuleDeclaration */, this.handleModuleDeclaration], + [271 /* TypeAliasDeclaration */, this.handleTypeAliasDeclaration], + [282 /* ImportSpecifier */, this.handleImportSpecifier], + [280 /* NamespaceImport */, this.handleNamespaceImport], + [218 /* TypeAssertionExpression */, this.handleTypeAssertionExpression], + [176 /* MethodDeclaration */, this.handleMethodDeclaration], [79 /* Identifier */, this.handleIdentifier], - [212 /* ElementAccessExpression */, this.handleElementAccessExpression], - [308 /* EnumMember */, this.handleEnumMember], - [183 /* TypeReference */, this.handleTypeReference], - [280 /* ExportAssignment */, this.handleExportAssignment], - [213 /* CallExpression */, this.handleCallExpression], - [237 /* MetaProperty */, this.handleMetaProperty], - [214 /* NewExpression */, this.handleNewExpression], - [235 /* AsExpression */, this.handleAsExpression], - [231 /* SpreadElement */, this.handleSpreadOp], - [307 /* SpreadAssignment */, this.handleSpreadOp], - [177 /* GetAccessor */, this.handleGetAccessor], - [178 /* SetAccessor */, this.handleSetAccessor], - [180 /* ConstructSignature */, this.handleConstructSignature], - [234 /* ExpressionWithTypeArguments */, this.handleExpressionWithTypeArguments], - [166 /* ComputedPropertyName */, this.handleComputedPropertyName], - [175 /* ClassStaticBlockDeclaration */, this.handleClassStaticBlockDeclaration] + [214 /* ElementAccessExpression */, this.handleElementAccessExpression], + [311 /* EnumMember */, this.handleEnumMember], + [185 /* TypeReference */, this.handleTypeReference], + [283 /* ExportAssignment */, this.handleExportAssignment], + [215 /* CallExpression */, this.handleCallExpression], + [239 /* MetaProperty */, this.handleMetaProperty], + [216 /* NewExpression */, this.handleNewExpression], + [237 /* AsExpression */, this.handleAsExpression], + [233 /* SpreadElement */, this.handleSpreadOp], + [310 /* SpreadAssignment */, this.handleSpreadOp], + [179 /* GetAccessor */, this.handleGetAccessor], + [180 /* SetAccessor */, this.handleSetAccessor], + [182 /* ConstructSignature */, this.handleConstructSignature], + [236 /* ExpressionWithTypeArguments */, this.handleExpressionWithTypeArguments], + [167 /* ComputedPropertyName */, this.handleComputedPropertyName], + [177 /* ClassStaticBlockDeclaration */, this.handleClassStaticBlockDeclaration] ]); this.validatedTypesSet = new Set2(); _TypeScriptLinter.tsTypeChecker = tsProgram.getLinterTypeChecker(); @@ -156607,28 +156865,28 @@ var _TypeScriptLinter = class { if (!p.declarations) continue; const decl = p.declarations[0]; - if (decl.kind === 173 /* MethodSignature */) { + if (decl.kind === 175 /* MethodSignature */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 174 /* MethodDeclaration */) { + } else if (decl.kind === 176 /* MethodDeclaration */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 171 /* PropertyDeclaration */) { + } else if (decl.kind === 172 /* PropertyDeclaration */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 170 /* PropertySignature */) { + } else if (decl.kind === 171 /* PropertySignature */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, @@ -156656,7 +156914,7 @@ var _TypeScriptLinter = class { let noContextTypeForArrayLiteral = false; const arrayLitElements = arrayLitNode.elements; for (const element of arrayLitElements) { - if (element.kind === 210 /* ObjectLiteralExpression */) { + if (element.kind === 212 /* ObjectLiteralExpression */) { const objectLiteralType = _TypeScriptLinter.tsTypeChecker.getContextualType(element); if (!isDynamicLiteralInitializer(arrayLitNode) && !isExpressionAssignableToType(objectLiteralType, element)) { noContextTypeForArrayLiteral = true; @@ -156691,7 +156949,7 @@ var _TypeScriptLinter = class { return; let enumDeclCount = 0; for (const decl of enumDecls) { - if (decl.kind === 269 /* EnumDeclaration */) + if (decl.kind === 272 /* EnumDeclaration */) enumDeclCount++; } if (enumDeclCount > 1) @@ -156704,7 +156962,7 @@ var _TypeScriptLinter = class { if (iDecls) { let iDeclCount = 0; for (const decl of iDecls) { - if (decl.kind === 267 /* InterfaceDeclaration */) + if (decl.kind === 270 /* InterfaceDeclaration */) iDeclCount++; } if (iDeclCount > 1) @@ -157050,11 +157308,11 @@ var _TypeScriptLinter = class { } else if (tsBinaryExpr.operatorToken.kind === 27 /* CommaToken */) { let tsExprNode = tsBinaryExpr; let tsParentNode = tsExprNode.parent; - while (tsParentNode && tsParentNode.kind === 227 /* BinaryExpression */) { + while (tsParentNode && tsParentNode.kind === 229 /* BinaryExpression */) { tsExprNode = tsParentNode; tsParentNode = tsExprNode.parent; } - if (tsParentNode && tsParentNode.kind === 249 /* ForStatement */) { + if (tsParentNode && tsParentNode.kind === 251 /* ForStatement */) { const tsForNode = tsParentNode; if (tsExprNode === tsForNode.initializer || tsExprNode === tsForNode.incrementor) return; @@ -157193,15 +157451,15 @@ var _TypeScriptLinter = class { if (isModuleBlock(tsModuleBody)) { for (const tsModuleStmt of tsModuleBody.statements) { switch (tsModuleStmt.kind) { - case 244 /* VariableStatement */: - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 281 /* ExportDeclaration */: + case 246 /* VariableStatement */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 284 /* ExportDeclaration */: break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: break; default: this.incrementCounters(tsModuleStmt, 47 /* NonDeclarationInNamespace */); @@ -157323,7 +157581,7 @@ var _TypeScriptLinter = class { handleRestrictedValues(tsIdentifier, tsIdentSym) { const illegalValues = 128 /* ConstEnum */ | 256 /* RegularEnum */ | 512 /* ValueModule */ | 32 /* Class */; if ((tsIdentSym.flags & 512 /* ValueModule */) !== 0) { - if (!!tsIdentSym && symbolHasDuplicateName(tsIdentSym, 270 /* ModuleDeclaration */)) { + if (!!tsIdentSym && symbolHasDuplicateName(tsIdentSym, 273 /* ModuleDeclaration */)) { return; } } @@ -157449,7 +157707,7 @@ var _TypeScriptLinter = class { } handleGenericCallWithNoTypeArgs(callLikeExpr, callSignature) { var _a2, _b; - const tsSyntaxKind = isNewExpression(callLikeExpr) ? 176 /* Constructor */ : 263 /* FunctionDeclaration */; + const tsSyntaxKind = isNewExpression(callLikeExpr) ? 178 /* Constructor */ : 265 /* FunctionDeclaration */; const signDecl = _TypeScriptLinter.tsTypeChecker.signatureToSignatureDeclaration( callSignature, tsSyntaxKind, @@ -157642,10 +157900,10 @@ var _TypeScriptLinter = class { } handleConstructSignature(node) { switch (node.parent.kind) { - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: this.incrementCounters(node, 36 /* ConstructorType */); break; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: this.incrementCounters(node, 37 /* ConstructorIface */); break; default: @@ -158967,13 +159225,13 @@ var SENDABLE_DECORATOR = "Sendable"; var SENDABLE_INTERFACE = "ISendable"; var PROMISE = "Promise"; var SENDABLE_DECORATOR_NODES = [ - 264 /* ClassDeclaration */, - 263 /* FunctionDeclaration */, - 268 /* TypeAliasDeclaration */ + 266 /* ClassDeclaration */, + 265 /* FunctionDeclaration */, + 271 /* TypeAliasDeclaration */ ]; var SENDABLE_CLOSURE_DECLS = [ - 264 /* ClassDeclaration */, - 263 /* FunctionDeclaration */ + 266 /* ClassDeclaration */, + 265 /* FunctionDeclaration */ ]; var ARKTS_COLLECTIONS_D_ETS = "@arkts.collections.d.ets"; var COLLECTIONS_NAMESPACE = "collections"; @@ -159059,7 +159317,7 @@ function getInstanceofUnsupportedHighlightRange(nodeOrComment) { return getKeywordHighlightRange(nodeOrComment.operatorToken, "instanceof"); } function getConstAssertionHighlightRange(nodeOrComment) { - if (nodeOrComment.kind === 235 /* AsExpression */) { + if (nodeOrComment.kind === 237 /* AsExpression */) { return [ nodeOrComment.expression.getEnd() + 1, nodeOrComment.type.getStart() - 1 @@ -159072,11 +159330,11 @@ function getConstAssertionHighlightRange(nodeOrComment) { } function getLimitedReturnTypeInferenceHighlightRange(nodeOrComment) { let node; - if (nodeOrComment.kind === 218 /* FunctionExpression */) { + if (nodeOrComment.kind === 220 /* FunctionExpression */) { node = nodeOrComment.type; - } else if (nodeOrComment.kind === 263 /* FunctionDeclaration */) { + } else if (nodeOrComment.kind === 265 /* FunctionDeclaration */) { node = nodeOrComment.name; - } else if (nodeOrComment.kind === 174 /* MethodDeclaration */) { + } else if (nodeOrComment.kind === 176 /* MethodDeclaration */) { node = nodeOrComment.name; } if (node !== void 0) { @@ -159175,7 +159433,7 @@ function unwrapParenthesizedType2(tsType) { function findParentIf2(asExpr) { let node = asExpr.parent; while (node) { - if (node.kind === 246 /* IfStatement */) { + if (node.kind === 248 /* IfStatement */) { return node; } node = node.parent; @@ -159253,14 +159511,14 @@ function clearTrueSymbolAtLocationCache2() { trueSymbolAtLocationCache2.clear(); } function isTypeDeclSyntaxKind2(kind) { - return isStructDeclarationKind2(kind) || kind === 269 /* EnumDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */; + return isStructDeclarationKind2(kind) || kind === 272 /* EnumDeclaration */ || kind === 266 /* ClassDeclaration */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */; } function symbolHasDuplicateName2(symbol, tsDeclKind) { const symbolDecls = symbol == null ? void 0 : symbol.getDeclarations(); if (symbolDecls) { for (const symDecl of symbolDecls) { const declKind = symDecl.kind; - const isNamespaceTypeCollision = isTypeDeclSyntaxKind2(declKind) && tsDeclKind === 270 /* ModuleDeclaration */ || isTypeDeclSyntaxKind2(tsDeclKind) && declKind === 270 /* ModuleDeclaration */; + const isNamespaceTypeCollision = isTypeDeclSyntaxKind2(declKind) && tsDeclKind === 273 /* ModuleDeclaration */ || isTypeDeclSyntaxKind2(tsDeclKind) && declKind === 273 /* ModuleDeclaration */; if (declKind !== 79 /* Identifier */ && declKind !== tsDeclKind && !isNamespaceTypeCollision) return true; } @@ -159423,12 +159681,12 @@ function isCompileTimeExpression2(tsExpr) { return isCompileTimeExpression2(tsExpr.expression); } switch (tsExpr.kind) { - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return isPrefixUnaryExprValidEnumMemberInit2(tsExpr); - case 217 /* ParenthesizedExpression */: - case 227 /* BinaryExpression */: + case 219 /* ParenthesizedExpression */: + case 229 /* BinaryExpression */: return isBinaryExprValidEnumMemberInit2(tsExpr); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return isConditionalExprValidEnumMemberInit2(tsExpr); case 79 /* Identifier */: return isIdentifierValidEnumMemberInit2(tsExpr); @@ -159436,7 +159694,7 @@ function isCompileTimeExpression2(tsExpr) { return true; case 10 /* StringLiteral */: return true; - case 211 /* PropertyAccessExpression */: { + case 213 /* PropertyAccessExpression */: { const propertyAccess = tsExpr; if (isNumberConstantValue2(propertyAccess)) { return true; @@ -159467,7 +159725,7 @@ function isConditionalExprValidEnumMemberInit2(tsExpr) { function isIdentifierValidEnumMemberInit2(tsExpr) { const tsSymbol = typeChecker2.getSymbolAtLocation(tsExpr); const tsDecl = getDeclaration3(tsSymbol); - return !!tsDecl && (isVarDeclaration2(tsDecl) && isConst2(tsDecl.parent) || tsDecl.kind === 308 /* EnumMember */); + return !!tsDecl && (isVarDeclaration2(tsDecl) && isConst2(tsDecl.parent) || tsDecl.kind === 311 /* EnumMember */); } function isUnaryOpAllowedForEnumMemberInit2(tsPrefixUnaryOp) { return tsPrefixUnaryOp === 39 /* PlusToken */ || tsPrefixUnaryOp === 40 /* MinusToken */ || tsPrefixUnaryOp === 54 /* TildeToken */; @@ -159710,7 +159968,7 @@ function validateObjectLiteralType2(type) { return type !== void 0 && type.isClassOrInterface() && hasDefaultCtor2(type) && !hasReadonlyFields2(type) && !isAbstractClass2(type); } function isStructDeclarationKind2(kind) { - return kind === 265 /* StructDeclaration */; + return kind === 267 /* StructDeclaration */; } function isStructDeclaration3(node) { return isStructDeclarationKind2(node.kind); @@ -159847,7 +160105,7 @@ function validateField(type, prop) { return true; } function isSupportedTypeNodeKind2(kind) { - return kind !== 132 /* AnyKeyword */ && kind !== 159 /* UnknownKeyword */ && kind !== 154 /* SymbolKeyword */ && kind !== 199 /* IndexedAccessType */ && kind !== 194 /* ConditionalType */ && kind !== 200 /* MappedType */ && kind !== 195 /* InferType */; + return kind !== 132 /* AnyKeyword */ && kind !== 159 /* UnknownKeyword */ && kind !== 154 /* SymbolKeyword */ && kind !== 201 /* IndexedAccessType */ && kind !== 196 /* ConditionalType */ && kind !== 202 /* MappedType */ && kind !== 197 /* InferType */; } function isSupportedType2(typeNode) { if (isParenthesizedTypeNode(typeNode)) @@ -160615,7 +160873,7 @@ function getDecoratorsIfInSendableClass(declaration) { return getDecorators(declaration); } function getClassNodeFromDeclaration(declaration) { - if (declaration.kind === 168 /* Parameter */) { + if (declaration.kind === 169 /* Parameter */) { return isClassDeclaration(declaration.parent.parent) ? declaration.parent.parent : void 0; } return isClassDeclaration(declaration.parent) ? declaration.parent : void 0; @@ -161191,26 +161449,26 @@ LinterConfig2.terminalTokens = new Set2([ LinterConfig2.incrementOnlyTokens = new Map2([ [132 /* AnyKeyword */, 0 /* AnyType */], [154 /* SymbolKeyword */, 1 /* SymbolType */], - [197 /* ThisType */, 53 /* ThisType */], - [186 /* TypeQuery */, 6 /* TypeQuery */], - [221 /* DeleteExpression */, 30 /* DeleteOperator */], - [182 /* TypePredicate */, 7 /* IsOperator */], - [230 /* YieldExpression */, 9 /* YieldExpression */], - [255 /* WithStatement */, 14 /* WithStatement */], - [199 /* IndexedAccessType */, 16 /* IndexedAccessType */], + [199 /* ThisType */, 53 /* ThisType */], + [188 /* TypeQuery */, 6 /* TypeQuery */], + [223 /* DeleteExpression */, 30 /* DeleteOperator */], + [184 /* TypePredicate */, 7 /* IsOperator */], + [232 /* YieldExpression */, 9 /* YieldExpression */], + [257 /* WithStatement */, 14 /* WithStatement */], + [201 /* IndexedAccessType */, 16 /* IndexedAccessType */], [159 /* UnknownKeyword */, 17 /* UnknownType */], - [179 /* CallSignature */, 36 /* CallSignature */], - [193 /* IntersectionType */, 21 /* IntersectionType */], - [187 /* TypeLiteral */, 22 /* ObjectTypeLiteral */], - [185 /* ConstructorType */, 35 /* ConstructorFuncs */], + [181 /* CallSignature */, 36 /* CallSignature */], + [195 /* IntersectionType */, 21 /* IntersectionType */], + [189 /* TypeLiteral */, 22 /* ObjectTypeLiteral */], + [187 /* ConstructorType */, 35 /* ConstructorFuncs */], [80 /* PrivateIdentifier */, 38 /* PrivateIdentifier */], - [194 /* ConditionalType */, 40 /* ConditionalType */], - [200 /* MappedType */, 41 /* MappedType */], - [287 /* JsxElement */, 48 /* JsxElement */], - [288 /* JsxSelfClosingElement */, 48 /* JsxElement */], - [274 /* ImportEqualsDeclaration */, 57 /* ImportAssignment */], - [273 /* NamespaceExportDeclaration */, 63 /* UMDModuleDefinition */], - [232 /* ClassExpression */, 25 /* ClassExpression */] + [196 /* ConditionalType */, 40 /* ConditionalType */], + [202 /* MappedType */, 41 /* MappedType */], + [290 /* JsxElement */, 48 /* JsxElement */], + [291 /* JsxSelfClosingElement */, 48 /* JsxElement */], + [277 /* ImportEqualsDeclaration */, 57 /* ImportAssignment */], + [276 /* NamespaceExportDeclaration */, 63 /* UMDModuleDefinition */], + [234 /* ClassExpression */, 25 /* ClassExpression */] ]); // src/linter/ArkTSLinter_1_1/TypeScriptLinter.ts @@ -161221,60 +161479,60 @@ var _TypeScriptLinter2 = class { this.compatibleSdkVersionStage = "beta1"; this.compatibleSdkVersion = 12; this.handlersMap = new Map2([ - [210 /* ObjectLiteralExpression */, { handler: this.handleObjectLiteralExpression, name: "handleObjectLiteralExpression" }], - [209 /* ArrayLiteralExpression */, { handler: this.handleArrayLiteralExpression, name: "handleArrayLiteralExpression" }], - [168 /* Parameter */, { handler: this.handleParameter, name: "handleParameter" }], - [269 /* EnumDeclaration */, { handler: this.handleEnumDeclaration, name: "handleEnumDeclaration" }], - [267 /* InterfaceDeclaration */, { handler: this.handleInterfaceDeclaration, name: "handleInterfaceDeclaration" }], - [258 /* ThrowStatement */, { handler: this.handleThrowStatement, name: "handleThrowStatement" }], - [276 /* ImportClause */, { handler: this.handleImportClause, name: "handleImportClause" }], - [249 /* ForStatement */, { handler: this.handleForStatement, name: "handleForStatement" }], - [250 /* ForInStatement */, { handler: this.handleForInStatement, name: "handleForInStatement" }], - [251 /* ForOfStatement */, { handler: this.handleForOfStatement, name: "handleForOfStatement" }], - [275 /* ImportDeclaration */, { handler: this.handleImportDeclaration, name: "handleImportDeclaration" }], - [211 /* PropertyAccessExpression */, { handler: this.handlePropertyAccessExpression, name: "handlePropertyAccessExpression" }], - [171 /* PropertyDeclaration */, { handler: this.handlePropertyDeclaration, name: "handlePropertyDeclaration" }], - [305 /* PropertyAssignment */, { handler: this.handlePropertyAssignment, name: "handlePropertyAssignment" }], - [170 /* PropertySignature */, { handler: this.handlePropertySignature, name: "handlePropertySignature" }], - [218 /* FunctionExpression */, { handler: this.handleFunctionExpression, name: "handleFunctionExpression" }], - [219 /* ArrowFunction */, { handler: this.handleArrowFunction, name: "handleArrowFunction" }], - [301 /* CatchClause */, { handler: this.handleCatchClause, name: "handleCatchClause" }], - [263 /* FunctionDeclaration */, { handler: this.handleFunctionDeclaration, name: "handleFunctionDeclaration" }], - [225 /* PrefixUnaryExpression */, { handler: this.handlePrefixUnaryExpression, name: "handlePrefixUnaryExpression" }], - [227 /* BinaryExpression */, { handler: this.handleBinaryExpression, name: "handleBinaryExpression" }], - [262 /* VariableDeclarationList */, { handler: this.handleVariableDeclarationList, name: "handleVariableDeclarationList" }], - [261 /* VariableDeclaration */, { handler: this.handleVariableDeclaration, name: "handleVariableDeclaration" }], - [264 /* ClassDeclaration */, { handler: this.handleClassDeclaration, name: "handleClassDeclaration" }], - [270 /* ModuleDeclaration */, { handler: this.handleModuleDeclaration, name: "handleModuleDeclaration" }], - [268 /* TypeAliasDeclaration */, { handler: this.handleTypeAliasDeclaration, name: "handleTypeAliasDeclaration" }], - [279 /* ImportSpecifier */, { handler: this.handleImportSpecifier, name: "handleImportSpecifier" }], - [277 /* NamespaceImport */, { handler: this.handleNamespaceImport, name: "handleNamespaceImport" }], - [216 /* TypeAssertionExpression */, { handler: this.handleTypeAssertionExpression, name: "handleTypeAssertionExpression" }], - [174 /* MethodDeclaration */, { handler: this.handleMethodDeclaration, name: "handleMethodDeclaration" }], - [173 /* MethodSignature */, { handler: this.handleMethodSignature, name: "handleMethodSignature" }], + [212 /* ObjectLiteralExpression */, { handler: this.handleObjectLiteralExpression, name: "handleObjectLiteralExpression" }], + [211 /* ArrayLiteralExpression */, { handler: this.handleArrayLiteralExpression, name: "handleArrayLiteralExpression" }], + [169 /* Parameter */, { handler: this.handleParameter, name: "handleParameter" }], + [272 /* EnumDeclaration */, { handler: this.handleEnumDeclaration, name: "handleEnumDeclaration" }], + [270 /* InterfaceDeclaration */, { handler: this.handleInterfaceDeclaration, name: "handleInterfaceDeclaration" }], + [260 /* ThrowStatement */, { handler: this.handleThrowStatement, name: "handleThrowStatement" }], + [279 /* ImportClause */, { handler: this.handleImportClause, name: "handleImportClause" }], + [251 /* ForStatement */, { handler: this.handleForStatement, name: "handleForStatement" }], + [252 /* ForInStatement */, { handler: this.handleForInStatement, name: "handleForInStatement" }], + [253 /* ForOfStatement */, { handler: this.handleForOfStatement, name: "handleForOfStatement" }], + [278 /* ImportDeclaration */, { handler: this.handleImportDeclaration, name: "handleImportDeclaration" }], + [213 /* PropertyAccessExpression */, { handler: this.handlePropertyAccessExpression, name: "handlePropertyAccessExpression" }], + [172 /* PropertyDeclaration */, { handler: this.handlePropertyDeclaration, name: "handlePropertyDeclaration" }], + [308 /* PropertyAssignment */, { handler: this.handlePropertyAssignment, name: "handlePropertyAssignment" }], + [171 /* PropertySignature */, { handler: this.handlePropertySignature, name: "handlePropertySignature" }], + [220 /* FunctionExpression */, { handler: this.handleFunctionExpression, name: "handleFunctionExpression" }], + [221 /* ArrowFunction */, { handler: this.handleArrowFunction, name: "handleArrowFunction" }], + [304 /* CatchClause */, { handler: this.handleCatchClause, name: "handleCatchClause" }], + [265 /* FunctionDeclaration */, { handler: this.handleFunctionDeclaration, name: "handleFunctionDeclaration" }], + [227 /* PrefixUnaryExpression */, { handler: this.handlePrefixUnaryExpression, name: "handlePrefixUnaryExpression" }], + [229 /* BinaryExpression */, { handler: this.handleBinaryExpression, name: "handleBinaryExpression" }], + [264 /* VariableDeclarationList */, { handler: this.handleVariableDeclarationList, name: "handleVariableDeclarationList" }], + [263 /* VariableDeclaration */, { handler: this.handleVariableDeclaration, name: "handleVariableDeclaration" }], + [266 /* ClassDeclaration */, { handler: this.handleClassDeclaration, name: "handleClassDeclaration" }], + [273 /* ModuleDeclaration */, { handler: this.handleModuleDeclaration, name: "handleModuleDeclaration" }], + [271 /* TypeAliasDeclaration */, { handler: this.handleTypeAliasDeclaration, name: "handleTypeAliasDeclaration" }], + [282 /* ImportSpecifier */, { handler: this.handleImportSpecifier, name: "handleImportSpecifier" }], + [280 /* NamespaceImport */, { handler: this.handleNamespaceImport, name: "handleNamespaceImport" }], + [218 /* TypeAssertionExpression */, { handler: this.handleTypeAssertionExpression, name: "handleTypeAssertionExpression" }], + [176 /* MethodDeclaration */, { handler: this.handleMethodDeclaration, name: "handleMethodDeclaration" }], + [175 /* MethodSignature */, { handler: this.handleMethodSignature, name: "handleMethodSignature" }], [79 /* Identifier */, { handler: this.handleIdentifier, name: "handleIdentifier" }], - [212 /* ElementAccessExpression */, { handler: this.handleElementAccessExpression, name: "handleElementAccessExpression" }], - [308 /* EnumMember */, { handler: this.handleEnumMember, name: "handleEnumMember" }], - [183 /* TypeReference */, { handler: this.handleTypeReference, name: "handleTypeReference" }], - [280 /* ExportAssignment */, { handler: this.handleExportAssignment, name: "handleExportAssignment" }], - [213 /* CallExpression */, { handler: this.handleCallExpression, name: "handleCallExpression" }], - [237 /* MetaProperty */, { handler: this.handleMetaProperty, name: "handleMetaProperty" }], - [214 /* NewExpression */, { handler: this.handleNewExpression, name: "handleNewExpression" }], - [235 /* AsExpression */, { handler: this.handleAsExpression, name: "handleAsExpression" }], - [231 /* SpreadElement */, { handler: this.handleSpreadOp, name: "handleSpreadOp" }], - [307 /* SpreadAssignment */, { handler: this.handleSpreadOp, name: "handleSpreadOp" }], - [177 /* GetAccessor */, { handler: this.handleGetAccessor, name: "handleGetAccessor" }], - [178 /* SetAccessor */, { handler: this.handleSetAccessor, name: "handleSetAccessor" }], - [180 /* ConstructSignature */, { handler: this.handleConstructSignature, name: "handleConstructSignature" }], - [234 /* ExpressionWithTypeArguments */, { handler: this.handleExpressionWithTypeArguments, name: "handleExpressionWithTypeArguments" }], - [166 /* ComputedPropertyName */, { handler: this.handleComputedPropertyName, name: "handleComputedPropertyName" }], - [220 /* EtsComponentExpression */, { handler: this.handleEtsComponentExpression, name: "handleEtsComponentExpression" }], - [175 /* ClassStaticBlockDeclaration */, { handler: this.handleClassStaticBlockDeclaration, name: "handleClassStaticBlockDeclaration" }], - [181 /* IndexSignature */, { handler: this.handleIndexSignature, name: "handleIndexSignature" }], + [214 /* ElementAccessExpression */, { handler: this.handleElementAccessExpression, name: "handleElementAccessExpression" }], + [311 /* EnumMember */, { handler: this.handleEnumMember, name: "handleEnumMember" }], + [185 /* TypeReference */, { handler: this.handleTypeReference, name: "handleTypeReference" }], + [283 /* ExportAssignment */, { handler: this.handleExportAssignment, name: "handleExportAssignment" }], + [215 /* CallExpression */, { handler: this.handleCallExpression, name: "handleCallExpression" }], + [239 /* MetaProperty */, { handler: this.handleMetaProperty, name: "handleMetaProperty" }], + [216 /* NewExpression */, { handler: this.handleNewExpression, name: "handleNewExpression" }], + [237 /* AsExpression */, { handler: this.handleAsExpression, name: "handleAsExpression" }], + [233 /* SpreadElement */, { handler: this.handleSpreadOp, name: "handleSpreadOp" }], + [310 /* SpreadAssignment */, { handler: this.handleSpreadOp, name: "handleSpreadOp" }], + [179 /* GetAccessor */, { handler: this.handleGetAccessor, name: "handleGetAccessor" }], + [180 /* SetAccessor */, { handler: this.handleSetAccessor, name: "handleSetAccessor" }], + [182 /* ConstructSignature */, { handler: this.handleConstructSignature, name: "handleConstructSignature" }], + [236 /* ExpressionWithTypeArguments */, { handler: this.handleExpressionWithTypeArguments, name: "handleExpressionWithTypeArguments" }], + [167 /* ComputedPropertyName */, { handler: this.handleComputedPropertyName, name: "handleComputedPropertyName" }], + [222 /* EtsComponentExpression */, { handler: this.handleEtsComponentExpression, name: "handleEtsComponentExpression" }], + [177 /* ClassStaticBlockDeclaration */, { handler: this.handleClassStaticBlockDeclaration, name: "handleClassStaticBlockDeclaration" }], + [183 /* IndexSignature */, { handler: this.handleIndexSignature, name: "handleIndexSignature" }], [94 /* ExportKeyword */, { handler: this.handleExportKeyword, name: "handleExportKeyword" }], - [281 /* ExportDeclaration */, { handler: this.handleExportDeclaration, name: "handleExportDeclaration" }], - [254 /* ReturnStatement */, { handler: this.handleReturnStatement, name: "handleReturnStatement" }], - [169 /* Decorator */, { handler: this.handleDecorator, name: "handleDecorator" }] + [284 /* ExportDeclaration */, { handler: this.handleExportDeclaration, name: "handleExportDeclaration" }], + [256 /* ReturnStatement */, { handler: this.handleReturnStatement, name: "handleReturnStatement" }], + [170 /* Decorator */, { handler: this.handleDecorator, name: "handleDecorator" }] ]); this.validatedTypesSet = new Set2(); _TypeScriptLinter2.tsTypeChecker = tsProgram.getLinterTypeChecker(); @@ -161531,28 +161789,28 @@ var _TypeScriptLinter2 = class { if (!p.declarations) continue; const decl = p.declarations[0]; - if (decl.kind === 173 /* MethodSignature */) { + if (decl.kind === 175 /* MethodSignature */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 174 /* MethodDeclaration */) { + } else if (decl.kind === 176 /* MethodDeclaration */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 171 /* PropertyDeclaration */) { + } else if (decl.kind === 172 /* PropertyDeclaration */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, p.name, decl.type ); - } else if (decl.kind === 170 /* PropertySignature */) { + } else if (decl.kind === 171 /* PropertySignature */) { this.countInterfaceExtendsDifferentPropertyTypes( node, prop2type, @@ -161588,7 +161846,7 @@ var _TypeScriptLinter2 = class { const arrayLitElements = arrayLitNode.elements; for (const element of arrayLitElements) { const elementContextType = _TypeScriptLinter2.tsTypeChecker.getContextualType(element); - if (element.kind === 210 /* ObjectLiteralExpression */) { + if (element.kind === 212 /* ObjectLiteralExpression */) { if (!isDynamicLiteralInitializer2(arrayLitNode) && !isObjectLiteralAssignable2(elementContextType, element)) { noContextTypeForArrayLiteral = true; break; @@ -161628,7 +161886,7 @@ var _TypeScriptLinter2 = class { return; let enumDeclCount = 0; for (const decl of enumDecls) { - if (decl.kind === 269 /* EnumDeclaration */) + if (decl.kind === 272 /* EnumDeclaration */) enumDeclCount++; } if (enumDeclCount > 1) @@ -161641,7 +161899,7 @@ var _TypeScriptLinter2 = class { if (iDecls) { let iDeclCount = 0; for (const decl of iDecls) { - if (decl.kind === 267 /* InterfaceDeclaration */) + if (decl.kind === 270 /* InterfaceDeclaration */) iDeclCount++; } if (iDeclCount > 1) @@ -162093,11 +162351,11 @@ var _TypeScriptLinter2 = class { } else if (tsBinaryExpr.operatorToken.kind === 27 /* CommaToken */) { let tsExprNode = tsBinaryExpr; let tsParentNode = tsExprNode.parent; - while (tsParentNode && tsParentNode.kind === 227 /* BinaryExpression */) { + while (tsParentNode && tsParentNode.kind === 229 /* BinaryExpression */) { tsExprNode = tsParentNode; tsParentNode = tsExprNode.parent; } - if (tsParentNode && tsParentNode.kind === 249 /* ForStatement */) { + if (tsParentNode && tsParentNode.kind === 251 /* ForStatement */) { const tsForNode = tsParentNode; if (tsExprNode === tsForNode.initializer || tsExprNode === tsForNode.incrementor) return; @@ -162362,15 +162620,15 @@ var _TypeScriptLinter2 = class { if (isModuleBlock(tsModuleBody)) { for (const tsModuleStmt of tsModuleBody.statements) { switch (tsModuleStmt.kind) { - case 244 /* VariableStatement */: - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 269 /* EnumDeclaration */: - case 281 /* ExportDeclaration */: + case 246 /* VariableStatement */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 272 /* EnumDeclaration */: + case 284 /* ExportDeclaration */: break; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: break; default: this.incrementCounters(tsModuleStmt, 44 /* NonDeclarationInNamespace */); @@ -162497,7 +162755,7 @@ var _TypeScriptLinter2 = class { handleRestrictedValues(tsIdentifier, tsIdentSym) { const illegalValues = 128 /* ConstEnum */ | 256 /* RegularEnum */ | 512 /* ValueModule */ | 32 /* Class */; if ((tsIdentSym.flags & 512 /* ValueModule */) !== 0) { - if (!!tsIdentSym && symbolHasDuplicateName2(tsIdentSym, 270 /* ModuleDeclaration */)) { + if (!!tsIdentSym && symbolHasDuplicateName2(tsIdentSym, 273 /* ModuleDeclaration */)) { return; } } @@ -162793,25 +163051,25 @@ var _TypeScriptLinter2 = class { } isEsObjectPossiblyAllowed(typeRef) { switch (typeRef.parent.kind) { - case 261 /* VariableDeclaration */: - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: - case 184 /* FunctionType */: - case 170 /* PropertySignature */: - case 188 /* ArrayType */: - case 214 /* NewExpression */: + case 263 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: + case 186 /* FunctionType */: + case 171 /* PropertySignature */: + case 190 /* ArrayType */: + case 216 /* NewExpression */: return true; - case 219 /* ArrowFunction */: - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: + case 221 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: return this.isObjectLiteralFromFunc(typeRef.parent); - case 183 /* TypeReference */: + case 185 /* TypeReference */: const promiseType = typeRef.parent; if (promiseType.typeName.getText() === PROMISE) { return this.isObjectLiteralFromFunc(typeRef.parent.parent, true); } return true; - case 235 /* AsExpression */: + case 237 /* AsExpression */: return !isObjectLiteralExpression(typeRef.parent.expression); default: return false; @@ -162890,10 +163148,10 @@ var _TypeScriptLinter2 = class { } handleConstructSignature(node) { switch (node.parent.kind) { - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: this.incrementCounters(node, 33 /* ConstructorType */); break; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: this.incrementCounters(node, 34 /* ConstructorIface */); break; default: @@ -162970,9 +163228,9 @@ var _TypeScriptLinter2 = class { if (decl.exclamationToken === void 0) { return; } - if (decl.kind === 171 /* PropertyDeclaration */) { + if (decl.kind === 172 /* PropertyDeclaration */) { const parentDecl = decl.parent; - if (parentDecl.kind === 264 /* ClassDeclaration */ && hasSendableDecorator(parentDecl)) { + if (parentDecl.kind === 266 /* ClassDeclaration */ && hasSendableDecorator(parentDecl)) { this.incrementCounters(decl, 82 /* SendableDefiniteAssignment */); return; } @@ -163103,28 +163361,28 @@ var _TypeScriptLinter2 = class { return; } switch (parentNode.kind) { - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: if (isConstEnum(parentNode.symbol)) { break; } else { this.incrementCounters((_a2 = parentNode.name) != null ? _a2 : parentNode, 90 /* SharedModuleExports */); } return; - case 267 /* InterfaceDeclaration */: - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: + case 270 /* InterfaceDeclaration */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: if (!isShareableType(_TypeScriptLinter2.tsTypeChecker.getTypeAtLocation(parentNode))) { this.incrementCounters((_b = parentNode.name) != null ? _b : parentNode, 90 /* SharedModuleExports */); } return; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: for (const variableDeclaration of parentNode.declarationList.declarations) { if (!isShareableEntity(variableDeclaration.name)) { this.incrementCounters(variableDeclaration.name, 90 /* SharedModuleExports */); } } return; - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: if (!isShareableEntity(parentNode)) { this.incrementCounters(parentNode, 108 /* SharedModuleExportsWarning */); } @@ -163233,15 +163491,15 @@ var _InteropTypescriptLinter = class { this.D_ETS = ".d.ets"; this.ETS = ".ets"; this.handlersMap = new Map2([ - [275 /* ImportDeclaration */, this.handleImportDeclaration], - [267 /* InterfaceDeclaration */, this.handleInterfaceDeclaration], - [264 /* ClassDeclaration */, this.handleClassDeclaration], - [214 /* NewExpression */, this.handleNewExpression], - [210 /* ObjectLiteralExpression */, this.handleObjectLiteralExpression], - [209 /* ArrayLiteralExpression */, this.handleArrayLiteralExpression], - [235 /* AsExpression */, this.handleAsExpression], - [281 /* ExportDeclaration */, this.handleExportDeclaration], - [280 /* ExportAssignment */, this.handleExportAssignment] + [278 /* ImportDeclaration */, this.handleImportDeclaration], + [270 /* InterfaceDeclaration */, this.handleInterfaceDeclaration], + [266 /* ClassDeclaration */, this.handleClassDeclaration], + [216 /* NewExpression */, this.handleNewExpression], + [212 /* ObjectLiteralExpression */, this.handleObjectLiteralExpression], + [211 /* ArrayLiteralExpression */, this.handleArrayLiteralExpression], + [237 /* AsExpression */, this.handleAsExpression], + [284 /* ExportDeclaration */, this.handleExportDeclaration], + [283 /* ExportAssignment */, this.handleExportAssignment] ]); _InteropTypescriptLinter.tsTypeChecker = tsProgram.getLinterTypeChecker(); _InteropTypescriptLinter.etsLoaderPath = tsProgram.getCompilerOptions().etsLoaderPath; @@ -165713,6 +165971,9 @@ if (typeof console !== "undefined") { isOptionalTypeNode, isOuterExpression, isOutermostOptionalChain, + isOverloadDeclaration, + isOverloadElement, + isOverloadPropertyDeclaration, isOverrideModifier, isPackedArrayLiteral, isParameter, diff --git a/lib/typingsInstaller.js b/lib/typingsInstaller.js index 9bd973102a..6607490800 100644 --- a/lib/typingsInstaller.js +++ b/lib/typingsInstaller.js @@ -2947,208 +2947,211 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => { SyntaxKind4[SyntaxKind4["GlobalKeyword"] = 161] = "GlobalKeyword"; SyntaxKind4[SyntaxKind4["BigIntKeyword"] = 162] = "BigIntKeyword"; SyntaxKind4[SyntaxKind4["OverrideKeyword"] = 163] = "OverrideKeyword"; - SyntaxKind4[SyntaxKind4["OfKeyword"] = 164] = "OfKeyword"; - SyntaxKind4[SyntaxKind4["QualifiedName"] = 165] = "QualifiedName"; - SyntaxKind4[SyntaxKind4["ComputedPropertyName"] = 166] = "ComputedPropertyName"; - SyntaxKind4[SyntaxKind4["TypeParameter"] = 167] = "TypeParameter"; - SyntaxKind4[SyntaxKind4["Parameter"] = 168] = "Parameter"; - SyntaxKind4[SyntaxKind4["Decorator"] = 169] = "Decorator"; - SyntaxKind4[SyntaxKind4["PropertySignature"] = 170] = "PropertySignature"; - SyntaxKind4[SyntaxKind4["PropertyDeclaration"] = 171] = "PropertyDeclaration"; - SyntaxKind4[SyntaxKind4["AnnotationPropertyDeclaration"] = 172] = "AnnotationPropertyDeclaration"; - SyntaxKind4[SyntaxKind4["MethodSignature"] = 173] = "MethodSignature"; - SyntaxKind4[SyntaxKind4["MethodDeclaration"] = 174] = "MethodDeclaration"; - SyntaxKind4[SyntaxKind4["ClassStaticBlockDeclaration"] = 175] = "ClassStaticBlockDeclaration"; - SyntaxKind4[SyntaxKind4["Constructor"] = 176] = "Constructor"; - SyntaxKind4[SyntaxKind4["GetAccessor"] = 177] = "GetAccessor"; - SyntaxKind4[SyntaxKind4["SetAccessor"] = 178] = "SetAccessor"; - SyntaxKind4[SyntaxKind4["CallSignature"] = 179] = "CallSignature"; - SyntaxKind4[SyntaxKind4["ConstructSignature"] = 180] = "ConstructSignature"; - SyntaxKind4[SyntaxKind4["IndexSignature"] = 181] = "IndexSignature"; - SyntaxKind4[SyntaxKind4["TypePredicate"] = 182] = "TypePredicate"; - SyntaxKind4[SyntaxKind4["TypeReference"] = 183] = "TypeReference"; - SyntaxKind4[SyntaxKind4["FunctionType"] = 184] = "FunctionType"; - SyntaxKind4[SyntaxKind4["ConstructorType"] = 185] = "ConstructorType"; - SyntaxKind4[SyntaxKind4["TypeQuery"] = 186] = "TypeQuery"; - SyntaxKind4[SyntaxKind4["TypeLiteral"] = 187] = "TypeLiteral"; - SyntaxKind4[SyntaxKind4["ArrayType"] = 188] = "ArrayType"; - SyntaxKind4[SyntaxKind4["TupleType"] = 189] = "TupleType"; - SyntaxKind4[SyntaxKind4["OptionalType"] = 190] = "OptionalType"; - SyntaxKind4[SyntaxKind4["RestType"] = 191] = "RestType"; - SyntaxKind4[SyntaxKind4["UnionType"] = 192] = "UnionType"; - SyntaxKind4[SyntaxKind4["IntersectionType"] = 193] = "IntersectionType"; - SyntaxKind4[SyntaxKind4["ConditionalType"] = 194] = "ConditionalType"; - SyntaxKind4[SyntaxKind4["InferType"] = 195] = "InferType"; - SyntaxKind4[SyntaxKind4["ParenthesizedType"] = 196] = "ParenthesizedType"; - SyntaxKind4[SyntaxKind4["ThisType"] = 197] = "ThisType"; - SyntaxKind4[SyntaxKind4["TypeOperator"] = 198] = "TypeOperator"; - SyntaxKind4[SyntaxKind4["IndexedAccessType"] = 199] = "IndexedAccessType"; - SyntaxKind4[SyntaxKind4["MappedType"] = 200] = "MappedType"; - SyntaxKind4[SyntaxKind4["LiteralType"] = 201] = "LiteralType"; - SyntaxKind4[SyntaxKind4["NamedTupleMember"] = 202] = "NamedTupleMember"; - SyntaxKind4[SyntaxKind4["TemplateLiteralType"] = 203] = "TemplateLiteralType"; - SyntaxKind4[SyntaxKind4["TemplateLiteralTypeSpan"] = 204] = "TemplateLiteralTypeSpan"; - SyntaxKind4[SyntaxKind4["ImportType"] = 205] = "ImportType"; - SyntaxKind4[SyntaxKind4["ObjectBindingPattern"] = 206] = "ObjectBindingPattern"; - SyntaxKind4[SyntaxKind4["ArrayBindingPattern"] = 207] = "ArrayBindingPattern"; - SyntaxKind4[SyntaxKind4["BindingElement"] = 208] = "BindingElement"; - SyntaxKind4[SyntaxKind4["ArrayLiteralExpression"] = 209] = "ArrayLiteralExpression"; - SyntaxKind4[SyntaxKind4["ObjectLiteralExpression"] = 210] = "ObjectLiteralExpression"; - SyntaxKind4[SyntaxKind4["PropertyAccessExpression"] = 211] = "PropertyAccessExpression"; - SyntaxKind4[SyntaxKind4["ElementAccessExpression"] = 212] = "ElementAccessExpression"; - SyntaxKind4[SyntaxKind4["CallExpression"] = 213] = "CallExpression"; - SyntaxKind4[SyntaxKind4["NewExpression"] = 214] = "NewExpression"; - SyntaxKind4[SyntaxKind4["TaggedTemplateExpression"] = 215] = "TaggedTemplateExpression"; - SyntaxKind4[SyntaxKind4["TypeAssertionExpression"] = 216] = "TypeAssertionExpression"; - SyntaxKind4[SyntaxKind4["ParenthesizedExpression"] = 217] = "ParenthesizedExpression"; - SyntaxKind4[SyntaxKind4["FunctionExpression"] = 218] = "FunctionExpression"; - SyntaxKind4[SyntaxKind4["ArrowFunction"] = 219] = "ArrowFunction"; - SyntaxKind4[SyntaxKind4["EtsComponentExpression"] = 220] = "EtsComponentExpression"; - SyntaxKind4[SyntaxKind4["DeleteExpression"] = 221] = "DeleteExpression"; - SyntaxKind4[SyntaxKind4["TypeOfExpression"] = 222] = "TypeOfExpression"; - SyntaxKind4[SyntaxKind4["VoidExpression"] = 223] = "VoidExpression"; - SyntaxKind4[SyntaxKind4["AwaitExpression"] = 224] = "AwaitExpression"; - SyntaxKind4[SyntaxKind4["PrefixUnaryExpression"] = 225] = "PrefixUnaryExpression"; - SyntaxKind4[SyntaxKind4["PostfixUnaryExpression"] = 226] = "PostfixUnaryExpression"; - SyntaxKind4[SyntaxKind4["BinaryExpression"] = 227] = "BinaryExpression"; - SyntaxKind4[SyntaxKind4["ConditionalExpression"] = 228] = "ConditionalExpression"; - SyntaxKind4[SyntaxKind4["TemplateExpression"] = 229] = "TemplateExpression"; - SyntaxKind4[SyntaxKind4["YieldExpression"] = 230] = "YieldExpression"; - SyntaxKind4[SyntaxKind4["SpreadElement"] = 231] = "SpreadElement"; - SyntaxKind4[SyntaxKind4["ClassExpression"] = 232] = "ClassExpression"; - SyntaxKind4[SyntaxKind4["OmittedExpression"] = 233] = "OmittedExpression"; - SyntaxKind4[SyntaxKind4["ExpressionWithTypeArguments"] = 234] = "ExpressionWithTypeArguments"; - SyntaxKind4[SyntaxKind4["AsExpression"] = 235] = "AsExpression"; - SyntaxKind4[SyntaxKind4["NonNullExpression"] = 236] = "NonNullExpression"; - SyntaxKind4[SyntaxKind4["MetaProperty"] = 237] = "MetaProperty"; - SyntaxKind4[SyntaxKind4["SyntheticExpression"] = 238] = "SyntheticExpression"; - SyntaxKind4[SyntaxKind4["SatisfiesExpression"] = 239] = "SatisfiesExpression"; - SyntaxKind4[SyntaxKind4["TemplateSpan"] = 240] = "TemplateSpan"; - SyntaxKind4[SyntaxKind4["SemicolonClassElement"] = 241] = "SemicolonClassElement"; - SyntaxKind4[SyntaxKind4["Block"] = 242] = "Block"; - SyntaxKind4[SyntaxKind4["EmptyStatement"] = 243] = "EmptyStatement"; - SyntaxKind4[SyntaxKind4["VariableStatement"] = 244] = "VariableStatement"; - SyntaxKind4[SyntaxKind4["ExpressionStatement"] = 245] = "ExpressionStatement"; - SyntaxKind4[SyntaxKind4["IfStatement"] = 246] = "IfStatement"; - SyntaxKind4[SyntaxKind4["DoStatement"] = 247] = "DoStatement"; - SyntaxKind4[SyntaxKind4["WhileStatement"] = 248] = "WhileStatement"; - SyntaxKind4[SyntaxKind4["ForStatement"] = 249] = "ForStatement"; - SyntaxKind4[SyntaxKind4["ForInStatement"] = 250] = "ForInStatement"; - SyntaxKind4[SyntaxKind4["ForOfStatement"] = 251] = "ForOfStatement"; - SyntaxKind4[SyntaxKind4["ContinueStatement"] = 252] = "ContinueStatement"; - SyntaxKind4[SyntaxKind4["BreakStatement"] = 253] = "BreakStatement"; - SyntaxKind4[SyntaxKind4["ReturnStatement"] = 254] = "ReturnStatement"; - SyntaxKind4[SyntaxKind4["WithStatement"] = 255] = "WithStatement"; - SyntaxKind4[SyntaxKind4["SwitchStatement"] = 256] = "SwitchStatement"; - SyntaxKind4[SyntaxKind4["LabeledStatement"] = 257] = "LabeledStatement"; - SyntaxKind4[SyntaxKind4["ThrowStatement"] = 258] = "ThrowStatement"; - SyntaxKind4[SyntaxKind4["TryStatement"] = 259] = "TryStatement"; - SyntaxKind4[SyntaxKind4["DebuggerStatement"] = 260] = "DebuggerStatement"; - SyntaxKind4[SyntaxKind4["VariableDeclaration"] = 261] = "VariableDeclaration"; - SyntaxKind4[SyntaxKind4["VariableDeclarationList"] = 262] = "VariableDeclarationList"; - SyntaxKind4[SyntaxKind4["FunctionDeclaration"] = 263] = "FunctionDeclaration"; - SyntaxKind4[SyntaxKind4["ClassDeclaration"] = 264] = "ClassDeclaration"; - SyntaxKind4[SyntaxKind4["StructDeclaration"] = 265] = "StructDeclaration"; - SyntaxKind4[SyntaxKind4["AnnotationDeclaration"] = 266] = "AnnotationDeclaration"; - SyntaxKind4[SyntaxKind4["InterfaceDeclaration"] = 267] = "InterfaceDeclaration"; - SyntaxKind4[SyntaxKind4["TypeAliasDeclaration"] = 268] = "TypeAliasDeclaration"; - SyntaxKind4[SyntaxKind4["EnumDeclaration"] = 269] = "EnumDeclaration"; - SyntaxKind4[SyntaxKind4["ModuleDeclaration"] = 270] = "ModuleDeclaration"; - SyntaxKind4[SyntaxKind4["ModuleBlock"] = 271] = "ModuleBlock"; - SyntaxKind4[SyntaxKind4["CaseBlock"] = 272] = "CaseBlock"; - SyntaxKind4[SyntaxKind4["NamespaceExportDeclaration"] = 273] = "NamespaceExportDeclaration"; - SyntaxKind4[SyntaxKind4["ImportEqualsDeclaration"] = 274] = "ImportEqualsDeclaration"; - SyntaxKind4[SyntaxKind4["ImportDeclaration"] = 275] = "ImportDeclaration"; - SyntaxKind4[SyntaxKind4["ImportClause"] = 276] = "ImportClause"; - SyntaxKind4[SyntaxKind4["NamespaceImport"] = 277] = "NamespaceImport"; - SyntaxKind4[SyntaxKind4["NamedImports"] = 278] = "NamedImports"; - SyntaxKind4[SyntaxKind4["ImportSpecifier"] = 279] = "ImportSpecifier"; - SyntaxKind4[SyntaxKind4["ExportAssignment"] = 280] = "ExportAssignment"; - SyntaxKind4[SyntaxKind4["ExportDeclaration"] = 281] = "ExportDeclaration"; - SyntaxKind4[SyntaxKind4["NamedExports"] = 282] = "NamedExports"; - SyntaxKind4[SyntaxKind4["NamespaceExport"] = 283] = "NamespaceExport"; - SyntaxKind4[SyntaxKind4["ExportSpecifier"] = 284] = "ExportSpecifier"; - SyntaxKind4[SyntaxKind4["MissingDeclaration"] = 285] = "MissingDeclaration"; - SyntaxKind4[SyntaxKind4["ExternalModuleReference"] = 286] = "ExternalModuleReference"; - SyntaxKind4[SyntaxKind4["JsxElement"] = 287] = "JsxElement"; - SyntaxKind4[SyntaxKind4["JsxSelfClosingElement"] = 288] = "JsxSelfClosingElement"; - SyntaxKind4[SyntaxKind4["JsxOpeningElement"] = 289] = "JsxOpeningElement"; - SyntaxKind4[SyntaxKind4["JsxClosingElement"] = 290] = "JsxClosingElement"; - SyntaxKind4[SyntaxKind4["JsxFragment"] = 291] = "JsxFragment"; - SyntaxKind4[SyntaxKind4["JsxOpeningFragment"] = 292] = "JsxOpeningFragment"; - SyntaxKind4[SyntaxKind4["JsxClosingFragment"] = 293] = "JsxClosingFragment"; - SyntaxKind4[SyntaxKind4["JsxAttribute"] = 294] = "JsxAttribute"; - SyntaxKind4[SyntaxKind4["JsxAttributes"] = 295] = "JsxAttributes"; - SyntaxKind4[SyntaxKind4["JsxSpreadAttribute"] = 296] = "JsxSpreadAttribute"; - SyntaxKind4[SyntaxKind4["JsxExpression"] = 297] = "JsxExpression"; - SyntaxKind4[SyntaxKind4["CaseClause"] = 298] = "CaseClause"; - SyntaxKind4[SyntaxKind4["DefaultClause"] = 299] = "DefaultClause"; - SyntaxKind4[SyntaxKind4["HeritageClause"] = 300] = "HeritageClause"; - SyntaxKind4[SyntaxKind4["CatchClause"] = 301] = "CatchClause"; - SyntaxKind4[SyntaxKind4["AssertClause"] = 302] = "AssertClause"; - SyntaxKind4[SyntaxKind4["AssertEntry"] = 303] = "AssertEntry"; - SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 304] = "ImportTypeAssertionContainer"; - SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 305] = "PropertyAssignment"; - SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 306] = "ShorthandPropertyAssignment"; - SyntaxKind4[SyntaxKind4["SpreadAssignment"] = 307] = "SpreadAssignment"; - SyntaxKind4[SyntaxKind4["EnumMember"] = 308] = "EnumMember"; - SyntaxKind4[SyntaxKind4["UnparsedPrologue"] = 309] = "UnparsedPrologue"; - SyntaxKind4[SyntaxKind4["UnparsedPrepend"] = 310] = "UnparsedPrepend"; - SyntaxKind4[SyntaxKind4["UnparsedText"] = 311] = "UnparsedText"; - SyntaxKind4[SyntaxKind4["UnparsedInternalText"] = 312] = "UnparsedInternalText"; - SyntaxKind4[SyntaxKind4["UnparsedSyntheticReference"] = 313] = "UnparsedSyntheticReference"; - SyntaxKind4[SyntaxKind4["SourceFile"] = 314] = "SourceFile"; - SyntaxKind4[SyntaxKind4["Bundle"] = 315] = "Bundle"; - SyntaxKind4[SyntaxKind4["UnparsedSource"] = 316] = "UnparsedSource"; - SyntaxKind4[SyntaxKind4["InputFiles"] = 317] = "InputFiles"; - SyntaxKind4[SyntaxKind4["JSDocTypeExpression"] = 318] = "JSDocTypeExpression"; - SyntaxKind4[SyntaxKind4["JSDocNameReference"] = 319] = "JSDocNameReference"; - SyntaxKind4[SyntaxKind4["JSDocMemberName"] = 320] = "JSDocMemberName"; - SyntaxKind4[SyntaxKind4["JSDocAllType"] = 321] = "JSDocAllType"; - SyntaxKind4[SyntaxKind4["JSDocUnknownType"] = 322] = "JSDocUnknownType"; - SyntaxKind4[SyntaxKind4["JSDocNullableType"] = 323] = "JSDocNullableType"; - SyntaxKind4[SyntaxKind4["JSDocNonNullableType"] = 324] = "JSDocNonNullableType"; - SyntaxKind4[SyntaxKind4["JSDocOptionalType"] = 325] = "JSDocOptionalType"; - SyntaxKind4[SyntaxKind4["JSDocFunctionType"] = 326] = "JSDocFunctionType"; - SyntaxKind4[SyntaxKind4["JSDocVariadicType"] = 327] = "JSDocVariadicType"; - SyntaxKind4[SyntaxKind4["JSDocNamepathType"] = 328] = "JSDocNamepathType"; - SyntaxKind4[SyntaxKind4["JSDoc"] = 329] = "JSDoc"; - SyntaxKind4[SyntaxKind4["JSDocComment"] = 329 /* JSDoc */] = "JSDocComment"; - SyntaxKind4[SyntaxKind4["JSDocText"] = 330] = "JSDocText"; - SyntaxKind4[SyntaxKind4["JSDocTypeLiteral"] = 331] = "JSDocTypeLiteral"; - SyntaxKind4[SyntaxKind4["JSDocSignature"] = 332] = "JSDocSignature"; - SyntaxKind4[SyntaxKind4["JSDocLink"] = 333] = "JSDocLink"; - SyntaxKind4[SyntaxKind4["JSDocLinkCode"] = 334] = "JSDocLinkCode"; - SyntaxKind4[SyntaxKind4["JSDocLinkPlain"] = 335] = "JSDocLinkPlain"; - SyntaxKind4[SyntaxKind4["JSDocTag"] = 336] = "JSDocTag"; - SyntaxKind4[SyntaxKind4["JSDocAugmentsTag"] = 337] = "JSDocAugmentsTag"; - SyntaxKind4[SyntaxKind4["JSDocImplementsTag"] = 338] = "JSDocImplementsTag"; - SyntaxKind4[SyntaxKind4["JSDocAuthorTag"] = 339] = "JSDocAuthorTag"; - SyntaxKind4[SyntaxKind4["JSDocDeprecatedTag"] = 340] = "JSDocDeprecatedTag"; - SyntaxKind4[SyntaxKind4["JSDocClassTag"] = 341] = "JSDocClassTag"; - SyntaxKind4[SyntaxKind4["JSDocPublicTag"] = 342] = "JSDocPublicTag"; - SyntaxKind4[SyntaxKind4["JSDocPrivateTag"] = 343] = "JSDocPrivateTag"; - SyntaxKind4[SyntaxKind4["JSDocProtectedTag"] = 344] = "JSDocProtectedTag"; - SyntaxKind4[SyntaxKind4["JSDocReadonlyTag"] = 345] = "JSDocReadonlyTag"; - SyntaxKind4[SyntaxKind4["JSDocOverrideTag"] = 346] = "JSDocOverrideTag"; - SyntaxKind4[SyntaxKind4["JSDocCallbackTag"] = 347] = "JSDocCallbackTag"; - SyntaxKind4[SyntaxKind4["JSDocEnumTag"] = 348] = "JSDocEnumTag"; - SyntaxKind4[SyntaxKind4["JSDocParameterTag"] = 349] = "JSDocParameterTag"; - SyntaxKind4[SyntaxKind4["JSDocReturnTag"] = 350] = "JSDocReturnTag"; - SyntaxKind4[SyntaxKind4["JSDocThisTag"] = 351] = "JSDocThisTag"; - SyntaxKind4[SyntaxKind4["JSDocTypeTag"] = 352] = "JSDocTypeTag"; - SyntaxKind4[SyntaxKind4["JSDocTemplateTag"] = 353] = "JSDocTemplateTag"; - SyntaxKind4[SyntaxKind4["JSDocTypedefTag"] = 354] = "JSDocTypedefTag"; - SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 355] = "JSDocSeeTag"; - SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 356] = "JSDocPropertyTag"; - SyntaxKind4[SyntaxKind4["SyntaxList"] = 357] = "SyntaxList"; - SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 358] = "NotEmittedStatement"; - SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 359] = "PartiallyEmittedExpression"; - SyntaxKind4[SyntaxKind4["CommaListExpression"] = 360] = "CommaListExpression"; - SyntaxKind4[SyntaxKind4["MergeDeclarationMarker"] = 361] = "MergeDeclarationMarker"; - SyntaxKind4[SyntaxKind4["EndOfDeclarationMarker"] = 362] = "EndOfDeclarationMarker"; - SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 363] = "SyntheticReferenceExpression"; - SyntaxKind4[SyntaxKind4["Count"] = 364] = "Count"; + SyntaxKind4[SyntaxKind4["OverloadKeyword"] = 164] = "OverloadKeyword"; + SyntaxKind4[SyntaxKind4["OfKeyword"] = 165] = "OfKeyword"; + SyntaxKind4[SyntaxKind4["QualifiedName"] = 166] = "QualifiedName"; + SyntaxKind4[SyntaxKind4["ComputedPropertyName"] = 167] = "ComputedPropertyName"; + SyntaxKind4[SyntaxKind4["TypeParameter"] = 168] = "TypeParameter"; + SyntaxKind4[SyntaxKind4["Parameter"] = 169] = "Parameter"; + SyntaxKind4[SyntaxKind4["Decorator"] = 170] = "Decorator"; + SyntaxKind4[SyntaxKind4["PropertySignature"] = 171] = "PropertySignature"; + SyntaxKind4[SyntaxKind4["PropertyDeclaration"] = 172] = "PropertyDeclaration"; + SyntaxKind4[SyntaxKind4["AnnotationPropertyDeclaration"] = 173] = "AnnotationPropertyDeclaration"; + SyntaxKind4[SyntaxKind4["OverloadPropertyDeclaration"] = 174] = "OverloadPropertyDeclaration"; + SyntaxKind4[SyntaxKind4["MethodSignature"] = 175] = "MethodSignature"; + SyntaxKind4[SyntaxKind4["MethodDeclaration"] = 176] = "MethodDeclaration"; + SyntaxKind4[SyntaxKind4["ClassStaticBlockDeclaration"] = 177] = "ClassStaticBlockDeclaration"; + SyntaxKind4[SyntaxKind4["Constructor"] = 178] = "Constructor"; + SyntaxKind4[SyntaxKind4["GetAccessor"] = 179] = "GetAccessor"; + SyntaxKind4[SyntaxKind4["SetAccessor"] = 180] = "SetAccessor"; + SyntaxKind4[SyntaxKind4["CallSignature"] = 181] = "CallSignature"; + SyntaxKind4[SyntaxKind4["ConstructSignature"] = 182] = "ConstructSignature"; + SyntaxKind4[SyntaxKind4["IndexSignature"] = 183] = "IndexSignature"; + SyntaxKind4[SyntaxKind4["TypePredicate"] = 184] = "TypePredicate"; + SyntaxKind4[SyntaxKind4["TypeReference"] = 185] = "TypeReference"; + SyntaxKind4[SyntaxKind4["FunctionType"] = 186] = "FunctionType"; + SyntaxKind4[SyntaxKind4["ConstructorType"] = 187] = "ConstructorType"; + SyntaxKind4[SyntaxKind4["TypeQuery"] = 188] = "TypeQuery"; + SyntaxKind4[SyntaxKind4["TypeLiteral"] = 189] = "TypeLiteral"; + SyntaxKind4[SyntaxKind4["ArrayType"] = 190] = "ArrayType"; + SyntaxKind4[SyntaxKind4["TupleType"] = 191] = "TupleType"; + SyntaxKind4[SyntaxKind4["OptionalType"] = 192] = "OptionalType"; + SyntaxKind4[SyntaxKind4["RestType"] = 193] = "RestType"; + SyntaxKind4[SyntaxKind4["UnionType"] = 194] = "UnionType"; + SyntaxKind4[SyntaxKind4["IntersectionType"] = 195] = "IntersectionType"; + SyntaxKind4[SyntaxKind4["ConditionalType"] = 196] = "ConditionalType"; + SyntaxKind4[SyntaxKind4["InferType"] = 197] = "InferType"; + SyntaxKind4[SyntaxKind4["ParenthesizedType"] = 198] = "ParenthesizedType"; + SyntaxKind4[SyntaxKind4["ThisType"] = 199] = "ThisType"; + SyntaxKind4[SyntaxKind4["TypeOperator"] = 200] = "TypeOperator"; + SyntaxKind4[SyntaxKind4["IndexedAccessType"] = 201] = "IndexedAccessType"; + SyntaxKind4[SyntaxKind4["MappedType"] = 202] = "MappedType"; + SyntaxKind4[SyntaxKind4["LiteralType"] = 203] = "LiteralType"; + SyntaxKind4[SyntaxKind4["NamedTupleMember"] = 204] = "NamedTupleMember"; + SyntaxKind4[SyntaxKind4["TemplateLiteralType"] = 205] = "TemplateLiteralType"; + SyntaxKind4[SyntaxKind4["TemplateLiteralTypeSpan"] = 206] = "TemplateLiteralTypeSpan"; + SyntaxKind4[SyntaxKind4["ImportType"] = 207] = "ImportType"; + SyntaxKind4[SyntaxKind4["ObjectBindingPattern"] = 208] = "ObjectBindingPattern"; + SyntaxKind4[SyntaxKind4["ArrayBindingPattern"] = 209] = "ArrayBindingPattern"; + SyntaxKind4[SyntaxKind4["BindingElement"] = 210] = "BindingElement"; + SyntaxKind4[SyntaxKind4["ArrayLiteralExpression"] = 211] = "ArrayLiteralExpression"; + SyntaxKind4[SyntaxKind4["ObjectLiteralExpression"] = 212] = "ObjectLiteralExpression"; + SyntaxKind4[SyntaxKind4["PropertyAccessExpression"] = 213] = "PropertyAccessExpression"; + SyntaxKind4[SyntaxKind4["ElementAccessExpression"] = 214] = "ElementAccessExpression"; + SyntaxKind4[SyntaxKind4["CallExpression"] = 215] = "CallExpression"; + SyntaxKind4[SyntaxKind4["NewExpression"] = 216] = "NewExpression"; + SyntaxKind4[SyntaxKind4["TaggedTemplateExpression"] = 217] = "TaggedTemplateExpression"; + SyntaxKind4[SyntaxKind4["TypeAssertionExpression"] = 218] = "TypeAssertionExpression"; + SyntaxKind4[SyntaxKind4["ParenthesizedExpression"] = 219] = "ParenthesizedExpression"; + SyntaxKind4[SyntaxKind4["FunctionExpression"] = 220] = "FunctionExpression"; + SyntaxKind4[SyntaxKind4["ArrowFunction"] = 221] = "ArrowFunction"; + SyntaxKind4[SyntaxKind4["EtsComponentExpression"] = 222] = "EtsComponentExpression"; + SyntaxKind4[SyntaxKind4["DeleteExpression"] = 223] = "DeleteExpression"; + SyntaxKind4[SyntaxKind4["TypeOfExpression"] = 224] = "TypeOfExpression"; + SyntaxKind4[SyntaxKind4["VoidExpression"] = 225] = "VoidExpression"; + SyntaxKind4[SyntaxKind4["AwaitExpression"] = 226] = "AwaitExpression"; + SyntaxKind4[SyntaxKind4["PrefixUnaryExpression"] = 227] = "PrefixUnaryExpression"; + SyntaxKind4[SyntaxKind4["PostfixUnaryExpression"] = 228] = "PostfixUnaryExpression"; + SyntaxKind4[SyntaxKind4["BinaryExpression"] = 229] = "BinaryExpression"; + SyntaxKind4[SyntaxKind4["ConditionalExpression"] = 230] = "ConditionalExpression"; + SyntaxKind4[SyntaxKind4["TemplateExpression"] = 231] = "TemplateExpression"; + SyntaxKind4[SyntaxKind4["YieldExpression"] = 232] = "YieldExpression"; + SyntaxKind4[SyntaxKind4["SpreadElement"] = 233] = "SpreadElement"; + SyntaxKind4[SyntaxKind4["ClassExpression"] = 234] = "ClassExpression"; + SyntaxKind4[SyntaxKind4["OmittedExpression"] = 235] = "OmittedExpression"; + SyntaxKind4[SyntaxKind4["ExpressionWithTypeArguments"] = 236] = "ExpressionWithTypeArguments"; + SyntaxKind4[SyntaxKind4["AsExpression"] = 237] = "AsExpression"; + SyntaxKind4[SyntaxKind4["NonNullExpression"] = 238] = "NonNullExpression"; + SyntaxKind4[SyntaxKind4["MetaProperty"] = 239] = "MetaProperty"; + SyntaxKind4[SyntaxKind4["SyntheticExpression"] = 240] = "SyntheticExpression"; + SyntaxKind4[SyntaxKind4["SatisfiesExpression"] = 241] = "SatisfiesExpression"; + SyntaxKind4[SyntaxKind4["TemplateSpan"] = 242] = "TemplateSpan"; + SyntaxKind4[SyntaxKind4["SemicolonClassElement"] = 243] = "SemicolonClassElement"; + SyntaxKind4[SyntaxKind4["Block"] = 244] = "Block"; + SyntaxKind4[SyntaxKind4["EmptyStatement"] = 245] = "EmptyStatement"; + SyntaxKind4[SyntaxKind4["VariableStatement"] = 246] = "VariableStatement"; + SyntaxKind4[SyntaxKind4["ExpressionStatement"] = 247] = "ExpressionStatement"; + SyntaxKind4[SyntaxKind4["IfStatement"] = 248] = "IfStatement"; + SyntaxKind4[SyntaxKind4["DoStatement"] = 249] = "DoStatement"; + SyntaxKind4[SyntaxKind4["WhileStatement"] = 250] = "WhileStatement"; + SyntaxKind4[SyntaxKind4["ForStatement"] = 251] = "ForStatement"; + SyntaxKind4[SyntaxKind4["ForInStatement"] = 252] = "ForInStatement"; + SyntaxKind4[SyntaxKind4["ForOfStatement"] = 253] = "ForOfStatement"; + SyntaxKind4[SyntaxKind4["ContinueStatement"] = 254] = "ContinueStatement"; + SyntaxKind4[SyntaxKind4["BreakStatement"] = 255] = "BreakStatement"; + SyntaxKind4[SyntaxKind4["ReturnStatement"] = 256] = "ReturnStatement"; + SyntaxKind4[SyntaxKind4["WithStatement"] = 257] = "WithStatement"; + SyntaxKind4[SyntaxKind4["SwitchStatement"] = 258] = "SwitchStatement"; + SyntaxKind4[SyntaxKind4["LabeledStatement"] = 259] = "LabeledStatement"; + SyntaxKind4[SyntaxKind4["ThrowStatement"] = 260] = "ThrowStatement"; + SyntaxKind4[SyntaxKind4["TryStatement"] = 261] = "TryStatement"; + SyntaxKind4[SyntaxKind4["DebuggerStatement"] = 262] = "DebuggerStatement"; + SyntaxKind4[SyntaxKind4["VariableDeclaration"] = 263] = "VariableDeclaration"; + SyntaxKind4[SyntaxKind4["VariableDeclarationList"] = 264] = "VariableDeclarationList"; + SyntaxKind4[SyntaxKind4["FunctionDeclaration"] = 265] = "FunctionDeclaration"; + SyntaxKind4[SyntaxKind4["ClassDeclaration"] = 266] = "ClassDeclaration"; + SyntaxKind4[SyntaxKind4["StructDeclaration"] = 267] = "StructDeclaration"; + SyntaxKind4[SyntaxKind4["AnnotationDeclaration"] = 268] = "AnnotationDeclaration"; + SyntaxKind4[SyntaxKind4["OverloadDeclaration"] = 269] = "OverloadDeclaration"; + SyntaxKind4[SyntaxKind4["InterfaceDeclaration"] = 270] = "InterfaceDeclaration"; + SyntaxKind4[SyntaxKind4["TypeAliasDeclaration"] = 271] = "TypeAliasDeclaration"; + SyntaxKind4[SyntaxKind4["EnumDeclaration"] = 272] = "EnumDeclaration"; + SyntaxKind4[SyntaxKind4["ModuleDeclaration"] = 273] = "ModuleDeclaration"; + SyntaxKind4[SyntaxKind4["ModuleBlock"] = 274] = "ModuleBlock"; + SyntaxKind4[SyntaxKind4["CaseBlock"] = 275] = "CaseBlock"; + SyntaxKind4[SyntaxKind4["NamespaceExportDeclaration"] = 276] = "NamespaceExportDeclaration"; + SyntaxKind4[SyntaxKind4["ImportEqualsDeclaration"] = 277] = "ImportEqualsDeclaration"; + SyntaxKind4[SyntaxKind4["ImportDeclaration"] = 278] = "ImportDeclaration"; + SyntaxKind4[SyntaxKind4["ImportClause"] = 279] = "ImportClause"; + SyntaxKind4[SyntaxKind4["NamespaceImport"] = 280] = "NamespaceImport"; + SyntaxKind4[SyntaxKind4["NamedImports"] = 281] = "NamedImports"; + SyntaxKind4[SyntaxKind4["ImportSpecifier"] = 282] = "ImportSpecifier"; + SyntaxKind4[SyntaxKind4["ExportAssignment"] = 283] = "ExportAssignment"; + SyntaxKind4[SyntaxKind4["ExportDeclaration"] = 284] = "ExportDeclaration"; + SyntaxKind4[SyntaxKind4["NamedExports"] = 285] = "NamedExports"; + SyntaxKind4[SyntaxKind4["NamespaceExport"] = 286] = "NamespaceExport"; + SyntaxKind4[SyntaxKind4["ExportSpecifier"] = 287] = "ExportSpecifier"; + SyntaxKind4[SyntaxKind4["MissingDeclaration"] = 288] = "MissingDeclaration"; + SyntaxKind4[SyntaxKind4["ExternalModuleReference"] = 289] = "ExternalModuleReference"; + SyntaxKind4[SyntaxKind4["JsxElement"] = 290] = "JsxElement"; + SyntaxKind4[SyntaxKind4["JsxSelfClosingElement"] = 291] = "JsxSelfClosingElement"; + SyntaxKind4[SyntaxKind4["JsxOpeningElement"] = 292] = "JsxOpeningElement"; + SyntaxKind4[SyntaxKind4["JsxClosingElement"] = 293] = "JsxClosingElement"; + SyntaxKind4[SyntaxKind4["JsxFragment"] = 294] = "JsxFragment"; + SyntaxKind4[SyntaxKind4["JsxOpeningFragment"] = 295] = "JsxOpeningFragment"; + SyntaxKind4[SyntaxKind4["JsxClosingFragment"] = 296] = "JsxClosingFragment"; + SyntaxKind4[SyntaxKind4["JsxAttribute"] = 297] = "JsxAttribute"; + SyntaxKind4[SyntaxKind4["JsxAttributes"] = 298] = "JsxAttributes"; + SyntaxKind4[SyntaxKind4["JsxSpreadAttribute"] = 299] = "JsxSpreadAttribute"; + SyntaxKind4[SyntaxKind4["JsxExpression"] = 300] = "JsxExpression"; + SyntaxKind4[SyntaxKind4["CaseClause"] = 301] = "CaseClause"; + SyntaxKind4[SyntaxKind4["DefaultClause"] = 302] = "DefaultClause"; + SyntaxKind4[SyntaxKind4["HeritageClause"] = 303] = "HeritageClause"; + SyntaxKind4[SyntaxKind4["CatchClause"] = 304] = "CatchClause"; + SyntaxKind4[SyntaxKind4["AssertClause"] = 305] = "AssertClause"; + SyntaxKind4[SyntaxKind4["AssertEntry"] = 306] = "AssertEntry"; + SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 307] = "ImportTypeAssertionContainer"; + SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 308] = "PropertyAssignment"; + SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 309] = "ShorthandPropertyAssignment"; + SyntaxKind4[SyntaxKind4["SpreadAssignment"] = 310] = "SpreadAssignment"; + SyntaxKind4[SyntaxKind4["EnumMember"] = 311] = "EnumMember"; + SyntaxKind4[SyntaxKind4["UnparsedPrologue"] = 312] = "UnparsedPrologue"; + SyntaxKind4[SyntaxKind4["UnparsedPrepend"] = 313] = "UnparsedPrepend"; + SyntaxKind4[SyntaxKind4["UnparsedText"] = 314] = "UnparsedText"; + SyntaxKind4[SyntaxKind4["UnparsedInternalText"] = 315] = "UnparsedInternalText"; + SyntaxKind4[SyntaxKind4["UnparsedSyntheticReference"] = 316] = "UnparsedSyntheticReference"; + SyntaxKind4[SyntaxKind4["SourceFile"] = 317] = "SourceFile"; + SyntaxKind4[SyntaxKind4["Bundle"] = 318] = "Bundle"; + SyntaxKind4[SyntaxKind4["UnparsedSource"] = 319] = "UnparsedSource"; + SyntaxKind4[SyntaxKind4["InputFiles"] = 320] = "InputFiles"; + SyntaxKind4[SyntaxKind4["JSDocTypeExpression"] = 321] = "JSDocTypeExpression"; + SyntaxKind4[SyntaxKind4["JSDocNameReference"] = 322] = "JSDocNameReference"; + SyntaxKind4[SyntaxKind4["JSDocMemberName"] = 323] = "JSDocMemberName"; + SyntaxKind4[SyntaxKind4["JSDocAllType"] = 324] = "JSDocAllType"; + SyntaxKind4[SyntaxKind4["JSDocUnknownType"] = 325] = "JSDocUnknownType"; + SyntaxKind4[SyntaxKind4["JSDocNullableType"] = 326] = "JSDocNullableType"; + SyntaxKind4[SyntaxKind4["JSDocNonNullableType"] = 327] = "JSDocNonNullableType"; + SyntaxKind4[SyntaxKind4["JSDocOptionalType"] = 328] = "JSDocOptionalType"; + SyntaxKind4[SyntaxKind4["JSDocFunctionType"] = 329] = "JSDocFunctionType"; + SyntaxKind4[SyntaxKind4["JSDocVariadicType"] = 330] = "JSDocVariadicType"; + SyntaxKind4[SyntaxKind4["JSDocNamepathType"] = 331] = "JSDocNamepathType"; + SyntaxKind4[SyntaxKind4["JSDoc"] = 332] = "JSDoc"; + SyntaxKind4[SyntaxKind4["JSDocComment"] = 332 /* JSDoc */] = "JSDocComment"; + SyntaxKind4[SyntaxKind4["JSDocText"] = 333] = "JSDocText"; + SyntaxKind4[SyntaxKind4["JSDocTypeLiteral"] = 334] = "JSDocTypeLiteral"; + SyntaxKind4[SyntaxKind4["JSDocSignature"] = 335] = "JSDocSignature"; + SyntaxKind4[SyntaxKind4["JSDocLink"] = 336] = "JSDocLink"; + SyntaxKind4[SyntaxKind4["JSDocLinkCode"] = 337] = "JSDocLinkCode"; + SyntaxKind4[SyntaxKind4["JSDocLinkPlain"] = 338] = "JSDocLinkPlain"; + SyntaxKind4[SyntaxKind4["JSDocTag"] = 339] = "JSDocTag"; + SyntaxKind4[SyntaxKind4["JSDocAugmentsTag"] = 340] = "JSDocAugmentsTag"; + SyntaxKind4[SyntaxKind4["JSDocImplementsTag"] = 341] = "JSDocImplementsTag"; + SyntaxKind4[SyntaxKind4["JSDocAuthorTag"] = 342] = "JSDocAuthorTag"; + SyntaxKind4[SyntaxKind4["JSDocDeprecatedTag"] = 343] = "JSDocDeprecatedTag"; + SyntaxKind4[SyntaxKind4["JSDocClassTag"] = 344] = "JSDocClassTag"; + SyntaxKind4[SyntaxKind4["JSDocPublicTag"] = 345] = "JSDocPublicTag"; + SyntaxKind4[SyntaxKind4["JSDocPrivateTag"] = 346] = "JSDocPrivateTag"; + SyntaxKind4[SyntaxKind4["JSDocProtectedTag"] = 347] = "JSDocProtectedTag"; + SyntaxKind4[SyntaxKind4["JSDocReadonlyTag"] = 348] = "JSDocReadonlyTag"; + SyntaxKind4[SyntaxKind4["JSDocOverrideTag"] = 349] = "JSDocOverrideTag"; + SyntaxKind4[SyntaxKind4["JSDocCallbackTag"] = 350] = "JSDocCallbackTag"; + SyntaxKind4[SyntaxKind4["JSDocEnumTag"] = 351] = "JSDocEnumTag"; + SyntaxKind4[SyntaxKind4["JSDocParameterTag"] = 352] = "JSDocParameterTag"; + SyntaxKind4[SyntaxKind4["JSDocReturnTag"] = 353] = "JSDocReturnTag"; + SyntaxKind4[SyntaxKind4["JSDocThisTag"] = 354] = "JSDocThisTag"; + SyntaxKind4[SyntaxKind4["JSDocTypeTag"] = 355] = "JSDocTypeTag"; + SyntaxKind4[SyntaxKind4["JSDocTemplateTag"] = 356] = "JSDocTemplateTag"; + SyntaxKind4[SyntaxKind4["JSDocTypedefTag"] = 357] = "JSDocTypedefTag"; + SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 358] = "JSDocSeeTag"; + SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 359] = "JSDocPropertyTag"; + SyntaxKind4[SyntaxKind4["SyntaxList"] = 360] = "SyntaxList"; + SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 361] = "NotEmittedStatement"; + SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 362] = "PartiallyEmittedExpression"; + SyntaxKind4[SyntaxKind4["CommaListExpression"] = 363] = "CommaListExpression"; + SyntaxKind4[SyntaxKind4["MergeDeclarationMarker"] = 364] = "MergeDeclarationMarker"; + SyntaxKind4[SyntaxKind4["EndOfDeclarationMarker"] = 365] = "EndOfDeclarationMarker"; + SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 366] = "SyntheticReferenceExpression"; + SyntaxKind4[SyntaxKind4["Count"] = 367] = "Count"; SyntaxKind4[SyntaxKind4["FirstAssignment"] = 63 /* EqualsToken */] = "FirstAssignment"; SyntaxKind4[SyntaxKind4["LastAssignment"] = 78 /* CaretEqualsToken */] = "LastAssignment"; SyntaxKind4[SyntaxKind4["FirstCompoundAssignment"] = 64 /* PlusEqualsToken */] = "FirstCompoundAssignment"; @@ -3156,15 +3159,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => { SyntaxKind4[SyntaxKind4["FirstReservedWord"] = 81 /* BreakKeyword */] = "FirstReservedWord"; SyntaxKind4[SyntaxKind4["LastReservedWord"] = 117 /* WithKeyword */] = "LastReservedWord"; SyntaxKind4[SyntaxKind4["FirstKeyword"] = 81 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind4[SyntaxKind4["LastKeyword"] = 164 /* OfKeyword */] = "LastKeyword"; + SyntaxKind4[SyntaxKind4["LastKeyword"] = 165 /* OfKeyword */] = "LastKeyword"; SyntaxKind4[SyntaxKind4["FirstFutureReservedWord"] = 118 /* ImplementsKeyword */] = "FirstFutureReservedWord"; SyntaxKind4[SyntaxKind4["LastFutureReservedWord"] = 126 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind4[SyntaxKind4["FirstTypeNode"] = 182 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind4[SyntaxKind4["LastTypeNode"] = 205 /* ImportType */] = "LastTypeNode"; + SyntaxKind4[SyntaxKind4["FirstTypeNode"] = 184 /* TypePredicate */] = "FirstTypeNode"; + SyntaxKind4[SyntaxKind4["LastTypeNode"] = 207 /* ImportType */] = "LastTypeNode"; SyntaxKind4[SyntaxKind4["FirstPunctuation"] = 18 /* OpenBraceToken */] = "FirstPunctuation"; SyntaxKind4[SyntaxKind4["LastPunctuation"] = 78 /* CaretEqualsToken */] = "LastPunctuation"; SyntaxKind4[SyntaxKind4["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind4[SyntaxKind4["LastToken"] = 164 /* LastKeyword */] = "LastToken"; + SyntaxKind4[SyntaxKind4["LastToken"] = 165 /* LastKeyword */] = "LastToken"; SyntaxKind4[SyntaxKind4["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; SyntaxKind4[SyntaxKind4["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; SyntaxKind4[SyntaxKind4["FirstLiteralToken"] = 8 /* NumericLiteral */] = "FirstLiteralToken"; @@ -3173,15 +3176,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => { SyntaxKind4[SyntaxKind4["LastTemplateToken"] = 17 /* TemplateTail */] = "LastTemplateToken"; SyntaxKind4[SyntaxKind4["FirstBinaryOperator"] = 29 /* LessThanToken */] = "FirstBinaryOperator"; SyntaxKind4[SyntaxKind4["LastBinaryOperator"] = 78 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind4[SyntaxKind4["FirstStatement"] = 244 /* VariableStatement */] = "FirstStatement"; - SyntaxKind4[SyntaxKind4["LastStatement"] = 260 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind4[SyntaxKind4["FirstNode"] = 165 /* QualifiedName */] = "FirstNode"; - SyntaxKind4[SyntaxKind4["FirstJSDocNode"] = 318 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind4[SyntaxKind4["LastJSDocNode"] = 356 /* JSDocPropertyTag */] = "LastJSDocNode"; - SyntaxKind4[SyntaxKind4["FirstJSDocTagNode"] = 336 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] = 356 /* JSDocPropertyTag */] = "LastJSDocTagNode"; + SyntaxKind4[SyntaxKind4["FirstStatement"] = 246 /* VariableStatement */] = "FirstStatement"; + SyntaxKind4[SyntaxKind4["LastStatement"] = 262 /* DebuggerStatement */] = "LastStatement"; + SyntaxKind4[SyntaxKind4["FirstNode"] = 166 /* QualifiedName */] = "FirstNode"; + SyntaxKind4[SyntaxKind4["FirstJSDocNode"] = 321 /* JSDocTypeExpression */] = "FirstJSDocNode"; + SyntaxKind4[SyntaxKind4["LastJSDocNode"] = 359 /* JSDocPropertyTag */] = "LastJSDocNode"; + SyntaxKind4[SyntaxKind4["FirstJSDocTagNode"] = 339 /* JSDocTag */] = "FirstJSDocTagNode"; + SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] = 359 /* JSDocPropertyTag */] = "LastJSDocTagNode"; SyntaxKind4[SyntaxKind4["FirstContextualKeyword"] = 127 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind4[SyntaxKind4["LastContextualKeyword"] = 164 /* OfKeyword */] = "LastContextualKeyword"; + SyntaxKind4[SyntaxKind4["LastContextualKeyword"] = 165 /* OfKeyword */] = "LastContextualKeyword"; return SyntaxKind4; })(SyntaxKind || {}); var NodeFlags = /* @__PURE__ */ ((NodeFlags3) => { @@ -7350,6 +7353,7 @@ var textToKeywordObj = { protected: 123 /* ProtectedKeyword */, public: 124 /* PublicKeyword */, override: 163 /* OverrideKeyword */, + overload: 164 /* OverloadKeyword */, out: 146 /* OutKeyword */, readonly: 147 /* ReadonlyKeyword */, require: 148 /* RequireKeyword */, @@ -7380,7 +7384,7 @@ var textToKeywordObj = { yield: 126 /* YieldKeyword */, async: 133 /* AsyncKeyword */, await: 134 /* AwaitKeyword */, - of: 164 /* OfKeyword */ + of: 165 /* OfKeyword */ }; var textToKeyword = new Map2(getEntries(textToKeywordObj)); var textToToken = new Map2(getEntries({ @@ -9325,7 +9329,7 @@ function createTextChangeRange(span, newLength) { } var unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0); function isParameterPropertyDeclaration(node, parent) { - return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent.kind === 176 /* Constructor */; + return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent.kind === 178 /* Constructor */; } function walkUpBindingElementsAndPatterns(binding) { let node = binding.parent; @@ -9339,14 +9343,14 @@ function getCombinedFlags(node, getFlags) { node = walkUpBindingElementsAndPatterns(node); } let flags = getFlags(node); - if (node.kind === 261 /* VariableDeclaration */) { + if (node.kind === 263 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 262 /* VariableDeclarationList */) { + if (node && node.kind === 264 /* VariableDeclarationList */) { flags |= getFlags(node); node = node.parent; } - if (node && node.kind === 244 /* VariableStatement */) { + if (node && node.kind === 246 /* VariableStatement */) { flags |= getFlags(node); } return flags; @@ -9417,30 +9421,30 @@ function nameForNamelessJSDocTypedef(declaration) { return getDeclarationIdentifier(hostNode); } switch (hostNode.kind) { - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); } break; - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: let expr = hostNode.expression; - if (expr.kind === 227 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { + if (expr.kind === 229 /* BinaryExpression */ && expr.operatorToken.kind === 63 /* EqualsToken */) { expr = expr.left; } switch (expr.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return expr.name; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: const arg = expr.argumentExpression; if (isIdentifier(arg)) { return arg; } } break; - case 217 /* ParenthesizedExpression */: { + case 219 /* ParenthesizedExpression */: { return getDeclarationIdentifier(hostNode.expression); } - case 257 /* LabeledStatement */: { + case 259 /* LabeledStatement */: { if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { return getDeclarationIdentifier(hostNode.statement); } @@ -9471,16 +9475,16 @@ function getNonAssignedNameOfDeclaration(declaration) { switch (declaration.kind) { case 79 /* Identifier */: return declaration; - case 356 /* JSDocPropertyTag */: - case 349 /* JSDocParameterTag */: { + case 359 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: { const { name } = declaration; - if (name.kind === 165 /* QualifiedName */) { + if (name.kind === 166 /* QualifiedName */) { return name.right; } break; } - case 213 /* CallExpression */: - case 227 /* BinaryExpression */: { + case 215 /* CallExpression */: + case 229 /* BinaryExpression */: { const expr2 = declaration; switch (getAssignmentDeclarationKind(expr2)) { case 1 /* ExportsProperty */: @@ -9496,15 +9500,15 @@ function getNonAssignedNameOfDeclaration(declaration) { return void 0; } } - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 348 /* JSDocEnumTag */: + case 351 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); - case 280 /* ExportAssignment */: { + case 283 /* ExportAssignment */: { const { expression } = declaration; return isIdentifier(expression) ? expression : void 0; } - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: const expr = declaration; if (isBindableStaticElementAccessExpression(expr)) { return expr.argumentExpression; @@ -9616,10 +9620,10 @@ function getFirstJSDocTag(node, predicate, noCache) { return find(getJSDocTagsWorker(node, noCache), predicate); } function getTextOfJSDocComment(comment) { - return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 330 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); + return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 333 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); } function formatJSDocLink(link) { - const kind = link.kind === 333 /* JSDocLink */ ? "link" : link.kind === 334 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; + const kind = link.kind === 336 /* JSDocLink */ ? "link" : link.kind === 337 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; const name = link.name ? entityNameToString(link.name) : ""; const space = link.name && link.text.startsWith("://") ? "" : " "; return `{@${kind} ${name}${space}${link.text}}`; @@ -9638,7 +9642,7 @@ function isCallChain(node) { } function isOptionalChain(node) { const kind = node.kind; - return !!(node.flags & 32 /* OptionalChain */) && (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */ || kind === 213 /* CallExpression */ || kind === 236 /* NonNullExpression */); + return !!(node.flags & 32 /* OptionalChain */) && (kind === 213 /* PropertyAccessExpression */ || kind === 214 /* ElementAccessExpression */ || kind === 215 /* CallExpression */ || kind === 238 /* NonNullExpression */); } function isOptionalChainRoot(node) { return isOptionalChain(node) && !isNonNullExpression(node) && !!node.questionDotToken; @@ -9650,7 +9654,7 @@ function isOutermostOptionalChain(node) { return !isOptionalChain(node.parent) || isOptionalChainRoot(node.parent) || node !== node.parent.expression; } function isNullishCoalesce(node) { - return node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; + return node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 60 /* QuestionQuestionToken */; } function skipPartiallyEmittedExpressions(node) { return skipOuterExpressions(node, 8 /* PartiallyEmittedExpressions */); @@ -9659,25 +9663,25 @@ function isNonNullChain(node) { return isNonNullExpression(node) && !!(node.flags & 32 /* OptionalChain */); } function isNamedExportBindings(node) { - return node.kind === 283 /* NamespaceExport */ || node.kind === 282 /* NamedExports */; + return node.kind === 286 /* NamespaceExport */ || node.kind === 285 /* NamedExports */; } function isUnparsedTextLike(node) { switch (node.kind) { - case 311 /* UnparsedText */: - case 312 /* UnparsedInternalText */: + case 314 /* UnparsedText */: + case 315 /* UnparsedInternalText */: return true; default: return false; } } function isUnparsedNode(node) { - return isUnparsedTextLike(node) || node.kind === 309 /* UnparsedPrologue */ || node.kind === 313 /* UnparsedSyntheticReference */; + return isUnparsedTextLike(node) || node.kind === 312 /* UnparsedPrologue */ || node.kind === 316 /* UnparsedSyntheticReference */; } function isNodeKind(kind) { - return kind >= 165 /* FirstNode */; + return kind >= 166 /* FirstNode */; } function isTokenKind(kind) { - return kind >= 0 /* FirstToken */ && kind <= 164 /* LastToken */; + return kind >= 0 /* FirstToken */ && kind <= 165 /* LastToken */; } function isToken(n) { return isTokenKind(n.kind); @@ -9742,15 +9746,15 @@ function isModifier(node) { } function isEntityName(node) { const kind = node.kind; - return kind === 165 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 166 /* 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 === 166 /* ComputedPropertyName */; + return kind === 79 /* Identifier */ || kind === 80 /* PrivateIdentifier */ || kind === 10 /* StringLiteral */ || kind === 8 /* NumericLiteral */ || kind === 167 /* ComputedPropertyName */; } function isBindingName(node) { const kind = node.kind; - return kind === 79 /* Identifier */ || kind === 206 /* ObjectBindingPattern */ || kind === 207 /* ArrayBindingPattern */; + return kind === 79 /* Identifier */ || kind === 208 /* ObjectBindingPattern */ || kind === 209 /* ArrayBindingPattern */; } function isFunctionLike(node) { return !!node && isFunctionLikeKind(node.kind); @@ -9763,13 +9767,13 @@ function isFunctionLikeDeclaration(node) { } function isFunctionLikeDeclarationKind(kind) { switch (kind) { - case 263 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 265 /* FunctionDeclaration */: + case 176 /* MethodDeclaration */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return true; default: return false; @@ -9777,14 +9781,14 @@ function isFunctionLikeDeclarationKind(kind) { } function isFunctionLikeKind(kind) { switch (kind) { - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 332 /* JSDocSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 184 /* FunctionType */: - case 326 /* JSDocFunctionType */: - case 185 /* ConstructorType */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 335 /* JSDocSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: + case 186 /* FunctionType */: + case 329 /* JSDocFunctionType */: + case 187 /* ConstructorType */: return true; default: return isFunctionLikeDeclarationKind(kind); @@ -9792,26 +9796,30 @@ function isFunctionLikeKind(kind) { } function isAnnotationElement(node) { const kind = node.kind; - return kind === 172 /* AnnotationPropertyDeclaration */; + return kind === 173 /* AnnotationPropertyDeclaration */; +} +function isOverloadElement(node) { + const kind = node.kind; + return kind === 174 /* OverloadPropertyDeclaration */; } function isClassElement(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 171 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 241 /* SemicolonClassElement */; + return kind === 178 /* Constructor */ || kind === 172 /* PropertyDeclaration */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 183 /* IndexSignature */ || kind === 177 /* ClassStaticBlockDeclaration */ || kind === 243 /* SemicolonClassElement */; } function isClassLike(node) { - return node && (node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */ || node.kind === 265 /* StructDeclaration */); + return node && (node.kind === 266 /* ClassDeclaration */ || node.kind === 234 /* ClassExpression */ || node.kind === 267 /* StructDeclaration */); } function isAccessor(node) { - return node && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */); + return node && (node.kind === 179 /* GetAccessor */ || node.kind === 180 /* SetAccessor */); } function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); } function isMethodOrAccessor(node) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return true; default: return false; @@ -9822,19 +9830,19 @@ function isModifierLike(node) { } function isTypeElement(node) { const kind = node.kind; - return kind === 180 /* ConstructSignature */ || kind === 179 /* CallSignature */ || kind === 170 /* PropertySignature */ || kind === 173 /* MethodSignature */ || kind === 181 /* IndexSignature */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 182 /* ConstructSignature */ || kind === 181 /* CallSignature */ || kind === 171 /* PropertySignature */ || kind === 175 /* MethodSignature */ || kind === 183 /* IndexSignature */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function isObjectLiteralElementLike(node) { const kind = node.kind; - return kind === 305 /* PropertyAssignment */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 307 /* SpreadAssignment */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 308 /* PropertyAssignment */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 310 /* SpreadAssignment */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } function isFunctionOrConstructorTypeNode(node) { switch (node.kind) { - case 184 /* FunctionType */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: return true; } return false; @@ -9842,50 +9850,50 @@ function isFunctionOrConstructorTypeNode(node) { function isBindingPattern(node) { if (node) { const kind = node.kind; - return kind === 207 /* ArrayBindingPattern */ || kind === 206 /* ObjectBindingPattern */; + return kind === 209 /* ArrayBindingPattern */ || kind === 208 /* ObjectBindingPattern */; } return false; } function isAssignmentPattern(node) { const kind = node.kind; - return kind === 209 /* ArrayLiteralExpression */ || kind === 210 /* ObjectLiteralExpression */; + return kind === 211 /* ArrayLiteralExpression */ || kind === 212 /* ObjectLiteralExpression */; } function isArrayBindingElement(node) { const kind = node.kind; - return kind === 208 /* BindingElement */ || kind === 233 /* OmittedExpression */; + return kind === 210 /* BindingElement */ || kind === 235 /* OmittedExpression */; } function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: return true; } return false; } function isTemplateLiteral(node) { const kind = node.kind; - return kind === 229 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; + return kind === 231 /* TemplateExpression */ || kind === 14 /* NoSubstitutionTemplateLiteral */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); } function isLeftHandSideExpressionKind(kind) { switch (kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 214 /* NewExpression */: - case 213 /* CallExpression */: - case 287 /* JsxElement */: - case 288 /* JsxSelfClosingElement */: - case 291 /* JsxFragment */: - case 215 /* TaggedTemplateExpression */: - case 209 /* ArrayLiteralExpression */: - case 217 /* ParenthesizedExpression */: - case 210 /* ObjectLiteralExpression */: - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 220 /* EtsComponentExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: + case 216 /* NewExpression */: + case 215 /* CallExpression */: + case 290 /* JsxElement */: + case 291 /* JsxSelfClosingElement */: + case 294 /* JsxFragment */: + case 217 /* TaggedTemplateExpression */: + case 211 /* ArrayLiteralExpression */: + case 219 /* ParenthesizedExpression */: + case 212 /* ObjectLiteralExpression */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: + case 222 /* EtsComponentExpression */: case 79 /* Identifier */: case 80 /* PrivateIdentifier */: case 13 /* RegularExpressionLiteral */: @@ -9893,15 +9901,15 @@ function isLeftHandSideExpressionKind(kind) { case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: case 96 /* FalseKeyword */: case 105 /* NullKeyword */: case 109 /* ThisKeyword */: case 111 /* TrueKeyword */: case 107 /* SuperKeyword */: - case 236 /* NonNullExpression */: - case 234 /* ExpressionWithTypeArguments */: - case 237 /* MetaProperty */: + case 238 /* NonNullExpression */: + case 236 /* ExpressionWithTypeArguments */: + case 239 /* MetaProperty */: case 101 /* ImportKeyword */: return true; default: @@ -9913,13 +9921,13 @@ function isUnaryExpression(node) { } function isUnaryExpressionKind(kind) { switch (kind) { - case 225 /* PrefixUnaryExpression */: - case 226 /* PostfixUnaryExpression */: - case 221 /* DeleteExpression */: - case 222 /* TypeOfExpression */: - case 223 /* VoidExpression */: - case 224 /* AwaitExpression */: - case 216 /* TypeAssertionExpression */: + case 227 /* PrefixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: + case 223 /* DeleteExpression */: + case 224 /* TypeOfExpression */: + case 225 /* VoidExpression */: + case 226 /* AwaitExpression */: + case 218 /* TypeAssertionExpression */: return true; default: return isLeftHandSideExpressionKind(kind); @@ -9930,23 +9938,23 @@ function isExpression(node) { } function isExpressionKind(kind) { switch (kind) { - case 228 /* ConditionalExpression */: - case 230 /* YieldExpression */: - case 219 /* ArrowFunction */: - case 227 /* BinaryExpression */: - case 231 /* SpreadElement */: - case 235 /* AsExpression */: - case 233 /* OmittedExpression */: - case 360 /* CommaListExpression */: - case 359 /* PartiallyEmittedExpression */: - case 239 /* SatisfiesExpression */: + case 230 /* ConditionalExpression */: + case 232 /* YieldExpression */: + case 221 /* ArrowFunction */: + case 229 /* BinaryExpression */: + case 233 /* SpreadElement */: + case 237 /* AsExpression */: + case 235 /* OmittedExpression */: + case 363 /* CommaListExpression */: + case 362 /* PartiallyEmittedExpression */: + case 241 /* SatisfiesExpression */: return true; default: return isUnaryExpressionKind(kind); } } function isForInOrOfStatement(node) { - return node.kind === 250 /* ForInStatement */ || node.kind === 251 /* ForOfStatement */; + return node.kind === 252 /* ForInStatement */ || node.kind === 253 /* ForOfStatement */; } function isConciseBody(node) { return isBlock(node) || isExpression(node); @@ -9956,24 +9964,24 @@ function isForInitializer(node) { } function isModuleBody(node) { const kind = node.kind; - return kind === 271 /* ModuleBlock */ || kind === 270 /* ModuleDeclaration */ || kind === 79 /* Identifier */; + return kind === 274 /* ModuleBlock */ || kind === 273 /* ModuleDeclaration */ || kind === 79 /* Identifier */; } function isNamedImportBindings(node) { const kind = node.kind; - return kind === 278 /* NamedImports */ || kind === 277 /* NamespaceImport */; + return kind === 281 /* NamedImports */ || kind === 280 /* NamespaceImport */; } function isDeclarationKind(kind) { - return kind === 219 /* ArrowFunction */ || kind === 208 /* BindingElement */ || kind === 264 /* ClassDeclaration */ || kind === 232 /* ClassExpression */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 265 /* StructDeclaration */ || kind === 266 /* AnnotationDeclaration */ || kind === 176 /* Constructor */ || kind === 269 /* EnumDeclaration */ || kind === 308 /* EnumMember */ || kind === 284 /* ExportSpecifier */ || kind === 263 /* FunctionDeclaration */ || kind === 218 /* FunctionExpression */ || kind === 177 /* GetAccessor */ || kind === 276 /* ImportClause */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 279 /* ImportSpecifier */ || kind === 267 /* InterfaceDeclaration */ || kind === 294 /* JsxAttribute */ || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 270 /* ModuleDeclaration */ || kind === 273 /* NamespaceExportDeclaration */ || kind === 277 /* NamespaceImport */ || kind === 283 /* NamespaceExport */ || kind === 168 /* Parameter */ || kind === 305 /* PropertyAssignment */ || kind === 171 /* PropertyDeclaration */ || kind === 172 /* AnnotationPropertyDeclaration */ || kind === 170 /* PropertySignature */ || kind === 178 /* SetAccessor */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 268 /* TypeAliasDeclaration */ || kind === 167 /* TypeParameter */ || kind === 261 /* VariableDeclaration */ || kind === 354 /* JSDocTypedefTag */ || kind === 347 /* JSDocCallbackTag */ || kind === 356 /* JSDocPropertyTag */; + return kind === 221 /* ArrowFunction */ || kind === 210 /* BindingElement */ || kind === 266 /* ClassDeclaration */ || kind === 234 /* ClassExpression */ || kind === 177 /* ClassStaticBlockDeclaration */ || kind === 267 /* StructDeclaration */ || kind === 268 /* AnnotationDeclaration */ || kind === 174 /* OverloadPropertyDeclaration */ || kind === 178 /* Constructor */ || kind === 272 /* EnumDeclaration */ || kind === 311 /* EnumMember */ || kind === 287 /* ExportSpecifier */ || kind === 265 /* FunctionDeclaration */ || kind === 220 /* FunctionExpression */ || kind === 179 /* GetAccessor */ || kind === 279 /* ImportClause */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 282 /* ImportSpecifier */ || kind === 270 /* InterfaceDeclaration */ || kind === 297 /* JsxAttribute */ || kind === 176 /* MethodDeclaration */ || kind === 175 /* MethodSignature */ || kind === 273 /* ModuleDeclaration */ || kind === 276 /* NamespaceExportDeclaration */ || kind === 280 /* NamespaceImport */ || kind === 286 /* NamespaceExport */ || kind === 169 /* Parameter */ || kind === 308 /* PropertyAssignment */ || kind === 172 /* PropertyDeclaration */ || kind === 173 /* AnnotationPropertyDeclaration */ || kind === 171 /* PropertySignature */ || kind === 180 /* SetAccessor */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 271 /* TypeAliasDeclaration */ || kind === 168 /* TypeParameter */ || kind === 263 /* VariableDeclaration */ || kind === 357 /* JSDocTypedefTag */ || kind === 350 /* JSDocCallbackTag */ || kind === 359 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { - return kind === 263 /* FunctionDeclaration */ || kind === 285 /* MissingDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 265 /* StructDeclaration */ || kind === 266 /* AnnotationDeclaration */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 269 /* EnumDeclaration */ || kind === 270 /* ModuleDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 281 /* ExportDeclaration */ || kind === 280 /* ExportAssignment */ || kind === 273 /* NamespaceExportDeclaration */; + return kind === 265 /* FunctionDeclaration */ || kind === 288 /* MissingDeclaration */ || kind === 266 /* ClassDeclaration */ || kind === 267 /* StructDeclaration */ || kind === 268 /* AnnotationDeclaration */ || kind === 269 /* OverloadDeclaration */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 272 /* EnumDeclaration */ || kind === 273 /* ModuleDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 284 /* ExportDeclaration */ || kind === 283 /* ExportAssignment */ || kind === 276 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 253 /* BreakStatement */ || kind === 252 /* ContinueStatement */ || kind === 260 /* DebuggerStatement */ || kind === 247 /* DoStatement */ || kind === 245 /* ExpressionStatement */ || kind === 243 /* EmptyStatement */ || kind === 250 /* ForInStatement */ || kind === 251 /* ForOfStatement */ || kind === 249 /* ForStatement */ || kind === 246 /* IfStatement */ || kind === 257 /* LabeledStatement */ || kind === 254 /* ReturnStatement */ || kind === 256 /* SwitchStatement */ || kind === 258 /* ThrowStatement */ || kind === 259 /* TryStatement */ || kind === 244 /* VariableStatement */ || kind === 248 /* WhileStatement */ || kind === 255 /* WithStatement */ || kind === 358 /* NotEmittedStatement */ || kind === 362 /* EndOfDeclarationMarker */ || kind === 361 /* MergeDeclarationMarker */; + return kind === 255 /* BreakStatement */ || kind === 254 /* ContinueStatement */ || kind === 262 /* DebuggerStatement */ || kind === 249 /* DoStatement */ || kind === 247 /* ExpressionStatement */ || kind === 245 /* EmptyStatement */ || kind === 252 /* ForInStatement */ || kind === 253 /* ForOfStatement */ || kind === 251 /* ForStatement */ || kind === 248 /* IfStatement */ || kind === 259 /* LabeledStatement */ || kind === 256 /* ReturnStatement */ || kind === 258 /* SwitchStatement */ || kind === 260 /* ThrowStatement */ || kind === 261 /* TryStatement */ || kind === 246 /* VariableStatement */ || kind === 250 /* WhileStatement */ || kind === 257 /* WithStatement */ || kind === 361 /* NotEmittedStatement */ || kind === 365 /* EndOfDeclarationMarker */ || kind === 364 /* MergeDeclarationMarker */; } function isDeclaration(node) { - if (node.kind === 167 /* TypeParameter */) { - return node.parent && node.parent.kind !== 353 /* JSDocTemplateTag */ || isInJSFile(node); + if (node.kind === 168 /* TypeParameter */) { + return node.parent && node.parent.kind !== 356 /* JSDocTemplateTag */ || isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -9988,10 +9996,10 @@ function isStatement(node) { return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); } function isBlockStatement(node) { - if (node.kind !== 242 /* Block */) + if (node.kind !== 244 /* Block */) return false; if (node.parent !== void 0) { - if (node.parent.kind === 259 /* TryStatement */ || node.parent.kind === 301 /* CatchClause */) { + if (node.parent.kind === 261 /* TryStatement */ || node.parent.kind === 304 /* CatchClause */) { return false; } } @@ -9999,37 +10007,37 @@ function isBlockStatement(node) { } function isStatementOrBlock(node) { const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 242 /* Block */; + return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 244 /* Block */; } function isModuleReference(node) { const kind = node.kind; - return kind === 286 /* ExternalModuleReference */ || kind === 165 /* QualifiedName */ || kind === 79 /* Identifier */; + return kind === 289 /* ExternalModuleReference */ || kind === 166 /* QualifiedName */ || kind === 79 /* Identifier */; } function isJsxTagNameExpression(node) { const kind = node.kind; - return kind === 109 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 211 /* PropertyAccessExpression */; + return kind === 109 /* ThisKeyword */ || kind === 79 /* Identifier */ || kind === 213 /* PropertyAccessExpression */; } function isJsxChild(node) { const kind = node.kind; - return kind === 287 /* JsxElement */ || kind === 297 /* JsxExpression */ || kind === 288 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 291 /* JsxFragment */; + return kind === 290 /* JsxElement */ || kind === 300 /* JsxExpression */ || kind === 291 /* JsxSelfClosingElement */ || kind === 11 /* JsxText */ || kind === 294 /* JsxFragment */; } function isJsxAttributeLike(node) { const kind = node.kind; - return kind === 294 /* JsxAttribute */ || kind === 296 /* JsxSpreadAttribute */; + return kind === 297 /* JsxAttribute */ || kind === 299 /* JsxSpreadAttribute */; } function isStringLiteralOrJsxExpression(node) { const kind = node.kind; - return kind === 10 /* StringLiteral */ || kind === 297 /* JsxExpression */; + return kind === 10 /* StringLiteral */ || kind === 300 /* JsxExpression */; } function isCaseOrDefaultClause(node) { const kind = node.kind; - return kind === 298 /* CaseClause */ || kind === 299 /* DefaultClause */; + return kind === 301 /* CaseClause */ || kind === 302 /* DefaultClause */; } function isJSDocNode(node) { - return node.kind >= 318 /* FirstJSDocNode */ && node.kind <= 356 /* LastJSDocNode */; + return node.kind >= 321 /* FirstJSDocNode */ && node.kind <= 359 /* LastJSDocNode */; } function isJSDocTag(node) { - return node.kind >= 336 /* FirstJSDocTagNode */ && node.kind <= 356 /* LastJSDocTagNode */; + return node.kind >= 339 /* FirstJSDocTagNode */ && node.kind <= 359 /* LastJSDocTagNode */; } function hasJSDocNodes(node) { const { jsDoc } = node; @@ -10167,7 +10175,7 @@ function aggregateChildData(node) { } } function getSourceFileOfNode(node) { - while (node && node.kind !== 314 /* SourceFile */) { + while (node && node.kind !== 317 /* SourceFile */) { node = node.parent; } return node; @@ -10224,7 +10232,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) { if (includeJsDoc && hasJSDocNodes(node)) { return getTokenPosOfNode(node.jsDoc[0], sourceFile); } - if (node.kind === 357 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 360 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return node.virtual ? node.pos : skipTrivia( @@ -10317,7 +10325,7 @@ function isBlockOrCatchScoped(declaration) { } function isCatchClauseVariableDeclarationOrBindingElement(declaration) { const node = getRootDeclaration(declaration); - return node.kind === 261 /* VariableDeclaration */ && node.parent.kind === 301 /* CatchClause */; + return node.kind === 263 /* VariableDeclaration */ && node.parent.kind === 304 /* CatchClause */; } function isAmbientModule(node) { return isModuleDeclaration(node) && (node.name.kind === 10 /* StringLiteral */ || isGlobalScopeAugmentation(node)); @@ -10333,34 +10341,34 @@ function isGlobalScopeAugmentation(module2) { } function isModuleAugmentationExternal(node) { switch (node.parent.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: return isExternalModule(node.parent); - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); } return false; } function isBlockScope(node, parentNode) { switch (node.kind) { - case 314 /* SourceFile */: - case 272 /* CaseBlock */: - case 301 /* CatchClause */: - case 270 /* ModuleDeclaration */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 175 /* ClassStaticBlockDeclaration */: + case 317 /* SourceFile */: + case 275 /* CaseBlock */: + case 304 /* CatchClause */: + case 273 /* ModuleDeclaration */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 178 /* Constructor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return true; - case 242 /* Block */: + case 244 /* Block */: return !isFunctionLikeOrClassStaticBlockDeclaration(parentNode); } return false; @@ -10376,7 +10384,7 @@ function declarationNameToString(name) { } } function isComputedNonLiteralName(name) { - return name.kind === 166 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); + return name.kind === 167 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); } function tryGetTextOfPropertyName(name) { switch (name.kind) { @@ -10387,7 +10395,7 @@ function tryGetTextOfPropertyName(name) { case 8 /* NumericLiteral */: case 14 /* NoSubstitutionTemplateLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return void 0; @@ -10405,15 +10413,15 @@ function entityNameToString(name) { case 80 /* PrivateIdentifier */: case 79 /* Identifier */: return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { return Debug.assertNever(name.name); } - case 320 /* JSDocMemberName */: + case 323 /* JSDocMemberName */: return entityNameToString(name.left) + entityNameToString(name.right); default: return Debug.assertNever(name); @@ -10439,7 +10447,7 @@ function getSpanOfTokenAtPosition(sourceFile, pos) { } function getErrorSpanForArrowFunction(sourceFile, node) { const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 242 /* Block */) { + if (node.body && node.body.kind === 244 /* Block */) { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { @@ -10451,37 +10459,37 @@ function getErrorSpanForArrowFunction(sourceFile, node) { function getErrorSpanForNode(sourceFile, node) { let errorNode = node; switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: const pos2 = skipTrivia(sourceFile.text, 0, false); if (pos2 === sourceFile.text.length) { return createTextSpan(0, 0); } return getSpanOfTokenAtPosition(sourceFile, pos2); - case 261 /* VariableDeclaration */: - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: - case 308 /* EnumMember */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 268 /* TypeAliasDeclaration */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: - case 277 /* NamespaceImport */: + case 263 /* VariableDeclaration */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: + case 311 /* EnumMember */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 271 /* TypeAliasDeclaration */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 171 /* PropertySignature */: + case 280 /* NamespaceImport */: errorNode = node.name; break; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: const start = skipTrivia(sourceFile.text, node.pos); const end = node.statements.length > 0 ? node.statements[0].pos : node.end; return createTextSpanFromBounds(start, end); @@ -10520,7 +10528,7 @@ function isLiteralImportTypeNode(n) { return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); } function isPrologueDirective(node) { - return node.kind === 245 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; + return node.kind === 247 /* ExpressionStatement */ && node.expression.kind === 10 /* StringLiteral */; } function isCustomPrologue(node) { return !!(getEmitFlags(node) & 1048576 /* CustomPrologue */); @@ -10535,7 +10543,7 @@ function isHoistedVariableStatement(node) { return isCustomPrologue(node) && isVariableStatement(node) && every(node.declarationList.declarations, isHoistedVariable); } function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 168 /* Parameter */ || node.kind === 167 /* TypeParameter */ || node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */ || node.kind === 217 /* ParenthesizedExpression */ || node.kind === 261 /* VariableDeclaration */ || node.kind === 284 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); + const commentRanges = node.kind === 169 /* Parameter */ || node.kind === 168 /* TypeParameter */ || node.kind === 220 /* FunctionExpression */ || node.kind === 221 /* ArrowFunction */ || node.kind === 219 /* ParenthesizedExpression */ || node.kind === 263 /* VariableDeclaration */ || node.kind === 287 /* 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*/; @@ -10545,72 +10553,72 @@ var defaultLibReferenceRegEx = /^(\/\/\/\s*= 0 /* FirstToken */ && node.kind <= 164 /* LastToken */) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 165 /* LastToken */) { return 0 /* None */; } if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { @@ -11809,7 +11817,7 @@ function modifierToFlag(token) { return 32768 /* In */; case 146 /* OutKeyword */: return 65536 /* Out */; - case 169 /* Decorator */: + case 170 /* Decorator */: return 131072 /* Decorator */; } return 0 /* None */; @@ -11826,7 +11834,7 @@ function isAssignmentExpression(node, excludeCompoundAssignment) { function isDestructuringAssignment(node) { if (isAssignmentExpression(node, true)) { const kind = node.left.kind; - return kind === 210 /* ObjectLiteralExpression */ || kind === 209 /* ArrayLiteralExpression */; + return kind === 212 /* ObjectLiteralExpression */ || kind === 211 /* ArrayLiteralExpression */; } return false; } @@ -11834,7 +11842,7 @@ function isEntityNameExpression(node) { return node.kind === 79 /* Identifier */ || isPropertyAccessEntityNameExpression(node); } function isDottedName(node) { - return node.kind === 79 /* Identifier */ || node.kind === 109 /* ThisKeyword */ || node.kind === 107 /* SuperKeyword */ || node.kind === 237 /* MetaProperty */ || node.kind === 211 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 217 /* ParenthesizedExpression */ && isDottedName(node.expression); + return node.kind === 79 /* Identifier */ || node.kind === 109 /* ThisKeyword */ || node.kind === 107 /* SuperKeyword */ || node.kind === 239 /* MetaProperty */ || node.kind === 213 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 219 /* ParenthesizedExpression */ && isDottedName(node.expression); } function isPropertyAccessEntityNameExpression(node) { return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); @@ -11843,7 +11851,7 @@ function isPrototypeAccess(node) { return isBindableStaticAccessExpression(node) && getElementOrPropertyAccessName(node) === "prototype"; } function isEmptyObjectLiteral(expression) { - return expression.kind === 210 /* ObjectLiteralExpression */ && expression.properties.length === 0; + return expression.kind === 212 /* ObjectLiteralExpression */ && expression.properties.length === 0; } function tryExtractTSExtension(fileName) { return find(supportedTSExtensionsForExtractExtension, (extension) => fileExtensionIs(fileName, extension)); @@ -11944,10 +11952,10 @@ function getLastChild(node) { return lastChild; } function isTypeNodeKind(kind) { - return kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */ || kind === 132 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 149 /* NumberKeyword */ || kind === 162 /* BigIntKeyword */ || kind === 150 /* ObjectKeyword */ || kind === 135 /* BooleanKeyword */ || kind === 153 /* StringKeyword */ || kind === 154 /* SymbolKeyword */ || kind === 115 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 145 /* NeverKeyword */ || kind === 234 /* ExpressionWithTypeArguments */ || kind === 321 /* JSDocAllType */ || kind === 322 /* JSDocUnknownType */ || kind === 323 /* JSDocNullableType */ || kind === 324 /* JSDocNonNullableType */ || kind === 325 /* JSDocOptionalType */ || kind === 326 /* JSDocFunctionType */ || kind === 327 /* JSDocVariadicType */; + return kind >= 184 /* FirstTypeNode */ && kind <= 207 /* LastTypeNode */ || kind === 132 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 149 /* NumberKeyword */ || kind === 162 /* BigIntKeyword */ || kind === 150 /* ObjectKeyword */ || kind === 135 /* BooleanKeyword */ || kind === 153 /* StringKeyword */ || kind === 154 /* SymbolKeyword */ || kind === 115 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 145 /* NeverKeyword */ || kind === 236 /* ExpressionWithTypeArguments */ || kind === 324 /* JSDocAllType */ || kind === 325 /* JSDocUnknownType */ || kind === 326 /* JSDocNullableType */ || kind === 327 /* JSDocNonNullableType */ || kind === 328 /* JSDocOptionalType */ || kind === 329 /* JSDocFunctionType */ || kind === 330 /* JSDocVariadicType */; } function isAccessExpression(node) { - return node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */; + return node.kind === 213 /* PropertyAccessExpression */ || node.kind === 214 /* ElementAccessExpression */; } function isBundleFileTextLike(section) { switch (section.kind) { @@ -11967,28 +11975,28 @@ function getLeftmostAccessExpression(expr) { function getLeftmostExpression(node, stopAtCallExpressions) { while (true) { switch (node.kind) { - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: node = node.operand; continue; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: node = node.left; continue; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: node = node.condition; continue; - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: node = node.tag; continue; - case 213 /* CallExpression */: + case 215 /* CallExpression */: if (stopAtCallExpressions) { return node; } - case 235 /* AsExpression */: - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: - case 236 /* NonNullExpression */: - case 359 /* PartiallyEmittedExpression */: - case 239 /* SatisfiesExpression */: + case 237 /* AsExpression */: + case 214 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 238 /* NonNullExpression */: + case 362 /* PartiallyEmittedExpression */: + case 241 /* SatisfiesExpression */: node = node.expression; continue; } @@ -12586,20 +12594,20 @@ function getContainingNodeArray(node) { if (!node.parent) return void 0; switch (node.kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: const { parent: parent2 } = node; - return parent2.kind === 195 /* InferType */ ? void 0 : parent2.typeParameters; - case 168 /* Parameter */: + return parent2.kind === 197 /* InferType */ ? void 0 : parent2.typeParameters; + case 169 /* Parameter */: return node.parent.parameters; - case 204 /* TemplateLiteralTypeSpan */: + case 206 /* TemplateLiteralTypeSpan */: return node.parent.templateSpans; - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return node.parent.templateSpans; - case 169 /* Decorator */: { + case 170 /* Decorator */: { const { parent: parent3 } = node; return canHaveDecorators(parent3) ? parent3.modifiers : canHaveIllegalDecorators(parent3) ? parent3.illegalDecorators : void 0; } - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return node.parent.heritageClauses; } const { parent } = node; @@ -12607,43 +12615,43 @@ function getContainingNodeArray(node) { return isJSDocTypeLiteral(node.parent) ? void 0 : node.parent.tags; } switch (parent.kind) { - case 187 /* TypeLiteral */: - case 267 /* InterfaceDeclaration */: + case 189 /* TypeLiteral */: + case 270 /* InterfaceDeclaration */: return isTypeElement(node) ? parent.members : void 0; - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return parent.types; - case 189 /* TupleType */: - case 209 /* ArrayLiteralExpression */: - case 360 /* CommaListExpression */: - case 278 /* NamedImports */: - case 282 /* NamedExports */: + case 191 /* TupleType */: + case 211 /* ArrayLiteralExpression */: + case 363 /* CommaListExpression */: + case 281 /* NamedImports */: + case 285 /* NamedExports */: return parent.elements; - case 210 /* ObjectLiteralExpression */: - case 295 /* JsxAttributes */: + case 212 /* ObjectLiteralExpression */: + case 298 /* JsxAttributes */: return parent.properties; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: return isTypeNode(node) ? parent.typeArguments : parent.expression === node ? void 0 : parent.arguments; - case 287 /* JsxElement */: - case 291 /* JsxFragment */: + case 290 /* JsxElement */: + case 294 /* JsxFragment */: return isJsxChild(node) ? parent.children : void 0; - case 289 /* JsxOpeningElement */: - case 288 /* JsxSelfClosingElement */: + case 292 /* JsxOpeningElement */: + case 291 /* JsxSelfClosingElement */: return isTypeNode(node) ? parent.typeArguments : void 0; - case 242 /* Block */: - case 298 /* CaseClause */: - case 299 /* DefaultClause */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: + case 274 /* ModuleBlock */: return parent.statements; - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return parent.clauses; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return isClassElement(node) ? parent.members : void 0; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return isEnumMember(node) ? parent.members : void 0; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return parent.statements; } } @@ -12867,16 +12875,16 @@ function createParenthesizerRules(factory2) { return parenthesizerRule; } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(227 /* BinaryExpression */, binaryOperator); + const binaryOperatorPrecedence = getOperatorPrecedence(229 /* BinaryExpression */, binaryOperator); + const binaryOperatorAssociativity = getOperatorAssociativity(229 /* BinaryExpression */, binaryOperator); const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 219 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { + if (!isLeftSideOfBinary && operand.kind === 221 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { return true; } const operandPrecedence = getExpressionPrecedence(emittedOperand); switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 230 /* YieldExpression */) { + if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 232 /* YieldExpression */) { return false; } return true; @@ -12910,7 +12918,7 @@ function createParenthesizerRules(factory2) { if (isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { + if (node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 39 /* PlusToken */) { if (node.cachedLiteralKind !== void 0) { return node.cachedLiteralKind; } @@ -12923,7 +12931,7 @@ function createParenthesizerRules(factory2) { } function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 217 /* ParenthesizedExpression */) { + if (skipped.kind === 219 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; @@ -12938,7 +12946,7 @@ function createParenthesizerRules(factory2) { return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; } function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(228 /* ConditionalExpression */, 57 /* QuestionToken */); + const conditionalPrecedence = getOperatorPrecedence(230 /* ConditionalExpression */, 57 /* QuestionToken */); const emittedCondition = skipPartiallyEmittedExpressions(condition); const conditionPrecedence = getExpressionPrecedence(emittedCondition); if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { @@ -12955,8 +12963,8 @@ function createParenthesizerRules(factory2) { let needsParens = isCommaSequence(check); if (!needsParens) { switch (getLeftmostExpression(check, false).kind) { - case 232 /* ClassExpression */: - case 218 /* FunctionExpression */: + case 234 /* ClassExpression */: + case 220 /* FunctionExpression */: needsParens = true; } } @@ -12965,16 +12973,16 @@ function createParenthesizerRules(factory2) { function parenthesizeExpressionOfNew(expression) { const leftmostExpr = getLeftmostExpression(expression, true); switch (leftmostExpr.kind) { - case 213 /* CallExpression */: + case 215 /* CallExpression */: return factory2.createParenthesizedExpression(expression); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; } return parenthesizeLeftSideOfAccess(expression); } function parenthesizeLeftSideOfAccess(expression, optionalChain) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 214 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { + if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 216 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { return expression; } return setTextRange(factory2.createParenthesizedExpression(expression), expression); @@ -12992,7 +13000,7 @@ function createParenthesizerRules(factory2) { function parenthesizeExpressionForDisallowedComma(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, 27 /* CommaToken */); + const commaPrecedence = getOperatorPrecedence(229 /* BinaryExpression */, 27 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); } function parenthesizeExpressionOfExpressionStatement(expression) { @@ -13000,7 +13008,7 @@ function createParenthesizerRules(factory2) { if (isCallExpression(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */) { + if (kind === 220 /* FunctionExpression */ || kind === 221 /* ArrowFunction */) { const updated = factory2.updateCallExpression( emittedExpression, setTextRange(factory2.createParenthesizedExpression(callee), callee), @@ -13011,37 +13019,37 @@ function createParenthesizerRules(factory2) { } } const leftmostExpressionKind = getLeftmostExpression(emittedExpression, false).kind; - if (leftmostExpressionKind === 210 /* ObjectLiteralExpression */ || leftmostExpressionKind === 218 /* FunctionExpression */) { + if (leftmostExpressionKind === 212 /* ObjectLiteralExpression */ || leftmostExpressionKind === 220 /* FunctionExpression */) { return setTextRange(factory2.createParenthesizedExpression(expression), expression); } return expression; } function parenthesizeConciseBodyOfArrowFunction(body) { - if (!isBlock(body) && (isCommaSequence(body) || getLeftmostExpression(body, false).kind === 210 /* ObjectLiteralExpression */)) { + if (!isBlock(body) && (isCommaSequence(body) || getLeftmostExpression(body, false).kind === 212 /* ObjectLiteralExpression */)) { return setTextRange(factory2.createParenthesizedExpression(body), body); } return body; } function parenthesizeCheckTypeOfConditionalType(checkType) { switch (checkType.kind) { - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 194 /* ConditionalType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 196 /* ConditionalType */: return factory2.createParenthesizedType(checkType); } return checkType; } function parenthesizeExtendsTypeOfConditionalType(extendsType) { switch (extendsType.kind) { - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return factory2.createParenthesizedType(extendsType); } return extendsType; } function parenthesizeConstituentTypeOfUnionType(type) { switch (type.kind) { - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeCheckTypeOfConditionalType(type); @@ -13051,8 +13059,8 @@ function createParenthesizerRules(factory2) { } function parenthesizeConstituentTypeOfIntersectionType(type) { switch (type.kind) { - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 194 /* UnionType */: + case 195 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfUnionType(type); @@ -13062,23 +13070,23 @@ function createParenthesizerRules(factory2) { } function parenthesizeOperandOfTypeOperator(type) { switch (type.kind) { - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } function parenthesizeOperandOfReadonlyTypeOperator(type) { switch (type.kind) { - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } function parenthesizeNonArrayTypeOfPostfixType(type) { switch (type.kind) { - case 195 /* InferType */: - case 198 /* TypeOperator */: - case 186 /* TypeQuery */: + case 197 /* InferType */: + case 200 /* TypeOperator */: + case 188 /* TypeQuery */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); @@ -13232,11 +13240,11 @@ function createNodeConverters(factory2) { } function convertToAssignmentPattern(node) { switch (node.kind) { - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 209 /* ArrayBindingPattern */: + case 211 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 206 /* ObjectBindingPattern */: - case 210 /* ObjectLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 212 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -13350,6 +13358,8 @@ function createNodeFactory(flags, baseFactory2) { updatePropertyDeclaration, createAnnotationPropertyDeclaration, updateAnnotationPropertyDeclaration, + createOverloadPropertyDeclaration, + updateOverloadPropertyDeclaration, createMethodSignature, updateMethodSignature, createMethodDeclaration, @@ -13545,6 +13555,8 @@ function createNodeFactory(flags, baseFactory2) { updateStructDeclaration, createAnnotationDeclaration, updateAnnotationDeclaration, + createOverloadDeclaration, + updateOverloadDeclaration, createInterfaceDeclaration, updateInterfaceDeclaration, createTypeAliasDeclaration, @@ -13591,40 +13603,40 @@ function createNodeFactory(flags, baseFactory2) { createExternalModuleReference, updateExternalModuleReference, get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(321 /* JSDocAllType */); + return getJSDocPrimaryTypeCreateFunction(324 /* JSDocAllType */); }, get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(322 /* JSDocUnknownType */); + return getJSDocPrimaryTypeCreateFunction(325 /* JSDocUnknownType */); }, get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(324 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(327 /* JSDocNonNullableType */); }, get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(324 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(327 /* JSDocNonNullableType */); }, get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(323 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(326 /* JSDocNullableType */); }, get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(323 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(326 /* JSDocNullableType */); }, get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(325 /* JSDocOptionalType */); + return getJSDocUnaryTypeCreateFunction(328 /* JSDocOptionalType */); }, get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(325 /* JSDocOptionalType */); + return getJSDocUnaryTypeUpdateFunction(328 /* JSDocOptionalType */); }, get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(327 /* JSDocVariadicType */); + return getJSDocUnaryTypeCreateFunction(330 /* JSDocVariadicType */); }, get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(327 /* JSDocVariadicType */); + return getJSDocUnaryTypeUpdateFunction(330 /* JSDocVariadicType */); }, get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(328 /* JSDocNamepathType */); + return getJSDocUnaryTypeCreateFunction(331 /* JSDocNamepathType */); }, get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(328 /* JSDocNamepathType */); + return getJSDocUnaryTypeUpdateFunction(331 /* JSDocNamepathType */); }, createJSDocFunctionType, updateJSDocFunctionType, @@ -13661,76 +13673,76 @@ function createNodeFactory(flags, baseFactory2) { createJSDocLinkPlain, updateJSDocLinkPlain, get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(352 /* JSDocTypeTag */); + return getJSDocTypeLikeTagCreateFunction(355 /* JSDocTypeTag */); }, get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(352 /* JSDocTypeTag */); + return getJSDocTypeLikeTagUpdateFunction(355 /* JSDocTypeTag */); }, get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(350 /* JSDocReturnTag */); + return getJSDocTypeLikeTagCreateFunction(353 /* JSDocReturnTag */); }, get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocReturnTag */); + return getJSDocTypeLikeTagUpdateFunction(353 /* JSDocReturnTag */); }, get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(351 /* JSDocThisTag */); + return getJSDocTypeLikeTagCreateFunction(354 /* JSDocThisTag */); }, get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocThisTag */); + return getJSDocTypeLikeTagUpdateFunction(354 /* JSDocThisTag */); }, get createJSDocEnumTag() { - return getJSDocTypeLikeTagCreateFunction(348 /* JSDocEnumTag */); + return getJSDocTypeLikeTagCreateFunction(351 /* JSDocEnumTag */); }, get updateJSDocEnumTag() { - return getJSDocTypeLikeTagUpdateFunction(348 /* JSDocEnumTag */); + return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocEnumTag */); }, get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(339 /* JSDocAuthorTag */); + return getJSDocSimpleTagCreateFunction(342 /* JSDocAuthorTag */); }, get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(339 /* JSDocAuthorTag */); + return getJSDocSimpleTagUpdateFunction(342 /* JSDocAuthorTag */); }, get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(341 /* JSDocClassTag */); + return getJSDocSimpleTagCreateFunction(344 /* JSDocClassTag */); }, get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(341 /* JSDocClassTag */); + return getJSDocSimpleTagUpdateFunction(344 /* JSDocClassTag */); }, get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(342 /* JSDocPublicTag */); + return getJSDocSimpleTagCreateFunction(345 /* JSDocPublicTag */); }, get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(342 /* JSDocPublicTag */); + return getJSDocSimpleTagUpdateFunction(345 /* JSDocPublicTag */); }, get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(343 /* JSDocPrivateTag */); + return getJSDocSimpleTagCreateFunction(346 /* JSDocPrivateTag */); }, get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(343 /* JSDocPrivateTag */); + return getJSDocSimpleTagUpdateFunction(346 /* JSDocPrivateTag */); }, get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(344 /* JSDocProtectedTag */); + return getJSDocSimpleTagCreateFunction(347 /* JSDocProtectedTag */); }, get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(344 /* JSDocProtectedTag */); + return getJSDocSimpleTagUpdateFunction(347 /* JSDocProtectedTag */); }, get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(345 /* JSDocReadonlyTag */); + return getJSDocSimpleTagCreateFunction(348 /* JSDocReadonlyTag */); }, get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(345 /* JSDocReadonlyTag */); + return getJSDocSimpleTagUpdateFunction(348 /* JSDocReadonlyTag */); }, get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(346 /* JSDocOverrideTag */); + return getJSDocSimpleTagCreateFunction(349 /* JSDocOverrideTag */); }, get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(346 /* JSDocOverrideTag */); + return getJSDocSimpleTagUpdateFunction(349 /* JSDocOverrideTag */); }, get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(340 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagCreateFunction(343 /* JSDocDeprecatedTag */); }, get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(340 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagUpdateFunction(343 /* JSDocDeprecatedTag */); }, createJSDocUnknownTag, updateJSDocUnknownTag, @@ -13981,12 +13993,13 @@ function createNodeFactory(flags, baseFactory2) { } if (name) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 305 /* PropertyAssignment */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 308 /* PropertyAssignment */: if (isIdentifier(name)) { node.transformFlags |= propagateIdentifierNameFlags(name); break; @@ -14253,7 +14266,7 @@ function createNodeFactory(flags, baseFactory2) { return baseFactory2.createBaseTokenNode(kind); } function createToken(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 164 /* LastToken */, "Invalid token"); + Debug.assert(token >= 0 /* FirstToken */ && token <= 165 /* 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"); @@ -14357,7 +14370,7 @@ function createNodeFactory(flags, baseFactory2) { return result.length ? result : void 0; } function createQualifiedName(left, right) { - const node = createBaseNode(165 /* QualifiedName */); + const node = createBaseNode(166 /* QualifiedName */); node.left = left; node.right = asName(right); node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); @@ -14367,7 +14380,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createQualifiedName(left, right), node) : node; } function createComputedPropertyName(expression) { - const node = createBaseNode(166 /* ComputedPropertyName */); + const node = createBaseNode(167 /* ComputedPropertyName */); node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; return node; @@ -14377,7 +14390,7 @@ function createNodeFactory(flags, baseFactory2) { } function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) { const node = createBaseNamedDeclaration( - 167 /* TypeParameter */, + 168 /* TypeParameter */, modifiers, name ); @@ -14391,7 +14404,7 @@ function createNodeFactory(flags, baseFactory2) { } function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { const node = createBaseVariableLikeDeclaration( - 168 /* Parameter */, + 169 /* Parameter */, modifiers, name, type, @@ -14416,7 +14429,7 @@ function createNodeFactory(flags, baseFactory2) { 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, annotationDeclaration) { - const node = createBaseNode(169 /* Decorator */); + const node = createBaseNode(170 /* Decorator */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.annotationDeclaration = annotationDeclaration; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */ | 8192 /* ContainsTypeScriptClassSyntax */ | 33554432 /* ContainsDecorators */; @@ -14427,7 +14440,7 @@ function createNodeFactory(flags, baseFactory2) { } function createPropertySignature(modifiers, name, questionToken, type) { const node = createBaseNamedDeclaration( - 170 /* PropertySignature */, + 171 /* PropertySignature */, modifiers, name ); @@ -14440,6 +14453,21 @@ function createNodeFactory(flags, baseFactory2) { function updatePropertySignature(node, modifiers, name, questionToken, type) { return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.type !== type ? finishUpdatePropertySignature(createPropertySignature(modifiers, name, questionToken, type), node) : node; } + function createOverloadPropertyDeclaration(modifiers, name, questionToken, type) { + const node = createBaseNamedDeclaration( + 174 /* OverloadPropertyDeclaration */, + modifiers, + name + ); + node.type = type; + node.questionToken = questionToken; + node.transformFlags = 1 /* ContainsTypeScript */; + node.initializer = void 0; + return node; + } + function updateOverloadPropertyDeclaration(node, modifiers, name, questionToken, type) { + return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createOverloadPropertyDeclaration(modifiers, name, questionToken, type), node) : node; + } function finishUpdatePropertySignature(updated, original) { if (updated !== original) { updated.initializer = original.initializer; @@ -14448,7 +14476,7 @@ function createNodeFactory(flags, baseFactory2) { } function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { const node = createBaseVariableLikeDeclaration( - 171 /* PropertyDeclaration */, + 172 /* PropertyDeclaration */, modifiers, name, type, @@ -14470,7 +14498,7 @@ function createNodeFactory(flags, baseFactory2) { } function createAnnotationPropertyDeclaration(name, type, initializer) { const node = createBaseVariableLikeDeclaration( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, void 0, name, type, @@ -14484,7 +14512,7 @@ function createNodeFactory(flags, baseFactory2) { } function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 173 /* MethodSignature */, + 175 /* MethodSignature */, modifiers, name, typeParameters, @@ -14500,7 +14528,7 @@ function createNodeFactory(flags, baseFactory2) { } function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 174 /* MethodDeclaration */, + 176 /* MethodDeclaration */, modifiers, name, typeParameters, @@ -14537,7 +14565,7 @@ function createNodeFactory(flags, baseFactory2) { } function createClassStaticBlockDeclaration(body) { const node = createBaseGenericNamedDeclaration( - 175 /* ClassStaticBlockDeclaration */, + 177 /* ClassStaticBlockDeclaration */, void 0, void 0, void 0 @@ -14560,7 +14588,7 @@ function createNodeFactory(flags, baseFactory2) { } function createConstructorDeclaration(modifiers, parameters, body) { const node = createBaseFunctionLikeDeclaration( - 176 /* Constructor */, + 178 /* Constructor */, modifiers, void 0, void 0, @@ -14587,7 +14615,7 @@ function createNodeFactory(flags, baseFactory2) { } function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 177 /* GetAccessor */, + 179 /* GetAccessor */, modifiers, name, void 0, @@ -14609,7 +14637,7 @@ function createNodeFactory(flags, baseFactory2) { } function createSetAccessorDeclaration(modifiers, name, parameters, body) { const node = createBaseFunctionLikeDeclaration( - 178 /* SetAccessor */, + 180 /* SetAccessor */, modifiers, name, void 0, @@ -14633,7 +14661,7 @@ function createNodeFactory(flags, baseFactory2) { } function createCallSignature(typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 179 /* CallSignature */, + 181 /* CallSignature */, void 0, void 0, typeParameters, @@ -14648,7 +14676,7 @@ function createNodeFactory(flags, baseFactory2) { } function createConstructSignature(typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 180 /* ConstructSignature */, + 182 /* ConstructSignature */, void 0, void 0, typeParameters, @@ -14663,7 +14691,7 @@ function createNodeFactory(flags, baseFactory2) { } function createIndexSignature(modifiers, parameters, type) { const node = createBaseSignatureDeclaration( - 181 /* IndexSignature */, + 183 /* IndexSignature */, modifiers, void 0, void 0, @@ -14677,7 +14705,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node) : node; } function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(204 /* TemplateLiteralTypeSpan */); + const node = createBaseNode(206 /* TemplateLiteralTypeSpan */); node.type = type; node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; @@ -14690,7 +14718,7 @@ function createNodeFactory(flags, baseFactory2) { return createToken(kind); } function createTypePredicateNode(assertsModifier, parameterName, type) { - const node = createBaseNode(182 /* TypePredicate */); + const node = createBaseNode(184 /* TypePredicate */); node.assertsModifier = assertsModifier; node.parameterName = asName(parameterName); node.type = type; @@ -14701,7 +14729,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode(assertsModifier, parameterName, type), node) : node; } function createTypeReferenceNode(typeName, typeArguments) { - const node = createBaseNode(183 /* TypeReference */); + const node = createBaseNode(185 /* TypeReference */); node.typeName = asName(typeName); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray(typeArguments)); node.transformFlags = 1 /* ContainsTypeScript */; @@ -14712,7 +14740,7 @@ function createNodeFactory(flags, baseFactory2) { } function createFunctionTypeNode(typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 184 /* FunctionType */, + 186 /* FunctionType */, void 0, void 0, typeParameters, @@ -14737,7 +14765,7 @@ function createNodeFactory(flags, baseFactory2) { } function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { const node = createBaseSignatureDeclaration( - 185 /* ConstructorType */, + 187 /* ConstructorType */, modifiers, void 0, typeParameters, @@ -14760,7 +14788,7 @@ function createNodeFactory(flags, baseFactory2) { return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); } function createTypeQueryNode(exprName, typeArguments) { - const node = createBaseNode(186 /* TypeQuery */); + const node = createBaseNode(188 /* TypeQuery */); node.exprName = exprName; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags = 1 /* ContainsTypeScript */; @@ -14770,7 +14798,7 @@ function createNodeFactory(flags, baseFactory2) { return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node; } function createTypeLiteralNode(members) { - const node = createBaseNode(187 /* TypeLiteral */); + const node = createBaseNode(189 /* TypeLiteral */); node.members = createNodeArray(members); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -14779,7 +14807,7 @@ function createNodeFactory(flags, baseFactory2) { return node.members !== members ? update(createTypeLiteralNode(members), node) : node; } function createArrayTypeNode(elementType) { - const node = createBaseNode(188 /* ArrayType */); + const node = createBaseNode(190 /* ArrayType */); node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -14788,7 +14816,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elementType !== elementType ? update(createArrayTypeNode(elementType), node) : node; } function createTupleTypeNode(elements) { - const node = createBaseNode(189 /* TupleType */); + const node = createBaseNode(191 /* TupleType */); node.elements = createNodeArray(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -14797,7 +14825,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node; } function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseNode(202 /* NamedTupleMember */); + const node = createBaseNode(204 /* NamedTupleMember */); node.dotDotDotToken = dotDotDotToken; node.name = name; node.questionToken = questionToken; @@ -14809,7 +14837,7 @@ function createNodeFactory(flags, baseFactory2) { 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(190 /* OptionalType */); + const node = createBaseNode(192 /* OptionalType */); node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -14818,7 +14846,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createOptionalTypeNode(type), node) : node; } function createRestTypeNode(type) { - const node = createBaseNode(191 /* RestType */); + const node = createBaseNode(193 /* RestType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -14836,19 +14864,19 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; } function createUnionTypeNode(types) { - return createUnionOrIntersectionTypeNode(192 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); + return createUnionOrIntersectionTypeNode(194 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function updateUnionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function createIntersectionTypeNode(types) { - return createUnionOrIntersectionTypeNode(193 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); + return createUnionOrIntersectionTypeNode(195 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function updateIntersectionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function createConditionalTypeNode(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(194 /* ConditionalType */); + const node = createBaseNode(196 /* ConditionalType */); node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); node.trueType = trueType; @@ -14860,7 +14888,7 @@ function createNodeFactory(flags, baseFactory2) { 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(195 /* InferType */); + const node = createBaseNode(197 /* InferType */); node.typeParameter = typeParameter; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -14869,7 +14897,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameter !== typeParameter ? update(createInferTypeNode(typeParameter), node) : node; } function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(203 /* TemplateLiteralType */); + const node = createBaseNode(205 /* TemplateLiteralType */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags = 1 /* ContainsTypeScript */; @@ -14879,7 +14907,7 @@ function createNodeFactory(flags, baseFactory2) { return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(205 /* ImportType */); + const node = createBaseNode(207 /* ImportType */); node.argument = argument; node.assertions = assertions; node.qualifier = qualifier; @@ -14892,7 +14920,7 @@ function createNodeFactory(flags, baseFactory2) { 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(196 /* ParenthesizedType */); + const node = createBaseNode(198 /* ParenthesizedType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -14901,12 +14929,12 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createParenthesizedType(type), node) : node; } function createThisTypeNode() { - const node = createBaseNode(197 /* ThisType */); + const node = createBaseNode(199 /* ThisType */); node.transformFlags = 1 /* ContainsTypeScript */; return node; } function createTypeOperatorNode(operator, type) { - const node = createBaseNode(198 /* TypeOperator */); + const node = createBaseNode(200 /* TypeOperator */); node.operator = operator; node.type = operator === 147 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); node.transformFlags = 1 /* ContainsTypeScript */; @@ -14916,7 +14944,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createTypeOperatorNode(node.operator, type), node) : node; } function createIndexedAccessTypeNode(objectType, indexType) { - const node = createBaseNode(199 /* IndexedAccessType */); + const node = createBaseNode(201 /* IndexedAccessType */); node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); node.indexType = indexType; node.transformFlags = 1 /* ContainsTypeScript */; @@ -14926,7 +14954,7 @@ function createNodeFactory(flags, baseFactory2) { return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node; } function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseNode(200 /* MappedType */); + const node = createBaseNode(202 /* MappedType */); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; node.nameType = nameType; @@ -14940,7 +14968,7 @@ function createNodeFactory(flags, baseFactory2) { 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(201 /* LiteralType */); + const node = createBaseNode(203 /* LiteralType */); node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -14949,7 +14977,7 @@ function createNodeFactory(flags, baseFactory2) { return node.literal !== literal ? update(createLiteralTypeNode(literal), node) : node; } function createObjectBindingPattern(elements) { - const node = createBaseNode(206 /* ObjectBindingPattern */); + const node = createBaseNode(208 /* ObjectBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { @@ -14961,7 +14989,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createObjectBindingPattern(elements), node) : node; } function createArrayBindingPattern(elements) { - const node = createBaseNode(207 /* ArrayBindingPattern */); + const node = createBaseNode(209 /* ArrayBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; return node; @@ -14971,7 +14999,7 @@ function createNodeFactory(flags, baseFactory2) { } function createBindingElement(dotDotDotToken, propertyName, name, initializer) { const node = createBaseBindingLikeDeclaration( - 208 /* BindingElement */, + 210 /* BindingElement */, void 0, name, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer) @@ -14994,7 +15022,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseExpression(209 /* ArrayLiteralExpression */); + const node = createBaseExpression(211 /* ArrayLiteralExpression */); const lastElement = elements && lastOrUndefined(elements); const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); @@ -15006,7 +15034,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; } function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseExpression(210 /* ObjectLiteralExpression */); + const node = createBaseExpression(212 /* ObjectLiteralExpression */); node.properties = createNodeArray(properties); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.properties); @@ -15016,7 +15044,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; } function createPropertyAccessExpression(expression, name) { - const node = createBaseExpression(211 /* PropertyAccessExpression */); + const node = createBaseExpression(213 /* PropertyAccessExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.name = asName(name); node.transformFlags = propagateChildFlags(node.expression) | (isIdentifier(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912 /* ContainsPrivateIdentifierInExpression */); @@ -15032,7 +15060,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.name !== name ? update(createPropertyAccessExpression(expression, name), node) : node; } function createPropertyAccessChain(expression, questionDotToken, name) { - const node = createBaseExpression(211 /* PropertyAccessExpression */); + const node = createBaseExpression(213 /* PropertyAccessExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.questionDotToken = questionDotToken; @@ -15045,7 +15073,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node; } function createElementAccessExpression(expression, index) { - const node = createBaseExpression(212 /* ElementAccessExpression */); + const node = createBaseExpression(214 /* ElementAccessExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.argumentExpression = asExpression(index); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.argumentExpression); @@ -15061,7 +15089,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.argumentExpression !== argumentExpression ? update(createElementAccessExpression(expression, argumentExpression), node) : node; } function createElementAccessChain(expression, questionDotToken, index) { - const node = createBaseExpression(212 /* ElementAccessExpression */); + const node = createBaseExpression(214 /* ElementAccessExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.questionDotToken = questionDotToken; @@ -15074,7 +15102,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node; } function createCallExpression(expression, typeArguments, argumentsArray) { - const node = createBaseExpression(213 /* CallExpression */); + const node = createBaseExpression(215 /* CallExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.typeArguments = asNodeArray(typeArguments); node.arguments = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray)); @@ -15096,7 +15124,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallExpression(expression, typeArguments, argumentsArray), node) : node; } function createCallChain(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseExpression(213 /* CallExpression */); + const node = createBaseExpression(215 /* CallExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.questionDotToken = questionDotToken; @@ -15116,7 +15144,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseExpression(214 /* NewExpression */); + const node = createBaseExpression(216 /* NewExpression */); node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; @@ -15130,7 +15158,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; } function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseExpression(215 /* TaggedTemplateExpression */); + const node = createBaseExpression(217 /* TaggedTemplateExpression */); node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess(tag, false); node.typeArguments = asNodeArray(typeArguments); node.template = template; @@ -15147,7 +15175,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; } function createTypeAssertion(type, expression) { - const node = createBaseExpression(216 /* TypeAssertionExpression */); + const node = createBaseExpression(218 /* TypeAssertionExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -15157,7 +15185,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node; } function createParenthesizedExpression(expression) { - const node = createBaseExpression(217 /* ParenthesizedExpression */); + const node = createBaseExpression(219 /* ParenthesizedExpression */); node.expression = expression; node.transformFlags = propagateChildFlags(node.expression); return node; @@ -15167,7 +15195,7 @@ function createNodeFactory(flags, baseFactory2) { } function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 218 /* FunctionExpression */, + 220 /* FunctionExpression */, modifiers, name, typeParameters, @@ -15195,7 +15223,7 @@ function createNodeFactory(flags, baseFactory2) { 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 createEtsComponentExpression(name, argumentsArray, body) { - const node = createBaseExpression(220 /* EtsComponentExpression */); + const node = createBaseExpression(222 /* EtsComponentExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(name); node.arguments = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray)); node.body = body; @@ -15206,7 +15234,7 @@ function createNodeFactory(flags, baseFactory2) { } function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { const node = createBaseFunctionLikeDeclaration( - 219 /* ArrowFunction */, + 221 /* ArrowFunction */, modifiers, void 0, typeParameters, @@ -15225,7 +15253,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseExpression(221 /* DeleteExpression */); + const node = createBaseExpression(223 /* DeleteExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -15234,7 +15262,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; } function createTypeOfExpression(expression) { - const node = createBaseExpression(222 /* TypeOfExpression */); + const node = createBaseExpression(224 /* TypeOfExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -15243,7 +15271,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; } function createVoidExpression(expression) { - const node = createBaseExpression(223 /* VoidExpression */); + const node = createBaseExpression(225 /* VoidExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -15252,7 +15280,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createVoidExpression(expression), node) : node; } function createAwaitExpression(expression) { - const node = createBaseExpression(224 /* AwaitExpression */); + const node = createBaseExpression(226 /* AwaitExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; return node; @@ -15261,7 +15289,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; } function createPrefixUnaryExpression(operator, operand) { - const node = createBaseExpression(225 /* PrefixUnaryExpression */); + const node = createBaseExpression(227 /* PrefixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -15274,7 +15302,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; } function createPostfixUnaryExpression(operand, operator) { - const node = createBaseExpression(226 /* PostfixUnaryExpression */); + const node = createBaseExpression(228 /* PostfixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -15287,7 +15315,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; } function createBinaryExpression(left, operator, right) { - const node = createBaseExpression(227 /* BinaryExpression */); + const node = createBaseExpression(229 /* BinaryExpression */); const operatorToken = asToken(operator); const operatorKind = operatorToken.kind; node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); @@ -15336,7 +15364,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseExpression(228 /* ConditionalExpression */); + const node = createBaseExpression(230 /* ConditionalExpression */); node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); node.questionToken = questionToken != null ? questionToken : createToken(57 /* QuestionToken */); node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); @@ -15349,7 +15377,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseExpression(229 /* TemplateExpression */); + const node = createBaseExpression(231 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; @@ -15402,7 +15430,7 @@ function createNodeFactory(flags, baseFactory2) { } function createYieldExpression(asteriskToken, expression) { Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseExpression(230 /* YieldExpression */); + const node = createBaseExpression(232 /* YieldExpression */); node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.asteriskToken = asteriskToken; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; @@ -15412,7 +15440,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; } function createSpreadElement(expression) { - const node = createBaseExpression(231 /* SpreadElement */); + const node = createBaseExpression(233 /* SpreadElement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; return node; @@ -15422,7 +15450,7 @@ function createNodeFactory(flags, baseFactory2) { } function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseClassLikeDeclaration( - 232 /* ClassExpression */, + 234 /* ClassExpression */, modifiers, name, typeParameters, @@ -15436,10 +15464,10 @@ function createNodeFactory(flags, baseFactory2) { 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 createBaseExpression(233 /* OmittedExpression */); + return createBaseExpression(235 /* OmittedExpression */); } function createExpressionWithTypeArguments(expression, typeArguments) { - const node = createBaseNode(234 /* ExpressionWithTypeArguments */); + const node = createBaseNode(236 /* ExpressionWithTypeArguments */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.typeArguments) | 1024 /* ContainsES2015 */; @@ -15449,7 +15477,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node; } function createAsExpression(expression, type) { - const node = createBaseExpression(235 /* AsExpression */); + const node = createBaseExpression(237 /* AsExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -15459,7 +15487,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node; } function createNonNullExpression(expression) { - const node = createBaseExpression(236 /* NonNullExpression */); + const node = createBaseExpression(238 /* NonNullExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, false); node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; return node; @@ -15471,7 +15499,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createNonNullExpression(expression), node) : node; } function createSatisfiesExpression(expression, type) { - const node = createBaseExpression(239 /* SatisfiesExpression */); + const node = createBaseExpression(241 /* SatisfiesExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -15481,7 +15509,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; } function createNonNullChain(expression) { - const node = createBaseExpression(236 /* NonNullExpression */); + const node = createBaseExpression(238 /* NonNullExpression */); node.flags |= 32 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression, true); node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -15492,7 +15520,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createNonNullChain(expression), node) : node; } function createMetaProperty(keywordToken, name) { - const node = createBaseExpression(237 /* MetaProperty */); + const node = createBaseExpression(239 /* MetaProperty */); node.keywordToken = keywordToken; node.name = name; node.transformFlags |= propagateChildFlags(node.name); @@ -15512,7 +15540,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createMetaProperty(node.keywordToken, name), node) : node; } function createTemplateSpan(expression, literal) { - const node = createBaseNode(240 /* TemplateSpan */); + const node = createBaseNode(242 /* TemplateSpan */); node.expression = expression; node.literal = literal; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; @@ -15522,12 +15550,12 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan(expression, literal), node) : node; } function createSemicolonClassElement() { - const node = createBaseNode(241 /* SemicolonClassElement */); + const node = createBaseNode(243 /* SemicolonClassElement */); node.transformFlags |= 1024 /* ContainsES2015 */; return node; } function createBlock(statements, multiLine) { - const node = createBaseNode(242 /* Block */); + const node = createBaseNode(244 /* Block */); node.statements = createNodeArray(statements); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.statements); @@ -15537,7 +15565,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node; } function createVariableStatement(modifiers, declarationList) { - const node = createBaseDeclaration(244 /* VariableStatement */); + const node = createBaseDeclaration(246 /* VariableStatement */); node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); @@ -15550,10 +15578,10 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node; } function createEmptyStatement() { - return createBaseNode(243 /* EmptyStatement */); + return createBaseNode(245 /* EmptyStatement */); } function createExpressionStatement(expression) { - const node = createBaseNode(245 /* ExpressionStatement */); + const node = createBaseNode(247 /* ExpressionStatement */); node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -15562,7 +15590,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createExpressionStatement(expression), node) : node; } function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(246 /* IfStatement */); + const node = createBaseNode(248 /* IfStatement */); node.expression = expression; node.thenStatement = asEmbeddedStatement(thenStatement); node.elseStatement = asEmbeddedStatement(elseStatement); @@ -15573,7 +15601,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; } function createDoStatement(statement, expression) { - const node = createBaseNode(247 /* DoStatement */); + const node = createBaseNode(249 /* DoStatement */); node.statement = asEmbeddedStatement(statement); node.expression = expression; node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); @@ -15583,7 +15611,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; } function createWhileStatement(expression, statement) { - const node = createBaseNode(248 /* WhileStatement */); + const node = createBaseNode(250 /* WhileStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -15593,7 +15621,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; } function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(249 /* ForStatement */); + const node = createBaseNode(251 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -15605,7 +15633,7 @@ function createNodeFactory(flags, baseFactory2) { 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(250 /* ForInStatement */); + const node = createBaseNode(252 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = asEmbeddedStatement(statement); @@ -15616,7 +15644,7 @@ function createNodeFactory(flags, baseFactory2) { 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(251 /* ForOfStatement */); + const node = createBaseNode(253 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); @@ -15630,7 +15658,7 @@ function createNodeFactory(flags, baseFactory2) { 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(252 /* ContinueStatement */); + const node = createBaseNode(254 /* ContinueStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; return node; @@ -15639,7 +15667,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createContinueStatement(label), node) : node; } function createBreakStatement(label) { - const node = createBaseNode(253 /* BreakStatement */); + const node = createBaseNode(255 /* BreakStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; return node; @@ -15648,7 +15676,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createBreakStatement(label), node) : node; } function createReturnStatement(expression) { - const node = createBaseNode(254 /* ReturnStatement */); + const node = createBaseNode(256 /* ReturnStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; return node; @@ -15657,7 +15685,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createReturnStatement(expression), node) : node; } function createWithStatement(expression, statement) { - const node = createBaseNode(255 /* WithStatement */); + const node = createBaseNode(257 /* WithStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -15667,7 +15695,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; } function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(256 /* SwitchStatement */); + const node = createBaseNode(258 /* SwitchStatement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.caseBlock = caseBlock; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); @@ -15677,7 +15705,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; } function createLabeledStatement(label, statement) { - const node = createBaseNode(257 /* LabeledStatement */); + const node = createBaseNode(259 /* LabeledStatement */); node.label = asName(label); node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); @@ -15687,7 +15715,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; } function createThrowStatement(expression) { - const node = createBaseNode(258 /* ThrowStatement */); + const node = createBaseNode(260 /* ThrowStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -15696,7 +15724,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createThrowStatement(expression), node) : node; } function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(259 /* TryStatement */); + const node = createBaseNode(261 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -15707,11 +15735,11 @@ function createNodeFactory(flags, baseFactory2) { return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; } function createDebuggerStatement() { - return createBaseNode(260 /* DebuggerStatement */); + return createBaseNode(262 /* DebuggerStatement */); } function createVariableDeclaration(name, exclamationToken, type, initializer) { const node = createBaseVariableLikeDeclaration( - 261 /* VariableDeclaration */, + 263 /* VariableDeclaration */, void 0, name, type, @@ -15728,7 +15756,7 @@ function createNodeFactory(flags, baseFactory2) { 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(262 /* VariableDeclarationList */); + const node = createBaseNode(264 /* VariableDeclarationList */); node.flags |= flags2 & 3 /* BlockScoped */; node.declarations = createNodeArray(declarations); node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -15742,7 +15770,7 @@ function createNodeFactory(flags, baseFactory2) { } function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { const node = createBaseFunctionLikeDeclaration( - 263 /* FunctionDeclaration */, + 265 /* FunctionDeclaration */, modifiers, name, typeParameters, @@ -15779,7 +15807,7 @@ function createNodeFactory(flags, baseFactory2) { } function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseClassLikeDeclaration( - 264 /* ClassDeclaration */, + 266 /* ClassDeclaration */, modifiers, name, typeParameters, @@ -15801,7 +15829,7 @@ function createNodeFactory(flags, baseFactory2) { } function createStructDeclaration(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseClassLikeDeclaration( - 265 /* StructDeclaration */, + 267 /* StructDeclaration */, modifiers, name, typeParameters, @@ -15823,7 +15851,7 @@ function createNodeFactory(flags, baseFactory2) { } function createAnnotationDeclaration(modifiers, name, members) { const node = createBaseNamedDeclaration( - 266 /* AnnotationDeclaration */, + 268 /* AnnotationDeclaration */, modifiers, name ); @@ -15840,9 +15868,28 @@ function createNodeFactory(flags, baseFactory2) { function updateAnnotationDeclaration(node, modifiers, name, members) { return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createAnnotationDeclaration(modifiers, name, members), node) : node; } + function createOverloadDeclaration(modifiers, name, members) { + const node = createBaseNamedDeclaration( + 269 /* OverloadDeclaration */, + modifiers, + name + ); + node.members = createNodeArray(members); + node.transformFlags |= propagateChildrenFlags(node.members); + if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + node.transformFlags = 1 /* ContainsTypeScript */; + } else { + node.transformFlags |= 1024 /* ContainsES2015 */; + node.transformFlags |= 1 /* ContainsTypeScript */; + } + return node; + } + function updateOverloadDeclaration(node, modifiers, name, members) { + return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createOverloadDeclaration(modifiers, name, members), node) : node; + } function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) { const node = createBaseInterfaceOrClassLikeDeclaration( - 267 /* InterfaceDeclaration */, + 270 /* InterfaceDeclaration */, modifiers, name, typeParameters, @@ -15864,7 +15911,7 @@ function createNodeFactory(flags, baseFactory2) { } function createTypeAliasDeclaration(modifiers, name, typeParameters, type) { const node = createBaseGenericNamedDeclaration( - 268 /* TypeAliasDeclaration */, + 271 /* TypeAliasDeclaration */, modifiers, name, typeParameters @@ -15885,7 +15932,7 @@ function createNodeFactory(flags, baseFactory2) { } function createEnumDeclaration(modifiers, name, members) { const node = createBaseNamedDeclaration( - 269 /* EnumDeclaration */, + 272 /* EnumDeclaration */, modifiers, name ); @@ -15905,7 +15952,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(270 /* ModuleDeclaration */); + const node = createBaseDeclaration(273 /* ModuleDeclaration */); node.modifiers = asNodeArray(modifiers); node.flags |= flags2 & (16 /* Namespace */ | 4 /* NestedNamespace */ | 1024 /* GlobalAugmentation */); node.name = name; @@ -15929,7 +15976,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createModuleBlock(statements) { - const node = createBaseNode(271 /* ModuleBlock */); + const node = createBaseNode(274 /* ModuleBlock */); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildrenFlags(node.statements); return node; @@ -15938,7 +15985,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createModuleBlock(statements), node) : node; } function createCaseBlock(clauses) { - const node = createBaseNode(272 /* CaseBlock */); + const node = createBaseNode(275 /* CaseBlock */); node.clauses = createNodeArray(clauses); node.transformFlags |= propagateChildrenFlags(node.clauses); return node; @@ -15948,7 +15995,7 @@ function createNodeFactory(flags, baseFactory2) { } function createNamespaceExportDeclaration(name) { const node = createBaseNamedDeclaration( - 273 /* NamespaceExportDeclaration */, + 276 /* NamespaceExportDeclaration */, void 0, name ); @@ -15969,7 +16016,7 @@ function createNodeFactory(flags, baseFactory2) { } function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) { const node = createBaseNamedDeclaration( - 274 /* ImportEqualsDeclaration */, + 277 /* ImportEqualsDeclaration */, modifiers, name ); @@ -15992,7 +16039,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(275 /* ImportDeclaration */); + const node = createBaseDeclaration(278 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; @@ -16012,7 +16059,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createImportClause(isTypeOnly, name, namedBindings) { - const node = createBaseNode(276 /* ImportClause */); + const node = createBaseNode(279 /* ImportClause */); node.isTypeOnly = isTypeOnly; node.name = name; node.namedBindings = namedBindings; @@ -16034,7 +16081,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createAssertClause(elements, multiLine) { - const node = createBaseNode(302 /* AssertClause */); + const node = createBaseNode(305 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; node.transformFlags |= 4 /* ContainsESNext */; @@ -16044,7 +16091,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; } function createAssertEntry(name, value) { - const node = createBaseNode(303 /* AssertEntry */); + const node = createBaseNode(306 /* AssertEntry */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -16054,7 +16101,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; } function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(304 /* ImportTypeAssertionContainer */); + const node = createBaseNode(307 /* ImportTypeAssertionContainer */); node.assertClause = clause; node.multiLine = multiLine; return node; @@ -16063,7 +16110,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } function createNamespaceImport(name) { - const node = createBaseNode(277 /* NamespaceImport */); + const node = createBaseNode(280 /* NamespaceImport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -16073,7 +16120,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceImport(name), node) : node; } function createNamespaceExport(name) { - const node = createBaseNode(283 /* NamespaceExport */); + const node = createBaseNode(286 /* NamespaceExport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name) | 4 /* ContainsESNext */; node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -16083,7 +16130,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceExport(name), node) : node; } function createNamedImports(elements) { - const node = createBaseNode(278 /* NamedImports */); + const node = createBaseNode(281 /* NamedImports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -16093,7 +16140,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedImports(elements), node) : node; } function createImportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseNode(279 /* ImportSpecifier */); + const node = createBaseNode(282 /* ImportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = propertyName; node.name = name; @@ -16105,7 +16152,7 @@ function createNodeFactory(flags, baseFactory2) { 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(280 /* ExportAssignment */); + const node = createBaseDeclaration(283 /* ExportAssignment */); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary(63 /* EqualsToken */, void 0, expression) : parenthesizerRules().parenthesizeExpressionOfExportDefault(expression); @@ -16124,7 +16171,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(281 /* ExportDeclaration */); + const node = createBaseDeclaration(284 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; @@ -16145,7 +16192,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createNamedExports(elements) { - const node = createBaseNode(282 /* NamedExports */); + const node = createBaseNode(285 /* NamedExports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -16155,7 +16202,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedExports(elements), node) : node; } function createExportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseNode(284 /* ExportSpecifier */); + const node = createBaseNode(287 /* ExportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = asName(propertyName); node.name = asName(name); @@ -16167,11 +16214,11 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createMissingDeclaration() { - const node = createBaseDeclaration(285 /* MissingDeclaration */); + const node = createBaseDeclaration(288 /* MissingDeclaration */); return node; } function createExternalModuleReference(expression) { - const node = createBaseNode(286 /* ExternalModuleReference */); + const node = createBaseNode(289 /* ExternalModuleReference */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -16204,7 +16251,7 @@ function createNodeFactory(flags, baseFactory2) { } function createJSDocFunctionType(parameters, type) { const node = createBaseSignatureDeclaration( - 326 /* JSDocFunctionType */, + 329 /* JSDocFunctionType */, void 0, void 0, void 0, @@ -16217,7 +16264,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; } function createJSDocTypeLiteral(propertyTags, isArrayType = false) { - const node = createBaseNode(331 /* JSDocTypeLiteral */); + const node = createBaseNode(334 /* JSDocTypeLiteral */); node.jsDocPropertyTags = asNodeArray(propertyTags); node.isArrayType = isArrayType; return node; @@ -16226,7 +16273,7 @@ function createNodeFactory(flags, baseFactory2) { return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral(propertyTags, isArrayType), node) : node; } function createJSDocTypeExpression(type) { - const node = createBaseNode(318 /* JSDocTypeExpression */); + const node = createBaseNode(321 /* JSDocTypeExpression */); node.type = type; return node; } @@ -16234,7 +16281,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createJSDocTypeExpression(type), node) : node; } function createJSDocSignature(typeParameters, parameters, type) { - const node = createBaseNode(332 /* JSDocSignature */); + const node = createBaseNode(335 /* JSDocSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; @@ -16254,7 +16301,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(353 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier("template"), comment); + const node = createBaseJSDocTag(356 /* JSDocTemplateTag */, tagName != null ? tagName : createIdentifier("template"), comment); node.constraint = constraint; node.typeParameters = createNodeArray(typeParameters); return node; @@ -16263,7 +16310,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseJSDocTag(354 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier("typedef"), comment); + const node = createBaseJSDocTag(357 /* JSDocTypedefTag */, tagName != null ? tagName : createIdentifier("typedef"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -16273,7 +16320,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseJSDocTag(349 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier("param"), comment); + const node = createBaseJSDocTag(352 /* JSDocParameterTag */, tagName != null ? tagName : createIdentifier("param"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -16284,7 +16331,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseJSDocTag(356 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier("prop"), comment); + const node = createBaseJSDocTag(359 /* JSDocPropertyTag */, tagName != null ? tagName : createIdentifier("prop"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -16295,7 +16342,7 @@ function createNodeFactory(flags, baseFactory2) { 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 = createBaseJSDocTag(347 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier("callback"), comment); + const node = createBaseJSDocTag(350 /* JSDocCallbackTag */, tagName != null ? tagName : createIdentifier("callback"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -16305,7 +16352,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocAugmentsTag(tagName, className, comment) { - const node = createBaseJSDocTag(337 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier("augments"), comment); + const node = createBaseJSDocTag(340 /* JSDocAugmentsTag */, tagName != null ? tagName : createIdentifier("augments"), comment); node.class = className; return node; } @@ -16313,12 +16360,12 @@ function createNodeFactory(flags, baseFactory2) { 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(338 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier("implements"), comment); + const node = createBaseJSDocTag(341 /* JSDocImplementsTag */, tagName != null ? tagName : createIdentifier("implements"), comment); node.class = className; return node; } function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(355 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier("see"), comment); + const node = createBaseJSDocTag(358 /* JSDocSeeTag */, tagName != null ? tagName : createIdentifier("see"), comment); node.name = name; return node; } @@ -16326,7 +16373,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; } function createJSDocNameReference(name) { - const node = createBaseNode(319 /* JSDocNameReference */); + const node = createBaseNode(322 /* JSDocNameReference */); node.name = name; return node; } @@ -16334,7 +16381,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocNameReference(name), node) : node; } function createJSDocMemberName(left, right) { - const node = createBaseNode(320 /* JSDocMemberName */); + const node = createBaseNode(323 /* JSDocMemberName */); node.left = left; node.right = right; node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); @@ -16344,7 +16391,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; } function createJSDocLink(name, text) { - const node = createBaseNode(333 /* JSDocLink */); + const node = createBaseNode(336 /* JSDocLink */); node.name = name; node.text = text; return node; @@ -16353,7 +16400,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLink(name, text), node) : node; } function createJSDocLinkCode(name, text) { - const node = createBaseNode(334 /* JSDocLinkCode */); + const node = createBaseNode(337 /* JSDocLinkCode */); node.name = name; node.text = text; return node; @@ -16362,7 +16409,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; } function createJSDocLinkPlain(name, text) { - const node = createBaseNode(335 /* JSDocLinkPlain */); + const node = createBaseNode(338 /* JSDocLinkPlain */); node.name = name; node.text = text; return node; @@ -16389,14 +16436,14 @@ function createNodeFactory(flags, baseFactory2) { 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(336 /* JSDocTag */, tagName, comment); + const node = createBaseJSDocTag(339 /* JSDocTag */, tagName, comment); return node; } function updateJSDocUnknownTag(node, tagName, comment) { return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; } function createJSDocText(text) { - const node = createBaseNode(330 /* JSDocText */); + const node = createBaseNode(333 /* JSDocText */); node.text = text; return node; } @@ -16404,7 +16451,7 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text ? update(createJSDocText(text), node) : node; } function createJSDocComment(comment, tags) { - const node = createBaseNode(329 /* JSDoc */); + const node = createBaseNode(332 /* JSDoc */); node.comment = comment; node.tags = asNodeArray(tags); return node; @@ -16413,7 +16460,7 @@ function createNodeFactory(flags, baseFactory2) { return node.comment !== comment || node.tags !== tags ? update(createJSDocComment(comment, tags), node) : node; } function createJsxElement(openingElement, children, closingElement) { - const node = createBaseNode(287 /* JsxElement */); + const node = createBaseNode(290 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -16424,7 +16471,7 @@ function createNodeFactory(flags, baseFactory2) { 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(288 /* JsxSelfClosingElement */); + const node = createBaseNode(291 /* JsxSelfClosingElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -16438,7 +16485,7 @@ function createNodeFactory(flags, baseFactory2) { 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(289 /* JsxOpeningElement */); + const node = createBaseNode(292 /* JsxOpeningElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -16452,7 +16499,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement(tagName, typeArguments, attributes), node) : node; } function createJsxClosingElement(tagName) { - const node = createBaseNode(290 /* JsxClosingElement */); + const node = createBaseNode(293 /* JsxClosingElement */); node.tagName = tagName; node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; return node; @@ -16461,7 +16508,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName ? update(createJsxClosingElement(tagName), node) : node; } function createJsxFragment(openingFragment, children, closingFragment) { - const node = createBaseNode(291 /* JsxFragment */); + const node = createBaseNode(294 /* JsxFragment */); node.openingFragment = openingFragment; node.children = createNodeArray(children); node.closingFragment = closingFragment; @@ -16482,17 +16529,17 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText(text, containsOnlyTriviaWhiteSpaces), node) : node; } function createJsxOpeningFragment() { - const node = createBaseNode(292 /* JsxOpeningFragment */); + const node = createBaseNode(295 /* JsxOpeningFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxJsxClosingFragment() { - const node = createBaseNode(293 /* JsxClosingFragment */); + const node = createBaseNode(296 /* JsxClosingFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxAttribute(name, initializer) { - const node = createBaseNode(294 /* JsxAttribute */); + const node = createBaseNode(297 /* JsxAttribute */); node.name = name; node.initializer = initializer; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; @@ -16502,7 +16549,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node; } function createJsxAttributes(properties) { - const node = createBaseNode(295 /* JsxAttributes */); + const node = createBaseNode(298 /* JsxAttributes */); node.properties = createNodeArray(properties); node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; return node; @@ -16511,7 +16558,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createJsxAttributes(properties), node) : node; } function createJsxSpreadAttribute(expression) { - const node = createBaseNode(296 /* JsxSpreadAttribute */); + const node = createBaseNode(299 /* JsxSpreadAttribute */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; return node; @@ -16520,7 +16567,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxSpreadAttribute(expression), node) : node; } function createJsxExpression(dotDotDotToken, expression) { - const node = createBaseNode(297 /* JsxExpression */); + const node = createBaseNode(300 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; @@ -16530,7 +16577,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxExpression(node.dotDotDotToken, expression), node) : node; } function createCaseClause(expression, statements) { - const node = createBaseNode(298 /* CaseClause */); + const node = createBaseNode(301 /* CaseClause */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); @@ -16540,7 +16587,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statements !== statements ? update(createCaseClause(expression, statements), node) : node; } function createDefaultClause(statements) { - const node = createBaseNode(299 /* DefaultClause */); + const node = createBaseNode(302 /* DefaultClause */); node.statements = createNodeArray(statements); node.transformFlags = propagateChildrenFlags(node.statements); return node; @@ -16549,7 +16596,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createDefaultClause(statements), node) : node; } function createHeritageClause(token, types) { - const node = createBaseNode(300 /* HeritageClause */); + const node = createBaseNode(303 /* HeritageClause */); node.token = token; node.types = createNodeArray(types); node.transformFlags |= propagateChildrenFlags(node.types); @@ -16569,7 +16616,7 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createHeritageClause(node.token, types), node) : node; } function createCatchClause(variableDeclaration, block) { - const node = createBaseNode(301 /* CatchClause */); + const node = createBaseNode(304 /* CatchClause */); if (typeof variableDeclaration === "string" || variableDeclaration && !isVariableDeclaration(variableDeclaration)) { variableDeclaration = createVariableDeclaration( variableDeclaration, @@ -16590,7 +16637,7 @@ function createNodeFactory(flags, baseFactory2) { } function createPropertyAssignment(name, initializer) { const node = createBaseNamedDeclaration( - 305 /* PropertyAssignment */, + 308 /* PropertyAssignment */, void 0, name ); @@ -16616,7 +16663,7 @@ function createNodeFactory(flags, baseFactory2) { } function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { const node = createBaseNamedDeclaration( - 306 /* ShorthandPropertyAssignment */, + 309 /* ShorthandPropertyAssignment */, void 0, name ); @@ -16643,7 +16690,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createSpreadAssignment(expression) { - const node = createBaseNode(307 /* SpreadAssignment */); + const node = createBaseNode(310 /* SpreadAssignment */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; return node; @@ -16652,7 +16699,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node; } function createEnumMember(name, initializer) { - const node = createBaseNode(308 /* EnumMember */); + const node = createBaseNode(311 /* EnumMember */); node.name = asName(name); node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; @@ -16662,7 +16709,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createEnumMember(name, initializer), node) : node; } function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(314 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(317 /* SourceFile */); node.statements = createNodeArray(statements); node.endOfFileToken = endOfFileToken; node.flags |= flags2; @@ -16677,7 +16724,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) { - const node = source.redirectInfo ? Object.create(source.redirectInfo.redirectTarget) : baseFactory2.createBaseSourceFileNode(314 /* SourceFile */); + const node = source.redirectInfo ? Object.create(source.redirectInfo.redirectTarget) : baseFactory2.createBaseSourceFileNode(317 /* SourceFile */); for (const p in source) { if (p === "emitNode" || hasProperty(node, p) || !hasProperty(source, p)) continue; @@ -16699,7 +16746,7 @@ function createNodeFactory(flags, baseFactory2) { 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(315 /* Bundle */); + const node = createBaseNode(318 /* Bundle */); node.prepends = prepends; node.sourceFiles = sourceFiles; return node; @@ -16708,7 +16755,7 @@ function createNodeFactory(flags, baseFactory2) { return node.sourceFiles !== sourceFiles || node.prepends !== prepends ? update(createBundle(sourceFiles, prepends), node) : node; } function createUnparsedSource(prologues, syntheticReferences, texts) { - const node = createBaseNode(316 /* UnparsedSource */); + const node = createBaseNode(319 /* UnparsedSource */); node.prologues = prologues; node.syntheticReferences = syntheticReferences; node.texts = texts; @@ -16725,48 +16772,48 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createUnparsedPrologue(data) { - return createBaseUnparsedNode(309 /* UnparsedPrologue */, data); + return createBaseUnparsedNode(312 /* UnparsedPrologue */, data); } function createUnparsedPrepend(data, texts) { - const node = createBaseUnparsedNode(310 /* UnparsedPrepend */, data); + const node = createBaseUnparsedNode(313 /* UnparsedPrepend */, data); node.texts = texts; return node; } function createUnparsedTextLike(data, internal) { - return createBaseUnparsedNode(internal ? 312 /* UnparsedInternalText */ : 311 /* UnparsedText */, data); + return createBaseUnparsedNode(internal ? 315 /* UnparsedInternalText */ : 314 /* UnparsedText */, data); } function createUnparsedSyntheticReference(section) { - const node = createBaseNode(313 /* UnparsedSyntheticReference */); + const node = createBaseNode(316 /* UnparsedSyntheticReference */); node.data = section.data; node.section = section; return node; } function createInputFiles2() { - const node = createBaseNode(317 /* InputFiles */); + const node = createBaseNode(320 /* InputFiles */); node.javascriptText = ""; node.declarationText = ""; return node; } function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(238 /* SyntheticExpression */); + const node = createBaseNode(240 /* SyntheticExpression */); node.type = type; node.isSpread = isSpread; node.tupleNameSource = tupleNameSource; return node; } function createSyntaxList(children) { - const node = createBaseNode(357 /* SyntaxList */); + const node = createBaseNode(360 /* SyntaxList */); node._children = children; return node; } function createNotEmittedStatement(original) { - const node = createBaseNode(358 /* NotEmittedStatement */); + const node = createBaseNode(361 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; } function createPartiallyEmittedExpression(expression, original) { - const node = createBaseNode(359 /* PartiallyEmittedExpression */); + const node = createBaseNode(362 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -16788,7 +16835,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createCommaListExpression(elements) { - const node = createBaseNode(360 /* CommaListExpression */); + const node = createBaseNode(363 /* CommaListExpression */); node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements)); node.transformFlags |= propagateChildrenFlags(node.elements); return node; @@ -16797,19 +16844,19 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; } function createEndOfDeclarationMarker(original) { - const node = createBaseNode(362 /* EndOfDeclarationMarker */); + const node = createBaseNode(365 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createMergeDeclarationMarker(original) { - const node = createBaseNode(361 /* MergeDeclarationMarker */); + const node = createBaseNode(364 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; } function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(363 /* SyntheticReferenceExpression */); + const node = createBaseNode(366 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); @@ -16822,7 +16869,7 @@ function createNodeFactory(flags, baseFactory2) { if (node === void 0) { return node; } - const clone2 = isSourceFile(node) ? baseFactory2.createBaseSourceFileNode(314 /* SourceFile */) : isIdentifier(node) ? baseFactory2.createBaseIdentifierNode(79 /* Identifier */) : isPrivateIdentifier(node) ? baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */) : !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind); + const clone2 = isSourceFile(node) ? baseFactory2.createBaseSourceFileNode(317 /* SourceFile */) : isIdentifier(node) ? baseFactory2.createBaseIdentifierNode(79 /* Identifier */) : isPrivateIdentifier(node) ? baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */) : !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind); clone2.flags |= node.flags & ~8 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); @@ -16947,17 +16994,17 @@ function createNodeFactory(flags, baseFactory2) { } function updateOuterExpression(outerExpression, expression) { switch (outerExpression.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return updateParenthesizedExpression(outerExpression, expression); - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: return updateTypeAssertion(outerExpression, outerExpression.type, expression); - case 235 /* AsExpression */: + case 237 /* AsExpression */: return updateAsExpression(outerExpression, expression, outerExpression.type); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return updateNonNullExpression(outerExpression, expression); - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression(outerExpression, expression); } } @@ -16997,13 +17044,13 @@ function createNodeFactory(flags, baseFactory2) { case 9 /* BigIntLiteral */: case 10 /* StringLiteral */: return false; - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: const elements = target.elements; if (elements.length === 0) { return false; } return true; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -17250,7 +17297,7 @@ function createNodeFactory(flags, baseFactory2) { } else { modifierArray = modifiers; } - return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, (_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isStructDeclaration(node) ? updateStructDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isAnnotationDeclaration(node) ? updateAnnotationDeclaration(node, modifierArray, node.name, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); + return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isOverloadPropertyDeclaration(node) ? updateOverloadPropertyDeclaration(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, (_a2 = node.questionToken) != null ? _a2 : node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isStructDeclaration(node) ? updateStructDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isAnnotationDeclaration(node) ? updateAnnotationDeclaration(node, modifierArray, node.name, node.members) : isOverloadDeclaration(node) ? updateOverloadDeclaration(node, modifierArray, node.name, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); } function asNodeArray(array) { return array ? createNodeArray(array) : void 0; @@ -17283,41 +17330,41 @@ function updateWithOriginal(updated, original) { } function getDefaultTagNameForKind(kind) { switch (kind) { - case 352 /* JSDocTypeTag */: + case 355 /* JSDocTypeTag */: return "type"; - case 350 /* JSDocReturnTag */: + case 353 /* JSDocReturnTag */: return "returns"; - case 351 /* JSDocThisTag */: + case 354 /* JSDocThisTag */: return "this"; - case 348 /* JSDocEnumTag */: + case 351 /* JSDocEnumTag */: return "enum"; - case 339 /* JSDocAuthorTag */: + case 342 /* JSDocAuthorTag */: return "author"; - case 341 /* JSDocClassTag */: + case 344 /* JSDocClassTag */: return "class"; - case 342 /* JSDocPublicTag */: + case 345 /* JSDocPublicTag */: return "public"; - case 343 /* JSDocPrivateTag */: + case 346 /* JSDocPrivateTag */: return "private"; - case 344 /* JSDocProtectedTag */: + case 347 /* JSDocProtectedTag */: return "protected"; - case 345 /* JSDocReadonlyTag */: + case 348 /* JSDocReadonlyTag */: return "readonly"; - case 346 /* JSDocOverrideTag */: + case 349 /* JSDocOverrideTag */: return "override"; - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return "template"; - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return "typedef"; - case 349 /* JSDocParameterTag */: + case 352 /* JSDocParameterTag */: return "param"; - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: return "prop"; - case 347 /* JSDocCallbackTag */: + case 350 /* JSDocCallbackTag */: return "callback"; - case 337 /* JSDocAugmentsTag */: + case 340 /* JSDocAugmentsTag */: return "augments"; - case 338 /* JSDocImplementsTag */: + case 341 /* JSDocImplementsTag */: return "implements"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); @@ -17390,35 +17437,35 @@ function aggregateChildrenFlags(children) { children.transformFlags = subtreeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */) { + if (kind >= 184 /* FirstTypeNode */ && kind <= 207 /* LastTypeNode */) { return -2 /* TypeExcludes */; } switch (kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 209 /* ArrayLiteralExpression */: + case 215 /* CallExpression */: + case 216 /* NewExpression */: + case 211 /* ArrayLiteralExpression */: return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return -1941676032 /* ModuleExcludes */; - case 168 /* Parameter */: + case 169 /* Parameter */: return -2147483648 /* ParameterExcludes */; - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return -2072174592 /* ArrowFunctionExcludes */; - case 218 /* FunctionExpression */: - case 263 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: return -1937940480 /* FunctionExcludes */; - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return -2146893824 /* VariableDeclarationListExcludes */; - case 264 /* ClassDeclaration */: - case 232 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 234 /* ClassExpression */: return -2147344384 /* ClassExcludes */; - case 176 /* Constructor */: + case 178 /* Constructor */: return -1937948672 /* ConstructorExcludes */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return -2013249536 /* PropertyExcludes */; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return -2005057536 /* MethodOrAccessorExcludes */; case 132 /* AnyKeyword */: case 149 /* NumberKeyword */: @@ -17429,31 +17476,31 @@ function getTransformFlagsSubtreeExclusions(kind) { case 135 /* BooleanKeyword */: case 154 /* SymbolKeyword */: case 115 /* VoidKeyword */: - case 167 /* TypeParameter */: - case 170 /* PropertySignature */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: + case 171 /* PropertySignature */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return -2 /* TypeExcludes */; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return -2147278848 /* ObjectLiteralExcludes */; - case 301 /* CatchClause */: + case 304 /* CatchClause */: return -2147418112 /* CatchClauseExcludes */; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: return -2147450880 /* BindingPatternExcludes */; - case 216 /* TypeAssertionExpression */: - case 239 /* SatisfiesExpression */: - case 235 /* AsExpression */: - case 359 /* PartiallyEmittedExpression */: - case 217 /* ParenthesizedExpression */: + case 218 /* TypeAssertionExpression */: + case 241 /* SatisfiesExpression */: + case 237 /* AsExpression */: + case 362 /* PartiallyEmittedExpression */: + case 219 /* ParenthesizedExpression */: case 107 /* SuperKeyword */: return -2147483648 /* OuterExpressionExcludes */; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return -2147483648 /* PropertyAccessExcludes */; default: return -2147483648 /* NodeExcludes */; @@ -17535,7 +17582,7 @@ function getOrCreateEmitNode(node) { var _a2; if (!node.emitNode) { if (isParseTreeNode(node)) { - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } const sourceFile = (_a2 = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node)))) != null ? _a2 : Debug.fail("Could not determine parsed source file."); @@ -17708,382 +17755,388 @@ function isImportKeyword(node) { return node.kind === 101 /* ImportKeyword */; } function isComputedPropertyName(node) { - return node.kind === 166 /* ComputedPropertyName */; + return node.kind === 167 /* ComputedPropertyName */; } function isTypeParameterDeclaration(node) { - return node.kind === 167 /* TypeParameter */; + return node.kind === 168 /* TypeParameter */; } function isParameter(node) { - return node.kind === 168 /* Parameter */; + return node.kind === 169 /* Parameter */; } function isDecoratorOrAnnotation(node) { - return node.kind === 169 /* Decorator */; + return node.kind === 170 /* Decorator */; } function isPropertySignature(node) { - return node.kind === 170 /* PropertySignature */; + return node.kind === 171 /* PropertySignature */; +} +function isOverloadPropertyDeclaration(node) { + return node.kind === 174 /* OverloadPropertyDeclaration */; } function isPropertyDeclaration(node) { - return node.kind === 171 /* PropertyDeclaration */; + return node.kind === 172 /* PropertyDeclaration */; } function isAnnotationPropertyDeclaration(node) { - return node.kind === 172 /* AnnotationPropertyDeclaration */; + return node.kind === 173 /* AnnotationPropertyDeclaration */; } function isMethodSignature(node) { - return node.kind === 173 /* MethodSignature */; + return node.kind === 175 /* MethodSignature */; } function isMethodDeclaration(node) { - return node.kind === 174 /* MethodDeclaration */; + return node.kind === 176 /* MethodDeclaration */; } function isClassStaticBlockDeclaration(node) { - return node.kind === 175 /* ClassStaticBlockDeclaration */; + return node.kind === 177 /* ClassStaticBlockDeclaration */; } function isConstructorDeclaration(node) { - return node.kind === 176 /* Constructor */; + return node.kind === 178 /* Constructor */; } function isGetAccessorDeclaration(node) { - return node.kind === 177 /* GetAccessor */; + return node.kind === 179 /* GetAccessor */; } function isSetAccessorDeclaration(node) { - return node.kind === 178 /* SetAccessor */; + return node.kind === 180 /* SetAccessor */; } function isCallSignatureDeclaration(node) { - return node.kind === 179 /* CallSignature */; + return node.kind === 181 /* CallSignature */; } function isConstructSignatureDeclaration(node) { - return node.kind === 180 /* ConstructSignature */; + return node.kind === 182 /* ConstructSignature */; } function isIndexSignatureDeclaration(node) { - return node.kind === 181 /* IndexSignature */; + return node.kind === 183 /* IndexSignature */; } function isTypePredicateNode(node) { - return node.kind === 182 /* TypePredicate */; + return node.kind === 184 /* TypePredicate */; } function isTypeReferenceNode(node) { - return node.kind === 183 /* TypeReference */; + return node.kind === 185 /* TypeReference */; } function isFunctionTypeNode(node) { - return node.kind === 184 /* FunctionType */; + return node.kind === 186 /* FunctionType */; } function isConstructorTypeNode(node) { - return node.kind === 185 /* ConstructorType */; + return node.kind === 187 /* ConstructorType */; } function isTypeQueryNode(node) { - return node.kind === 186 /* TypeQuery */; + return node.kind === 188 /* TypeQuery */; } function isTypeLiteralNode(node) { - return node.kind === 187 /* TypeLiteral */; + return node.kind === 189 /* TypeLiteral */; } function isArrayTypeNode(node) { - return node.kind === 188 /* ArrayType */; + return node.kind === 190 /* ArrayType */; } function isTupleTypeNode(node) { - return node.kind === 189 /* TupleType */; + return node.kind === 191 /* TupleType */; } function isNamedTupleMember(node) { - return node.kind === 202 /* NamedTupleMember */; + return node.kind === 204 /* NamedTupleMember */; } function isOptionalTypeNode(node) { - return node.kind === 190 /* OptionalType */; + return node.kind === 192 /* OptionalType */; } function isRestTypeNode(node) { - return node.kind === 191 /* RestType */; + return node.kind === 193 /* RestType */; } function isUnionTypeNode(node) { - return node.kind === 192 /* UnionType */; + return node.kind === 194 /* UnionType */; } function isIntersectionTypeNode(node) { - return node.kind === 193 /* IntersectionType */; + return node.kind === 195 /* IntersectionType */; } function isConditionalTypeNode(node) { - return node.kind === 194 /* ConditionalType */; + return node.kind === 196 /* ConditionalType */; } function isInferTypeNode(node) { - return node.kind === 195 /* InferType */; + return node.kind === 197 /* InferType */; } function isParenthesizedTypeNode(node) { - return node.kind === 196 /* ParenthesizedType */; + return node.kind === 198 /* ParenthesizedType */; } function isThisTypeNode(node) { - return node.kind === 197 /* ThisType */; + return node.kind === 199 /* ThisType */; } function isTypeOperatorNode(node) { - return node.kind === 198 /* TypeOperator */; + return node.kind === 200 /* TypeOperator */; } function isIndexedAccessTypeNode(node) { - return node.kind === 199 /* IndexedAccessType */; + return node.kind === 201 /* IndexedAccessType */; } function isMappedTypeNode(node) { - return node.kind === 200 /* MappedType */; + return node.kind === 202 /* MappedType */; } function isLiteralTypeNode(node) { - return node.kind === 201 /* LiteralType */; + return node.kind === 203 /* LiteralType */; } function isImportTypeNode(node) { - return node.kind === 205 /* ImportType */; + return node.kind === 207 /* ImportType */; } function isTemplateLiteralTypeSpan(node) { - return node.kind === 204 /* TemplateLiteralTypeSpan */; + return node.kind === 206 /* TemplateLiteralTypeSpan */; } function isObjectBindingPattern(node) { - return node.kind === 206 /* ObjectBindingPattern */; + return node.kind === 208 /* ObjectBindingPattern */; } function isArrayBindingPattern(node) { - return node.kind === 207 /* ArrayBindingPattern */; + return node.kind === 209 /* ArrayBindingPattern */; } function isBindingElement(node) { - return node.kind === 208 /* BindingElement */; + return node.kind === 210 /* BindingElement */; } function isArrayLiteralExpression(node) { - return node.kind === 209 /* ArrayLiteralExpression */; + return node.kind === 211 /* ArrayLiteralExpression */; } function isObjectLiteralExpression(node) { - return node.kind === 210 /* ObjectLiteralExpression */; + return node.kind === 212 /* ObjectLiteralExpression */; } function isPropertyAccessExpression(node) { - return node.kind === 211 /* PropertyAccessExpression */; + return node.kind === 213 /* PropertyAccessExpression */; } function isElementAccessExpression(node) { - return node.kind === 212 /* ElementAccessExpression */; + return node.kind === 214 /* ElementAccessExpression */; } function isCallExpression(node) { - return node.kind === 213 /* CallExpression */; + return node.kind === 215 /* CallExpression */; } function isTaggedTemplateExpression(node) { - return node.kind === 215 /* TaggedTemplateExpression */; + return node.kind === 217 /* TaggedTemplateExpression */; } function isParenthesizedExpression(node) { - return node.kind === 217 /* ParenthesizedExpression */; + return node.kind === 219 /* ParenthesizedExpression */; } function isFunctionExpression(node) { - return node.kind === 218 /* FunctionExpression */; + return node.kind === 220 /* FunctionExpression */; } function isEtsComponentExpression(node) { - return node.kind === 220 /* EtsComponentExpression */; + return node.kind === 222 /* EtsComponentExpression */; } function isArrowFunction(node) { - return node.kind === 219 /* ArrowFunction */; + return node.kind === 221 /* ArrowFunction */; } function isTypeOfExpression(node) { - return node.kind === 222 /* TypeOfExpression */; + return node.kind === 224 /* TypeOfExpression */; } function isVoidExpression(node) { - return node.kind === 223 /* VoidExpression */; + return node.kind === 225 /* VoidExpression */; } function isPrefixUnaryExpression(node) { - return node.kind === 225 /* PrefixUnaryExpression */; + return node.kind === 227 /* PrefixUnaryExpression */; } function isBinaryExpression(node) { - return node.kind === 227 /* BinaryExpression */; + return node.kind === 229 /* BinaryExpression */; } function isSpreadElement(node) { - return node.kind === 231 /* SpreadElement */; + return node.kind === 233 /* SpreadElement */; } function isClassExpression(node) { - return node.kind === 232 /* ClassExpression */; + return node.kind === 234 /* ClassExpression */; } function isOmittedExpression(node) { - return node.kind === 233 /* OmittedExpression */; + return node.kind === 235 /* OmittedExpression */; } function isExpressionWithTypeArguments(node) { - return node.kind === 234 /* ExpressionWithTypeArguments */; + return node.kind === 236 /* ExpressionWithTypeArguments */; } function isNonNullExpression(node) { - return node.kind === 236 /* NonNullExpression */; + return node.kind === 238 /* NonNullExpression */; } function isMetaProperty(node) { - return node.kind === 237 /* MetaProperty */; + return node.kind === 239 /* MetaProperty */; } function isPartiallyEmittedExpression(node) { - return node.kind === 359 /* PartiallyEmittedExpression */; + return node.kind === 362 /* PartiallyEmittedExpression */; } function isCommaListExpression(node) { - return node.kind === 360 /* CommaListExpression */; + return node.kind === 363 /* CommaListExpression */; } function isTemplateSpan(node) { - return node.kind === 240 /* TemplateSpan */; + return node.kind === 242 /* TemplateSpan */; } function isBlock(node) { - return node.kind === 242 /* Block */; + return node.kind === 244 /* Block */; } function isVariableStatement(node) { - return node.kind === 244 /* VariableStatement */; + return node.kind === 246 /* VariableStatement */; } function isEmptyStatement(node) { - return node.kind === 243 /* EmptyStatement */; + return node.kind === 245 /* EmptyStatement */; } function isExpressionStatement(node) { - return node.kind === 245 /* ExpressionStatement */; + return node.kind === 247 /* ExpressionStatement */; } function isLabeledStatement(node) { - return node.kind === 257 /* LabeledStatement */; + return node.kind === 259 /* LabeledStatement */; } function isVariableDeclaration(node) { - return node.kind === 261 /* VariableDeclaration */; + return node.kind === 263 /* VariableDeclaration */; } function isVariableDeclarationList(node) { - return node.kind === 262 /* VariableDeclarationList */; + return node.kind === 264 /* VariableDeclarationList */; } function isFunctionDeclaration(node) { - return node.kind === 263 /* FunctionDeclaration */; + return node.kind === 265 /* FunctionDeclaration */; } function isClassDeclaration(node) { - return node.kind === 264 /* ClassDeclaration */; + return node.kind === 266 /* ClassDeclaration */; } function isStructDeclaration(node) { - return node.kind === 265 /* StructDeclaration */; + return node.kind === 267 /* StructDeclaration */; } function isAnnotationDeclaration(node) { - return node.kind === 266 /* AnnotationDeclaration */; + return node.kind === 268 /* AnnotationDeclaration */; +} +function isOverloadDeclaration(node) { + return node.kind === 269 /* OverloadDeclaration */; } function isInterfaceDeclaration(node) { - return node.kind === 267 /* InterfaceDeclaration */; + return node.kind === 270 /* InterfaceDeclaration */; } function isTypeAliasDeclaration(node) { - return node.kind === 268 /* TypeAliasDeclaration */; + return node.kind === 271 /* TypeAliasDeclaration */; } function isEnumDeclaration(node) { - return node.kind === 269 /* EnumDeclaration */; + return node.kind === 272 /* EnumDeclaration */; } function isModuleDeclaration(node) { - return node.kind === 270 /* ModuleDeclaration */; + return node.kind === 273 /* ModuleDeclaration */; } function isModuleBlock(node) { - return node.kind === 271 /* ModuleBlock */; + return node.kind === 274 /* ModuleBlock */; } function isCaseBlock(node) { - return node.kind === 272 /* CaseBlock */; + return node.kind === 275 /* CaseBlock */; } function isImportEqualsDeclaration(node) { - return node.kind === 274 /* ImportEqualsDeclaration */; + return node.kind === 277 /* ImportEqualsDeclaration */; } function isImportDeclaration(node) { - return node.kind === 275 /* ImportDeclaration */; + return node.kind === 278 /* ImportDeclaration */; } function isImportClause(node) { - return node.kind === 276 /* ImportClause */; + return node.kind === 279 /* ImportClause */; } function isImportTypeAssertionContainer(node) { - return node.kind === 304 /* ImportTypeAssertionContainer */; + return node.kind === 307 /* ImportTypeAssertionContainer */; } function isAssertClause(node) { - return node.kind === 302 /* AssertClause */; + return node.kind === 305 /* AssertClause */; } function isAssertEntry(node) { - return node.kind === 303 /* AssertEntry */; + return node.kind === 306 /* AssertEntry */; } function isNamespaceImport(node) { - return node.kind === 277 /* NamespaceImport */; + return node.kind === 280 /* NamespaceImport */; } function isNamespaceExport(node) { - return node.kind === 283 /* NamespaceExport */; + return node.kind === 286 /* NamespaceExport */; } function isImportSpecifier(node) { - return node.kind === 279 /* ImportSpecifier */; + return node.kind === 282 /* ImportSpecifier */; } function isExportAssignment(node) { - return node.kind === 280 /* ExportAssignment */; + return node.kind === 283 /* ExportAssignment */; } function isExportDeclaration(node) { - return node.kind === 281 /* ExportDeclaration */; + return node.kind === 284 /* ExportDeclaration */; } function isExportSpecifier(node) { - return node.kind === 284 /* ExportSpecifier */; + return node.kind === 287 /* ExportSpecifier */; } function isNotEmittedStatement(node) { - return node.kind === 358 /* NotEmittedStatement */; + return node.kind === 361 /* NotEmittedStatement */; } function isExternalModuleReference(node) { - return node.kind === 286 /* ExternalModuleReference */; + return node.kind === 289 /* ExternalModuleReference */; } function isJsxOpeningElement(node) { - return node.kind === 289 /* JsxOpeningElement */; + return node.kind === 292 /* JsxOpeningElement */; } function isJsxClosingElement(node) { - return node.kind === 290 /* JsxClosingElement */; + return node.kind === 293 /* JsxClosingElement */; } function isJsxOpeningFragment(node) { - return node.kind === 292 /* JsxOpeningFragment */; + return node.kind === 295 /* JsxOpeningFragment */; } function isJsxClosingFragment(node) { - return node.kind === 293 /* JsxClosingFragment */; + return node.kind === 296 /* JsxClosingFragment */; } function isJsxAttributes(node) { - return node.kind === 295 /* JsxAttributes */; + return node.kind === 298 /* JsxAttributes */; } function isDefaultClause(node) { - return node.kind === 299 /* DefaultClause */; + return node.kind === 302 /* DefaultClause */; } function isHeritageClause(node) { - return node.kind === 300 /* HeritageClause */; + return node.kind === 303 /* HeritageClause */; } function isCatchClause(node) { - return node.kind === 301 /* CatchClause */; + return node.kind === 304 /* CatchClause */; } function isPropertyAssignment(node) { - return node.kind === 305 /* PropertyAssignment */; + return node.kind === 308 /* PropertyAssignment */; } function isShorthandPropertyAssignment(node) { - return node.kind === 306 /* ShorthandPropertyAssignment */; + return node.kind === 309 /* ShorthandPropertyAssignment */; } function isEnumMember(node) { - return node.kind === 308 /* EnumMember */; + return node.kind === 311 /* EnumMember */; } function isUnparsedPrepend(node) { - return node.kind === 310 /* UnparsedPrepend */; + return node.kind === 313 /* UnparsedPrepend */; } function isSourceFile(node) { - return node.kind === 314 /* SourceFile */; + return node.kind === 317 /* SourceFile */; } function isUnparsedSource(node) { - return node.kind === 316 /* UnparsedSource */; + return node.kind === 319 /* UnparsedSource */; } function isJSDocTypeExpression(node) { - return node.kind === 318 /* JSDocTypeExpression */; + return node.kind === 321 /* JSDocTypeExpression */; } function isJSDocNullableType(node) { - return node.kind === 323 /* JSDocNullableType */; + return node.kind === 326 /* JSDocNullableType */; } function isJSDocFunctionType(node) { - return node.kind === 326 /* JSDocFunctionType */; + return node.kind === 329 /* JSDocFunctionType */; } function isJSDoc(node) { - return node.kind === 329 /* JSDoc */; + return node.kind === 332 /* JSDoc */; } function isJSDocTypeLiteral(node) { - return node.kind === 331 /* JSDocTypeLiteral */; + return node.kind === 334 /* JSDocTypeLiteral */; } function isJSDocPublicTag(node) { - return node.kind === 342 /* JSDocPublicTag */; + return node.kind === 345 /* JSDocPublicTag */; } function isJSDocPrivateTag(node) { - return node.kind === 343 /* JSDocPrivateTag */; + return node.kind === 346 /* JSDocPrivateTag */; } function isJSDocProtectedTag(node) { - return node.kind === 344 /* JSDocProtectedTag */; + return node.kind === 347 /* JSDocProtectedTag */; } function isJSDocReadonlyTag(node) { - return node.kind === 345 /* JSDocReadonlyTag */; + return node.kind === 348 /* JSDocReadonlyTag */; } function isJSDocOverrideTag(node) { - return node.kind === 346 /* JSDocOverrideTag */; + return node.kind === 349 /* JSDocOverrideTag */; } function isJSDocDeprecatedTag(node) { - return node.kind === 340 /* JSDocDeprecatedTag */; + return node.kind === 343 /* JSDocDeprecatedTag */; } function isJSDocEnumTag(node) { - return node.kind === 348 /* JSDocEnumTag */; + return node.kind === 351 /* JSDocEnumTag */; } function isJSDocParameterTag(node) { - return node.kind === 349 /* JSDocParameterTag */; + return node.kind === 352 /* JSDocParameterTag */; } function isJSDocReturnTag(node) { - return node.kind === 350 /* JSDocReturnTag */; + return node.kind === 353 /* JSDocReturnTag */; } function isJSDocTypeTag(node) { - return node.kind === 352 /* JSDocTypeTag */; + return node.kind === 355 /* JSDocTypeTag */; } function isJSDocTemplateTag(node) { - return node.kind === 353 /* JSDocTemplateTag */; + return node.kind === 356 /* JSDocTemplateTag */; } // src/compiler/factory/utilities.ts @@ -18106,25 +18159,25 @@ function findUseStrictPrologue(statements) { return void 0; } function isCommaSequence(node) { - return node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 360 /* CommaListExpression */; + return node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || node.kind === 363 /* CommaListExpression */; } function isJSDocTypeAssertion(node) { return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node); } function isOuterExpression(node, kinds = 15 /* All */) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { return false; } return (kinds & 1 /* Parentheses */) !== 0; - case 216 /* TypeAssertionExpression */: - case 235 /* AsExpression */: - case 239 /* SatisfiesExpression */: + case 218 /* TypeAssertionExpression */: + case 237 /* AsExpression */: + case 241 /* SatisfiesExpression */: return (kinds & 2 /* TypeAssertions */) !== 0; - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return (kinds & 4 /* NonNullAssertions */) !== 0; - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -18154,11 +18207,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } if (isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return bindingElement.name; - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } } @@ -18172,11 +18225,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: + case 211 /* ArrayLiteralExpression */: return name.elements; - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return name.properties; } } @@ -18193,7 +18246,7 @@ function getJSDocTypeAliasName(fullName) { } function canHaveIllegalDecorators(node) { const kind = node.kind; - return kind === 305 /* PropertyAssignment */ || kind === 306 /* ShorthandPropertyAssignment */ || kind === 263 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 285 /* MissingDeclaration */ || kind === 244 /* VariableStatement */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 269 /* EnumDeclaration */ || kind === 270 /* ModuleDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 273 /* NamespaceExportDeclaration */ || kind === 281 /* ExportDeclaration */ || kind === 280 /* ExportAssignment */; + return kind === 308 /* PropertyAssignment */ || kind === 309 /* ShorthandPropertyAssignment */ || kind === 265 /* FunctionDeclaration */ || kind === 178 /* Constructor */ || kind === 183 /* IndexSignature */ || kind === 177 /* ClassStaticBlockDeclaration */ || kind === 288 /* MissingDeclaration */ || kind === 246 /* VariableStatement */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 272 /* EnumDeclaration */ || kind === 273 /* ModuleDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 276 /* NamespaceExportDeclaration */ || kind === 284 /* ExportDeclaration */ || kind === 283 /* ExportAssignment */; } var isTypeNodeOrTypeParameterDeclaration = or(isTypeNode, isTypeParameterDeclaration); var isQuestionOrExclamationToken = or(isQuestionToken, isExclamationToken); @@ -18420,11 +18473,11 @@ function setTextRange(range, location) { } function canHaveModifiers(node) { const kind = node.kind; - return kind === 167 /* TypeParameter */ || kind === 168 /* Parameter */ || kind === 170 /* PropertySignature */ || kind === 171 /* PropertyDeclaration */ || kind === 173 /* MethodSignature */ || kind === 174 /* MethodDeclaration */ || kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 185 /* ConstructorType */ || kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || kind === 232 /* ClassExpression */ || kind === 265 /* StructDeclaration */ || kind === 266 /* AnnotationDeclaration */ || kind === 244 /* VariableStatement */ || kind === 263 /* FunctionDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 267 /* InterfaceDeclaration */ || kind === 268 /* TypeAliasDeclaration */ || kind === 269 /* EnumDeclaration */ || kind === 270 /* ModuleDeclaration */ || kind === 274 /* ImportEqualsDeclaration */ || kind === 275 /* ImportDeclaration */ || kind === 280 /* ExportAssignment */ || kind === 281 /* ExportDeclaration */; + return kind === 168 /* TypeParameter */ || kind === 169 /* Parameter */ || kind === 171 /* PropertySignature */ || kind === 172 /* PropertyDeclaration */ || kind === 175 /* MethodSignature */ || kind === 176 /* MethodDeclaration */ || kind === 178 /* Constructor */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 183 /* IndexSignature */ || kind === 187 /* ConstructorType */ || kind === 220 /* FunctionExpression */ || kind === 221 /* ArrowFunction */ || kind === 234 /* ClassExpression */ || kind === 267 /* StructDeclaration */ || kind === 268 /* AnnotationDeclaration */ || kind === 246 /* VariableStatement */ || kind === 265 /* FunctionDeclaration */ || kind === 266 /* ClassDeclaration */ || kind === 270 /* InterfaceDeclaration */ || kind === 271 /* TypeAliasDeclaration */ || kind === 272 /* EnumDeclaration */ || kind === 273 /* ModuleDeclaration */ || kind === 277 /* ImportEqualsDeclaration */ || kind === 278 /* ImportDeclaration */ || kind === 283 /* ExportAssignment */ || kind === 284 /* ExportDeclaration */; } function canHaveDecorators(node) { const kind = node.kind; - return kind === 168 /* Parameter */ || kind === 171 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 232 /* ClassExpression */ || kind === 264 /* ClassDeclaration */ || kind === 265 /* StructDeclaration */; + return kind === 169 /* Parameter */ || kind === 172 /* PropertyDeclaration */ || kind === 176 /* MethodDeclaration */ || kind === 179 /* GetAccessor */ || kind === 180 /* SetAccessor */ || kind === 234 /* ClassExpression */ || kind === 266 /* ClassDeclaration */ || kind === 267 /* StructDeclaration */; } // src/compiler/parser.ts @@ -18479,430 +18532,434 @@ function isImportMeta(node) { return isMetaProperty(node) && node.keywordToken === 101 /* ImportKeyword */ && node.name.escapedText === "meta"; } var forEachChildTable = { - [165 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { + [166 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [167 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { + [168 /* 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); }, - [306 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { + [309 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || 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); }, - [307 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { + [310 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [168 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { + [169 /* 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); }, - [171 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { + [172 /* 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); }, - [172 /* AnnotationPropertyDeclaration */]: function forEachChildInAnnotationPropertyDeclaration(node, cbNode, _cbNodes) { + [173 /* AnnotationPropertyDeclaration */]: function forEachChildInAnnotationPropertyDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [170 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { + [171 /* 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); + }, + [174 /* OverloadPropertyDeclaration */]: function forEachChildInOverloadPropertyDeclaration(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); }, - [305 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { + [308 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); }, - [261 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { + [263 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [208 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { + [210 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [181 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { + [183 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [185 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { + [187 /* 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); }, - [184 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { + [186 /* 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); }, - [179 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [180 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [220 /* EtsComponentExpression */]: function forEachChildInEtsComponentExpression(node, cbNode, cbNodes) { + [181 /* CallSignature */]: forEachChildInCallOrConstructSignature, + [182 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, + [222 /* EtsComponentExpression */]: function forEachChildInEtsComponentExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.arguments) || visitNode2(cbNode, node.body); }, - [174 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { + [176 /* 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); }, - [173 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { + [175 /* 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); }, - [176 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { + [178 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || 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); }, - [177 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { + [179 /* 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); }, - [178 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { + [180 /* 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); }, - [263 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { + [265 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || 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); }, - [218 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { + [220 /* 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); }, - [219 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { + [221 /* 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); }, - [175 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { + [177 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); }, - [183 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { + [185 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [182 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { + [184 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); }, - [186 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { + [188 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [187 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { + [189 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.members); }, - [188 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { + [190 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.elementType); }, - [189 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { + [191 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [192 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [193 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [194 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { + [194 /* UnionType */]: forEachChildInUnionOrIntersectionType, + [195 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, + [196 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); }, - [195 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { + [197 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.typeParameter); }, - [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { + [207 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [304 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { + [307 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); }, - [196 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [198 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [199 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { + [198 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, + [200 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, + [201 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); }, - [200 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { + [202 /* 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); }, - [201 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { + [203 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.literal); }, - [202 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { + [204 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); }, - [206 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [207 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [209 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { + [208 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [209 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [211 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [210 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { + [212 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [211 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { + [213 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); }, - [212 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { + [214 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); }, - [213 /* CallExpression */]: forEachChildInCallOrNewExpression, - [214 /* NewExpression */]: forEachChildInCallOrNewExpression, - [215 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { + [215 /* CallExpression */]: forEachChildInCallOrNewExpression, + [216 /* NewExpression */]: forEachChildInCallOrNewExpression, + [217 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); }, - [216 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { + [218 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); }, - [217 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { + [219 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [221 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { + [223 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [222 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { + [224 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [223 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { + [225 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [225 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { + [227 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [230 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { + [232 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); }, - [224 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { + [226 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [226 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { + [228 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [227 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { + [229 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); }, - [235 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { + [237 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [236 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { + [238 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [239 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { + [241 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [237 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { + [239 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [228 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { + [230 /* 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); }, - [231 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { + [233 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [242 /* Block */]: forEachChildInBlock, - [271 /* ModuleBlock */]: forEachChildInBlock, - [314 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { + [244 /* Block */]: forEachChildInBlock, + [274 /* ModuleBlock */]: forEachChildInBlock, + [317 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); }, - [244 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { + [246 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); }, - [262 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { + [264 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.declarations); }, - [245 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { + [247 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [246 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { + [248 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); }, - [247 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { + [249 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); }, - [248 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { + [250 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [249 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { + [251 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); }, - [250 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { + [252 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [251 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { + [253 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [252 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [253 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [254 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { + [254 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, + [255 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, + [256 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [255 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { + [257 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [256 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { + [258 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); }, - [272 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { + [275 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.clauses); }, - [298 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { + [301 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); }, - [299 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { + [302 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements); }, - [257 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { + [259 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); }, - [258 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { + [260 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [259 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { + [261 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); }, - [301 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { + [304 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); }, - [169 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { + [170 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [264 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [232 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [265 /* StructDeclaration */]: forEachChildInClassDeclarationOrExpression, - [266 /* AnnotationDeclaration */]: forEachChildInAnnotationDeclaration, - [267 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { + [266 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, + [234 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, + [267 /* StructDeclaration */]: forEachChildInClassDeclarationOrExpression, + [268 /* AnnotationDeclaration */]: forEachChildInAnnotationDeclaration, + [269 /* OverloadDeclaration */]: forEachChildInOverloadDeclaration, + [270 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); }, - [268 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { + [271 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); }, - [269 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { + [272 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); }, - [308 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { + [311 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [270 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { + [273 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); }, - [274 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { + [277 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, - [275 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { + [278 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [276 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { + [279 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [302 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [305 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [303 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [306 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, - [273 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { + [276 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNode2(cbNode, node.name); }, - [277 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { + [280 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [283 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { + [286 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [278 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [282 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [281 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { + [281 /* NamedImports */]: forEachChildInNamedImportsOrExports, + [285 /* NamedExports */]: forEachChildInNamedImportsOrExports, + [284 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [279 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [284 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [280 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { + [282 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, + [287 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, + [283 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); }, - [229 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { + [231 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [240 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { + [242 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); }, - [203 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { + [205 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [204 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { + [206 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); }, - [166 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { + [167 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [300 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { + [303 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.types); }, - [234 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { + [236 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [286 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { + [289 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [285 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { + [288 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers); }, - [360 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { + [363 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [287 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { + [290 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); }, - [291 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { + [294 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); }, - [288 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [289 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [295 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { + [291 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [292 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [298 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [294 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { + [297 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [296 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { + [299 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [297 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { + [300 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); }, - [290 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { + [293 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tagName); }, - [190 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [191 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [318 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [324 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [323 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [325 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [327 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [326 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { + [192 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [193 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [321 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [327 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [326 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [328 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [330 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [329 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [329 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { + [332 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); }, - [355 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { + [358 /* 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)); }, - [319 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { + [322 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [320 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { + [323 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [349 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [356 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [339 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { + [352 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, + [359 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, + [342 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [338 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { + [341 /* 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)); }, - [337 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { + [340 /* 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)); }, - [353 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { + [356 /* 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)); }, - [354 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 318 /* 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))); + [357 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { + return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 321 /* 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))); }, - [347 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { + [350 /* 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)); }, - [350 /* JSDocReturnTag */]: forEachChildInJSDocReturnTag, - [352 /* JSDocTypeTag */]: forEachChildInJSDocReturnTag, - [351 /* JSDocThisTag */]: forEachChildInJSDocReturnTag, - [348 /* JSDocEnumTag */]: forEachChildInJSDocReturnTag, - [332 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { + [353 /* JSDocReturnTag */]: forEachChildInJSDocReturnTag, + [355 /* JSDocTypeTag */]: forEachChildInJSDocReturnTag, + [354 /* JSDocThisTag */]: forEachChildInJSDocReturnTag, + [351 /* JSDocEnumTag */]: forEachChildInJSDocReturnTag, + [335 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); }, - [333 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [334 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [335 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [331 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { + [336 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, + [337 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, + [338 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, + [334 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { return forEach(node.jsDocPropertyTags, cbNode); }, - [336 /* JSDocTag */]: forEachChildInJSDocTag, - [341 /* JSDocClassTag */]: forEachChildInJSDocTag, - [342 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [343 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [344 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [345 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [340 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [346 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [359 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression + [339 /* JSDocTag */]: forEachChildInJSDocTag, + [344 /* JSDocClassTag */]: forEachChildInJSDocTag, + [345 /* JSDocPublicTag */]: forEachChildInJSDocTag, + [346 /* JSDocPrivateTag */]: forEachChildInJSDocTag, + [347 /* JSDocProtectedTag */]: forEachChildInJSDocTag, + [348 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, + [343 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, + [349 /* JSDocOverrideTag */]: forEachChildInJSDocTag, + [362 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression }; function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); @@ -18931,6 +18988,9 @@ function forEachChildInClassDeclarationOrExpression(node, cbNode, cbNodes) { function forEachChildInAnnotationDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); } +function forEachChildInOverloadDeclaration(node, cbNode, cbNodes) { + return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); +} function forEachChildInNamedImportsOrExports(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); } @@ -18959,7 +19019,7 @@ function forEachChildInPartiallyEmittedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); } function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 164 /* LastToken */) { + if (node === void 0 || node.kind <= 165 /* LastToken */) { return; } const fn = forEachChildTable[node.kind]; @@ -18994,7 +19054,7 @@ function forEachChildRecursively(rootNode, cbNode, cbNodes) { continue; return res; } - if (current.kind >= 165 /* FirstNode */) { + if (current.kind >= 166 /* FirstNode */) { for (const child of gatherPossibleChildren(current)) { queue.push(child); parents.push(current); @@ -19917,7 +19977,7 @@ var Parser; parseErrorAtCurrentToken(diagnosticMessage, arg0); } const pos = getNodePos(); - const result = kind === 79 /* Identifier */ ? factory2.createIdentifier("", void 0, void 0) : isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(kind, "", "", void 0) : kind === 8 /* NumericLiteral */ ? factory2.createNumericLiteral("", void 0) : kind === 10 /* StringLiteral */ ? factory2.createStringLiteral("", void 0) : kind === 285 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factory2.createToken(kind); + const result = kind === 79 /* Identifier */ ? factory2.createIdentifier("", void 0, void 0) : isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(kind, "", "", void 0) : kind === 8 /* NumericLiteral */ ? factory2.createNumericLiteral("", void 0) : kind === 10 /* StringLiteral */ ? factory2.createStringLiteral("", void 0) : kind === 288 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factory2.createToken(kind); return finishNode(result, pos); } function internIdentifier(text) { @@ -20042,6 +20102,9 @@ var Parser; if (inAllowAnnotationContext() && token() === 59 /* AtToken */) { return lookAhead(() => nextToken() === 119 /* InterfaceKeyword */); } + if (token() === 164 /* OverloadKeyword */) { + return true; + } return canFollowExportModifier(); case 89 /* DefaultKeyword */: return nextTokenCanFollowDefaultKeyword(); @@ -20066,7 +20129,7 @@ var Parser; return isModifierKind(token()) && tryParse(nextTokenCanFollowModifier); } function canFollowModifier() { - return token() === 22 /* OpenBracketToken */ || token() === 18 /* OpenBraceToken */ || token() === 41 /* AsteriskToken */ || token() === 25 /* DotDotDotToken */ || token() === 59 /* AtToken */ && inAllowAnnotationContext() && lookAhead(() => nextToken() === 119 /* InterfaceKeyword */) || isLiteralPropertyName(); + return token() === 22 /* OpenBracketToken */ || token() === 18 /* OpenBraceToken */ || token() === 41 /* AsteriskToken */ || token() === 25 /* DotDotDotToken */ || token() === 59 /* AtToken */ && inAllowAnnotationContext() && lookAhead(() => nextToken() === 119 /* InterfaceKeyword */) || token() === 164 /* OverloadKeyword */ || isLiteralPropertyName(); } function nextTokenCanFollowDefaultKeyword() { nextToken(); @@ -20341,15 +20404,15 @@ var Parser; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 176 /* Constructor */: - case 181 /* IndexSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 241 /* SemicolonClassElement */: + case 178 /* Constructor */: + case 183 /* IndexSignature */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 243 /* SemicolonClassElement */: return true; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return !inStructContext(); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: const methodDeclaration = node; const nameIsConstructor = methodDeclaration.name.kind === 79 /* Identifier */ && methodDeclaration.name.originalKeywordKind === 136 /* ConstructorKeyword */; return !nameIsConstructor; @@ -20360,8 +20423,8 @@ var Parser; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: return true; } } @@ -20370,66 +20433,66 @@ var Parser; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 263 /* FunctionDeclaration */: - case 244 /* VariableStatement */: - case 242 /* Block */: - case 246 /* IfStatement */: - case 245 /* ExpressionStatement */: - case 258 /* ThrowStatement */: - case 254 /* ReturnStatement */: - case 256 /* SwitchStatement */: - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 249 /* ForStatement */: - case 248 /* WhileStatement */: - case 255 /* WithStatement */: - case 243 /* EmptyStatement */: - case 259 /* TryStatement */: - case 257 /* LabeledStatement */: - case 247 /* DoStatement */: - case 260 /* DebuggerStatement */: - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: - case 281 /* ExportDeclaration */: - case 280 /* ExportAssignment */: - case 270 /* ModuleDeclaration */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 267 /* InterfaceDeclaration */: - case 269 /* EnumDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 265 /* FunctionDeclaration */: + case 246 /* VariableStatement */: + case 244 /* Block */: + case 248 /* IfStatement */: + case 247 /* ExpressionStatement */: + case 260 /* ThrowStatement */: + case 256 /* ReturnStatement */: + case 258 /* SwitchStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 251 /* ForStatement */: + case 250 /* WhileStatement */: + case 257 /* WithStatement */: + case 245 /* EmptyStatement */: + case 261 /* TryStatement */: + case 259 /* LabeledStatement */: + case 249 /* DoStatement */: + case 262 /* DebuggerStatement */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: + case 284 /* ExportDeclaration */: + case 283 /* ExportAssignment */: + case 273 /* ModuleDeclaration */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 270 /* InterfaceDeclaration */: + case 272 /* EnumDeclaration */: + case 271 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 308 /* EnumMember */; + return node.kind === 311 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 170 /* PropertySignature */: - case 179 /* CallSignature */: + case 182 /* ConstructSignature */: + case 175 /* MethodSignature */: + case 183 /* IndexSignature */: + case 171 /* PropertySignature */: + case 181 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 261 /* VariableDeclaration */) { + if (node.kind !== 263 /* VariableDeclaration */) { return false; } const variableDeclarator = node; return variableDeclarator.initializer === void 0; } function isReusableParameter(node) { - if (node.kind !== 168 /* Parameter */) { + if (node.kind !== 169 /* Parameter */) { return false; } const parameter = node; @@ -20720,14 +20783,14 @@ var Parser; } function typeHasArrowFunctionBlockingParseError(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 185 /* TypeReference */: return nodeIsMissing(node.typeName); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: { + case 186 /* FunctionType */: + case 187 /* ConstructorType */: { const { parameters, type } = node; return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); } - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return typeHasArrowFunctionBlockingParseError(node.type); default: return false; @@ -20968,14 +21031,14 @@ var Parser; function parseSignatureMember(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 180 /* ConstructSignature */) { + if (kind === 182 /* ConstructSignature */) { parseExpected(104 /* NewKeyword */); } const typeParameters = parseTypeParameters(); const parameters = parseParameters(4 /* Type */); const type = parseReturnType(58 /* ColonToken */, true); parseTypeMemberSemicolon(); - const node = kind === 179 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); + const node = kind === 181 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } function isIndexSignature() { @@ -21013,6 +21076,17 @@ var Parser; node.illegalDecorators = decorators; return withJSDoc(finishNode(node, pos), hasJSDoc); } + function parseOverloadPropertyDeclaration(pos, hasJSDoc, modifiers) { + const name = parsePropertyName(); + const questionToken = parseOptionalToken(57 /* QuestionToken */); + let node; + const type = parseTypeAnnotation(); + node = factory2.createOverloadPropertyDeclaration(modifiers, name, questionToken, type); + if (token() === 63 /* EqualsToken */) + node.initializer = parseInitializer(); + parseTypeMemberSemicolon(); + return withJSDoc(finishNode(node, pos), hasJSDoc); + } function parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers) { const name = parsePropertyName(); const questionToken = parseOptionalToken(57 /* QuestionToken */); @@ -21054,19 +21128,19 @@ var Parser; } function parseTypeMember() { if (token() === 20 /* OpenParenToken */ || token() === 29 /* LessThanToken */) { - return parseSignatureMember(179 /* CallSignature */); + return parseSignatureMember(181 /* CallSignature */); } if (token() === 104 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(180 /* ConstructSignature */); + return parseSignatureMember(182 /* ConstructSignature */); } const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); const modifiers = parseModifiers(); if (parseContextualModifier(138 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 177 /* GetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 179 /* GetAccessor */, 4 /* Type */); } if (parseContextualModifier(152 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 178 /* SetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, void 0, modifiers, 180 /* SetAccessor */, 4 /* Type */); } if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, void 0, modifiers); @@ -21942,7 +22016,7 @@ var Parser; return void 0; } let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 196 /* ParenthesizedType */) { + while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 198 /* ParenthesizedType */) { unwrappedType = unwrappedType.type; } const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); @@ -22005,7 +22079,7 @@ var Parser; return parseBinaryExpressionRest(precedence, leftOperand, pos); } function isInOrOfKeyword(t) { - return t === 102 /* InKeyword */ || t === 164 /* OfKeyword */; + return t === 102 /* InKeyword */ || t === 165 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand, pos) { while (true) { @@ -22087,7 +22161,7 @@ var Parser; if (token() === 42 /* AsteriskAsteriskToken */) { const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 216 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 218 /* 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)); @@ -22210,11 +22284,11 @@ var Parser; const pos = getNodePos(); const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); let result; - if (opening.kind === 289 /* JsxOpeningElement */) { + if (opening.kind === 292 /* JsxOpeningElement */) { let children = parseJsxChildren(opening); let closingElement; const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 287 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { + if ((lastChild == null ? void 0 : lastChild.kind) === 290 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { const end = lastChild.children.end; const newLast = finishNode( factory2.createJsxElement( @@ -22238,10 +22312,10 @@ var Parser; } } result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 292 /* JsxOpeningFragment */) { + } else if (opening.kind === 295 /* JsxOpeningFragment */) { result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { - Debug.assert(opening.kind === 288 /* JsxSelfClosingElement */); + Debug.assert(opening.kind === 291 /* JsxSelfClosingElement */); result = opening; } if (inExpressionContext && token() === 29 /* LessThanToken */) { @@ -22297,7 +22371,7 @@ var Parser; if (!child) break; list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 287 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { + if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 290 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { break; } } @@ -22505,7 +22579,7 @@ var Parser; continue; } if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 234 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest(pos, expression, questionDotToken, void 0); + expression = !questionDotToken && expression.kind === 236 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest(pos, expression, questionDotToken, void 0); continue; } if (!questionDotToken) { @@ -22553,7 +22627,7 @@ var Parser; } } if (typeArguments || token() === 20 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 234 /* ExpressionWithTypeArguments */) { + if (!questionDotToken && expression.kind === 236 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -22780,10 +22854,10 @@ var Parser; const decorators = parseDecorators(); const modifiers = parseModifiers(); if (parseContextualModifier(138 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 177 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 179 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(152 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 178 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 180 /* SetAccessor */, 0 /* None */); } const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const tokenIsIdentifier = isIdentifier2(); @@ -22853,7 +22927,7 @@ var Parser; const expressionPos = getNodePos(); let expression = parseMemberExpressionRest(expressionPos, parsePrimaryExpression(), false); let typeArguments; - if (expression.kind === 234 /* ExpressionWithTypeArguments */) { + if (expression.kind === 236 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -22961,7 +23035,7 @@ var Parser; } } let node; - if (awaitToken ? parseExpected(164 /* OfKeyword */) : parseOptional(164 /* OfKeyword */)) { + if (awaitToken ? parseExpected(165 /* OfKeyword */) : parseOptional(165 /* OfKeyword */)) { const expression = allowInAnd(() => parseAssignmentExpressionOrHigher(true)); parseExpected(21 /* CloseParenToken */); node = factory2.createForOfStatement(awaitToken, initializer, expression, parseStatement()); @@ -22982,10 +23056,10 @@ var Parser; function parseBreakOrContinueStatement(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 253 /* BreakStatement */ ? 81 /* BreakKeyword */ : 87 /* ContinueKeyword */); + parseExpected(kind === 255 /* BreakStatement */ ? 81 /* BreakKeyword */ : 87 /* ContinueKeyword */); const label = canParseSemicolon() ? void 0 : parseIdentifier(); parseSemicolon(); - const node = kind === 253 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); + const node = kind === 255 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseReturnStatement() { @@ -23139,6 +23213,8 @@ var Parser; return inEtsContext(); case 59 /* AtToken */: return inAllowAnnotationContext() && nextToken() === 119 /* InterfaceKeyword */; + case 164 /* OverloadKeyword */: + return nextTokenIsIdentifierOnSameLine(); case 119 /* InterfaceKeyword */: case 155 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); @@ -23273,9 +23349,9 @@ var Parser; case 98 /* ForKeyword */: return parseForOrForInOrForOfStatement(); case 87 /* ContinueKeyword */: - return parseBreakOrContinueStatement(252 /* ContinueStatement */); + return parseBreakOrContinueStatement(254 /* ContinueStatement */); case 81 /* BreakKeyword */: - return parseBreakOrContinueStatement(253 /* BreakStatement */); + return parseBreakOrContinueStatement(255 /* BreakStatement */); case 106 /* ReturnKeyword */: return parseReturnStatement(); case 117 /* WithKeyword */: @@ -23291,6 +23367,7 @@ var Parser; case 88 /* DebuggerKeyword */: return parseDebuggerStatement(); case 59 /* AtToken */: + case 164 /* OverloadKeyword */: return parseDeclaration(); case 133 /* AsyncKeyword */: case 119 /* InterfaceKeyword */: @@ -23339,6 +23416,19 @@ var Parser; const node = factory2.createAnnotationDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } + function parseOverloadDeclaration(pos, hasJSDoc, decorators, modifiers) { + parseExpected(164 /* OverloadKeyword */); + const name = createIdentifier(isBindingIdentifier()); + let members; + if (parseExpected(18 /* OpenBraceToken */)) { + members = parseOverloadMembers(); + parseExpected(19 /* CloseBraceToken */); + } else { + members = createMissingList(); + } + const node = factory2.createOverloadDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, members); + return withJSDoc(finishNode(node, pos), hasJSDoc); + } function parseDeclaration() { var _a2, _b; const pos = getNodePos(); @@ -23408,6 +23498,8 @@ var Parser; return parseAnnotationDeclaration(pos, hasJSDoc, decorators, modifiers); } return parseDeclarationDefault(pos, decorators, modifiers); + case 164 /* OverloadKeyword */: + return parseOverloadDeclaration(pos, hasJSDoc, decorators, modifiers); case 119 /* InterfaceKeyword */: return parseInterfaceDeclaration(pos, hasJSDoc, decorators, modifiers); case 155 /* TypeKeyword */: @@ -23437,7 +23529,7 @@ var Parser; } function parseDeclarationDefault(pos, decorators, modifiers) { if (decorators || modifiers) { - const missing = createMissingNode(285 /* MissingDeclaration */, true, Diagnostics.Declaration_expected); + const missing = createMissingNode(288 /* MissingDeclaration */, true, Diagnostics.Declaration_expected); setTextRangePos(missing, pos); missing.illegalDecorators = decorators; missing.modifiers = modifiers; @@ -23547,7 +23639,7 @@ var Parser; } nextToken(); let declarations; - if (token() === 164 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 165 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { declarations = createMissingList(); } else { const savedDisallowIn = inDisallowInContext(); @@ -23577,7 +23669,7 @@ var Parser; const asteriskToken = parseOptionalToken(41 /* AsteriskToken */); const name = modifierFlags & 1024 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); if (name && hasEtsStylesDecoratorNames(decorators, sourceFileCompilerOptions)) { - fileStylesComponents.set(name.escapedText.toString(), 263 /* FunctionDeclaration */); + fileStylesComponents.set(name.escapedText.toString(), 265 /* FunctionDeclaration */); } const originalUICallbackContext = inUICallbackContext(); setEtsBuilderContext(hasEtsBuilderDecoratorNames(decorators, sourceFileCompilerOptions)); @@ -23681,7 +23773,7 @@ var Parser; setUICallbackContext(inBuildContext() || inBuilderContext()); if (inStructContext() && hasEtsStylesDecoratorNames(decorators, sourceFileCompilerOptions)) { if (methodName && currentStructName) { - structStylesComponents.set(methodName, { structName: currentStructName, kind: 174 /* MethodDeclaration */ }); + structStylesComponents.set(methodName, { structName: currentStructName, kind: 176 /* MethodDeclaration */ }); } const stylesEtsComponentDecoratorNames = getEtsStylesDecoratorComponentNames(decorators, sourceFileCompilerOptions); if (stylesEtsComponentDecoratorNames.length > 0) { @@ -23770,7 +23862,7 @@ var Parser; const parameters = parseParameters(0 /* None */); const type = parseReturnType(58 /* ColonToken */, false); const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 177 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, type, body) : factory2.createSetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, body); + const node = kind === 179 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, type, body) : factory2.createSetAccessorDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, parameters, body); node.typeParameters = typeParameters; if (isSetAccessorDeclaration(node)) node.type = type; @@ -23982,10 +24074,10 @@ var Parser; return parseClassStaticBlockDeclaration(pos, hasJSDoc, decorators, modifiers); } if (parseContextualModifier(138 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 177 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 179 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(152 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 178 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 180 /* SetAccessor */, 0 /* None */); } if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, decorators, modifiers); @@ -24021,35 +24113,35 @@ var Parser; const hasJSDoc = hasPrecedingJSDocComment(); if (token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (parseContextualModifier(138 /* GetKeyword */)) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (parseContextualModifier(152 /* SetKeyword */)) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); } if (isIndexSignature()) { return createMissingNode( - 172 /* AnnotationPropertyDeclaration */, + 173 /* AnnotationPropertyDeclaration */, true, Diagnostics.Unexpected_keyword_or_identifier ); @@ -24060,11 +24152,66 @@ var Parser; } return Debug.fail("Should not have attempted to parse annotation member declaration."); } + function parseOverloadElement() { + const pos = getNodePos(); + if (token() === 26 /* SemicolonToken */) { + parseErrorAt(pos, pos, Diagnostics.Unexpected_keyword_or_identifier); + } + const hasJSDoc = hasPrecedingJSDocComment(); + if (token() === 125 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (parseContextualModifier(138 /* GetKeyword */)) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (parseContextualModifier(152 /* SetKeyword */)) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (token() === 136 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (isIndexSignature()) { + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + if (tokenIsIdentifierOrKeyword(token())) { + const modifiers = parseModifiers(); + let overloadPropertyDeclaration = parseOverloadPropertyDeclaration(pos, hasJSDoc, modifiers); + if (overloadPropertyDeclaration.kind === 174 /* OverloadPropertyDeclaration */) { + return overloadPropertyDeclaration; + } + return createMissingNode( + 174 /* OverloadPropertyDeclaration */, + true, + Diagnostics.Unexpected_keyword_or_identifier + ); + } + return Debug.fail("Should not have attempted to parse annotation member declaration."); + } function parseClassExpression() { - return parseClassDeclarationOrExpression(getNodePos(), hasPrecedingJSDocComment(), void 0, void 0, 232 /* ClassExpression */); + return parseClassDeclarationOrExpression(getNodePos(), hasPrecedingJSDocComment(), void 0, void 0, 234 /* ClassExpression */); } function parseClassDeclaration(pos, hasJSDoc, decorators, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers, 264 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers, 266 /* ClassDeclaration */); } function parseStructDeclaration(pos, hasJSDoc, decorators, modifiers) { return parseStructDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers); @@ -24085,7 +24232,7 @@ var Parser; members = createMissingList(); } setAwaitContext(savedAwaitContext); - const node = kind === 264 /* ClassDeclaration */ ? factory2.createClassDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members) : factory2.createClassExpression(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members); + const node = kind === 266 /* ClassDeclaration */ ? factory2.createClassDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members) : factory2.createClassExpression(combineDecoratorsAndModifiers(decorators, modifiers), name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseStructDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers) { @@ -24149,7 +24296,7 @@ var Parser; function parseExpressionWithTypeArguments() { const pos = getNodePos(); const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 234 /* ExpressionWithTypeArguments */) { + if (expression.kind === 236 /* ExpressionWithTypeArguments */) { return expression; } const typeArguments = tryParseTypeArguments(); @@ -24167,13 +24314,16 @@ var Parser; function parseAnnotationMembers() { return parseList(ParsingContext.AnnotationMembers, parseAnnotationElement); } + function parseOverloadMembers() { + return parseList(ParsingContext.TypeMembers, parseOverloadElement); + } function parseStructMembers(pos) { const structMembers = parseList(ParsingContext.ClassMembers, parseClassElement); const virtualStructMembers = []; const virtualParameterProperties = []; structMembers.forEach((member) => { virtualStructMembers.push(member); - if (member.kind === 171 /* PropertyDeclaration */) { + if (member.kind === 172 /* PropertyDeclaration */) { const property = member; virtualParameterProperties.push( finishVirtualNode( @@ -24420,7 +24570,7 @@ var Parser; function parseImportClause(identifier, pos, isTypeOnly) { let namedBindings; if (!identifier || parseOptional(27 /* CommaToken */)) { - namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(278 /* NamedImports */); + namedBindings = token() === 41 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(281 /* NamedImports */); } return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); } @@ -24453,15 +24603,15 @@ var Parser; } function parseNamedImportsOrExports(kind) { const pos = getNodePos(); - const node = kind === 278 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); + const node = kind === 281 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseImportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(ParsingContext.ImportOrExportSpecifiers, parseExportSpecifier, 18 /* OpenBraceToken */, 19 /* CloseBraceToken */)); return finishNode(node, pos); } function parseExportSpecifier() { const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(284 /* ExportSpecifier */), hasJSDoc); + return withJSDoc(parseImportOrExportSpecifier(287 /* ExportSpecifier */), hasJSDoc); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(279 /* ImportSpecifier */); + return parseImportOrExportSpecifier(282 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { const pos = getNodePos(); @@ -24505,10 +24655,10 @@ var Parser; parseExpected(129 /* AsKeyword */); name = parseNameWithKeywordCheck(); } - if (kind === 279 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 282 /* ImportSpecifier */ && checkIdentifierIsKeyword) { parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); } - const node = kind === 279 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); + const node = kind === 282 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); return finishNode(node, pos); function parseNameWithKeywordCheck() { checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); @@ -24535,7 +24685,7 @@ var Parser; parseExpected(160 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } else { - exportClause = parseNamedImportsOrExports(282 /* NamedExports */); + exportClause = parseNamedImportsOrExports(285 /* NamedExports */); if (token() === 160 /* FromKeyword */ || token() === 10 /* StringLiteral */ && !scanner.hasPrecedingLineBreak()) { parseExpected(160 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); @@ -25109,7 +25259,7 @@ var Parser; switch (node.kind) { case 150 /* ObjectKeyword */: return true; - case 188 /* ArrayType */: + case 190 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; @@ -25139,12 +25289,12 @@ var Parser; let child; let children; while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent2, name))) { - if (child.kind === 349 /* JSDocParameterTag */ || child.kind === 356 /* JSDocPropertyTag */) { + if (child.kind === 352 /* JSDocParameterTag */ || child.kind === 359 /* JSDocPropertyTag */) { children = append(children, child); } } if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 188 /* ArrayType */), pos); + const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 190 /* ArrayType */), pos); return finishNode(factory2.createJSDocTypeExpression(literal), pos); } } @@ -25257,7 +25407,7 @@ var Parser; let hasChildren = false; while (child = tryParse(() => parseChildPropertyTag(indent2))) { hasChildren = true; - if (child.kind === 352 /* JSDocTypeTag */) { + if (child.kind === 355 /* JSDocTypeTag */) { if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { @@ -25272,7 +25422,7 @@ var Parser; } } if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 188 /* ArrayType */; + const isArrayType = typeExpression && typeExpression.type.kind === 190 /* ArrayType */; const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start2); end2 = typeExpression.end; @@ -25323,7 +25473,7 @@ var Parser; const returnTag = tryParse(() => { if (parseOptionalJsdoc(59 /* AtToken */)) { const tag = parseTag(indent2); - if (tag && tag.kind === 350 /* JSDocReturnTag */) { + if (tag && tag.kind === 353 /* JSDocReturnTag */) { return tag; } } @@ -25357,7 +25507,7 @@ var Parser; case 59 /* AtToken */: if (canParseTag) { const child = tryParseChildTag(target, indent2); - if (child && (child.kind === 349 /* JSDocParameterTag */ || child.kind === 356 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 352 /* JSDocParameterTag */ || child.kind === 359 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -27642,7 +27792,7 @@ function convertConfigFileToObject(sourceFile, errors, reportOptionsErrors, opti var _a2; const rootExpression = (_a2 = sourceFile.statements[0]) == null ? void 0 : _a2.expression; const knownRootOptions = reportOptionsErrors ? getTsconfigRootOptionsMap() : void 0; - if (rootExpression && rootExpression.kind !== 210 /* ObjectLiteralExpression */) { + if (rootExpression && rootExpression.kind !== 212 /* ObjectLiteralExpression */) { errors.push(createDiagnosticForNodeInSourceFile( sourceFile, rootExpression, @@ -27670,7 +27820,7 @@ function convertToObjectWorker(sourceFile, rootExpression, errors, returnValue, function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) { const result = returnValue ? {} : void 0; for (const element of node.properties) { - if (element.kind !== 305 /* PropertyAssignment */) { + if (element.kind !== 308 /* PropertyAssignment */) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); continue; } @@ -27758,13 +27908,13 @@ function convertToObjectWorker(sourceFile, rootExpression, errors, returnValue, case 8 /* NumericLiteral */: reportInvalidOptionValue(option && option.type !== "number"); return validateValue(Number(valueExpression.text)); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: if (valueExpression.operator !== 40 /* MinusToken */ || valueExpression.operand.kind !== 8 /* NumericLiteral */) { break; } reportInvalidOptionValue(option && option.type !== "number"); return validateValue(-Number(valueExpression.operand.text)); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: reportInvalidOptionValue(option && option.type !== "object"); const objectLiteralExpression = valueExpression; if (option) { @@ -27783,7 +27933,7 @@ function convertToObjectWorker(sourceFile, rootExpression, errors, returnValue, void 0 )); } - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: reportInvalidOptionValue(option && option.type !== "list"); return validateValue(convertArrayLiteralExpressionToJson( valueExpression.elements, @@ -29330,7 +29480,7 @@ function getEtsExtendDecoratorsComponentNames(decorators, compilerOptions) { const extendComponents = []; const extendDecorator = (_c = (_b = (_a2 = compilerOptions.ets) == null ? void 0 : _a2.extend) == null ? void 0 : _b.decorator) != null ? _c : "Extend"; decorators == null ? void 0 : decorators.forEach((decorator) => { - if (decorator.expression.kind === 213 /* CallExpression */) { + if (decorator.expression.kind === 215 /* CallExpression */) { const identifier = decorator.expression.expression; const args = decorator.expression.arguments; if (identifier.kind === 79 /* Identifier */ && (extendDecorator == null ? void 0 : extendDecorator.includes(identifier.escapedText.toString())) && args.length) { @@ -29347,7 +29497,7 @@ function getEtsStylesDecoratorComponentNames(decorators, compilerOptions) { const stylesComponents = []; const stylesDecorator = (_c = (_b = (_a2 = compilerOptions.ets) == null ? void 0 : _a2.styles) == null ? void 0 : _b.decorator) != null ? _c : "Styles"; decorators == null ? void 0 : decorators.forEach((decorator) => { - if (decorator.kind === 169 /* Decorator */ && decorator.expression.kind === 79 /* Identifier */) { + if (decorator.kind === 170 /* Decorator */ && decorator.expression.kind === 79 /* Identifier */) { const identifier = decorator.expression; if (identifier.kind === 79 /* Identifier */ && identifier.escapedText === stylesDecorator) { stylesComponents.push(identifier.escapedText); @@ -29590,23 +29740,23 @@ function getModuleInstanceStateCached(node, visited = new Map2()) { } function getModuleInstanceStateWorker(node, visited) { switch (node.kind) { - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return 0 /* NonInstantiated */; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: if (isEnumConst(node)) { return 2 /* ConstEnumOnly */; } break; - case 275 /* ImportDeclaration */: - case 274 /* ImportEqualsDeclaration */: + case 278 /* ImportDeclaration */: + case 277 /* ImportEqualsDeclaration */: if (!hasSyntacticModifier(node, 1 /* Export */)) { return 0 /* NonInstantiated */; } break; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: const exportDeclaration = node; - if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 282 /* NamedExports */) { + if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 285 /* NamedExports */) { let state = 0 /* NonInstantiated */; for (const specifier of exportDeclaration.exportClause.elements) { const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); @@ -29620,7 +29770,7 @@ function getModuleInstanceStateWorker(node, visited) { return state; } break; - case 271 /* ModuleBlock */: { + case 274 /* ModuleBlock */: { let state = 0 /* NonInstantiated */; forEachChild(node, (n) => { const childState = getModuleInstanceStateCached(n, visited); @@ -29639,7 +29789,7 @@ function getModuleInstanceStateWorker(node, visited) { }); return state; } - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return getModuleInstanceState(node, visited); case 79 /* Identifier */: if (node.isInJSDocNamespace) { @@ -29789,7 +29939,7 @@ function createBinder() { } } function getDeclarationName(node) { - if (node.kind === 280 /* ExportAssignment */) { + if (node.kind === 283 /* ExportAssignment */) { return node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; } const name = getNameOfDeclaration(node); @@ -29798,7 +29948,7 @@ function createBinder() { const moduleName = getTextOfIdentifierOrLiteral(name); return isGlobalScopeAugmentation(node) ? "__global" : `"${moduleName}"`; } - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -29820,30 +29970,30 @@ function createBinder() { return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0; } switch (node.kind) { - case 176 /* Constructor */: + case 178 /* Constructor */: return "__constructor" /* Constructor */; - case 184 /* FunctionType */: - case 179 /* CallSignature */: - case 332 /* JSDocSignature */: + case 186 /* FunctionType */: + case 181 /* CallSignature */: + case 335 /* JSDocSignature */: return "__call" /* Call */; - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 187 /* ConstructorType */: + case 182 /* ConstructSignature */: return "__new" /* New */; - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return "__index" /* Index */; - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return "__export" /* ExportStar */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return "export=" /* ExportEquals */; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) === 2 /* ModuleExports */) { return "export=" /* ExportEquals */; } Debug.fail("Unknown binary declaration kind"); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: return isJSDocConstructSignature(node) ? "__new" /* New */ : "__call" /* Call */; - case 168 /* Parameter */: - Debug.assert(node.parent.kind === 326 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); + case 169 /* Parameter */: + Debug.assert(node.parent.kind === 329 /* 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; @@ -29890,7 +30040,7 @@ function createBinder() { messageNeedsName = false; multipleDefaultExports = true; } else { - if (symbol.declarations && symbol.declarations.length && (node.kind === 280 /* ExportAssignment */ && !node.isExportEquals)) { + if (symbol.declarations && symbol.declarations.length && (node.kind === 283 /* ExportAssignment */ && !node.isExportEquals)) { message = Diagnostics.A_module_cannot_have_multiple_default_exports; messageNeedsName = false; multipleDefaultExports = true; @@ -29929,7 +30079,7 @@ function createBinder() { function declareModuleMember(node, symbolFlags, symbolExcludes) { const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { - if (node.kind === 284 /* ExportSpecifier */ || node.kind === 274 /* ImportEqualsDeclaration */ && hasExportModifier) { + if (node.kind === 287 /* ExportSpecifier */ || node.kind === 277 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { return declareSymbol(container.locals, void 0, node, symbolFlags, symbolExcludes); @@ -29973,7 +30123,7 @@ function createBinder() { const saveThisParentContainer = thisParentContainer; const savedBlockScopeContainer = blockScopeContainer; if (containerFlags & 1 /* IsContainer */) { - if (node.kind !== 219 /* ArrowFunction */) { + if (node.kind !== 221 /* ArrowFunction */) { thisParentContainer = container; } container = blockScopeContainer = node; @@ -29993,14 +30143,14 @@ function createBinder() { const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 177 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { currentFlow.node = node; } } - currentReturnTarget = isImmediatelyInvoked || node.kind === 176 /* Constructor */ || isInJSFile(node) && (node.kind === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */) ? createBranchLabel() : void 0; + currentReturnTarget = isImmediatelyInvoked || node.kind === 178 /* Constructor */ || isInJSFile(node) && (node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */) ? createBranchLabel() : void 0; currentExceptionTarget = void 0; currentBreakTarget = void 0; currentContinueTarget = void 0; @@ -30014,14 +30164,14 @@ function createBinder() { node.flags |= 512 /* HasExplicitReturn */; node.endFlowNode = currentFlow; } - if (node.kind === 314 /* SourceFile */) { + if (node.kind === 317 /* SourceFile */) { node.flags |= emitFlags; node.endFlowNode = currentFlow; } if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); currentFlow = finishFlowLabel(currentReturnTarget); - if (node.kind === 176 /* Constructor */ || node.kind === 175 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 263 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { + if (node.kind === 178 /* Constructor */ || node.kind === 177 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 265 /* FunctionDeclaration */ || node.kind === 220 /* FunctionExpression */)) { node.returnFlowNode = currentFlow; } } @@ -30046,8 +30196,8 @@ function createBinder() { blockScopeContainer = savedBlockScopeContainer; } function bindEachFunctionsFirst(nodes) { - bindEach(nodes, (n) => n.kind === 263 /* FunctionDeclaration */ ? bind(n) : void 0); - bindEach(nodes, (n) => n.kind !== 263 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind === 265 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind !== 265 /* FunctionDeclaration */ ? bind(n) : void 0); } function bindEach(nodes, bindFunction = bind) { if (nodes === void 0) { @@ -30067,59 +30217,59 @@ function createBinder() { inAssignmentPattern = saveInAssignmentPattern; return; } - if (node.kind >= 244 /* FirstStatement */ && node.kind <= 260 /* LastStatement */ && !options.allowUnreachableCode) { + if (node.kind >= 246 /* FirstStatement */ && node.kind <= 262 /* LastStatement */ && !options.allowUnreachableCode) { node.flowNode = currentFlow; } switch (node.kind) { - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: bindWhileStatement(node); break; - case 247 /* DoStatement */: + case 249 /* DoStatement */: bindDoStatement(node); break; - case 249 /* ForStatement */: + case 251 /* ForStatement */: bindForStatement(node); break; - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 246 /* IfStatement */: + case 248 /* IfStatement */: bindIfStatement(node); break; - case 254 /* ReturnStatement */: - case 258 /* ThrowStatement */: + case 256 /* ReturnStatement */: + case 260 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 253 /* BreakStatement */: - case 252 /* ContinueStatement */: + case 255 /* BreakStatement */: + case 254 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 259 /* TryStatement */: + case 261 /* TryStatement */: bindTryStatement(node); break; - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: bindSwitchStatement(node); break; - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: bindCaseBlock(node); break; - case 298 /* CaseClause */: + case 301 /* CaseClause */: bindCaseClause(node); break; - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: bindExpressionStatement(node); break; - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: bindLabeledStatement(node); break; - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: bindPrefixUnaryExpressionFlow(node); break; - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: bindPostfixUnaryExpressionFlow(node); break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: if (isDestructuringAssignment(node)) { inAssignmentPattern = saveInAssignmentPattern; bindDestructuringAssignmentFlow(node); @@ -30127,49 +30277,49 @@ function createBinder() { } bindBinaryExpressionFlow(node); break; - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: bindDeleteExpressionFlow(node); break; - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: bindConditionalExpressionFlow(node); break; - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: bindVariableDeclarationFlow(node); break; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: bindAccessExpressionFlow(node); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: bindCallExpressionFlow(node); break; - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: bindNonNullExpressionFlow(node); break; - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 314 /* SourceFile */: { + case 317 /* SourceFile */: { bindEachFunctionsFirst(node.statements); bind(node.endOfFileToken); break; } - case 242 /* Block */: - case 271 /* ModuleBlock */: + case 244 /* Block */: + case 274 /* ModuleBlock */: bindEachFunctionsFirst(node.statements); break; - case 208 /* BindingElement */: + case 210 /* BindingElement */: bindBindingElementFlow(node); break; - case 168 /* Parameter */: + case 169 /* Parameter */: bindParameterFlow(node); break; - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: - case 305 /* PropertyAssignment */: - case 231 /* SpreadElement */: + case 212 /* ObjectLiteralExpression */: + case 211 /* ArrayLiteralExpression */: + case 308 /* PropertyAssignment */: + case 233 /* SpreadElement */: inAssignmentPattern = saveInAssignmentPattern; default: bindEachChild(node); @@ -30183,19 +30333,19 @@ function createBinder() { case 79 /* Identifier */: case 80 /* PrivateIdentifier */: case 109 /* ThisKeyword */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: return containsNarrowableReference(expr); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return hasNarrowableArgument(expr); - case 217 /* ParenthesizedExpression */: - case 236 /* NonNullExpression */: + case 219 /* ParenthesizedExpression */: + case 238 /* NonNullExpression */: return isNarrowingExpression(expr.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return isNarrowingBinaryExpression(expr); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return expr.operator === 53 /* ExclamationToken */ && isNarrowingExpression(expr.operand); - case 222 /* TypeOfExpression */: + case 224 /* TypeOfExpression */: return isNarrowingExpression(expr.expression); } return false; @@ -30214,7 +30364,7 @@ function createBinder() { } } } - if (expr.expression.kind === 211 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { + if (expr.expression.kind === 213 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { return true; } return false; @@ -30245,9 +30395,9 @@ function createBinder() { } function isNarrowableOperand(expr) { switch (expr.kind) { - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return isNarrowableOperand(expr.expression); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: switch (expr.operatorToken.kind) { case 63 /* EqualsToken */: return isNarrowableOperand(expr.left); @@ -30320,24 +30470,24 @@ function createBinder() { function isStatementCondition(node) { const parent2 = node.parent; switch (parent2.kind) { - case 246 /* IfStatement */: - case 248 /* WhileStatement */: - case 247 /* DoStatement */: + case 248 /* IfStatement */: + case 250 /* WhileStatement */: + case 249 /* DoStatement */: return parent2.expression === node; - case 249 /* ForStatement */: - case 228 /* ConditionalExpression */: + case 251 /* ForStatement */: + case 230 /* ConditionalExpression */: return parent2.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 217 /* ParenthesizedExpression */) { + if (node.kind === 219 /* ParenthesizedExpression */) { node = node.expression; - } else if (node.kind === 225 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { + } else if (node.kind === 227 /* PrefixUnaryExpression */ && node.operator === 53 /* ExclamationToken */) { node = node.operand; } else { - return node.kind === 227 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */); + return node.kind === 229 /* BinaryExpression */ && (node.operatorToken.kind === 55 /* AmpersandAmpersandToken */ || node.operatorToken.kind === 56 /* BarBarToken */ || node.operatorToken.kind === 60 /* QuestionQuestionToken */); } } } @@ -30378,7 +30528,7 @@ function createBinder() { } function setContinueTarget(node, target) { let label = activeLabelList; - while (label && node.parent.kind === 257 /* LabeledStatement */) { + while (label && node.parent.kind === 259 /* LabeledStatement */) { label.continueTarget = target; label = label.next; node = node.parent; @@ -30429,12 +30579,12 @@ function createBinder() { bind(node.expression); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 251 /* ForOfStatement */) { + if (node.kind === 253 /* ForOfStatement */) { bind(node.awaitModifier); } addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 262 /* VariableDeclarationList */) { + if (node.initializer.kind !== 264 /* VariableDeclarationList */) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -30456,7 +30606,7 @@ function createBinder() { } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 254 /* ReturnStatement */) { + if (node.kind === 256 /* ReturnStatement */) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -30473,7 +30623,7 @@ function createBinder() { return void 0; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - const flowLabel = node.kind === 253 /* BreakStatement */ ? breakTarget : continueTarget; + const flowLabel = node.kind === 255 /* BreakStatement */ ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -30543,7 +30693,7 @@ function createBinder() { preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 299 /* DefaultClause */); + const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 302 /* DefaultClause */); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -30586,7 +30736,7 @@ function createBinder() { maybeBindExpressionFlowIfCall(node.expression); } function maybeBindExpressionFlowIfCall(node) { - if (node.kind === 213 /* CallExpression */) { + if (node.kind === 215 /* CallExpression */) { const call = node; if (call.expression.kind !== 107 /* SuperKeyword */ && isDottedName(call.expression)) { currentFlow = createFlowCall(currentFlow, call); @@ -30612,7 +30762,7 @@ function createBinder() { currentFlow = finishFlowLabel(postStatementLabel); } function bindDestructuringTargetFlow(node) { - if (node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { + if (node.kind === 229 /* BinaryExpression */ && node.operatorToken.kind === 63 /* EqualsToken */) { bindAssignmentTargetFlow(node.left); } else { bindAssignmentTargetFlow(node); @@ -30621,21 +30771,21 @@ function createBinder() { function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); - } else if (node.kind === 209 /* ArrayLiteralExpression */) { + } else if (node.kind === 211 /* ArrayLiteralExpression */) { for (const e of node.elements) { - if (e.kind === 231 /* SpreadElement */) { + if (e.kind === 233 /* SpreadElement */) { bindAssignmentTargetFlow(e.expression); } else { bindDestructuringTargetFlow(e); } } - } else if (node.kind === 210 /* ObjectLiteralExpression */) { + } else if (node.kind === 212 /* ObjectLiteralExpression */) { for (const p of node.properties) { - if (p.kind === 305 /* PropertyAssignment */) { + if (p.kind === 308 /* PropertyAssignment */) { bindDestructuringTargetFlow(p.initializer); - } else if (p.kind === 306 /* ShorthandPropertyAssignment */) { + } else if (p.kind === 309 /* ShorthandPropertyAssignment */) { bindAssignmentTargetFlow(p.name); - } else if (p.kind === 307 /* SpreadAssignment */) { + } else if (p.kind === 310 /* SpreadAssignment */) { bindAssignmentTargetFlow(p.expression); } } @@ -30758,7 +30908,7 @@ function createBinder() { const operator = node.operatorToken.kind; if (isAssignmentOperator(operator) && !isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 63 /* EqualsToken */ && node.left.kind === 212 /* ElementAccessExpression */) { + if (operator === 63 /* EqualsToken */ && node.left.kind === 214 /* ElementAccessExpression */) { const elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -30786,7 +30936,7 @@ function createBinder() { } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 211 /* PropertyAccessExpression */) { + if (node.expression.kind === 213 /* PropertyAccessExpression */) { bindAssignmentTargetFlow(node.expression); } } @@ -30851,7 +31001,7 @@ function createBinder() { } function bindJSDocTypeAlias(node) { bind(node.tagName); - if (node.kind !== 348 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 351 /* JSDocEnumTag */ && node.fullName) { setParent(node.fullName, node); setParentRecursive(node.fullName, false); } @@ -30862,7 +31012,7 @@ function createBinder() { function bindJSDocClassTag(node) { bindEachChild(node); const host = getHostSignatureFromJSDoc(node); - if (host && host.kind !== 174 /* MethodDeclaration */) { + if (host && host.kind !== 176 /* MethodDeclaration */) { addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } @@ -30875,15 +31025,15 @@ function createBinder() { } function bindOptionalChainRest(node) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: bind(node.questionDotToken); bind(node.name); break; - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: bind(node.questionDotToken); bind(node.argumentExpression); break; - case 213 /* CallExpression */: + case 215 /* CallExpression */: bind(node.questionDotToken); bindEach(node.typeArguments); bindEach(node.arguments); @@ -30930,7 +31080,7 @@ function createBinder() { bindOptionalChainFlow(node); } else { const expr = skipParentheses(node.expression); - if (expr.kind === 218 /* FunctionExpression */ || expr.kind === 219 /* ArrowFunction */) { + if (expr.kind === 220 /* FunctionExpression */ || expr.kind === 221 /* ArrowFunction */) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); @@ -30941,7 +31091,7 @@ function createBinder() { } } } - if (node.expression.kind === 211 /* PropertyAccessExpression */) { + if (node.expression.kind === 213 /* PropertyAccessExpression */) { const propertyAccess = node.expression; if (isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -30950,58 +31100,60 @@ function createBinder() { } function getContainerFlags(node) { switch (node.kind) { - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: - case 269 /* EnumDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 295 /* JsxAttributes */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: + case 272 /* EnumDeclaration */: + case 212 /* ObjectLiteralExpression */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 298 /* JsxAttributes */: return 1 /* IsContainer */; - case 267 /* InterfaceDeclaration */: + case 270 /* InterfaceDeclaration */: return 1 /* IsContainer */ | 64 /* IsInterface */; - case 270 /* ModuleDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 200 /* MappedType */: - case 181 /* IndexSignature */: + case 273 /* ModuleDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 202 /* MappedType */: + case 183 /* IndexSignature */: return 1 /* IsContainer */ | 32 /* HasLocals */; - case 314 /* SourceFile */: + case 317 /* SourceFile */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 176 /* MethodDeclaration */: if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */; } - case 176 /* Constructor */: - case 263 /* FunctionDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 332 /* JSDocSignature */: - case 326 /* JSDocFunctionType */: - case 184 /* FunctionType */: - case 180 /* ConstructSignature */: - case 185 /* ConstructorType */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 265 /* FunctionDeclaration */: + case 175 /* MethodSignature */: + case 181 /* CallSignature */: + case 335 /* JSDocSignature */: + case 329 /* JSDocFunctionType */: + case 186 /* FunctionType */: + case 182 /* ConstructSignature */: + case 187 /* ConstructorType */: + case 177 /* ClassStaticBlockDeclaration */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return 4 /* IsControlFlowContainer */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 301 /* CatchClause */: - case 249 /* ForStatement */: - case 250 /* ForInStatement */: - case 251 /* ForOfStatement */: - case 272 /* CaseBlock */: + case 304 /* CatchClause */: + case 251 /* ForStatement */: + case 252 /* ForInStatement */: + case 253 /* ForOfStatement */: + case 275 /* CaseBlock */: return 2 /* IsBlockScopedContainer */; - case 242 /* Block */: + case 244 /* Block */: return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */; } return 0 /* None */; @@ -31014,43 +31166,44 @@ function createBinder() { } function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 314 /* SourceFile */: + case 317 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: - case 266 /* AnnotationDeclaration */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: + case 268 /* AnnotationDeclaration */: + case 269 /* OverloadDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 210 /* ObjectLiteralExpression */: - case 267 /* InterfaceDeclaration */: - case 295 /* JsxAttributes */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 212 /* ObjectLiteralExpression */: + case 270 /* InterfaceDeclaration */: + case 298 /* JsxAttributes */: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 332 /* JSDocSignature */: - case 181 /* IndexSignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 326 /* JSDocFunctionType */: - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 175 /* ClassStaticBlockDeclaration */: - case 268 /* TypeAliasDeclaration */: - case 200 /* MappedType */: + case 186 /* FunctionType */: + case 187 /* ConstructorType */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 335 /* JSDocSignature */: + case 183 /* IndexSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: + case 178 /* Constructor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: + case 329 /* JSDocFunctionType */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 177 /* ClassStaticBlockDeclaration */: + case 271 /* TypeAliasDeclaration */: + case 202 /* MappedType */: return declareSymbol(container.locals, void 0, node, symbolFlags, symbolExcludes); } } @@ -31136,10 +31289,10 @@ function createBinder() { } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (isExternalOrCommonJsModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -31329,7 +31482,7 @@ function createBinder() { } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2 /* ES2015 */) { - if (blockScopeContainer.kind !== 314 /* SourceFile */ && blockScopeContainer.kind !== 270 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { + if (blockScopeContainer.kind !== 317 /* SourceFile */ && blockScopeContainer.kind !== 273 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); file.bindDiagnostics.push(createFileDiagnostic( file, @@ -31396,7 +31549,7 @@ function createBinder() { node.tracingPath = file.path; const saveInStrictMode = inStrictMode; bindWorker(node); - if (node.kind > 164 /* LastToken */) { + if (node.kind > 165 /* LastToken */) { const saveParent = parent; parent = node; const containerFlags = getContainerFlags(node); @@ -31458,23 +31611,23 @@ function createBinder() { break; } case 109 /* ThisKeyword */: - if (currentFlow && (isExpression(node) || parent.kind === 306 /* ShorthandPropertyAssignment */)) { + if (currentFlow && (isExpression(node) || parent.kind === 309 /* ShorthandPropertyAssignment */)) { node.flowNode = currentFlow; } return checkContextualIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: if (currentFlow && isPartOfTypeQuery(node)) { node.flowNode = currentFlow; } break; - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: case 107 /* SuperKeyword */: node.flowNode = currentFlow; break; case 80 /* PrivateIdentifier */: return checkPrivateIdentifier(node); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 213 /* PropertyAccessExpression */: + case 214 /* ElementAccessExpression */: const expr = node; if (currentFlow && isNarrowableReference(expr)) { expr.flowNode = currentFlow; @@ -31492,7 +31645,7 @@ function createBinder() { ); } break; - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: const specialKind = getAssignmentDeclarationKind(node); switch (specialKind) { case 1 /* ExportsProperty */: @@ -31527,79 +31680,80 @@ function createBinder() { Debug.fail("Unknown binary expression special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return checkStrictModeCatchClause(node); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); case 8 /* NumericLiteral */: return checkStrictModeNumericLiteral(node); - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return checkStrictModeWithStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return checkStrictModeLabeledStatement(node); - case 197 /* ThisType */: + case 199 /* ThisType */: seenThisKeyword = true; return; - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return bindTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return bindParameter(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return bindVariableDeclarationOrBindingElement(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: node.flowNode = currentFlow; return bindVariableDeclarationOrBindingElement(node); - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* OverloadPropertyDeclaration */: return bindPropertyWorker(node); - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 308 /* EnumMember */: + case 311 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: + case 181 /* CallSignature */: + case 182 /* ConstructSignature */: + case 183 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 176 /* MethodDeclaration */: + case 175 /* MethodSignature */: return bindPropertyOrMethodOrAccessor( node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ ); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, 0 /* None */); - case 177 /* GetAccessor */: + case 179 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */); - case 178 /* SetAccessor */: + case 180 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */); - case 184 /* FunctionType */: - case 326 /* JSDocFunctionType */: - case 332 /* JSDocSignature */: - case 185 /* ConstructorType */: + case 186 /* FunctionType */: + case 329 /* JSDocFunctionType */: + case 335 /* JSDocSignature */: + case 187 /* ConstructorType */: return bindFunctionOrConstructorType(node); - case 187 /* TypeLiteral */: - case 331 /* JSDocTypeLiteral */: - case 200 /* MappedType */: + case 189 /* TypeLiteral */: + case 334 /* JSDocTypeLiteral */: + case 202 /* MappedType */: return bindAnonymousTypeWorker(node); - case 341 /* JSDocClassTag */: + case 344 /* JSDocClassTag */: return bindJSDocClassTag(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 220 /* FunctionExpression */: + case 221 /* ArrowFunction */: return bindFunctionExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: const assignmentKind = getAssignmentDeclarationKind(node); switch (assignmentKind) { case 7 /* ObjectDefinePropertyValue */: @@ -31617,61 +31771,63 @@ function createBinder() { bindCallExpression(node); } break; - case 232 /* ClassExpression */: - case 264 /* ClassDeclaration */: - case 265 /* StructDeclaration */: + case 234 /* ClassExpression */: + case 266 /* ClassDeclaration */: + case 267 /* StructDeclaration */: inStrictMode = true; return bindClassLikeDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return bindAnnotationDeclaration(node); - case 267 /* InterfaceDeclaration */: + case 269 /* OverloadDeclaration */: + return bindOverloadDeclaration(node); + case 270 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return bindModuleDeclaration(node); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return bindJsxAttributes(node); - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 274 /* ImportEqualsDeclaration */: - case 277 /* NamespaceImport */: - case 279 /* ImportSpecifier */: - case 284 /* ExportSpecifier */: + case 277 /* ImportEqualsDeclaration */: + case 280 /* NamespaceImport */: + case 282 /* ImportSpecifier */: + case 287 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return bindNamespaceExportDeclaration(node); - case 276 /* ImportClause */: + case 279 /* ImportClause */: return bindImportClause(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return bindExportDeclaration(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return bindExportAssignment(node); - case 314 /* SourceFile */: + case 317 /* SourceFile */: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 242 /* Block */: + case 244 /* Block */: if (!isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) { return; } - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 349 /* JSDocParameterTag */: - if (node.parent.kind === 332 /* JSDocSignature */) { + case 352 /* JSDocParameterTag */: + if (node.parent.kind === 335 /* JSDocSignature */) { return bindParameter(node); } - if (node.parent.kind !== 331 /* JSDocTypeLiteral */) { + if (node.parent.kind !== 334 /* JSDocTypeLiteral */) { break; } - case 356 /* JSDocPropertyTag */: + case 359 /* JSDocPropertyTag */: const propTag = node; - const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 325 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; + const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 328 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 354 /* JSDocTypedefTag */: - case 347 /* JSDocCallbackTag */: - case 348 /* JSDocEnumTag */: + case 357 /* JSDocTypedefTag */: + case 350 /* JSDocCallbackTag */: + case 351 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); } } @@ -31809,8 +31965,8 @@ function createBinder() { } const thisContainer = getThisContainer(node, false); switch (thisContainer.kind) { - case 263 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 265 /* FunctionDeclaration */: + case 220 /* FunctionExpression */: let constructorSymbol = thisContainer.symbol; if (isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 63 /* EqualsToken */) { const l = thisContainer.parent.left; @@ -31828,13 +31984,14 @@ function createBinder() { addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32 /* Class */); } break; - case 176 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: + case 178 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 174 /* OverloadPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: + case 177 /* ClassStaticBlockDeclaration */: const containingClass = thisContainer.parent; const symbolTable = isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members; if (hasDynamicName(node)) { @@ -31843,7 +32000,7 @@ function createBinder() { declareSymbol(symbolTable, containingClass.symbol, node, 4 /* Property */ | 67108864 /* Assignment */, 0 /* None */, true); } break; - case 314 /* SourceFile */: + case 317 /* SourceFile */: if (hasDynamicName(node)) { break; } else if (thisContainer.commonJsModuleIndicator) { @@ -31868,7 +32025,7 @@ function createBinder() { function bindSpecialPropertyDeclaration(node) { if (node.expression.kind === 109 /* ThisKeyword */) { bindThisPropertyAssignment(node); - } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 314 /* SourceFile */) { + } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 317 /* SourceFile */) { if (isPrototypeAccess(node.expression)) { bindPrototypePropertyAssignment(node, node.parent); } else { @@ -31898,7 +32055,7 @@ function createBinder() { } function bindObjectDefinePropertyAssignment(node) { let namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]); - const isToplevel = node.parent.parent.kind === 314 /* SourceFile */; + const isToplevel = node.parent.parent.kind === 317 /* SourceFile */; namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, node.arguments[0], isToplevel, false, false); bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, false); } @@ -31984,7 +32141,7 @@ function createBinder() { declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */); } function isTopLevelNamespaceAssignment(propertyAccess) { - return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 314 /* SourceFile */ : propertyAccess.parent.parent.kind === 314 /* SourceFile */; + return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 317 /* SourceFile */ : propertyAccess.parent.parent.kind === 317 /* SourceFile */; } function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) { let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer); @@ -32042,7 +32199,7 @@ function createBinder() { } } function bindClassLikeDeclaration(node) { - if (node.kind === 264 /* ClassDeclaration */ || node.kind === 265 /* StructDeclaration */) { + if (node.kind === 266 /* ClassDeclaration */ || node.kind === 267 /* StructDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); } else { const bindingName = node.name ? node.name.escapedText : "__class" /* Class */; @@ -32064,7 +32221,7 @@ function createBinder() { prototypeSymbol.parent = symbol; } function bindAnnotationDeclaration(node) { - Debug.assert(node.kind === 266 /* AnnotationDeclaration */); + Debug.assert(node.kind === 268 /* AnnotationDeclaration */); bindBlockScopedDeclaration(node, 32 /* Class */ | 268435456 /* Annotation */, 899503 /* ClassExcludes */); const { symbol } = node; const prototypeSymbol = createSymbol(4 /* Property */ | 4194304 /* Prototype */, "prototype"); @@ -32078,6 +32235,21 @@ function createBinder() { symbol.exports.set(prototypeSymbol.escapedName, prototypeSymbol); prototypeSymbol.parent = symbol; } + function bindOverloadDeclaration(node) { + Debug.assert(node.kind === 269 /* OverloadDeclaration */); + bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); + const { symbol } = node; + const prototypeSymbol = createSymbol(4 /* Property */ | 4194304 /* Prototype */, "prototype"); + const symbolExport = symbol.exports.get(prototypeSymbol.escapedName); + if (symbolExport) { + if (node.name) { + setParent(node.name, node); + } + file.bindDiagnostics.push(createDiagnosticForNode2(symbolExport.declarations[0], Diagnostics.Duplicate_identifier_0, symbolName(prototypeSymbol))); + } + symbol.exports.set(prototypeSymbol.escapedName, prototypeSymbol); + prototypeSymbol.parent = symbol; + } function bindEnumDeclaration(node) { return isEnumConst(node) ? bindBlockScopedDeclaration(node, 128 /* ConstEnum */, 899967 /* ConstEnumExcludes */) : bindBlockScopedDeclaration(node, 256 /* RegularEnum */, 899327 /* RegularEnumExcludes */); } @@ -32086,7 +32258,7 @@ function createBinder() { checkStrictModeEvalOrArguments(node, node.name); } if (!isBindingPattern(node.name)) { - const possibleVariableDecl = node.kind === 261 /* VariableDeclaration */ ? node : node.parent.parent; + const possibleVariableDecl = node.kind === 263 /* VariableDeclaration */ ? node : node.parent.parent; if (isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { @@ -32099,7 +32271,7 @@ function createBinder() { } } function bindParameter(node) { - if (node.kind === 349 /* JSDocParameterTag */ && container.kind !== 332 /* JSDocSignature */) { + if (node.kind === 352 /* JSDocParameterTag */ && container.kind !== 335 /* JSDocSignature */) { return; } if (inStrictMode && !(node.flags & 16777216 /* Ambient */)) { @@ -32166,7 +32338,7 @@ function createBinder() { } else { declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } - } else if (node.parent.kind === 195 /* InferType */) { + } else if (node.parent.kind === 197 /* InferType */) { const container2 = getInferTypeContainer(node.parent); if (container2) { if (!container2.locals) { @@ -32189,7 +32361,7 @@ function createBinder() { return false; } if (currentFlow === unreachableFlow) { - const reportError = isStatementButNotDeclaration(node) && node.kind !== 243 /* EmptyStatement */ || node.kind === 264 /* ClassDeclaration */ || node.kind === 270 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node); + const reportError = isStatementButNotDeclaration(node) && node.kind !== 245 /* EmptyStatement */ || node.kind === 266 /* ClassDeclaration */ || node.kind === 273 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node); if (reportError) { currentFlow = reportedUnreachableFlow; if (!options.allowUnreachableCode) { @@ -32215,12 +32387,12 @@ function isExecutableStatement(s) { } function isPurelyTypeDeclaration(s) { switch (s.kind) { - case 267 /* InterfaceDeclaration */: - case 268 /* TypeAliasDeclaration */: + case 270 /* InterfaceDeclaration */: + case 271 /* TypeAliasDeclaration */: return true; - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return getModuleInstanceState(s) !== 1 /* Instantiated */; - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return hasSyntacticModifier(s, 2048 /* Const */); default: return false; @@ -32397,7 +32569,7 @@ function isNotAccessor(declaration) { return !isAccessor(declaration); } function isNotOverload(declaration) { - return declaration.kind !== 263 /* FunctionDeclaration */ && declaration.kind !== 174 /* MethodDeclaration */ || !!declaration.body; + return declaration.kind !== 265 /* FunctionDeclaration */ && declaration.kind !== 176 /* MethodDeclaration */ || !!declaration.body; } var JsxNames; ((JsxNames2) => { @@ -32635,20 +32807,20 @@ var visitEachChildTable = { nodesVisitor(node.typeArguments, visitor, isTypeNodeOrTypeParameterDeclaration) ); }, - [165 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [166 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateQualifiedName( node, nodeVisitor(node.left, visitor, isEntityName), nodeVisitor(node.right, visitor, isIdentifier) ); }, - [166 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [167 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateComputedPropertyName( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [167 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [168 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -32657,7 +32829,7 @@ var visitEachChildTable = { nodeVisitor(node.default, visitor, isTypeNode) ); }, - [168 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [169 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -32668,14 +32840,14 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [169 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [170 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDecorator( node, nodeVisitor(node.expression, visitor, isExpression), node.annotationDeclaration ); }, - [170 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [171 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertySignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -32684,7 +32856,16 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [171 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [174 /* OverloadPropertyDeclaration */]: function visitEachChildOfOverloadPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + return context.factory.updateOverloadPropertyDeclaration( + node, + nodesVisitor(node.modifiers, visitor, isModifier), + nodeVisitor(node.name, visitor, isPropertyName), + nodeVisitor(node.questionToken, tokenVisitor, isToken), + nodeVisitor(node.type, visitor, isTypeNode) + ); + }, + [172 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { var _a2; return context.factory.updatePropertyDeclaration( node, @@ -32695,7 +32876,7 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [172 /* AnnotationPropertyDeclaration */]: function visitEachChildOfAnnotationPropertyDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [173 /* AnnotationPropertyDeclaration */]: function visitEachChildOfAnnotationPropertyDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAnnotationPropertyDeclaration( node, nodeVisitor(node.name, visitor, isPropertyName), @@ -32703,7 +32884,7 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [173 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [175 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -32714,7 +32895,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [174 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [176 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -32727,7 +32908,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [176 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [178 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -32735,7 +32916,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [177 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [179 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { if (context.isLexicalEnvironmentSuspended && context.isLexicalEnvironmentSuspended()) { return context.factory.updateGetAccessorDeclaration( node, @@ -32756,7 +32937,7 @@ var visitEachChildTable = { ); } }, - [178 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [180 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { if (context.isLexicalEnvironmentSuspended && context.isLexicalEnvironmentSuspended()) { return context.factory.updateSetAccessorDeclaration( node, @@ -32775,7 +32956,7 @@ var visitEachChildTable = { ); } }, - [175 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [177 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { context.startLexicalEnvironment(); context.suspendLexicalEnvironment(); return context.factory.updateClassStaticBlockDeclaration( @@ -32783,7 +32964,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [179 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [181 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCallSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -32791,7 +32972,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [180 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [182 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -32799,7 +32980,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [181 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [183 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -32807,7 +32988,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [182 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [184 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypePredicateNode( node, nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), @@ -32815,14 +32996,14 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [183 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [185 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeReferenceNode( node, nodeVisitor(node.typeName, visitor, isEntityName), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [184 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [186 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateFunctionTypeNode( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -32830,7 +33011,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [185 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [187 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorTypeNode( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -32839,56 +33020,56 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [186 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [188 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeQueryNode( node, nodeVisitor(node.exprName, visitor, isEntityName), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [187 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [189 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTypeLiteralNode( node, nodesVisitor(node.members, visitor, isTypeElement) ); }, - [188 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [190 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateArrayTypeNode( node, nodeVisitor(node.elementType, visitor, isTypeNode) ); }, - [189 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [191 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTupleTypeNode( node, nodesVisitor(node.elements, visitor, isTypeNode) ); }, - [190 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [192 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateOptionalTypeNode( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [191 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [193 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateRestTypeNode( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [192 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [194 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateUnionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [193 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [195 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateIntersectionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [194 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [196 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConditionalTypeNode( node, nodeVisitor(node.checkType, visitor, isTypeNode), @@ -32897,13 +33078,13 @@ var visitEachChildTable = { nodeVisitor(node.falseType, visitor, isTypeNode) ); }, - [195 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [197 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInferTypeNode( node, nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration) ); }, - [205 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [207 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeNode( node, nodeVisitor(node.argument, visitor, isTypeNode), @@ -32913,14 +33094,14 @@ var visitEachChildTable = { node.isTypeOf ); }, - [304 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [307 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeAssertionContainer( node, nodeVisitor(node.assertClause, visitor, isAssertClause), node.multiLine ); }, - [202 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [204 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateNamedTupleMember( node, nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken), @@ -32929,26 +33110,26 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [196 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [198 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedType( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [198 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [200 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOperatorNode( node, nodeVisitor(node.type, visitor, isTypeNode) ); }, - [199 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [201 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexedAccessTypeNode( node, nodeVisitor(node.objectType, visitor, isTypeNode), nodeVisitor(node.indexType, visitor, isTypeNode) ); }, - [200 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [202 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMappedTypeNode( node, nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken), @@ -32959,39 +33140,39 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [201 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [203 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLiteralTypeNode( node, nodeVisitor(node.literal, visitor, isExpression) ); }, - [203 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [205 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralType( node, nodeVisitor(node.head, visitor, isTemplateHead), nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) ); }, - [204 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [206 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralTypeSpan( node, nodeVisitor(node.type, visitor, isTypeNode), nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail) ); }, - [206 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [208 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectBindingPattern( node, nodesVisitor(node.elements, visitor, isBindingElement) ); }, - [207 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [209 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayBindingPattern( node, nodesVisitor(node.elements, visitor, isArrayBindingElement) ); }, - [208 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [210 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBindingElement( node, nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken), @@ -33000,19 +33181,19 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [209 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [211 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayLiteralExpression( node, nodesVisitor(node.elements, visitor, isExpression) ); }, - [210 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [212 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectLiteralExpression( node, nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) ); }, - [211 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [213 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( node, nodeVisitor(node.expression, visitor, isExpression), @@ -33024,7 +33205,7 @@ var visitEachChildTable = { nodeVisitor(node.name, visitor, isMemberName) ); }, - [212 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [214 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isElementAccessChain(node) ? context.factory.updateElementAccessChain( node, nodeVisitor(node.expression, visitor, isExpression), @@ -33036,7 +33217,7 @@ var visitEachChildTable = { nodeVisitor(node.argumentExpression, visitor, isExpression) ); }, - [213 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [215 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return isCallChain(node) ? context.factory.updateCallChain( node, nodeVisitor(node.expression, visitor, isExpression), @@ -33050,7 +33231,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [220 /* EtsComponentExpression */]: function visitEachChildOfEtsComponentExpression(node, visitor, context, nodesVisitor, nodeVisitor) { + [222 /* EtsComponentExpression */]: function visitEachChildOfEtsComponentExpression(node, visitor, context, nodesVisitor, nodeVisitor) { return context.factory.updateEtsComponentExpression( node, nodeVisitor(node.expression, visitor, isExpression), @@ -33058,7 +33239,7 @@ var visitEachChildTable = { nodeVisitor(node.body, visitor, isBlock) ); }, - [214 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [216 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNewExpression( node, nodeVisitor(node.expression, visitor, isExpression), @@ -33066,7 +33247,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [215 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [217 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTaggedTemplateExpression( node, nodeVisitor(node.tag, visitor, isExpression), @@ -33074,20 +33255,20 @@ var visitEachChildTable = { nodeVisitor(node.template, visitor, isTemplateLiteral) ); }, - [216 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [218 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAssertion( node, nodeVisitor(node.type, visitor, isTypeNode), nodeVisitor(node.expression, visitor, isExpression) ); }, - [217 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [219 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [218 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [220 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionExpression( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -33099,7 +33280,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [219 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [221 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateArrowFunction( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -33110,43 +33291,43 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [221 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [223 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDeleteExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [222 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [224 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOfExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [223 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [225 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVoidExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [224 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [226 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAwaitExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [225 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [227 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePrefixUnaryExpression( node, nodeVisitor(node.operand, visitor, isExpression) ); }, - [226 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [228 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePostfixUnaryExpression( node, nodeVisitor(node.operand, visitor, isExpression) ); }, - [227 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [229 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBinaryExpression( node, nodeVisitor(node.left, visitor, isExpression), @@ -33154,7 +33335,7 @@ var visitEachChildTable = { nodeVisitor(node.right, visitor, isExpression) ); }, - [228 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [230 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateConditionalExpression( node, nodeVisitor(node.condition, visitor, isExpression), @@ -33164,27 +33345,27 @@ var visitEachChildTable = { nodeVisitor(node.whenFalse, visitor, isExpression) ); }, - [229 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [231 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateExpression( node, nodeVisitor(node.head, visitor, isTemplateHead), nodesVisitor(node.templateSpans, visitor, isTemplateSpan) ); }, - [230 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [232 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateYieldExpression( node, nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken), nodeVisitor(node.expression, visitor, isExpression) ); }, - [231 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [233 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadElement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [232 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [234 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -33194,28 +33375,28 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [234 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [236 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionWithTypeArguments( node, nodeVisitor(node.expression, visitor, isExpression), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [235 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [237 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAsExpression( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.type, visitor, isTypeNode) ); }, - [239 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [241 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSatisfiesExpression( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.type, visitor, isTypeNode) ); }, - [236 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [238 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return isOptionalChain(node) ? context.factory.updateNonNullChain( node, nodeVisitor(node.expression, visitor, isExpression) @@ -33224,39 +33405,39 @@ var visitEachChildTable = { nodeVisitor(node.expression, visitor, isExpression) ); }, - [237 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [239 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [240 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [242 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateSpan( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail) ); }, - [242 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [244 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [244 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [246 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVariableStatement( node, nodesVisitor(node.modifiers, visitor, isModifier), nodeVisitor(node.declarationList, visitor, isVariableDeclarationList) ); }, - [245 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [247 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [246 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [248 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIfStatement( node, nodeVisitor(node.expression, visitor, isExpression), @@ -33264,21 +33445,21 @@ var visitEachChildTable = { nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) ); }, - [247 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [249 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDoStatement( node, visitIterationBody(node.statement, visitor, context, nodeVisitor), nodeVisitor(node.expression, visitor, isExpression) ); }, - [248 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [250 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWhileStatement( node, nodeVisitor(node.expression, visitor, isExpression), visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [249 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [251 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -33287,7 +33468,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [250 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [252 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForInStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -33295,7 +33476,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [251 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [253 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateForOfStatement( node, nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword), @@ -33304,52 +33485,52 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [252 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [254 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [253 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [255 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [254 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [256 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateReturnStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [255 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [257 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWithStatement( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock) ); }, - [256 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [258 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSwitchStatement( node, nodeVisitor(node.expression, visitor, isExpression), nodeVisitor(node.caseBlock, visitor, isCaseBlock) ); }, - [257 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [259 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, nodeVisitor(node.label, visitor, isIdentifier), nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock) ); }, - [258 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [260 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateThrowStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [259 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [261 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, nodeVisitor(node.tryBlock, visitor, isBlock), @@ -33357,7 +33538,7 @@ var visitEachChildTable = { nodeVisitor(node.finallyBlock, visitor, isBlock) ); }, - [261 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [263 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateVariableDeclaration( node, nodeVisitor(node.name, visitor, isBindingName), @@ -33366,13 +33547,13 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [262 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [264 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateVariableDeclarationList( node, nodesVisitor(node.declarations, visitor, isVariableDeclaration) ); }, - [263 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [265 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -33384,7 +33565,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [264 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [266 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -33394,7 +33575,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [265 /* StructDeclaration */]: function visitEachChildOfStructDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [267 /* StructDeclaration */]: function visitEachChildOfStructDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateStructDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -33404,7 +33585,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [266 /* AnnotationDeclaration */]: function visitEachChildOfAnnotationDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [268 /* AnnotationDeclaration */]: function visitEachChildOfAnnotationDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAnnotationDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -33412,7 +33593,15 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isAnnotationElement) ); }, - [267 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [269 /* OverloadDeclaration */]: function visitEachChildOfOverloadDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + return context.factory.updateOverloadDeclaration( + node, + nodesVisitor(node.modifiers, visitor, isModifier), + nodeVisitor(node.name, visitor, isIdentifier), + nodesVisitor(node.members, visitor, isOverloadElement) + ); + }, + [270 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -33422,7 +33611,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [268 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [271 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -33431,7 +33620,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [269 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [272 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -33439,7 +33628,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isEnumMember) ); }, - [270 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [273 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateModuleDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -33447,25 +33636,25 @@ var visitEachChildTable = { nodeVisitor(node.body, visitor, isModuleBody) ); }, - [271 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [274 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateModuleBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [272 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [275 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCaseBlock( node, nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) ); }, - [273 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [276 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [274 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [277 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportEqualsDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -33474,7 +33663,7 @@ var visitEachChildTable = { nodeVisitor(node.moduleReference, visitor, isModuleReference) ); }, - [275 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [278 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -33483,21 +33672,21 @@ var visitEachChildTable = { nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [302 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [305 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateAssertClause( node, nodesVisitor(node.elements, visitor, isAssertEntry), node.multiLine ); }, - [303 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [306 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAssertEntry( node, nodeVisitor(node.name, visitor, isAssertionKey), nodeVisitor(node.value, visitor, isExpression) ); }, - [276 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [279 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, node.isTypeOnly, @@ -33505,25 +33694,25 @@ var visitEachChildTable = { nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, - [277 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [280 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [283 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [286 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, nodeVisitor(node.name, visitor, isIdentifier) ); }, - [278 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [281 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedImports( node, nodesVisitor(node.elements, visitor, isImportSpecifier) ); }, - [279 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [282 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportSpecifier( node, node.isTypeOnly, @@ -33531,14 +33720,14 @@ var visitEachChildTable = { nodeVisitor(node.name, visitor, isIdentifier) ); }, - [280 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [283 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportAssignment( node, nodesVisitor(node.modifiers, visitor, isModifier), nodeVisitor(node.expression, visitor, isExpression) ); }, - [281 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [284 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -33548,13 +33737,13 @@ var visitEachChildTable = { nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [282 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [285 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedExports( node, nodesVisitor(node.elements, visitor, isExportSpecifier) ); }, - [284 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [287 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportSpecifier( node, node.isTypeOnly, @@ -33562,13 +33751,13 @@ var visitEachChildTable = { nodeVisitor(node.name, visitor, isIdentifier) ); }, - [286 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [289 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExternalModuleReference( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [287 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [290 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxElement( node, nodeVisitor(node.openingElement, visitor, isJsxOpeningElement), @@ -33576,7 +33765,7 @@ var visitEachChildTable = { nodeVisitor(node.closingElement, visitor, isJsxClosingElement) ); }, - [288 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [291 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSelfClosingElement( node, nodeVisitor(node.tagName, visitor, isJsxTagNameExpression), @@ -33584,7 +33773,7 @@ var visitEachChildTable = { nodeVisitor(node.attributes, visitor, isJsxAttributes) ); }, - [289 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [292 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxOpeningElement( node, nodeVisitor(node.tagName, visitor, isJsxTagNameExpression), @@ -33592,13 +33781,13 @@ var visitEachChildTable = { nodeVisitor(node.attributes, visitor, isJsxAttributes) ); }, - [290 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [293 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxClosingElement( node, nodeVisitor(node.tagName, visitor, isJsxTagNameExpression) ); }, - [291 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [294 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxFragment( node, nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment), @@ -33606,97 +33795,97 @@ var visitEachChildTable = { nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment) ); }, - [294 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [297 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttribute( node, nodeVisitor(node.name, visitor, isIdentifier), nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) ); }, - [295 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [298 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttributes( node, nodesVisitor(node.properties, visitor, isJsxAttributeLike) ); }, - [296 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [299 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSpreadAttribute( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [297 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [300 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [298 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [301 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCaseClause( node, nodeVisitor(node.expression, visitor, isExpression), nodesVisitor(node.statements, visitor, isStatement) ); }, - [299 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [302 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateDefaultClause( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [300 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [303 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateHeritageClause( node, nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) ); }, - [301 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [304 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), nodeVisitor(node.block, visitor, isBlock) ); }, - [305 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [308 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePropertyAssignment( node, nodeVisitor(node.name, visitor, isPropertyName), nodeVisitor(node.initializer, visitor, isExpression) ); }, - [306 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [309 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, nodeVisitor(node.name, visitor, isIdentifier), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, - [307 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [310 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadAssignment( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [308 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [311 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumMember( node, nodeVisitor(node.name, visitor, isPropertyName), nodeVisitor(node.initializer, visitor, isExpression) ); }, - [314 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { + [317 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile( node, visitLexicalEnvironment(node.statements, visitor, context) ); }, - [359 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [362 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePartiallyEmittedExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [360 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [363 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCommaListExpression( node, nodesVisitor(node.elements, visitor, isExpression) @@ -33990,7 +34179,7 @@ function hasInternalAnnotation(range, currentSourceFile) { } function isInternalDeclaration(node, currentSourceFile) { const parseTreeNode = getParseTreeNode(node); - if (parseTreeNode && parseTreeNode.kind === 168 /* Parameter */) { + if (parseTreeNode && parseTreeNode.kind === 169 /* Parameter */) { const paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode); const previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : void 0; const text = currentSourceFile.text; @@ -34125,11 +34314,11 @@ function createPrinter(printerOptions = {}, handlers = {}) { break; } switch (node.kind) { - case 314 /* SourceFile */: + case 317 /* SourceFile */: return printFile(node); - case 315 /* Bundle */: + case 318 /* Bundle */: return printBundle(node); - case 316 /* UnparsedSource */: + case 319 /* UnparsedSource */: return printUnparsedSource(node); } writeNode(hint, node, sourceFile, beginPrint()); @@ -34443,300 +34632,304 @@ function createPrinter(printerOptions = {}, handlers = {}) { return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return emitQualifiedName(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return emitTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return emitParameter(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return emitDecorator(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return emitPropertySignature(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return emitPropertyDeclaration(node); - case 172 /* AnnotationPropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: return emitAnnotationPropertyDeclaration(node); - case 173 /* MethodSignature */: + case 174 /* OverloadPropertyDeclaration */: + return emitOverloadPropertyDeclaration(node); + case 175 /* MethodSignature */: return emitMethodSignature(node); - case 174 /* MethodDeclaration */: + case 176 /* MethodDeclaration */: return emitMethodDeclaration(node); - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* ClassStaticBlockDeclaration */: return emitClassStaticBlockDeclaration(node); - case 176 /* Constructor */: + case 178 /* Constructor */: return emitConstructor(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return emitAccessorDeclaration(node); - case 179 /* CallSignature */: + case 181 /* CallSignature */: return emitCallSignature(node); - case 180 /* ConstructSignature */: + case 182 /* ConstructSignature */: return emitConstructSignature(node); - case 181 /* IndexSignature */: + case 183 /* IndexSignature */: return emitIndexSignature(node); - case 182 /* TypePredicate */: + case 184 /* TypePredicate */: return emitTypePredicate(node); - case 183 /* TypeReference */: + case 185 /* TypeReference */: return emitTypeReference(node); - case 184 /* FunctionType */: + case 186 /* FunctionType */: return emitFunctionType(node); - case 185 /* ConstructorType */: + case 187 /* ConstructorType */: return emitConstructorType(node); - case 186 /* TypeQuery */: + case 188 /* TypeQuery */: return emitTypeQuery(node); - case 187 /* TypeLiteral */: + case 189 /* TypeLiteral */: return emitTypeLiteral(node); - case 188 /* ArrayType */: + case 190 /* ArrayType */: return emitArrayType(node); - case 189 /* TupleType */: + case 191 /* TupleType */: return emitTupleType(node); - case 190 /* OptionalType */: + case 192 /* OptionalType */: return emitOptionalType(node); - case 192 /* UnionType */: + case 194 /* UnionType */: return emitUnionType(node); - case 193 /* IntersectionType */: + case 195 /* IntersectionType */: return emitIntersectionType(node); - case 194 /* ConditionalType */: + case 196 /* ConditionalType */: return emitConditionalType(node); - case 195 /* InferType */: + case 197 /* InferType */: return emitInferType(node); - case 196 /* ParenthesizedType */: + case 198 /* ParenthesizedType */: return emitParenthesizedType(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 197 /* ThisType */: + case 199 /* ThisType */: return emitThisType(); - case 198 /* TypeOperator */: + case 200 /* TypeOperator */: return emitTypeOperator(node); - case 199 /* IndexedAccessType */: + case 201 /* IndexedAccessType */: return emitIndexedAccessType(node); - case 200 /* MappedType */: + case 202 /* MappedType */: return emitMappedType(node); - case 201 /* LiteralType */: + case 203 /* LiteralType */: return emitLiteralType(node); - case 202 /* NamedTupleMember */: + case 204 /* NamedTupleMember */: return emitNamedTupleMember(node); - case 203 /* TemplateLiteralType */: + case 205 /* TemplateLiteralType */: return emitTemplateType(node); - case 204 /* TemplateLiteralTypeSpan */: + case 206 /* TemplateLiteralTypeSpan */: return emitTemplateTypeSpan(node); - case 205 /* ImportType */: + case 207 /* ImportType */: return emitImportTypeNode(node); - case 206 /* ObjectBindingPattern */: + case 208 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 207 /* ArrayBindingPattern */: + case 209 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 208 /* BindingElement */: + case 210 /* BindingElement */: return emitBindingElement(node); - case 240 /* TemplateSpan */: + case 242 /* TemplateSpan */: return emitTemplateSpan(node); - case 241 /* SemicolonClassElement */: + case 243 /* SemicolonClassElement */: return emitSemicolonClassElement(); - case 242 /* Block */: + case 244 /* Block */: return emitBlock(node); - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: return emitVariableStatement(node); - case 243 /* EmptyStatement */: + case 245 /* EmptyStatement */: return emitEmptyStatement(false); - case 245 /* ExpressionStatement */: + case 247 /* ExpressionStatement */: return emitExpressionStatement(node); - case 246 /* IfStatement */: + case 248 /* IfStatement */: return emitIfStatement(node); - case 247 /* DoStatement */: + case 249 /* DoStatement */: return emitDoStatement(node); - case 248 /* WhileStatement */: + case 250 /* WhileStatement */: return emitWhileStatement(node); - case 249 /* ForStatement */: + case 251 /* ForStatement */: return emitForStatement(node); - case 250 /* ForInStatement */: + case 252 /* ForInStatement */: return emitForInStatement(node); - case 251 /* ForOfStatement */: + case 253 /* ForOfStatement */: return emitForOfStatement(node); - case 252 /* ContinueStatement */: + case 254 /* ContinueStatement */: return emitContinueStatement(node); - case 253 /* BreakStatement */: + case 255 /* BreakStatement */: return emitBreakStatement(node); - case 254 /* ReturnStatement */: + case 256 /* ReturnStatement */: return emitReturnStatement(node); - case 255 /* WithStatement */: + case 257 /* WithStatement */: return emitWithStatement(node); - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: return emitSwitchStatement(node); - case 257 /* LabeledStatement */: + case 259 /* LabeledStatement */: return emitLabeledStatement(node); - case 258 /* ThrowStatement */: + case 260 /* ThrowStatement */: return emitThrowStatement(node); - case 259 /* TryStatement */: + case 261 /* TryStatement */: return emitTryStatement(node); - case 260 /* DebuggerStatement */: + case 262 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 261 /* VariableDeclaration */: + case 263 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: return emitVariableDeclarationList(node); - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: return emitFunctionDeclaration(node); - case 264 /* ClassDeclaration */: + case 266 /* ClassDeclaration */: return emitClassOrStructDeclaration(node); - case 265 /* StructDeclaration */: + case 267 /* StructDeclaration */: return emitClassOrStructDeclaration(node); - case 266 /* AnnotationDeclaration */: + case 268 /* AnnotationDeclaration */: return emitAnnotationDeclaration(node); - case 267 /* InterfaceDeclaration */: + case 269 /* OverloadDeclaration */: + return emitOverloadDeclaration(node); + case 270 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 268 /* TypeAliasDeclaration */: + case 271 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 269 /* EnumDeclaration */: + case 272 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 270 /* ModuleDeclaration */: + case 273 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 271 /* ModuleBlock */: + case 274 /* ModuleBlock */: return emitModuleBlock(node); - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: return emitCaseBlock(node); - case 273 /* NamespaceExportDeclaration */: + case 276 /* NamespaceExportDeclaration */: return emitNamespaceExportDeclaration(node); - case 274 /* ImportEqualsDeclaration */: + case 277 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: return emitImportDeclaration(node); - case 276 /* ImportClause */: + case 279 /* ImportClause */: return emitImportClause(node); - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: return emitNamespaceImport(node); - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: return emitNamespaceExport(node); - case 278 /* NamedImports */: + case 281 /* NamedImports */: return emitNamedImports(node); - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: return emitImportSpecifier(node); - case 280 /* ExportAssignment */: + case 283 /* ExportAssignment */: return emitExportAssignment(node); - case 281 /* ExportDeclaration */: + case 284 /* ExportDeclaration */: return emitExportDeclaration(node); - case 282 /* NamedExports */: + case 285 /* NamedExports */: return emitNamedExports(node); - case 284 /* ExportSpecifier */: + case 287 /* ExportSpecifier */: return emitExportSpecifier(node); - case 302 /* AssertClause */: + case 305 /* AssertClause */: return emitAssertClause(node); - case 303 /* AssertEntry */: + case 306 /* AssertEntry */: return emitAssertEntry(node); - case 285 /* MissingDeclaration */: + case 288 /* MissingDeclaration */: return; - case 286 /* ExternalModuleReference */: + case 289 /* ExternalModuleReference */: return emitExternalModuleReference(node); case 11 /* JsxText */: return emitJsxText(node); - case 289 /* JsxOpeningElement */: - case 292 /* JsxOpeningFragment */: + case 292 /* JsxOpeningElement */: + case 295 /* JsxOpeningFragment */: return emitJsxOpeningElementOrFragment(node); - case 290 /* JsxClosingElement */: - case 293 /* JsxClosingFragment */: + case 293 /* JsxClosingElement */: + case 296 /* JsxClosingFragment */: return emitJsxClosingElementOrFragment(node); - case 294 /* JsxAttribute */: + case 297 /* JsxAttribute */: return emitJsxAttribute(node); - case 295 /* JsxAttributes */: + case 298 /* JsxAttributes */: return emitJsxAttributes(node); - case 296 /* JsxSpreadAttribute */: + case 299 /* JsxSpreadAttribute */: return emitJsxSpreadAttribute(node); - case 297 /* JsxExpression */: + case 300 /* JsxExpression */: return emitJsxExpression(node); - case 298 /* CaseClause */: + case 301 /* CaseClause */: return emitCaseClause(node); - case 299 /* DefaultClause */: + case 302 /* DefaultClause */: return emitDefaultClause(node); - case 300 /* HeritageClause */: + case 303 /* HeritageClause */: return emitHeritageClause(node); - case 301 /* CatchClause */: + case 304 /* CatchClause */: return emitCatchClause(node); - case 305 /* PropertyAssignment */: + case 308 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 306 /* ShorthandPropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 307 /* SpreadAssignment */: + case 310 /* SpreadAssignment */: return emitSpreadAssignment(node); - case 308 /* EnumMember */: + case 311 /* EnumMember */: return emitEnumMember(node); - case 309 /* UnparsedPrologue */: + case 312 /* UnparsedPrologue */: return writeUnparsedNode(node); - case 316 /* UnparsedSource */: - case 310 /* UnparsedPrepend */: + case 319 /* UnparsedSource */: + case 313 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); - case 311 /* UnparsedText */: - case 312 /* UnparsedInternalText */: + case 314 /* UnparsedText */: + case 315 /* UnparsedInternalText */: return emitUnparsedTextLike(node); - case 313 /* UnparsedSyntheticReference */: + case 316 /* UnparsedSyntheticReference */: return emitUnparsedSyntheticReference(node); - case 314 /* SourceFile */: + case 317 /* SourceFile */: return emitSourceFile(node); - case 315 /* Bundle */: + case 318 /* Bundle */: return Debug.fail("Bundles should be printed using printBundle"); - case 317 /* InputFiles */: + case 320 /* InputFiles */: return Debug.fail("InputFiles should not be printed"); - case 318 /* JSDocTypeExpression */: + case 321 /* JSDocTypeExpression */: return emitJSDocTypeExpression(node); - case 319 /* JSDocNameReference */: + case 322 /* JSDocNameReference */: return emitJSDocNameReference(node); - case 321 /* JSDocAllType */: + case 324 /* JSDocAllType */: return writePunctuation("*"); - case 322 /* JSDocUnknownType */: + case 325 /* JSDocUnknownType */: return writePunctuation("?"); - case 323 /* JSDocNullableType */: + case 326 /* JSDocNullableType */: return emitJSDocNullableType(node); - case 324 /* JSDocNonNullableType */: + case 327 /* JSDocNonNullableType */: return emitJSDocNonNullableType(node); - case 325 /* JSDocOptionalType */: + case 328 /* JSDocOptionalType */: return emitJSDocOptionalType(node); - case 326 /* JSDocFunctionType */: + case 329 /* JSDocFunctionType */: return emitJSDocFunctionType(node); - case 191 /* RestType */: - case 327 /* JSDocVariadicType */: + case 193 /* RestType */: + case 330 /* JSDocVariadicType */: return emitRestOrJSDocVariadicType(node); - case 328 /* JSDocNamepathType */: + case 331 /* JSDocNamepathType */: return; - case 329 /* JSDoc */: + case 332 /* JSDoc */: return emitJSDoc(node); - case 331 /* JSDocTypeLiteral */: + case 334 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 332 /* JSDocSignature */: + case 335 /* JSDocSignature */: return emitJSDocSignature(node); - case 336 /* JSDocTag */: - case 341 /* JSDocClassTag */: - case 346 /* JSDocOverrideTag */: + case 339 /* JSDocTag */: + case 344 /* JSDocClassTag */: + case 349 /* JSDocOverrideTag */: return emitJSDocSimpleTag(node); - case 337 /* JSDocAugmentsTag */: - case 338 /* JSDocImplementsTag */: + case 340 /* JSDocAugmentsTag */: + case 341 /* JSDocImplementsTag */: return emitJSDocHeritageTag(node); - case 339 /* JSDocAuthorTag */: - case 340 /* JSDocDeprecatedTag */: + case 342 /* JSDocAuthorTag */: + case 343 /* JSDocDeprecatedTag */: return; - case 342 /* JSDocPublicTag */: - case 343 /* JSDocPrivateTag */: - case 344 /* JSDocProtectedTag */: - case 345 /* JSDocReadonlyTag */: + case 345 /* JSDocPublicTag */: + case 346 /* JSDocPrivateTag */: + case 347 /* JSDocProtectedTag */: + case 348 /* JSDocReadonlyTag */: return; - case 347 /* JSDocCallbackTag */: + case 350 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); - case 349 /* JSDocParameterTag */: - case 356 /* JSDocPropertyTag */: + case 352 /* JSDocParameterTag */: + case 359 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 348 /* JSDocEnumTag */: - case 350 /* JSDocReturnTag */: - case 351 /* JSDocThisTag */: - case 352 /* JSDocTypeTag */: + case 351 /* JSDocEnumTag */: + case 353 /* JSDocReturnTag */: + case 354 /* JSDocThisTag */: + case 355 /* JSDocTypeTag */: return emitJSDocSimpleTypedTag(node); - case 353 /* JSDocTemplateTag */: + case 356 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 354 /* JSDocTypedefTag */: + case 357 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 355 /* JSDocSeeTag */: + case 358 /* JSDocSeeTag */: return emitJSDocSeeTag(node); - case 358 /* NotEmittedStatement */: - case 362 /* EndOfDeclarationMarker */: - case 361 /* MergeDeclarationMarker */: + case 361 /* NotEmittedStatement */: + case 365 /* EndOfDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: return; } if (isExpression(node)) { @@ -34765,84 +34958,84 @@ function createPrinter(printerOptions = {}, handlers = {}) { return emitIdentifier(node); case 80 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 209 /* ArrayLiteralExpression */: + case 211 /* ArrayLiteralExpression */: return emitArrayLiteralExpression(node); - case 210 /* ObjectLiteralExpression */: + case 212 /* ObjectLiteralExpression */: return emitObjectLiteralExpression(node); - case 211 /* PropertyAccessExpression */: + case 213 /* PropertyAccessExpression */: return emitPropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 214 /* ElementAccessExpression */: return emitElementAccessExpression(node); - case 213 /* CallExpression */: + case 215 /* CallExpression */: return emitCallExpression(node); - case 214 /* NewExpression */: + case 216 /* NewExpression */: return emitNewExpression(node); - case 215 /* TaggedTemplateExpression */: + case 217 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 216 /* TypeAssertionExpression */: + case 218 /* TypeAssertionExpression */: return emitTypeAssertionExpression(node); - case 217 /* ParenthesizedExpression */: + case 219 /* ParenthesizedExpression */: return emitParenthesizedExpression(node); - case 218 /* FunctionExpression */: + case 220 /* FunctionExpression */: return emitFunctionExpression(node); - case 219 /* ArrowFunction */: + case 221 /* ArrowFunction */: return emitArrowFunction(node); - case 221 /* DeleteExpression */: + case 223 /* DeleteExpression */: return emitDeleteExpression(node); - case 222 /* TypeOfExpression */: + case 224 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 223 /* VoidExpression */: + case 225 /* VoidExpression */: return emitVoidExpression(node); - case 224 /* AwaitExpression */: + case 226 /* AwaitExpression */: return emitAwaitExpression(node); - case 225 /* PrefixUnaryExpression */: + case 227 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 226 /* PostfixUnaryExpression */: + case 228 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 227 /* BinaryExpression */: + case 229 /* BinaryExpression */: return emitBinaryExpression(node); - case 228 /* ConditionalExpression */: + case 230 /* ConditionalExpression */: return emitConditionalExpression(node); - case 229 /* TemplateExpression */: + case 231 /* TemplateExpression */: return emitTemplateExpression(node); - case 230 /* YieldExpression */: + case 232 /* YieldExpression */: return emitYieldExpression(node); - case 231 /* SpreadElement */: + case 233 /* SpreadElement */: return emitSpreadElement(node); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: return emitClassExpression(node); - case 233 /* OmittedExpression */: + case 235 /* OmittedExpression */: return; - case 235 /* AsExpression */: + case 237 /* AsExpression */: return emitAsExpression(node); - case 236 /* NonNullExpression */: + case 238 /* NonNullExpression */: return emitNonNullExpression(node); - case 234 /* ExpressionWithTypeArguments */: + case 236 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 239 /* SatisfiesExpression */: + case 241 /* SatisfiesExpression */: return emitSatisfiesExpression(node); - case 237 /* MetaProperty */: + case 239 /* MetaProperty */: return emitMetaProperty(node); - case 238 /* SyntheticExpression */: + case 240 /* SyntheticExpression */: return Debug.fail("SyntheticExpression should never be printed."); - case 287 /* JsxElement */: + case 290 /* JsxElement */: return emitJsxElement(node); - case 288 /* JsxSelfClosingElement */: + case 291 /* JsxSelfClosingElement */: return emitJsxSelfClosingElement(node); - case 291 /* JsxFragment */: + case 294 /* JsxFragment */: return emitJsxFragment(node); - case 357 /* SyntaxList */: + case 360 /* SyntaxList */: return Debug.fail("SyntaxList should not be printed"); - case 358 /* NotEmittedStatement */: + case 361 /* NotEmittedStatement */: return; - case 359 /* PartiallyEmittedExpression */: + case 362 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 360 /* CommaListExpression */: + case 363 /* CommaListExpression */: return emitCommaList(node); - case 361 /* MergeDeclarationMarker */: - case 362 /* EndOfDeclarationMarker */: + case 364 /* MergeDeclarationMarker */: + case 365 /* EndOfDeclarationMarker */: return; - case 363 /* SyntheticReferenceExpression */: + case 366 /* SyntheticReferenceExpression */: return Debug.fail("SyntheticReferenceExpression should not be printed"); } } @@ -34893,7 +35086,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitHelpers(node) { let helpersEmitted = false; - const bundle = node.kind === 315 /* Bundle */ ? node : void 0; + const bundle = node.kind === 318 /* Bundle */ ? node : void 0; if (bundle && moduleKind === 0 /* None */) { return; } @@ -34964,7 +35157,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { updateOrPushBundleFileTextLike( pos, writer.getTextPos(), - unparsed.kind === 311 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ + unparsed.kind === 314 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ ); } } @@ -34995,7 +35188,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitTabStop(hint, node, snippet) { Debug.assert( - node.kind === 243 /* EmptyStatement */, + node.kind === 245 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` ); Debug.assert( @@ -35051,7 +35244,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emit(node.dotDotDotToken); emitNodeWithWriter(node.name, writeParameter); emit(node.questionToken); - if (node.parent && node.parent.kind === 326 /* JSDocFunctionType */ && !node.name) { + if (node.parent && node.parent.kind === 329 /* JSDocFunctionType */ && !node.name) { emit(node.type); } else { emitTypeAnnotation(node.type); @@ -35069,6 +35262,11 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitTypeAnnotation(node.type); writeTrailingSemicolon(); } + function emitOverloadPropertyDeclaration(node) { + emitModifiers(node, node.modifiers); + emitNodeWithWriter(node.name, writeProperty); + emit(node.questionToken); + } function emitPropertyDeclaration(node) { emitDecoratorsAndModifiers(node, node.modifiers); emit(node.name); @@ -35113,7 +35311,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitAccessorDeclaration(node) { emitDecoratorsAndModifiers(node, node.modifiers); - writeKeyword(node.kind === 177 /* GetAccessor */ ? "get" : "set"); + writeKeyword(node.kind === 179 /* GetAccessor */ ? "get" : "set"); writeSpace(); emit(node.name); emitSignatureAndBody(node, emitSignatureHead); @@ -35542,7 +35740,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function shouldEmitWhitespaceBeforeOperand(node) { const operand = node.operand; - return operand.kind === 225 /* 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 === 227 /* 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); @@ -35738,7 +35936,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (node.elseStatement) { writeLineOrSpace(node, node.thenStatement, node.elseStatement); emitTokenWithComment(92 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); - if (node.elseStatement.kind === 246 /* IfStatement */) { + if (node.elseStatement.kind === 248 /* IfStatement */) { writeSpace(); emit(node.elseStatement); } else { @@ -35799,7 +35997,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitTokenWithComment(20 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(164 /* OfKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(165 /* OfKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(21 /* CloseParenToken */, node.expression.end, writePunctuation, node); @@ -35807,7 +36005,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitForBinding(node) { if (node !== void 0) { - if (node.kind === 262 /* VariableDeclarationList */) { + if (node.kind === 264 /* VariableDeclarationList */) { emit(node); } else { emitExpression(node); @@ -35843,7 +36041,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } pos = writeTokenText(token, writer2, pos); if (isSimilarNode && contextNode.end !== pos) { - const isJsxExprContext = contextNode.kind === 297 /* JsxExpression */; + const isJsxExprContext = contextNode.kind === 300 /* JsxExpression */; emitTrailingCommentsOfPosition(pos, !isJsxExprContext, isJsxExprContext); } return pos; @@ -36102,6 +36300,25 @@ function createPrinter(printerOptions = {}, handlers = {}) { decreaseIndent(); } } + function emitOverloadDeclaration(node) { + emitDecoratorsAndModifiers(node, node.modifiers); + writeKeyword("overload"); + if (node.name) { + writeSpace(); + emitIdentifierName(node.name); + } + const indentedFlag = getEmitFlags(node) & 65536 /* Indented */; + if (indentedFlag) { + increaseIndent(); + } + writeSpace(); + writePunctuation("{"); + emitList(node, node.members, 145 /* EnumMembers */); + writePunctuation("}"); + if (indentedFlag) { + decreaseIndent(); + } + } function emitTypeAliasDeclaration(node) { if (isSendableFunctionOrType(node, true)) { emitDecorators(node, node.illegalDecorators); @@ -36499,7 +36716,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 352 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 355 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } else { @@ -36543,7 +36760,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { function emitJSDocTypedefTag(tag) { emitJSDocTagName(tag.tagName); if (tag.typeExpression) { - if (tag.typeExpression.kind === 318 /* JSDocTypeExpression */) { + if (tag.typeExpression.kind === 321 /* JSDocTypeExpression */) { emitJSDocTypeExpression(tag.typeExpression); } else { writeSpace(); @@ -36561,7 +36778,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emit(tag.fullName); } emitJSDocComment(tag.comment); - if (tag.typeExpression && tag.typeExpression.kind === 331 /* JSDocTypeLiteral */) { + if (tag.typeExpression && tag.typeExpression.kind === 334 /* JSDocTypeLiteral */) { emitJSDocTypeLiteral(tag.typeExpression); } } @@ -37377,7 +37594,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { return block.statements.length === 0 && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile)); } function skipSynthesizedParentheses(node) { - while (node.kind === 217 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { + while (node.kind === 219 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -37447,84 +37664,84 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (!node) return; switch (node.kind) { - case 242 /* Block */: + case 244 /* Block */: forEach(node.statements, generateNames); break; - case 257 /* LabeledStatement */: - case 255 /* WithStatement */: - case 247 /* DoStatement */: - case 248 /* WhileStatement */: + case 259 /* LabeledStatement */: + case 257 /* WithStatement */: + case 249 /* DoStatement */: + case 250 /* WhileStatement */: generateNames(node.statement); break; - case 246 /* IfStatement */: + case 248 /* IfStatement */: generateNames(node.thenStatement); generateNames(node.elseStatement); break; - case 249 /* ForStatement */: - case 251 /* ForOfStatement */: - case 250 /* ForInStatement */: + case 251 /* ForStatement */: + case 253 /* ForOfStatement */: + case 252 /* ForInStatement */: generateNames(node.initializer); generateNames(node.statement); break; - case 256 /* SwitchStatement */: + case 258 /* SwitchStatement */: generateNames(node.caseBlock); break; - case 272 /* CaseBlock */: + case 275 /* CaseBlock */: forEach(node.clauses, generateNames); break; - case 298 /* CaseClause */: - case 299 /* DefaultClause */: + case 301 /* CaseClause */: + case 302 /* DefaultClause */: forEach(node.statements, generateNames); break; - case 259 /* TryStatement */: + case 261 /* TryStatement */: generateNames(node.tryBlock); generateNames(node.catchClause); generateNames(node.finallyBlock); break; - case 301 /* CatchClause */: + case 304 /* CatchClause */: generateNames(node.variableDeclaration); generateNames(node.block); break; - case 244 /* VariableStatement */: + case 246 /* VariableStatement */: generateNames(node.declarationList); break; - case 262 /* VariableDeclarationList */: + case 264 /* VariableDeclarationList */: forEach(node.declarations, generateNames); break; - case 261 /* VariableDeclaration */: - case 168 /* Parameter */: - case 208 /* BindingElement */: - case 264 /* ClassDeclaration */: + case 263 /* VariableDeclaration */: + case 169 /* Parameter */: + case 210 /* BindingElement */: + case 266 /* ClassDeclaration */: generateNameIfNeeded(node.name); break; - case 263 /* FunctionDeclaration */: + case 265 /* FunctionDeclaration */: generateNameIfNeeded(node.name); if (getEmitFlags(node) & 524288 /* ReuseTempVariableScope */) { forEach(node.parameters, generateNames); generateNames(node.body); } break; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 208 /* ObjectBindingPattern */: + case 209 /* ArrayBindingPattern */: forEach(node.elements, generateNames); break; - case 275 /* ImportDeclaration */: + case 278 /* ImportDeclaration */: generateNames(node.importClause); break; - case 276 /* ImportClause */: + case 279 /* ImportClause */: generateNameIfNeeded(node.name); generateNames(node.namedBindings); break; - case 277 /* NamespaceImport */: + case 280 /* NamespaceImport */: generateNameIfNeeded(node.name); break; - case 283 /* NamespaceExport */: + case 286 /* NamespaceExport */: generateNameIfNeeded(node.name); break; - case 278 /* NamedImports */: + case 281 /* NamedImports */: forEach(node.elements, generateNames); break; - case 279 /* ImportSpecifier */: + case 282 /* ImportSpecifier */: generateNameIfNeeded(node.propertyName || node.name); break; } @@ -37533,13 +37750,13 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (!node) return; switch (node.kind) { - case 305 /* PropertyAssignment */: - case 306 /* ShorthandPropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 172 /* AnnotationPropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 308 /* PropertyAssignment */: + case 309 /* ShorthandPropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 173 /* AnnotationPropertyDeclaration */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: generateNameIfNeeded(node.name); break; } @@ -37713,27 +37930,27 @@ function createPrinter(printerOptions = {}, handlers = {}) { prefix, suffix ); - case 270 /* ModuleDeclaration */: - case 269 /* EnumDeclaration */: + case 273 /* ModuleDeclaration */: + case 272 /* EnumDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForModuleOrEnum(node); - case 275 /* ImportDeclaration */: - case 281 /* ExportDeclaration */: + case 278 /* ImportDeclaration */: + case 284 /* ExportDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForImportOrExportDeclaration(node); - case 263 /* FunctionDeclaration */: - case 264 /* ClassDeclaration */: - case 280 /* ExportAssignment */: + case 265 /* FunctionDeclaration */: + case 266 /* ClassDeclaration */: + case 283 /* ExportAssignment */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForExportDefault(); - case 232 /* ClassExpression */: + case 234 /* ClassExpression */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForClassExpression(); - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 176 /* MethodDeclaration */: + case 179 /* GetAccessor */: + case 180 /* SetAccessor */: return generateNameForMethodOrAccessor(node, privateName, prefix, suffix); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return makeTempVariableName(TempFlags.Auto, true, privateName, prefix, suffix); default: return makeTempVariableName(TempFlags.Auto, false, privateName, prefix, suffix); @@ -37824,14 +38041,14 @@ function createPrinter(printerOptions = {}, handlers = {}) { const skipTrailingComments = end < 0 || (emitFlags & 1024 /* NoTrailingComments */) !== 0 || node.kind === 11 /* JsxText */; if ((pos > 0 || end > 0) && pos !== end) { if (!skipLeadingComments) { - emitLeadingComments(pos, node.kind !== 358 /* NotEmittedStatement */); + emitLeadingComments(pos, node.kind !== 361 /* NotEmittedStatement */); } if (!skipLeadingComments || pos >= 0 && (emitFlags & 512 /* NoLeadingComments */) !== 0) { containerPos = pos; } if (!skipTrailingComments || end >= 0 && (emitFlags & 1024 /* NoTrailingComments */) !== 0) { containerEnd = end; - if (node.kind === 262 /* VariableDeclarationList */) { + if (node.kind === 264 /* VariableDeclarationList */) { declarationListContainerEnd = end; } } @@ -37847,7 +38064,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { containerPos = savedContainerPos; containerEnd = savedContainerEnd; declarationListContainerEnd = savedDeclarationListContainerEnd; - if (!skipTrailingComments && node.kind !== 358 /* NotEmittedStatement */) { + if (!skipTrailingComments && node.kind !== 361 /* NotEmittedStatement */) { emitTrailingComments(end); } } @@ -38099,7 +38316,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } } else { const source = sourceMapRange.source || sourceMapSource; - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { + if (node.kind !== 361 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos)); } if (emitFlags & 64 /* NoNestedSourceMaps */) { @@ -38114,7 +38331,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (emitFlags & 64 /* NoNestedSourceMaps */) { sourceMapsDisabled = false; } - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { + if (node.kind !== 361 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end); } } diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 3ad1f6e13e..ffc0eb264d 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -57,6 +57,8 @@ import { SyntaxKind, TextRange, ThrowStatement, TokenFlags, tokenToString, tracing, TracingNode, tryCast, tryParsePattern, TryStatement, TypeLiteralNode, TypeOfExpression, TypeParameterDeclaration, unescapeLeadingUnderscores, unreachableCodeIsError, unusedLabelIsError, VariableDeclaration, WhileStatement, WithStatement, + OverloadDeclaration, + OverloadPropertyDeclaration } from "./_namespaces/ts"; import * as performance from "./_namespaces/ts.performance"; @@ -1895,6 +1897,7 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { case SyntaxKind.ClassDeclaration: case SyntaxKind.StructDeclaration: case SyntaxKind.AnnotationDeclaration: + case SyntaxKind.OverloadDeclaration: case SyntaxKind.EnumDeclaration: case SyntaxKind.ObjectLiteralExpression: case SyntaxKind.TypeLiteral: @@ -1942,6 +1945,7 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { case SyntaxKind.PropertyDeclaration: return (node as PropertyDeclaration).initializer ? ContainerFlags.IsControlFlowContainer : 0; case SyntaxKind.AnnotationPropertyDeclaration: + case SyntaxKind.OverloadPropertyDeclaration: return (node as AnnotationPropertyDeclaration).initializer ? ContainerFlags.IsControlFlowContainer : 0; @@ -1999,6 +2003,7 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { case SyntaxKind.ClassDeclaration: case SyntaxKind.StructDeclaration: case SyntaxKind.AnnotationDeclaration: + case SyntaxKind.OverloadDeclaration: return declareClassMember(node, symbolFlags, symbolExcludes); case SyntaxKind.EnumDeclaration: @@ -2677,7 +2682,8 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { case SyntaxKind.PropertyDeclaration: case SyntaxKind.AnnotationPropertyDeclaration: case SyntaxKind.PropertySignature: - return bindPropertyWorker(node as PropertyDeclaration | PropertySignature | AnnotationPropertyDeclaration); + case SyntaxKind.OverloadPropertyDeclaration: + return bindPropertyWorker(node as PropertyDeclaration | PropertySignature | AnnotationPropertyDeclaration | OverloadPropertyDeclaration); case SyntaxKind.PropertyAssignment: case SyntaxKind.ShorthandPropertyAssignment: return bindPropertyOrMethodOrAccessor(node as Declaration, SymbolFlags.Property, SymbolFlags.PropertyExcludes); @@ -2749,6 +2755,8 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { return bindClassLikeDeclaration(node as ClassLikeDeclaration); case SyntaxKind.AnnotationDeclaration: return bindAnnotationDeclaration(node as AnnotationDeclaration); + case SyntaxKind.OverloadDeclaration: + return bindOverloadDeclaration(node as OverloadDeclaration); case SyntaxKind.InterfaceDeclaration: return bindBlockScopedDeclaration(node as Declaration, SymbolFlags.Interface, SymbolFlags.InterfaceExcludes); case SyntaxKind.TypeAliasDeclaration: @@ -2809,7 +2817,7 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { } } - function bindPropertyWorker(node: PropertyDeclaration | PropertySignature | AnnotationPropertyDeclaration) { + function bindPropertyWorker(node: PropertyDeclaration | PropertySignature | AnnotationPropertyDeclaration | OverloadPropertyDeclaration) { const isAutoAccessor = isAutoAccessorPropertyDeclaration(node); const includes = isAutoAccessor ? SymbolFlags.Accessor : SymbolFlags.Property; const excludes = isAutoAccessor ? SymbolFlags.AccessorExcludes : SymbolFlags.PropertyExcludes; @@ -3020,6 +3028,7 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { case SyntaxKind.Constructor: case SyntaxKind.PropertyDeclaration: case SyntaxKind.AnnotationPropertyDeclaration: + case SyntaxKind.OverloadPropertyDeclaration: case SyntaxKind.MethodDeclaration: case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: @@ -3369,6 +3378,23 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { prototypeSymbol.parent = symbol; } + function bindOverloadDeclaration(node: OverloadDeclaration): void { + Debug.assert(node.kind === SyntaxKind.OverloadDeclaration); + + bindBlockScopedDeclaration(node, SymbolFlags.Class, SymbolFlags.ClassExcludes); + const { symbol } = node; + const prototypeSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Prototype, "prototype" as __String); + const symbolExport = symbol.exports!.get(prototypeSymbol.escapedName); + if (symbolExport) { + if (node.name) { + setParent(node.name, node); + } + file.bindDiagnostics.push(createDiagnosticForNode(symbolExport.declarations![0], Diagnostics.Duplicate_identifier_0, symbolName(prototypeSymbol))); + } + symbol.exports!.set(prototypeSymbol.escapedName, prototypeSymbol); + prototypeSymbol.parent = symbol; + } + function bindEnumDeclaration(node: EnumDeclaration) { return isEnumConst(node) ? bindBlockScopedDeclaration(node, SymbolFlags.ConstEnum, SymbolFlags.ConstEnumExcludes) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 79af6c1d79..f320fc3f08 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -206,6 +206,7 @@ import { VariableStatement, VarianceFlags, visitEachChild, visitNode, visitNodes, Visitor, VisitResult, VoidExpression, walkUpBindingElementsAndPatterns, walkUpParenthesizedExpressions, walkUpParenthesizedTypes, walkUpParenthesizedTypesAndGetParentAndChild, WhileStatement, WideningContext, WithStatement, YieldExpression, + isOverloadPropertyDeclaration, OverloadPropertyDeclaration } from "./_namespaces/ts"; import * as performance from "./_namespaces/ts.performance"; import * as moduleSpecifiers from "./_namespaces/ts.moduleSpecifiers"; @@ -9497,7 +9498,7 @@ export function createTypeChecker(host: TypeCheckerHost, isTypeCheckerForLinter: // Return the inferred type for a variable, parameter, or property declaration function getTypeForVariableLikeDeclaration( declaration: ParameterDeclaration | PropertyDeclaration | PropertySignature | AnnotationPropertyDeclaration | VariableDeclaration | - BindingElement | JSDocPropertyLikeTag, + BindingElement | JSDocPropertyLikeTag | OverloadPropertyDeclaration, includeOptionality: boolean, checkMode: CheckMode, ): Type | undefined { @@ -10081,7 +10082,7 @@ export function createTypeChecker(host: TypeCheckerHost, isTypeCheckerForLinter: // Here, the array literal [1, "one"] is contextually typed by the type [any, string], which is the implied type of the // binding pattern [x, s = ""]. Because the contextual type is a tuple type, the resulting type of [1, "one"] is the // tuple type [number, string]. Thus, the type inferred for 'x' is number and the type inferred for 's' is string. - function getWidenedTypeForVariableLikeDeclaration(declaration: ParameterDeclaration | PropertyDeclaration | PropertySignature | AnnotationPropertyDeclaration | VariableDeclaration | BindingElement | JSDocPropertyLikeTag, reportErrors?: boolean): Type { + function getWidenedTypeForVariableLikeDeclaration(declaration: ParameterDeclaration | PropertyDeclaration | PropertySignature | AnnotationPropertyDeclaration | VariableDeclaration | BindingElement | JSDocPropertyLikeTag | OverloadPropertyDeclaration, reportErrors?: boolean): Type { return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration(declaration, /*includeOptionality*/ true, CheckMode.Normal), declaration, reportErrors); } @@ -10249,6 +10250,7 @@ export function createTypeChecker(host: TypeCheckerHost, isTypeCheckerForLinter: || isAnnotationPropertyDeclaration(declaration) || isVariableDeclaration(declaration) || isBindingElement(declaration) + || isOverloadPropertyDeclaration(declaration) || isJSDocPropertyLikeTag(declaration)) { type = getWidenedTypeForVariableLikeDeclaration(declaration, /*includeOptionality*/ true); } @@ -43990,8 +43992,10 @@ export function createTypeChecker(host: TypeCheckerHost, isTypeCheckerForLinter: return checkClassDeclaration(node as ClassDeclaration); case SyntaxKind.StructDeclaration: return checkStructDeclaration(node as StructDeclaration); - case SyntaxKind.AnnotationDeclaration: - return checkAnnotationDeclaration(node as AnnotationDeclaration); + case SyntaxKind.AnnotationDeclaration: + return checkAnnotationDeclaration(node as AnnotationDeclaration); + case SyntaxKind.OverloadDeclaration: + return; case SyntaxKind.InterfaceDeclaration: return checkInterfaceDeclaration(node as InterfaceDeclaration); case SyntaxKind.TypeAliasDeclaration: @@ -46730,6 +46734,7 @@ export function createTypeChecker(host: TypeCheckerHost, isTypeCheckerForLinter: case SyntaxKind.Constructor: case SyntaxKind.PropertyDeclaration: case SyntaxKind.PropertySignature: + case SyntaxKind.OverloadPropertyDeclaration: case SyntaxKind.MethodDeclaration: case SyntaxKind.MethodSignature: case SyntaxKind.IndexSignature: @@ -46760,6 +46765,7 @@ export function createTypeChecker(host: TypeCheckerHost, isTypeCheckerForLinter: case SyntaxKind.ClassDeclaration: case SyntaxKind.StructDeclaration: case SyntaxKind.AnnotationDeclaration: + case SyntaxKind.OverloadDeclaration: case SyntaxKind.ConstructorType: return nodeHasAnyModifiersExcept(node, SyntaxKind.AbstractKeyword); case SyntaxKind.ClassExpression: diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 28139e8c54..32a32be4f4 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -77,7 +77,7 @@ import { TypeOperatorNode, TypeParameterDeclaration, TypePredicateNode, TypeQueryNode, TypeReferenceNode, UnionTypeNode, UnparsedNode, UnparsedPrepend, UnparsedPrologue, UnparsedSource, UnparsedSyntheticReference, UnparsedTextLike, VariableDeclaration, VariableDeclarationList, VariableStatement, VoidExpression, WhileStatement, WithStatement, - writeCommentRange, writeFile, WriteFileCallbackData, YieldExpression, + writeCommentRange, writeFile, WriteFileCallbackData, YieldExpression, OverloadDeclaration, OverloadPropertyDeclaration } from "./_namespaces/ts"; import * as performance from "./_namespaces/ts.performance"; @@ -1522,6 +1522,8 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri return emitPropertyDeclaration(node as PropertyDeclaration); case SyntaxKind.AnnotationPropertyDeclaration: return emitAnnotationPropertyDeclaration(node as AnnotationPropertyDeclaration); + case SyntaxKind.OverloadPropertyDeclaration: + return emitOverloadPropertyDeclaration(node as OverloadPropertyDeclaration); case SyntaxKind.MethodSignature: return emitMethodSignature(node as MethodSignature); case SyntaxKind.MethodDeclaration: @@ -1658,6 +1660,8 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri return emitClassOrStructDeclaration(node); case SyntaxKind.AnnotationDeclaration: return emitAnnotationDeclaration(node as AnnotationDeclaration); + case SyntaxKind.OverloadDeclaration: + return emitOverloadDeclaration(node as OverloadDeclaration); case SyntaxKind.InterfaceDeclaration: return emitInterfaceDeclaration(node as InterfaceDeclaration); case SyntaxKind.TypeAliasDeclaration: @@ -2257,6 +2261,12 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri writeTrailingSemicolon(); } + function emitOverloadPropertyDeclaration(node: OverloadPropertyDeclaration) { + emitModifiers(node, node.modifiers); + emitNodeWithWriter(node.name, writeProperty); + emit(node.questionToken); + } + function emitPropertyDeclaration(node: PropertyDeclaration) { emitDecoratorsAndModifiers(node, node.modifiers); emit(node.name); @@ -3541,6 +3551,30 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri } } + function emitOverloadDeclaration(node: OverloadDeclaration): void { + emitDecoratorsAndModifiers(node, node.modifiers); + writeKeyword("overload"); + + if (node.name) { + writeSpace(); + emitIdentifierName(node.name); + } + + const indentedFlag = getEmitFlags(node) & EmitFlags.Indented; + if (indentedFlag) { + increaseIndent(); + } + + writeSpace(); + writePunctuation("{"); + emitList(node, node.members, ListFormat.EnumMembers); + writePunctuation("}"); + + if (indentedFlag) { + decreaseIndent(); + } + } + function emitTypeAliasDeclaration(node: TypeAliasDeclaration) { if (isSendableFunctionOrType(node, /*maybeNotOriginalNode*/ true)) { emitDecorators(node, node.illegalDecorators); diff --git a/src/compiler/factory/nodeFactory.ts b/src/compiler/factory/nodeFactory.ts index d0113c662c..d5780c51d9 100644 --- a/src/compiler/factory/nodeFactory.ts +++ b/src/compiler/factory/nodeFactory.ts @@ -79,7 +79,8 @@ import { UnionOrIntersectionTypeNode, UnionTypeNode, UnparsedNode, UnparsedPrepend, UnparsedPrologue, UnparsedSource, UnparsedSourceText, UnparsedSyntheticReference, UnparsedTextLike, UnscopedEmitHelper, VariableDeclaration, VariableDeclarationList, VariableStatement, visitNode, VisitResult, VoidExpression, WhileStatement, WithStatement, - YieldExpression, + YieldExpression, OverloadDeclaration, isOverloadDeclaration, OverloadPropertyDeclaration, isOverloadPropertyDeclaration, + OverloadElement } from "../_namespaces/ts"; let nextAutoGenerateId = 0; @@ -177,6 +178,8 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode updatePropertyDeclaration, createAnnotationPropertyDeclaration, updateAnnotationPropertyDeclaration, + createOverloadPropertyDeclaration, + updateOverloadPropertyDeclaration, createMethodSignature, updateMethodSignature, createMethodDeclaration, @@ -376,6 +379,8 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode updateStructDeclaration, createAnnotationDeclaration, updateAnnotationDeclaration, + createOverloadDeclaration, + updateOverloadDeclaration, createInterfaceDeclaration, updateInterfaceDeclaration, createTypeAliasDeclaration, @@ -719,6 +724,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode case SyntaxKind.SetAccessor: case SyntaxKind.PropertyDeclaration: case SyntaxKind.AnnotationPropertyDeclaration: + case SyntaxKind.OverloadPropertyDeclaration: case SyntaxKind.PropertyAssignment: if (isIdentifier(name)) { node.transformFlags |= propagateIdentifierNameFlags(name); @@ -846,7 +852,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode } function createBaseBindingLikeDeclaration( + BindingElement | AnnotationPropertyDeclaration | OverloadPropertyDeclaration>( kind: T["kind"], modifiers: readonly ModifierLike[] | undefined, name: string | T["name"] | undefined, @@ -862,7 +868,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode return node; } - function createBaseVariableLikeDeclaration( + function createBaseVariableLikeDeclaration( kind: T["kind"], modifiers: readonly ModifierLike[] | undefined, name: string | T["name"] | undefined, @@ -1400,6 +1406,43 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode : node; } + // @api + function createOverloadPropertyDeclaration( + modifiers: readonly ModifierLike[] | undefined, + name: PropertyName | string, + questionToken: QuestionToken | undefined, + type: TypeNode | undefined + ): OverloadPropertyDeclaration { + const node = createBaseNamedDeclaration( + SyntaxKind.OverloadPropertyDeclaration, + modifiers, + name + ); + node.type = type; + node.questionToken = questionToken; + node.transformFlags = TransformFlags.ContainsTypeScript; + + // The following properties are used only to report grammar errors + node.initializer = undefined; + return node; + } + + // @api + function updateOverloadPropertyDeclaration( + node: OverloadPropertyDeclaration, + modifiers: readonly ModifierLike[] | undefined, + name: PropertyName, + questionToken: QuestionToken | undefined, + type: TypeNode | undefined + ) { + return node.modifiers !== modifiers + || node.name !== name + || node.questionToken !== questionToken + || node.type !== type + ? update(createOverloadPropertyDeclaration(modifiers, name, questionToken, type), node) + : node; + } + function finishUpdatePropertySignature(updated: Mutable, original: PropertySignature) { if (updated !== original) { // copy children used only for error reporting @@ -4053,6 +4096,43 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode : node; } + // @api + function createOverloadDeclaration( + modifiers: readonly Modifier[] | undefined, + name: string | Identifier | undefined, + members: readonly OverloadElement[] + ) { + const node = createBaseNamedDeclaration( + SyntaxKind.OverloadDeclaration, + modifiers, + name + ); + node.members = createNodeArray(members); + node.transformFlags |= propagateChildrenFlags(node.members); + if (modifiersToFlags(node.modifiers) & ModifierFlags.Ambient) { + node.transformFlags = TransformFlags.ContainsTypeScript; + } + else { + node.transformFlags |= TransformFlags.ContainsES2015; + node.transformFlags |= TransformFlags.ContainsTypeScript; + } + return node; + } + + // @api + function updateOverloadDeclaration( + node: OverloadDeclaration, + modifiers: readonly Modifier[] | undefined, + name: Identifier | undefined, + members: readonly OverloadElement[] + ) { + return node.modifiers !== modifiers + || node.name !== name + || node.members !== members + ? update(createOverloadDeclaration(modifiers, name, members), node) + : node; + } + // @api function createInterfaceDeclaration( modifiers: readonly Modifier[] | undefined, @@ -6556,6 +6636,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : + isOverloadPropertyDeclaration(node) ? updateOverloadPropertyDeclaration(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : @@ -6568,6 +6649,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isStructDeclaration(node) ? updateStructDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isAnnotationDeclaration(node) ? updateAnnotationDeclaration(node, modifierArray, node.name, node.members) : + isOverloadDeclaration(node) ? updateOverloadDeclaration(node, modifierArray, node.name, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : diff --git a/src/compiler/factory/nodeTests.ts b/src/compiler/factory/nodeTests.ts index a18b382396..6c8724ad54 100644 --- a/src/compiler/factory/nodeTests.ts +++ b/src/compiler/factory/nodeTests.ts @@ -36,7 +36,7 @@ import { TryStatement, TupleTypeNode, TypeAliasDeclaration, TypeAssertion, TypeLiteralNode, TypeOfExpression, TypeOperatorNode, TypeParameterDeclaration, TypePredicateNode, TypeQueryNode, TypeReferenceNode, UnionTypeNode, UnparsedPrepend, UnparsedSource, VariableDeclaration, VariableDeclarationList, VariableStatement, VoidExpression, - WhileStatement, WithStatement, YieldExpression, + WhileStatement, WithStatement, YieldExpression, OverloadDeclaration, OverloadPropertyDeclaration } from "../_namespaces/ts"; // Literals @@ -233,6 +233,10 @@ export function isPropertySignature(node: Node): node is PropertySignature { return node.kind === SyntaxKind.PropertySignature; } +export function isOverloadPropertyDeclaration(node: Node): node is OverloadPropertyDeclaration { + return node.kind === SyntaxKind.OverloadPropertyDeclaration; +} + export function isPropertyDeclaration(node: Node): node is PropertyDeclaration { return node.kind === SyntaxKind.PropertyDeclaration; } @@ -635,6 +639,10 @@ export function isAnnotationDeclaration(node: Node): node is AnnotationDeclarati return node.kind === SyntaxKind.AnnotationDeclaration; } +export function isOverloadDeclaration(node: Node): node is OverloadDeclaration { + return node.kind === SyntaxKind.OverloadDeclaration; +} + export function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration { return node.kind === SyntaxKind.InterfaceDeclaration; } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 6133dfc785..b268c23699 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -69,7 +69,8 @@ import { TupleTypeNode, TypeAliasDeclaration, TypeAssertion, TypeElement, TypeLiteralNode, TypeNode, TypeOfExpression, TypeOperatorNode, TypeParameterDeclaration, TypePredicateNode, TypeQueryNode, TypeReferenceNode, UnaryExpression, UnionOrIntersectionTypeNode, UnionTypeNode, UpdateExpression, VariableDeclaration, VariableDeclarationList, - VariableStatement, VoidExpression, WhileStatement, WithStatement, YieldExpression, + VariableStatement, VoidExpression, WhileStatement, WithStatement, YieldExpression, OverloadDeclaration, + OverloadElement, OverloadPropertyDeclaration } from "./_namespaces/ts"; import * as performance from "./_namespaces/ts.performance"; @@ -225,6 +226,13 @@ const forEachChildTable: ForEachChildTable = { visitNode(cbNode, node.type) || visitNode(cbNode, node.initializer); }, + [SyntaxKind.OverloadPropertyDeclaration]: function forEachChildInOverloadPropertyDeclaration(node: OverloadPropertyDeclaration, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray) => T | undefined): T | undefined { + return visitNodes(cbNode, cbNodes, node.modifiers) || + visitNode(cbNode, node.name) || + visitNode(cbNode, node.questionToken) || + visitNode(cbNode, node.type) || + visitNode(cbNode, node.initializer); + }, [SyntaxKind.PropertyAssignment]: function forEachChildInPropertyAssignment(node: PropertyAssignment, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray) => T | undefined): T | undefined { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || @@ -588,6 +596,7 @@ const forEachChildTable: ForEachChildTable = { [SyntaxKind.ClassExpression]: forEachChildInClassDeclarationOrExpression, [SyntaxKind.StructDeclaration]: forEachChildInClassDeclarationOrExpression, [SyntaxKind.AnnotationDeclaration]: forEachChildInAnnotationDeclaration, + [SyntaxKind.OverloadDeclaration]: forEachChildInOverloadDeclaration, [SyntaxKind.InterfaceDeclaration]: function forEachChildInInterfaceDeclaration(node: InterfaceDeclaration, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray) => T | undefined): T | undefined { return visitNodes(cbNode, cbNodes, node.illegalDecorators) || visitNodes(cbNode, cbNodes, node.modifiers) || @@ -877,6 +886,13 @@ function forEachChildInAnnotationDeclaration(node: AnnotationDeclaration, cbN visitNodes(cbNode, cbNodes, node.members); } +function forEachChildInOverloadDeclaration(node: OverloadDeclaration, cbNode: (node: Node) => T | undefined, + cbNodes?: (nodes: NodeArray) => T | undefined): T | undefined { + return visitNodes(cbNode, cbNodes, node.modifiers) || + visitNode(cbNode, node.name) || + visitNodes(cbNode, cbNodes, node.members); +} + function forEachChildInNamedImportsOrExports(node: NamedImports | NamedExports, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray) => T | undefined): T | undefined { return visitNodes(cbNode, cbNodes, node.elements); } @@ -2624,6 +2640,9 @@ namespace Parser { if (inAllowAnnotationContext() && token() === SyntaxKind.AtToken) { return lookAhead(() => nextToken() === SyntaxKind.InterfaceKeyword); } + if (token() === SyntaxKind.OverloadKeyword) { + return true; + } return canFollowExportModifier(); case SyntaxKind.DefaultKeyword: return nextTokenCanFollowDefaultKeyword(); @@ -2660,6 +2679,7 @@ namespace Parser { || token() === SyntaxKind.AsteriskToken || token() === SyntaxKind.DotDotDotToken || token() === SyntaxKind.AtToken && inAllowAnnotationContext() && lookAhead(() => nextToken() === SyntaxKind.InterfaceKeyword) + || token() === SyntaxKind.OverloadKeyword || isLiteralPropertyName(); } @@ -4077,6 +4097,20 @@ namespace Parser { return withJSDoc(finishNode(node, pos), hasJSDoc); } + function parseOverloadPropertyDeclaration(pos: number, hasJSDoc: boolean, modifiers: NodeArray | undefined): OverloadPropertyDeclaration { + const name = parsePropertyName(); + const questionToken = parseOptionalToken(SyntaxKind.QuestionToken); + let node: OverloadPropertyDeclaration; + const type = parseTypeAnnotation(); + node = factory.createOverloadPropertyDeclaration(modifiers, name, questionToken, type); + // Although type literal properties cannot not have initializers, we attempt + // to parse an initializer so we can report in the checker that an interface + // property or type literal property cannot have an initializer. + if (token() === SyntaxKind.EqualsToken) (node as Mutable).initializer = parseInitializer(); + parseTypeMemberSemicolon(); + return withJSDoc(finishNode(node, pos), hasJSDoc); + } + function parsePropertyOrMethodSignature(pos: number, hasJSDoc: boolean, modifiers: NodeArray | undefined): PropertySignature | MethodSignature { const name = parsePropertyName(); const questionToken = parseOptionalToken(SyntaxKind.QuestionToken); @@ -7103,6 +7137,8 @@ namespace Parser { return inEtsContext(); case SyntaxKind.AtToken: return inAllowAnnotationContext() && nextToken() === SyntaxKind.InterfaceKeyword; + case SyntaxKind.OverloadKeyword: + return nextTokenIsIdentifierOnSameLine(); // 'declare', 'module', 'namespace', 'interface'* and 'type' are all legal JavaScript identifiers; // however, an identifier cannot be followed by another identifier on the same line. This is what we // count on to parse out the respective declarations. For instance, we exploit this to say that @@ -7303,6 +7339,7 @@ namespace Parser { case SyntaxKind.DebuggerKeyword: return parseDebuggerStatement(); case SyntaxKind.AtToken: + case SyntaxKind.OverloadKeyword: return parseDeclaration(); case SyntaxKind.AsyncKeyword: case SyntaxKind.InterfaceKeyword: @@ -7359,6 +7396,23 @@ namespace Parser { return withJSDoc(finishNode(node, pos), hasJSDoc); } + function parseOverloadDeclaration(pos: number, hasJSDoc: boolean, decorators: NodeArray | undefined, + modifiers: NodeArray | undefined): OverloadDeclaration { + parseExpected(SyntaxKind.OverloadKeyword); + + const name = createIdentifier(isBindingIdentifier()); + let members; + if (parseExpected(SyntaxKind.OpenBraceToken)) { + members = parseOverloadMembers(); + parseExpected(SyntaxKind.CloseBraceToken); + } + else { + members = createMissingList(); + } + const node = factory.createOverloadDeclaration(combineDecoratorsAndModifiers(decorators, modifiers), name, members); + return withJSDoc(finishNode(node, pos), hasJSDoc); + } + function parseDeclaration(): Statement { // `parseListElement` attempted to get the reused node at this position, // but the ambient context flag was not yet set, so the node appeared @@ -7439,6 +7493,8 @@ namespace Parser { return parseAnnotationDeclaration(pos, hasJSDoc, decorators, modifiers); } return parseDeclarationDefault(pos, decorators, modifiers); + case SyntaxKind.OverloadKeyword: + return parseOverloadDeclaration(pos, hasJSDoc, decorators, modifiers); case SyntaxKind.InterfaceKeyword: return parseInterfaceDeclaration(pos, hasJSDoc, decorators, modifiers); case SyntaxKind.TypeKeyword: @@ -8263,6 +8319,52 @@ namespace Parser { return Debug.fail("Should not have attempted to parse annotation member declaration."); } + function parseOverloadElement(): OverloadPropertyDeclaration { + const pos = getNodePos(); + if (token() === SyntaxKind.SemicolonToken) { + parseErrorAt(pos, pos, Diagnostics.Unexpected_keyword_or_identifier); + } + + const hasJSDoc = hasPrecedingJSDocComment(); + if (token() === SyntaxKind.StaticKeyword && lookAhead(nextTokenIsOpenBrace)) { + return createMissingNode(SyntaxKind.OverloadPropertyDeclaration, /*reportAtCurrentPosition*/ true, + Diagnostics.Unexpected_keyword_or_identifier); + } + + if (parseContextualModifier(SyntaxKind.GetKeyword)) { + return createMissingNode(SyntaxKind.OverloadPropertyDeclaration, /*reportAtCurrentPosition*/ true, + Diagnostics.Unexpected_keyword_or_identifier); + } + + if (parseContextualModifier(SyntaxKind.SetKeyword)) { + return createMissingNode(SyntaxKind.OverloadPropertyDeclaration, /*reportAtCurrentPosition*/ true, + Diagnostics.Unexpected_keyword_or_identifier); + } + + if (token() === SyntaxKind.ConstructorKeyword || token() === SyntaxKind.StringLiteral) { + return createMissingNode(SyntaxKind.OverloadPropertyDeclaration, /*reportAtCurrentPosition*/ true, + Diagnostics.Unexpected_keyword_or_identifier); + } + + if (isIndexSignature()) { + return createMissingNode(SyntaxKind.OverloadPropertyDeclaration, /*reportAtCurrentPosition*/ true, + Diagnostics.Unexpected_keyword_or_identifier); + } + + if (tokenIsIdentifierOrKeyword(token())) { + const modifiers = parseModifiers(); + let overloadPropertyDeclaration: OverloadPropertyDeclaration = parseOverloadPropertyDeclaration(pos, hasJSDoc, modifiers); + if (overloadPropertyDeclaration.kind === SyntaxKind.OverloadPropertyDeclaration) { + return overloadPropertyDeclaration; + } + return createMissingNode(SyntaxKind.OverloadPropertyDeclaration, /*reportAtCurrentPosition*/ true, + Diagnostics.Unexpected_keyword_or_identifier); + } + + // 'isAnnotationMemberStart' should have hinted not to attempt parsing. + return Debug.fail("Should not have attempted to parse annotation member declaration."); + } + function parseClassExpression(): ClassExpression { return parseClassDeclarationOrExpression(getNodePos(), hasPrecedingJSDocComment(), /*decorators*/ undefined, /*modifiers*/ undefined, SyntaxKind.ClassExpression) as ClassExpression; } @@ -8407,6 +8509,10 @@ namespace Parser { return parseList(ParsingContext.AnnotationMembers, parseAnnotationElement); } + function parseOverloadMembers(): NodeArray { + return parseList(ParsingContext.TypeMembers, parseOverloadElement); + } + function parseStructMembers(pos: number): NodeArray { const structMembers = parseList(ParsingContext.ClassMembers, parseClassElement); diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index d8e97f1904..0ba1f75854 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -139,6 +139,7 @@ export const textToKeywordObj: MapLike = { protected: SyntaxKind.ProtectedKeyword, public: SyntaxKind.PublicKeyword, override: SyntaxKind.OverrideKeyword, + overload: SyntaxKind.OverloadKeyword, out: SyntaxKind.OutKeyword, readonly: SyntaxKind.ReadonlyKeyword, require: SyntaxKind.RequireKeyword, diff --git a/src/compiler/transformers/classFields.ts b/src/compiler/transformers/classFields.ts index 0eedde992b..51fb30f321 100644 --- a/src/compiler/transformers/classFields.ts +++ b/src/compiler/transformers/classFields.ts @@ -263,6 +263,8 @@ export function transformClassFields(context: TransformationContext): (x: Source return visitClassDeclaration(node as ClassDeclaration); case SyntaxKind.AnnotationDeclaration: return undefined; + case SyntaxKind.OverloadDeclaration: + return undefined; case SyntaxKind.ClassExpression: return visitClassExpression(node as ClassExpression); case SyntaxKind.ClassStaticBlockDeclaration: @@ -271,6 +273,8 @@ export function transformClassFields(context: TransformationContext): (x: Source return visitPropertyDeclaration(node as PropertyDeclaration); case SyntaxKind.AnnotationPropertyDeclaration: return undefined; + case SyntaxKind.OverloadPropertyDeclaration: + return undefined; case SyntaxKind.VariableStatement: return visitVariableStatement(node as VariableStatement); case SyntaxKind.PrivateIdentifier: diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 64ab5ba77f..d2118813fd 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -40,7 +40,8 @@ import { SymbolAccessibilityResult, SymbolFlags, SymbolTracker, SyntaxKind, toFileNameLowerCase, toPath, TransformationContext, transformNodes, tryCast, TypeAliasDeclaration, TypeNode, TypeParameterDeclaration, TypeReferenceNode, unescapeLeadingUnderscores, UnparsedSource, VariableDeclaration, VariableStatement, visitArray, - visitEachChild, visitNode, visitNodes, VisitResult, + visitEachChild, visitNode, visitNodes, VisitResult, isOverloadDeclaration, + OverloadPropertyDeclaration } from "../_namespaces/ts"; import * as moduleSpecifiers from "../_namespaces/ts.moduleSpecifiers"; @@ -588,6 +589,7 @@ export function transformDeclarations(context: TransformationContext) { | ParameterDeclaration | PropertyDeclaration | AnnotationPropertyDeclaration + | OverloadPropertyDeclaration | PropertySignature; function ensureType(node: HasInferredType, type: TypeNode | undefined, ignorePrivate?: boolean): TypeNode | undefined { @@ -628,7 +630,9 @@ export function transformDeclarations(context: TransformationContext) { if (node.kind === SyntaxKind.Parameter || node.kind === SyntaxKind.PropertyDeclaration || node.kind === SyntaxKind.PropertySignature - || node.kind === SyntaxKind.AnnotationPropertyDeclaration) { + || node.kind === SyntaxKind.AnnotationPropertyDeclaration + || node.kind === SyntaxKind.OverloadPropertyDeclaration + ) { 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)); } @@ -743,6 +747,7 @@ export function transformDeclarations(context: TransformationContext) { || isClassDeclaration(node) || isStructDeclaration(node) || isAnnotationDeclaration(node) + || isOverloadDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) @@ -1097,6 +1102,17 @@ export function transformDeclarations(context: TransformationContext) { input.questionToken, ensureType(input, input.type) )); + case SyntaxKind.OverloadPropertyDeclaration: + if (isPrivateIdentifier(input.name)) { + return cleanup(/*returnValue*/ undefined); + } + return cleanup(factory.updateOverloadPropertyDeclaration( + input, + ensureModifiers(input), + input.name, + input.questionToken, + ensureType(input, input.type) + )); case SyntaxKind.MethodSignature: { if (isPrivateIdentifier(input.name)) { return cleanup(/*returnValue*/ undefined); @@ -1518,6 +1534,21 @@ export function transformDeclarations(context: TransformationContext) { members )); } + case SyntaxKind.OverloadDeclaration: { + errorNameNode = input.name; + errorFallbackNode = input; + + const modifiers = factory.createNodeArray(ensureModifiers(input)); + const memberNodes = visitNodes(input.members, visitDeclarationSubtree); + const members = factory.createNodeArray(memberNodes); + + return cleanup(factory.updateOverloadDeclaration( + input, + modifiers, + input.name, + members + )); + } case SyntaxKind.ClassDeclaration: { errorNameNode = input.name; errorFallbackNode = input; @@ -1828,6 +1859,7 @@ function isPreservedDeclarationStatement(node: Node): node is ProcessedDeclarati case SyntaxKind.ClassDeclaration: case SyntaxKind.StructDeclaration: case SyntaxKind.AnnotationDeclaration: + case SyntaxKind.OverloadDeclaration: case SyntaxKind.TypeAliasDeclaration: case SyntaxKind.EnumDeclaration: case SyntaxKind.VariableStatement: @@ -1847,6 +1879,7 @@ type ProcessedComponent = | SetAccessorDeclaration | PropertyDeclaration | AnnotationPropertyDeclaration + | OverloadPropertyDeclaration | PropertySignature | MethodSignature | CallSignatureDeclaration @@ -1869,6 +1902,7 @@ function isProcessedComponent(node: Node): node is ProcessedComponent { case SyntaxKind.SetAccessor: case SyntaxKind.PropertyDeclaration: case SyntaxKind.AnnotationPropertyDeclaration: + case SyntaxKind.OverloadPropertyDeclaration: case SyntaxKind.PropertySignature: case SyntaxKind.MethodSignature: case SyntaxKind.CallSignature: diff --git a/src/compiler/transformers/declarations/diagnostics.ts b/src/compiler/transformers/declarations/diagnostics.ts index 5a5c280ae3..beb1ebae78 100644 --- a/src/compiler/transformers/declarations/diagnostics.ts +++ b/src/compiler/transformers/declarations/diagnostics.ts @@ -5,10 +5,10 @@ import { IndexSignatureDeclaration, isAnnotationPropertyDeclaration, isBindingElement, isCallSignatureDeclaration, isClassDeclaration, isConstructorDeclaration, isConstructSignatureDeclaration, isExpressionWithTypeArguments, isFunctionDeclaration, isGetAccessor, isHeritageClause, isImportEqualsDeclaration, isIndexSignatureDeclaration, isJSDocTypeAlias, - isMethodDeclaration, isMethodSignature, isParameter, isParameterPropertyDeclaration, isPropertyAccessExpression, + isMethodDeclaration, isMethodSignature, isOverloadPropertyDeclaration, isParameter, isParameterPropertyDeclaration, isPropertyAccessExpression, isPropertyDeclaration, isPropertySignature, isSetAccessor, isStatic, isTypeAliasDeclaration, isTypeParameterDeclaration, isVariableDeclaration, JSDocCallbackTag, JSDocEnumTag, JSDocTypedefTag, - MethodDeclaration, MethodSignature, ModifierFlags, NamedDeclaration, Node, ParameterDeclaration, + MethodDeclaration, MethodSignature, ModifierFlags, NamedDeclaration, Node, OverloadPropertyDeclaration, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, QualifiedName, SetAccessorDeclaration, SymbolAccessibility, SymbolAccessibilityResult, SyntaxKind, TypeAliasDeclaration, TypeParameterDeclaration, VariableDeclaration, @@ -30,6 +30,7 @@ export type DeclarationDiagnosticProducing = | PropertyDeclaration | AnnotationPropertyDeclaration | PropertySignature + | OverloadPropertyDeclaration | BindingElement | SetAccessorDeclaration | GetAccessorDeclaration @@ -152,7 +153,7 @@ export function createGetSymbolAccessibilityDiagnosticForNodeName(node: Declarat /** @internal */ export function createGetSymbolAccessibilityDiagnosticForNode(node: DeclarationDiagnosticProducing): GetSymbolAccessibilityDiagnostic { if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isAnnotationPropertyDeclaration(node) || - isPropertyAccessExpression(node) || isBindingElement(node) || isConstructorDeclaration(node)) { + isPropertyAccessExpression(node) || isBindingElement(node) || isConstructorDeclaration(node) || isOverloadPropertyDeclaration(node)) { return getVariableDeclarationTypeVisibilityError; } else if (isSetAccessor(node) || isGetAccessor(node)) { diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 58e71759fb..33f9bc99b2 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -519,6 +519,9 @@ export function transformTypeScript(context: TransformationContext) { case SyntaxKind.AnnotationDeclaration: return factory.createNotEmittedStatement(node); + + case SyntaxKind.OverloadDeclaration: + return factory.createNotEmittedStatement(node); case SyntaxKind.HeritageClause: // This may be a heritage clause with TypeScript syntax extensions. @@ -537,6 +540,7 @@ export function transformTypeScript(context: TransformationContext) { case SyntaxKind.Constructor: case SyntaxKind.PropertyDeclaration: case SyntaxKind.AnnotationPropertyDeclaration: + case SyntaxKind.OverloadPropertyDeclaration: case SyntaxKind.MethodDeclaration: case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 77b108d1db..6ab8cfd52c 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -201,6 +201,7 @@ export const enum SyntaxKind { GlobalKeyword, BigIntKeyword, OverrideKeyword, + OverloadKeyword, OfKeyword, // LastKeyword and LastToken and LastContextualKeyword // Parse tree nodes @@ -216,6 +217,7 @@ export const enum SyntaxKind { PropertySignature, PropertyDeclaration, AnnotationPropertyDeclaration, + OverloadPropertyDeclaration, MethodSignature, MethodDeclaration, ClassStaticBlockDeclaration, @@ -316,6 +318,7 @@ export const enum SyntaxKind { ClassDeclaration, StructDeclaration, AnnotationDeclaration, + OverloadDeclaration, InterfaceDeclaration, TypeAliasDeclaration, EnumDeclaration, @@ -621,6 +624,7 @@ export type KeywordSyntaxKind = | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword + | SyntaxKind.OverloadKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword @@ -989,6 +993,7 @@ export type HasChildren = | PropertySignature | PropertyDeclaration | AnnotationPropertyDeclaration + | OverloadPropertyDeclaration | MethodSignature | MethodDeclaration | ConstructorDeclaration @@ -1078,6 +1083,7 @@ export type HasChildren = | ClassDeclaration | StructDeclaration | AnnotationDeclaration + | OverloadDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration @@ -1159,7 +1165,9 @@ export type HasJSDoc = | VariableDeclaration | PropertyDeclaration | AnnotationPropertyDeclaration + | OverloadPropertyDeclaration | AnnotationDeclaration + | OverloadDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration @@ -1189,6 +1197,7 @@ export type HasType = | PropertySignature | PropertyDeclaration | AnnotationPropertyDeclaration + | OverloadPropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode @@ -1309,6 +1318,7 @@ export type HasModifiers = | ClassDeclaration | StructDeclaration | AnnotationDeclaration + | OverloadDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration @@ -1317,6 +1327,7 @@ export type HasModifiers = | ImportDeclaration | ExportAssignment | ExportDeclaration + | OverloadPropertyDeclaration ; // NOTE: Changing the following list requires changes to: @@ -1795,6 +1806,7 @@ export type VariableLikeDeclaration = | BindingElement | PropertyDeclaration | AnnotationPropertyDeclaration + | OverloadPropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute @@ -3316,7 +3328,7 @@ export type DeclarationWithTypeParameterChildren = ; export interface ClassLikeDeclarationBase extends NamedDeclaration, JSDocContainer { - readonly kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression | SyntaxKind.StructDeclaration | SyntaxKind.AnnotationDeclaration; + readonly kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression | SyntaxKind.StructDeclaration | SyntaxKind.AnnotationDeclaration | SyntaxKind.OverloadDeclaration; readonly name?: Identifier; readonly typeParameters?: NodeArray; readonly heritageClauses?: NodeArray; @@ -3344,6 +3356,13 @@ export interface AnnotationDeclaration extends DeclarationStatement { readonly members: NodeArray; } +export interface OverloadDeclaration extends DeclarationStatement { + readonly kind: SyntaxKind.OverloadDeclaration; + readonly modifiers?: NodeArray; + readonly name: Identifier; + readonly members: NodeArray; +} + export interface ClassExpression extends ClassLikeDeclarationBase, PrimaryExpression { readonly kind: SyntaxKind.ClassExpression; readonly modifiers?: NodeArray; @@ -3365,6 +3384,21 @@ export interface AnnotationElement extends NamedDeclaration { readonly name: PropertyName; } +export interface OverloadElement extends NamedDeclaration { + readonly name: PropertyName; // Optional initializer +} + +export interface OverloadPropertyDeclaration extends OverloadElement, JSDocContainer { + readonly kind: SyntaxKind.OverloadPropertyDeclaration; + readonly modifiers?: NodeArray; + readonly name: PropertyName; // Declared property name + readonly questionToken?: QuestionToken; // Present on optional property + readonly type?: TypeNode; // Optional type annotation + + // The following properties are used only to report grammar errors + /** @internal */ readonly initializer?: Expression | undefined; // A property signature cannot have an initializer +} + export interface TypeElement extends NamedDeclaration { _typeElementBrand: any; readonly name?: PropertyName; @@ -5334,7 +5368,9 @@ export type LateVisibilityPaintedStatement = | InterfaceDeclaration | EnumDeclaration | StructDeclaration - | AnnotationDeclaration; + | AnnotationDeclaration + | OverloadDeclaration + ; /** @internal */ export interface SymbolVisibilityResult { @@ -8096,8 +8132,13 @@ export interface NodeFactory { updatePropertySignature(node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined): PropertySignature; createPropertyDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; updatePropertyDeclaration(node: PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; + createAnnotationPropertyDeclaration(name: string | PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): AnnotationPropertyDeclaration; updateAnnotationPropertyDeclaration(node: AnnotationPropertyDeclaration, name: string | PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): AnnotationPropertyDeclaration; + + createOverloadPropertyDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined): OverloadPropertyDeclaration; + updateOverloadPropertyDeclaration(node: OverloadPropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined): OverloadPropertyDeclaration; + createMethodSignature(modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): MethodSignature; updateMethodSignature(node: MethodSignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode | undefined): MethodSignature; createMethodDeclaration(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration; @@ -8328,6 +8369,9 @@ export interface NodeFactory { createAnnotationDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, members: readonly AnnotationElement[]): AnnotationDeclaration; updateAnnotationDeclaration(node: AnnotationDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, members: readonly AnnotationElement[]): AnnotationDeclaration; + createOverloadDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, members: readonly OverloadElement[]): OverloadDeclaration; + updateOverloadDeclaration(node: OverloadDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, members: readonly OverloadElement[]): OverloadDeclaration; + createInterfaceDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; updateInterfaceDeclaration(node: InterfaceDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; createTypeAliasDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 0737e538d2..f3c49f182d 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1188,6 +1188,7 @@ export function isLateVisibilityPaintedStatement(node: Node): node is LateVisibi case SyntaxKind.ClassDeclaration: case SyntaxKind.StructDeclaration: case SyntaxKind.AnnotationDeclaration: + case SyntaxKind.OverloadDeclaration: case SyntaxKind.FunctionDeclaration: case SyntaxKind.ModuleDeclaration: case SyntaxKind.TypeAliasDeclaration: diff --git a/src/compiler/utilitiesPublic.ts b/src/compiler/utilitiesPublic.ts index 6531d918d1..5abe1562fc 100644 --- a/src/compiler/utilitiesPublic.ts +++ b/src/compiler/utilitiesPublic.ts @@ -45,7 +45,7 @@ import { some, sortAndDeduplicate, SortedReadonlyArray, SourceFile, Statement, StringLiteral, StringLiteralLike, StructDeclaration, Symbol, SyntaxKind, TemplateLiteral, TemplateLiteralToken, TemplateMiddle, TemplateTail, TextChangeRange, TextRange, TextSpan, TypeElement, TypeNode, TypeOnlyAliasDeclaration, TypeParameterDeclaration, TypeReferenceType, - UnaryExpression, UnparsedNode, UnparsedTextLike, VariableDeclaration, + UnaryExpression, UnparsedNode, UnparsedTextLike, VariableDeclaration, OverloadElement } from "./_namespaces/ts"; export function isExternalModuleNameRelative(moduleName: string): boolean { @@ -1424,6 +1424,11 @@ export function isAnnotationElement(node: Node): node is AnnotationElement { return kind === SyntaxKind.AnnotationPropertyDeclaration; } +export function isOverloadElement(node: Node): node is OverloadElement { + const kind = node.kind; + return kind === SyntaxKind.OverloadPropertyDeclaration; +} + // Classes export function isClassElement(node: Node): node is ClassElement { const kind = node.kind; @@ -1961,6 +1966,7 @@ function isDeclarationKind(kind: SyntaxKind) { || kind === SyntaxKind.ClassStaticBlockDeclaration || kind === SyntaxKind.StructDeclaration || kind === SyntaxKind.AnnotationDeclaration + || kind === SyntaxKind.OverloadPropertyDeclaration || kind === SyntaxKind.Constructor || kind === SyntaxKind.EnumDeclaration || kind === SyntaxKind.EnumMember @@ -2000,6 +2006,7 @@ function isDeclarationStatementKind(kind: SyntaxKind) { || kind === SyntaxKind.ClassDeclaration || kind === SyntaxKind.StructDeclaration || kind === SyntaxKind.AnnotationDeclaration + || kind === SyntaxKind.OverloadDeclaration || kind === SyntaxKind.InterfaceDeclaration || kind === SyntaxKind.TypeAliasDeclaration || kind === SyntaxKind.EnumDeclaration diff --git a/src/compiler/visitorPublic.ts b/src/compiler/visitorPublic.ts index b711d7ec6d..c524691747 100644 --- a/src/compiler/visitorPublic.ts +++ b/src/compiler/visitorPublic.ts @@ -15,7 +15,7 @@ import { isTemplateMiddleOrTemplateTail, isTemplateSpan, isToken, isTypeElement, isTypeNode, isTypeNodeOrTypeParameterDeclaration, isTypeParameterDeclaration, isVariableDeclaration, isVariableDeclarationList, LexicalEnvironmentFlags, Node, NodeArray, NodesVisitor, NodeVisitor, ParameterDeclaration, ScriptTarget, setEmitFlags, setTextRange, setTextRangePosEnd, singleOrUndefined, some, Statement, SyntaxKind, - TransformationContext, Visitor, VisitEachChildNodes + TransformationContext, Visitor, VisitEachChildNodes, isOverloadElement } from "./_namespaces/ts"; /** @@ -489,6 +489,14 @@ const visitEachChildTable: VisitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode)); }, + [SyntaxKind.OverloadPropertyDeclaration]: function visitEachChildOfOverloadPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + return context.factory.updateOverloadPropertyDeclaration(node, + nodesVisitor(node.modifiers, visitor, isModifier), + nodeVisitor(node.name, visitor, isPropertyName), + nodeVisitor(node.questionToken, tokenVisitor, isToken), + nodeVisitor(node.type, visitor, isTypeNode)); + }, + [SyntaxKind.PropertyDeclaration]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertyDeclaration(node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -1134,6 +1142,13 @@ const visitEachChildTable: VisitEachChildTable = { nodesVisitor(node.members, visitor, isAnnotationElement)); }, + [SyntaxKind.OverloadDeclaration]: function visitEachChildOfOverloadDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + return context.factory.updateOverloadDeclaration(node, + nodesVisitor(node.modifiers, visitor, isModifier), + nodeVisitor(node.name, visitor, isIdentifier), + nodesVisitor(node.members, visitor, isOverloadElement)); + }, + [SyntaxKind.InterfaceDeclaration]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration(node, nodesVisitor(node.modifiers, visitor, isModifier), -- Gitee