1/*! ***************************************************************************** 2Copyright (c) Microsoft Corporation. All rights reserved. 3Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4this file except in compliance with the License. You may obtain a copy of the 5License at http://www.apache.org/licenses/LICENSE-2.0 6 7THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 8KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 9WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 10MERCHANTABLITY OR NON-INFRINGEMENT. 11 12See the Apache Version 2.0 License for specific language governing permissions 13and limitations under the License. 14***************************************************************************** */ 15 16declare namespace ts { 17 const versionMajorMinor = "4.9"; 18 /** The version of the TypeScript compiler release */ 19 const version: string; 20 /** 21 * Type of objects whose values are all of the same type. 22 * The `in` and `for-in` operators can *not* be safely used, 23 * since `Object.prototype` may be modified by outside code. 24 */ 25 interface MapLike<T> { 26 [index: string]: T; 27 } 28 interface SortedReadonlyArray<T> extends ReadonlyArray<T> { 29 " __sortedArrayBrand": any; 30 } 31 interface SortedArray<T> extends Array<T> { 32 " __sortedArrayBrand": any; 33 } 34 /** Common read methods for ES6 Map/Set. */ 35 interface ReadonlyCollection<K> { 36 readonly size: number; 37 has(key: K): boolean; 38 keys(): Iterator<K>; 39 } 40 /** Common write methods for ES6 Map/Set. */ 41 interface Collection<K> extends ReadonlyCollection<K> { 42 delete(key: K): boolean; 43 clear(): void; 44 } 45 /** ES6 Map interface, only read methods included. */ 46 interface ReadonlyESMap<K, V> extends ReadonlyCollection<K> { 47 get(key: K): V | undefined; 48 values(): Iterator<V>; 49 entries(): Iterator<[ 50 K, 51 V 52 ]>; 53 forEach(action: (value: V, key: K) => void): void; 54 } 55 /** 56 * ES6 Map interface, only read methods included. 57 */ 58 interface ReadonlyMap<T> extends ReadonlyESMap<string, T> { 59 } 60 /** 61 * @deprecated Use `ts.ReadonlyESMap<K, V>` instead. 62 */ 63 interface ReadonlyMap<T> extends ReadonlyESMap<string, T> { 64 } 65 /** ES6 Map interface. */ 66 interface ESMap<K, V> extends ReadonlyESMap<K, V>, Collection<K> { 67 set(key: K, value: V): this; 68 } 69 /** 70 * ES6 Map interface. 71 */ 72 interface Map<T> extends ESMap<string, T> { 73 } 74 /** 75 * @deprecated Use `ts.ESMap<K, V>` instead. 76 */ 77 interface Map<T> extends ESMap<string, T> { 78 } 79 /** ES6 Set interface, only read methods included. */ 80 interface ReadonlySet<T> extends ReadonlyCollection<T> { 81 has(value: T): boolean; 82 values(): Iterator<T>; 83 entries(): Iterator<[ 84 T, 85 T 86 ]>; 87 forEach(action: (value: T, key: T) => void): void; 88 } 89 /** ES6 Set interface. */ 90 interface Set<T> extends ReadonlySet<T>, Collection<T> { 91 add(value: T): this; 92 delete(value: T): boolean; 93 } 94 /** ES6 Iterator type. */ 95 interface Iterator<T> { 96 next(): { 97 value: T; 98 done?: false; 99 } | { 100 value: void; 101 done: true; 102 }; 103 } 104 /** Array that is only intended to be pushed to, never read. */ 105 interface Push<T> { 106 push(...values: T[]): void; 107 } 108 namespace PerformanceDotting { 109 export enum AnalyzeMode { 110 DEFAULT = 0, 111 VERBOSE = 1, 112 TRACE = 3 113 } 114 interface PerformanceData { 115 startTime: number; 116 endTime: number; 117 duration: number; 118 name: string; 119 parentEvent: string; 120 tier: number; 121 fullPath: string; 122 id: string; 123 parentId: string; 124 fileName: string; 125 } 126 export function setPerformanceSwitch(projectConfigPerf: AnalyzeMode): void; 127 export function startAdvanced(eventName: string, fileName?: string): void; 128 export function stopAdvanced(eventName: string): void; 129 export function start(eventName: string, fileName?: string): void; 130 export function stop(eventName: string): void; 131 export function getEventData(): Array<PerformanceData>; 132 export function clearEvent(): void; 133 export {}; 134 } 135 type Path = string & { 136 __pathBrand: any; 137 }; 138 interface TextRange { 139 pos: number; 140 end: number; 141 } 142 interface ReadonlyTextRange { 143 readonly pos: number; 144 readonly end: number; 145 } 146 enum SyntaxKind { 147 Unknown = 0, 148 EndOfFileToken = 1, 149 SingleLineCommentTrivia = 2, 150 MultiLineCommentTrivia = 3, 151 NewLineTrivia = 4, 152 WhitespaceTrivia = 5, 153 ShebangTrivia = 6, 154 ConflictMarkerTrivia = 7, 155 NumericLiteral = 8, 156 BigIntLiteral = 9, 157 StringLiteral = 10, 158 JsxText = 11, 159 JsxTextAllWhiteSpaces = 12, 160 RegularExpressionLiteral = 13, 161 NoSubstitutionTemplateLiteral = 14, 162 TemplateHead = 15, 163 TemplateMiddle = 16, 164 TemplateTail = 17, 165 OpenBraceToken = 18, 166 CloseBraceToken = 19, 167 OpenParenToken = 20, 168 CloseParenToken = 21, 169 OpenBracketToken = 22, 170 CloseBracketToken = 23, 171 DotToken = 24, 172 DotDotDotToken = 25, 173 SemicolonToken = 26, 174 CommaToken = 27, 175 QuestionDotToken = 28, 176 LessThanToken = 29, 177 LessThanSlashToken = 30, 178 GreaterThanToken = 31, 179 LessThanEqualsToken = 32, 180 GreaterThanEqualsToken = 33, 181 EqualsEqualsToken = 34, 182 ExclamationEqualsToken = 35, 183 EqualsEqualsEqualsToken = 36, 184 ExclamationEqualsEqualsToken = 37, 185 EqualsGreaterThanToken = 38, 186 PlusToken = 39, 187 MinusToken = 40, 188 AsteriskToken = 41, 189 AsteriskAsteriskToken = 42, 190 SlashToken = 43, 191 PercentToken = 44, 192 PlusPlusToken = 45, 193 MinusMinusToken = 46, 194 LessThanLessThanToken = 47, 195 GreaterThanGreaterThanToken = 48, 196 GreaterThanGreaterThanGreaterThanToken = 49, 197 AmpersandToken = 50, 198 BarToken = 51, 199 CaretToken = 52, 200 ExclamationToken = 53, 201 TildeToken = 54, 202 AmpersandAmpersandToken = 55, 203 BarBarToken = 56, 204 QuestionToken = 57, 205 ColonToken = 58, 206 AtToken = 59, 207 QuestionQuestionToken = 60, 208 /** Only the JSDoc scanner produces BacktickToken. The normal scanner produces NoSubstitutionTemplateLiteral and related kinds. */ 209 BacktickToken = 61, 210 /** Only the JSDoc scanner produces HashToken. The normal scanner produces PrivateIdentifier. */ 211 HashToken = 62, 212 EqualsToken = 63, 213 PlusEqualsToken = 64, 214 MinusEqualsToken = 65, 215 AsteriskEqualsToken = 66, 216 AsteriskAsteriskEqualsToken = 67, 217 SlashEqualsToken = 68, 218 PercentEqualsToken = 69, 219 LessThanLessThanEqualsToken = 70, 220 GreaterThanGreaterThanEqualsToken = 71, 221 GreaterThanGreaterThanGreaterThanEqualsToken = 72, 222 AmpersandEqualsToken = 73, 223 BarEqualsToken = 74, 224 BarBarEqualsToken = 75, 225 AmpersandAmpersandEqualsToken = 76, 226 QuestionQuestionEqualsToken = 77, 227 CaretEqualsToken = 78, 228 Identifier = 79, 229 PrivateIdentifier = 80, 230 BreakKeyword = 81, 231 CaseKeyword = 82, 232 CatchKeyword = 83, 233 ClassKeyword = 84, 234 StructKeyword = 85, 235 ConstKeyword = 86, 236 ContinueKeyword = 87, 237 DebuggerKeyword = 88, 238 DefaultKeyword = 89, 239 DeleteKeyword = 90, 240 DoKeyword = 91, 241 ElseKeyword = 92, 242 EnumKeyword = 93, 243 ExportKeyword = 94, 244 ExtendsKeyword = 95, 245 FalseKeyword = 96, 246 FinallyKeyword = 97, 247 ForKeyword = 98, 248 FunctionKeyword = 99, 249 IfKeyword = 100, 250 ImportKeyword = 101, 251 InKeyword = 102, 252 InstanceOfKeyword = 103, 253 NewKeyword = 104, 254 NullKeyword = 105, 255 ReturnKeyword = 106, 256 SuperKeyword = 107, 257 SwitchKeyword = 108, 258 ThisKeyword = 109, 259 ThrowKeyword = 110, 260 TrueKeyword = 111, 261 TryKeyword = 112, 262 TypeOfKeyword = 113, 263 VarKeyword = 114, 264 VoidKeyword = 115, 265 WhileKeyword = 116, 266 WithKeyword = 117, 267 ImplementsKeyword = 118, 268 InterfaceKeyword = 119, 269 LetKeyword = 120, 270 PackageKeyword = 121, 271 PrivateKeyword = 122, 272 ProtectedKeyword = 123, 273 PublicKeyword = 124, 274 StaticKeyword = 125, 275 YieldKeyword = 126, 276 AbstractKeyword = 127, 277 AccessorKeyword = 128, 278 AsKeyword = 129, 279 AssertsKeyword = 130, 280 AssertKeyword = 131, 281 AnyKeyword = 132, 282 AsyncKeyword = 133, 283 AwaitKeyword = 134, 284 BooleanKeyword = 135, 285 ConstructorKeyword = 136, 286 DeclareKeyword = 137, 287 GetKeyword = 138, 288 InferKeyword = 139, 289 IntrinsicKeyword = 140, 290 IsKeyword = 141, 291 KeyOfKeyword = 142, 292 ModuleKeyword = 143, 293 NamespaceKeyword = 144, 294 NeverKeyword = 145, 295 OutKeyword = 146, 296 ReadonlyKeyword = 147, 297 RequireKeyword = 148, 298 NumberKeyword = 149, 299 ObjectKeyword = 150, 300 SatisfiesKeyword = 151, 301 SetKeyword = 152, 302 StringKeyword = 153, 303 SymbolKeyword = 154, 304 TypeKeyword = 155, 305 LazyKeyword = 156, 306 UndefinedKeyword = 157, 307 UniqueKeyword = 158, 308 UnknownKeyword = 159, 309 FromKeyword = 160, 310 GlobalKeyword = 161, 311 BigIntKeyword = 162, 312 OverrideKeyword = 163, 313 OfKeyword = 164, 314 QualifiedName = 165, 315 ComputedPropertyName = 166, 316 TypeParameter = 167, 317 Parameter = 168, 318 Decorator = 169, 319 PropertySignature = 170, 320 PropertyDeclaration = 171, 321 AnnotationPropertyDeclaration = 172, 322 MethodSignature = 173, 323 MethodDeclaration = 174, 324 ClassStaticBlockDeclaration = 175, 325 Constructor = 176, 326 GetAccessor = 177, 327 SetAccessor = 178, 328 CallSignature = 179, 329 ConstructSignature = 180, 330 IndexSignature = 181, 331 TypePredicate = 182, 332 TypeReference = 183, 333 FunctionType = 184, 334 ConstructorType = 185, 335 TypeQuery = 186, 336 TypeLiteral = 187, 337 ArrayType = 188, 338 TupleType = 189, 339 OptionalType = 190, 340 RestType = 191, 341 UnionType = 192, 342 IntersectionType = 193, 343 ConditionalType = 194, 344 InferType = 195, 345 ParenthesizedType = 196, 346 ThisType = 197, 347 TypeOperator = 198, 348 IndexedAccessType = 199, 349 MappedType = 200, 350 LiteralType = 201, 351 NamedTupleMember = 202, 352 TemplateLiteralType = 203, 353 TemplateLiteralTypeSpan = 204, 354 ImportType = 205, 355 ObjectBindingPattern = 206, 356 ArrayBindingPattern = 207, 357 BindingElement = 208, 358 ArrayLiteralExpression = 209, 359 ObjectLiteralExpression = 210, 360 PropertyAccessExpression = 211, 361 ElementAccessExpression = 212, 362 CallExpression = 213, 363 NewExpression = 214, 364 TaggedTemplateExpression = 215, 365 TypeAssertionExpression = 216, 366 ParenthesizedExpression = 217, 367 FunctionExpression = 218, 368 ArrowFunction = 219, 369 EtsComponentExpression = 220, 370 DeleteExpression = 221, 371 TypeOfExpression = 222, 372 VoidExpression = 223, 373 AwaitExpression = 224, 374 PrefixUnaryExpression = 225, 375 PostfixUnaryExpression = 226, 376 BinaryExpression = 227, 377 ConditionalExpression = 228, 378 TemplateExpression = 229, 379 YieldExpression = 230, 380 SpreadElement = 231, 381 ClassExpression = 232, 382 OmittedExpression = 233, 383 ExpressionWithTypeArguments = 234, 384 AsExpression = 235, 385 NonNullExpression = 236, 386 MetaProperty = 237, 387 SyntheticExpression = 238, 388 SatisfiesExpression = 239, 389 TemplateSpan = 240, 390 SemicolonClassElement = 241, 391 Block = 242, 392 EmptyStatement = 243, 393 VariableStatement = 244, 394 ExpressionStatement = 245, 395 IfStatement = 246, 396 DoStatement = 247, 397 WhileStatement = 248, 398 ForStatement = 249, 399 ForInStatement = 250, 400 ForOfStatement = 251, 401 ContinueStatement = 252, 402 BreakStatement = 253, 403 ReturnStatement = 254, 404 WithStatement = 255, 405 SwitchStatement = 256, 406 LabeledStatement = 257, 407 ThrowStatement = 258, 408 TryStatement = 259, 409 DebuggerStatement = 260, 410 VariableDeclaration = 261, 411 VariableDeclarationList = 262, 412 FunctionDeclaration = 263, 413 ClassDeclaration = 264, 414 StructDeclaration = 265, 415 AnnotationDeclaration = 266, 416 InterfaceDeclaration = 267, 417 TypeAliasDeclaration = 268, 418 EnumDeclaration = 269, 419 ModuleDeclaration = 270, 420 ModuleBlock = 271, 421 CaseBlock = 272, 422 NamespaceExportDeclaration = 273, 423 ImportEqualsDeclaration = 274, 424 ImportDeclaration = 275, 425 ImportClause = 276, 426 NamespaceImport = 277, 427 NamedImports = 278, 428 ImportSpecifier = 279, 429 ExportAssignment = 280, 430 ExportDeclaration = 281, 431 NamedExports = 282, 432 NamespaceExport = 283, 433 ExportSpecifier = 284, 434 MissingDeclaration = 285, 435 ExternalModuleReference = 286, 436 JsxElement = 287, 437 JsxSelfClosingElement = 288, 438 JsxOpeningElement = 289, 439 JsxClosingElement = 290, 440 JsxFragment = 291, 441 JsxOpeningFragment = 292, 442 JsxClosingFragment = 293, 443 JsxAttribute = 294, 444 JsxAttributes = 295, 445 JsxSpreadAttribute = 296, 446 JsxExpression = 297, 447 CaseClause = 298, 448 DefaultClause = 299, 449 HeritageClause = 300, 450 CatchClause = 301, 451 AssertClause = 302, 452 AssertEntry = 303, 453 ImportTypeAssertionContainer = 304, 454 PropertyAssignment = 305, 455 ShorthandPropertyAssignment = 306, 456 SpreadAssignment = 307, 457 EnumMember = 308, 458 UnparsedPrologue = 309, 459 UnparsedPrepend = 310, 460 UnparsedText = 311, 461 UnparsedInternalText = 312, 462 UnparsedSyntheticReference = 313, 463 SourceFile = 314, 464 Bundle = 315, 465 UnparsedSource = 316, 466 InputFiles = 317, 467 JSDocTypeExpression = 318, 468 JSDocNameReference = 319, 469 JSDocMemberName = 320, 470 JSDocAllType = 321, 471 JSDocUnknownType = 322, 472 JSDocNullableType = 323, 473 JSDocNonNullableType = 324, 474 JSDocOptionalType = 325, 475 JSDocFunctionType = 326, 476 JSDocVariadicType = 327, 477 JSDocNamepathType = 328, 478 JSDoc = 329, 479 /** @deprecated Use SyntaxKind.JSDoc */ 480 JSDocComment = 329, 481 JSDocText = 330, 482 JSDocTypeLiteral = 331, 483 JSDocSignature = 332, 484 JSDocLink = 333, 485 JSDocLinkCode = 334, 486 JSDocLinkPlain = 335, 487 JSDocTag = 336, 488 JSDocAugmentsTag = 337, 489 JSDocImplementsTag = 338, 490 JSDocAuthorTag = 339, 491 JSDocDeprecatedTag = 340, 492 JSDocClassTag = 341, 493 JSDocPublicTag = 342, 494 JSDocPrivateTag = 343, 495 JSDocProtectedTag = 344, 496 JSDocReadonlyTag = 345, 497 JSDocOverrideTag = 346, 498 JSDocCallbackTag = 347, 499 JSDocEnumTag = 348, 500 JSDocParameterTag = 349, 501 JSDocReturnTag = 350, 502 JSDocThisTag = 351, 503 JSDocTypeTag = 352, 504 JSDocTemplateTag = 353, 505 JSDocTypedefTag = 354, 506 JSDocSeeTag = 355, 507 JSDocPropertyTag = 356, 508 SyntaxList = 357, 509 NotEmittedStatement = 358, 510 PartiallyEmittedExpression = 359, 511 CommaListExpression = 360, 512 MergeDeclarationMarker = 361, 513 EndOfDeclarationMarker = 362, 514 SyntheticReferenceExpression = 363, 515 Count = 364, 516 FirstAssignment = 63, 517 LastAssignment = 78, 518 FirstCompoundAssignment = 64, 519 LastCompoundAssignment = 78, 520 FirstReservedWord = 81, 521 LastReservedWord = 117, 522 FirstKeyword = 81, 523 LastKeyword = 164, 524 FirstFutureReservedWord = 118, 525 LastFutureReservedWord = 126, 526 FirstTypeNode = 182, 527 LastTypeNode = 205, 528 FirstPunctuation = 18, 529 LastPunctuation = 78, 530 FirstToken = 0, 531 LastToken = 164, 532 FirstTriviaToken = 2, 533 LastTriviaToken = 7, 534 FirstLiteralToken = 8, 535 LastLiteralToken = 14, 536 FirstTemplateToken = 14, 537 LastTemplateToken = 17, 538 FirstBinaryOperator = 29, 539 LastBinaryOperator = 78, 540 FirstStatement = 244, 541 LastStatement = 260, 542 FirstNode = 165, 543 FirstJSDocNode = 318, 544 LastJSDocNode = 356, 545 FirstJSDocTagNode = 336, 546 LastJSDocTagNode = 356 547 } 548 type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia; 549 type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; 550 type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail; 551 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; 552 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; 553 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; 554 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; 555 type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind; 556 type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken; 557 type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.Unknown | KeywordSyntaxKind; 558 enum NodeFlags { 559 None = 0, 560 Let = 1, 561 Const = 2, 562 NestedNamespace = 4, 563 Synthesized = 8, 564 Namespace = 16, 565 OptionalChain = 32, 566 ExportContext = 64, 567 ContainsThis = 128, 568 HasImplicitReturn = 256, 569 HasExplicitReturn = 512, 570 GlobalAugmentation = 1024, 571 HasAsyncFunctions = 2048, 572 DisallowInContext = 4096, 573 YieldContext = 8192, 574 DecoratorContext = 16384, 575 AwaitContext = 32768, 576 DisallowConditionalTypesContext = 65536, 577 ThisNodeHasError = 131072, 578 JavaScriptFile = 262144, 579 ThisNodeOrAnySubNodesHasError = 524288, 580 HasAggregatedChildData = 1048576, 581 JSDoc = 8388608, 582 JsonFile = 67108864, 583 EtsContext = 1073741824, 584 BlockScoped = 3, 585 ReachabilityCheckFlags = 768, 586 ReachabilityAndEmitFlags = 2816, 587 ContextFlags = 1124462592, 588 TypeExcludesFlags = 40960 589 } 590 enum EtsFlags { 591 None = 0, 592 StructContext = 2, 593 EtsExtendComponentsContext = 4, 594 EtsStylesComponentsContext = 8, 595 EtsBuildContext = 16, 596 EtsBuilderContext = 32, 597 EtsStateStylesContext = 64, 598 EtsComponentsContext = 128, 599 EtsNewExpressionContext = 256, 600 UICallbackContext = 512, 601 SyntaxComponentContext = 1024, 602 SyntaxDataSourceContext = 2048, 603 NoEtsComponentContext = 4096 604 } 605 enum ModifierFlags { 606 None = 0, 607 Export = 1, 608 Ambient = 2, 609 Public = 4, 610 Private = 8, 611 Protected = 16, 612 Static = 32, 613 Readonly = 64, 614 Accessor = 128, 615 Abstract = 256, 616 Async = 512, 617 Default = 1024, 618 Const = 2048, 619 HasComputedJSDocModifiers = 4096, 620 Deprecated = 8192, 621 Override = 16384, 622 In = 32768, 623 Out = 65536, 624 Decorator = 131072, 625 HasComputedFlags = 536870912, 626 AccessibilityModifier = 28, 627 ParameterPropertyModifier = 16476, 628 NonPublicAccessibilityModifier = 24, 629 TypeScriptModifier = 117086, 630 ExportDefault = 1025, 631 All = 258047, 632 Modifier = 126975 633 } 634 enum JsxFlags { 635 None = 0, 636 /** An element from a named property of the JSX.IntrinsicElements interface */ 637 IntrinsicNamedElement = 1, 638 /** An element inferred from the string index signature of the JSX.IntrinsicElements interface */ 639 IntrinsicIndexedElement = 2, 640 IntrinsicElement = 3 641 } 642 interface Node extends ReadonlyTextRange { 643 readonly kind: SyntaxKind; 644 readonly flags: NodeFlags; 645 readonly parent: Node; 646 symbol: Symbol; 647 locals?: SymbolTable; 648 skipCheck?: boolean; 649 } 650 interface Node { 651 getSourceFile(): SourceFile; 652 getChildCount(sourceFile?: SourceFile): number; 653 getChildAt(index: number, sourceFile?: SourceFile): Node; 654 getChildren(sourceFile?: SourceFile): Node[]; 655 getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number; 656 getFullStart(): number; 657 getEnd(): number; 658 getWidth(sourceFile?: SourceFileLike): number; 659 getFullWidth(): number; 660 getLeadingTriviaWidth(sourceFile?: SourceFile): number; 661 getFullText(sourceFile?: SourceFile): string; 662 getText(sourceFile?: SourceFile): string; 663 getFirstToken(sourceFile?: SourceFile): Node | undefined; 664 getLastToken(sourceFile?: SourceFile): Node | undefined; 665 forEachChild<T>(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined; 666 } 667 interface Node { 668 /** 669 * @deprecated `decorators` has been removed from `Node` and merged with `modifiers` on the `Node` subtypes that support them. 670 * Use `ts.canHaveDecorators()` to test whether a `Node` can have decorators. 671 * Use `ts.getDecorators()` to get the decorators of a `Node`. 672 * 673 * For example: 674 * ```ts 675 * const decorators = ts.canHaveDecorators(node) ? ts.getDecorators(node) : undefined; 676 * ``` 677 */ 678 readonly decorators?: undefined; 679 /** 680 * @deprecated `modifiers` has been removed from `Node` and moved to the `Node` subtypes that support them. 681 * Use `ts.canHaveModifiers()` to test whether a `Node` can have modifiers. 682 * Use `ts.getModifiers()` to get the modifiers of a `Node`. 683 * 684 * For example: 685 * ```ts 686 * const modifiers = ts.canHaveModifiers(node) ? ts.getModifiers(node) : undefined; 687 * ``` 688 */ 689 readonly modifiers?: NodeArray<ModifierLike> | undefined; 690 } 691 interface JSDocContainer { 692 } 693 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; 694 type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | AnnotationPropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType; 695 type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement; 696 type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute; 697 type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | AnnotationPropertyDeclaration | PropertyAssignment | EnumMember; 698 type HasDecorators = ParameterDeclaration | PropertyDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ClassExpression | ClassDeclaration | StructDeclaration | FunctionDeclaration; 699 type HasIllegalDecorators = PropertyAssignment | ShorthandPropertyAssignment | FunctionDeclaration | ConstructorDeclaration | IndexSignatureDeclaration | ClassStaticBlockDeclaration | MissingDeclaration | VariableStatement | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportDeclaration | ExportAssignment; 700 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; 701 interface NodeArray<T extends Node> extends ReadonlyArray<T>, ReadonlyTextRange { 702 readonly hasTrailingComma: boolean; 703 } 704 interface Token<TKind extends SyntaxKind> extends Node { 705 readonly kind: TKind; 706 } 707 type EndOfFileToken = Token<SyntaxKind.EndOfFileToken> & JSDocContainer; 708 interface PunctuationToken<TKind extends PunctuationSyntaxKind> extends Token<TKind> { 709 } 710 type DotToken = PunctuationToken<SyntaxKind.DotToken>; 711 type DotDotDotToken = PunctuationToken<SyntaxKind.DotDotDotToken>; 712 type QuestionToken = PunctuationToken<SyntaxKind.QuestionToken>; 713 type ExclamationToken = PunctuationToken<SyntaxKind.ExclamationToken>; 714 type ColonToken = PunctuationToken<SyntaxKind.ColonToken>; 715 type EqualsToken = PunctuationToken<SyntaxKind.EqualsToken>; 716 type AsteriskToken = PunctuationToken<SyntaxKind.AsteriskToken>; 717 type EqualsGreaterThanToken = PunctuationToken<SyntaxKind.EqualsGreaterThanToken>; 718 type PlusToken = PunctuationToken<SyntaxKind.PlusToken>; 719 type MinusToken = PunctuationToken<SyntaxKind.MinusToken>; 720 type QuestionDotToken = PunctuationToken<SyntaxKind.QuestionDotToken>; 721 interface KeywordToken<TKind extends KeywordSyntaxKind> extends Token<TKind> { 722 } 723 type AssertsKeyword = KeywordToken<SyntaxKind.AssertsKeyword>; 724 type AssertKeyword = KeywordToken<SyntaxKind.AssertKeyword>; 725 type AwaitKeyword = KeywordToken<SyntaxKind.AwaitKeyword>; 726 /** @deprecated Use `AwaitKeyword` instead. */ 727 type AwaitKeywordToken = AwaitKeyword; 728 /** @deprecated Use `AssertsKeyword` instead. */ 729 type AssertsToken = AssertsKeyword; 730 interface ModifierToken<TKind extends ModifierSyntaxKind> extends KeywordToken<TKind> { 731 } 732 type AbstractKeyword = ModifierToken<SyntaxKind.AbstractKeyword>; 733 type AccessorKeyword = ModifierToken<SyntaxKind.AccessorKeyword>; 734 type AsyncKeyword = ModifierToken<SyntaxKind.AsyncKeyword>; 735 type ConstKeyword = ModifierToken<SyntaxKind.ConstKeyword>; 736 type DeclareKeyword = ModifierToken<SyntaxKind.DeclareKeyword>; 737 type DefaultKeyword = ModifierToken<SyntaxKind.DefaultKeyword>; 738 type ExportKeyword = ModifierToken<SyntaxKind.ExportKeyword>; 739 type InKeyword = ModifierToken<SyntaxKind.InKeyword>; 740 type PrivateKeyword = ModifierToken<SyntaxKind.PrivateKeyword>; 741 type ProtectedKeyword = ModifierToken<SyntaxKind.ProtectedKeyword>; 742 type PublicKeyword = ModifierToken<SyntaxKind.PublicKeyword>; 743 type ReadonlyKeyword = ModifierToken<SyntaxKind.ReadonlyKeyword>; 744 type OutKeyword = ModifierToken<SyntaxKind.OutKeyword>; 745 type OverrideKeyword = ModifierToken<SyntaxKind.OverrideKeyword>; 746 type StaticKeyword = ModifierToken<SyntaxKind.StaticKeyword>; 747 /** @deprecated Use `ReadonlyKeyword` instead. */ 748 type ReadonlyToken = ReadonlyKeyword; 749 type Modifier = AbstractKeyword | AccessorKeyword | AsyncKeyword | ConstKeyword | DeclareKeyword | DefaultKeyword | ExportKeyword | InKeyword | PrivateKeyword | ProtectedKeyword | PublicKeyword | OutKeyword | OverrideKeyword | ReadonlyKeyword | StaticKeyword; 750 type ModifierLike = Modifier | Decorator; 751 type AccessibilityModifier = PublicKeyword | PrivateKeyword | ProtectedKeyword; 752 type ParameterPropertyModifier = AccessibilityModifier | ReadonlyKeyword; 753 type ClassMemberModifier = AccessibilityModifier | ReadonlyKeyword | StaticKeyword | AccessorKeyword; 754 type ModifiersArray = NodeArray<Modifier>; 755 enum GeneratedIdentifierFlags { 756 None = 0, 757 ReservedInNestedScopes = 8, 758 Optimistic = 16, 759 FileLevel = 32, 760 AllowNameSubstitution = 64 761 } 762 interface Identifier extends PrimaryExpression, Declaration { 763 readonly kind: SyntaxKind.Identifier; 764 /** 765 * Prefer to use `id.unescapedText`. (Note: This is available only in services, not internally to the TypeScript compiler.) 766 * Text of identifier, but if the identifier begins with two underscores, this will begin with three. 767 */ 768 readonly escapedText: __String; 769 readonly originalKeywordKind?: SyntaxKind; 770 isInJSDocNamespace?: boolean; 771 } 772 interface Identifier { 773 readonly text: string; 774 } 775 interface TransientIdentifier extends Identifier { 776 resolvedSymbol: Symbol; 777 } 778 interface QualifiedName extends Node { 779 readonly kind: SyntaxKind.QualifiedName; 780 readonly left: EntityName; 781 readonly right: Identifier; 782 } 783 type EntityName = Identifier | QualifiedName; 784 type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier; 785 type MemberName = Identifier | PrivateIdentifier; 786 type DeclarationName = Identifier | PrivateIdentifier | StringLiteralLike | NumericLiteral | ComputedPropertyName | ElementAccessExpression | BindingPattern | EntityNameExpression; 787 interface Declaration extends Node { 788 _declarationBrand: any; 789 } 790 interface NamedDeclaration extends Declaration { 791 readonly name?: DeclarationName; 792 } 793 interface DeclarationStatement extends NamedDeclaration, Statement { 794 readonly name?: Identifier | StringLiteral | NumericLiteral; 795 } 796 interface ComputedPropertyName extends Node { 797 readonly kind: SyntaxKind.ComputedPropertyName; 798 readonly parent: Declaration; 799 readonly expression: Expression; 800 } 801 interface PrivateIdentifier extends PrimaryExpression { 802 readonly kind: SyntaxKind.PrivateIdentifier; 803 readonly escapedText: __String; 804 } 805 interface PrivateIdentifier { 806 readonly text: string; 807 } 808 interface Decorator extends Node { 809 readonly kind: SyntaxKind.Decorator; 810 readonly parent: NamedDeclaration; 811 readonly expression: LeftHandSideExpression; 812 /** Refers to a annotation declaration (or undefined when decorator isn't annotation) */ 813 readonly annotationDeclaration?: AnnotationDeclaration; 814 } 815 type Annotation = Decorator; 816 interface TypeParameterDeclaration extends NamedDeclaration { 817 readonly kind: SyntaxKind.TypeParameter; 818 readonly parent: DeclarationWithTypeParameterChildren | InferTypeNode; 819 readonly modifiers?: NodeArray<Modifier>; 820 readonly name: Identifier; 821 /** Note: Consider calling `getEffectiveConstraintOfTypeParameter` */ 822 readonly constraint?: TypeNode; 823 readonly default?: TypeNode; 824 expression?: Expression; 825 } 826 interface SignatureDeclarationBase extends NamedDeclaration, JSDocContainer { 827 readonly kind: SignatureDeclaration["kind"]; 828 readonly name?: PropertyName; 829 readonly typeParameters?: NodeArray<TypeParameterDeclaration> | undefined; 830 readonly parameters: NodeArray<ParameterDeclaration>; 831 readonly type?: TypeNode | undefined; 832 } 833 type SignatureDeclaration = CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction; 834 interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement { 835 readonly kind: SyntaxKind.CallSignature; 836 } 837 interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement { 838 readonly kind: SyntaxKind.ConstructSignature; 839 } 840 type BindingName = Identifier | BindingPattern; 841 interface VariableDeclaration extends NamedDeclaration, JSDocContainer { 842 readonly kind: SyntaxKind.VariableDeclaration; 843 readonly parent: VariableDeclarationList | CatchClause; 844 readonly name: BindingName; 845 readonly exclamationToken?: ExclamationToken; 846 readonly type?: TypeNode; 847 readonly initializer?: Expression; 848 } 849 interface VariableDeclarationList extends Node { 850 readonly kind: SyntaxKind.VariableDeclarationList; 851 readonly parent: VariableStatement | ForStatement | ForOfStatement | ForInStatement; 852 readonly declarations: NodeArray<VariableDeclaration>; 853 } 854 interface ParameterDeclaration extends NamedDeclaration, JSDocContainer { 855 readonly kind: SyntaxKind.Parameter; 856 readonly parent: SignatureDeclaration; 857 readonly modifiers?: NodeArray<ModifierLike>; 858 readonly dotDotDotToken?: DotDotDotToken; 859 readonly name: BindingName; 860 readonly questionToken?: QuestionToken; 861 readonly type?: TypeNode; 862 readonly initializer?: Expression; 863 } 864 interface BindingElement extends NamedDeclaration { 865 readonly kind: SyntaxKind.BindingElement; 866 readonly parent: BindingPattern; 867 readonly propertyName?: PropertyName; 868 readonly dotDotDotToken?: DotDotDotToken; 869 readonly name: BindingName; 870 readonly initializer?: Expression; 871 } 872 interface PropertySignature extends TypeElement, JSDocContainer { 873 readonly kind: SyntaxKind.PropertySignature; 874 readonly modifiers?: NodeArray<Modifier>; 875 readonly name: PropertyName; 876 readonly questionToken?: QuestionToken; 877 readonly type?: TypeNode; 878 } 879 interface PropertySignature { 880 /** @deprecated A property signature cannot have an initializer */ 881 readonly initializer?: Expression | undefined; 882 } 883 interface PropertyDeclaration extends ClassElement, JSDocContainer { 884 readonly kind: SyntaxKind.PropertyDeclaration; 885 readonly parent: ClassLikeDeclaration; 886 readonly modifiers?: NodeArray<ModifierLike>; 887 readonly name: PropertyName; 888 readonly questionToken?: QuestionToken; 889 readonly exclamationToken?: ExclamationToken; 890 readonly type?: TypeNode; 891 readonly initializer?: Expression; 892 } 893 interface AnnotationPropertyDeclaration extends AnnotationElement, JSDocContainer { 894 readonly kind: SyntaxKind.AnnotationPropertyDeclaration; 895 readonly parent: AnnotationDeclaration; 896 readonly name: PropertyName; 897 readonly type?: TypeNode; 898 readonly initializer?: Expression; 899 } 900 interface AutoAccessorPropertyDeclaration extends PropertyDeclaration { 901 _autoAccessorBrand: any; 902 } 903 interface ObjectLiteralElement extends NamedDeclaration { 904 _objectLiteralBrand: any; 905 readonly name?: PropertyName; 906 } 907 /** Unlike ObjectLiteralElement, excludes JSXAttribute and JSXSpreadAttribute. */ 908 type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration; 909 interface PropertyAssignment extends ObjectLiteralElement, JSDocContainer { 910 readonly kind: SyntaxKind.PropertyAssignment; 911 readonly parent: ObjectLiteralExpression; 912 readonly name: PropertyName; 913 readonly initializer: Expression; 914 } 915 interface PropertyAssignment { 916 /** @deprecated A property assignment cannot have a question token */ 917 readonly questionToken?: QuestionToken | undefined; 918 /** @deprecated A property assignment cannot have an exclamation token */ 919 readonly exclamationToken?: ExclamationToken | undefined; 920 } 921 interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer { 922 readonly kind: SyntaxKind.ShorthandPropertyAssignment; 923 readonly parent: ObjectLiteralExpression; 924 readonly name: Identifier; 925 readonly equalsToken?: EqualsToken; 926 readonly objectAssignmentInitializer?: Expression; 927 } 928 interface ShorthandPropertyAssignment { 929 /** @deprecated A shorthand property assignment cannot have modifiers */ 930 readonly modifiers?: NodeArray<Modifier> | undefined; 931 /** @deprecated A shorthand property assignment cannot have a question token */ 932 readonly questionToken?: QuestionToken | undefined; 933 /** @deprecated A shorthand property assignment cannot have an exclamation token */ 934 readonly exclamationToken?: ExclamationToken | undefined; 935 } 936 interface SpreadAssignment extends ObjectLiteralElement, JSDocContainer { 937 readonly kind: SyntaxKind.SpreadAssignment; 938 readonly parent: ObjectLiteralExpression; 939 readonly expression: Expression; 940 } 941 type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | AnnotationPropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag; 942 interface PropertyLikeDeclaration extends NamedDeclaration { 943 readonly name: PropertyName; 944 } 945 interface ObjectBindingPattern extends Node { 946 readonly kind: SyntaxKind.ObjectBindingPattern; 947 readonly parent: VariableDeclaration | ParameterDeclaration | BindingElement; 948 readonly elements: NodeArray<BindingElement>; 949 } 950 interface ArrayBindingPattern extends Node { 951 readonly kind: SyntaxKind.ArrayBindingPattern; 952 readonly parent: VariableDeclaration | ParameterDeclaration | BindingElement; 953 readonly elements: NodeArray<ArrayBindingElement>; 954 } 955 type BindingPattern = ObjectBindingPattern | ArrayBindingPattern; 956 type ArrayBindingElement = BindingElement | OmittedExpression; 957 /** 958 * Several node kinds share function-like features such as a signature, 959 * a name, and a body. These nodes should extend FunctionLikeDeclarationBase. 960 * Examples: 961 * - FunctionDeclaration 962 * - MethodDeclaration 963 * - AccessorDeclaration 964 */ 965 interface FunctionLikeDeclarationBase extends SignatureDeclarationBase { 966 _functionLikeDeclarationBrand: any; 967 readonly asteriskToken?: AsteriskToken | undefined; 968 readonly questionToken?: QuestionToken | undefined; 969 readonly exclamationToken?: ExclamationToken | undefined; 970 readonly body?: Block | Expression | undefined; 971 } 972 type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction; 973 /** @deprecated Use SignatureDeclaration */ 974 type FunctionLike = SignatureDeclaration; 975 interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement { 976 readonly kind: SyntaxKind.FunctionDeclaration; 977 readonly modifiers?: NodeArray<Modifier>; 978 readonly name?: Identifier; 979 readonly body?: FunctionBody; 980 } 981 interface MethodSignature extends SignatureDeclarationBase, TypeElement { 982 readonly kind: SyntaxKind.MethodSignature; 983 readonly parent: ObjectTypeDeclaration; 984 readonly modifiers?: NodeArray<Modifier>; 985 readonly name: PropertyName; 986 } 987 interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer { 988 readonly kind: SyntaxKind.MethodDeclaration; 989 readonly parent: ClassLikeDeclaration | ObjectLiteralExpression; 990 readonly modifiers?: NodeArray<ModifierLike> | undefined; 991 readonly name: PropertyName; 992 readonly body?: FunctionBody | undefined; 993 } 994 interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer { 995 readonly kind: SyntaxKind.Constructor; 996 readonly parent: ClassLikeDeclaration; 997 readonly modifiers?: NodeArray<Modifier> | undefined; 998 readonly body?: FunctionBody | undefined; 999 } 1000 /** For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. */ 1001 interface SemicolonClassElement extends ClassElement { 1002 readonly kind: SyntaxKind.SemicolonClassElement; 1003 readonly parent: ClassLikeDeclaration; 1004 } 1005 interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer { 1006 readonly kind: SyntaxKind.GetAccessor; 1007 readonly parent: ClassLikeDeclaration | ObjectLiteralExpression | TypeLiteralNode | InterfaceDeclaration; 1008 readonly modifiers?: NodeArray<ModifierLike>; 1009 readonly name: PropertyName; 1010 readonly body?: FunctionBody; 1011 } 1012 interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer { 1013 readonly kind: SyntaxKind.SetAccessor; 1014 readonly parent: ClassLikeDeclaration | ObjectLiteralExpression | TypeLiteralNode | InterfaceDeclaration; 1015 readonly modifiers?: NodeArray<ModifierLike>; 1016 readonly name: PropertyName; 1017 readonly body?: FunctionBody; 1018 } 1019 type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration; 1020 interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement { 1021 readonly kind: SyntaxKind.IndexSignature; 1022 readonly parent: ObjectTypeDeclaration; 1023 readonly modifiers?: NodeArray<Modifier>; 1024 readonly type: TypeNode; 1025 } 1026 interface ClassStaticBlockDeclaration extends ClassElement, JSDocContainer { 1027 readonly kind: SyntaxKind.ClassStaticBlockDeclaration; 1028 readonly parent: ClassDeclaration | ClassExpression; 1029 readonly body: Block; 1030 } 1031 interface TypeNode extends Node { 1032 _typeNodeBrand: any; 1033 } 1034 interface KeywordTypeNode<TKind extends KeywordTypeSyntaxKind = KeywordTypeSyntaxKind> extends KeywordToken<TKind>, TypeNode { 1035 readonly kind: TKind; 1036 } 1037 interface ImportTypeAssertionContainer extends Node { 1038 readonly kind: SyntaxKind.ImportTypeAssertionContainer; 1039 readonly parent: ImportTypeNode; 1040 readonly assertClause: AssertClause; 1041 readonly multiLine?: boolean; 1042 } 1043 interface ImportTypeNode extends NodeWithTypeArguments { 1044 readonly kind: SyntaxKind.ImportType; 1045 readonly isTypeOf: boolean; 1046 readonly argument: TypeNode; 1047 readonly assertions?: ImportTypeAssertionContainer; 1048 readonly qualifier?: EntityName; 1049 } 1050 interface ThisTypeNode extends TypeNode { 1051 readonly kind: SyntaxKind.ThisType; 1052 } 1053 type FunctionOrConstructorTypeNode = FunctionTypeNode | ConstructorTypeNode; 1054 interface FunctionOrConstructorTypeNodeBase extends TypeNode, SignatureDeclarationBase { 1055 readonly kind: SyntaxKind.FunctionType | SyntaxKind.ConstructorType; 1056 readonly type: TypeNode; 1057 } 1058 interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase { 1059 readonly kind: SyntaxKind.FunctionType; 1060 } 1061 interface FunctionTypeNode { 1062 /** @deprecated A function type cannot have modifiers */ 1063 readonly modifiers?: NodeArray<Modifier> | undefined; 1064 } 1065 interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase { 1066 readonly kind: SyntaxKind.ConstructorType; 1067 readonly modifiers?: NodeArray<Modifier>; 1068 } 1069 interface NodeWithTypeArguments extends TypeNode { 1070 readonly typeArguments?: NodeArray<TypeNode>; 1071 } 1072 type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments; 1073 interface TypeReferenceNode extends NodeWithTypeArguments { 1074 readonly kind: SyntaxKind.TypeReference; 1075 readonly typeName: EntityName; 1076 } 1077 interface TypePredicateNode extends TypeNode { 1078 readonly kind: SyntaxKind.TypePredicate; 1079 readonly parent: SignatureDeclaration | JSDocTypeExpression; 1080 readonly assertsModifier?: AssertsKeyword; 1081 readonly parameterName: Identifier | ThisTypeNode; 1082 readonly type?: TypeNode; 1083 } 1084 interface TypeQueryNode extends NodeWithTypeArguments { 1085 readonly kind: SyntaxKind.TypeQuery; 1086 readonly exprName: EntityName; 1087 } 1088 interface TypeLiteralNode extends TypeNode, Declaration { 1089 readonly kind: SyntaxKind.TypeLiteral; 1090 readonly members: NodeArray<TypeElement>; 1091 } 1092 interface ArrayTypeNode extends TypeNode { 1093 readonly kind: SyntaxKind.ArrayType; 1094 readonly elementType: TypeNode; 1095 } 1096 interface TupleTypeNode extends TypeNode { 1097 readonly kind: SyntaxKind.TupleType; 1098 readonly elements: NodeArray<TypeNode | NamedTupleMember>; 1099 } 1100 interface NamedTupleMember extends TypeNode, JSDocContainer, Declaration { 1101 readonly kind: SyntaxKind.NamedTupleMember; 1102 readonly dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>; 1103 readonly name: Identifier; 1104 readonly questionToken?: Token<SyntaxKind.QuestionToken>; 1105 readonly type: TypeNode; 1106 } 1107 interface OptionalTypeNode extends TypeNode { 1108 readonly kind: SyntaxKind.OptionalType; 1109 readonly type: TypeNode; 1110 } 1111 interface RestTypeNode extends TypeNode { 1112 readonly kind: SyntaxKind.RestType; 1113 readonly type: TypeNode; 1114 } 1115 type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode; 1116 interface UnionTypeNode extends TypeNode { 1117 readonly kind: SyntaxKind.UnionType; 1118 readonly types: NodeArray<TypeNode>; 1119 } 1120 interface IntersectionTypeNode extends TypeNode { 1121 readonly kind: SyntaxKind.IntersectionType; 1122 readonly types: NodeArray<TypeNode>; 1123 } 1124 interface ConditionalTypeNode extends TypeNode { 1125 readonly kind: SyntaxKind.ConditionalType; 1126 readonly checkType: TypeNode; 1127 readonly extendsType: TypeNode; 1128 readonly trueType: TypeNode; 1129 readonly falseType: TypeNode; 1130 } 1131 interface InferTypeNode extends TypeNode { 1132 readonly kind: SyntaxKind.InferType; 1133 readonly typeParameter: TypeParameterDeclaration; 1134 } 1135 interface ParenthesizedTypeNode extends TypeNode { 1136 readonly kind: SyntaxKind.ParenthesizedType; 1137 readonly type: TypeNode; 1138 } 1139 interface TypeOperatorNode extends TypeNode { 1140 readonly kind: SyntaxKind.TypeOperator; 1141 readonly operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword; 1142 readonly type: TypeNode; 1143 } 1144 interface IndexedAccessTypeNode extends TypeNode { 1145 readonly kind: SyntaxKind.IndexedAccessType; 1146 readonly objectType: TypeNode; 1147 readonly indexType: TypeNode; 1148 } 1149 interface MappedTypeNode extends TypeNode, Declaration { 1150 readonly kind: SyntaxKind.MappedType; 1151 readonly readonlyToken?: ReadonlyKeyword | PlusToken | MinusToken; 1152 readonly typeParameter: TypeParameterDeclaration; 1153 readonly nameType?: TypeNode; 1154 readonly questionToken?: QuestionToken | PlusToken | MinusToken; 1155 readonly type?: TypeNode; 1156 /** Used only to produce grammar errors */ 1157 readonly members?: NodeArray<TypeElement>; 1158 } 1159 interface LiteralTypeNode extends TypeNode { 1160 readonly kind: SyntaxKind.LiteralType; 1161 readonly literal: NullLiteral | BooleanLiteral | LiteralExpression | PrefixUnaryExpression; 1162 } 1163 interface StringLiteral extends LiteralExpression, Declaration { 1164 readonly kind: SyntaxKind.StringLiteral; 1165 } 1166 type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral; 1167 type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral; 1168 interface TemplateLiteralTypeNode extends TypeNode { 1169 kind: SyntaxKind.TemplateLiteralType; 1170 readonly head: TemplateHead; 1171 readonly templateSpans: NodeArray<TemplateLiteralTypeSpan>; 1172 } 1173 interface TemplateLiteralTypeSpan extends TypeNode { 1174 readonly kind: SyntaxKind.TemplateLiteralTypeSpan; 1175 readonly parent: TemplateLiteralTypeNode; 1176 readonly type: TypeNode; 1177 readonly literal: TemplateMiddle | TemplateTail; 1178 } 1179 interface Expression extends Node { 1180 _expressionBrand: any; 1181 } 1182 interface OmittedExpression extends Expression { 1183 readonly kind: SyntaxKind.OmittedExpression; 1184 } 1185 interface PartiallyEmittedExpression extends LeftHandSideExpression { 1186 readonly kind: SyntaxKind.PartiallyEmittedExpression; 1187 readonly expression: Expression; 1188 } 1189 interface UnaryExpression extends Expression { 1190 _unaryExpressionBrand: any; 1191 } 1192 /** Deprecated, please use UpdateExpression */ 1193 type IncrementExpression = UpdateExpression; 1194 interface UpdateExpression extends UnaryExpression { 1195 _updateExpressionBrand: any; 1196 } 1197 type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken; 1198 interface PrefixUnaryExpression extends UpdateExpression { 1199 readonly kind: SyntaxKind.PrefixUnaryExpression; 1200 readonly operator: PrefixUnaryOperator; 1201 readonly operand: UnaryExpression; 1202 } 1203 type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken; 1204 interface PostfixUnaryExpression extends UpdateExpression { 1205 readonly kind: SyntaxKind.PostfixUnaryExpression; 1206 readonly operand: LeftHandSideExpression; 1207 readonly operator: PostfixUnaryOperator; 1208 } 1209 interface LeftHandSideExpression extends UpdateExpression { 1210 _leftHandSideExpressionBrand: any; 1211 } 1212 interface MemberExpression extends LeftHandSideExpression { 1213 _memberExpressionBrand: any; 1214 } 1215 interface PrimaryExpression extends MemberExpression { 1216 _primaryExpressionBrand: any; 1217 } 1218 interface NullLiteral extends PrimaryExpression { 1219 readonly kind: SyntaxKind.NullKeyword; 1220 } 1221 interface TrueLiteral extends PrimaryExpression { 1222 readonly kind: SyntaxKind.TrueKeyword; 1223 } 1224 interface FalseLiteral extends PrimaryExpression { 1225 readonly kind: SyntaxKind.FalseKeyword; 1226 } 1227 type BooleanLiteral = TrueLiteral | FalseLiteral; 1228 interface ThisExpression extends PrimaryExpression { 1229 readonly kind: SyntaxKind.ThisKeyword; 1230 } 1231 interface SuperExpression extends PrimaryExpression { 1232 readonly kind: SyntaxKind.SuperKeyword; 1233 } 1234 interface ImportExpression extends PrimaryExpression { 1235 readonly kind: SyntaxKind.ImportKeyword; 1236 } 1237 interface DeleteExpression extends UnaryExpression { 1238 readonly kind: SyntaxKind.DeleteExpression; 1239 readonly expression: UnaryExpression; 1240 } 1241 interface TypeOfExpression extends UnaryExpression { 1242 readonly kind: SyntaxKind.TypeOfExpression; 1243 readonly expression: UnaryExpression; 1244 } 1245 interface VoidExpression extends UnaryExpression { 1246 readonly kind: SyntaxKind.VoidExpression; 1247 readonly expression: UnaryExpression; 1248 } 1249 interface AwaitExpression extends UnaryExpression { 1250 readonly kind: SyntaxKind.AwaitExpression; 1251 readonly expression: UnaryExpression; 1252 } 1253 interface YieldExpression extends Expression { 1254 readonly kind: SyntaxKind.YieldExpression; 1255 readonly asteriskToken?: AsteriskToken; 1256 readonly expression?: Expression; 1257 } 1258 interface SyntheticExpression extends Expression { 1259 readonly kind: SyntaxKind.SyntheticExpression; 1260 readonly isSpread: boolean; 1261 readonly type: Type; 1262 readonly tupleNameSource?: ParameterDeclaration | NamedTupleMember; 1263 } 1264 type ExponentiationOperator = SyntaxKind.AsteriskAsteriskToken; 1265 type MultiplicativeOperator = SyntaxKind.AsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken; 1266 type MultiplicativeOperatorOrHigher = ExponentiationOperator | MultiplicativeOperator; 1267 type AdditiveOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken; 1268 type AdditiveOperatorOrHigher = MultiplicativeOperatorOrHigher | AdditiveOperator; 1269 type ShiftOperator = SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken; 1270 type ShiftOperatorOrHigher = AdditiveOperatorOrHigher | ShiftOperator; 1271 type RelationalOperator = SyntaxKind.LessThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.InstanceOfKeyword | SyntaxKind.InKeyword; 1272 type RelationalOperatorOrHigher = ShiftOperatorOrHigher | RelationalOperator; 1273 type EqualityOperator = SyntaxKind.EqualsEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.ExclamationEqualsToken; 1274 type EqualityOperatorOrHigher = RelationalOperatorOrHigher | EqualityOperator; 1275 type BitwiseOperator = SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken; 1276 type BitwiseOperatorOrHigher = EqualityOperatorOrHigher | BitwiseOperator; 1277 type LogicalOperator = SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken; 1278 type LogicalOperatorOrHigher = BitwiseOperatorOrHigher | LogicalOperator; 1279 type CompoundAssignmentOperator = SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken; 1280 type AssignmentOperator = SyntaxKind.EqualsToken | CompoundAssignmentOperator; 1281 type AssignmentOperatorOrHigher = SyntaxKind.QuestionQuestionToken | LogicalOperatorOrHigher | AssignmentOperator; 1282 type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken; 1283 type LogicalOrCoalescingAssignmentOperator = SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionEqualsToken; 1284 type BinaryOperatorToken = Token<BinaryOperator>; 1285 interface BinaryExpression extends Expression, Declaration { 1286 readonly kind: SyntaxKind.BinaryExpression; 1287 readonly left: Expression; 1288 readonly operatorToken: BinaryOperatorToken; 1289 readonly right: Expression; 1290 } 1291 type AssignmentOperatorToken = Token<AssignmentOperator>; 1292 interface AssignmentExpression<TOperator extends AssignmentOperatorToken> extends BinaryExpression { 1293 readonly left: LeftHandSideExpression; 1294 readonly operatorToken: TOperator; 1295 } 1296 interface ObjectDestructuringAssignment extends AssignmentExpression<EqualsToken> { 1297 readonly left: ObjectLiteralExpression; 1298 } 1299 interface ArrayDestructuringAssignment extends AssignmentExpression<EqualsToken> { 1300 readonly left: ArrayLiteralExpression; 1301 } 1302 type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment; 1303 type BindingOrAssignmentElement = VariableDeclaration | ParameterDeclaration | ObjectBindingOrAssignmentElement | ArrayBindingOrAssignmentElement; 1304 type ObjectBindingOrAssignmentElement = BindingElement | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment; 1305 type ArrayBindingOrAssignmentElement = BindingElement | OmittedExpression | SpreadElement | ArrayLiteralExpression | ObjectLiteralExpression | AssignmentExpression<EqualsToken> | Identifier | PropertyAccessExpression | ElementAccessExpression; 1306 type BindingOrAssignmentElementRestIndicator = DotDotDotToken | SpreadElement | SpreadAssignment; 1307 type BindingOrAssignmentElementTarget = BindingOrAssignmentPattern | Identifier | PropertyAccessExpression | ElementAccessExpression | OmittedExpression; 1308 type ObjectBindingOrAssignmentPattern = ObjectBindingPattern | ObjectLiteralExpression; 1309 type ArrayBindingOrAssignmentPattern = ArrayBindingPattern | ArrayLiteralExpression; 1310 type AssignmentPattern = ObjectLiteralExpression | ArrayLiteralExpression; 1311 type BindingOrAssignmentPattern = ObjectBindingOrAssignmentPattern | ArrayBindingOrAssignmentPattern; 1312 interface ConditionalExpression extends Expression { 1313 readonly kind: SyntaxKind.ConditionalExpression; 1314 readonly condition: Expression; 1315 readonly questionToken: QuestionToken; 1316 readonly whenTrue: Expression; 1317 readonly colonToken: ColonToken; 1318 readonly whenFalse: Expression; 1319 } 1320 type FunctionBody = Block; 1321 type ConciseBody = FunctionBody | Expression; 1322 interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer { 1323 readonly kind: SyntaxKind.FunctionExpression; 1324 readonly modifiers?: NodeArray<Modifier>; 1325 readonly name?: Identifier; 1326 readonly body: FunctionBody; 1327 } 1328 interface EtsComponentExpression extends PrimaryExpression, Declaration { 1329 readonly kind: SyntaxKind.EtsComponentExpression; 1330 readonly expression: LeftHandSideExpression; 1331 readonly typeArguments?: NodeArray<TypeNode>; 1332 readonly arguments: NodeArray<Expression>; 1333 readonly body?: Block; 1334 } 1335 interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer { 1336 readonly kind: SyntaxKind.ArrowFunction; 1337 readonly modifiers?: NodeArray<Modifier>; 1338 readonly equalsGreaterThanToken: EqualsGreaterThanToken; 1339 readonly body: ConciseBody; 1340 readonly name: never; 1341 } 1342 interface LiteralLikeNode extends Node { 1343 text: string; 1344 isUnterminated?: boolean; 1345 hasExtendedUnicodeEscape?: boolean; 1346 } 1347 interface TemplateLiteralLikeNode extends LiteralLikeNode { 1348 rawText?: string; 1349 } 1350 interface LiteralExpression extends LiteralLikeNode, PrimaryExpression { 1351 _literalExpressionBrand: any; 1352 } 1353 interface RegularExpressionLiteral extends LiteralExpression { 1354 readonly kind: SyntaxKind.RegularExpressionLiteral; 1355 } 1356 interface NoSubstitutionTemplateLiteral extends LiteralExpression, TemplateLiteralLikeNode, Declaration { 1357 readonly kind: SyntaxKind.NoSubstitutionTemplateLiteral; 1358 } 1359 enum TokenFlags { 1360 None = 0, 1361 Scientific = 16, 1362 Octal = 32, 1363 HexSpecifier = 64, 1364 BinarySpecifier = 128, 1365 OctalSpecifier = 256 1366 } 1367 interface NumericLiteral extends LiteralExpression, Declaration { 1368 readonly kind: SyntaxKind.NumericLiteral; 1369 } 1370 interface BigIntLiteral extends LiteralExpression { 1371 readonly kind: SyntaxKind.BigIntLiteral; 1372 } 1373 type LiteralToken = NumericLiteral | BigIntLiteral | StringLiteral | JsxText | RegularExpressionLiteral | NoSubstitutionTemplateLiteral; 1374 interface TemplateHead extends TemplateLiteralLikeNode { 1375 readonly kind: SyntaxKind.TemplateHead; 1376 readonly parent: TemplateExpression | TemplateLiteralTypeNode; 1377 } 1378 interface TemplateMiddle extends TemplateLiteralLikeNode { 1379 readonly kind: SyntaxKind.TemplateMiddle; 1380 readonly parent: TemplateSpan | TemplateLiteralTypeSpan; 1381 } 1382 interface TemplateTail extends TemplateLiteralLikeNode { 1383 readonly kind: SyntaxKind.TemplateTail; 1384 readonly parent: TemplateSpan | TemplateLiteralTypeSpan; 1385 } 1386 type PseudoLiteralToken = TemplateHead | TemplateMiddle | TemplateTail; 1387 type TemplateLiteralToken = NoSubstitutionTemplateLiteral | PseudoLiteralToken; 1388 interface TemplateExpression extends PrimaryExpression { 1389 readonly kind: SyntaxKind.TemplateExpression; 1390 readonly head: TemplateHead; 1391 readonly templateSpans: NodeArray<TemplateSpan>; 1392 } 1393 type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral; 1394 interface TemplateSpan extends Node { 1395 readonly kind: SyntaxKind.TemplateSpan; 1396 readonly parent: TemplateExpression; 1397 readonly expression: Expression; 1398 readonly literal: TemplateMiddle | TemplateTail; 1399 } 1400 interface ParenthesizedExpression extends PrimaryExpression, JSDocContainer { 1401 readonly kind: SyntaxKind.ParenthesizedExpression; 1402 readonly expression: Expression; 1403 } 1404 interface ArrayLiteralExpression extends PrimaryExpression { 1405 readonly kind: SyntaxKind.ArrayLiteralExpression; 1406 readonly elements: NodeArray<Expression>; 1407 } 1408 interface SpreadElement extends Expression { 1409 readonly kind: SyntaxKind.SpreadElement; 1410 readonly parent: ArrayLiteralExpression | CallExpression | NewExpression; 1411 readonly expression: Expression; 1412 } 1413 /** 1414 * This interface is a base interface for ObjectLiteralExpression and JSXAttributes to extend from. JSXAttributes is similar to 1415 * ObjectLiteralExpression in that it contains array of properties; however, JSXAttributes' properties can only be 1416 * JSXAttribute or JSXSpreadAttribute. ObjectLiteralExpression, on the other hand, can only have properties of type 1417 * ObjectLiteralElement (e.g. PropertyAssignment, ShorthandPropertyAssignment etc.) 1418 */ 1419 interface ObjectLiteralExpressionBase<T extends ObjectLiteralElement> extends PrimaryExpression, Declaration { 1420 readonly properties: NodeArray<T>; 1421 } 1422 interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike> { 1423 readonly kind: SyntaxKind.ObjectLiteralExpression; 1424 } 1425 type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression; 1426 type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression; 1427 type AccessExpression = PropertyAccessExpression | ElementAccessExpression; 1428 interface PropertyAccessExpression extends MemberExpression, NamedDeclaration { 1429 readonly kind: SyntaxKind.PropertyAccessExpression; 1430 readonly expression: LeftHandSideExpression; 1431 readonly questionDotToken?: QuestionDotToken; 1432 readonly name: MemberName; 1433 } 1434 interface PropertyAccessChain extends PropertyAccessExpression { 1435 _optionalChainBrand: any; 1436 readonly name: MemberName; 1437 } 1438 interface SuperPropertyAccessExpression extends PropertyAccessExpression { 1439 readonly expression: SuperExpression; 1440 } 1441 /** Brand for a PropertyAccessExpression which, like a QualifiedName, consists of a sequence of identifiers separated by dots. */ 1442 interface PropertyAccessEntityNameExpression extends PropertyAccessExpression { 1443 _propertyAccessExpressionLikeQualifiedNameBrand?: any; 1444 readonly expression: EntityNameExpression; 1445 readonly name: Identifier; 1446 } 1447 interface ElementAccessExpression extends MemberExpression { 1448 readonly kind: SyntaxKind.ElementAccessExpression; 1449 readonly expression: LeftHandSideExpression; 1450 readonly questionDotToken?: QuestionDotToken; 1451 readonly argumentExpression: Expression; 1452 } 1453 interface ElementAccessChain extends ElementAccessExpression { 1454 _optionalChainBrand: any; 1455 } 1456 interface SuperElementAccessExpression extends ElementAccessExpression { 1457 readonly expression: SuperExpression; 1458 } 1459 type SuperProperty = SuperPropertyAccessExpression | SuperElementAccessExpression; 1460 interface CallExpression extends LeftHandSideExpression, Declaration { 1461 readonly kind: SyntaxKind.CallExpression; 1462 readonly expression: LeftHandSideExpression; 1463 readonly questionDotToken?: QuestionDotToken; 1464 readonly typeArguments?: NodeArray<TypeNode>; 1465 readonly arguments: NodeArray<Expression>; 1466 } 1467 interface CallChain extends CallExpression { 1468 _optionalChainBrand: any; 1469 } 1470 type OptionalChain = PropertyAccessChain | ElementAccessChain | CallChain | NonNullChain; 1471 interface SuperCall extends CallExpression { 1472 readonly expression: SuperExpression; 1473 } 1474 interface ImportCall extends CallExpression { 1475 readonly expression: ImportExpression; 1476 } 1477 interface ExpressionWithTypeArguments extends MemberExpression, NodeWithTypeArguments { 1478 readonly kind: SyntaxKind.ExpressionWithTypeArguments; 1479 readonly expression: LeftHandSideExpression; 1480 } 1481 interface NewExpression extends PrimaryExpression, Declaration { 1482 readonly kind: SyntaxKind.NewExpression; 1483 readonly expression: LeftHandSideExpression; 1484 readonly typeArguments?: NodeArray<TypeNode>; 1485 readonly arguments?: NodeArray<Expression>; 1486 } 1487 interface TaggedTemplateExpression extends MemberExpression { 1488 readonly kind: SyntaxKind.TaggedTemplateExpression; 1489 readonly tag: LeftHandSideExpression; 1490 readonly typeArguments?: NodeArray<TypeNode>; 1491 readonly template: TemplateLiteral; 1492 } 1493 type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement | EtsComponentExpression; 1494 interface AsExpression extends Expression { 1495 readonly kind: SyntaxKind.AsExpression; 1496 readonly expression: Expression; 1497 readonly type: TypeNode; 1498 } 1499 interface TypeAssertion extends UnaryExpression { 1500 readonly kind: SyntaxKind.TypeAssertionExpression; 1501 readonly type: TypeNode; 1502 readonly expression: UnaryExpression; 1503 } 1504 interface SatisfiesExpression extends Expression { 1505 readonly kind: SyntaxKind.SatisfiesExpression; 1506 readonly expression: Expression; 1507 readonly type: TypeNode; 1508 } 1509 type AssertionExpression = TypeAssertion | AsExpression; 1510 interface NonNullExpression extends LeftHandSideExpression { 1511 readonly kind: SyntaxKind.NonNullExpression; 1512 readonly expression: Expression; 1513 } 1514 interface NonNullChain extends NonNullExpression { 1515 _optionalChainBrand: any; 1516 } 1517 interface MetaProperty extends PrimaryExpression { 1518 readonly kind: SyntaxKind.MetaProperty; 1519 readonly keywordToken: SyntaxKind.NewKeyword | SyntaxKind.ImportKeyword; 1520 readonly name: Identifier; 1521 } 1522 interface JsxElement extends PrimaryExpression { 1523 readonly kind: SyntaxKind.JsxElement; 1524 readonly openingElement: JsxOpeningElement; 1525 readonly children: NodeArray<JsxChild>; 1526 readonly closingElement: JsxClosingElement; 1527 } 1528 type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement; 1529 type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute; 1530 type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess; 1531 interface JsxTagNamePropertyAccess extends PropertyAccessExpression { 1532 readonly expression: JsxTagNameExpression; 1533 } 1534 interface JsxAttributes extends ObjectLiteralExpressionBase<JsxAttributeLike> { 1535 readonly kind: SyntaxKind.JsxAttributes; 1536 readonly parent: JsxOpeningLikeElement; 1537 } 1538 interface JsxOpeningElement extends Expression { 1539 readonly kind: SyntaxKind.JsxOpeningElement; 1540 readonly parent: JsxElement; 1541 readonly tagName: JsxTagNameExpression; 1542 readonly typeArguments?: NodeArray<TypeNode>; 1543 readonly attributes: JsxAttributes; 1544 } 1545 interface JsxSelfClosingElement extends PrimaryExpression { 1546 readonly kind: SyntaxKind.JsxSelfClosingElement; 1547 readonly tagName: JsxTagNameExpression; 1548 readonly typeArguments?: NodeArray<TypeNode>; 1549 readonly attributes: JsxAttributes; 1550 } 1551 interface JsxFragment extends PrimaryExpression { 1552 readonly kind: SyntaxKind.JsxFragment; 1553 readonly openingFragment: JsxOpeningFragment; 1554 readonly children: NodeArray<JsxChild>; 1555 readonly closingFragment: JsxClosingFragment; 1556 } 1557 interface JsxOpeningFragment extends Expression { 1558 readonly kind: SyntaxKind.JsxOpeningFragment; 1559 readonly parent: JsxFragment; 1560 } 1561 interface JsxClosingFragment extends Expression { 1562 readonly kind: SyntaxKind.JsxClosingFragment; 1563 readonly parent: JsxFragment; 1564 } 1565 interface JsxAttribute extends ObjectLiteralElement { 1566 readonly kind: SyntaxKind.JsxAttribute; 1567 readonly parent: JsxAttributes; 1568 readonly name: Identifier; 1569 readonly initializer?: JsxAttributeValue; 1570 } 1571 type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment; 1572 interface JsxSpreadAttribute extends ObjectLiteralElement { 1573 readonly kind: SyntaxKind.JsxSpreadAttribute; 1574 readonly parent: JsxAttributes; 1575 readonly expression: Expression; 1576 } 1577 interface JsxClosingElement extends Node { 1578 readonly kind: SyntaxKind.JsxClosingElement; 1579 readonly parent: JsxElement; 1580 readonly tagName: JsxTagNameExpression; 1581 } 1582 interface JsxExpression extends Expression { 1583 readonly kind: SyntaxKind.JsxExpression; 1584 readonly parent: JsxElement | JsxFragment | JsxAttributeLike; 1585 readonly dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>; 1586 readonly expression?: Expression; 1587 } 1588 interface JsxText extends LiteralLikeNode { 1589 readonly kind: SyntaxKind.JsxText; 1590 readonly parent: JsxElement | JsxFragment; 1591 readonly containsOnlyTriviaWhiteSpaces: boolean; 1592 } 1593 type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment; 1594 interface Statement extends Node, JSDocContainer { 1595 _statementBrand: any; 1596 } 1597 interface NotEmittedStatement extends Statement { 1598 readonly kind: SyntaxKind.NotEmittedStatement; 1599 } 1600 /** 1601 * A list of comma-separated expressions. This node is only created by transformations. 1602 */ 1603 interface CommaListExpression extends Expression { 1604 readonly kind: SyntaxKind.CommaListExpression; 1605 readonly elements: NodeArray<Expression>; 1606 } 1607 interface EmptyStatement extends Statement { 1608 readonly kind: SyntaxKind.EmptyStatement; 1609 } 1610 interface DebuggerStatement extends Statement { 1611 readonly kind: SyntaxKind.DebuggerStatement; 1612 } 1613 interface MissingDeclaration extends DeclarationStatement { 1614 readonly kind: SyntaxKind.MissingDeclaration; 1615 readonly name?: Identifier; 1616 } 1617 type BlockLike = SourceFile | Block | ModuleBlock | CaseOrDefaultClause; 1618 interface Block extends Statement { 1619 readonly kind: SyntaxKind.Block; 1620 readonly statements: NodeArray<Statement>; 1621 } 1622 interface VariableStatement extends Statement { 1623 readonly kind: SyntaxKind.VariableStatement; 1624 readonly modifiers?: NodeArray<Modifier>; 1625 readonly declarationList: VariableDeclarationList; 1626 } 1627 interface ExpressionStatement extends Statement { 1628 readonly kind: SyntaxKind.ExpressionStatement; 1629 readonly expression: Expression; 1630 } 1631 interface IfStatement extends Statement { 1632 readonly kind: SyntaxKind.IfStatement; 1633 readonly expression: Expression; 1634 readonly thenStatement: Statement; 1635 readonly elseStatement?: Statement; 1636 } 1637 interface IterationStatement extends Statement { 1638 readonly statement: Statement; 1639 } 1640 interface DoStatement extends IterationStatement { 1641 readonly kind: SyntaxKind.DoStatement; 1642 readonly expression: Expression; 1643 } 1644 interface WhileStatement extends IterationStatement { 1645 readonly kind: SyntaxKind.WhileStatement; 1646 readonly expression: Expression; 1647 } 1648 type ForInitializer = VariableDeclarationList | Expression; 1649 interface ForStatement extends IterationStatement { 1650 readonly kind: SyntaxKind.ForStatement; 1651 readonly initializer?: ForInitializer; 1652 readonly condition?: Expression; 1653 readonly incrementor?: Expression; 1654 } 1655 type ForInOrOfStatement = ForInStatement | ForOfStatement; 1656 interface ForInStatement extends IterationStatement { 1657 readonly kind: SyntaxKind.ForInStatement; 1658 readonly initializer: ForInitializer; 1659 readonly expression: Expression; 1660 } 1661 interface ForOfStatement extends IterationStatement { 1662 readonly kind: SyntaxKind.ForOfStatement; 1663 readonly awaitModifier?: AwaitKeyword; 1664 readonly initializer: ForInitializer; 1665 readonly expression: Expression; 1666 } 1667 interface BreakStatement extends Statement { 1668 readonly kind: SyntaxKind.BreakStatement; 1669 readonly label?: Identifier; 1670 } 1671 interface ContinueStatement extends Statement { 1672 readonly kind: SyntaxKind.ContinueStatement; 1673 readonly label?: Identifier; 1674 } 1675 type BreakOrContinueStatement = BreakStatement | ContinueStatement; 1676 interface ReturnStatement extends Statement { 1677 readonly kind: SyntaxKind.ReturnStatement; 1678 readonly expression?: Expression; 1679 } 1680 interface WithStatement extends Statement { 1681 readonly kind: SyntaxKind.WithStatement; 1682 readonly expression: Expression; 1683 readonly statement: Statement; 1684 } 1685 interface SwitchStatement extends Statement { 1686 readonly kind: SyntaxKind.SwitchStatement; 1687 readonly expression: Expression; 1688 readonly caseBlock: CaseBlock; 1689 possiblyExhaustive?: boolean; 1690 } 1691 interface CaseBlock extends Node { 1692 readonly kind: SyntaxKind.CaseBlock; 1693 readonly parent: SwitchStatement; 1694 readonly clauses: NodeArray<CaseOrDefaultClause>; 1695 } 1696 interface CaseClause extends Node, JSDocContainer { 1697 readonly kind: SyntaxKind.CaseClause; 1698 readonly parent: CaseBlock; 1699 readonly expression: Expression; 1700 readonly statements: NodeArray<Statement>; 1701 } 1702 interface DefaultClause extends Node { 1703 readonly kind: SyntaxKind.DefaultClause; 1704 readonly parent: CaseBlock; 1705 readonly statements: NodeArray<Statement>; 1706 } 1707 type CaseOrDefaultClause = CaseClause | DefaultClause; 1708 interface LabeledStatement extends Statement { 1709 readonly kind: SyntaxKind.LabeledStatement; 1710 readonly label: Identifier; 1711 readonly statement: Statement; 1712 } 1713 interface ThrowStatement extends Statement { 1714 readonly kind: SyntaxKind.ThrowStatement; 1715 readonly expression: Expression; 1716 } 1717 interface TryStatement extends Statement { 1718 readonly kind: SyntaxKind.TryStatement; 1719 readonly tryBlock: Block; 1720 readonly catchClause?: CatchClause; 1721 readonly finallyBlock?: Block; 1722 } 1723 interface CatchClause extends Node { 1724 readonly kind: SyntaxKind.CatchClause; 1725 readonly parent: TryStatement; 1726 readonly variableDeclaration?: VariableDeclaration; 1727 readonly block: Block; 1728 } 1729 type ObjectTypeDeclaration = ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode; 1730 type DeclarationWithTypeParameters = DeclarationWithTypeParameterChildren | JSDocTypedefTag | JSDocCallbackTag | JSDocSignature; 1731 type DeclarationWithTypeParameterChildren = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag; 1732 interface ClassLikeDeclarationBase extends NamedDeclaration, JSDocContainer { 1733 readonly kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression | SyntaxKind.StructDeclaration | SyntaxKind.AnnotationDeclaration; 1734 readonly name?: Identifier; 1735 readonly typeParameters?: NodeArray<TypeParameterDeclaration>; 1736 readonly heritageClauses?: NodeArray<HeritageClause>; 1737 readonly members: NodeArray<ClassElement>; 1738 } 1739 interface ClassDeclaration extends ClassLikeDeclarationBase, DeclarationStatement { 1740 readonly kind: SyntaxKind.ClassDeclaration; 1741 readonly modifiers?: NodeArray<ModifierLike>; 1742 /** May be undefined in `export default class { ... }`. */ 1743 readonly name?: Identifier; 1744 } 1745 interface StructDeclaration extends ClassLikeDeclarationBase, DeclarationStatement { 1746 readonly kind: SyntaxKind.StructDeclaration; 1747 readonly modifiers?: NodeArray<ModifierLike>; 1748 /** May be undefined in `export default class { ... }`. */ 1749 readonly name?: Identifier; 1750 } 1751 interface AnnotationDeclaration extends DeclarationStatement { 1752 readonly kind: SyntaxKind.AnnotationDeclaration; 1753 readonly modifiers?: NodeArray<ModifierLike>; 1754 readonly name: Identifier; 1755 readonly members: NodeArray<AnnotationElement>; 1756 } 1757 interface ClassExpression extends ClassLikeDeclarationBase, PrimaryExpression { 1758 readonly kind: SyntaxKind.ClassExpression; 1759 readonly modifiers?: NodeArray<ModifierLike>; 1760 } 1761 type ClassLikeDeclaration = ClassDeclaration | ClassExpression | StructDeclaration; 1762 interface ClassElement extends NamedDeclaration { 1763 _classElementBrand: any; 1764 readonly name?: PropertyName; 1765 } 1766 interface AnnotationElement extends NamedDeclaration { 1767 _annnotationElementBrand: any; 1768 readonly name: PropertyName; 1769 } 1770 interface TypeElement extends NamedDeclaration { 1771 _typeElementBrand: any; 1772 readonly name?: PropertyName; 1773 readonly questionToken?: QuestionToken | undefined; 1774 } 1775 interface InterfaceDeclaration extends DeclarationStatement, JSDocContainer { 1776 readonly kind: SyntaxKind.InterfaceDeclaration; 1777 readonly modifiers?: NodeArray<Modifier>; 1778 readonly name: Identifier; 1779 readonly typeParameters?: NodeArray<TypeParameterDeclaration>; 1780 readonly heritageClauses?: NodeArray<HeritageClause>; 1781 readonly members: NodeArray<TypeElement>; 1782 } 1783 interface HeritageClause extends Node { 1784 readonly kind: SyntaxKind.HeritageClause; 1785 readonly parent: InterfaceDeclaration | ClassLikeDeclaration; 1786 readonly token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword; 1787 readonly types: NodeArray<ExpressionWithTypeArguments>; 1788 } 1789 interface TypeAliasDeclaration extends DeclarationStatement, JSDocContainer { 1790 readonly kind: SyntaxKind.TypeAliasDeclaration; 1791 readonly modifiers?: NodeArray<Modifier>; 1792 readonly name: Identifier; 1793 readonly typeParameters?: NodeArray<TypeParameterDeclaration>; 1794 readonly type: TypeNode; 1795 } 1796 interface EnumMember extends NamedDeclaration, JSDocContainer { 1797 readonly kind: SyntaxKind.EnumMember; 1798 readonly parent: EnumDeclaration; 1799 readonly name: PropertyName; 1800 readonly initializer?: Expression; 1801 } 1802 interface EnumDeclaration extends DeclarationStatement, JSDocContainer { 1803 readonly kind: SyntaxKind.EnumDeclaration; 1804 readonly modifiers?: NodeArray<Modifier>; 1805 readonly name: Identifier; 1806 readonly members: NodeArray<EnumMember>; 1807 } 1808 type ModuleName = Identifier | StringLiteral; 1809 type ModuleBody = NamespaceBody | JSDocNamespaceBody; 1810 interface ModuleDeclaration extends DeclarationStatement, JSDocContainer { 1811 readonly kind: SyntaxKind.ModuleDeclaration; 1812 readonly parent: ModuleBody | SourceFile; 1813 readonly modifiers?: NodeArray<Modifier>; 1814 readonly name: ModuleName; 1815 readonly body?: ModuleBody | JSDocNamespaceDeclaration; 1816 } 1817 type NamespaceBody = ModuleBlock | NamespaceDeclaration; 1818 interface NamespaceDeclaration extends ModuleDeclaration { 1819 readonly name: Identifier; 1820 readonly body: NamespaceBody; 1821 } 1822 type JSDocNamespaceBody = Identifier | JSDocNamespaceDeclaration; 1823 interface JSDocNamespaceDeclaration extends ModuleDeclaration { 1824 readonly name: Identifier; 1825 readonly body?: JSDocNamespaceBody; 1826 } 1827 interface ModuleBlock extends Node, Statement { 1828 readonly kind: SyntaxKind.ModuleBlock; 1829 readonly parent: ModuleDeclaration; 1830 readonly statements: NodeArray<Statement>; 1831 } 1832 type ModuleReference = EntityName | ExternalModuleReference; 1833 /** 1834 * One of: 1835 * - import x = require("mod"); 1836 * - import x = M.x; 1837 */ 1838 interface ImportEqualsDeclaration extends DeclarationStatement, JSDocContainer { 1839 readonly kind: SyntaxKind.ImportEqualsDeclaration; 1840 readonly parent: SourceFile | ModuleBlock; 1841 readonly modifiers?: NodeArray<Modifier>; 1842 readonly name: Identifier; 1843 readonly isTypeOnly: boolean; 1844 readonly moduleReference: ModuleReference; 1845 } 1846 interface ExternalModuleReference extends Node { 1847 readonly kind: SyntaxKind.ExternalModuleReference; 1848 readonly parent: ImportEqualsDeclaration; 1849 readonly expression: Expression; 1850 } 1851 interface ImportDeclaration extends Statement { 1852 readonly kind: SyntaxKind.ImportDeclaration; 1853 readonly parent: SourceFile | ModuleBlock; 1854 readonly modifiers?: NodeArray<Modifier>; 1855 readonly importClause?: ImportClause; 1856 /** If this is not a StringLiteral it will be a grammar error. */ 1857 readonly moduleSpecifier: Expression; 1858 readonly assertClause?: AssertClause; 1859 } 1860 type NamedImportBindings = NamespaceImport | NamedImports; 1861 type NamedExportBindings = NamespaceExport | NamedExports; 1862 interface ImportClause extends NamedDeclaration { 1863 readonly kind: SyntaxKind.ImportClause; 1864 readonly parent: ImportDeclaration; 1865 readonly isTypeOnly: boolean; 1866 readonly name?: Identifier; 1867 readonly namedBindings?: NamedImportBindings; 1868 readonly isLazy?: boolean; 1869 } 1870 type AssertionKey = Identifier | StringLiteral; 1871 interface AssertEntry extends Node { 1872 readonly kind: SyntaxKind.AssertEntry; 1873 readonly parent: AssertClause; 1874 readonly name: AssertionKey; 1875 readonly value: Expression; 1876 } 1877 interface AssertClause extends Node { 1878 readonly kind: SyntaxKind.AssertClause; 1879 readonly parent: ImportDeclaration | ExportDeclaration; 1880 readonly elements: NodeArray<AssertEntry>; 1881 readonly multiLine?: boolean; 1882 } 1883 interface NamespaceImport extends NamedDeclaration { 1884 readonly kind: SyntaxKind.NamespaceImport; 1885 readonly parent: ImportClause; 1886 readonly name: Identifier; 1887 } 1888 interface NamespaceExport extends NamedDeclaration { 1889 readonly kind: SyntaxKind.NamespaceExport; 1890 readonly parent: ExportDeclaration; 1891 readonly name: Identifier; 1892 } 1893 interface NamespaceExportDeclaration extends DeclarationStatement, JSDocContainer { 1894 readonly kind: SyntaxKind.NamespaceExportDeclaration; 1895 readonly name: Identifier; 1896 } 1897 interface ExportDeclaration extends DeclarationStatement, JSDocContainer { 1898 readonly kind: SyntaxKind.ExportDeclaration; 1899 readonly parent: SourceFile | ModuleBlock; 1900 readonly modifiers?: NodeArray<Modifier>; 1901 readonly isTypeOnly: boolean; 1902 /** Will not be assigned in the case of `export * from "foo";` */ 1903 readonly exportClause?: NamedExportBindings; 1904 /** If this is not a StringLiteral it will be a grammar error. */ 1905 readonly moduleSpecifier?: Expression; 1906 readonly assertClause?: AssertClause; 1907 } 1908 interface NamedImports extends Node { 1909 readonly kind: SyntaxKind.NamedImports; 1910 readonly parent: ImportClause; 1911 readonly elements: NodeArray<ImportSpecifier>; 1912 } 1913 interface NamedExports extends Node { 1914 readonly kind: SyntaxKind.NamedExports; 1915 readonly parent: ExportDeclaration; 1916 readonly elements: NodeArray<ExportSpecifier>; 1917 } 1918 type NamedImportsOrExports = NamedImports | NamedExports; 1919 interface ImportSpecifier extends NamedDeclaration { 1920 readonly kind: SyntaxKind.ImportSpecifier; 1921 readonly parent: NamedImports; 1922 readonly propertyName?: Identifier; 1923 readonly name: Identifier; 1924 readonly isTypeOnly: boolean; 1925 } 1926 interface ExportSpecifier extends NamedDeclaration, JSDocContainer { 1927 readonly kind: SyntaxKind.ExportSpecifier; 1928 readonly parent: NamedExports; 1929 readonly isTypeOnly: boolean; 1930 readonly propertyName?: Identifier; 1931 readonly name: Identifier; 1932 } 1933 type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier; 1934 type TypeOnlyCompatibleAliasDeclaration = ImportClause | ImportEqualsDeclaration | NamespaceImport | ImportOrExportSpecifier; 1935 type TypeOnlyAliasDeclaration = ImportClause & { 1936 readonly isTypeOnly: true; 1937 readonly name: Identifier; 1938 } | ImportEqualsDeclaration & { 1939 readonly isTypeOnly: true; 1940 } | NamespaceImport & { 1941 readonly parent: ImportClause & { 1942 readonly isTypeOnly: true; 1943 }; 1944 } | ImportSpecifier & ({ 1945 readonly isTypeOnly: true; 1946 } | { 1947 readonly parent: NamedImports & { 1948 readonly parent: ImportClause & { 1949 readonly isTypeOnly: true; 1950 }; 1951 }; 1952 }) | ExportSpecifier & ({ 1953 readonly isTypeOnly: true; 1954 } | { 1955 readonly parent: NamedExports & { 1956 readonly parent: ExportDeclaration & { 1957 readonly isTypeOnly: true; 1958 }; 1959 }; 1960 }); 1961 /** 1962 * This is either an `export =` or an `export default` declaration. 1963 * Unless `isExportEquals` is set, this node was parsed as an `export default`. 1964 */ 1965 interface ExportAssignment extends DeclarationStatement, JSDocContainer { 1966 readonly kind: SyntaxKind.ExportAssignment; 1967 readonly parent: SourceFile; 1968 readonly modifiers?: NodeArray<Modifier>; 1969 readonly isExportEquals?: boolean; 1970 readonly expression: Expression; 1971 } 1972 interface FileReference extends TextRange { 1973 fileName: string; 1974 resolutionMode?: SourceFile["impliedNodeFormat"]; 1975 } 1976 interface CheckJsDirective extends TextRange { 1977 enabled: boolean; 1978 } 1979 type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia; 1980 interface CommentRange extends TextRange { 1981 hasTrailingNewLine?: boolean; 1982 kind: CommentKind; 1983 } 1984 interface SynthesizedComment extends CommentRange { 1985 text: string; 1986 pos: -1; 1987 end: -1; 1988 hasLeadingNewline?: boolean; 1989 } 1990 interface JSDocTypeExpression extends TypeNode { 1991 readonly kind: SyntaxKind.JSDocTypeExpression; 1992 readonly type: TypeNode; 1993 } 1994 interface JSDocNameReference extends Node { 1995 readonly kind: SyntaxKind.JSDocNameReference; 1996 readonly name: EntityName | JSDocMemberName; 1997 } 1998 /** Class#method reference in JSDoc */ 1999 interface JSDocMemberName extends Node { 2000 readonly kind: SyntaxKind.JSDocMemberName; 2001 readonly left: EntityName | JSDocMemberName; 2002 readonly right: Identifier; 2003 } 2004 interface JSDocType extends TypeNode { 2005 _jsDocTypeBrand: any; 2006 } 2007 interface JSDocAllType extends JSDocType { 2008 readonly kind: SyntaxKind.JSDocAllType; 2009 } 2010 interface JSDocUnknownType extends JSDocType { 2011 readonly kind: SyntaxKind.JSDocUnknownType; 2012 } 2013 interface JSDocNonNullableType extends JSDocType { 2014 readonly kind: SyntaxKind.JSDocNonNullableType; 2015 readonly type: TypeNode; 2016 readonly postfix: boolean; 2017 } 2018 interface JSDocNullableType extends JSDocType { 2019 readonly kind: SyntaxKind.JSDocNullableType; 2020 readonly type: TypeNode; 2021 readonly postfix: boolean; 2022 } 2023 interface JSDocOptionalType extends JSDocType { 2024 readonly kind: SyntaxKind.JSDocOptionalType; 2025 readonly type: TypeNode; 2026 } 2027 interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase { 2028 readonly kind: SyntaxKind.JSDocFunctionType; 2029 } 2030 interface JSDocVariadicType extends JSDocType { 2031 readonly kind: SyntaxKind.JSDocVariadicType; 2032 readonly type: TypeNode; 2033 } 2034 interface JSDocNamepathType extends JSDocType { 2035 readonly kind: SyntaxKind.JSDocNamepathType; 2036 readonly type: TypeNode; 2037 } 2038 type JSDocTypeReferencingNode = JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType; 2039 interface JSDoc extends Node { 2040 readonly kind: SyntaxKind.JSDoc; 2041 readonly parent: HasJSDoc; 2042 readonly tags?: NodeArray<JSDocTag>; 2043 readonly comment?: string | NodeArray<JSDocComment>; 2044 } 2045 interface JSDocTag extends Node { 2046 readonly parent: JSDoc | JSDocTypeLiteral; 2047 readonly tagName: Identifier; 2048 readonly comment?: string | NodeArray<JSDocComment>; 2049 } 2050 interface JSDocLink extends Node { 2051 readonly kind: SyntaxKind.JSDocLink; 2052 readonly name?: EntityName | JSDocMemberName; 2053 text: string; 2054 } 2055 interface JSDocLinkCode extends Node { 2056 readonly kind: SyntaxKind.JSDocLinkCode; 2057 readonly name?: EntityName | JSDocMemberName; 2058 text: string; 2059 } 2060 interface JSDocLinkPlain extends Node { 2061 readonly kind: SyntaxKind.JSDocLinkPlain; 2062 readonly name?: EntityName | JSDocMemberName; 2063 text: string; 2064 } 2065 type JSDocComment = JSDocText | JSDocLink | JSDocLinkCode | JSDocLinkPlain; 2066 interface JSDocText extends Node { 2067 readonly kind: SyntaxKind.JSDocText; 2068 text: string; 2069 } 2070 interface JSDocUnknownTag extends JSDocTag { 2071 readonly kind: SyntaxKind.JSDocTag; 2072 } 2073 /** 2074 * Note that `@extends` is a synonym of `@augments`. 2075 * Both tags are represented by this interface. 2076 */ 2077 interface JSDocAugmentsTag extends JSDocTag { 2078 readonly kind: SyntaxKind.JSDocAugmentsTag; 2079 readonly class: ExpressionWithTypeArguments & { 2080 readonly expression: Identifier | PropertyAccessEntityNameExpression; 2081 }; 2082 } 2083 interface JSDocImplementsTag extends JSDocTag { 2084 readonly kind: SyntaxKind.JSDocImplementsTag; 2085 readonly class: ExpressionWithTypeArguments & { 2086 readonly expression: Identifier | PropertyAccessEntityNameExpression; 2087 }; 2088 } 2089 interface JSDocAuthorTag extends JSDocTag { 2090 readonly kind: SyntaxKind.JSDocAuthorTag; 2091 } 2092 interface JSDocDeprecatedTag extends JSDocTag { 2093 kind: SyntaxKind.JSDocDeprecatedTag; 2094 } 2095 interface JSDocClassTag extends JSDocTag { 2096 readonly kind: SyntaxKind.JSDocClassTag; 2097 } 2098 interface JSDocPublicTag extends JSDocTag { 2099 readonly kind: SyntaxKind.JSDocPublicTag; 2100 } 2101 interface JSDocPrivateTag extends JSDocTag { 2102 readonly kind: SyntaxKind.JSDocPrivateTag; 2103 } 2104 interface JSDocProtectedTag extends JSDocTag { 2105 readonly kind: SyntaxKind.JSDocProtectedTag; 2106 } 2107 interface JSDocReadonlyTag extends JSDocTag { 2108 readonly kind: SyntaxKind.JSDocReadonlyTag; 2109 } 2110 interface JSDocOverrideTag extends JSDocTag { 2111 readonly kind: SyntaxKind.JSDocOverrideTag; 2112 } 2113 interface JSDocEnumTag extends JSDocTag, Declaration { 2114 readonly kind: SyntaxKind.JSDocEnumTag; 2115 readonly parent: JSDoc; 2116 readonly typeExpression: JSDocTypeExpression; 2117 } 2118 interface JSDocThisTag extends JSDocTag { 2119 readonly kind: SyntaxKind.JSDocThisTag; 2120 readonly typeExpression: JSDocTypeExpression; 2121 } 2122 interface JSDocTemplateTag extends JSDocTag { 2123 readonly kind: SyntaxKind.JSDocTemplateTag; 2124 readonly constraint: JSDocTypeExpression | undefined; 2125 readonly typeParameters: NodeArray<TypeParameterDeclaration>; 2126 } 2127 interface JSDocSeeTag extends JSDocTag { 2128 readonly kind: SyntaxKind.JSDocSeeTag; 2129 readonly name?: JSDocNameReference; 2130 } 2131 interface JSDocReturnTag extends JSDocTag { 2132 readonly kind: SyntaxKind.JSDocReturnTag; 2133 readonly typeExpression?: JSDocTypeExpression; 2134 } 2135 interface JSDocTypeTag extends JSDocTag { 2136 readonly kind: SyntaxKind.JSDocTypeTag; 2137 readonly typeExpression: JSDocTypeExpression; 2138 } 2139 interface JSDocTypedefTag extends JSDocTag, NamedDeclaration { 2140 readonly kind: SyntaxKind.JSDocTypedefTag; 2141 readonly parent: JSDoc; 2142 readonly fullName?: JSDocNamespaceDeclaration | Identifier; 2143 readonly name?: Identifier; 2144 readonly typeExpression?: JSDocTypeExpression | JSDocTypeLiteral; 2145 } 2146 interface JSDocCallbackTag extends JSDocTag, NamedDeclaration { 2147 readonly kind: SyntaxKind.JSDocCallbackTag; 2148 readonly parent: JSDoc; 2149 readonly fullName?: JSDocNamespaceDeclaration | Identifier; 2150 readonly name?: Identifier; 2151 readonly typeExpression: JSDocSignature; 2152 } 2153 interface JSDocSignature extends JSDocType, Declaration { 2154 readonly kind: SyntaxKind.JSDocSignature; 2155 readonly typeParameters?: readonly JSDocTemplateTag[]; 2156 readonly parameters: readonly JSDocParameterTag[]; 2157 readonly type: JSDocReturnTag | undefined; 2158 } 2159 interface JSDocPropertyLikeTag extends JSDocTag, Declaration { 2160 readonly parent: JSDoc; 2161 readonly name: EntityName; 2162 readonly typeExpression?: JSDocTypeExpression; 2163 /** Whether the property name came before the type -- non-standard for JSDoc, but Typescript-like */ 2164 readonly isNameFirst: boolean; 2165 readonly isBracketed: boolean; 2166 } 2167 interface JSDocPropertyTag extends JSDocPropertyLikeTag { 2168 readonly kind: SyntaxKind.JSDocPropertyTag; 2169 } 2170 interface JSDocParameterTag extends JSDocPropertyLikeTag { 2171 readonly kind: SyntaxKind.JSDocParameterTag; 2172 } 2173 interface JSDocTypeLiteral extends JSDocType { 2174 readonly kind: SyntaxKind.JSDocTypeLiteral; 2175 readonly jsDocPropertyTags?: readonly JSDocPropertyLikeTag[]; 2176 /** If true, then this type literal represents an *array* of its type. */ 2177 readonly isArrayType: boolean; 2178 } 2179 enum FlowFlags { 2180 Unreachable = 1, 2181 Start = 2, 2182 BranchLabel = 4, 2183 LoopLabel = 8, 2184 Assignment = 16, 2185 TrueCondition = 32, 2186 FalseCondition = 64, 2187 SwitchClause = 128, 2188 ArrayMutation = 256, 2189 Call = 512, 2190 ReduceLabel = 1024, 2191 Referenced = 2048, 2192 Shared = 4096, 2193 Label = 12, 2194 Condition = 96 2195 } 2196 type FlowNode = FlowStart | FlowLabel | FlowAssignment | FlowCondition | FlowSwitchClause | FlowArrayMutation | FlowCall | FlowReduceLabel; 2197 interface FlowNodeBase { 2198 flags: FlowFlags; 2199 id?: number; 2200 } 2201 interface FlowStart extends FlowNodeBase { 2202 node?: FunctionExpression | ArrowFunction | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration; 2203 } 2204 interface FlowLabel extends FlowNodeBase { 2205 antecedents: FlowNode[] | undefined; 2206 } 2207 interface FlowAssignment extends FlowNodeBase { 2208 node: Expression | VariableDeclaration | BindingElement; 2209 antecedent: FlowNode; 2210 } 2211 interface FlowCall extends FlowNodeBase { 2212 node: CallExpression; 2213 antecedent: FlowNode; 2214 } 2215 interface FlowCondition extends FlowNodeBase { 2216 node: Expression; 2217 antecedent: FlowNode; 2218 } 2219 interface FlowSwitchClause extends FlowNodeBase { 2220 switchStatement: SwitchStatement; 2221 clauseStart: number; 2222 clauseEnd: number; 2223 antecedent: FlowNode; 2224 } 2225 interface FlowArrayMutation extends FlowNodeBase { 2226 node: CallExpression | BinaryExpression; 2227 antecedent: FlowNode; 2228 } 2229 interface FlowReduceLabel extends FlowNodeBase { 2230 target: FlowLabel; 2231 antecedents: FlowNode[]; 2232 antecedent: FlowNode; 2233 } 2234 type FlowType = Type | IncompleteType; 2235 interface IncompleteType { 2236 flags: TypeFlags; 2237 type: Type; 2238 } 2239 interface AmdDependency { 2240 path: string; 2241 name?: string; 2242 } 2243 /** 2244 * Subset of properties from SourceFile that are used in multiple utility functions 2245 */ 2246 interface SourceFileLike { 2247 readonly text: string; 2248 readonly fileName?: string; 2249 } 2250 interface SourceFileLike { 2251 getLineAndCharacterOfPosition(pos: number): LineAndCharacter; 2252 } 2253 interface SourceFile extends Declaration { 2254 readonly kind: SyntaxKind.SourceFile; 2255 readonly statements: NodeArray<Statement>; 2256 readonly endOfFileToken: Token<SyntaxKind.EndOfFileToken>; 2257 fileName: string; 2258 text: string; 2259 amdDependencies: readonly AmdDependency[]; 2260 moduleName?: string; 2261 referencedFiles: readonly FileReference[]; 2262 typeReferenceDirectives: readonly FileReference[]; 2263 libReferenceDirectives: readonly FileReference[]; 2264 languageVariant: LanguageVariant; 2265 isDeclarationFile: boolean; 2266 /** 2267 * lib.d.ts should have a reference comment like 2268 * 2269 * /// <reference no-default-lib="true"/> 2270 * 2271 * If any other file has this comment, it signals not to include lib.d.ts 2272 * because this containing file is intended to act as a default library. 2273 */ 2274 hasNoDefaultLib: boolean; 2275 languageVersion: ScriptTarget; 2276 /** 2277 * When `module` is `Node16` or `NodeNext`, this field controls whether the 2278 * source file in question is an ESNext-output-format file, or a CommonJS-output-format 2279 * module. This is derived by the module resolver as it looks up the file, since 2280 * it is derived from either the file extension of the module, or the containing 2281 * `package.json` context, and affects both checking and emit. 2282 * 2283 * It is _public_ so that (pre)transformers can set this field, 2284 * since it switches the builtin `node` module transform. Generally speaking, if unset, 2285 * the field is treated as though it is `ModuleKind.CommonJS`. 2286 * 2287 * Note that this field is only set by the module resolution process when 2288 * `moduleResolution` is `Node16` or `NodeNext`, which is implied by the `module` setting 2289 * of `Node16` or `NodeNext`, respectively, but may be overriden (eg, by a `moduleResolution` 2290 * of `node`). If so, this field will be unset and source files will be considered to be 2291 * CommonJS-output-format by the node module transformer and type checker, regardless of extension or context. 2292 */ 2293 impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS; 2294 } 2295 interface SourceFile { 2296 getLineAndCharacterOfPosition(pos: number): LineAndCharacter; 2297 getLineEndOfPosition(pos: number): number; 2298 getLineStarts(): readonly number[]; 2299 getPositionOfLineAndCharacter(line: number, character: number): number; 2300 update(newText: string, textChangeRange: TextChangeRange): SourceFile; 2301 } 2302 interface Bundle extends Node { 2303 readonly kind: SyntaxKind.Bundle; 2304 readonly prepends: readonly (InputFiles | UnparsedSource)[]; 2305 readonly sourceFiles: readonly SourceFile[]; 2306 } 2307 interface InputFiles extends Node { 2308 readonly kind: SyntaxKind.InputFiles; 2309 javascriptPath?: string; 2310 javascriptText: string; 2311 javascriptMapPath?: string; 2312 javascriptMapText?: string; 2313 declarationPath?: string; 2314 declarationText: string; 2315 declarationMapPath?: string; 2316 declarationMapText?: string; 2317 } 2318 interface UnparsedSource extends Node { 2319 readonly kind: SyntaxKind.UnparsedSource; 2320 fileName: string; 2321 text: string; 2322 readonly prologues: readonly UnparsedPrologue[]; 2323 helpers: readonly UnscopedEmitHelper[] | undefined; 2324 referencedFiles: readonly FileReference[]; 2325 typeReferenceDirectives: readonly FileReference[] | undefined; 2326 libReferenceDirectives: readonly FileReference[]; 2327 hasNoDefaultLib?: boolean; 2328 sourceMapPath?: string; 2329 sourceMapText?: string; 2330 readonly syntheticReferences?: readonly UnparsedSyntheticReference[]; 2331 readonly texts: readonly UnparsedSourceText[]; 2332 } 2333 type UnparsedSourceText = UnparsedPrepend | UnparsedTextLike; 2334 type UnparsedNode = UnparsedPrologue | UnparsedSourceText | UnparsedSyntheticReference; 2335 interface UnparsedSection extends Node { 2336 readonly kind: SyntaxKind; 2337 readonly parent: UnparsedSource; 2338 readonly data?: string; 2339 } 2340 interface UnparsedPrologue extends UnparsedSection { 2341 readonly kind: SyntaxKind.UnparsedPrologue; 2342 readonly parent: UnparsedSource; 2343 readonly data: string; 2344 } 2345 interface UnparsedPrepend extends UnparsedSection { 2346 readonly kind: SyntaxKind.UnparsedPrepend; 2347 readonly parent: UnparsedSource; 2348 readonly data: string; 2349 readonly texts: readonly UnparsedTextLike[]; 2350 } 2351 interface UnparsedTextLike extends UnparsedSection { 2352 readonly kind: SyntaxKind.UnparsedText | SyntaxKind.UnparsedInternalText; 2353 readonly parent: UnparsedSource; 2354 } 2355 interface UnparsedSyntheticReference extends UnparsedSection { 2356 readonly kind: SyntaxKind.UnparsedSyntheticReference; 2357 readonly parent: UnparsedSource; 2358 } 2359 interface JsonSourceFile extends SourceFile { 2360 readonly statements: NodeArray<JsonObjectExpressionStatement>; 2361 } 2362 interface TsConfigSourceFile extends JsonSourceFile { 2363 extendedSourceFiles?: string[]; 2364 } 2365 interface JsonMinusNumericLiteral extends PrefixUnaryExpression { 2366 readonly kind: SyntaxKind.PrefixUnaryExpression; 2367 readonly operator: SyntaxKind.MinusToken; 2368 readonly operand: NumericLiteral; 2369 } 2370 type JsonObjectExpression = ObjectLiteralExpression | ArrayLiteralExpression | JsonMinusNumericLiteral | NumericLiteral | StringLiteral | BooleanLiteral | NullLiteral; 2371 interface JsonObjectExpressionStatement extends ExpressionStatement { 2372 readonly expression: JsonObjectExpression; 2373 } 2374 interface ScriptReferenceHost { 2375 getCompilerOptions(): CompilerOptions; 2376 getSourceFile(fileName: string): SourceFile | undefined; 2377 getSourceFileByPath(path: Path): SourceFile | undefined; 2378 getCurrentDirectory(): string; 2379 } 2380 interface ParseConfigHost { 2381 useCaseSensitiveFileNames: boolean; 2382 readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[]; 2383 /** 2384 * Gets a value indicating whether the specified path exists and is a file. 2385 * @param path The path to test. 2386 */ 2387 fileExists(path: string): boolean; 2388 readFile(path: string): string | undefined; 2389 trace?(s: string): void; 2390 } 2391 /** 2392 * Branded string for keeping track of when we've turned an ambiguous path 2393 * specified like "./blah" to an absolute path to an actual 2394 * tsconfig file, e.g. "/root/blah/tsconfig.json" 2395 */ 2396 type ResolvedConfigFileName = string & { 2397 _isResolvedConfigFileName: never; 2398 }; 2399 interface WriteFileCallbackData { 2400 } 2401 type WriteFileCallback = (fileName: string, text: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[], data?: WriteFileCallbackData) => void; 2402 class OperationCanceledException { 2403 } 2404 interface CancellationToken { 2405 isCancellationRequested(): boolean; 2406 /** OperationCanceledException if isCancellationRequested is true */ 2407 throwIfCancellationRequested(): void; 2408 } 2409 interface SymbolDisplayPart { 2410 text: string; 2411 kind: string; 2412 } 2413 interface SymbolDisplayPart { 2414 text: string; 2415 kind: string; 2416 } 2417 interface JsDocTagInfo { 2418 name: string; 2419 text?: string | SymbolDisplayPart[]; 2420 } 2421 interface Program extends ScriptReferenceHost { 2422 getCurrentDirectory(): string; 2423 /** 2424 * Get a list of root file names that were passed to a 'createProgram' 2425 */ 2426 getRootFileNames(): readonly string[]; 2427 /** 2428 * Get a list of files in the program 2429 */ 2430 getSourceFiles(): readonly SourceFile[]; 2431 /** 2432 * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then 2433 * the JavaScript and declaration files will be produced for all the files in this program. 2434 * If targetSourceFile is specified, then only the JavaScript and declaration for that 2435 * specific file will be generated. 2436 * 2437 * If writeFile is not specified then the writeFile callback from the compiler host will be 2438 * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter 2439 * will be invoked when writing the JavaScript and declaration files. 2440 */ 2441 emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult; 2442 getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; 2443 getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; 2444 getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[]; 2445 /** The first time this is called, it will return global diagnostics (no location). */ 2446 getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 2447 getSemanticDiagnosticsForLinter(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 2448 getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[]; 2449 getConfigFileParsingDiagnostics(): readonly Diagnostic[]; 2450 getEtsLibSFromProgram(): string[]; 2451 /** 2452 * Gets a type checker that can be used to semantically analyze source files in the program. 2453 */ 2454 getTypeChecker(): TypeChecker; 2455 /** 2456 * Gets a type checker that can be used to semantically analyze source files in the program for arkts linter. 2457 */ 2458 getLinterTypeChecker(): TypeChecker; 2459 getNodeCount(): number; 2460 getIdentifierCount(): number; 2461 getSymbolCount(): number; 2462 getTypeCount(): number; 2463 getInstantiationCount(): number; 2464 getRelationCacheSizes(): { 2465 assignable: number; 2466 identity: number; 2467 subtype: number; 2468 strictSubtype: number; 2469 }; 2470 isSourceFileFromExternalLibrary(file: SourceFile): boolean; 2471 isSourceFileDefaultLibrary(file: SourceFile): boolean; 2472 getSourceFileFromReference(referencingFile: SourceFile | UnparsedSource, ref: FileReference): SourceFile | undefined; 2473 getProjectReferences(): readonly ProjectReference[] | undefined; 2474 getResolvedProjectReferences(): readonly (ResolvedProjectReference | undefined)[] | undefined; 2475 getJsDocNodeCheckedConfig?(jsDocFileCheckInfo: FileCheckModuleInfo, symbolSourceFilePath: string): JsDocNodeCheckConfig; 2476 getJsDocNodeConditionCheckedResult?(jsDocFileCheckedInfo: FileCheckModuleInfo, jsDocTagInfos: JsDocTagInfo[], jsDocs?: JSDoc[]): ConditionCheckResult; 2477 getFileCheckedModuleInfo?(containFilePath: string): FileCheckModuleInfo; 2478 /** 2479 * Release typeChecker & linterTypeChecker 2480 */ 2481 releaseTypeChecker(): void; 2482 getEmitHost(writeFileCallback?: WriteFileCallback): EmitHost; 2483 refreshTypeChecker(): void; 2484 setProgramSourceFiles(file: SourceFile): void; 2485 initProcessingFiles(): void; 2486 processImportedModules(file: SourceFile): void; 2487 getProcessingFiles(): SourceFile[] | undefined; 2488 deleteProgramSourceFiles(fileNames: string[]): void; 2489 } 2490 type RedirectTargetsMap = ReadonlyESMap<Path, readonly string[]>; 2491 interface ResolvedProjectReference { 2492 commandLine: ParsedCommandLine; 2493 sourceFile: SourceFile; 2494 references?: readonly (ResolvedProjectReference | undefined)[]; 2495 } 2496 type CustomTransformerFactory = (context: TransformationContext) => CustomTransformer; 2497 interface CustomTransformer { 2498 transformSourceFile(node: SourceFile): SourceFile; 2499 transformBundle(node: Bundle): Bundle; 2500 } 2501 interface CustomTransformers { 2502 /** Custom transformers to evaluate before built-in .js transformations. */ 2503 before?: (TransformerFactory<SourceFile> | CustomTransformerFactory)[]; 2504 /** Custom transformers to evaluate after built-in .js transformations. */ 2505 after?: (TransformerFactory<SourceFile> | CustomTransformerFactory)[]; 2506 /** Custom transformers to evaluate after built-in .d.ts transformations. */ 2507 afterDeclarations?: (TransformerFactory<Bundle | SourceFile> | CustomTransformerFactory)[]; 2508 } 2509 interface SourceMapSpan { 2510 /** Line number in the .js file. */ 2511 emittedLine: number; 2512 /** Column number in the .js file. */ 2513 emittedColumn: number; 2514 /** Line number in the .ts file. */ 2515 sourceLine: number; 2516 /** Column number in the .ts file. */ 2517 sourceColumn: number; 2518 /** Optional name (index into names array) associated with this span. */ 2519 nameIndex?: number; 2520 /** .ts file (index into sources array) associated with this span */ 2521 sourceIndex: number; 2522 } 2523 /** Return code used by getEmitOutput function to indicate status of the function */ 2524 enum ExitStatus { 2525 Success = 0, 2526 DiagnosticsPresent_OutputsSkipped = 1, 2527 DiagnosticsPresent_OutputsGenerated = 2, 2528 InvalidProject_OutputsSkipped = 3, 2529 ProjectReferenceCycle_OutputsSkipped = 4, 2530 /** @deprecated Use ProjectReferenceCycle_OutputsSkipped instead. */ 2531 ProjectReferenceCycle_OutputsSkupped = 4 2532 } 2533 interface EmitResult { 2534 emitSkipped: boolean; 2535 /** Contains declaration emit diagnostics */ 2536 diagnostics: readonly Diagnostic[]; 2537 emittedFiles?: string[]; 2538 } 2539 interface TypeChecker { 2540 getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; 2541 getDeclaredTypeOfSymbol(symbol: Symbol): Type; 2542 getPropertiesOfType(type: Type): Symbol[]; 2543 getPropertyOfType(type: Type, propertyName: string): Symbol | undefined; 2544 getPrivateIdentifierPropertyOfType(leftType: Type, name: string, location: Node): Symbol | undefined; 2545 getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined; 2546 getIndexInfosOfType(type: Type): readonly IndexInfo[]; 2547 getIndexInfosOfIndexSymbol: (indexSymbol: Symbol) => IndexInfo[]; 2548 getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[]; 2549 getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined; 2550 getBaseTypes(type: InterfaceType): BaseType[]; 2551 getBaseTypeOfLiteralType(type: Type): Type; 2552 getWidenedType(type: Type): Type; 2553 getReturnTypeOfSignature(signature: Signature): Type; 2554 getNullableType(type: Type, flags: TypeFlags): Type; 2555 getNonNullableType(type: Type): Type; 2556 getTypeArguments(type: TypeReference): readonly Type[]; 2557 /** Note that the resulting nodes cannot be checked. */ 2558 typeToTypeNode(type: Type, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeNode | undefined; 2559 /** Note that the resulting nodes cannot be checked. */ 2560 signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): SignatureDeclaration & { 2561 typeArguments?: NodeArray<TypeNode>; 2562 } | undefined; 2563 /** Note that the resulting nodes cannot be checked. */ 2564 indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): IndexSignatureDeclaration | undefined; 2565 /** Note that the resulting nodes cannot be checked. */ 2566 symbolToEntityName(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): EntityName | undefined; 2567 /** Note that the resulting nodes cannot be checked. */ 2568 symbolToExpression(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): Expression | undefined; 2569 /** Note that the resulting nodes cannot be checked. */ 2570 symbolToTypeParameterDeclarations(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): NodeArray<TypeParameterDeclaration> | undefined; 2571 /** Note that the resulting nodes cannot be checked. */ 2572 symbolToParameterDeclaration(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): ParameterDeclaration | undefined; 2573 /** Note that the resulting nodes cannot be checked. */ 2574 typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeParameterDeclaration | undefined; 2575 getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; 2576 getSymbolAtLocation(node: Node): Symbol | undefined; 2577 getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[]; 2578 /** 2579 * The function returns the value (local variable) symbol of an identifier in the short-hand property assignment. 2580 * This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value. 2581 */ 2582 getShorthandAssignmentValueSymbol(location: Node | undefined): Symbol | undefined; 2583 getExportSpecifierLocalTargetSymbol(location: ExportSpecifier | Identifier): Symbol | undefined; 2584 /** 2585 * If a symbol is a local symbol with an associated exported symbol, returns the exported symbol. 2586 * Otherwise returns its input. 2587 * For example, at `export type T = number;`: 2588 * - `getSymbolAtLocation` at the location `T` will return the exported symbol for `T`. 2589 * - But the result of `getSymbolsInScope` will contain the *local* symbol for `T`, not the exported symbol. 2590 * - Calling `getExportSymbolOfSymbol` on that local symbol will return the exported symbol. 2591 */ 2592 getExportSymbolOfSymbol(symbol: Symbol): Symbol; 2593 getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol | undefined; 2594 getTypeOfAssignmentPattern(pattern: AssignmentPattern): Type; 2595 getTypeAtLocation(node: Node): Type; 2596 tryGetTypeAtLocationWithoutCheck(node: Node): Type; 2597 getTypeFromTypeNode(node: TypeNode): Type; 2598 signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string; 2599 typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; 2600 symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): string; 2601 typePredicateToString(predicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; 2602 getFullyQualifiedName(symbol: Symbol): string; 2603 getAugmentedPropertiesOfType(type: Type): Symbol[]; 2604 getRootSymbols(symbol: Symbol): readonly Symbol[]; 2605 getSymbolOfExpando(node: Node, allowDeclaration: boolean): Symbol | undefined; 2606 getContextualType(node: Expression): Type | undefined; 2607 /** 2608 * returns unknownSignature in the case of an error. 2609 * returns undefined if the node is not valid. 2610 * @param argumentCount Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`. 2611 */ 2612 getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined; 2613 tryGetResolvedSignatureWithoutCheck(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined; 2614 getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined; 2615 isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined; 2616 isUndefinedSymbol(symbol: Symbol): boolean; 2617 isArgumentsSymbol(symbol: Symbol): boolean; 2618 isUnknownSymbol(symbol: Symbol): boolean; 2619 getMergedSymbol(symbol: Symbol): Symbol; 2620 getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined; 2621 isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName | ImportTypeNode, propertyName: string): boolean; 2622 /** Follow all aliases to get the original symbol. */ 2623 getAliasedSymbol(symbol: Symbol): Symbol; 2624 /** Follow a *single* alias to get the immediately aliased symbol. */ 2625 getImmediateAliasedSymbol(symbol: Symbol): Symbol | undefined; 2626 getExportsOfModule(moduleSymbol: Symbol): Symbol[]; 2627 getJsxIntrinsicTagNamesAt(location: Node): Symbol[]; 2628 isOptionalParameter(node: ParameterDeclaration): boolean; 2629 getAmbientModules(): Symbol[]; 2630 tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined; 2631 getApparentType(type: Type): Type; 2632 getBaseConstraintOfType(type: Type): Type | undefined; 2633 getDefaultFromTypeParameter(type: Type): Type | undefined; 2634 getTypePredicateOfSignature(signature: Signature): TypePredicate | undefined; 2635 /** 2636 * Depending on the operation performed, it may be appropriate to throw away the checker 2637 * if the cancellation token is triggered. Typically, if it is used for error checking 2638 * and the operation is cancelled, then it should be discarded, otherwise it is safe to keep. 2639 */ 2640 runWithCancellationToken<T>(token: CancellationToken, cb: (checker: TypeChecker) => T): T; 2641 getConstEnumRelate?(): ESMap<string, ESMap<string, string>>; 2642 clearConstEnumRelate?(): void; 2643 deleteConstEnumRelate?(path: string): void; 2644 getTypeArgumentsForResolvedSignature(signature: Signature): readonly Type[] | undefined; 2645 getCheckedSourceFiles(): Set<SourceFile>; 2646 collectHaveTsNoCheckFilesForLinter(sourceFile: SourceFile): void; 2647 clearQualifiedNameCache?(): void; 2648 isStaticRecord?(type: Type): boolean; 2649 isStaticSourceFile?(sourceFile: SourceFile | undefined): boolean; 2650 createIntrinsicType?(kind: TypeFlags, intrinsicName: string, objectFlags?: ObjectFlags): Type; 2651 } 2652 enum NodeBuilderFlags { 2653 None = 0, 2654 NoTruncation = 1, 2655 WriteArrayAsGenericType = 2, 2656 GenerateNamesForShadowedTypeParams = 4, 2657 UseStructuralFallback = 8, 2658 ForbidIndexedAccessSymbolReferences = 16, 2659 WriteTypeArgumentsOfSignature = 32, 2660 UseFullyQualifiedType = 64, 2661 UseOnlyExternalAliasing = 128, 2662 SuppressAnyReturnType = 256, 2663 WriteTypeParametersInQualifiedName = 512, 2664 MultilineObjectLiterals = 1024, 2665 WriteClassExpressionAsTypeLiteral = 2048, 2666 UseTypeOfFunction = 4096, 2667 OmitParameterModifiers = 8192, 2668 UseAliasDefinedOutsideCurrentScope = 16384, 2669 UseSingleQuotesForStringLiteralType = 268435456, 2670 NoTypeReduction = 536870912, 2671 OmitThisParameter = 33554432, 2672 AllowThisInObjectLiteral = 32768, 2673 AllowQualifiedNameInPlaceOfIdentifier = 65536, 2674 /** @deprecated AllowQualifedNameInPlaceOfIdentifier. Use AllowQualifiedNameInPlaceOfIdentifier instead. */ 2675 AllowQualifedNameInPlaceOfIdentifier = 65536, 2676 AllowAnonymousIdentifier = 131072, 2677 AllowEmptyUnionOrIntersection = 262144, 2678 AllowEmptyTuple = 524288, 2679 AllowUniqueESSymbolType = 1048576, 2680 AllowEmptyIndexInfoType = 2097152, 2681 AllowNodeModulesRelativePaths = 67108864, 2682 IgnoreErrors = 70221824, 2683 InObjectTypeLiteral = 4194304, 2684 InTypeAlias = 8388608, 2685 InInitialEntityName = 16777216 2686 } 2687 enum TypeFormatFlags { 2688 None = 0, 2689 NoTruncation = 1, 2690 WriteArrayAsGenericType = 2, 2691 UseStructuralFallback = 8, 2692 WriteTypeArgumentsOfSignature = 32, 2693 UseFullyQualifiedType = 64, 2694 SuppressAnyReturnType = 256, 2695 MultilineObjectLiterals = 1024, 2696 WriteClassExpressionAsTypeLiteral = 2048, 2697 UseTypeOfFunction = 4096, 2698 OmitParameterModifiers = 8192, 2699 UseAliasDefinedOutsideCurrentScope = 16384, 2700 UseSingleQuotesForStringLiteralType = 268435456, 2701 NoTypeReduction = 536870912, 2702 OmitThisParameter = 33554432, 2703 AllowUniqueESSymbolType = 1048576, 2704 AddUndefined = 131072, 2705 WriteArrowStyleSignature = 262144, 2706 InArrayType = 524288, 2707 InElementType = 2097152, 2708 InFirstTypeArgument = 4194304, 2709 InTypeAlias = 8388608, 2710 /** @deprecated */ WriteOwnNameForAnyLike = 0, 2711 NodeBuilderFlagsMask = 848330091 2712 } 2713 enum SymbolFormatFlags { 2714 None = 0, 2715 WriteTypeParametersOrArguments = 1, 2716 UseOnlyExternalAliasing = 2, 2717 AllowAnyNodeKind = 4, 2718 UseAliasDefinedOutsideCurrentScope = 8 2719 } 2720 interface SymbolWriter extends SymbolTracker { 2721 writeKeyword(text: string): void; 2722 writeOperator(text: string): void; 2723 writePunctuation(text: string): void; 2724 writeSpace(text: string): void; 2725 writeStringLiteral(text: string): void; 2726 writeParameter(text: string): void; 2727 writeProperty(text: string): void; 2728 writeSymbol(text: string, symbol: Symbol): void; 2729 writeLine(force?: boolean): void; 2730 increaseIndent(): void; 2731 decreaseIndent(): void; 2732 clear(): void; 2733 } 2734 enum TypePredicateKind { 2735 This = 0, 2736 Identifier = 1, 2737 AssertsThis = 2, 2738 AssertsIdentifier = 3 2739 } 2740 interface TypePredicateBase { 2741 kind: TypePredicateKind; 2742 type: Type | undefined; 2743 } 2744 interface ThisTypePredicate extends TypePredicateBase { 2745 kind: TypePredicateKind.This; 2746 parameterName: undefined; 2747 parameterIndex: undefined; 2748 type: Type; 2749 } 2750 interface IdentifierTypePredicate extends TypePredicateBase { 2751 kind: TypePredicateKind.Identifier; 2752 parameterName: string; 2753 parameterIndex: number; 2754 type: Type; 2755 } 2756 interface AssertsThisTypePredicate extends TypePredicateBase { 2757 kind: TypePredicateKind.AssertsThis; 2758 parameterName: undefined; 2759 parameterIndex: undefined; 2760 type: Type | undefined; 2761 } 2762 interface AssertsIdentifierTypePredicate extends TypePredicateBase { 2763 kind: TypePredicateKind.AssertsIdentifier; 2764 parameterName: string; 2765 parameterIndex: number; 2766 type: Type | undefined; 2767 } 2768 type TypePredicate = ThisTypePredicate | IdentifierTypePredicate | AssertsThisTypePredicate | AssertsIdentifierTypePredicate; 2769 enum SymbolFlags { 2770 None = 0, 2771 FunctionScopedVariable = 1, 2772 BlockScopedVariable = 2, 2773 Property = 4, 2774 EnumMember = 8, 2775 Function = 16, 2776 Class = 32, 2777 Interface = 64, 2778 ConstEnum = 128, 2779 RegularEnum = 256, 2780 ValueModule = 512, 2781 NamespaceModule = 1024, 2782 TypeLiteral = 2048, 2783 ObjectLiteral = 4096, 2784 Method = 8192, 2785 Constructor = 16384, 2786 GetAccessor = 32768, 2787 SetAccessor = 65536, 2788 Signature = 131072, 2789 TypeParameter = 262144, 2790 TypeAlias = 524288, 2791 ExportValue = 1048576, 2792 Alias = 2097152, 2793 Prototype = 4194304, 2794 ExportStar = 8388608, 2795 Optional = 16777216, 2796 Transient = 33554432, 2797 Assignment = 67108864, 2798 ModuleExports = 134217728, 2799 Annotation = 268435456, 2800 Enum = 384, 2801 Variable = 3, 2802 Value = 111551, 2803 Type = 788968, 2804 Namespace = 1920, 2805 Module = 1536, 2806 Accessor = 98304, 2807 FunctionScopedVariableExcludes = 111550, 2808 BlockScopedVariableExcludes = 111551, 2809 ParameterExcludes = 111551, 2810 PropertyExcludes = 0, 2811 EnumMemberExcludes = 900095, 2812 FunctionExcludes = 110991, 2813 ClassExcludes = 899503, 2814 InterfaceExcludes = 788872, 2815 RegularEnumExcludes = 899327, 2816 ConstEnumExcludes = 899967, 2817 ValueModuleExcludes = 110735, 2818 NamespaceModuleExcludes = 0, 2819 MethodExcludes = 103359, 2820 GetAccessorExcludes = 46015, 2821 SetAccessorExcludes = 78783, 2822 AccessorExcludes = 13247, 2823 TypeParameterExcludes = 526824, 2824 TypeAliasExcludes = 788968, 2825 AliasExcludes = 2097152, 2826 ModuleMember = 2623475, 2827 ExportHasLocal = 944, 2828 BlockScoped = 418, 2829 PropertyOrAccessor = 98308, 2830 ClassMember = 106500 2831 } 2832 interface Symbol { 2833 flags: SymbolFlags; 2834 escapedName: __String; 2835 declarations?: Declaration[]; 2836 valueDeclaration?: Declaration; 2837 members?: SymbolTable; 2838 exports?: SymbolTable; 2839 globalExports?: SymbolTable; 2840 exportSymbol?: Symbol; 2841 } 2842 interface Symbol { 2843 readonly name: string; 2844 getFlags(): SymbolFlags; 2845 getEscapedName(): __String; 2846 getName(): string; 2847 getDeclarations(): Declaration[] | undefined; 2848 getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[]; 2849 getJsDocTags(checker?: TypeChecker): JSDocTagInfo[]; 2850 } 2851 enum InternalSymbolName { 2852 Call = "__call", 2853 Constructor = "__constructor", 2854 New = "__new", 2855 Index = "__index", 2856 ExportStar = "__export", 2857 Global = "__global", 2858 Missing = "__missing", 2859 Type = "__type", 2860 Object = "__object", 2861 JSXAttributes = "__jsxAttributes", 2862 Class = "__class", 2863 Function = "__function", 2864 Computed = "__computed", 2865 Resolving = "__resolving__", 2866 ExportEquals = "export=", 2867 Default = "default", 2868 This = "this" 2869 } 2870 /** 2871 * This represents a string whose leading underscore have been escaped by adding extra leading underscores. 2872 * The shape of this brand is rather unique compared to others we've used. 2873 * Instead of just an intersection of a string and an object, it is that union-ed 2874 * with an intersection of void and an object. This makes it wholly incompatible 2875 * with a normal string (which is good, it cannot be misused on assignment or on usage), 2876 * while still being comparable with a normal string via === (also good) and castable from a string. 2877 */ 2878 type __String = (string & { 2879 __escapedIdentifier: void; 2880 }) | (void & { 2881 __escapedIdentifier: void; 2882 }) | InternalSymbolName; 2883 /** ReadonlyMap where keys are `__String`s. */ 2884 interface ReadonlyUnderscoreEscapedMap<T> extends ReadonlyESMap<__String, T> { 2885 } 2886 /** Map where keys are `__String`s. */ 2887 interface UnderscoreEscapedMap<T> extends ESMap<__String, T>, ReadonlyUnderscoreEscapedMap<T> { 2888 } 2889 /** SymbolTable based on ES6 Map interface. */ 2890 type SymbolTable = UnderscoreEscapedMap<Symbol>; 2891 enum TypeFlags { 2892 Any = 1, 2893 Unknown = 2, 2894 String = 4, 2895 Number = 8, 2896 Boolean = 16, 2897 Enum = 32, 2898 BigInt = 64, 2899 StringLiteral = 128, 2900 NumberLiteral = 256, 2901 BooleanLiteral = 512, 2902 EnumLiteral = 1024, 2903 BigIntLiteral = 2048, 2904 ESSymbol = 4096, 2905 UniqueESSymbol = 8192, 2906 Void = 16384, 2907 Undefined = 32768, 2908 Null = 65536, 2909 Never = 131072, 2910 TypeParameter = 262144, 2911 Object = 524288, 2912 Union = 1048576, 2913 Intersection = 2097152, 2914 Index = 4194304, 2915 IndexedAccess = 8388608, 2916 Conditional = 16777216, 2917 Substitution = 33554432, 2918 NonPrimitive = 67108864, 2919 TemplateLiteral = 134217728, 2920 StringMapping = 268435456, 2921 Literal = 2944, 2922 Unit = 109440, 2923 StringOrNumberLiteral = 384, 2924 PossiblyFalsy = 117724, 2925 StringLike = 402653316, 2926 NumberLike = 296, 2927 BigIntLike = 2112, 2928 BooleanLike = 528, 2929 EnumLike = 1056, 2930 ESSymbolLike = 12288, 2931 VoidLike = 49152, 2932 UnionOrIntersection = 3145728, 2933 StructuredType = 3670016, 2934 TypeVariable = 8650752, 2935 InstantiableNonPrimitive = 58982400, 2936 InstantiablePrimitive = 406847488, 2937 Instantiable = 465829888, 2938 StructuredOrInstantiable = 469499904, 2939 Narrowable = 536624127 2940 } 2941 type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression; 2942 interface Type { 2943 flags: TypeFlags; 2944 symbol: Symbol; 2945 pattern?: DestructuringPattern; 2946 aliasSymbol?: Symbol; 2947 aliasTypeArguments?: readonly Type[]; 2948 } 2949 interface Type { 2950 getFlags(): TypeFlags; 2951 getSymbol(): Symbol | undefined; 2952 getProperties(): Symbol[]; 2953 getProperty(propertyName: string): Symbol | undefined; 2954 getApparentProperties(): Symbol[]; 2955 getCallSignatures(): readonly Signature[]; 2956 getConstructSignatures(): readonly Signature[]; 2957 getStringIndexType(): Type | undefined; 2958 getNumberIndexType(): Type | undefined; 2959 getBaseTypes(): BaseType[] | undefined; 2960 getNonNullableType(): Type; 2961 getConstraint(): Type | undefined; 2962 getDefault(): Type | undefined; 2963 isUnion(): this is UnionType; 2964 isIntersection(): this is IntersectionType; 2965 isUnionOrIntersection(): this is UnionOrIntersectionType; 2966 isLiteral(): this is LiteralType; 2967 isStringLiteral(): this is StringLiteralType; 2968 isNumberLiteral(): this is NumberLiteralType; 2969 isTypeParameter(): this is TypeParameter; 2970 isClassOrInterface(): this is InterfaceType; 2971 isClass(): this is InterfaceType; 2972 isIndexType(): this is IndexType; 2973 } 2974 interface LiteralType extends Type { 2975 value: string | number | PseudoBigInt; 2976 freshType: LiteralType; 2977 regularType: LiteralType; 2978 } 2979 interface UniqueESSymbolType extends Type { 2980 symbol: Symbol; 2981 escapedName: __String; 2982 } 2983 interface StringLiteralType extends LiteralType { 2984 value: string; 2985 } 2986 interface NumberLiteralType extends LiteralType { 2987 value: number; 2988 } 2989 interface BigIntLiteralType extends LiteralType { 2990 value: PseudoBigInt; 2991 } 2992 interface EnumType extends Type { 2993 } 2994 enum ObjectFlags { 2995 Class = 1, 2996 Interface = 2, 2997 Reference = 4, 2998 Tuple = 8, 2999 Anonymous = 16, 3000 Mapped = 32, 3001 Instantiated = 64, 3002 ObjectLiteral = 128, 3003 EvolvingArray = 256, 3004 ObjectLiteralPatternWithComputedProperties = 512, 3005 ReverseMapped = 1024, 3006 JsxAttributes = 2048, 3007 JSLiteral = 4096, 3008 FreshLiteral = 8192, 3009 ArrayLiteral = 16384, 3010 Annotation = 134217728, 3011 ClassOrInterface = 3, 3012 ContainsSpread = 2097152, 3013 ObjectRestType = 4194304, 3014 InstantiationExpressionType = 8388608 3015 } 3016 interface ObjectType extends Type { 3017 objectFlags: ObjectFlags; 3018 } 3019 /** Class and interface types (ObjectFlags.Class and ObjectFlags.Interface). */ 3020 interface InterfaceType extends ObjectType { 3021 typeParameters: TypeParameter[] | undefined; 3022 outerTypeParameters: TypeParameter[] | undefined; 3023 localTypeParameters: TypeParameter[] | undefined; 3024 thisType: TypeParameter | undefined; 3025 } 3026 type BaseType = ObjectType | IntersectionType | TypeVariable; 3027 interface InterfaceTypeWithDeclaredMembers extends InterfaceType { 3028 declaredProperties: Symbol[]; 3029 declaredCallSignatures: Signature[]; 3030 declaredConstructSignatures: Signature[]; 3031 declaredIndexInfos: IndexInfo[]; 3032 } 3033 /** 3034 * Type references (ObjectFlags.Reference). When a class or interface has type parameters or 3035 * a "this" type, references to the class or interface are made using type references. The 3036 * typeArguments property specifies the types to substitute for the type parameters of the 3037 * class or interface and optionally includes an extra element that specifies the type to 3038 * substitute for "this" in the resulting instantiation. When no extra argument is present, 3039 * the type reference itself is substituted for "this". The typeArguments property is undefined 3040 * if the class or interface has no type parameters and the reference isn't specifying an 3041 * explicit "this" argument. 3042 */ 3043 interface TypeReference extends ObjectType { 3044 target: GenericType; 3045 node?: TypeReferenceNode | ArrayTypeNode | TupleTypeNode; 3046 } 3047 interface TypeReference { 3048 typeArguments?: readonly Type[]; 3049 } 3050 interface DeferredTypeReference extends TypeReference { 3051 } 3052 interface GenericType extends InterfaceType, TypeReference { 3053 } 3054 enum ElementFlags { 3055 Required = 1, 3056 Optional = 2, 3057 Rest = 4, 3058 Variadic = 8, 3059 Fixed = 3, 3060 Variable = 12, 3061 NonRequired = 14, 3062 NonRest = 11 3063 } 3064 interface TupleType extends GenericType { 3065 elementFlags: readonly ElementFlags[]; 3066 minLength: number; 3067 fixedLength: number; 3068 hasRestElement: boolean; 3069 combinedFlags: ElementFlags; 3070 readonly: boolean; 3071 labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration)[]; 3072 } 3073 interface TupleTypeReference extends TypeReference { 3074 target: TupleType; 3075 } 3076 interface UnionOrIntersectionType extends Type { 3077 types: Type[]; 3078 } 3079 interface UnionType extends UnionOrIntersectionType { 3080 } 3081 interface IntersectionType extends UnionOrIntersectionType { 3082 } 3083 type StructuredType = ObjectType | UnionType | IntersectionType; 3084 interface EvolvingArrayType extends ObjectType { 3085 elementType: Type; 3086 finalArrayType?: Type; 3087 } 3088 interface InstantiableType extends Type { 3089 } 3090 interface TypeParameter extends InstantiableType { 3091 } 3092 interface IndexedAccessType extends InstantiableType { 3093 objectType: Type; 3094 indexType: Type; 3095 constraint?: Type; 3096 simplifiedForReading?: Type; 3097 simplifiedForWriting?: Type; 3098 } 3099 type TypeVariable = TypeParameter | IndexedAccessType; 3100 interface IndexType extends InstantiableType { 3101 type: InstantiableType | UnionOrIntersectionType; 3102 } 3103 interface ConditionalRoot { 3104 node: ConditionalTypeNode; 3105 checkType: Type; 3106 extendsType: Type; 3107 isDistributive: boolean; 3108 inferTypeParameters?: TypeParameter[]; 3109 outerTypeParameters?: TypeParameter[]; 3110 instantiations?: Map<Type>; 3111 aliasSymbol?: Symbol; 3112 aliasTypeArguments?: Type[]; 3113 } 3114 interface ConditionalType extends InstantiableType { 3115 root: ConditionalRoot; 3116 checkType: Type; 3117 extendsType: Type; 3118 resolvedTrueType?: Type; 3119 resolvedFalseType?: Type; 3120 } 3121 interface TemplateLiteralType extends InstantiableType { 3122 texts: readonly string[]; 3123 types: readonly Type[]; 3124 } 3125 interface StringMappingType extends InstantiableType { 3126 symbol: Symbol; 3127 type: Type; 3128 } 3129 interface SubstitutionType extends InstantiableType { 3130 objectFlags: ObjectFlags; 3131 baseType: Type; 3132 constraint: Type; 3133 } 3134 enum SignatureKind { 3135 Call = 0, 3136 Construct = 1 3137 } 3138 interface Signature { 3139 declaration?: SignatureDeclaration | JSDocSignature; 3140 typeParameters?: readonly TypeParameter[]; 3141 parameters: readonly Symbol[]; 3142 } 3143 interface Signature { 3144 getDeclaration(): SignatureDeclaration; 3145 getTypeParameters(): TypeParameter[] | undefined; 3146 getParameters(): Symbol[]; 3147 getTypeParameterAtPosition(pos: number): Type; 3148 getReturnType(): Type; 3149 getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[]; 3150 getJsDocTags(): JSDocTagInfo[]; 3151 } 3152 enum IndexKind { 3153 String = 0, 3154 Number = 1 3155 } 3156 interface IndexInfo { 3157 keyType: Type; 3158 type: Type; 3159 isReadonly: boolean; 3160 declaration?: IndexSignatureDeclaration; 3161 } 3162 enum InferencePriority { 3163 NakedTypeVariable = 1, 3164 SpeculativeTuple = 2, 3165 SubstituteSource = 4, 3166 HomomorphicMappedType = 8, 3167 PartialHomomorphicMappedType = 16, 3168 MappedTypeConstraint = 32, 3169 ContravariantConditional = 64, 3170 ReturnType = 128, 3171 LiteralKeyof = 256, 3172 NoConstraints = 512, 3173 AlwaysStrict = 1024, 3174 MaxValue = 2048, 3175 PriorityImpliesCombination = 416, 3176 Circularity = -1 3177 } 3178 /** @deprecated Use FileExtensionInfo instead. */ 3179 type JsFileExtensionInfo = FileExtensionInfo; 3180 interface FileExtensionInfo { 3181 extension: string; 3182 isMixedContent: boolean; 3183 scriptKind?: ScriptKind; 3184 } 3185 interface DiagnosticMessage { 3186 key: string; 3187 category: DiagnosticCategory; 3188 code: number; 3189 message: string; 3190 reportsUnnecessary?: {}; 3191 reportsDeprecated?: {}; 3192 } 3193 /** 3194 * A linked list of formatted diagnostic messages to be used as part of a multiline message. 3195 * It is built from the bottom up, leaving the head to be the "main" diagnostic. 3196 * While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage, 3197 * the difference is that messages are all preformatted in DMC. 3198 */ 3199 interface DiagnosticMessageChain { 3200 messageText: string; 3201 category: DiagnosticCategory; 3202 code: number; 3203 next?: DiagnosticMessageChain[]; 3204 } 3205 interface Diagnostic extends DiagnosticRelatedInformation { 3206 /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */ 3207 reportsUnnecessary?: {}; 3208 reportsDeprecated?: {}; 3209 source?: string; 3210 relatedInformation?: DiagnosticRelatedInformation[]; 3211 } 3212 interface DiagnosticRelatedInformation { 3213 category: DiagnosticCategory; 3214 code: number; 3215 file: SourceFile | undefined; 3216 start: number | undefined; 3217 length: number | undefined; 3218 messageText: string | DiagnosticMessageChain; 3219 } 3220 interface DiagnosticWithLocation extends Diagnostic { 3221 file: SourceFile; 3222 start: number; 3223 length: number; 3224 } 3225 enum DiagnosticCategory { 3226 Warning = 0, 3227 Error = 1, 3228 Suggestion = 2, 3229 Message = 3 3230 } 3231 enum ModuleResolutionKind { 3232 Classic = 1, 3233 NodeJs = 2, 3234 Node16 = 3, 3235 NodeNext = 99 3236 } 3237 enum ModuleDetectionKind { 3238 /** 3239 * Files with imports, exports and/or import.meta are considered modules 3240 */ 3241 Legacy = 1, 3242 /** 3243 * Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node16+ 3244 */ 3245 Auto = 2, 3246 /** 3247 * Consider all non-declaration files modules, regardless of present syntax 3248 */ 3249 Force = 3 3250 } 3251 interface PluginImport { 3252 name: string; 3253 } 3254 interface ProjectReference { 3255 /** A normalized path on disk */ 3256 path: string; 3257 /** The path as the user originally wrote it */ 3258 originalPath?: string; 3259 /** True if the output of this reference should be prepended to the output of this project. Only valid for --outFile compilations */ 3260 prepend?: boolean; 3261 /** True if it is intended that this reference form a circularity */ 3262 circular?: boolean; 3263 } 3264 enum WatchFileKind { 3265 FixedPollingInterval = 0, 3266 PriorityPollingInterval = 1, 3267 DynamicPriorityPolling = 2, 3268 FixedChunkSizePolling = 3, 3269 UseFsEvents = 4, 3270 UseFsEventsOnParentDirectory = 5 3271 } 3272 enum WatchDirectoryKind { 3273 UseFsEvents = 0, 3274 FixedPollingInterval = 1, 3275 DynamicPriorityPolling = 2, 3276 FixedChunkSizePolling = 3 3277 } 3278 enum PollingWatchKind { 3279 FixedInterval = 0, 3280 PriorityInterval = 1, 3281 DynamicPriority = 2, 3282 FixedChunkSize = 3 3283 } 3284 type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined | EtsOptions; 3285 interface CompilerOptions { 3286 allowJs?: boolean; 3287 allowSyntheticDefaultImports?: boolean; 3288 allowUmdGlobalAccess?: boolean; 3289 allowUnreachableCode?: boolean; 3290 allowUnusedLabels?: boolean; 3291 alwaysStrict?: boolean; 3292 baseUrl?: string; 3293 charset?: string; 3294 checkJs?: boolean; 3295 declaration?: boolean; 3296 declarationMap?: boolean; 3297 emitDeclarationOnly?: boolean; 3298 declarationDir?: string; 3299 disableSizeLimit?: boolean; 3300 disableSourceOfProjectReferenceRedirect?: boolean; 3301 disableSolutionSearching?: boolean; 3302 disableReferencedProjectLoad?: boolean; 3303 downlevelIteration?: boolean; 3304 emitBOM?: boolean; 3305 emitDecoratorMetadata?: boolean; 3306 exactOptionalPropertyTypes?: boolean; 3307 experimentalDecorators?: boolean; 3308 forceConsistentCasingInFileNames?: boolean; 3309 importHelpers?: boolean; 3310 importsNotUsedAsValues?: ImportsNotUsedAsValues; 3311 inlineSourceMap?: boolean; 3312 inlineSources?: boolean; 3313 isolatedModules?: boolean; 3314 isolatedDeclarations?: boolean; 3315 jsx?: JsxEmit; 3316 keyofStringsOnly?: boolean; 3317 lib?: string[]; 3318 locale?: string; 3319 mapRoot?: string; 3320 maxNodeModuleJsDepth?: number; 3321 module?: ModuleKind; 3322 moduleResolution?: ModuleResolutionKind; 3323 moduleSuffixes?: string[]; 3324 moduleDetection?: ModuleDetectionKind; 3325 newLine?: NewLineKind; 3326 noEmit?: boolean; 3327 noEmitHelpers?: boolean; 3328 noEmitOnError?: boolean; 3329 noErrorTruncation?: boolean; 3330 noFallthroughCasesInSwitch?: boolean; 3331 noImplicitAny?: boolean; 3332 noImplicitReturns?: boolean; 3333 noImplicitThis?: boolean; 3334 noStrictGenericChecks?: boolean; 3335 noUnusedLocals?: boolean; 3336 noUnusedParameters?: boolean; 3337 noImplicitUseStrict?: boolean; 3338 noPropertyAccessFromIndexSignature?: boolean; 3339 assumeChangesOnlyAffectDirectDependencies?: boolean; 3340 noLib?: boolean; 3341 noResolve?: boolean; 3342 noUncheckedIndexedAccess?: boolean; 3343 out?: string; 3344 outDir?: string; 3345 outFile?: string; 3346 paths?: MapLike<string[]>; 3347 preserveConstEnums?: boolean; 3348 noImplicitOverride?: boolean; 3349 preserveSymlinks?: boolean; 3350 preserveValueImports?: boolean; 3351 project?: string; 3352 reactNamespace?: string; 3353 jsxFactory?: string; 3354 jsxFragmentFactory?: string; 3355 jsxImportSource?: string; 3356 composite?: boolean; 3357 incremental?: boolean; 3358 tsBuildInfoFile?: string; 3359 removeComments?: boolean; 3360 rootDir?: string; 3361 rootDirs?: string[]; 3362 skipLibCheck?: boolean; 3363 skipDefaultLibCheck?: boolean; 3364 sourceMap?: boolean; 3365 sourceRoot?: string; 3366 strict?: boolean; 3367 strictFunctionTypes?: boolean; 3368 strictBindCallApply?: boolean; 3369 strictNullChecks?: boolean; 3370 strictPropertyInitialization?: boolean; 3371 stripInternal?: boolean; 3372 suppressExcessPropertyErrors?: boolean; 3373 suppressImplicitAnyIndexErrors?: boolean; 3374 target?: ScriptTarget; 3375 traceResolution?: boolean; 3376 useUnknownInCatchVariables?: boolean; 3377 resolveJsonModule?: boolean; 3378 types?: string[]; 3379 /** Paths used to compute primary types search locations */ 3380 typeRoots?: string[]; 3381 esModuleInterop?: boolean; 3382 useDefineForClassFields?: boolean; 3383 ets?: EtsOptions; 3384 packageManagerType?: string; 3385 emitNodeModulesFiles?: boolean; 3386 etsLoaderPath?: string; 3387 tsImportSendableEnable?: boolean; 3388 skipPathsInKeyForCompilationSettings?: boolean; 3389 compatibleSdkVersion?: number; 3390 compatibleSdkVersionStage?: string; 3391 noTransformedKitInParser?: boolean; 3392 [option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined; 3393 etsAnnotationsEnable?: boolean; 3394 maxFlowDepth?: number; 3395 skipOhModulesLint?: boolean; 3396 mixCompile?: boolean; 3397 } 3398 interface EtsOptions { 3399 render: { 3400 method: string[]; 3401 decorator: string[]; 3402 }; 3403 components: string[]; 3404 libs: string[]; 3405 extend: { 3406 decorator: string[]; 3407 components: { 3408 name: string; 3409 type: string; 3410 instance: string; 3411 }[]; 3412 }; 3413 styles: { 3414 decorator: string; 3415 component: { 3416 name: string; 3417 type: string; 3418 instance: string; 3419 }; 3420 property: string; 3421 }; 3422 concurrent: { 3423 decorator: string; 3424 }; 3425 customComponent?: string; 3426 propertyDecorators: { 3427 name: string; 3428 needInitialization: boolean; 3429 }[]; 3430 emitDecorators: { 3431 name: string; 3432 emitParameters: boolean; 3433 }[]; 3434 syntaxComponents: { 3435 paramsUICallback: string[]; 3436 attrUICallback: { 3437 name: string; 3438 attributes: string[]; 3439 }[]; 3440 }; 3441 } 3442 interface WatchOptions { 3443 watchFile?: WatchFileKind; 3444 watchDirectory?: WatchDirectoryKind; 3445 fallbackPolling?: PollingWatchKind; 3446 synchronousWatchDirectory?: boolean; 3447 excludeDirectories?: string[]; 3448 excludeFiles?: string[]; 3449 [option: string]: CompilerOptionsValue | undefined; 3450 } 3451 interface TypeAcquisition { 3452 /** 3453 * @deprecated typingOptions.enableAutoDiscovery 3454 * Use typeAcquisition.enable instead. 3455 */ 3456 enableAutoDiscovery?: boolean; 3457 enable?: boolean; 3458 include?: string[]; 3459 exclude?: string[]; 3460 disableFilenameBasedTypeAcquisition?: boolean; 3461 [option: string]: CompilerOptionsValue | undefined; 3462 } 3463 enum ModuleKind { 3464 None = 0, 3465 CommonJS = 1, 3466 AMD = 2, 3467 UMD = 3, 3468 System = 4, 3469 ES2015 = 5, 3470 ES2020 = 6, 3471 ES2022 = 7, 3472 ESNext = 99, 3473 Node16 = 100, 3474 NodeNext = 199 3475 } 3476 enum JsxEmit { 3477 None = 0, 3478 Preserve = 1, 3479 React = 2, 3480 ReactNative = 3, 3481 ReactJSX = 4, 3482 ReactJSXDev = 5 3483 } 3484 enum ImportsNotUsedAsValues { 3485 Remove = 0, 3486 Preserve = 1, 3487 Error = 2 3488 } 3489 enum NewLineKind { 3490 CarriageReturnLineFeed = 0, 3491 LineFeed = 1 3492 } 3493 interface LineAndCharacter { 3494 /** 0-based. */ 3495 line: number; 3496 character: number; 3497 } 3498 enum ScriptKind { 3499 Unknown = 0, 3500 JS = 1, 3501 JSX = 2, 3502 TS = 3, 3503 TSX = 4, 3504 External = 5, 3505 JSON = 6, 3506 /** 3507 * Used on extensions that doesn't define the ScriptKind but the content defines it. 3508 * Deferred extensions are going to be included in all project contexts. 3509 */ 3510 Deferred = 7, 3511 ETS = 8 3512 } 3513 enum ScriptTarget { 3514 ES3 = 0, 3515 ES5 = 1, 3516 ES2015 = 2, 3517 ES2016 = 3, 3518 ES2017 = 4, 3519 ES2018 = 5, 3520 ES2019 = 6, 3521 ES2020 = 7, 3522 ES2021 = 8, 3523 ES2022 = 9, 3524 ESNext = 99, 3525 JSON = 100, 3526 Latest = 99 3527 } 3528 enum LanguageVariant { 3529 Standard = 0, 3530 JSX = 1 3531 } 3532 /** Either a parsed command line or a parsed tsconfig.json */ 3533 interface ParsedCommandLine { 3534 options: CompilerOptions; 3535 typeAcquisition?: TypeAcquisition; 3536 fileNames: string[]; 3537 projectReferences?: readonly ProjectReference[]; 3538 watchOptions?: WatchOptions; 3539 raw?: any; 3540 errors: Diagnostic[]; 3541 wildcardDirectories?: MapLike<WatchDirectoryFlags>; 3542 compileOnSave?: boolean; 3543 } 3544 enum WatchDirectoryFlags { 3545 None = 0, 3546 Recursive = 1 3547 } 3548 interface CreateProgramOptions { 3549 rootNames: readonly string[]; 3550 options: CompilerOptions; 3551 projectReferences?: readonly ProjectReference[]; 3552 host?: CompilerHost; 3553 oldProgram?: Program; 3554 configFileParsingDiagnostics?: readonly Diagnostic[]; 3555 } 3556 interface ModuleResolutionHost { 3557 fileExists(fileName: string): boolean; 3558 readFile(fileName: string): string | undefined; 3559 trace?(s: string): void; 3560 directoryExists?(directoryName: string): boolean; 3561 /** 3562 * Resolve a symbolic link. 3563 * @see https://nodejs.org/api/fs.html#fs_fs_realpathsync_path_options 3564 */ 3565 realpath?(path: string): string; 3566 getCurrentDirectory?(): string; 3567 getDirectories?(path: string): string[]; 3568 useCaseSensitiveFileNames?: boolean | (() => boolean) | undefined; 3569 getJsDocNodeCheckedConfig?(jsDocFileCheckInfo: FileCheckModuleInfo, symbolSourceFilePath: string): JsDocNodeCheckConfig; 3570 getJsDocNodeConditionCheckedResult?(jsDocFileCheckedInfo: FileCheckModuleInfo, jsDocTagInfos: JsDocTagInfo[], jsDocs?: JSDoc[]): ConditionCheckResult; 3571 getFileCheckedModuleInfo?(containFilePath: string): FileCheckModuleInfo; 3572 } 3573 /** 3574 * Used by services to specify the minimum host area required to set up source files under any compilation settings 3575 */ 3576 interface MinimalResolutionCacheHost extends ModuleResolutionHost { 3577 getCompilationSettings(): CompilerOptions; 3578 getCompilerHost?(): CompilerHost | undefined; 3579 } 3580 /** 3581 * Represents the result of module resolution. 3582 * Module resolution will pick up tsx/jsx/js files even if '--jsx' and '--allowJs' are turned off. 3583 * The Program will then filter results based on these flags. 3584 * 3585 * Prefer to return a `ResolvedModuleFull` so that the file type does not have to be inferred. 3586 */ 3587 interface ResolvedModule { 3588 /** Path of the file the module was resolved to. */ 3589 resolvedFileName: string; 3590 /** True if `resolvedFileName` comes from `node_modules`. */ 3591 isExternalLibraryImport?: boolean; 3592 } 3593 /** 3594 * ResolvedModule with an explicitly provided `extension` property. 3595 * Prefer this over `ResolvedModule`. 3596 * If changing this, remember to change `moduleResolutionIsEqualTo`. 3597 */ 3598 interface ResolvedModuleFull extends ResolvedModule { 3599 /** 3600 * Extension of resolvedFileName. This must match what's at the end of resolvedFileName. 3601 * This is optional for backwards-compatibility, but will be added if not provided. 3602 */ 3603 extension: Extension; 3604 packageId?: PackageId; 3605 } 3606 /** 3607 * Unique identifier with a package name and version. 3608 * If changing this, remember to change `packageIdIsEqual`. 3609 */ 3610 interface PackageId { 3611 /** 3612 * Name of the package. 3613 * Should not include `@types`. 3614 * If accessing a non-index file, this should include its name e.g. "foo/bar". 3615 */ 3616 name: string; 3617 /** 3618 * Name of a submodule within this package. 3619 * May be "". 3620 */ 3621 subModuleName: string; 3622 /** Version of the package, e.g. "1.2.3" */ 3623 version: string; 3624 } 3625 enum Extension { 3626 Ts = ".ts", 3627 Tsx = ".tsx", 3628 Dts = ".d.ts", 3629 Js = ".js", 3630 Jsx = ".jsx", 3631 Json = ".json", 3632 TsBuildInfo = ".tsbuildinfo", 3633 Mjs = ".mjs", 3634 Mts = ".mts", 3635 Dmts = ".d.mts", 3636 Cjs = ".cjs", 3637 Cts = ".cts", 3638 Dcts = ".d.cts", 3639 Ets = ".ets", 3640 Dets = ".d.ets" 3641 } 3642 interface ResolvedModuleWithFailedLookupLocations { 3643 readonly resolvedModule: ResolvedModuleFull | undefined; 3644 } 3645 interface ResolvedTypeReferenceDirective { 3646 primary: boolean; 3647 resolvedFileName: string | undefined; 3648 packageId?: PackageId; 3649 /** True if `resolvedFileName` comes from `node_modules` or `oh_modules`. */ 3650 isExternalLibraryImport?: boolean; 3651 } 3652 interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations { 3653 readonly resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective | undefined; 3654 readonly failedLookupLocations: string[]; 3655 } 3656 interface FileCheckModuleInfo { 3657 fileNeedCheck: boolean; 3658 checkPayload: any; 3659 currentFileName: string; 3660 tagName?: string[]; 3661 } 3662 interface JsDocNodeCheckConfig { 3663 nodeNeedCheck: boolean; 3664 checkConfig: JsDocNodeCheckConfigItem[]; 3665 } 3666 interface JsDocNodeCheckConfigItem { 3667 tagName: string[]; 3668 message: string; 3669 needConditionCheck: boolean; 3670 type: DiagnosticCategory; 3671 specifyCheckConditionFuncName: string; 3672 tagNameShouldExisted: boolean; 3673 checkValidCallback?: (jsDocTag: JSDocTag, config: JsDocNodeCheckConfigItem) => boolean; 3674 checkJsDocSpecialValidCallback?: (jsDocTags: readonly JSDocTag[], config: JsDocNodeCheckConfigItem) => boolean; 3675 checkConditionValidCallback?: (node: CallExpression, specifyFuncName: string, importSymbol: string, jsDocs?: JSDoc[]) => boolean; 3676 } 3677 interface TagCheckParam { 3678 needCheck: boolean; 3679 checkConfig: TagCheckConfig[]; 3680 } 3681 interface TagCheckConfig { 3682 tagName: string; 3683 message: string; 3684 needConditionCheck: boolean; 3685 specifyCheckConditionFuncName: string; 3686 } 3687 interface ConditionCheckResult { 3688 valid: boolean; 3689 type?: DiagnosticCategory; 3690 message?: string; 3691 } 3692 interface CompilerHost extends ModuleResolutionHost { 3693 getSourceFile(fileName: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean, options?: CompilerOptions): SourceFile | undefined; 3694 getSourceFileByPath?(fileName: string, path: Path, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined; 3695 getCancellationToken?(): CancellationToken; 3696 getDefaultLibFileName(options: CompilerOptions): string; 3697 getDefaultLibLocation?(): string; 3698 writeFile: WriteFileCallback; 3699 getCurrentDirectory(): string; 3700 getCanonicalFileName(fileName: string): string; 3701 useCaseSensitiveFileNames(): boolean; 3702 getNewLine(): string; 3703 readDirectory?(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): string[]; 3704 resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[]; 3705 /** 3706 * Returns the module resolution cache used by a provided `resolveModuleNames` implementation so that any non-name module resolution operations (eg, package.json lookup) can reuse it 3707 */ 3708 getModuleResolutionCache?(): ModuleResolutionCache | undefined; 3709 /** 3710 * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files 3711 */ 3712 resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[]; 3713 getEnvironmentVariable?(name: string): string | undefined; 3714 /** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */ 3715 hasInvalidatedResolutions?(filePath: Path): boolean; 3716 createHash?(data: string): string; 3717 getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; 3718 /** 3719 * get tagName where need to be determined based on the file path 3720 * @param jsDocFileCheckInfo filePath 3721 * @param symbolSourceFilePath filePath 3722 */ 3723 getJsDocNodeCheckedConfig?(jsDocFileCheckInfo: FileCheckModuleInfo, symbolSourceFilePath: string): JsDocNodeCheckConfig; 3724 /** 3725 * get checked results based on the file path and jsDocs 3726 * @param jsDocFileCheckedInfo 3727 * @param jsDocs 3728 */ 3729 getJsDocNodeConditionCheckedResult?(jsDocFileCheckedInfo: FileCheckModuleInfo, jsDocTagInfos: JsDocTagInfo[], jsDocs?: JSDoc[]): ConditionCheckResult; 3730 getFileCheckedModuleInfo?(containFilePath: string): FileCheckModuleInfo; 3731 getLastCompiledProgram?(): Program; 3732 isStaticSourceFile?(filePath: string): boolean; 3733 } 3734 interface SourceMapRange extends TextRange { 3735 source?: SourceMapSource; 3736 } 3737 interface SourceMapSource { 3738 fileName: string; 3739 text: string; 3740 skipTrivia?: (pos: number) => number; 3741 } 3742 interface SourceMapSource { 3743 getLineAndCharacterOfPosition(pos: number): LineAndCharacter; 3744 } 3745 enum EmitFlags { 3746 None = 0, 3747 SingleLine = 1, 3748 AdviseOnEmitNode = 2, 3749 NoSubstitution = 4, 3750 CapturesThis = 8, 3751 NoLeadingSourceMap = 16, 3752 NoTrailingSourceMap = 32, 3753 NoSourceMap = 48, 3754 NoNestedSourceMaps = 64, 3755 NoTokenLeadingSourceMaps = 128, 3756 NoTokenTrailingSourceMaps = 256, 3757 NoTokenSourceMaps = 384, 3758 NoLeadingComments = 512, 3759 NoTrailingComments = 1024, 3760 NoComments = 1536, 3761 NoNestedComments = 2048, 3762 HelperName = 4096, 3763 ExportName = 8192, 3764 LocalName = 16384, 3765 InternalName = 32768, 3766 Indented = 65536, 3767 NoIndentation = 131072, 3768 AsyncFunctionBody = 262144, 3769 ReuseTempVariableScope = 524288, 3770 CustomPrologue = 1048576, 3771 NoHoisting = 2097152, 3772 HasEndOfDeclarationMarker = 4194304, 3773 Iterator = 8388608, 3774 NoAsciiEscaping = 16777216 3775 } 3776 interface EmitHelperBase { 3777 readonly name: string; 3778 readonly scoped: boolean; 3779 readonly text: string | ((node: EmitHelperUniqueNameCallback) => string); 3780 readonly priority?: number; 3781 readonly dependencies?: EmitHelper[]; 3782 } 3783 interface ScopedEmitHelper extends EmitHelperBase { 3784 readonly scoped: true; 3785 } 3786 interface UnscopedEmitHelper extends EmitHelperBase { 3787 readonly scoped: false; 3788 readonly text: string; 3789 } 3790 type EmitHelper = ScopedEmitHelper | UnscopedEmitHelper; 3791 type EmitHelperUniqueNameCallback = (name: string) => string; 3792 enum EmitHint { 3793 SourceFile = 0, 3794 Expression = 1, 3795 IdentifierName = 2, 3796 MappedTypeParameter = 3, 3797 Unspecified = 4, 3798 EmbeddedStatement = 5, 3799 JsxAttributeValue = 6 3800 } 3801 interface SourceFileMayBeEmittedHost { 3802 getCompilerOptions(): CompilerOptions; 3803 isSourceFileFromExternalLibrary(file: SourceFile): boolean; 3804 getResolvedProjectReferenceToRedirect(fileName: string): ResolvedProjectReference | undefined; 3805 isSourceOfProjectReferenceRedirect(fileName: string): boolean; 3806 } 3807 interface EmitHost extends ScriptReferenceHost, ModuleSpecifierResolutionHost, SourceFileMayBeEmittedHost { 3808 getSourceFiles(): readonly SourceFile[]; 3809 useCaseSensitiveFileNames(): boolean; 3810 getCurrentDirectory(): string; 3811 getLibFileFromReference(ref: FileReference): SourceFile | undefined; 3812 getCommonSourceDirectory(): string; 3813 getCanonicalFileName(fileName: string): string; 3814 getNewLine(): string; 3815 isEmitBlocked(emitFileName: string): boolean; 3816 getPrependNodes(): readonly (InputFiles | UnparsedSource)[]; 3817 writeFile: WriteFileCallback; 3818 getSourceFileFromReference: Program["getSourceFileFromReference"]; 3819 readonly redirectTargetsMap: RedirectTargetsMap; 3820 createHash?(data: string): string; 3821 } 3822 enum OuterExpressionKinds { 3823 Parentheses = 1, 3824 TypeAssertions = 2, 3825 NonNullAssertions = 4, 3826 PartiallyEmittedExpressions = 8, 3827 Assertions = 6, 3828 All = 15, 3829 ExcludeJSDocTypeAssertion = 16 3830 } 3831 type TypeOfTag = "undefined" | "number" | "bigint" | "boolean" | "string" | "symbol" | "object" | "function"; 3832 interface NodeFactory { 3833 createNodeArray<T extends Node>(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray<T>; 3834 createNumericLiteral(value: string | number, numericLiteralFlags?: TokenFlags): NumericLiteral; 3835 createBigIntLiteral(value: string | PseudoBigInt): BigIntLiteral; 3836 createStringLiteral(text: string, isSingleQuote?: boolean): StringLiteral; 3837 createStringLiteralFromNode(sourceNode: PropertyNameLiteral | PrivateIdentifier, isSingleQuote?: boolean): StringLiteral; 3838 createRegularExpressionLiteral(text: string): RegularExpressionLiteral; 3839 createIdentifier(text: string): Identifier; 3840 /** 3841 * Create a unique temporary variable. 3842 * @param recordTempVariable An optional callback used to record the temporary variable name. This 3843 * should usually be a reference to `hoistVariableDeclaration` from a `TransformationContext`, but 3844 * can be `undefined` if you plan to record the temporary variable manually. 3845 * @param reservedInNestedScopes When `true`, reserves the temporary variable name in all nested scopes 3846 * during emit so that the variable can be referenced in a nested function body. This is an alternative to 3847 * setting `EmitFlags.ReuseTempVariableScope` on the nested function itself. 3848 */ 3849 createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined, reservedInNestedScopes?: boolean): Identifier; 3850 /** 3851 * Create a unique temporary variable for use in a loop. 3852 * @param reservedInNestedScopes When `true`, reserves the temporary variable name in all nested scopes 3853 * during emit so that the variable can be referenced in a nested function body. This is an alternative to 3854 * setting `EmitFlags.ReuseTempVariableScope` on the nested function itself. 3855 */ 3856 createLoopVariable(reservedInNestedScopes?: boolean): Identifier; 3857 /** Create a unique name based on the supplied text. */ 3858 createUniqueName(text: string, flags?: GeneratedIdentifierFlags): Identifier; 3859 /** Create a unique name generated for a node. */ 3860 getGeneratedNameForNode(node: Node | undefined, flags?: GeneratedIdentifierFlags): Identifier; 3861 createPrivateIdentifier(text: string): PrivateIdentifier; 3862 createUniquePrivateName(text?: string): PrivateIdentifier; 3863 getGeneratedPrivateNameForNode(node: Node): PrivateIdentifier; 3864 createToken(token: SyntaxKind.SuperKeyword): SuperExpression; 3865 createToken(token: SyntaxKind.ThisKeyword): ThisExpression; 3866 createToken(token: SyntaxKind.NullKeyword): NullLiteral; 3867 createToken(token: SyntaxKind.TrueKeyword): TrueLiteral; 3868 createToken(token: SyntaxKind.FalseKeyword): FalseLiteral; 3869 createToken<TKind extends PunctuationSyntaxKind>(token: TKind): PunctuationToken<TKind>; 3870 createToken<TKind extends KeywordTypeSyntaxKind>(token: TKind): KeywordTypeNode<TKind>; 3871 createToken<TKind extends ModifierSyntaxKind>(token: TKind): ModifierToken<TKind>; 3872 createToken<TKind extends KeywordSyntaxKind>(token: TKind): KeywordToken<TKind>; 3873 createToken<TKind extends SyntaxKind.Unknown | SyntaxKind.EndOfFileToken>(token: TKind): Token<TKind>; 3874 createSuper(): SuperExpression; 3875 createThis(): ThisExpression; 3876 createNull(): NullLiteral; 3877 createTrue(): TrueLiteral; 3878 createFalse(): FalseLiteral; 3879 createModifier<T extends ModifierSyntaxKind>(kind: T): ModifierToken<T>; 3880 createModifiersFromModifierFlags(flags: ModifierFlags): Modifier[] | undefined; 3881 createQualifiedName(left: EntityName, right: string | Identifier): QualifiedName; 3882 updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName; 3883 createComputedPropertyName(expression: Expression): ComputedPropertyName; 3884 updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName; 3885 createTypeParameterDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; 3886 updateTypeParameterDeclaration(node: TypeParameterDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; 3887 createParameterDeclaration(modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration; 3888 updateParameterDeclaration(node: ParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration; 3889 createDecorator(expression: Expression, annotationDeclaration?: AnnotationDeclaration): Decorator; 3890 updateDecorator(node: Decorator, expression: Expression, annotationDeclaration?: AnnotationDeclaration): Decorator; 3891 createPropertySignature(modifiers: readonly Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined): PropertySignature; 3892 updatePropertySignature(node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined): PropertySignature; 3893 createPropertyDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 3894 updatePropertyDeclaration(node: PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 3895 createAnnotationPropertyDeclaration(name: string | PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): AnnotationPropertyDeclaration; 3896 updateAnnotationPropertyDeclaration(node: AnnotationPropertyDeclaration, name: string | PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): AnnotationPropertyDeclaration; 3897 createMethodSignature(modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): MethodSignature; 3898 updateMethodSignature(node: MethodSignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): MethodSignature; 3899 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; 3900 updateMethodDeclaration(node: MethodDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration; 3901 createConstructorDeclaration(modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 3902 updateConstructorDeclaration(node: ConstructorDeclaration, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 3903 createGetAccessorDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 3904 updateGetAccessorDeclaration(node: GetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 3905 createSetAccessorDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 3906 updateSetAccessorDeclaration(node: SetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 3907 createCallSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): CallSignatureDeclaration; 3908 updateCallSignature(node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): CallSignatureDeclaration; 3909 createConstructSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): ConstructSignatureDeclaration; 3910 updateConstructSignature(node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructSignatureDeclaration; 3911 createIndexSignature(modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; 3912 updateIndexSignature(node: IndexSignatureDeclaration, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; 3913 createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan; 3914 updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan; 3915 createClassStaticBlockDeclaration(body: Block): ClassStaticBlockDeclaration; 3916 updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, body: Block): ClassStaticBlockDeclaration; 3917 createKeywordTypeNode<TKind extends KeywordTypeSyntaxKind>(kind: TKind): KeywordTypeNode<TKind>; 3918 createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode; 3919 updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode; 3920 createTypeReferenceNode(typeName: string | EntityName, typeArguments?: readonly TypeNode[]): TypeReferenceNode; 3921 updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined): TypeReferenceNode; 3922 createFunctionTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): FunctionTypeNode; 3923 updateFunctionTypeNode(node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): FunctionTypeNode; 3924 createConstructorTypeNode(modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode; 3925 updateConstructorTypeNode(node: ConstructorTypeNode, modifiers: readonly Modifier[] | undefined, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode; 3926 createTypeQueryNode(exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode; 3927 updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode; 3928 createTypeLiteralNode(members: readonly TypeElement[] | undefined): TypeLiteralNode; 3929 updateTypeLiteralNode(node: TypeLiteralNode, members: NodeArray<TypeElement>): TypeLiteralNode; 3930 createArrayTypeNode(elementType: TypeNode): ArrayTypeNode; 3931 updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode; 3932 createTupleTypeNode(elements: readonly (TypeNode | NamedTupleMember)[]): TupleTypeNode; 3933 updateTupleTypeNode(node: TupleTypeNode, elements: readonly (TypeNode | NamedTupleMember)[]): TupleTypeNode; 3934 createNamedTupleMember(dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember; 3935 updateNamedTupleMember(node: NamedTupleMember, dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember; 3936 createOptionalTypeNode(type: TypeNode): OptionalTypeNode; 3937 updateOptionalTypeNode(node: OptionalTypeNode, type: TypeNode): OptionalTypeNode; 3938 createRestTypeNode(type: TypeNode): RestTypeNode; 3939 updateRestTypeNode(node: RestTypeNode, type: TypeNode): RestTypeNode; 3940 createUnionTypeNode(types: readonly TypeNode[]): UnionTypeNode; 3941 updateUnionTypeNode(node: UnionTypeNode, types: NodeArray<TypeNode>): UnionTypeNode; 3942 createIntersectionTypeNode(types: readonly TypeNode[]): IntersectionTypeNode; 3943 updateIntersectionTypeNode(node: IntersectionTypeNode, types: NodeArray<TypeNode>): IntersectionTypeNode; 3944 createConditionalTypeNode(checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode; 3945 updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode; 3946 createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode; 3947 updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode; 3948 createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; 3949 updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode; 3950 createParenthesizedType(type: TypeNode): ParenthesizedTypeNode; 3951 updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode; 3952 createThisTypeNode(): ThisTypeNode; 3953 createTypeOperatorNode(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode; 3954 updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode; 3955 createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; 3956 updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; 3957 createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined, members: NodeArray<TypeElement> | undefined): MappedTypeNode; 3958 updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined, members: NodeArray<TypeElement> | undefined): MappedTypeNode; 3959 createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode; 3960 updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]): LiteralTypeNode; 3961 createTemplateLiteralType(head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; 3962 updateTemplateLiteralType(node: TemplateLiteralTypeNode, head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; 3963 createObjectBindingPattern(elements: readonly BindingElement[]): ObjectBindingPattern; 3964 updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]): ObjectBindingPattern; 3965 createArrayBindingPattern(elements: readonly ArrayBindingElement[]): ArrayBindingPattern; 3966 updateArrayBindingPattern(node: ArrayBindingPattern, elements: readonly ArrayBindingElement[]): ArrayBindingPattern; 3967 createBindingElement(dotDotDotToken: DotDotDotToken | undefined, propertyName: string | PropertyName | undefined, name: string | BindingName, initializer?: Expression): BindingElement; 3968 updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, initializer: Expression | undefined): BindingElement; 3969 createArrayLiteralExpression(elements?: readonly Expression[], multiLine?: boolean): ArrayLiteralExpression; 3970 updateArrayLiteralExpression(node: ArrayLiteralExpression, elements: readonly Expression[]): ArrayLiteralExpression; 3971 createObjectLiteralExpression(properties?: readonly ObjectLiteralElementLike[], multiLine?: boolean): ObjectLiteralExpression; 3972 updateObjectLiteralExpression(node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]): ObjectLiteralExpression; 3973 createPropertyAccessExpression(expression: Expression, name: string | MemberName): PropertyAccessExpression; 3974 updatePropertyAccessExpression(node: PropertyAccessExpression, expression: Expression, name: MemberName): PropertyAccessExpression; 3975 createPropertyAccessChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, name: string | MemberName): PropertyAccessChain; 3976 updatePropertyAccessChain(node: PropertyAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: MemberName): PropertyAccessChain; 3977 createElementAccessExpression(expression: Expression, index: number | Expression): ElementAccessExpression; 3978 updateElementAccessExpression(node: ElementAccessExpression, expression: Expression, argumentExpression: Expression): ElementAccessExpression; 3979 createElementAccessChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, index: number | Expression): ElementAccessChain; 3980 updateElementAccessChain(node: ElementAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression): ElementAccessChain; 3981 createCallExpression(expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): CallExpression; 3982 updateCallExpression(node: CallExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]): CallExpression; 3983 createCallChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): CallChain; 3984 updateCallChain(node: CallChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]): CallChain; 3985 createNewExpression(expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): NewExpression; 3986 updateNewExpression(node: NewExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): NewExpression; 3987 createTaggedTemplateExpression(tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; 3988 updateTaggedTemplateExpression(node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; 3989 createTypeAssertion(type: TypeNode, expression: Expression): TypeAssertion; 3990 updateTypeAssertion(node: TypeAssertion, type: TypeNode, expression: Expression): TypeAssertion; 3991 createParenthesizedExpression(expression: Expression): ParenthesizedExpression; 3992 updateParenthesizedExpression(node: ParenthesizedExpression, expression: Expression): ParenthesizedExpression; 3993 createFunctionExpression(modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[] | undefined, type: TypeNode | undefined, body: Block): FunctionExpression; 3994 updateFunctionExpression(node: FunctionExpression, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block): FunctionExpression; 3995 createArrowFunction(modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction; 3996 updateArrowFunction(node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction; 3997 createEtsComponentExpression(name: Expression, argumentExpression: Expression[] | NodeArray<Expression> | undefined, body: Block | undefined): EtsComponentExpression; 3998 updateEtsComponentExpression(node: EtsComponentExpression, name: Expression | undefined, argumentExpression: Expression[] | NodeArray<Expression> | undefined, body: Block | undefined): EtsComponentExpression; 3999 createDeleteExpression(expression: Expression): DeleteExpression; 4000 updateDeleteExpression(node: DeleteExpression, expression: Expression): DeleteExpression; 4001 createTypeOfExpression(expression: Expression): TypeOfExpression; 4002 updateTypeOfExpression(node: TypeOfExpression, expression: Expression): TypeOfExpression; 4003 createVoidExpression(expression: Expression): VoidExpression; 4004 updateVoidExpression(node: VoidExpression, expression: Expression): VoidExpression; 4005 createAwaitExpression(expression: Expression): AwaitExpression; 4006 updateAwaitExpression(node: AwaitExpression, expression: Expression): AwaitExpression; 4007 createPrefixUnaryExpression(operator: PrefixUnaryOperator, operand: Expression): PrefixUnaryExpression; 4008 updatePrefixUnaryExpression(node: PrefixUnaryExpression, operand: Expression): PrefixUnaryExpression; 4009 createPostfixUnaryExpression(operand: Expression, operator: PostfixUnaryOperator): PostfixUnaryExpression; 4010 updatePostfixUnaryExpression(node: PostfixUnaryExpression, operand: Expression): PostfixUnaryExpression; 4011 createBinaryExpression(left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression; 4012 updateBinaryExpression(node: BinaryExpression, left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression; 4013 createConditionalExpression(condition: Expression, questionToken: QuestionToken | undefined, whenTrue: Expression, colonToken: ColonToken | undefined, whenFalse: Expression): ConditionalExpression; 4014 updateConditionalExpression(node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression; 4015 createTemplateExpression(head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression; 4016 updateTemplateExpression(node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression; 4017 createTemplateHead(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateHead; 4018 createTemplateHead(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateHead; 4019 createTemplateMiddle(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateMiddle; 4020 createTemplateMiddle(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateMiddle; 4021 createTemplateTail(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateTail; 4022 createTemplateTail(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateTail; 4023 createNoSubstitutionTemplateLiteral(text: string, rawText?: string): NoSubstitutionTemplateLiteral; 4024 createNoSubstitutionTemplateLiteral(text: string | undefined, rawText: string): NoSubstitutionTemplateLiteral; 4025 createYieldExpression(asteriskToken: AsteriskToken, expression: Expression): YieldExpression; 4026 createYieldExpression(asteriskToken: undefined, expression: Expression | undefined): YieldExpression; 4027 updateYieldExpression(node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression | undefined): YieldExpression; 4028 createSpreadElement(expression: Expression): SpreadElement; 4029 updateSpreadElement(node: SpreadElement, expression: Expression): SpreadElement; 4030 createClassExpression(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; 4031 updateClassExpression(node: ClassExpression, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; 4032 createOmittedExpression(): OmittedExpression; 4033 createExpressionWithTypeArguments(expression: Expression, typeArguments: readonly TypeNode[] | undefined): ExpressionWithTypeArguments; 4034 updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, expression: Expression, typeArguments: readonly TypeNode[] | undefined): ExpressionWithTypeArguments; 4035 createAsExpression(expression: Expression, type: TypeNode): AsExpression; 4036 updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression; 4037 createNonNullExpression(expression: Expression): NonNullExpression; 4038 updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression; 4039 createNonNullChain(expression: Expression): NonNullChain; 4040 updateNonNullChain(node: NonNullChain, expression: Expression): NonNullChain; 4041 createMetaProperty(keywordToken: MetaProperty["keywordToken"], name: Identifier): MetaProperty; 4042 updateMetaProperty(node: MetaProperty, name: Identifier): MetaProperty; 4043 createSatisfiesExpression(expression: Expression, type: TypeNode): SatisfiesExpression; 4044 updateSatisfiesExpression(node: SatisfiesExpression, expression: Expression, type: TypeNode): SatisfiesExpression; 4045 createTemplateSpan(expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan; 4046 updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan; 4047 createSemicolonClassElement(): SemicolonClassElement; 4048 createBlock(statements: readonly Statement[], multiLine?: boolean): Block; 4049 updateBlock(node: Block, statements: readonly Statement[]): Block; 4050 createVariableStatement(modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList | readonly VariableDeclaration[]): VariableStatement; 4051 updateVariableStatement(node: VariableStatement, modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList): VariableStatement; 4052 createEmptyStatement(): EmptyStatement; 4053 createExpressionStatement(expression: Expression): ExpressionStatement; 4054 updateExpressionStatement(node: ExpressionStatement, expression: Expression): ExpressionStatement; 4055 createIfStatement(expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement; 4056 updateIfStatement(node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined): IfStatement; 4057 createDoStatement(statement: Statement, expression: Expression): DoStatement; 4058 updateDoStatement(node: DoStatement, statement: Statement, expression: Expression): DoStatement; 4059 createWhileStatement(expression: Expression, statement: Statement): WhileStatement; 4060 updateWhileStatement(node: WhileStatement, expression: Expression, statement: Statement): WhileStatement; 4061 createForStatement(initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement; 4062 updateForStatement(node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement; 4063 createForInStatement(initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement; 4064 updateForInStatement(node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement; 4065 createForOfStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement; 4066 updateForOfStatement(node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement; 4067 createContinueStatement(label?: string | Identifier): ContinueStatement; 4068 updateContinueStatement(node: ContinueStatement, label: Identifier | undefined): ContinueStatement; 4069 createBreakStatement(label?: string | Identifier): BreakStatement; 4070 updateBreakStatement(node: BreakStatement, label: Identifier | undefined): BreakStatement; 4071 createReturnStatement(expression?: Expression): ReturnStatement; 4072 updateReturnStatement(node: ReturnStatement, expression: Expression | undefined): ReturnStatement; 4073 createWithStatement(expression: Expression, statement: Statement): WithStatement; 4074 updateWithStatement(node: WithStatement, expression: Expression, statement: Statement): WithStatement; 4075 createSwitchStatement(expression: Expression, caseBlock: CaseBlock): SwitchStatement; 4076 updateSwitchStatement(node: SwitchStatement, expression: Expression, caseBlock: CaseBlock): SwitchStatement; 4077 createLabeledStatement(label: string | Identifier, statement: Statement): LabeledStatement; 4078 updateLabeledStatement(node: LabeledStatement, label: Identifier, statement: Statement): LabeledStatement; 4079 createThrowStatement(expression: Expression): ThrowStatement; 4080 updateThrowStatement(node: ThrowStatement, expression: Expression): ThrowStatement; 4081 createTryStatement(tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement; 4082 updateTryStatement(node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement; 4083 createDebuggerStatement(): DebuggerStatement; 4084 createVariableDeclaration(name: string | BindingName, exclamationToken?: ExclamationToken, type?: TypeNode, initializer?: Expression): VariableDeclaration; 4085 updateVariableDeclaration(node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; 4086 createVariableDeclarationList(declarations: readonly VariableDeclaration[], flags?: NodeFlags): VariableDeclarationList; 4087 updateVariableDeclarationList(node: VariableDeclarationList, declarations: readonly VariableDeclaration[]): VariableDeclarationList; 4088 createFunctionDeclaration(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration; 4089 updateFunctionDeclaration(node: FunctionDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration; 4090 createClassDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; 4091 updateClassDeclaration(node: ClassDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; 4092 createStructDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): StructDeclaration; 4093 updateStructDeclaration(node: StructDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): StructDeclaration; 4094 createAnnotationDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, members: readonly AnnotationElement[]): AnnotationDeclaration; 4095 updateAnnotationDeclaration(node: AnnotationDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, members: readonly AnnotationElement[]): AnnotationDeclaration; 4096 createInterfaceDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 4097 updateInterfaceDeclaration(node: InterfaceDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 4098 createTypeAliasDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 4099 updateTypeAliasDeclaration(node: TypeAliasDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 4100 createEnumDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration; 4101 updateEnumDeclaration(node: EnumDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; 4102 createModuleDeclaration(modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration; 4103 updateModuleDeclaration(node: ModuleDeclaration, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration; 4104 createModuleBlock(statements: readonly Statement[]): ModuleBlock; 4105 updateModuleBlock(node: ModuleBlock, statements: readonly Statement[]): ModuleBlock; 4106 createCaseBlock(clauses: readonly CaseOrDefaultClause[]): CaseBlock; 4107 updateCaseBlock(node: CaseBlock, clauses: readonly CaseOrDefaultClause[]): CaseBlock; 4108 createNamespaceExportDeclaration(name: string | Identifier): NamespaceExportDeclaration; 4109 updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, name: Identifier): NamespaceExportDeclaration; 4110 createImportEqualsDeclaration(modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 4111 updateImportEqualsDeclaration(node: ImportEqualsDeclaration, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 4112 createImportDeclaration(modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause): ImportDeclaration; 4113 updateImportDeclaration(node: ImportDeclaration, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration; 4114 createImportClause(isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; 4115 updateImportClause(node: ImportClause, isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; 4116 createAssertClause(elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause; 4117 updateAssertClause(node: AssertClause, elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause; 4118 createAssertEntry(name: AssertionKey, value: Expression): AssertEntry; 4119 updateAssertEntry(node: AssertEntry, name: AssertionKey, value: Expression): AssertEntry; 4120 createImportTypeAssertionContainer(clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer; 4121 updateImportTypeAssertionContainer(node: ImportTypeAssertionContainer, clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer; 4122 createNamespaceImport(name: Identifier): NamespaceImport; 4123 updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport; 4124 createNamespaceExport(name: Identifier): NamespaceExport; 4125 updateNamespaceExport(node: NamespaceExport, name: Identifier): NamespaceExport; 4126 createNamedImports(elements: readonly ImportSpecifier[]): NamedImports; 4127 updateNamedImports(node: NamedImports, elements: readonly ImportSpecifier[]): NamedImports; 4128 createImportSpecifier(isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier; 4129 updateImportSpecifier(node: ImportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier; 4130 createExportAssignment(modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment; 4131 updateExportAssignment(node: ExportAssignment, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment; 4132 createExportDeclaration(modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, assertClause?: AssertClause): ExportDeclaration; 4133 updateExportDeclaration(node: ExportDeclaration, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration; 4134 createNamedExports(elements: readonly ExportSpecifier[]): NamedExports; 4135 updateNamedExports(node: NamedExports, elements: readonly ExportSpecifier[]): NamedExports; 4136 createExportSpecifier(isTypeOnly: boolean, propertyName: string | Identifier | undefined, name: string | Identifier): ExportSpecifier; 4137 updateExportSpecifier(node: ExportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ExportSpecifier; 4138 createExternalModuleReference(expression: Expression): ExternalModuleReference; 4139 updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference; 4140 createJSDocAllType(): JSDocAllType; 4141 createJSDocUnknownType(): JSDocUnknownType; 4142 createJSDocNonNullableType(type: TypeNode, postfix?: boolean): JSDocNonNullableType; 4143 updateJSDocNonNullableType(node: JSDocNonNullableType, type: TypeNode): JSDocNonNullableType; 4144 createJSDocNullableType(type: TypeNode, postfix?: boolean): JSDocNullableType; 4145 updateJSDocNullableType(node: JSDocNullableType, type: TypeNode): JSDocNullableType; 4146 createJSDocOptionalType(type: TypeNode): JSDocOptionalType; 4147 updateJSDocOptionalType(node: JSDocOptionalType, type: TypeNode): JSDocOptionalType; 4148 createJSDocFunctionType(parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): JSDocFunctionType; 4149 updateJSDocFunctionType(node: JSDocFunctionType, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): JSDocFunctionType; 4150 createJSDocVariadicType(type: TypeNode): JSDocVariadicType; 4151 updateJSDocVariadicType(node: JSDocVariadicType, type: TypeNode): JSDocVariadicType; 4152 createJSDocNamepathType(type: TypeNode): JSDocNamepathType; 4153 updateJSDocNamepathType(node: JSDocNamepathType, type: TypeNode): JSDocNamepathType; 4154 createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression; 4155 updateJSDocTypeExpression(node: JSDocTypeExpression, type: TypeNode): JSDocTypeExpression; 4156 createJSDocNameReference(name: EntityName | JSDocMemberName): JSDocNameReference; 4157 updateJSDocNameReference(node: JSDocNameReference, name: EntityName | JSDocMemberName): JSDocNameReference; 4158 createJSDocMemberName(left: EntityName | JSDocMemberName, right: Identifier): JSDocMemberName; 4159 updateJSDocMemberName(node: JSDocMemberName, left: EntityName | JSDocMemberName, right: Identifier): JSDocMemberName; 4160 createJSDocLink(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink; 4161 updateJSDocLink(node: JSDocLink, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink; 4162 createJSDocLinkCode(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode; 4163 updateJSDocLinkCode(node: JSDocLinkCode, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode; 4164 createJSDocLinkPlain(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain; 4165 updateJSDocLinkPlain(node: JSDocLinkPlain, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain; 4166 createJSDocTypeLiteral(jsDocPropertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral; 4167 updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsDocPropertyTags: readonly JSDocPropertyLikeTag[] | undefined, isArrayType: boolean | undefined): JSDocTypeLiteral; 4168 createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature; 4169 updateJSDocSignature(node: JSDocSignature, typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type: JSDocReturnTag | undefined): JSDocSignature; 4170 createJSDocTemplateTag(tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocComment>): JSDocTemplateTag; 4171 updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment: string | NodeArray<JSDocComment> | undefined): JSDocTemplateTag; 4172 createJSDocTypedefTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | JSDocTypeLiteral, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocTypedefTag; 4173 updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | JSDocTypeLiteral | undefined, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocTypedefTag; 4174 createJSDocParameterTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocParameterTag; 4175 updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocComment> | undefined): JSDocParameterTag; 4176 createJSDocPropertyTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocPropertyTag; 4177 updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocComment> | undefined): JSDocPropertyTag; 4178 createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocTypeTag; 4179 updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocTypeTag; 4180 createJSDocSeeTag(tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag; 4181 updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag; 4182 createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocReturnTag; 4183 updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocReturnTag; 4184 createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocThisTag; 4185 updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocThisTag; 4186 createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocEnumTag; 4187 updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocEnumTag; 4188 createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocCallbackTag; 4189 updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocCallbackTag; 4190 createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocAugmentsTag; 4191 updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocAugmentsTag; 4192 createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocImplementsTag; 4193 updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocImplementsTag; 4194 createJSDocAuthorTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocAuthorTag; 4195 updateJSDocAuthorTag(node: JSDocAuthorTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocAuthorTag; 4196 createJSDocClassTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocClassTag; 4197 updateJSDocClassTag(node: JSDocClassTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocClassTag; 4198 createJSDocPublicTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocPublicTag; 4199 updateJSDocPublicTag(node: JSDocPublicTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocPublicTag; 4200 createJSDocPrivateTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocPrivateTag; 4201 updateJSDocPrivateTag(node: JSDocPrivateTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocPrivateTag; 4202 createJSDocProtectedTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocProtectedTag; 4203 updateJSDocProtectedTag(node: JSDocProtectedTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocProtectedTag; 4204 createJSDocReadonlyTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocReadonlyTag; 4205 updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocReadonlyTag; 4206 createJSDocUnknownTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocUnknownTag; 4207 updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | NodeArray<JSDocComment> | undefined): JSDocUnknownTag; 4208 createJSDocDeprecatedTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag; 4209 updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag; 4210 createJSDocOverrideTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag; 4211 updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag; 4212 createJSDocText(text: string): JSDocText; 4213 updateJSDocText(node: JSDocText, text: string): JSDocText; 4214 createJSDocComment(comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc; 4215 updateJSDocComment(node: JSDoc, comment: string | NodeArray<JSDocComment> | undefined, tags: readonly JSDocTag[] | undefined): JSDoc; 4216 createJsxElement(openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement; 4217 updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement; 4218 createJsxSelfClosingElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement; 4219 updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement; 4220 createJsxOpeningElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement; 4221 updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement; 4222 createJsxClosingElement(tagName: JsxTagNameExpression): JsxClosingElement; 4223 updateJsxClosingElement(node: JsxClosingElement, tagName: JsxTagNameExpression): JsxClosingElement; 4224 createJsxFragment(openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment; 4225 createJsxText(text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText; 4226 updateJsxText(node: JsxText, text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText; 4227 createJsxOpeningFragment(): JsxOpeningFragment; 4228 createJsxJsxClosingFragment(): JsxClosingFragment; 4229 updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment; 4230 createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute; 4231 updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute; 4232 createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes; 4233 updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes; 4234 createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute; 4235 updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute; 4236 createJsxExpression(dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined): JsxExpression; 4237 updateJsxExpression(node: JsxExpression, expression: Expression | undefined): JsxExpression; 4238 createCaseClause(expression: Expression, statements: readonly Statement[]): CaseClause; 4239 updateCaseClause(node: CaseClause, expression: Expression, statements: readonly Statement[]): CaseClause; 4240 createDefaultClause(statements: readonly Statement[]): DefaultClause; 4241 updateDefaultClause(node: DefaultClause, statements: readonly Statement[]): DefaultClause; 4242 createHeritageClause(token: HeritageClause["token"], types: readonly ExpressionWithTypeArguments[]): HeritageClause; 4243 updateHeritageClause(node: HeritageClause, types: readonly ExpressionWithTypeArguments[]): HeritageClause; 4244 createCatchClause(variableDeclaration: string | BindingName | VariableDeclaration | undefined, block: Block): CatchClause; 4245 updateCatchClause(node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block): CatchClause; 4246 createPropertyAssignment(name: string | PropertyName, initializer: Expression): PropertyAssignment; 4247 updatePropertyAssignment(node: PropertyAssignment, name: PropertyName, initializer: Expression): PropertyAssignment; 4248 createShorthandPropertyAssignment(name: string | Identifier, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment; 4249 updateShorthandPropertyAssignment(node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression | undefined): ShorthandPropertyAssignment; 4250 createSpreadAssignment(expression: Expression): SpreadAssignment; 4251 updateSpreadAssignment(node: SpreadAssignment, expression: Expression): SpreadAssignment; 4252 createEnumMember(name: string | PropertyName, initializer?: Expression): EnumMember; 4253 updateEnumMember(node: EnumMember, name: PropertyName, initializer: Expression | undefined): EnumMember; 4254 createSourceFile(statements: readonly Statement[], endOfFileToken: EndOfFileToken, flags: NodeFlags): SourceFile; 4255 updateSourceFile(node: SourceFile, statements: readonly Statement[], isDeclarationFile?: boolean, referencedFiles?: readonly FileReference[], typeReferences?: readonly FileReference[], hasNoDefaultLib?: boolean, libReferences?: readonly FileReference[]): SourceFile; 4256 createNotEmittedStatement(original: Node): NotEmittedStatement; 4257 createPartiallyEmittedExpression(expression: Expression, original?: Node): PartiallyEmittedExpression; 4258 updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression; 4259 createCommaListExpression(elements: readonly Expression[]): CommaListExpression; 4260 updateCommaListExpression(node: CommaListExpression, elements: readonly Expression[]): CommaListExpression; 4261 createBundle(sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle; 4262 updateBundle(node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle; 4263 createComma(left: Expression, right: Expression): BinaryExpression; 4264 createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment; 4265 createAssignment(left: Expression, right: Expression): AssignmentExpression<EqualsToken>; 4266 createLogicalOr(left: Expression, right: Expression): BinaryExpression; 4267 createLogicalAnd(left: Expression, right: Expression): BinaryExpression; 4268 createBitwiseOr(left: Expression, right: Expression): BinaryExpression; 4269 createBitwiseXor(left: Expression, right: Expression): BinaryExpression; 4270 createBitwiseAnd(left: Expression, right: Expression): BinaryExpression; 4271 createStrictEquality(left: Expression, right: Expression): BinaryExpression; 4272 createStrictInequality(left: Expression, right: Expression): BinaryExpression; 4273 createEquality(left: Expression, right: Expression): BinaryExpression; 4274 createInequality(left: Expression, right: Expression): BinaryExpression; 4275 createLessThan(left: Expression, right: Expression): BinaryExpression; 4276 createLessThanEquals(left: Expression, right: Expression): BinaryExpression; 4277 createGreaterThan(left: Expression, right: Expression): BinaryExpression; 4278 createGreaterThanEquals(left: Expression, right: Expression): BinaryExpression; 4279 createLeftShift(left: Expression, right: Expression): BinaryExpression; 4280 createRightShift(left: Expression, right: Expression): BinaryExpression; 4281 createUnsignedRightShift(left: Expression, right: Expression): BinaryExpression; 4282 createAdd(left: Expression, right: Expression): BinaryExpression; 4283 createSubtract(left: Expression, right: Expression): BinaryExpression; 4284 createMultiply(left: Expression, right: Expression): BinaryExpression; 4285 createDivide(left: Expression, right: Expression): BinaryExpression; 4286 createModulo(left: Expression, right: Expression): BinaryExpression; 4287 createExponent(left: Expression, right: Expression): BinaryExpression; 4288 createPrefixPlus(operand: Expression): PrefixUnaryExpression; 4289 createPrefixMinus(operand: Expression): PrefixUnaryExpression; 4290 createPrefixIncrement(operand: Expression): PrefixUnaryExpression; 4291 createPrefixDecrement(operand: Expression): PrefixUnaryExpression; 4292 createBitwiseNot(operand: Expression): PrefixUnaryExpression; 4293 createLogicalNot(operand: Expression): PrefixUnaryExpression; 4294 createPostfixIncrement(operand: Expression): PostfixUnaryExpression; 4295 createPostfixDecrement(operand: Expression): PostfixUnaryExpression; 4296 createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): CallExpression; 4297 createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; 4298 createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): CallExpression; 4299 createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; 4300 createVoidZero(): VoidExpression; 4301 createExportDefault(expression: Expression): ExportAssignment; 4302 createExternalModuleExport(exportName: Identifier): ExportDeclaration; 4303 restoreOuterExpressions(outerExpression: Expression | undefined, innerExpression: Expression, kinds?: OuterExpressionKinds): Expression; 4304 } 4305 interface NodeFactory { 4306 /** @deprecated Use the overload that accepts 'modifiers' */ 4307 createConstructorTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode; 4308 /** @deprecated Use the overload that accepts 'modifiers' */ 4309 updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode; 4310 } 4311 interface NodeFactory { 4312 createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; 4313 /** @deprecated Use the overload that accepts 'assertions' */ 4314 createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; 4315 /** @deprecated Use the overload that accepts 'assertions' */ 4316 updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode; 4317 } 4318 interface NodeFactory { 4319 /** @deprecated Use the overload that accepts 'modifiers' */ 4320 createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; 4321 /** @deprecated Use the overload that accepts 'modifiers' */ 4322 updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; 4323 } 4324 interface NodeFactory { 4325 /** 4326 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 4327 */ 4328 createParameterDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration; 4329 /** 4330 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 4331 */ 4332 updateParameterDeclaration(node: ParameterDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration; 4333 /** 4334 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 4335 */ 4336 createPropertyDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 4337 /** 4338 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 4339 */ 4340 updatePropertyDeclaration(node: PropertyDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 4341 /** 4342 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 4343 */ 4344 createMethodDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration; 4345 /** 4346 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 4347 */ 4348 updateMethodDeclaration(node: MethodDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration; 4349 /** 4350 * @deprecated This node does not support Decorators. Callers should use an overload that does not accept a `decorators` parameter. 4351 */ 4352 createConstructorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 4353 /** 4354 * @deprecated This node does not support Decorators. Callers should use an overload that does not accept a `decorators` parameter. 4355 */ 4356 updateConstructorDeclaration(node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 4357 /** 4358 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 4359 */ 4360 createGetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 4361 /** 4362 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 4363 */ 4364 updateGetAccessorDeclaration(node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 4365 /** 4366 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 4367 */ 4368 createSetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 4369 /** 4370 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 4371 */ 4372 updateSetAccessorDeclaration(node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 4373 /** 4374 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4375 */ 4376 createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; 4377 /** 4378 * @deprecated Decorators and modifiers are no longer supported for this function. Callers should use an overload that does not accept the `decorators` and `modifiers` parameters. 4379 */ 4380 updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; 4381 /** 4382 * @deprecated Decorators and modifiers are no longer supported for this function. Callers should use an overload that does not accept the `decorators` and `modifiers` parameters. 4383 */ 4384 createClassStaticBlockDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration; 4385 /** 4386 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4387 */ 4388 updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration; 4389 /** 4390 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 4391 */ 4392 createClassExpression(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; 4393 /** 4394 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 4395 */ 4396 updateClassExpression(node: ClassExpression, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; 4397 /** 4398 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4399 */ 4400 createFunctionDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration; 4401 /** 4402 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4403 */ 4404 updateFunctionDeclaration(node: FunctionDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration; 4405 /** 4406 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 4407 */ 4408 createClassDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; 4409 /** 4410 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 4411 */ 4412 updateClassDeclaration(node: ClassDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; 4413 /** 4414 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4415 */ 4416 createInterfaceDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 4417 /** 4418 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4419 */ 4420 updateInterfaceDeclaration(node: InterfaceDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 4421 /** 4422 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4423 */ 4424 createTypeAliasDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 4425 /** 4426 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4427 */ 4428 updateTypeAliasDeclaration(node: TypeAliasDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 4429 /** 4430 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4431 */ 4432 createEnumDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration; 4433 /** 4434 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4435 */ 4436 updateEnumDeclaration(node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; 4437 /** 4438 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4439 */ 4440 createModuleDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration; 4441 /** 4442 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4443 */ 4444 updateModuleDeclaration(node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration; 4445 /** 4446 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4447 */ 4448 createImportEqualsDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 4449 /** 4450 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4451 */ 4452 updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 4453 /** 4454 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4455 */ 4456 createImportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause): ImportDeclaration; 4457 /** 4458 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4459 */ 4460 updateImportDeclaration(node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration; 4461 /** 4462 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4463 */ 4464 createExportAssignment(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment; 4465 /** 4466 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4467 */ 4468 updateExportAssignment(node: ExportAssignment, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment; 4469 /** 4470 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4471 */ 4472 createExportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, assertClause?: AssertClause): ExportDeclaration; 4473 /** 4474 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 4475 */ 4476 updateExportDeclaration(node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration; 4477 } 4478 interface CoreTransformationContext { 4479 readonly factory: NodeFactory; 4480 /** Gets the compiler options supplied to the transformer. */ 4481 getCompilerOptions(): CompilerOptions; 4482 /** Starts a new lexical environment. */ 4483 startLexicalEnvironment(): void; 4484 /** Suspends the current lexical environment, usually after visiting a parameter list. */ 4485 suspendLexicalEnvironment(): void; 4486 /** Resumes a suspended lexical environment, usually before visiting a function body. */ 4487 resumeLexicalEnvironment(): void; 4488 /** Ends a lexical environment, returning any declarations. */ 4489 endLexicalEnvironment(): Statement[] | undefined; 4490 /** Hoists a function declaration to the containing scope. */ 4491 hoistFunctionDeclaration(node: FunctionDeclaration): void; 4492 /** Hoists a variable declaration to the containing scope. */ 4493 hoistVariableDeclaration(node: Identifier): void; 4494 } 4495 interface TransformationContext extends CoreTransformationContext { 4496 /** Records a request for a non-scoped emit helper in the current context. */ 4497 requestEmitHelper(helper: EmitHelper): void; 4498 /** Gets and resets the requested non-scoped emit helpers. */ 4499 readEmitHelpers(): EmitHelper[] | undefined; 4500 /** Enables expression substitutions in the pretty printer for the provided SyntaxKind. */ 4501 enableSubstitution(kind: SyntaxKind): void; 4502 /** Determines whether expression substitutions are enabled for the provided node. */ 4503 isSubstitutionEnabled(node: Node): boolean; 4504 /** 4505 * Hook used by transformers to substitute expressions just before they 4506 * are emitted by the pretty printer. 4507 * 4508 * NOTE: Transformation hooks should only be modified during `Transformer` initialization, 4509 * before returning the `NodeTransformer` callback. 4510 */ 4511 onSubstituteNode: (hint: EmitHint, node: Node) => Node; 4512 /** 4513 * Enables before/after emit notifications in the pretty printer for the provided 4514 * SyntaxKind. 4515 */ 4516 enableEmitNotification(kind: SyntaxKind): void; 4517 /** 4518 * Determines whether before/after emit notifications should be raised in the pretty 4519 * printer when it emits a node. 4520 */ 4521 isEmitNotificationEnabled(node: Node): boolean; 4522 /** 4523 * Hook used to allow transformers to capture state before or after 4524 * the printer emits a node. 4525 * 4526 * NOTE: Transformation hooks should only be modified during `Transformer` initialization, 4527 * before returning the `NodeTransformer` callback. 4528 */ 4529 onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void; 4530 /** Determines whether the lexical environment is suspended */ 4531 isLexicalEnvironmentSuspended?(): boolean; 4532 } 4533 interface TransformationResult<T extends Node> { 4534 /** Gets the transformed source files. */ 4535 transformed: T[]; 4536 /** Gets diagnostics for the transformation. */ 4537 diagnostics?: DiagnosticWithLocation[]; 4538 /** 4539 * Gets a substitute for a node, if one is available; otherwise, returns the original node. 4540 * 4541 * @param hint A hint as to the intended usage of the node. 4542 * @param node The node to substitute. 4543 */ 4544 substituteNode(hint: EmitHint, node: Node): Node; 4545 /** 4546 * Emits a node with possible notification. 4547 * 4548 * @param hint A hint as to the intended usage of the node. 4549 * @param node The node to emit. 4550 * @param emitCallback A callback used to emit the node. 4551 */ 4552 emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void; 4553 /** 4554 * Indicates if a given node needs an emit notification 4555 * 4556 * @param node The node to emit. 4557 */ 4558 isEmitNotificationEnabled?(node: Node): boolean; 4559 /** 4560 * Clean up EmitNode entries on any parse-tree nodes. 4561 */ 4562 dispose(): void; 4563 } 4564 /** 4565 * A function that is used to initialize and return a `Transformer` callback, which in turn 4566 * will be used to transform one or more nodes. 4567 */ 4568 type TransformerFactory<T extends Node> = (context: TransformationContext) => Transformer<T>; 4569 /** 4570 * A function that transforms a node. 4571 */ 4572 type Transformer<T extends Node> = (node: T) => T; 4573 /** 4574 * A function that accepts and possibly transforms a node. 4575 */ 4576 type Visitor = (node: Node) => VisitResult<Node>; 4577 interface NodeVisitor { 4578 <T extends Node>(nodes: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T; 4579 <T extends Node>(nodes: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T | undefined; 4580 } 4581 interface NodesVisitor { 4582 <T extends Node>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>; 4583 <T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined; 4584 } 4585 type VisitResult<T extends Node> = T | readonly T[] | undefined; 4586 interface Printer { 4587 /** 4588 * Print a node and its subtree as-is, without any emit transformations. 4589 * @param hint A value indicating the purpose of a node. This is primarily used to 4590 * distinguish between an `Identifier` used in an expression position, versus an 4591 * `Identifier` used as an `IdentifierName` as part of a declaration. For most nodes you 4592 * should just pass `Unspecified`. 4593 * @param node The node to print. The node and its subtree are printed as-is, without any 4594 * emit transformations. 4595 * @param sourceFile A source file that provides context for the node. The source text of 4596 * the file is used to emit the original source content for literals and identifiers, while 4597 * the identifiers of the source file are used when generating unique names to avoid 4598 * collisions. 4599 */ 4600 printNode(hint: EmitHint, node: Node, sourceFile: SourceFile): string; 4601 /** 4602 * Prints a list of nodes using the given format flags 4603 */ 4604 printList<T extends Node>(format: ListFormat, list: NodeArray<T>, sourceFile: SourceFile): string; 4605 /** 4606 * Prints a source file as-is, without any emit transformations. 4607 */ 4608 printFile(sourceFile: SourceFile): string; 4609 /** 4610 * Prints a bundle of source files as-is, without any emit transformations. 4611 */ 4612 printBundle(bundle: Bundle): string; 4613 writeFile(sourceFile: SourceFile, writer: EmitTextWriter, sourceMapGenerator: SourceMapGenerator | undefined): void; 4614 } 4615 interface PrintHandlers { 4616 /** 4617 * A hook used by the Printer when generating unique names to avoid collisions with 4618 * globally defined names that exist outside of the current source file. 4619 */ 4620 hasGlobalName?(name: string): boolean; 4621 /** 4622 * A hook used by the Printer to provide notifications prior to emitting a node. A 4623 * compatible implementation **must** invoke `emitCallback` with the provided `hint` and 4624 * `node` values. 4625 * @param hint A hint indicating the intended purpose of the node. 4626 * @param node The node to emit. 4627 * @param emitCallback A callback that, when invoked, will emit the node. 4628 * @example 4629 * ```ts 4630 * var printer = createPrinter(printerOptions, { 4631 * onEmitNode(hint, node, emitCallback) { 4632 * // set up or track state prior to emitting the node... 4633 * emitCallback(hint, node); 4634 * // restore state after emitting the node... 4635 * } 4636 * }); 4637 * ``` 4638 */ 4639 onEmitNode?(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void; 4640 /** 4641 * A hook used to check if an emit notification is required for a node. 4642 * @param node The node to emit. 4643 */ 4644 isEmitNotificationEnabled?(node: Node): boolean; 4645 /** 4646 * A hook used by the Printer to perform just-in-time substitution of a node. This is 4647 * primarily used by node transformations that need to substitute one node for another, 4648 * such as replacing `myExportedVar` with `exports.myExportedVar`. 4649 * @param hint A hint indicating the intended purpose of the node. 4650 * @param node The node to emit. 4651 * @example 4652 * ```ts 4653 * var printer = createPrinter(printerOptions, { 4654 * substituteNode(hint, node) { 4655 * // perform substitution if necessary... 4656 * return node; 4657 * } 4658 * }); 4659 * ``` 4660 */ 4661 substituteNode?(hint: EmitHint, node: Node): Node; 4662 } 4663 interface PrinterOptions { 4664 removeComments?: boolean; 4665 newLine?: NewLineKind; 4666 omitTrailingSemicolon?: boolean; 4667 noEmitHelpers?: boolean; 4668 sourceMap?: boolean; 4669 inlineSourceMap?: boolean; 4670 inlineSources?: boolean; 4671 } 4672 interface RawSourceMap { 4673 version: 3; 4674 file: string; 4675 sourceRoot?: string | null; 4676 sources: string[]; 4677 sourcesContent?: (string | null)[] | null; 4678 mappings: string; 4679 names?: string[] | null; 4680 } 4681 /** 4682 * Generates a source map. 4683 */ 4684 interface SourceMapGenerator { 4685 getSources(): readonly string[]; 4686 /** 4687 * Adds a source to the source map. 4688 */ 4689 addSource(fileName: string): number; 4690 /** 4691 * Set the content for a source. 4692 */ 4693 setSourceContent(sourceIndex: number, content: string | null): void; 4694 /** 4695 * Adds a name. 4696 */ 4697 addName(name: string): number; 4698 /** 4699 * Adds a mapping without source information. 4700 */ 4701 addMapping(generatedLine: number, generatedCharacter: number): void; 4702 /** 4703 * Adds a mapping with source information. 4704 */ 4705 addMapping(generatedLine: number, generatedCharacter: number, sourceIndex: number, sourceLine: number, sourceCharacter: number, nameIndex?: number): void; 4706 /** 4707 * Appends a source map. 4708 */ 4709 appendSourceMap(generatedLine: number, generatedCharacter: number, sourceMap: RawSourceMap, sourceMapPath: string, start?: LineAndCharacter, end?: LineAndCharacter): void; 4710 /** 4711 * Gets the source map as a `RawSourceMap` object. 4712 */ 4713 toJSON(): RawSourceMap; 4714 /** 4715 * Gets the string representation of the source map. 4716 */ 4717 toString(): string; 4718 } 4719 interface EmitTextWriter extends SymbolWriter { 4720 write(s: string): void; 4721 writeTrailingSemicolon(text: string): void; 4722 writeComment(text: string): void; 4723 getText(): string; 4724 rawWrite(s: string): void; 4725 writeLiteral(s: string): void; 4726 getTextPos(): number; 4727 getLine(): number; 4728 getColumn(): number; 4729 getIndent(): number; 4730 isAtStartOfLine(): boolean; 4731 hasTrailingComment(): boolean; 4732 hasTrailingWhitespace(): boolean; 4733 getTextPosWithWriteLine?(): number; 4734 nonEscapingWrite?(text: string): void; 4735 } 4736 interface GetEffectiveTypeRootsHost { 4737 directoryExists?(directoryName: string): boolean; 4738 getCurrentDirectory?(): string; 4739 } 4740 interface ModuleSpecifierResolutionHost { 4741 useCaseSensitiveFileNames?(): boolean; 4742 fileExists(path: string): boolean; 4743 getCurrentDirectory(): string; 4744 directoryExists?(path: string): boolean; 4745 readFile?(path: string): string | undefined; 4746 realpath?(path: string): string; 4747 getModuleSpecifierCache?(): ModuleSpecifierCache; 4748 getPackageJsonInfoCache?(): PackageJsonInfoCache | undefined; 4749 getGlobalTypingsCacheLocation?(): string | undefined; 4750 getNearestAncestorDirectoryWithPackageJson?(fileName: string, rootDir?: string): string | undefined; 4751 readonly redirectTargetsMap: RedirectTargetsMap; 4752 getProjectReferenceRedirect(fileName: string): string | undefined; 4753 isSourceOfProjectReferenceRedirect(fileName: string): boolean; 4754 } 4755 interface ModulePath { 4756 path: string; 4757 isInNodeModules: boolean; 4758 isRedirect: boolean; 4759 } 4760 interface ResolvedModuleSpecifierInfo { 4761 modulePaths: readonly ModulePath[] | undefined; 4762 moduleSpecifiers: readonly string[] | undefined; 4763 isBlockedByPackageJsonDependencies: boolean | undefined; 4764 } 4765 interface ModuleSpecifierOptions { 4766 overrideImportMode?: SourceFile["impliedNodeFormat"]; 4767 } 4768 interface ModuleSpecifierCache { 4769 get(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions): Readonly<ResolvedModuleSpecifierInfo> | undefined; 4770 set(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, modulePaths: readonly ModulePath[], moduleSpecifiers: readonly string[]): void; 4771 setBlockedByPackageJsonDependencies(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, isBlockedByPackageJsonDependencies: boolean): void; 4772 setModulePaths(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, modulePaths: readonly ModulePath[]): void; 4773 clear(): void; 4774 count(): number; 4775 } 4776 interface SymbolTracker { 4777 trackSymbol?(symbol: Symbol, enclosingDeclaration: Node | undefined, meaning: SymbolFlags): boolean; 4778 reportInaccessibleThisError?(): void; 4779 reportPrivateInBaseOfClassExpression?(propertyName: string): void; 4780 reportInaccessibleUniqueSymbolError?(): void; 4781 reportCyclicStructureError?(): void; 4782 reportLikelyUnsafeImportRequiredError?(specifier: string): void; 4783 reportTruncationError?(): void; 4784 moduleResolverHost?: ModuleSpecifierResolutionHost & { 4785 getCommonSourceDirectory(): string; 4786 }; 4787 trackReferencedAmbientModule?(decl: ModuleDeclaration, symbol: Symbol): void; 4788 trackExternalModuleSymbolOfImportTypeNode?(symbol: Symbol): void; 4789 reportNonlocalAugmentation?(containingFile: SourceFile, parentSymbol: Symbol, augmentingSymbol: Symbol): void; 4790 reportNonSerializableProperty?(propertyName: string): void; 4791 reportImportTypeNodeResolutionModeOverride?(): void; 4792 } 4793 interface TextSpan { 4794 start: number; 4795 length: number; 4796 } 4797 interface TextChangeRange { 4798 span: TextSpan; 4799 newLength: number; 4800 } 4801 interface SyntaxList extends Node { 4802 kind: SyntaxKind.SyntaxList; 4803 _children: Node[]; 4804 } 4805 enum ListFormat { 4806 None = 0, 4807 SingleLine = 0, 4808 MultiLine = 1, 4809 PreserveLines = 2, 4810 LinesMask = 3, 4811 NotDelimited = 0, 4812 BarDelimited = 4, 4813 AmpersandDelimited = 8, 4814 CommaDelimited = 16, 4815 AsteriskDelimited = 32, 4816 DelimitersMask = 60, 4817 AllowTrailingComma = 64, 4818 Indented = 128, 4819 SpaceBetweenBraces = 256, 4820 SpaceBetweenSiblings = 512, 4821 Braces = 1024, 4822 Parenthesis = 2048, 4823 AngleBrackets = 4096, 4824 SquareBrackets = 8192, 4825 BracketsMask = 15360, 4826 OptionalIfUndefined = 16384, 4827 OptionalIfEmpty = 32768, 4828 Optional = 49152, 4829 PreferNewLine = 65536, 4830 NoTrailingNewLine = 131072, 4831 NoInterveningComments = 262144, 4832 NoSpaceIfEmpty = 524288, 4833 SingleElement = 1048576, 4834 SpaceAfterList = 2097152, 4835 Modifiers = 2359808, 4836 HeritageClauses = 512, 4837 SingleLineTypeLiteralMembers = 768, 4838 MultiLineTypeLiteralMembers = 32897, 4839 SingleLineTupleTypeElements = 528, 4840 MultiLineTupleTypeElements = 657, 4841 UnionTypeConstituents = 516, 4842 IntersectionTypeConstituents = 520, 4843 ObjectBindingPatternElements = 525136, 4844 ArrayBindingPatternElements = 524880, 4845 ObjectLiteralExpressionProperties = 526226, 4846 ImportClauseEntries = 526226, 4847 ArrayLiteralExpressionElements = 8914, 4848 CommaListElements = 528, 4849 CallExpressionArguments = 2576, 4850 NewExpressionArguments = 18960, 4851 TemplateExpressionSpans = 262144, 4852 SingleLineBlockStatements = 768, 4853 MultiLineBlockStatements = 129, 4854 VariableDeclarationList = 528, 4855 SingleLineFunctionBodyStatements = 768, 4856 MultiLineFunctionBodyStatements = 1, 4857 ClassHeritageClauses = 0, 4858 ClassMembers = 129, 4859 InterfaceMembers = 129, 4860 EnumMembers = 145, 4861 CaseBlockClauses = 129, 4862 NamedImportsOrExportsElements = 525136, 4863 JsxElementOrFragmentChildren = 262144, 4864 JsxElementAttributes = 262656, 4865 CaseOrDefaultClauseStatements = 163969, 4866 HeritageClauseTypes = 528, 4867 SourceFileStatements = 131073, 4868 Decorators = 2146305, 4869 TypeArguments = 53776, 4870 TypeParameters = 53776, 4871 Parameters = 2576, 4872 IndexSignatureParameters = 8848, 4873 JSDocComment = 33 4874 } 4875 interface UserPreferences { 4876 readonly disableSuggestions?: boolean; 4877 readonly quotePreference?: "auto" | "double" | "single"; 4878 readonly includeCompletionsForModuleExports?: boolean; 4879 readonly includeCompletionsForImportStatements?: boolean; 4880 readonly includeCompletionsWithSnippetText?: boolean; 4881 readonly includeAutomaticOptionalChainCompletions?: boolean; 4882 readonly includeCompletionsWithInsertText?: boolean; 4883 readonly includeCompletionsWithClassMemberSnippets?: boolean; 4884 readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean; 4885 readonly useLabelDetailsInCompletionEntries?: boolean; 4886 readonly allowIncompleteCompletions?: boolean; 4887 readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative"; 4888 /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ 4889 readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; 4890 readonly allowTextChangesInNewFiles?: boolean; 4891 readonly providePrefixAndSuffixTextForRename?: boolean; 4892 readonly includePackageJsonAutoImports?: "auto" | "on" | "off"; 4893 readonly provideRefactorNotApplicableReason?: boolean; 4894 readonly jsxAttributeCompletionStyle?: "auto" | "braces" | "none"; 4895 readonly includeInlayParameterNameHints?: "none" | "literals" | "all"; 4896 readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean; 4897 readonly includeInlayFunctionParameterTypeHints?: boolean; 4898 readonly includeInlayVariableTypeHints?: boolean; 4899 readonly includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean; 4900 readonly includeInlayPropertyDeclarationTypeHints?: boolean; 4901 readonly includeInlayFunctionLikeReturnTypeHints?: boolean; 4902 readonly includeInlayEnumMemberValueHints?: boolean; 4903 readonly allowRenameOfImportPath?: boolean; 4904 readonly autoImportFileExcludePatterns?: string[]; 4905 } 4906 /** Represents a bigint literal value without requiring bigint support */ 4907 interface PseudoBigInt { 4908 negative: boolean; 4909 base10Value: string; 4910 } 4911 function getNodeMajorVersion(): number | undefined; 4912 enum FileWatcherEventKind { 4913 Created = 0, 4914 Changed = 1, 4915 Deleted = 2 4916 } 4917 type FileWatcherCallback = (fileName: string, eventKind: FileWatcherEventKind, modifiedTime?: Date) => void; 4918 type DirectoryWatcherCallback = (fileName: string) => void; 4919 interface System { 4920 args: string[]; 4921 newLine: string; 4922 useCaseSensitiveFileNames: boolean; 4923 write(s: string): void; 4924 writeOutputIsTTY?(): boolean; 4925 getWidthOfTerminal?(): number; 4926 readFile(path: string, encoding?: string): string | undefined; 4927 getFileSize?(path: string): number; 4928 writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; 4929 /** 4930 * @pollingInterval - this parameter is used in polling-based watchers and ignored in watchers that 4931 * use native OS file watching 4932 */ 4933 watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher; 4934 watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher; 4935 resolvePath(path: string): string; 4936 fileExists(path: string): boolean; 4937 directoryExists(path: string): boolean; 4938 createDirectory(path: string): void; 4939 getExecutingFilePath(): string; 4940 getCurrentDirectory(): string; 4941 getDirectories(path: string): string[]; 4942 readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; 4943 getModifiedTime?(path: string): Date | undefined; 4944 setModifiedTime?(path: string, time: Date): void; 4945 deleteFile?(path: string): void; 4946 /** 4947 * A good implementation is node.js' `crypto.createHash`. (https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm) 4948 */ 4949 createHash?(data: string): string; 4950 /** This must be cryptographically secure. Only implement this method using `crypto.createHash("sha256")`. */ 4951 createSHA256Hash?(data: string): string; 4952 getMemoryUsage?(): number; 4953 exit(exitCode?: number): void; 4954 realpath?(path: string): string; 4955 setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any; 4956 clearTimeout?(timeoutId: any): void; 4957 clearScreen?(): void; 4958 base64decode?(input: string): string; 4959 base64encode?(input: string): string; 4960 } 4961 interface FileWatcher { 4962 close(): void; 4963 } 4964 let sys: System; 4965 namespace MemoryDotting { 4966 interface RecordInfo { 4967 recordStage: string; 4968 recordIndex: number; 4969 } 4970 const BINDE_SOURCE_FILE = "binder(bindSourceFile: Bind)"; 4971 const CHECK_SOURCE_FILE = "checker(checkSourceFile: Check)"; 4972 const EMIT_FILES = "emitter(emitFiles: EmitEachOutputFile)"; 4973 const CREATE_SORUCE_FILE_PARSE = "parser(createSourceFile: Parse)"; 4974 const BEFORE_PROGRAM = "program(createProgram: beforeProgram)"; 4975 const TRANSFORM = "transformer(transformNodes: Transform)"; 4976 function recordStage(stage: string): RecordInfo | null; 4977 function stopRecordStage(recordInfo: RecordInfo | null): void; 4978 function setMemoryDottingCallBack(recordCallback: (stage: string) => RecordInfo, stopCallback: (recordInfo: RecordInfo) => void): void; 4979 function clearCallBack(): void; 4980 } 4981 function tokenToString(t: SyntaxKind): string | undefined; 4982 function getPositionOfLineAndCharacter(sourceFile: SourceFileLike, line: number, character: number): number; 4983 function getLineAndCharacterOfPosition(sourceFile: SourceFileLike, position: number): LineAndCharacter; 4984 function isWhiteSpaceLike(ch: number): boolean; 4985 /** Does not include line breaks. For that, see isWhiteSpaceLike. */ 4986 function isWhiteSpaceSingleLine(ch: number): boolean; 4987 function isLineBreak(ch: number): boolean; 4988 function couldStartTrivia(text: string, pos: number): boolean; 4989 function forEachLeadingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined; 4990 function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined; 4991 function forEachTrailingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined; 4992 function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined; 4993 function reduceEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U | undefined; 4994 function reduceEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U | undefined; 4995 function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined; 4996 function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined; 4997 /** Optionally, get the shebang */ 4998 function getShebang(text: string): string | undefined; 4999 function isIdentifierStart(ch: number, languageVersion: ScriptTarget | undefined): boolean; 5000 function isIdentifierPart(ch: number, languageVersion: ScriptTarget | undefined, identifierVariant?: LanguageVariant): boolean; 5001 function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, textInitial?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner; 5002 type ErrorCallback = (message: DiagnosticMessage, length: number) => void; 5003 interface Scanner { 5004 getStartPos(): number; 5005 getToken(): SyntaxKind; 5006 getTextPos(): number; 5007 getTokenPos(): number; 5008 getTokenText(): string; 5009 getTokenValue(): string; 5010 hasUnicodeEscape(): boolean; 5011 hasExtendedUnicodeEscape(): boolean; 5012 hasPrecedingLineBreak(): boolean; 5013 isIdentifier(): boolean; 5014 isReservedWord(): boolean; 5015 isUnterminated(): boolean; 5016 reScanGreaterToken(): SyntaxKind; 5017 reScanSlashToken(): SyntaxKind; 5018 reScanAsteriskEqualsToken(): SyntaxKind; 5019 reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind; 5020 reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind; 5021 scanJsxIdentifier(): SyntaxKind; 5022 scanJsxAttributeValue(): SyntaxKind; 5023 reScanJsxAttributeValue(): SyntaxKind; 5024 reScanJsxToken(allowMultilineJsxText?: boolean): JsxTokenSyntaxKind; 5025 reScanLessThanToken(): SyntaxKind; 5026 reScanHashToken(): SyntaxKind; 5027 reScanQuestionToken(): SyntaxKind; 5028 reScanInvalidIdentifier(): SyntaxKind; 5029 scanJsxToken(): JsxTokenSyntaxKind; 5030 scanJsDocToken(): JSDocSyntaxKind; 5031 scan(): SyntaxKind; 5032 getText(): string; 5033 setText(text: string | undefined, start?: number, length?: number): void; 5034 setOnError(onError: ErrorCallback | undefined): void; 5035 setScriptTarget(scriptTarget: ScriptTarget): void; 5036 setLanguageVariant(variant: LanguageVariant): void; 5037 setTextPos(textPos: number): void; 5038 lookAhead<T>(callback: () => T): T; 5039 scanRange<T>(start: number, length: number, callback: () => T): T; 5040 tryScan<T>(callback: () => T): T; 5041 setEtsContext(isEtsContext: boolean): void; 5042 } 5043 function isExternalModuleNameRelative(moduleName: string): boolean; 5044 function sortAndDeduplicateDiagnostics<T extends Diagnostic>(diagnostics: readonly T[]): SortedReadonlyArray<T>; 5045 function getDefaultLibFileName(options: CompilerOptions): string; 5046 function textSpanEnd(span: TextSpan): number; 5047 function textSpanIsEmpty(span: TextSpan): boolean; 5048 function textSpanContainsPosition(span: TextSpan, position: number): boolean; 5049 function textSpanContainsTextSpan(span: TextSpan, other: TextSpan): boolean; 5050 function textSpanOverlapsWith(span: TextSpan, other: TextSpan): boolean; 5051 function textSpanOverlap(span1: TextSpan, span2: TextSpan): TextSpan | undefined; 5052 function textSpanIntersectsWithTextSpan(span: TextSpan, other: TextSpan): boolean; 5053 function textSpanIntersectsWith(span: TextSpan, start: number, length: number): boolean; 5054 function decodedTextSpanIntersectsWith(start1: number, length1: number, start2: number, length2: number): boolean; 5055 function textSpanIntersectsWithPosition(span: TextSpan, position: number): boolean; 5056 function textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan | undefined; 5057 function createTextSpan(start: number, length: number): TextSpan; 5058 function createTextSpanFromBounds(start: number, end: number): TextSpan; 5059 function textChangeRangeNewSpan(range: TextChangeRange): TextSpan; 5060 function textChangeRangeIsUnchanged(range: TextChangeRange): boolean; 5061 function createTextChangeRange(span: TextSpan, newLength: number): TextChangeRange; 5062 /** 5063 * Called to merge all the changes that occurred across several versions of a script snapshot 5064 * into a single change. i.e. if a user keeps making successive edits to a script we will 5065 * have a text change from V1 to V2, V2 to V3, ..., Vn. 5066 * 5067 * This function will then merge those changes into a single change range valid between V1 and 5068 * Vn. 5069 */ 5070 function collapseTextChangeRangesAcrossMultipleVersions(changes: readonly TextChangeRange[]): TextChangeRange; 5071 function getTypeParameterOwner(d: Declaration): Declaration | undefined; 5072 function isParameterPropertyDeclaration(node: Node, parent: Node): node is ParameterPropertyDeclaration; 5073 function isEmptyBindingPattern(node: BindingName): node is BindingPattern; 5074 function isEmptyBindingElement(node: BindingElement): boolean; 5075 function walkUpBindingElementsAndPatterns(binding: BindingElement): VariableDeclaration | ParameterDeclaration; 5076 function getCombinedModifierFlags(node: Declaration): ModifierFlags; 5077 function getCombinedNodeFlags(node: Node): NodeFlags; 5078 /** 5079 * Checks to see if the locale is in the appropriate format, 5080 * and if it is, attempts to set the appropriate language. 5081 */ 5082 function validateLocaleAndSetLanguage(locale: string, sys: { 5083 getExecutingFilePath(): string; 5084 resolvePath(path: string): string; 5085 fileExists(fileName: string): boolean; 5086 readFile(fileName: string): string | undefined; 5087 }, errors?: Push<Diagnostic>): void; 5088 function getOriginalNode(node: Node): Node; 5089 function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T; 5090 function getOriginalNode(node: Node | undefined): Node | undefined; 5091 function getOriginalNode<T extends Node>(node: Node | undefined, nodeTest: (node: Node | undefined) => node is T): T | undefined; 5092 /** 5093 * Iterates through the parent chain of a node and performs the callback on each parent until the callback 5094 * returns a truthy value, then returns that value. 5095 * If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit" 5096 * At that point findAncestor returns undefined. 5097 */ 5098 function findAncestor<T extends Node>(node: Node | undefined, callback: (element: Node) => element is T): T | undefined; 5099 function findAncestor(node: Node | undefined, callback: (element: Node) => boolean | "quit"): Node | undefined; 5100 /** 5101 * Gets a value indicating whether a node originated in the parse tree. 5102 * 5103 * @param node The node to test. 5104 */ 5105 function isParseTreeNode(node: Node): boolean; 5106 /** 5107 * Gets the original parse tree node for a node. 5108 * 5109 * @param node The original node. 5110 * @returns The original parse tree node if found; otherwise, undefined. 5111 */ 5112 function getParseTreeNode(node: Node | undefined): Node | undefined; 5113 /** 5114 * Gets the original parse tree node for a node. 5115 * 5116 * @param node The original node. 5117 * @param nodeTest A callback used to ensure the correct type of parse tree node is returned. 5118 * @returns The original parse tree node if found; otherwise, undefined. 5119 */ 5120 function getParseTreeNode<T extends Node>(node: T | undefined, nodeTest?: (node: Node) => node is T): T | undefined; 5121 /** Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' */ 5122 function escapeLeadingUnderscores(identifier: string): __String; 5123 /** 5124 * Remove extra underscore from escaped identifier text content. 5125 * 5126 * @param identifier The escaped identifier text. 5127 * @returns The unescaped identifier text. 5128 */ 5129 function unescapeLeadingUnderscores(identifier: __String): string; 5130 function idText(identifierOrPrivateName: Identifier | PrivateIdentifier): string; 5131 function symbolName(symbol: Symbol): string; 5132 function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined; 5133 function getNameOfDeclaration(declaration: Declaration | Expression | undefined): DeclarationName | undefined; 5134 function getDecorators(node: HasDecorators): readonly Decorator[] | undefined; 5135 function getAnnotations(node: HasDecorators): readonly Decorator[] | undefined; 5136 function getModifiers(node: HasModifiers): readonly Modifier[] | undefined; 5137 function getAllDecorators(node: Node | undefined): readonly Decorator[]; 5138 function getIllegalDecorators(node: HasIllegalDecorators): readonly Decorator[] | undefined; 5139 /** 5140 * Gets the JSDoc parameter tags for the node if present. 5141 * 5142 * @remarks Returns any JSDoc param tag whose name matches the provided 5143 * parameter, whether a param tag on a containing function 5144 * expression, or a param tag on a variable declaration whose 5145 * initializer is the containing function. The tags closest to the 5146 * node are returned first, so in the previous example, the param 5147 * tag on the containing function expression would be first. 5148 * 5149 * For binding patterns, parameter tags are matched by position. 5150 */ 5151 function getJSDocParameterTags(param: ParameterDeclaration): readonly JSDocParameterTag[]; 5152 /** 5153 * Gets the JSDoc type parameter tags for the node if present. 5154 * 5155 * @remarks Returns any JSDoc template tag whose names match the provided 5156 * parameter, whether a template tag on a containing function 5157 * expression, or a template tag on a variable declaration whose 5158 * initializer is the containing function. The tags closest to the 5159 * node are returned first, so in the previous example, the template 5160 * tag on the containing function expression would be first. 5161 */ 5162 function getJSDocTypeParameterTags(param: TypeParameterDeclaration): readonly JSDocTemplateTag[]; 5163 /** 5164 * Return true if the node has JSDoc parameter tags. 5165 * 5166 * @remarks Includes parameter tags that are not directly on the node, 5167 * for example on a variable declaration whose initializer is a function expression. 5168 */ 5169 function hasJSDocParameterTags(node: FunctionLikeDeclaration | SignatureDeclaration): boolean; 5170 /** Gets the JSDoc augments tag for the node if present */ 5171 function getJSDocAugmentsTag(node: Node): JSDocAugmentsTag | undefined; 5172 /** Gets the JSDoc implements tags for the node if present */ 5173 function getJSDocImplementsTags(node: Node): readonly JSDocImplementsTag[]; 5174 /** Gets the JSDoc class tag for the node if present */ 5175 function getJSDocClassTag(node: Node): JSDocClassTag | undefined; 5176 /** Gets the JSDoc public tag for the node if present */ 5177 function getJSDocPublicTag(node: Node): JSDocPublicTag | undefined; 5178 /** Gets the JSDoc private tag for the node if present */ 5179 function getJSDocPrivateTag(node: Node): JSDocPrivateTag | undefined; 5180 /** Gets the JSDoc protected tag for the node if present */ 5181 function getJSDocProtectedTag(node: Node): JSDocProtectedTag | undefined; 5182 /** Gets the JSDoc protected tag for the node if present */ 5183 function getJSDocReadonlyTag(node: Node): JSDocReadonlyTag | undefined; 5184 function getJSDocOverrideTagNoCache(node: Node): JSDocOverrideTag | undefined; 5185 /** Gets the JSDoc deprecated tag for the node if present */ 5186 function getJSDocDeprecatedTag(node: Node): JSDocDeprecatedTag | undefined; 5187 /** Gets the JSDoc enum tag for the node if present */ 5188 function getJSDocEnumTag(node: Node): JSDocEnumTag | undefined; 5189 /** Gets the JSDoc this tag for the node if present */ 5190 function getJSDocThisTag(node: Node): JSDocThisTag | undefined; 5191 /** Gets the JSDoc return tag for the node if present */ 5192 function getJSDocReturnTag(node: Node): JSDocReturnTag | undefined; 5193 /** Gets the JSDoc template tag for the node if present */ 5194 function getJSDocTemplateTag(node: Node): JSDocTemplateTag | undefined; 5195 /** Gets the JSDoc type tag for the node if present and valid */ 5196 function getJSDocTypeTag(node: Node): JSDocTypeTag | undefined; 5197 /** 5198 * Gets the type node for the node if provided via JSDoc. 5199 * 5200 * @remarks The search includes any JSDoc param tag that relates 5201 * to the provided parameter, for example a type tag on the 5202 * parameter itself, or a param tag on a containing function 5203 * expression, or a param tag on a variable declaration whose 5204 * initializer is the containing function. The tags closest to the 5205 * node are examined first, so in the previous example, the type 5206 * tag directly on the node would be returned. 5207 */ 5208 function getJSDocType(node: Node): TypeNode | undefined; 5209 /** 5210 * Gets the return type node for the node if provided via JSDoc return tag or type tag. 5211 * 5212 * @remarks `getJSDocReturnTag` just gets the whole JSDoc tag. This function 5213 * gets the type from inside the braces, after the fat arrow, etc. 5214 */ 5215 function getJSDocReturnType(node: Node): TypeNode | undefined; 5216 /** Get all JSDoc tags related to a node, including those on parent nodes. */ 5217 function getJSDocTags(node: Node): readonly JSDocTag[]; 5218 /** Gets all JSDoc tags that match a specified predicate */ 5219 function getAllJSDocTags<T extends JSDocTag>(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[]; 5220 /** Gets all JSDoc tags of a specified kind */ 5221 function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[]; 5222 /** Gets the text of a jsdoc comment, flattening links to their text. */ 5223 function getTextOfJSDocComment(comment?: string | NodeArray<JSDocComment>): string | undefined; 5224 /** 5225 * Gets the effective type parameters. If the node was parsed in a 5226 * JavaScript file, gets the type parameters from the `@template` tag from JSDoc. 5227 * 5228 * This does *not* return type parameters from a jsdoc reference to a generic type, eg 5229 * 5230 * type Id = <T>(x: T) => T 5231 * /** @type {Id} / 5232 * function id(x) { return x } 5233 */ 5234 function getEffectiveTypeParameterDeclarations(node: DeclarationWithTypeParameters): readonly TypeParameterDeclaration[]; 5235 function getEffectiveConstraintOfTypeParameter(node: TypeParameterDeclaration): TypeNode | undefined; 5236 function isMemberName(node: Node): node is MemberName; 5237 function isPropertyAccessChain(node: Node): node is PropertyAccessChain; 5238 function isElementAccessChain(node: Node): node is ElementAccessChain; 5239 function isCallChain(node: Node): node is CallChain; 5240 function isOptionalChain(node: Node): node is PropertyAccessChain | ElementAccessChain | CallChain | NonNullChain; 5241 function isNullishCoalesce(node: Node): boolean; 5242 function isConstTypeReference(node: Node): boolean; 5243 function skipPartiallyEmittedExpressions(node: Expression): Expression; 5244 function skipPartiallyEmittedExpressions(node: Node): Node; 5245 function isNonNullChain(node: Node): node is NonNullChain; 5246 function isBreakOrContinueStatement(node: Node): node is BreakOrContinueStatement; 5247 function isNamedExportBindings(node: Node): node is NamedExportBindings; 5248 function isUnparsedTextLike(node: Node): node is UnparsedTextLike; 5249 function isUnparsedNode(node: Node): node is UnparsedNode; 5250 function isJSDocPropertyLikeTag(node: Node): node is JSDocPropertyLikeTag; 5251 /** 5252 * True if kind is of some token syntax kind. 5253 * For example, this is true for an IfKeyword but not for an IfStatement. 5254 * Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail. 5255 */ 5256 function isTokenKind(kind: SyntaxKind): boolean; 5257 /** 5258 * True if node is of some token syntax kind. 5259 * For example, this is true for an IfKeyword but not for an IfStatement. 5260 * Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail. 5261 */ 5262 function isToken(n: Node): boolean; 5263 function isLiteralExpression(node: Node): node is LiteralExpression; 5264 function isTemplateLiteralToken(node: Node): node is TemplateLiteralToken; 5265 function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail; 5266 function isImportOrExportSpecifier(node: Node): node is ImportSpecifier | ExportSpecifier; 5267 function isTypeOnlyImportOrExportDeclaration(node: Node): node is TypeOnlyAliasDeclaration; 5268 function isAssertionKey(node: Node): node is AssertionKey; 5269 function isStringTextContainingNode(node: Node): node is StringLiteral | TemplateLiteralToken; 5270 function isModifier(node: Node): node is Modifier; 5271 function isEntityName(node: Node): node is EntityName; 5272 function isPropertyName(node: Node): node is PropertyName; 5273 function isBindingName(node: Node): node is BindingName; 5274 function isFunctionLike(node: Node | undefined): node is SignatureDeclaration; 5275 function isAnnotationElement(node: Node): node is AnnotationElement; 5276 function isClassElement(node: Node): node is ClassElement; 5277 function isClassLike(node: Node): node is ClassLikeDeclaration; 5278 function isStruct(node: Node): node is StructDeclaration; 5279 function isAccessor(node: Node): node is AccessorDeclaration; 5280 function isAutoAccessorPropertyDeclaration(node: Node): node is AutoAccessorPropertyDeclaration; 5281 function isModifierLike(node: Node): node is ModifierLike; 5282 function isTypeElement(node: Node): node is TypeElement; 5283 function isClassOrTypeElement(node: Node): node is ClassElement | TypeElement; 5284 function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike; 5285 /** 5286 * Node test that determines whether a node is a valid type node. 5287 * This differs from the `isPartOfTypeNode` function which determines whether a node is *part* 5288 * of a TypeNode. 5289 */ 5290 function isTypeNode(node: Node): node is TypeNode; 5291 function isFunctionOrConstructorTypeNode(node: Node): node is FunctionTypeNode | ConstructorTypeNode; 5292 function isPropertyAccessOrQualifiedName(node: Node): node is PropertyAccessExpression | QualifiedName; 5293 function isCallLikeExpression(node: Node): node is CallLikeExpression; 5294 function isCallOrNewExpression(node: Node): node is CallExpression | NewExpression; 5295 function isTemplateLiteral(node: Node): node is TemplateLiteral; 5296 function isAssertionExpression(node: Node): node is AssertionExpression; 5297 function isIterationStatement(node: Node, lookInLabeledStatements: false): node is IterationStatement; 5298 function isIterationStatement(node: Node, lookInLabeledStatements: boolean): node is IterationStatement | LabeledStatement; 5299 function isDeclarationStatement(node: Node): node is DeclarationStatement; 5300 function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement; 5301 function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause; 5302 /** True if node is of a kind that may contain comment text. */ 5303 function isJSDocCommentContainingNode(node: Node): boolean; 5304 function isSetAccessor(node: Node): node is SetAccessorDeclaration; 5305 function isGetAccessor(node: Node): node is GetAccessorDeclaration; 5306 /** True if has initializer node attached to it. */ 5307 function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer; 5308 function isObjectLiteralElement(node: Node): node is ObjectLiteralElement; 5309 function isStringLiteralLike(node: Node): node is StringLiteralLike; 5310 function isJSDocLinkLike(node: Node): node is JSDocLink | JSDocLinkCode | JSDocLinkPlain; 5311 function hasRestParameter(s: SignatureDeclaration | JSDocSignature): boolean; 5312 function isRestParameter(node: ParameterDeclaration | JSDocParameterTag): boolean; 5313 let unchangedTextChangeRange: TextChangeRange; 5314 type ParameterPropertyDeclaration = ParameterDeclaration & { 5315 parent: ConstructorDeclaration; 5316 name: Identifier; 5317 }; 5318 class MemoryUtils { 5319 private static MemoryAfterGC; 5320 private static baseMemorySize; 5321 private static MIN_GC_THRESHOLD; 5322 private static memoryGCThreshold; 5323 static GC_THRESHOLD_RATIO: number; 5324 /** 5325 * Try garbage collection if the memory usage exceeds MEMORY_BASELINE. 5326 */ 5327 static tryGC(): void; 5328 static initializeBaseMemory(baseMemorySize?: number): void; 5329 static updateBaseMemory(MemoryBeforeGC: number): void; 5330 } 5331 function isPartOfTypeNode(node: Node): boolean; 5332 function getJSDocCommentsAndTags(hostNode: Node, noCache?: boolean): readonly (JSDoc | JSDocTag)[]; 5333 function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode: SourceFile): ts.CommentRange[] | undefined; 5334 function createTextWriter(newLine: string): EmitTextWriter; 5335 /** 5336 * Bypasses immutability and directly sets the `parent` property of each `Node` recursively. 5337 * @param rootNode The root node from which to start the recursion. 5338 * @param incremental When `true`, only recursively descends through nodes whose `parent` pointers are incorrect. 5339 * This allows us to quickly bail out of setting `parent` for subtrees during incremental parsing. 5340 */ 5341 function setParentRecursive<T extends Node>(rootNode: T, incremental: boolean): T; 5342 function setParentRecursive<T extends Node>(rootNode: T | undefined, incremental: boolean): T | undefined; 5343 function createUnparsedSourceFile(text: string): UnparsedSource; 5344 function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource; 5345 function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource; 5346 function createInputFiles(javascriptText: string, declarationText: string): InputFiles; 5347 function createInputFiles(readFileText: (path: string) => string | undefined, javascriptPath: string, javascriptMapPath: string | undefined, declarationPath: string, declarationMapPath: string | undefined, buildInfoPath: string | undefined): InputFiles; 5348 function createInputFiles(javascriptText: string, declarationText: string, javascriptMapPath: string | undefined, javascriptMapText: string | undefined, declarationMapPath: string | undefined, declarationMapText: string | undefined): InputFiles; 5349 /** 5350 * Create an external source map source file reference 5351 */ 5352 function createSourceMapSource(fileName: string, text: string, skipTrivia?: (pos: number) => number): SourceMapSource; 5353 function setOriginalNode<T extends Node>(node: T, original: Node | undefined): T; 5354 const factory: NodeFactory; 5355 /** 5356 * Clears any `EmitNode` entries from parse-tree nodes. 5357 * @param sourceFile A source file. 5358 */ 5359 function disposeEmitNodes(sourceFile: SourceFile | undefined): void; 5360 /** 5361 * Sets flags that control emit behavior of a node. 5362 */ 5363 function setEmitFlags<T extends Node>(node: T, emitFlags: EmitFlags): T; 5364 /** 5365 * Gets a custom text range to use when emitting source maps. 5366 */ 5367 function getSourceMapRange(node: Node): SourceMapRange; 5368 /** 5369 * Sets a custom text range to use when emitting source maps. 5370 */ 5371 function setSourceMapRange<T extends Node>(node: T, range: SourceMapRange | undefined): T; 5372 /** 5373 * Gets the TextRange to use for source maps for a token of a node. 5374 */ 5375 function getTokenSourceMapRange(node: Node, token: SyntaxKind): SourceMapRange | undefined; 5376 /** 5377 * Sets the TextRange to use for source maps for a token of a node. 5378 */ 5379 function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: SourceMapRange | undefined): T; 5380 /** 5381 * Gets a custom text range to use when emitting comments. 5382 */ 5383 function getCommentRange(node: Node): TextRange; 5384 /** 5385 * Sets a custom text range to use when emitting comments. 5386 */ 5387 function setCommentRange<T extends Node>(node: T, range: TextRange): T; 5388 function getSyntheticLeadingComments(node: Node): SynthesizedComment[] | undefined; 5389 function setSyntheticLeadingComments<T extends Node>(node: T, comments: SynthesizedComment[] | undefined): T; 5390 function addSyntheticLeadingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T; 5391 function getSyntheticTrailingComments(node: Node): SynthesizedComment[] | undefined; 5392 function setSyntheticTrailingComments<T extends Node>(node: T, comments: SynthesizedComment[] | undefined): T; 5393 function addSyntheticTrailingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T; 5394 function moveSyntheticComments<T extends Node>(node: T, original: Node): T; 5395 /** 5396 * Gets the constant value to emit for an expression representing an enum. 5397 */ 5398 function getConstantValue(node: AccessExpression): string | number | undefined; 5399 /** 5400 * Sets the constant value to emit for an expression. 5401 */ 5402 function setConstantValue(node: AccessExpression, value: string | number): AccessExpression; 5403 /** 5404 * Adds an EmitHelper to a node. 5405 */ 5406 function addEmitHelper<T extends Node>(node: T, helper: EmitHelper): T; 5407 /** 5408 * Add EmitHelpers to a node. 5409 */ 5410 function addEmitHelpers<T extends Node>(node: T, helpers: EmitHelper[] | undefined): T; 5411 /** 5412 * Removes an EmitHelper from a node. 5413 */ 5414 function removeEmitHelper(node: Node, helper: EmitHelper): boolean; 5415 /** 5416 * Gets the EmitHelpers of a node. 5417 */ 5418 function getEmitHelpers(node: Node): EmitHelper[] | undefined; 5419 /** 5420 * Moves matching emit helpers from a source node to a target node. 5421 */ 5422 function moveEmitHelpers(source: Node, target: Node, predicate: (helper: EmitHelper) => boolean): void; 5423 function isNumericLiteral(node: Node): node is NumericLiteral; 5424 function isBigIntLiteral(node: Node): node is BigIntLiteral; 5425 function isStringLiteral(node: Node): node is StringLiteral; 5426 function isJsxText(node: Node): node is JsxText; 5427 function isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral; 5428 function isNoSubstitutionTemplateLiteral(node: Node): node is NoSubstitutionTemplateLiteral; 5429 function isTemplateHead(node: Node): node is TemplateHead; 5430 function isTemplateMiddle(node: Node): node is TemplateMiddle; 5431 function isTemplateTail(node: Node): node is TemplateTail; 5432 function isDotDotDotToken(node: Node): node is DotDotDotToken; 5433 function isPlusToken(node: Node): node is PlusToken; 5434 function isMinusToken(node: Node): node is MinusToken; 5435 function isAsteriskToken(node: Node): node is AsteriskToken; 5436 function isIdentifier(node: Node): node is Identifier; 5437 function isPrivateIdentifier(node: Node): node is PrivateIdentifier; 5438 function isQualifiedName(node: Node): node is QualifiedName; 5439 function isComputedPropertyName(node: Node): node is ComputedPropertyName; 5440 function isTypeParameterDeclaration(node: Node): node is TypeParameterDeclaration; 5441 function isParameter(node: Node): node is ParameterDeclaration; 5442 function isDecoratorOrAnnotation(node: Node): node is Decorator; 5443 function isDecorator(node: Node): node is Decorator; 5444 function isAnnotation(node: Node): node is Annotation; 5445 function isPropertySignature(node: Node): node is PropertySignature; 5446 function isPropertyDeclaration(node: Node): node is PropertyDeclaration; 5447 function isAnnotationPropertyDeclaration(node: Node): node is AnnotationPropertyDeclaration; 5448 function isMethodSignature(node: Node): node is MethodSignature; 5449 function isMethodDeclaration(node: Node): node is MethodDeclaration; 5450 function isClassStaticBlockDeclaration(node: Node): node is ClassStaticBlockDeclaration; 5451 function isConstructorDeclaration(node: Node): node is ConstructorDeclaration; 5452 function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration; 5453 function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration; 5454 function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration; 5455 function isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration; 5456 function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration; 5457 function isTypePredicateNode(node: Node): node is TypePredicateNode; 5458 function isTypeReferenceNode(node: Node): node is TypeReferenceNode; 5459 function isFunctionTypeNode(node: Node): node is FunctionTypeNode; 5460 function isConstructorTypeNode(node: Node): node is ConstructorTypeNode; 5461 function isTypeQueryNode(node: Node): node is TypeQueryNode; 5462 function isTypeLiteralNode(node: Node): node is TypeLiteralNode; 5463 function isArrayTypeNode(node: Node): node is ArrayTypeNode; 5464 function isTupleTypeNode(node: Node): node is TupleTypeNode; 5465 function isNamedTupleMember(node: Node): node is NamedTupleMember; 5466 function isOptionalTypeNode(node: Node): node is OptionalTypeNode; 5467 function isRestTypeNode(node: Node): node is RestTypeNode; 5468 function isUnionTypeNode(node: Node): node is UnionTypeNode; 5469 function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode; 5470 function isConditionalTypeNode(node: Node): node is ConditionalTypeNode; 5471 function isInferTypeNode(node: Node): node is InferTypeNode; 5472 function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode; 5473 function isThisTypeNode(node: Node): node is ThisTypeNode; 5474 function isTypeOperatorNode(node: Node): node is TypeOperatorNode; 5475 function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode; 5476 function isMappedTypeNode(node: Node): node is MappedTypeNode; 5477 function isLiteralTypeNode(node: Node): node is LiteralTypeNode; 5478 function isImportTypeNode(node: Node): node is ImportTypeNode; 5479 function isTemplateLiteralTypeSpan(node: Node): node is TemplateLiteralTypeSpan; 5480 function isTemplateLiteralTypeNode(node: Node): node is TemplateLiteralTypeNode; 5481 function isObjectBindingPattern(node: Node): node is ObjectBindingPattern; 5482 function isArrayBindingPattern(node: Node): node is ArrayBindingPattern; 5483 function isBindingElement(node: Node): node is BindingElement; 5484 function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression; 5485 function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression; 5486 function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression; 5487 function isElementAccessExpression(node: Node): node is ElementAccessExpression; 5488 function isCallExpression(node: Node): node is CallExpression; 5489 function isNewExpression(node: Node): node is NewExpression; 5490 function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression; 5491 function isTypeAssertionExpression(node: Node): node is TypeAssertion; 5492 function isParenthesizedExpression(node: Node): node is ParenthesizedExpression; 5493 function isFunctionExpression(node: Node): node is FunctionExpression; 5494 function isEtsComponentExpression(node: Node): node is EtsComponentExpression; 5495 function isArrowFunction(node: Node): node is ArrowFunction; 5496 function isDeleteExpression(node: Node): node is DeleteExpression; 5497 function isTypeOfExpression(node: Node): node is TypeOfExpression; 5498 function isVoidExpression(node: Node): node is VoidExpression; 5499 function isAwaitExpression(node: Node): node is AwaitExpression; 5500 function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression; 5501 function isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression; 5502 function isBinaryExpression(node: Node): node is BinaryExpression; 5503 function isConditionalExpression(node: Node): node is ConditionalExpression; 5504 function isTemplateExpression(node: Node): node is TemplateExpression; 5505 function isYieldExpression(node: Node): node is YieldExpression; 5506 function isSpreadElement(node: Node): node is SpreadElement; 5507 function isClassExpression(node: Node): node is ClassExpression; 5508 function isOmittedExpression(node: Node): node is OmittedExpression; 5509 function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments; 5510 function isAsExpression(node: Node): node is AsExpression; 5511 function isSatisfiesExpression(node: Node): node is SatisfiesExpression; 5512 function isNonNullExpression(node: Node): node is NonNullExpression; 5513 function isMetaProperty(node: Node): node is MetaProperty; 5514 function isSyntheticExpression(node: Node): node is SyntheticExpression; 5515 function isPartiallyEmittedExpression(node: Node): node is PartiallyEmittedExpression; 5516 function isCommaListExpression(node: Node): node is CommaListExpression; 5517 function isTemplateSpan(node: Node): node is TemplateSpan; 5518 function isSemicolonClassElement(node: Node): node is SemicolonClassElement; 5519 function isBlock(node: Node): node is Block; 5520 function isVariableStatement(node: Node): node is VariableStatement; 5521 function isEmptyStatement(node: Node): node is EmptyStatement; 5522 function isExpressionStatement(node: Node): node is ExpressionStatement; 5523 function isIfStatement(node: Node): node is IfStatement; 5524 function isDoStatement(node: Node): node is DoStatement; 5525 function isWhileStatement(node: Node): node is WhileStatement; 5526 function isForStatement(node: Node): node is ForStatement; 5527 function isForInStatement(node: Node): node is ForInStatement; 5528 function isForOfStatement(node: Node): node is ForOfStatement; 5529 function isContinueStatement(node: Node): node is ContinueStatement; 5530 function isBreakStatement(node: Node): node is BreakStatement; 5531 function isReturnStatement(node: Node): node is ReturnStatement; 5532 function isWithStatement(node: Node): node is WithStatement; 5533 function isSwitchStatement(node: Node): node is SwitchStatement; 5534 function isLabeledStatement(node: Node): node is LabeledStatement; 5535 function isThrowStatement(node: Node): node is ThrowStatement; 5536 function isTryStatement(node: Node): node is TryStatement; 5537 function isDebuggerStatement(node: Node): node is DebuggerStatement; 5538 function isVariableDeclaration(node: Node): node is VariableDeclaration; 5539 function isVariableDeclarationList(node: Node): node is VariableDeclarationList; 5540 function isFunctionDeclaration(node: Node): node is FunctionDeclaration; 5541 function isClassDeclaration(node: Node): node is ClassDeclaration; 5542 function isStructDeclaration(node: Node): node is StructDeclaration; 5543 function isAnnotationDeclaration(node: Node): node is AnnotationDeclaration; 5544 function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration; 5545 function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration; 5546 function isEnumDeclaration(node: Node): node is EnumDeclaration; 5547 function isModuleDeclaration(node: Node): node is ModuleDeclaration; 5548 function isModuleBlock(node: Node): node is ModuleBlock; 5549 function isCaseBlock(node: Node): node is CaseBlock; 5550 function isNamespaceExportDeclaration(node: Node): node is NamespaceExportDeclaration; 5551 function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration; 5552 function isImportDeclaration(node: Node): node is ImportDeclaration; 5553 function isImportClause(node: Node): node is ImportClause; 5554 function isImportTypeAssertionContainer(node: Node): node is ImportTypeAssertionContainer; 5555 function isAssertClause(node: Node): node is AssertClause; 5556 function isAssertEntry(node: Node): node is AssertEntry; 5557 function isNamespaceImport(node: Node): node is NamespaceImport; 5558 function isNamespaceExport(node: Node): node is NamespaceExport; 5559 function isNamedImports(node: Node): node is NamedImports; 5560 function isImportSpecifier(node: Node): node is ImportSpecifier; 5561 function isExportAssignment(node: Node): node is ExportAssignment; 5562 function isExportDeclaration(node: Node): node is ExportDeclaration; 5563 function isNamedExports(node: Node): node is NamedExports; 5564 function isExportSpecifier(node: Node): node is ExportSpecifier; 5565 function isMissingDeclaration(node: Node): node is MissingDeclaration; 5566 function isNotEmittedStatement(node: Node): node is NotEmittedStatement; 5567 function isExternalModuleReference(node: Node): node is ExternalModuleReference; 5568 function isJsxElement(node: Node): node is JsxElement; 5569 function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement; 5570 function isJsxOpeningElement(node: Node): node is JsxOpeningElement; 5571 function isJsxClosingElement(node: Node): node is JsxClosingElement; 5572 function isJsxFragment(node: Node): node is JsxFragment; 5573 function isJsxOpeningFragment(node: Node): node is JsxOpeningFragment; 5574 function isJsxClosingFragment(node: Node): node is JsxClosingFragment; 5575 function isJsxAttribute(node: Node): node is JsxAttribute; 5576 function isJsxAttributes(node: Node): node is JsxAttributes; 5577 function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute; 5578 function isJsxExpression(node: Node): node is JsxExpression; 5579 function isCaseClause(node: Node): node is CaseClause; 5580 function isDefaultClause(node: Node): node is DefaultClause; 5581 function isHeritageClause(node: Node): node is HeritageClause; 5582 function isCatchClause(node: Node): node is CatchClause; 5583 function isPropertyAssignment(node: Node): node is PropertyAssignment; 5584 function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment; 5585 function isSpreadAssignment(node: Node): node is SpreadAssignment; 5586 function isEnumMember(node: Node): node is EnumMember; 5587 function isUnparsedPrepend(node: Node): node is UnparsedPrepend; 5588 function isSourceFile(node: Node): node is SourceFile; 5589 function isBundle(node: Node): node is Bundle; 5590 function isUnparsedSource(node: Node): node is UnparsedSource; 5591 function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression; 5592 function isJSDocNameReference(node: Node): node is JSDocNameReference; 5593 function isJSDocMemberName(node: Node): node is JSDocMemberName; 5594 function isJSDocLink(node: Node): node is JSDocLink; 5595 function isJSDocLinkCode(node: Node): node is JSDocLinkCode; 5596 function isJSDocLinkPlain(node: Node): node is JSDocLinkPlain; 5597 function isJSDocAllType(node: Node): node is JSDocAllType; 5598 function isJSDocUnknownType(node: Node): node is JSDocUnknownType; 5599 function isJSDocNullableType(node: Node): node is JSDocNullableType; 5600 function isJSDocNonNullableType(node: Node): node is JSDocNonNullableType; 5601 function isJSDocOptionalType(node: Node): node is JSDocOptionalType; 5602 function isJSDocFunctionType(node: Node): node is JSDocFunctionType; 5603 function isJSDocVariadicType(node: Node): node is JSDocVariadicType; 5604 function isJSDocNamepathType(node: Node): node is JSDocNamepathType; 5605 function isJSDoc(node: Node): node is JSDoc; 5606 function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral; 5607 function isJSDocSignature(node: Node): node is JSDocSignature; 5608 function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag; 5609 function isJSDocAuthorTag(node: Node): node is JSDocAuthorTag; 5610 function isJSDocClassTag(node: Node): node is JSDocClassTag; 5611 function isJSDocCallbackTag(node: Node): node is JSDocCallbackTag; 5612 function isJSDocPublicTag(node: Node): node is JSDocPublicTag; 5613 function isJSDocPrivateTag(node: Node): node is JSDocPrivateTag; 5614 function isJSDocProtectedTag(node: Node): node is JSDocProtectedTag; 5615 function isJSDocReadonlyTag(node: Node): node is JSDocReadonlyTag; 5616 function isJSDocOverrideTag(node: Node): node is JSDocOverrideTag; 5617 function isJSDocDeprecatedTag(node: Node): node is JSDocDeprecatedTag; 5618 function isJSDocSeeTag(node: Node): node is JSDocSeeTag; 5619 function isJSDocEnumTag(node: Node): node is JSDocEnumTag; 5620 function isJSDocParameterTag(node: Node): node is JSDocParameterTag; 5621 function isJSDocReturnTag(node: Node): node is JSDocReturnTag; 5622 function isJSDocThisTag(node: Node): node is JSDocThisTag; 5623 function isJSDocTypeTag(node: Node): node is JSDocTypeTag; 5624 function isJSDocTemplateTag(node: Node): node is JSDocTemplateTag; 5625 function isJSDocTypedefTag(node: Node): node is JSDocTypedefTag; 5626 function isJSDocUnknownTag(node: Node): node is JSDocUnknownTag; 5627 function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag; 5628 function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag; 5629 function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T; 5630 function canHaveModifiers(node: Node): node is HasModifiers; 5631 function canHaveDecorators(node: Node): node is HasDecorators; 5632 /** 5633 * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes 5634 * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, 5635 * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns 5636 * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. 5637 * 5638 * @param node a given node to visit its children 5639 * @param cbNode a callback to be invoked for all child nodes 5640 * @param cbNodes a callback to be invoked for embedded array 5641 * 5642 * @remarks `forEachChild` must visit the children of a node in the order 5643 * that they appear in the source code. The language service depends on this property to locate nodes by position. 5644 */ 5645 function forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray<Node>) => T | undefined): T | undefined; 5646 function createSourceFile(fileName: string, sourceText: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, setParentNodes?: boolean, scriptKind?: ScriptKind, options?: CompilerOptions, isArkguardInput?: boolean): SourceFile; 5647 function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName | undefined; 5648 /** 5649 * Parse json text into SyntaxTree and return node and parse errors if any 5650 * @param fileName 5651 * @param sourceText 5652 */ 5653 function parseJsonText(fileName: string, sourceText: string): JsonSourceFile; 5654 function isExternalModule(file: SourceFile): boolean; 5655 function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean, option?: CompilerOptions): SourceFile; 5656 function setLanguageVersionByFilePath(getLanguageVersion: ((filePath: string) => boolean) | undefined): void; 5657 interface CreateSourceFileOptions { 5658 languageVersion: ScriptTarget; 5659 /** 5660 * Controls the format the file is detected as - this can be derived from only the path 5661 * and files on disk, but needs to be done with a module resolution cache in scope to be performant. 5662 * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`. 5663 */ 5664 impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS; 5665 /** 5666 * Controls how module-y-ness is set for the given file. Usually the result of calling 5667 * `getSetExternalModuleIndicator` on a valid `CompilerOptions` object. If not present, the default 5668 * check specified by `isFileProbablyExternalModule` will be used to set the field. 5669 */ 5670 setExternalModuleIndicator?: (file: SourceFile) => void; 5671 } 5672 function parseCommandLine(commandLine: readonly string[], readFile?: (path: string) => string | undefined): ParsedCommandLine; 5673 /** 5674 * Reads the config file, reports errors if any and exits if the config file cannot be found 5675 */ 5676 function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions | undefined, host: ParseConfigFileHost, extendedConfigCache?: Map<ExtendedConfigCacheEntry>, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): ParsedCommandLine | undefined; 5677 /** 5678 * Read tsconfig.json file 5679 * @param fileName The path to the config file 5680 */ 5681 function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): { 5682 config?: any; 5683 error?: Diagnostic; 5684 }; 5685 /** 5686 * Parse the text of the tsconfig.json file 5687 * @param fileName The path to the config file 5688 * @param jsonText The text of the config file 5689 */ 5690 function parseConfigFileTextToJson(fileName: string, jsonText: string): { 5691 config?: any; 5692 error?: Diagnostic; 5693 }; 5694 /** 5695 * Read tsconfig.json file 5696 * @param fileName The path to the config file 5697 */ 5698 function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile; 5699 /** 5700 * Convert the json syntax tree into the json value 5701 */ 5702 function convertToObject(sourceFile: JsonSourceFile, errors: Push<Diagnostic>): any; 5703 /** 5704 * Parse the contents of a config file (tsconfig.json). 5705 * @param json The contents of the config file to parse 5706 * @param host Instance of ParseConfigHost used to enumerate files in folder. 5707 * @param basePath A root directory to resolve relative path entries in the config 5708 * file to. e.g. outDir 5709 */ 5710 function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map<ExtendedConfigCacheEntry>, existingWatchOptions?: WatchOptions): ParsedCommandLine; 5711 /** 5712 * Parse the contents of a config file (tsconfig.json). 5713 * @param jsonNode The contents of the config file to parse 5714 * @param host Instance of ParseConfigHost used to enumerate files in folder. 5715 * @param basePath A root directory to resolve relative path entries in the config 5716 * file to. e.g. outDir 5717 */ 5718 function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map<ExtendedConfigCacheEntry>, existingWatchOptions?: WatchOptions): ParsedCommandLine; 5719 function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): { 5720 options: CompilerOptions; 5721 errors: Diagnostic[]; 5722 }; 5723 function convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): { 5724 options: TypeAcquisition; 5725 errors: Diagnostic[]; 5726 }; 5727 type DiagnosticReporter = (diagnostic: Diagnostic) => void; 5728 /** 5729 * Reports config file diagnostics 5730 */ 5731 interface ConfigFileDiagnosticsReporter { 5732 /** 5733 * Reports unrecoverable error when parsing config file 5734 */ 5735 onUnRecoverableConfigFileDiagnostic: DiagnosticReporter; 5736 } 5737 /** 5738 * Interface extending ParseConfigHost to support ParseConfigFile that reads config file and reports errors 5739 */ 5740 interface ParseConfigFileHost extends ParseConfigHost, ConfigFileDiagnosticsReporter { 5741 getCurrentDirectory(): string; 5742 } 5743 interface ParsedTsconfig { 5744 raw: any; 5745 options?: CompilerOptions; 5746 watchOptions?: WatchOptions; 5747 typeAcquisition?: TypeAcquisition; 5748 /** 5749 * Note that the case of the config path has not yet been normalized, as no files have been imported into the project yet 5750 */ 5751 extendedConfigPath?: string; 5752 } 5753 interface ExtendedConfigCacheEntry { 5754 extendedResult: TsConfigSourceFile; 5755 extendedConfig: ParsedTsconfig | undefined; 5756 } 5757 function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined; 5758 /** 5759 * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. 5760 * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups 5761 * is assumed to be the same as root directory of the project. 5762 */ 5763 function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache, resolutionMode?: SourceFile["impliedNodeFormat"]): ResolvedTypeReferenceDirectiveWithFailedLookupLocations; 5764 /** 5765 * Given a set of options, returns the set of type directive names 5766 * that should be included for this program automatically. 5767 * This list could either come from the config file, 5768 * or from enumerating the types root + initial secondary types lookup location. 5769 * More type directives might appear in the program later as a result of loading actual source files; 5770 * this list is only the set of defaults that are implicitly included. 5771 */ 5772 function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[]; 5773 function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache; 5774 function createTypeReferenceDirectiveResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): TypeReferenceDirectiveResolutionCache; 5775 function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache, mode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations | undefined; 5776 function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations; 5777 function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations; 5778 /** 5779 * This will be called on the successfully resolved path from `loadModuleFromFile`. 5780 * (Not needed for `loadModuleFromNodeModules` as that looks up the `package.json` or `oh-package.json5` as part of resolution.) 5781 * 5782 * packageDirectory is the directory of the package itself. 5783 * For `blah/node_modules/foo/index.d.ts` this is packageDirectory: "foo" 5784 * For `/node_modules/foo/bar.d.ts` this is packageDirectory: "foo" 5785 * For `/node_modules/@types/foo/bar/index.d.ts` this is packageDirectory: "@types/foo" 5786 * For `/node_modules/foo/bar/index.d.ts` this is packageDirectory: "foo" 5787 */ 5788 function parseModuleFromPath(resolved: string, packageManagerType?: string): string | undefined; 5789 function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations; 5790 interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache { 5791 } 5792 interface ModeAwareCache<T> { 5793 get(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined): T | undefined; 5794 set(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined, value: T): this; 5795 delete(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined): this; 5796 has(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined): boolean; 5797 forEach(cb: (elem: T, key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined) => void): void; 5798 size(): number; 5799 } 5800 /** 5801 * Cached resolutions per containing directory. 5802 * This assumes that any module id will have the same resolution for sibling files located in the same folder. 5803 */ 5804 interface PerDirectoryResolutionCache<T> { 5805 getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): ModeAwareCache<T>; 5806 clear(): void; 5807 /** 5808 * Updates with the current compilerOptions the cache will operate with. 5809 * This updates the redirects map as well if needed so module resolutions are cached if they can across the projects 5810 */ 5811 update(options: CompilerOptions): void; 5812 } 5813 interface ModuleResolutionCache extends PerDirectoryResolutionCache<ResolvedModuleWithFailedLookupLocations>, NonRelativeModuleNameResolutionCache, PackageJsonInfoCache { 5814 getPackageJsonInfoCache(): PackageJsonInfoCache; 5815 } 5816 /** 5817 * Stored map from non-relative module name to a table: directory -> result of module lookup in this directory 5818 * We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive. 5819 */ 5820 interface NonRelativeModuleNameResolutionCache extends PackageJsonInfoCache { 5821 getOrCreateCacheForModuleName(nonRelativeModuleName: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined, redirectedReference?: ResolvedProjectReference): PerModuleNameCache; 5822 } 5823 interface PackageJsonInfoCache { 5824 clear(): void; 5825 } 5826 interface PerModuleNameCache { 5827 get(directory: string): ResolvedModuleWithFailedLookupLocations | undefined; 5828 set(directory: string, result: ResolvedModuleWithFailedLookupLocations): void; 5829 } 5830 function concatenateDecoratorsAndModifiers(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined): readonly ModifierLike[] | undefined; 5831 function isEtsFunctionDecorators(name: string | undefined, options: CompilerOptions): boolean; 5832 function isOhpm(packageManagerType: string | undefined): boolean; 5833 function isOHModules(modulePath: string): boolean; 5834 function isOhpmAndOhModules(packageManagerType: string | undefined, modulePath: string): boolean; 5835 function getModulePathPartByPMType(packageManagerType: string | undefined): string; 5836 function getModuleByPMType(packageManagerType: string | undefined): string; 5837 function getPackageJsonByPMType(packageManagerType: string | undefined): string; 5838 function isOHModulesDirectory(dirPath: Path): boolean; 5839 function isTargetModulesDerectory(dirPath: Path): boolean; 5840 function pathContainsOHModules(path: string): boolean; 5841 function choosePathContainsModules(packageManagerType: string | undefined, fileName: string): boolean; 5842 function getTypeExportImportAndConstEnumTransformer(context: TransformationContext): (node: SourceFile) => SourceFile; 5843 function getAnnotationTransformer(): TransformerFactory<SourceFile>; 5844 function transformAnnotation(context: TransformationContext): (node: SourceFile) => SourceFile; 5845 /** 5846 * Add 'type' flag to import/export when import/export an type member. 5847 * Replace const enum with number and string literal. 5848 */ 5849 function transformTypeExportImportAndConstEnumInTypeScript(context: TransformationContext): (node: SourceFile) => SourceFile; 5850 function hasTsNoCheckOrTsIgnoreFlag(node: SourceFile): boolean; 5851 function createObfTextSingleLineWriter(): EmitTextWriter; 5852 function isMixedCompilerSDKPath(compilerOptions: CompilerOptions): boolean; 5853 function cleanKitJsonCache(): void; 5854 function getMaxFlowDepth(compilerOptions: CompilerOptions): number; 5855 function getErrorCode(diagnostic: Diagnostic): ErrorInfo; 5856 function getErrorCodeArea(code: number): ErrorCodeArea; 5857 const ohModulesPathPart: string; 5858 const REQUIRE_DECORATOR = "Require"; 5859 const THROWS_TAG = "throws"; 5860 const THROWS_CATCH = "catch"; 5861 const THROWS_ASYNC_CALLBACK = "AsyncCallback"; 5862 const THROWS_ERROR_CALLBACK = "ErrorCallback"; 5863 interface MoreInfo { 5864 cn: string; 5865 en: string; 5866 } 5867 class ErrorInfo { 5868 code: string; 5869 description: string; 5870 cause: string; 5871 position: string; 5872 solutions: string[]; 5873 moreInfo?: MoreInfo; 5874 getCode(): string; 5875 getDescription(): string; 5876 getCause(): string; 5877 getPosition(): string; 5878 getSolutions(): string[]; 5879 getMoreInfo(): MoreInfo | undefined; 5880 } 5881 enum ErrorCodeArea { 5882 TSC = 0, 5883 LINTER = 1, 5884 UI = 2 5885 } 5886 enum CheckMode { 5887 Normal = 0, 5888 Contextual = 1, 5889 Inferential = 2, 5890 SkipContextSensitive = 4, 5891 SkipGenericFunctions = 8, 5892 IsForSignatureHelp = 16, 5893 IsForStringLiteralArgumentCompletions = 32, 5894 RestBindingElement = 64, 5895 SkipEtsComponentBody = 128 5896 } 5897 /** 5898 * Visits a Node using the supplied visitor, possibly returning a new Node in its place. 5899 * 5900 * @param node The Node to visit. 5901 * @param visitor The callback used to visit the Node. 5902 * @param test A callback to execute to verify the Node is valid. 5903 * @param lift An optional callback to execute to lift a NodeArray into a valid Node. 5904 */ 5905 function visitNode<T extends Node>(node: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T; 5906 /** 5907 * Visits a Node using the supplied visitor, possibly returning a new Node in its place. 5908 * 5909 * @param node The Node to visit. 5910 * @param visitor The callback used to visit the Node. 5911 * @param test A callback to execute to verify the Node is valid. 5912 * @param lift An optional callback to execute to lift a NodeArray into a valid Node. 5913 */ 5914 function visitNode<T extends Node>(node: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T | undefined; 5915 /** 5916 * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. 5917 * 5918 * @param nodes The NodeArray to visit. 5919 * @param visitor The callback used to visit a Node. 5920 * @param test A node test to execute for each node. 5921 * @param start An optional value indicating the starting offset at which to start visiting. 5922 * @param count An optional value indicating the maximum number of nodes to visit. 5923 */ 5924 function visitNodes<T extends Node>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>; 5925 /** 5926 * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. 5927 * 5928 * @param nodes The NodeArray to visit. 5929 * @param visitor The callback used to visit a Node. 5930 * @param test A node test to execute for each node. 5931 * @param start An optional value indicating the starting offset at which to start visiting. 5932 * @param count An optional value indicating the maximum number of nodes to visit. 5933 */ 5934 function visitNodes<T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined; 5935 /** 5936 * Starts a new lexical environment and visits a statement list, ending the lexical environment 5937 * and merging hoisted declarations upon completion. 5938 */ 5939 function visitLexicalEnvironment(statements: NodeArray<Statement>, visitor: Visitor, context: TransformationContext, start?: number, ensureUseStrict?: boolean, nodesVisitor?: NodesVisitor): NodeArray<Statement>; 5940 /** 5941 * Starts a new lexical environment and visits a parameter list, suspending the lexical 5942 * environment upon completion. 5943 */ 5944 function visitParameterList(nodes: NodeArray<ParameterDeclaration>, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray<ParameterDeclaration>; 5945 function visitParameterList(nodes: NodeArray<ParameterDeclaration> | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray<ParameterDeclaration> | undefined; 5946 /** 5947 * Resumes a suspended lexical environment and visits a function body, ending the lexical 5948 * environment and merging hoisted declarations upon completion. 5949 */ 5950 function visitFunctionBody(node: FunctionBody, visitor: Visitor, context: TransformationContext): FunctionBody; 5951 /** 5952 * Resumes a suspended lexical environment and visits a function body, ending the lexical 5953 * environment and merging hoisted declarations upon completion. 5954 */ 5955 function visitFunctionBody(node: FunctionBody | undefined, visitor: Visitor, context: TransformationContext): FunctionBody | undefined; 5956 /** 5957 * Resumes a suspended lexical environment and visits a concise body, ending the lexical 5958 * environment and merging hoisted declarations upon completion. 5959 */ 5960 function visitFunctionBody(node: ConciseBody, visitor: Visitor, context: TransformationContext): ConciseBody; 5961 /** 5962 * Visits an iteration body, adding any block-scoped variables required by the transformation. 5963 */ 5964 function visitIterationBody(body: Statement, visitor: Visitor, context: TransformationContext): Statement; 5965 /** 5966 * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. 5967 * 5968 * @param node The Node whose children will be visited. 5969 * @param visitor The callback used to visit each child. 5970 * @param context A lexical environment context for the visitor. 5971 */ 5972 function visitEachChild<T extends Node>(node: T, visitor: Visitor, context: TransformationContext): T; 5973 /** 5974 * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. 5975 * 5976 * @param node The Node whose children will be visited. 5977 * @param visitor The callback used to visit each child. 5978 * @param context A lexical environment context for the visitor. 5979 */ 5980 function visitEachChild<T extends Node>(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; 5981 function createSourceMapGenerator(host: EmitHost, file: string, sourceRoot: string, sourcesDirectoryPath: string, generatorOptions: SourceMapGeneratorOptions): SourceMapGenerator; 5982 interface SourceMapGeneratorOptions { 5983 extendedDiagnostics?: boolean; 5984 } 5985 function isInternalDeclaration(node: Node, currentSourceFile: SourceFile): boolean | 0 | undefined; 5986 const nullTransformationContext: TransformationContext; 5987 function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): string | undefined; 5988 function getTsBuildInfoEmitOutputFilePathForLinter(tsBuildInfoPath: string): string; 5989 function getOutputFileNames(commandLine: ParsedCommandLine, inputFileName: string, ignoreCase: boolean): readonly string[]; 5990 function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer; 5991 function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string | undefined; 5992 function resolveTripleslashReference(moduleName: string, containingFile: string): string; 5993 function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost; 5994 function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 5995 function formatDiagnostics(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string; 5996 function formatDiagnostic(diagnostic: Diagnostic, host: FormatDiagnosticsHost): string; 5997 function formatDiagnosticsWithColorAndContext(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string; 5998 function flattenDiagnosticMessageText(diag: string | DiagnosticMessageChain | undefined, newLine: string, indent?: number): string; 5999 /** 6000 * Calculates the resulting resolution mode for some reference in some file - this is generally the explicitly 6001 * provided resolution mode in the reference, unless one is not present, in which case it is the mode of the containing file. 6002 */ 6003 function getModeForFileReference(ref: FileReference | string, containingFileMode: SourceFile["impliedNodeFormat"]): ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined; 6004 /** 6005 * Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly 6006 * defined mode of the import if provided, or, if not, the mode of the containing file (with some exceptions: import=require is always commonjs, dynamic import is always esm). 6007 * If you have an actual import node, prefer using getModeForUsageLocation on the reference string node. 6008 * @param file File to fetch the resolution mode within 6009 * @param index Index into the file's complete resolution list to get the resolution of - this is a concatenation of the file's imports and module augmentations 6010 */ 6011 function getModeForResolutionAtIndex(file: SourceFile, index: number): ModuleKind.CommonJS | ModuleKind.ESNext | undefined; 6012 /** 6013 * Calculates the final resolution mode for a given module reference node. This is generally the explicitly provided resolution mode, if 6014 * one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm). 6015 * Notably, this function always returns `undefined` if the containing file has an `undefined` `impliedNodeFormat` - this field is only set when 6016 * `moduleResolution` is `node16`+. 6017 * @param file The file the import or import-like reference is contained within 6018 * @param usage The module reference string 6019 * @returns The final resolution mode of the import 6020 */ 6021 function getModeForUsageLocation(file: { 6022 impliedNodeFormat?: SourceFile["impliedNodeFormat"]; 6023 }, usage: StringLiteralLike): ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined; 6024 function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): readonly Diagnostic[]; 6025 /** 6026 * A function for determining if a given file is esm or cjs format, assuming modern node module resolution rules, as configured by the 6027 * `options` parameter. 6028 * 6029 * @param fileName The normalized absolute path to check the format of (it need not exist on disk) 6030 * @param [packageJsonInfoCache] A cache for package file lookups - it's best to have a cache when this function is called often 6031 * @param host The ModuleResolutionHost which can perform the filesystem lookups for package json data 6032 * @param options The compiler options to perform the analysis under - relevant options are `moduleResolution` and `traceResolution` 6033 * @returns `undefined` if the path has no relevant implied format, `ModuleKind.ESNext` for esm format, and `ModuleKind.CommonJS` for cjs format 6034 */ 6035 function getImpliedNodeFormatForFile(fileName: Path, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions): ModuleKind.ESNext | ModuleKind.CommonJS | undefined; 6036 /** 6037 * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions' 6038 * that represent a compilation unit. 6039 * 6040 * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and 6041 * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in. 6042 * 6043 * @param createProgramOptions - The options for creating a program. 6044 * @returns A 'Program' object. 6045 */ 6046 function createProgram(createProgramOptions: CreateProgramOptions): Program; 6047 /** 6048 * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions' 6049 * that represent a compilation unit. 6050 * 6051 * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and 6052 * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in. 6053 * 6054 * @param rootNames - A set of root files. 6055 * @param options - The compiler options which should be used. 6056 * @param host - The host interacts with the underlying file system. 6057 * @param oldProgram - Reuses an old program structure. 6058 * @param configFileParsingDiagnostics - error during config file parsing 6059 * @returns A 'Program' object. 6060 */ 6061 function createProgram(rootNames: readonly string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: readonly Diagnostic[]): Program; 6062 /** 6063 * Returns the target config filename of a project reference. 6064 * Note: The file might not exist. 6065 */ 6066 function resolveProjectReferencePath(ref: ProjectReference): ResolvedConfigFileName; 6067 /** @deprecated */ function resolveProjectReferencePath(host: ResolveProjectReferencePathHost, ref: ProjectReference): ResolvedConfigFileName; 6068 interface FormatDiagnosticsHost { 6069 getCurrentDirectory(): string; 6070 getCanonicalFileName(fileName: string): string; 6071 getNewLine(): string; 6072 } 6073 /** @deprecated */ interface ResolveProjectReferencePathHost { 6074 fileExists(fileName: string): boolean; 6075 } 6076 interface EmitOutput { 6077 outputFiles: OutputFile[]; 6078 emitSkipped: boolean; 6079 } 6080 interface OutputFile { 6081 name: string; 6082 writeByteOrderMark: boolean; 6083 text: string; 6084 } 6085 /** 6086 * Create the builder to manage semantic diagnostics and cache them 6087 */ 6088 function createSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram?: SemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): SemanticDiagnosticsBuilderProgram; 6089 function createSemanticDiagnosticsBuilderProgram(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: SemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): SemanticDiagnosticsBuilderProgram; 6090 /** 6091 * Create the builder that can handle the changes in program and iterate through changed files 6092 * to emit the those files and manage semantic diagnostics cache as well 6093 */ 6094 function createEmitAndSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): EmitAndSemanticDiagnosticsBuilderProgram; 6095 function createEmitAndSemanticDiagnosticsBuilderProgram(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): EmitAndSemanticDiagnosticsBuilderProgram; 6096 function createEmitAndSemanticDiagnosticsBuilderProgramForArkTs(newProgramOrRootNames: Program | readonly string[] | undefined, hostOrOptions: BuilderProgramHost | CompilerOptions | undefined, oldProgramOrHost?: CompilerHost | EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnosticsOrOldProgram?: readonly Diagnostic[] | EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): EmitAndSemanticDiagnosticsBuilderProgram; 6097 /** 6098 * Creates a builder thats just abstraction over program and can be used with watch 6099 */ 6100 function createAbstractBuilder(newProgram: Program, host: BuilderProgramHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): BuilderProgram; 6101 function createAbstractBuilder(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): BuilderProgram; 6102 type AffectedFileResult<T> = { 6103 result: T; 6104 affected: SourceFile | Program; 6105 } | undefined; 6106 interface BuilderProgramHost { 6107 /** 6108 * return true if file names are treated with case sensitivity 6109 */ 6110 useCaseSensitiveFileNames(): boolean; 6111 /** 6112 * If provided this would be used this hash instead of actual file shape text for detecting changes 6113 */ 6114 createHash?: (data: string) => string; 6115 /** 6116 * When emit or emitNextAffectedFile are called without writeFile, 6117 * this callback if present would be used to write files 6118 */ 6119 writeFile?: WriteFileCallback; 6120 } 6121 /** 6122 * Builder to manage the program state changes 6123 */ 6124 interface BuilderProgram { 6125 /** 6126 * Returns current program 6127 */ 6128 getProgram(): Program; 6129 /** 6130 * Get compiler options of the program 6131 */ 6132 getCompilerOptions(): CompilerOptions; 6133 /** 6134 * Get the source file in the program with file name 6135 */ 6136 getSourceFile(fileName: string): SourceFile | undefined; 6137 /** 6138 * Get a list of files in the program 6139 */ 6140 getSourceFiles(): readonly SourceFile[]; 6141 /** 6142 * Get the diagnostics for compiler options 6143 */ 6144 getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; 6145 /** 6146 * Get the diagnostics that dont belong to any file 6147 */ 6148 getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; 6149 /** 6150 * Get the diagnostics from config file parsing 6151 */ 6152 getConfigFileParsingDiagnostics(): readonly Diagnostic[]; 6153 /** 6154 * Get the syntax diagnostics, for all source files if source file is not supplied 6155 */ 6156 getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 6157 /** 6158 * Get the declaration diagnostics, for all source files if source file is not supplied 6159 */ 6160 getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[]; 6161 /** 6162 * Get all the dependencies of the file 6163 */ 6164 getAllDependencies(sourceFile: SourceFile): readonly string[]; 6165 /** 6166 * Gets the semantic diagnostics from the program corresponding to this state of file (if provided) or whole program 6167 * The semantic diagnostics are cached and managed here 6168 * Note that it is assumed that when asked about semantic diagnostics through this API, 6169 * the file has been taken out of affected files so it is safe to use cache or get from program and cache the diagnostics 6170 * In case of SemanticDiagnosticsBuilderProgram if the source file is not provided, 6171 * it will iterate through all the affected files, to ensure that cache stays valid and yet provide a way to get all semantic diagnostics 6172 */ 6173 getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 6174 /** 6175 * Emits the JavaScript and declaration files. 6176 * When targetSource file is specified, emits the files corresponding to that source file, 6177 * otherwise for the whole program. 6178 * In case of EmitAndSemanticDiagnosticsBuilderProgram, when targetSourceFile is specified, 6179 * it is assumed that that file is handled from affected file list. If targetSourceFile is not specified, 6180 * it will only emit all the affected files instead of whole program 6181 * 6182 * The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host 6183 * in that order would be used to write the files 6184 */ 6185 emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult; 6186 /** 6187 * Get the current directory of the program 6188 */ 6189 getCurrentDirectory(): string; 6190 isFileUpdateInConstEnumCache?(sourceFile: SourceFile): boolean; 6191 builderProgramForLinter?: EmitAndSemanticDiagnosticsBuilderProgram; 6192 } 6193 /** 6194 * The builder that caches the semantic diagnostics for the program and handles the changed files and affected files 6195 */ 6196 interface SemanticDiagnosticsBuilderProgram extends BuilderProgram { 6197 /** 6198 * Gets the semantic diagnostics from the program for the next affected file and caches it 6199 * Returns undefined if the iteration is complete 6200 */ 6201 getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>; 6202 } 6203 /** 6204 * The builder that can handle the changes in program and iterate through changed file to emit the files 6205 * The semantic diagnostics are cached per file and managed by clearing for the changed/affected files 6206 */ 6207 interface EmitAndSemanticDiagnosticsBuilderProgram extends SemanticDiagnosticsBuilderProgram { 6208 /** 6209 * Emits the next affected file's emit result (EmitResult and sourceFiles emitted) or returns undefined if iteration is complete 6210 * The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host 6211 * in that order would be used to write the files 6212 */ 6213 emitNextAffectedFile(writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): AffectedFileResult<EmitResult>; 6214 } 6215 function readBuilderProgram(compilerOptions: CompilerOptions, host: ReadBuildProgramHost, isForLinter?: boolean): ts.EmitAndSemanticDiagnosticsBuilderProgram | undefined; 6216 function createIncrementalCompilerHost(options: CompilerOptions, system?: ts.System): CompilerHost; 6217 function createIncrementalProgram<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>({ rootNames, options, configFileParsingDiagnostics, projectReferences, host, createProgram }: IncrementalProgramOptions<T>): T; 6218 function createIncrementalProgramForArkTs({ rootNames, options, configFileParsingDiagnostics, projectReferences, host }: IncrementalProgramOptions<EmitAndSemanticDiagnosticsBuilderProgram>): EmitAndSemanticDiagnosticsBuilderProgram; 6219 /** 6220 * Create the watch compiler host for either configFile or fileNames and its options 6221 */ 6222 function createWatchCompilerHost<T extends BuilderProgram>(configFileName: string, optionsToExtend: CompilerOptions | undefined, system: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): WatchCompilerHostOfConfigFile<T>; 6223 function createWatchCompilerHost<T extends BuilderProgram>(rootFiles: string[], options: CompilerOptions, system: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter, projectReferences?: readonly ProjectReference[], watchOptions?: WatchOptions): WatchCompilerHostOfFilesAndCompilerOptions<T>; 6224 /** 6225 * Creates the watch from the host for root files and compiler options 6226 */ 6227 function createWatchProgram<T extends BuilderProgram>(host: WatchCompilerHostOfFilesAndCompilerOptions<T>): WatchOfFilesAndCompilerOptions<T>; 6228 /** 6229 * Creates the watch from the host for config file 6230 */ 6231 function createWatchProgram<T extends BuilderProgram>(host: WatchCompilerHostOfConfigFile<T>): WatchOfConfigFile<T>; 6232 interface ReadBuildProgramHost { 6233 useCaseSensitiveFileNames(): boolean; 6234 getCurrentDirectory(): string; 6235 readFile(fileName: string): string | undefined; 6236 getLastCompiledProgram?(): Program; 6237 } 6238 interface IncrementalProgramOptions<T extends BuilderProgram> { 6239 rootNames: readonly string[]; 6240 options: CompilerOptions; 6241 configFileParsingDiagnostics?: readonly Diagnostic[]; 6242 projectReferences?: readonly ProjectReference[]; 6243 host?: CompilerHost; 6244 createProgram?: CreateProgram<T>; 6245 } 6246 type WatchStatusReporter = (diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number) => void; 6247 /** Create the program with rootNames and options, if they are undefined, oldProgram and new configFile diagnostics create new program */ 6248 type CreateProgram<T extends BuilderProgram> = (rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: T, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[] | undefined) => T; 6249 /** Host that has watch functionality used in --watch mode */ 6250 interface WatchHost { 6251 /** If provided, called with Diagnostic message that informs about change in watch status */ 6252 onWatchStatusChange?(diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number): void; 6253 /** Used to watch changes in source files, missing files needed to update the program or config file */ 6254 watchFile(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher; 6255 /** Used to watch resolved module's failed lookup locations, config file specs, type roots where auto type reference directives are added */ 6256 watchDirectory(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher; 6257 /** If provided, will be used to set delayed compilation, so that multiple changes in short span are compiled together */ 6258 setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any; 6259 /** If provided, will be used to reset existing delayed compilation */ 6260 clearTimeout?(timeoutId: any): void; 6261 } 6262 interface ProgramHost<T extends BuilderProgram> { 6263 /** 6264 * Used to create the program when need for program creation or recreation detected 6265 */ 6266 createProgram: CreateProgram<T>; 6267 useCaseSensitiveFileNames(): boolean; 6268 getNewLine(): string; 6269 getCurrentDirectory(): string; 6270 getDefaultLibFileName(options: CompilerOptions): string; 6271 getDefaultLibLocation?(): string; 6272 createHash?(data: string): string; 6273 /** 6274 * Use to check file presence for source files and 6275 * if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well 6276 */ 6277 fileExists(path: string): boolean; 6278 /** 6279 * Use to read file text for source files and 6280 * if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well 6281 */ 6282 readFile(path: string, encoding?: string): string | undefined; 6283 /** If provided, used for module resolution as well as to handle directory structure */ 6284 directoryExists?(path: string): boolean; 6285 /** If provided, used in resolutions as well as handling directory structure */ 6286 getDirectories?(path: string): string[]; 6287 /** If provided, used to cache and handle directory structure modifications */ 6288 readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; 6289 /** Symbol links resolution */ 6290 realpath?(path: string): string; 6291 /** If provided would be used to write log about compilation */ 6292 trace?(s: string): void; 6293 /** If provided is used to get the environment variable */ 6294 getEnvironmentVariable?(name: string): string | undefined; 6295 /** If provided, used to resolve the module names, otherwise typescript's default module resolution */ 6296 resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[]; 6297 /** If provided, used to resolve type reference directives, otherwise typescript's default resolution */ 6298 resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[]; 6299 /** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */ 6300 hasInvalidatedResolutions?(filePath: Path): boolean; 6301 /** 6302 * Returns the module resolution cache used by a provided `resolveModuleNames` implementation so that any non-name module resolution operations (eg, package.json lookup) can reuse it 6303 */ 6304 getModuleResolutionCache?(): ModuleResolutionCache | undefined; 6305 } 6306 interface WatchCompilerHost<T extends BuilderProgram> extends ProgramHost<T>, WatchHost { 6307 /** Instead of using output d.ts file from project reference, use its source file */ 6308 useSourceOfProjectReferenceRedirect?(): boolean; 6309 /** If provided, use this method to get parsed command lines for referenced projects */ 6310 getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; 6311 /** If provided, callback to invoke after every new program creation */ 6312 afterProgramCreate?(program: T): void; 6313 } 6314 /** 6315 * Host to create watch with root files and options 6316 */ 6317 interface WatchCompilerHostOfFilesAndCompilerOptions<T extends BuilderProgram> extends WatchCompilerHost<T> { 6318 /** root files to use to generate program */ 6319 rootFiles: string[]; 6320 /** Compiler options */ 6321 options: CompilerOptions; 6322 watchOptions?: WatchOptions; 6323 /** Project References */ 6324 projectReferences?: readonly ProjectReference[]; 6325 } 6326 /** 6327 * Host to create watch with config file 6328 */ 6329 interface WatchCompilerHostOfConfigFile<T extends BuilderProgram> extends WatchCompilerHost<T>, ConfigFileDiagnosticsReporter { 6330 /** Name of the config file to compile */ 6331 configFileName: string; 6332 /** Options to extend */ 6333 optionsToExtend?: CompilerOptions; 6334 watchOptionsToExtend?: WatchOptions; 6335 extraFileExtensions?: readonly FileExtensionInfo[]; 6336 /** 6337 * Used to generate source file names from the config file and its include, exclude, files rules 6338 * and also to cache the directory stucture 6339 */ 6340 readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; 6341 } 6342 interface Watch<T> { 6343 /** Synchronize with host and get updated program */ 6344 getProgram(): T; 6345 /** Closes the watch */ 6346 close(): void; 6347 } 6348 /** 6349 * Creates the watch what generates program using the config file 6350 */ 6351 interface WatchOfConfigFile<T> extends Watch<T> { 6352 } 6353 /** 6354 * Creates the watch that generates program using the root files and compiler options 6355 */ 6356 interface WatchOfFilesAndCompilerOptions<T> extends Watch<T> { 6357 /** Updates the root files in the program, only if this is not config file compilation */ 6358 updateRootFileNames(fileNames: string[]): void; 6359 } 6360 /** 6361 * Create a function that reports watch status by writing to the system and handles the formating of the diagnostic 6362 */ 6363 function createBuilderStatusReporter(system: System, pretty?: boolean): DiagnosticReporter; 6364 function createSolutionBuilderHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: ts.System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportErrorSummary?: ReportEmitErrorSummary): ts.SolutionBuilderHost<T>; 6365 function createSolutionBuilderWithWatchHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: ts.System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter): ts.SolutionBuilderWithWatchHost<T>; 6366 function createSolutionBuilder<T extends BuilderProgram>(host: SolutionBuilderHost<T>, rootNames: readonly string[], defaultOptions: BuildOptions): SolutionBuilder<T>; 6367 function createSolutionBuilderWithWatch<T extends BuilderProgram>(host: SolutionBuilderWithWatchHost<T>, rootNames: readonly string[], defaultOptions: BuildOptions, baseWatchOptions?: WatchOptions): SolutionBuilder<T>; 6368 interface BuildOptions { 6369 dry?: boolean; 6370 force?: boolean; 6371 verbose?: boolean; 6372 incremental?: boolean; 6373 assumeChangesOnlyAffectDirectDependencies?: boolean; 6374 traceResolution?: boolean; 6375 [option: string]: CompilerOptionsValue | undefined; 6376 } 6377 type ReportEmitErrorSummary = (errorCount: number, filesInError: (ReportFileInError | undefined)[]) => void; 6378 interface ReportFileInError { 6379 fileName: string; 6380 line: number; 6381 } 6382 interface SolutionBuilderHostBase<T extends BuilderProgram> extends ProgramHost<T> { 6383 createDirectory?(path: string): void; 6384 /** 6385 * Should provide create directory and writeFile if done of invalidatedProjects is not invoked with 6386 * writeFileCallback 6387 */ 6388 writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void; 6389 getCustomTransformers?: (project: string) => CustomTransformers | undefined; 6390 getModifiedTime(fileName: string): Date | undefined; 6391 setModifiedTime(fileName: string, date: Date): void; 6392 deleteFile(fileName: string): void; 6393 getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; 6394 reportDiagnostic: DiagnosticReporter; 6395 reportSolutionBuilderStatus: DiagnosticReporter; 6396 afterProgramEmitAndDiagnostics?(program: T): void; 6397 } 6398 interface SolutionBuilderHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T> { 6399 reportErrorSummary?: ReportEmitErrorSummary; 6400 } 6401 interface SolutionBuilderWithWatchHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T>, WatchHost { 6402 } 6403 interface SolutionBuilder<T extends BuilderProgram> { 6404 build(project?: string, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, getCustomTransformers?: (project: string) => CustomTransformers): ExitStatus; 6405 clean(project?: string): ExitStatus; 6406 buildReferences(project: string, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, getCustomTransformers?: (project: string) => CustomTransformers): ExitStatus; 6407 cleanReferences(project?: string): ExitStatus; 6408 getNextInvalidatedProject(cancellationToken?: CancellationToken): InvalidatedProject<T> | undefined; 6409 } 6410 enum InvalidatedProjectKind { 6411 Build = 0, 6412 UpdateBundle = 1, 6413 UpdateOutputFileStamps = 2 6414 } 6415 interface InvalidatedProjectBase { 6416 readonly kind: InvalidatedProjectKind; 6417 readonly project: ResolvedConfigFileName; 6418 /** 6419 * To dispose this project and ensure that all the necessary actions are taken and state is updated accordingly 6420 */ 6421 done(cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): ExitStatus; 6422 getCompilerOptions(): CompilerOptions; 6423 getCurrentDirectory(): string; 6424 } 6425 interface UpdateOutputFileStampsProject extends InvalidatedProjectBase { 6426 readonly kind: InvalidatedProjectKind.UpdateOutputFileStamps; 6427 updateOutputFileStatmps(): void; 6428 } 6429 interface BuildInvalidedProject<T extends BuilderProgram> extends InvalidatedProjectBase { 6430 readonly kind: InvalidatedProjectKind.Build; 6431 getBuilderProgram(): T | undefined; 6432 getProgram(): Program | undefined; 6433 getSourceFile(fileName: string): SourceFile | undefined; 6434 getSourceFiles(): readonly SourceFile[]; 6435 getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; 6436 getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; 6437 getConfigFileParsingDiagnostics(): readonly Diagnostic[]; 6438 getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 6439 getAllDependencies(sourceFile: SourceFile): readonly string[]; 6440 getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 6441 getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>; 6442 emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult | undefined; 6443 } 6444 interface UpdateBundleProject<T extends BuilderProgram> extends InvalidatedProjectBase { 6445 readonly kind: InvalidatedProjectKind.UpdateBundle; 6446 emit(writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): EmitResult | BuildInvalidedProject<T> | undefined; 6447 } 6448 type InvalidatedProject<T extends BuilderProgram> = UpdateOutputFileStampsProject | BuildInvalidedProject<T> | UpdateBundleProject<T>; 6449 namespace server { 6450 type ActionSet = "action::set"; 6451 type ActionInvalidate = "action::invalidate"; 6452 type ActionPackageInstalled = "action::packageInstalled"; 6453 type EventTypesRegistry = "event::typesRegistry"; 6454 type EventBeginInstallTypes = "event::beginInstallTypes"; 6455 type EventEndInstallTypes = "event::endInstallTypes"; 6456 type EventInitializationFailed = "event::initializationFailed"; 6457 interface TypingInstallerResponse { 6458 readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed; 6459 } 6460 interface TypingInstallerRequestWithProjectName { 6461 readonly projectName: string; 6462 } 6463 interface DiscoverTypings extends TypingInstallerRequestWithProjectName { 6464 readonly fileNames: string[]; 6465 readonly projectRootPath: Path; 6466 readonly compilerOptions: CompilerOptions; 6467 readonly watchOptions?: WatchOptions; 6468 readonly typeAcquisition: TypeAcquisition; 6469 readonly unresolvedImports: SortedReadonlyArray<string>; 6470 readonly cachePath?: string; 6471 readonly kind: "discover"; 6472 } 6473 interface CloseProject extends TypingInstallerRequestWithProjectName { 6474 readonly kind: "closeProject"; 6475 } 6476 interface TypesRegistryRequest { 6477 readonly kind: "typesRegistry"; 6478 } 6479 interface InstallPackageRequest extends TypingInstallerRequestWithProjectName { 6480 readonly kind: "installPackage"; 6481 readonly fileName: Path; 6482 readonly packageName: string; 6483 readonly projectRootPath: Path; 6484 } 6485 interface PackageInstalledResponse extends ProjectResponse { 6486 readonly kind: ActionPackageInstalled; 6487 readonly success: boolean; 6488 readonly message: string; 6489 } 6490 interface InitializationFailedResponse extends TypingInstallerResponse { 6491 readonly kind: EventInitializationFailed; 6492 readonly message: string; 6493 readonly stack?: string; 6494 } 6495 interface ProjectResponse extends TypingInstallerResponse { 6496 readonly projectName: string; 6497 } 6498 interface InvalidateCachedTypings extends ProjectResponse { 6499 readonly kind: ActionInvalidate; 6500 } 6501 interface InstallTypes extends ProjectResponse { 6502 readonly kind: EventBeginInstallTypes | EventEndInstallTypes; 6503 readonly eventId: number; 6504 readonly typingsInstallerVersion: string; 6505 readonly packagesToInstall: readonly string[]; 6506 } 6507 interface BeginInstallTypes extends InstallTypes { 6508 readonly kind: EventBeginInstallTypes; 6509 } 6510 interface EndInstallTypes extends InstallTypes { 6511 readonly kind: EventEndInstallTypes; 6512 readonly installSuccess: boolean; 6513 } 6514 interface SetTypings extends ProjectResponse { 6515 readonly typeAcquisition: TypeAcquisition; 6516 readonly compilerOptions: CompilerOptions; 6517 readonly typings: string[]; 6518 readonly unresolvedImports: SortedReadonlyArray<string>; 6519 readonly kind: ActionSet; 6520 } 6521 } 6522 function getDefaultFormatCodeSettings(newLineCharacter?: string): FormatCodeSettings; 6523 /** 6524 * Represents an immutable snapshot of a script at a specified time.Once acquired, the 6525 * snapshot is observably immutable. i.e. the same calls with the same parameters will return 6526 * the same values. 6527 */ 6528 interface IScriptSnapshot { 6529 /** Gets a portion of the script snapshot specified by [start, end). */ 6530 getText(start: number, end: number): string; 6531 /** Gets the length of this script snapshot. */ 6532 getLength(): number; 6533 /** 6534 * Gets the TextChangeRange that describe how the text changed between this text and 6535 * an older version. This information is used by the incremental parser to determine 6536 * what sections of the script need to be re-parsed. 'undefined' can be returned if the 6537 * change range cannot be determined. However, in that case, incremental parsing will 6538 * not happen and the entire document will be re - parsed. 6539 */ 6540 getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange | undefined; 6541 /** Releases all resources held by this script snapshot */ 6542 dispose?(): void; 6543 } 6544 namespace ScriptSnapshot { 6545 function fromString(text: string): IScriptSnapshot; 6546 } 6547 interface PreProcessedFileInfo { 6548 referencedFiles: FileReference[]; 6549 typeReferenceDirectives: FileReference[]; 6550 libReferenceDirectives: FileReference[]; 6551 importedFiles: FileReference[]; 6552 ambientExternalModules?: string[]; 6553 isLibFile: boolean; 6554 } 6555 interface HostCancellationToken { 6556 isCancellationRequested(): boolean; 6557 } 6558 interface InstallPackageOptions { 6559 fileName: Path; 6560 packageName: string; 6561 } 6562 interface PerformanceEvent { 6563 kind: "UpdateGraph" | "CreatePackageJsonAutoImportProvider"; 6564 durationMs: number; 6565 } 6566 enum LanguageServiceMode { 6567 Semantic = 0, 6568 PartialSemantic = 1, 6569 Syntactic = 2 6570 } 6571 interface IncompleteCompletionsCache { 6572 get(): CompletionInfo | undefined; 6573 set(response: CompletionInfo): void; 6574 clear(): void; 6575 } 6576 interface LanguageServiceHost extends GetEffectiveTypeRootsHost, MinimalResolutionCacheHost { 6577 getCompilationSettings(): CompilerOptions; 6578 getNewLine?(): string; 6579 getProjectVersion?(): string; 6580 getScriptFileNames(): string[]; 6581 getScriptKind?(fileName: string): ScriptKind; 6582 getScriptVersion(fileName: string): string; 6583 getScriptSnapshot(fileName: string): IScriptSnapshot | undefined; 6584 getProjectReferences?(): readonly ProjectReference[] | undefined; 6585 getLocalizedDiagnosticMessages?(): any; 6586 getCancellationToken?(): HostCancellationToken; 6587 getCurrentDirectory(): string; 6588 getDefaultLibFileName(options: CompilerOptions): string; 6589 log?(s: string): void; 6590 trace?(s: string): void; 6591 error?(s: string): void; 6592 useCaseSensitiveFileNames?(): boolean; 6593 readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; 6594 realpath?(path: string): string; 6595 readFile(path: string, encoding?: string): string | undefined; 6596 fileExists(path: string): boolean; 6597 getTypeRootsVersion?(): number; 6598 resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[]; 6599 getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations | undefined; 6600 resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[]; 6601 getDirectories?(directoryName: string): string[]; 6602 /** 6603 * Gets a set of custom transformers to use during emit. 6604 */ 6605 getCustomTransformers?(): CustomTransformers | undefined; 6606 isKnownTypesPackageName?(name: string): boolean; 6607 installPackage?(options: InstallPackageOptions): Promise<ApplyCodeActionCommandResult>; 6608 writeFile?(fileName: string, content: string): void; 6609 getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; 6610 getJsDocNodeCheckedConfig?(jsDocFileCheckInfo: FileCheckModuleInfo, symbolSourceFilePath: string): JsDocNodeCheckConfig; 6611 getJsDocNodeConditionCheckedResult?(jsDocFileCheckedInfo: FileCheckModuleInfo, jsDocs: JsDocTagInfo[]): ConditionCheckResult; 6612 getFileCheckedModuleInfo?(containFilePath: string): FileCheckModuleInfo; 6613 shouldCompletionSortCustom?: boolean; 6614 uiProps?: Set<string>; 6615 clearProps?(): void; 6616 clearFileCache?(): void; 6617 isStaticSourceFile?(fileName: string): boolean; 6618 } 6619 type WithMetadata<T> = T & { 6620 metadata?: unknown; 6621 }; 6622 enum SemanticClassificationFormat { 6623 Original = "original", 6624 TwentyTwenty = "2020" 6625 } 6626 interface LanguageService { 6627 /** This is used as a part of restarting the language service. */ 6628 cleanupSemanticCache(): void; 6629 /** 6630 * Gets errors indicating invalid syntax in a file. 6631 * 6632 * In English, "this cdeo have, erorrs" is syntactically invalid because it has typos, 6633 * grammatical errors, and misplaced punctuation. Likewise, examples of syntax 6634 * errors in TypeScript are missing parentheses in an `if` statement, mismatched 6635 * curly braces, and using a reserved keyword as a variable name. 6636 * 6637 * These diagnostics are inexpensive to compute and don't require knowledge of 6638 * other files. Note that a non-empty result increases the likelihood of false positives 6639 * from `getSemanticDiagnostics`. 6640 * 6641 * While these represent the majority of syntax-related diagnostics, there are some 6642 * that require the type system, which will be present in `getSemanticDiagnostics`. 6643 * 6644 * @param fileName A path to the file you want syntactic diagnostics for 6645 */ 6646 getSyntacticDiagnostics(fileName: string): DiagnosticWithLocation[]; 6647 /** 6648 * Gets warnings or errors indicating type system issues in a given file. 6649 * Requesting semantic diagnostics may start up the type system and 6650 * run deferred work, so the first call may take longer than subsequent calls. 6651 * 6652 * Unlike the other get*Diagnostics functions, these diagnostics can potentially not 6653 * include a reference to a source file. Specifically, the first time this is called, 6654 * it will return global diagnostics with no associated location. 6655 * 6656 * To contrast the differences between semantic and syntactic diagnostics, consider the 6657 * sentence: "The sun is green." is syntactically correct; those are real English words with 6658 * correct sentence structure. However, it is semantically invalid, because it is not true. 6659 * 6660 * @param fileName A path to the file you want semantic diagnostics for 6661 */ 6662 getSemanticDiagnostics(fileName: string): Diagnostic[]; 6663 /** 6664 * Gets suggestion diagnostics for a specific file. These diagnostics tend to 6665 * proactively suggest refactors, as opposed to diagnostics that indicate 6666 * potentially incorrect runtime behavior. 6667 * 6668 * @param fileName A path to the file you want semantic diagnostics for 6669 */ 6670 getSuggestionDiagnostics(fileName: string): DiagnosticWithLocation[]; 6671 /** 6672 * Gets global diagnostics related to the program configuration and compiler options. 6673 */ 6674 getCompilerOptionsDiagnostics(): Diagnostic[]; 6675 /** @deprecated Use getEncodedSyntacticClassifications instead. */ 6676 getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; 6677 getSyntacticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; 6678 /** @deprecated Use getEncodedSemanticClassifications instead. */ 6679 getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; 6680 getSemanticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; 6681 /** Encoded as triples of [start, length, ClassificationType]. */ 6682 getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications; 6683 /** 6684 * Gets semantic highlights information for a particular file. Has two formats, an older 6685 * version used by VS and a format used by VS Code. 6686 * 6687 * @param fileName The path to the file 6688 * @param position A text span to return results within 6689 * @param format Which format to use, defaults to "original" 6690 * @returns a number array encoded as triples of [start, length, ClassificationType, ...]. 6691 */ 6692 getEncodedSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): Classifications; 6693 /** 6694 * Gets completion entries at a particular position in a file. 6695 * 6696 * @param fileName The path to the file 6697 * @param position A zero-based index of the character where you want the entries 6698 * @param options An object describing how the request was triggered and what kinds 6699 * of code actions can be returned with the completions. 6700 * @param formattingSettings settings needed for calling formatting functions. 6701 */ 6702 getCompletionsAtPosition(fileName: string, position: number, options: GetCompletionsAtPositionOptions | undefined, formattingSettings?: FormatCodeSettings): WithMetadata<CompletionInfo> | undefined; 6703 /** 6704 * Gets the extended details for a completion entry retrieved from `getCompletionsAtPosition`. 6705 * 6706 * @param fileName The path to the file 6707 * @param position A zero based index of the character where you want the entries 6708 * @param entryName The `name` from an existing completion which came from `getCompletionsAtPosition` 6709 * @param formatOptions How should code samples in the completions be formatted, can be undefined for backwards compatibility 6710 * @param source `source` property from the completion entry 6711 * @param preferences User settings, can be undefined for backwards compatibility 6712 * @param data `data` property from the completion entry 6713 */ 6714 getCompletionEntryDetails(fileName: string, position: number, entryName: string, formatOptions: FormatCodeOptions | FormatCodeSettings | undefined, source: string | undefined, preferences: UserPreferences | undefined, data: CompletionEntryData | undefined): CompletionEntryDetails | undefined; 6715 getCompletionEntrySymbol(fileName: string, position: number, name: string, source: string | undefined): Symbol | undefined; 6716 /** 6717 * Gets semantic information about the identifier at a particular position in a 6718 * file. Quick info is what you typically see when you hover in an editor. 6719 * 6720 * @param fileName The path to the file 6721 * @param position A zero-based index of the character where you want the quick info 6722 */ 6723 getQuickInfoAtPosition(fileName: string, position: number): QuickInfo | undefined; 6724 getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan | undefined; 6725 getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan | undefined; 6726 getSignatureHelpItems(fileName: string, position: number, options: SignatureHelpItemsOptions | undefined): SignatureHelpItems | undefined; 6727 getRenameInfo(fileName: string, position: number, preferences: UserPreferences): RenameInfo; 6728 /** @deprecated Use the signature with `UserPreferences` instead. */ 6729 getRenameInfo(fileName: string, position: number, options?: RenameInfoOptions): RenameInfo; 6730 findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename?: boolean): readonly RenameLocation[] | undefined; 6731 getSmartSelectionRange(fileName: string, position: number): SelectionRange; 6732 getDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined; 6733 getDefinitionAndBoundSpan(fileName: string, position: number): DefinitionInfoAndBoundSpan | undefined; 6734 getTypeDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined; 6735 getImplementationAtPosition(fileName: string, position: number): readonly ImplementationLocation[] | undefined; 6736 getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[] | undefined; 6737 findReferences(fileName: string, position: number): ReferencedSymbol[] | undefined; 6738 getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[] | undefined; 6739 getFileReferences(fileName: string): ReferenceEntry[]; 6740 /** @deprecated */ 6741 getOccurrencesAtPosition(fileName: string, position: number): readonly ReferenceEntry[] | undefined; 6742 getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[]; 6743 getNavigationBarItems(fileName: string): NavigationBarItem[]; 6744 getNavigationTree(fileName: string): NavigationTree; 6745 prepareCallHierarchy(fileName: string, position: number): CallHierarchyItem | CallHierarchyItem[] | undefined; 6746 provideCallHierarchyIncomingCalls(fileName: string, position: number): CallHierarchyIncomingCall[]; 6747 provideCallHierarchyOutgoingCalls(fileName: string, position: number): CallHierarchyOutgoingCall[]; 6748 provideInlayHints(fileName: string, span: TextSpan, preferences: UserPreferences | undefined): InlayHint[]; 6749 getOutliningSpans(fileName: string): OutliningSpan[]; 6750 getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; 6751 getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; 6752 getIndentationAtPosition(fileName: string, position: number, options: EditorOptions | EditorSettings): number; 6753 getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions | FormatCodeSettings): TextChange[]; 6754 getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[]; 6755 getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[]; 6756 getDocCommentTemplateAtPosition(fileName: string, position: number, options?: DocCommentTemplateOptions): TextInsertion | undefined; 6757 isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean; 6758 /** 6759 * This will return a defined result if the position is after the `>` of the opening tag, or somewhere in the text, of a JSXElement with no closing tag. 6760 * Editors should call this after `>` is typed. 6761 */ 6762 getJsxClosingTagAtPosition(fileName: string, position: number): JsxClosingTagInfo | undefined; 6763 getSpanOfEnclosingComment(fileName: string, position: number, onlyMultiLine: boolean): TextSpan | undefined; 6764 toLineColumnOffset?(fileName: string, position: number): LineAndCharacter; 6765 getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences): readonly CodeFixAction[]; 6766 getCombinedCodeFix(scope: CombinedCodeFixScope, fixId: {}, formatOptions: FormatCodeSettings, preferences: UserPreferences): CombinedCodeActions; 6767 applyCodeActionCommand(action: CodeActionCommand, formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult>; 6768 applyCodeActionCommand(action: CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult[]>; 6769 applyCodeActionCommand(action: CodeActionCommand | CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>; 6770 /** @deprecated `fileName` will be ignored */ 6771 applyCodeActionCommand(fileName: string, action: CodeActionCommand): Promise<ApplyCodeActionCommandResult>; 6772 /** @deprecated `fileName` will be ignored */ 6773 applyCodeActionCommand(fileName: string, action: CodeActionCommand[]): Promise<ApplyCodeActionCommandResult[]>; 6774 /** @deprecated `fileName` will be ignored */ 6775 applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>; 6776 getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string): ApplicableRefactorInfo[]; 6777 getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined; 6778 organizeImports(args: OrganizeImportsArgs, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; 6779 getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; 6780 getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean, forceDtsEmit?: boolean): EmitOutput; 6781 getProgram(): Program | undefined; 6782 getBuilderProgram(): BuilderProgram | undefined; 6783 toggleLineComment(fileName: string, textRange: TextRange): TextChange[]; 6784 toggleMultilineComment(fileName: string, textRange: TextRange): TextChange[]; 6785 commentSelection(fileName: string, textRange: TextRange): TextChange[]; 6786 uncommentSelection(fileName: string, textRange: TextRange): TextChange[]; 6787 dispose(): void; 6788 updateRootFiles?(rootFiles: string[]): void; 6789 getProps?(propsSwitch: boolean): string[] | Set<string>; 6790 } 6791 interface JsxClosingTagInfo { 6792 readonly newText: string; 6793 } 6794 interface CombinedCodeFixScope { 6795 type: "file"; 6796 fileName: string; 6797 } 6798 enum OrganizeImportsMode { 6799 All = "All", 6800 SortAndCombine = "SortAndCombine", 6801 RemoveUnused = "RemoveUnused" 6802 } 6803 interface OrganizeImportsArgs extends CombinedCodeFixScope { 6804 /** @deprecated Use `mode` instead */ 6805 skipDestructiveCodeActions?: boolean; 6806 mode?: OrganizeImportsMode; 6807 } 6808 type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " "; 6809 enum CompletionTriggerKind { 6810 /** Completion was triggered by typing an identifier, manual invocation (e.g Ctrl+Space) or via API. */ 6811 Invoked = 1, 6812 /** Completion was triggered by a trigger character. */ 6813 TriggerCharacter = 2, 6814 /** Completion was re-triggered as the current completion list is incomplete. */ 6815 TriggerForIncompleteCompletions = 3 6816 } 6817 interface GetCompletionsAtPositionOptions extends UserPreferences { 6818 /** 6819 * If the editor is asking for completions because a certain character was typed 6820 * (as opposed to when the user explicitly requested them) this should be set. 6821 */ 6822 triggerCharacter?: CompletionsTriggerCharacter; 6823 triggerKind?: CompletionTriggerKind; 6824 /** @deprecated Use includeCompletionsForModuleExports */ 6825 includeExternalModuleExports?: boolean; 6826 /** @deprecated Use includeCompletionsWithInsertText */ 6827 includeInsertTextCompletions?: boolean; 6828 } 6829 type SignatureHelpTriggerCharacter = "," | "(" | "<"; 6830 type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")"; 6831 interface SignatureHelpItemsOptions { 6832 triggerReason?: SignatureHelpTriggerReason; 6833 } 6834 type SignatureHelpTriggerReason = SignatureHelpInvokedReason | SignatureHelpCharacterTypedReason | SignatureHelpRetriggeredReason; 6835 /** 6836 * Signals that the user manually requested signature help. 6837 * The language service will unconditionally attempt to provide a result. 6838 */ 6839 interface SignatureHelpInvokedReason { 6840 kind: "invoked"; 6841 triggerCharacter?: undefined; 6842 } 6843 /** 6844 * Signals that the signature help request came from a user typing a character. 6845 * Depending on the character and the syntactic context, the request may or may not be served a result. 6846 */ 6847 interface SignatureHelpCharacterTypedReason { 6848 kind: "characterTyped"; 6849 /** 6850 * Character that was responsible for triggering signature help. 6851 */ 6852 triggerCharacter: SignatureHelpTriggerCharacter; 6853 } 6854 /** 6855 * Signals that this signature help request came from typing a character or moving the cursor. 6856 * This should only occur if a signature help session was already active and the editor needs to see if it should adjust. 6857 * The language service will unconditionally attempt to provide a result. 6858 * `triggerCharacter` can be `undefined` for a retrigger caused by a cursor move. 6859 */ 6860 interface SignatureHelpRetriggeredReason { 6861 kind: "retrigger"; 6862 /** 6863 * Character that was responsible for triggering signature help. 6864 */ 6865 triggerCharacter?: SignatureHelpRetriggerCharacter; 6866 } 6867 interface ApplyCodeActionCommandResult { 6868 successMessage: string; 6869 } 6870 interface Classifications { 6871 spans: number[]; 6872 endOfLineState: EndOfLineState; 6873 } 6874 interface ClassifiedSpan { 6875 textSpan: TextSpan; 6876 classificationType: ClassificationTypeNames; 6877 } 6878 interface ClassifiedSpan2020 { 6879 textSpan: TextSpan; 6880 classificationType: number; 6881 } 6882 /** 6883 * Navigation bar interface designed for visual studio's dual-column layout. 6884 * This does not form a proper tree. 6885 * The navbar is returned as a list of top-level items, each of which has a list of child items. 6886 * Child items always have an empty array for their `childItems`. 6887 */ 6888 interface NavigationBarItem { 6889 text: string; 6890 kind: ScriptElementKind; 6891 kindModifiers: string; 6892 spans: TextSpan[]; 6893 childItems: NavigationBarItem[]; 6894 indent: number; 6895 bolded: boolean; 6896 grayed: boolean; 6897 } 6898 /** 6899 * Node in a tree of nested declarations in a file. 6900 * The top node is always a script or module node. 6901 */ 6902 interface NavigationTree { 6903 /** Name of the declaration, or a short description, e.g. "<class>". */ 6904 text: string; 6905 kind: ScriptElementKind; 6906 /** ScriptElementKindModifier separated by commas, e.g. "public,abstract" */ 6907 kindModifiers: string; 6908 /** 6909 * Spans of the nodes that generated this declaration. 6910 * There will be more than one if this is the result of merging. 6911 */ 6912 spans: TextSpan[]; 6913 nameSpan: TextSpan | undefined; 6914 /** Present if non-empty */ 6915 childItems?: NavigationTree[]; 6916 } 6917 interface CallHierarchyItem { 6918 name: string; 6919 kind: ScriptElementKind; 6920 kindModifiers?: string; 6921 file: string; 6922 span: TextSpan; 6923 selectionSpan: TextSpan; 6924 containerName?: string; 6925 } 6926 interface CallHierarchyIncomingCall { 6927 from: CallHierarchyItem; 6928 fromSpans: TextSpan[]; 6929 } 6930 interface CallHierarchyOutgoingCall { 6931 to: CallHierarchyItem; 6932 fromSpans: TextSpan[]; 6933 } 6934 enum InlayHintKind { 6935 Type = "Type", 6936 Parameter = "Parameter", 6937 Enum = "Enum" 6938 } 6939 interface InlayHint { 6940 text: string; 6941 position: number; 6942 kind: InlayHintKind; 6943 whitespaceBefore?: boolean; 6944 whitespaceAfter?: boolean; 6945 } 6946 interface TodoCommentDescriptor { 6947 text: string; 6948 priority: number; 6949 } 6950 interface TodoComment { 6951 descriptor: TodoCommentDescriptor; 6952 message: string; 6953 position: number; 6954 } 6955 interface TextChange { 6956 span: TextSpan; 6957 newText: string; 6958 } 6959 interface FileTextChanges { 6960 fileName: string; 6961 textChanges: readonly TextChange[]; 6962 isNewFile?: boolean; 6963 } 6964 interface CodeAction { 6965 /** Description of the code action to display in the UI of the editor */ 6966 description: string; 6967 /** Text changes to apply to each file as part of the code action */ 6968 changes: FileTextChanges[]; 6969 /** 6970 * If the user accepts the code fix, the editor should send the action back in a `applyAction` request. 6971 * This allows the language service to have side effects (e.g. installing dependencies) upon a code fix. 6972 */ 6973 commands?: CodeActionCommand[]; 6974 } 6975 interface CodeFixAction extends CodeAction { 6976 /** Short name to identify the fix, for use by telemetry. */ 6977 fixName: string; 6978 /** 6979 * If present, one may call 'getCombinedCodeFix' with this fixId. 6980 * This may be omitted to indicate that the code fix can't be applied in a group. 6981 */ 6982 fixId?: {}; 6983 fixAllDescription?: string; 6984 } 6985 interface CombinedCodeActions { 6986 changes: readonly FileTextChanges[]; 6987 commands?: readonly CodeActionCommand[]; 6988 } 6989 type CodeActionCommand = InstallPackageAction; 6990 interface InstallPackageAction { 6991 } 6992 /** 6993 * A set of one or more available refactoring actions, grouped under a parent refactoring. 6994 */ 6995 interface ApplicableRefactorInfo { 6996 /** 6997 * The programmatic name of the refactoring 6998 */ 6999 name: string; 7000 /** 7001 * A description of this refactoring category to show to the user. 7002 * If the refactoring gets inlined (see below), this text will not be visible. 7003 */ 7004 description: string; 7005 /** 7006 * Inlineable refactorings can have their actions hoisted out to the top level 7007 * of a context menu. Non-inlineanable refactorings should always be shown inside 7008 * their parent grouping. 7009 * 7010 * If not specified, this value is assumed to be 'true' 7011 */ 7012 inlineable?: boolean; 7013 actions: RefactorActionInfo[]; 7014 } 7015 /** 7016 * Represents a single refactoring action - for example, the "Extract Method..." refactor might 7017 * offer several actions, each corresponding to a surround class or closure to extract into. 7018 */ 7019 interface RefactorActionInfo { 7020 /** 7021 * The programmatic name of the refactoring action 7022 */ 7023 name: string; 7024 /** 7025 * A description of this refactoring action to show to the user. 7026 * If the parent refactoring is inlined away, this will be the only text shown, 7027 * so this description should make sense by itself if the parent is inlineable=true 7028 */ 7029 description: string; 7030 /** 7031 * A message to show to the user if the refactoring cannot be applied in 7032 * the current context. 7033 */ 7034 notApplicableReason?: string; 7035 /** 7036 * The hierarchical dotted name of the refactor action. 7037 */ 7038 kind?: string; 7039 } 7040 /** 7041 * A set of edits to make in response to a refactor action, plus an optional 7042 * location where renaming should be invoked from 7043 */ 7044 interface RefactorEditInfo { 7045 edits: FileTextChanges[]; 7046 renameFilename?: string; 7047 renameLocation?: number; 7048 commands?: CodeActionCommand[]; 7049 } 7050 type RefactorTriggerReason = "implicit" | "invoked"; 7051 interface TextInsertion { 7052 newText: string; 7053 /** The position in newText the caret should point to after the insertion. */ 7054 caretOffset: number; 7055 } 7056 interface DocumentSpan { 7057 textSpan: TextSpan; 7058 fileName: string; 7059 /** 7060 * If the span represents a location that was remapped (e.g. via a .d.ts.map file), 7061 * then the original filename and span will be specified here 7062 */ 7063 originalTextSpan?: TextSpan; 7064 originalFileName?: string; 7065 /** 7066 * If DocumentSpan.textSpan is the span for name of the declaration, 7067 * then this is the span for relevant declaration 7068 */ 7069 contextSpan?: TextSpan; 7070 originalContextSpan?: TextSpan; 7071 } 7072 interface RenameLocation extends DocumentSpan { 7073 readonly prefixText?: string; 7074 readonly suffixText?: string; 7075 } 7076 interface ReferenceEntry extends DocumentSpan { 7077 isWriteAccess: boolean; 7078 isInString?: true; 7079 } 7080 interface ImplementationLocation extends DocumentSpan { 7081 kind: ScriptElementKind; 7082 displayParts: SymbolDisplayPart[]; 7083 } 7084 enum HighlightSpanKind { 7085 none = "none", 7086 definition = "definition", 7087 reference = "reference", 7088 writtenReference = "writtenReference" 7089 } 7090 interface HighlightSpan { 7091 fileName?: string; 7092 isInString?: true; 7093 textSpan: TextSpan; 7094 contextSpan?: TextSpan; 7095 kind: HighlightSpanKind; 7096 } 7097 interface NavigateToItem { 7098 name: string; 7099 kind: ScriptElementKind; 7100 kindModifiers: string; 7101 matchKind: "exact" | "prefix" | "substring" | "camelCase"; 7102 isCaseSensitive: boolean; 7103 fileName: string; 7104 textSpan: TextSpan; 7105 containerName: string; 7106 containerKind: ScriptElementKind; 7107 } 7108 enum IndentStyle { 7109 None = 0, 7110 Block = 1, 7111 Smart = 2 7112 } 7113 enum SemicolonPreference { 7114 Ignore = "ignore", 7115 Insert = "insert", 7116 Remove = "remove" 7117 } 7118 /** @deprecated - consider using EditorSettings instead */ 7119 interface EditorOptions { 7120 BaseIndentSize?: number; 7121 IndentSize: number; 7122 TabSize: number; 7123 NewLineCharacter: string; 7124 ConvertTabsToSpaces: boolean; 7125 IndentStyle: IndentStyle; 7126 } 7127 interface EditorSettings { 7128 baseIndentSize?: number; 7129 indentSize?: number; 7130 tabSize?: number; 7131 newLineCharacter?: string; 7132 convertTabsToSpaces?: boolean; 7133 indentStyle?: IndentStyle; 7134 trimTrailingWhitespace?: boolean; 7135 } 7136 /** @deprecated - consider using FormatCodeSettings instead */ 7137 interface FormatCodeOptions extends EditorOptions { 7138 InsertSpaceAfterCommaDelimiter: boolean; 7139 InsertSpaceAfterSemicolonInForStatements: boolean; 7140 InsertSpaceBeforeAndAfterBinaryOperators: boolean; 7141 InsertSpaceAfterConstructor?: boolean; 7142 InsertSpaceAfterKeywordsInControlFlowStatements: boolean; 7143 InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; 7144 InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; 7145 InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean; 7146 InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean; 7147 InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean; 7148 InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean; 7149 InsertSpaceAfterTypeAssertion?: boolean; 7150 InsertSpaceBeforeFunctionParenthesis?: boolean; 7151 PlaceOpenBraceOnNewLineForFunctions: boolean; 7152 PlaceOpenBraceOnNewLineForControlBlocks: boolean; 7153 insertSpaceBeforeTypeAnnotation?: boolean; 7154 } 7155 interface FormatCodeSettings extends EditorSettings { 7156 readonly insertSpaceAfterCommaDelimiter?: boolean; 7157 readonly insertSpaceAfterSemicolonInForStatements?: boolean; 7158 readonly insertSpaceBeforeAndAfterBinaryOperators?: boolean; 7159 readonly insertSpaceAfterConstructor?: boolean; 7160 readonly insertSpaceAfterKeywordsInControlFlowStatements?: boolean; 7161 readonly insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean; 7162 readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean; 7163 readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean; 7164 readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean; 7165 readonly insertSpaceAfterOpeningAndBeforeClosingEmptyBraces?: boolean; 7166 readonly insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean; 7167 readonly insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean; 7168 readonly insertSpaceAfterTypeAssertion?: boolean; 7169 readonly insertSpaceBeforeFunctionParenthesis?: boolean; 7170 readonly placeOpenBraceOnNewLineForFunctions?: boolean; 7171 readonly placeOpenBraceOnNewLineForControlBlocks?: boolean; 7172 readonly insertSpaceBeforeTypeAnnotation?: boolean; 7173 readonly indentMultiLineObjectLiteralBeginningOnBlankLine?: boolean; 7174 readonly semicolons?: SemicolonPreference; 7175 } 7176 interface DefinitionInfo extends DocumentSpan { 7177 kind: ScriptElementKind; 7178 name: string; 7179 containerKind: ScriptElementKind; 7180 containerName: string; 7181 unverified?: boolean; 7182 } 7183 interface DefinitionInfoAndBoundSpan { 7184 definitions?: readonly DefinitionInfo[]; 7185 textSpan: TextSpan; 7186 } 7187 interface ReferencedSymbolDefinitionInfo extends DefinitionInfo { 7188 displayParts: SymbolDisplayPart[]; 7189 } 7190 interface ReferencedSymbol { 7191 definition: ReferencedSymbolDefinitionInfo; 7192 references: ReferencedSymbolEntry[]; 7193 } 7194 interface ReferencedSymbolEntry extends ReferenceEntry { 7195 isDefinition?: boolean; 7196 } 7197 enum SymbolDisplayPartKind { 7198 aliasName = 0, 7199 className = 1, 7200 enumName = 2, 7201 fieldName = 3, 7202 interfaceName = 4, 7203 keyword = 5, 7204 lineBreak = 6, 7205 numericLiteral = 7, 7206 stringLiteral = 8, 7207 localName = 9, 7208 methodName = 10, 7209 moduleName = 11, 7210 operator = 12, 7211 parameterName = 13, 7212 propertyName = 14, 7213 punctuation = 15, 7214 space = 16, 7215 text = 17, 7216 typeParameterName = 18, 7217 enumMemberName = 19, 7218 functionName = 20, 7219 regularExpressionLiteral = 21, 7220 link = 22, 7221 linkName = 23, 7222 linkText = 24 7223 } 7224 interface JSDocLinkDisplayPart extends SymbolDisplayPart { 7225 target: DocumentSpan; 7226 } 7227 interface JSDocTagInfo { 7228 name: string; 7229 text?: SymbolDisplayPart[] | string; 7230 index?: number; 7231 } 7232 interface QuickInfo { 7233 kind: ScriptElementKind; 7234 kindModifiers: string; 7235 textSpan: TextSpan; 7236 displayParts?: SymbolDisplayPart[]; 7237 documentation?: SymbolDisplayPart[]; 7238 tags?: JSDocTagInfo[]; 7239 } 7240 type RenameInfo = RenameInfoSuccess | RenameInfoFailure; 7241 interface RenameInfoSuccess { 7242 canRename: true; 7243 /** 7244 * File or directory to rename. 7245 * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`. 7246 */ 7247 fileToRename?: string; 7248 displayName: string; 7249 fullDisplayName: string; 7250 kind: ScriptElementKind; 7251 kindModifiers: string; 7252 triggerSpan: TextSpan; 7253 } 7254 interface RenameInfoFailure { 7255 canRename: false; 7256 localizedErrorMessage: string; 7257 } 7258 /** 7259 * @deprecated Use `UserPreferences` instead. 7260 */ 7261 interface RenameInfoOptions { 7262 readonly allowRenameOfImportPath?: boolean; 7263 } 7264 interface DocCommentTemplateOptions { 7265 readonly generateReturnInDocTemplate?: boolean; 7266 } 7267 interface SignatureHelpParameter { 7268 name: string; 7269 documentation: SymbolDisplayPart[]; 7270 displayParts: SymbolDisplayPart[]; 7271 isOptional: boolean; 7272 isRest?: boolean; 7273 } 7274 interface SelectionRange { 7275 textSpan: TextSpan; 7276 parent?: SelectionRange; 7277 } 7278 /** 7279 * Represents a single signature to show in signature help. 7280 * The id is used for subsequent calls into the language service to ask questions about the 7281 * signature help item in the context of any documents that have been updated. i.e. after 7282 * an edit has happened, while signature help is still active, the host can ask important 7283 * questions like 'what parameter is the user currently contained within?'. 7284 */ 7285 interface SignatureHelpItem { 7286 isVariadic: boolean; 7287 prefixDisplayParts: SymbolDisplayPart[]; 7288 suffixDisplayParts: SymbolDisplayPart[]; 7289 separatorDisplayParts: SymbolDisplayPart[]; 7290 parameters: SignatureHelpParameter[]; 7291 documentation: SymbolDisplayPart[]; 7292 tags: JSDocTagInfo[]; 7293 } 7294 /** 7295 * Represents a set of signature help items, and the preferred item that should be selected. 7296 */ 7297 interface SignatureHelpItems { 7298 items: SignatureHelpItem[]; 7299 applicableSpan: TextSpan; 7300 selectedItemIndex: number; 7301 argumentIndex: number; 7302 argumentCount: number; 7303 } 7304 enum CompletionInfoFlags { 7305 None = 0, 7306 MayIncludeAutoImports = 1, 7307 IsImportStatementCompletion = 2, 7308 IsContinuation = 4, 7309 ResolvedModuleSpecifiers = 8, 7310 ResolvedModuleSpecifiersBeyondLimit = 16, 7311 MayIncludeMethodSnippets = 32 7312 } 7313 interface CompletionInfo { 7314 /** For performance telemetry. */ 7315 flags?: CompletionInfoFlags; 7316 /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */ 7317 isGlobalCompletion: boolean; 7318 isMemberCompletion: boolean; 7319 /** 7320 * In the absence of `CompletionEntry["replacementSpan"]`, the editor may choose whether to use 7321 * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span 7322 * must be used to commit that completion entry. 7323 */ 7324 optionalReplacementSpan?: TextSpan; 7325 /** 7326 * true when the current location also allows for a new identifier 7327 */ 7328 isNewIdentifierLocation: boolean; 7329 /** 7330 * Indicates to client to continue requesting completions on subsequent keystrokes. 7331 */ 7332 isIncomplete?: true; 7333 entries: CompletionEntry[]; 7334 } 7335 interface CompletionEntryDataAutoImport { 7336 /** 7337 * The name of the property or export in the module's symbol table. Differs from the completion name 7338 * in the case of InternalSymbolName.ExportEquals and InternalSymbolName.Default. 7339 */ 7340 exportName: string; 7341 moduleSpecifier?: string; 7342 /** The file name declaring the export's module symbol, if it was an external module */ 7343 fileName?: string; 7344 /** The module name (with quotes stripped) of the export's module symbol, if it was an ambient module */ 7345 ambientModuleName?: string; 7346 /** True if the export was found in the package.json AutoImportProvider */ 7347 isPackageJsonImport?: true; 7348 } 7349 interface CompletionEntryDataUnresolved extends CompletionEntryDataAutoImport { 7350 /** The key in the `ExportMapCache` where the completion entry's `SymbolExportInfo[]` is found */ 7351 exportMapKey: string; 7352 } 7353 interface CompletionEntryDataResolved extends CompletionEntryDataAutoImport { 7354 moduleSpecifier: string; 7355 } 7356 type CompletionEntryData = CompletionEntryDataUnresolved | CompletionEntryDataResolved; 7357 interface CompletionEntry { 7358 name: string; 7359 kind: ScriptElementKind; 7360 kindModifiers?: string; 7361 sortText: string; 7362 insertText?: string; 7363 isSnippet?: true; 7364 /** 7365 * An optional span that indicates the text to be replaced by this completion item. 7366 * If present, this span should be used instead of the default one. 7367 * It will be set if the required span differs from the one generated by the default replacement behavior. 7368 */ 7369 replacementSpan?: TextSpan; 7370 hasAction?: true; 7371 source?: string; 7372 sourceDisplay?: SymbolDisplayPart[]; 7373 labelDetails?: CompletionEntryLabelDetails; 7374 isRecommended?: true; 7375 isFromUncheckedFile?: true; 7376 isPackageJsonImport?: true; 7377 isImportStatementCompletion?: true; 7378 /** 7379 * A property to be sent back to TS Server in the CompletionDetailsRequest, along with `name`, 7380 * that allows TS Server to look up the symbol represented by the completion item, disambiguating 7381 * items with the same name. Currently only defined for auto-import completions, but the type is 7382 * `unknown` in the protocol, so it can be changed as needed to support other kinds of completions. 7383 * The presence of this property should generally not be used to assume that this completion entry 7384 * is an auto-import. 7385 */ 7386 data?: CompletionEntryData; 7387 jsDoc?: JSDocTagInfo[]; 7388 displayParts?: SymbolDisplayPart[]; 7389 } 7390 interface CompletionEntryLabelDetails { 7391 detail?: string; 7392 description?: string; 7393 } 7394 interface CompletionEntryDetails { 7395 name: string; 7396 kind: ScriptElementKind; 7397 kindModifiers: string; 7398 displayParts: SymbolDisplayPart[]; 7399 documentation?: SymbolDisplayPart[]; 7400 tags?: JSDocTagInfo[]; 7401 codeActions?: CodeAction[]; 7402 /** @deprecated Use `sourceDisplay` instead. */ 7403 source?: SymbolDisplayPart[]; 7404 sourceDisplay?: SymbolDisplayPart[]; 7405 } 7406 interface OutliningSpan { 7407 /** The span of the document to actually collapse. */ 7408 textSpan: TextSpan; 7409 /** The span of the document to display when the user hovers over the collapsed span. */ 7410 hintSpan: TextSpan; 7411 /** The text to display in the editor for the collapsed region. */ 7412 bannerText: string; 7413 /** 7414 * Whether or not this region should be automatically collapsed when 7415 * the 'Collapse to Definitions' command is invoked. 7416 */ 7417 autoCollapse: boolean; 7418 /** 7419 * Classification of the contents of the span 7420 */ 7421 kind: OutliningSpanKind; 7422 } 7423 enum OutliningSpanKind { 7424 /** Single or multi-line comments */ 7425 Comment = "comment", 7426 /** Sections marked by '// #region' and '// #endregion' comments */ 7427 Region = "region", 7428 /** Declarations and expressions */ 7429 Code = "code", 7430 /** Contiguous blocks of import declarations */ 7431 Imports = "imports" 7432 } 7433 enum OutputFileType { 7434 JavaScript = 0, 7435 SourceMap = 1, 7436 Declaration = 2 7437 } 7438 enum EndOfLineState { 7439 None = 0, 7440 InMultiLineCommentTrivia = 1, 7441 InSingleQuoteStringLiteral = 2, 7442 InDoubleQuoteStringLiteral = 3, 7443 InTemplateHeadOrNoSubstitutionTemplate = 4, 7444 InTemplateMiddleOrTail = 5, 7445 InTemplateSubstitutionPosition = 6 7446 } 7447 enum TokenClass { 7448 Punctuation = 0, 7449 Keyword = 1, 7450 Operator = 2, 7451 Comment = 3, 7452 Whitespace = 4, 7453 Identifier = 5, 7454 NumberLiteral = 6, 7455 BigIntLiteral = 7, 7456 StringLiteral = 8, 7457 RegExpLiteral = 9 7458 } 7459 interface ClassificationResult { 7460 finalLexState: EndOfLineState; 7461 entries: ClassificationInfo[]; 7462 } 7463 interface ClassificationInfo { 7464 length: number; 7465 classification: TokenClass; 7466 } 7467 interface Classifier { 7468 /** 7469 * Gives lexical classifications of tokens on a line without any syntactic context. 7470 * For instance, a token consisting of the text 'string' can be either an identifier 7471 * named 'string' or the keyword 'string', however, because this classifier is not aware, 7472 * it relies on certain heuristics to give acceptable results. For classifications where 7473 * speed trumps accuracy, this function is preferable; however, for true accuracy, the 7474 * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the 7475 * lexical, syntactic, and semantic classifiers may issue the best user experience. 7476 * 7477 * @param text The text of a line to classify. 7478 * @param lexState The state of the lexical classifier at the end of the previous line. 7479 * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier. 7480 * If there is no syntactic classifier (syntacticClassifierAbsent=true), 7481 * certain heuristics may be used in its place; however, if there is a 7482 * syntactic classifier (syntacticClassifierAbsent=false), certain 7483 * classifications which may be incorrectly categorized will be given 7484 * back as Identifiers in order to allow the syntactic classifier to 7485 * subsume the classification. 7486 * @deprecated Use getLexicalClassifications instead. 7487 */ 7488 getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult; 7489 getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications; 7490 } 7491 enum ScriptElementKind { 7492 unknown = "", 7493 warning = "warning", 7494 /** predefined type (void) or keyword (class) */ 7495 keyword = "keyword", 7496 /** top level script node */ 7497 scriptElement = "script", 7498 /** module foo {} */ 7499 moduleElement = "module", 7500 /** class X {} */ 7501 classElement = "class", 7502 /** var x = class X {} */ 7503 localClassElement = "local class", 7504 /** struct X {} */ 7505 structElement = "struct", 7506 /** interface Y {} */ 7507 interfaceElement = "interface", 7508 /** type T = ... */ 7509 typeElement = "type", 7510 /** enum E */ 7511 enumElement = "enum", 7512 enumMemberElement = "enum member", 7513 /** 7514 * Inside module and script only 7515 * const v = .. 7516 */ 7517 variableElement = "var", 7518 /** Inside function */ 7519 localVariableElement = "local var", 7520 /** 7521 * Inside module and script only 7522 * function f() { } 7523 */ 7524 functionElement = "function", 7525 /** Inside function */ 7526 localFunctionElement = "local function", 7527 /** class X { [public|private]* foo() {} } */ 7528 memberFunctionElement = "method", 7529 /** class X { [public|private]* [get|set] foo:number; } */ 7530 memberGetAccessorElement = "getter", 7531 memberSetAccessorElement = "setter", 7532 /** 7533 * class X { [public|private]* foo:number; } 7534 * interface Y { foo:number; } 7535 */ 7536 memberVariableElement = "property", 7537 /** class X { [public|private]* accessor foo: number; } */ 7538 memberAccessorVariableElement = "accessor", 7539 /** 7540 * class X { constructor() { } } 7541 * class X { static { } } 7542 */ 7543 constructorImplementationElement = "constructor", 7544 /** interface Y { ():number; } */ 7545 callSignatureElement = "call", 7546 /** interface Y { []:number; } */ 7547 indexSignatureElement = "index", 7548 /** interface Y { new():Y; } */ 7549 constructSignatureElement = "construct", 7550 /** function foo(*Y*: string) */ 7551 parameterElement = "parameter", 7552 typeParameterElement = "type parameter", 7553 primitiveType = "primitive type", 7554 label = "label", 7555 alias = "alias", 7556 constElement = "const", 7557 letElement = "let", 7558 directory = "directory", 7559 externalModuleName = "external module name", 7560 /** 7561 * <JsxTagName attribute1 attribute2={0} /> 7562 * @deprecated 7563 */ 7564 jsxAttribute = "JSX attribute", 7565 /** String literal */ 7566 string = "string", 7567 /** Jsdoc @link: in `{@link C link text}`, the before and after text "{@link " and "}" */ 7568 link = "link", 7569 /** Jsdoc @link: in `{@link C link text}`, the entity name "C" */ 7570 linkName = "link name", 7571 /** Jsdoc @link: in `{@link C link text}`, the link text "link text" */ 7572 linkText = "link text" 7573 } 7574 enum ScriptElementKindModifier { 7575 none = "", 7576 publicMemberModifier = "public", 7577 privateMemberModifier = "private", 7578 protectedMemberModifier = "protected", 7579 exportedModifier = "export", 7580 ambientModifier = "declare", 7581 staticModifier = "static", 7582 abstractModifier = "abstract", 7583 optionalModifier = "optional", 7584 deprecatedModifier = "deprecated", 7585 dtsModifier = ".d.ts", 7586 tsModifier = ".ts", 7587 tsxModifier = ".tsx", 7588 jsModifier = ".js", 7589 jsxModifier = ".jsx", 7590 jsonModifier = ".json", 7591 dmtsModifier = ".d.mts", 7592 mtsModifier = ".mts", 7593 mjsModifier = ".mjs", 7594 dctsModifier = ".d.cts", 7595 ctsModifier = ".cts", 7596 cjsModifier = ".cjs", 7597 etsModifier = ".ets", 7598 detsModifier = ".d.ets" 7599 } 7600 enum ClassificationTypeNames { 7601 comment = "comment", 7602 identifier = "identifier", 7603 keyword = "keyword", 7604 numericLiteral = "number", 7605 bigintLiteral = "bigint", 7606 operator = "operator", 7607 stringLiteral = "string", 7608 whiteSpace = "whitespace", 7609 text = "text", 7610 punctuation = "punctuation", 7611 className = "class name", 7612 enumName = "enum name", 7613 interfaceName = "interface name", 7614 moduleName = "module name", 7615 typeParameterName = "type parameter name", 7616 typeAliasName = "type alias name", 7617 parameterName = "parameter name", 7618 docCommentTagName = "doc comment tag name", 7619 jsxOpenTagName = "jsx open tag name", 7620 jsxCloseTagName = "jsx close tag name", 7621 jsxSelfClosingTagName = "jsx self closing tag name", 7622 jsxAttribute = "jsx attribute", 7623 jsxText = "jsx text", 7624 jsxAttributeStringLiteralValue = "jsx attribute string literal value" 7625 } 7626 enum ClassificationType { 7627 comment = 1, 7628 identifier = 2, 7629 keyword = 3, 7630 numericLiteral = 4, 7631 operator = 5, 7632 stringLiteral = 6, 7633 regularExpressionLiteral = 7, 7634 whiteSpace = 8, 7635 text = 9, 7636 punctuation = 10, 7637 className = 11, 7638 enumName = 12, 7639 interfaceName = 13, 7640 moduleName = 14, 7641 typeParameterName = 15, 7642 typeAliasName = 16, 7643 parameterName = 17, 7644 docCommentTagName = 18, 7645 jsxOpenTagName = 19, 7646 jsxCloseTagName = 20, 7647 jsxSelfClosingTagName = 21, 7648 jsxAttribute = 22, 7649 jsxText = 23, 7650 jsxAttributeStringLiteralValue = 24, 7651 bigintLiteral = 25 7652 } 7653 interface InlayHintsContext { 7654 file: SourceFile; 7655 program: Program; 7656 cancellationToken: CancellationToken; 7657 host: LanguageServiceHost; 7658 span: TextSpan; 7659 preferences: UserPreferences; 7660 } 7661 /** The classifier is used for syntactic highlighting in editors via the TSServer */ 7662 function createClassifier(): Classifier; 7663 interface DocumentHighlights { 7664 fileName: string; 7665 highlightSpans: HighlightSpan[]; 7666 } 7667 function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry; 7668 /** 7669 * The document registry represents a store of SourceFile objects that can be shared between 7670 * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST) 7671 * of files in the context. 7672 * SourceFile objects account for most of the memory usage by the language service. Sharing 7673 * the same DocumentRegistry instance between different instances of LanguageService allow 7674 * for more efficient memory utilization since all projects will share at least the library 7675 * file (lib.d.ts). 7676 * 7677 * A more advanced use of the document registry is to serialize sourceFile objects to disk 7678 * and re-hydrate them when needed. 7679 * 7680 * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it 7681 * to all subsequent createLanguageService calls. 7682 */ 7683 interface DocumentRegistry { 7684 /** 7685 * Request a stored SourceFile with a given fileName and compilationSettings. 7686 * The first call to acquire will call createLanguageServiceSourceFile to generate 7687 * the SourceFile if was not found in the registry. 7688 * 7689 * @param fileName The name of the file requested 7690 * @param compilationSettingsOrHost Some compilation settings like target affects the 7691 * shape of a the resulting SourceFile. This allows the DocumentRegistry to store 7692 * multiple copies of the same file for different compilation settings. A minimal 7693 * resolution cache is needed to fully define a source file's shape when 7694 * the compilation settings include `module: node16`+, so providing a cache host 7695 * object should be preferred. A common host is a language service `ConfiguredProject`. 7696 * @param scriptSnapshot Text of the file. Only used if the file was not found 7697 * in the registry and a new one was created. 7698 * @param version Current version of the file. Only used if the file was not found 7699 * in the registry and a new one was created. 7700 */ 7701 acquireDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; 7702 acquireDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; 7703 /** 7704 * Request an updated version of an already existing SourceFile with a given fileName 7705 * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile 7706 * to get an updated SourceFile. 7707 * 7708 * @param fileName The name of the file requested 7709 * @param compilationSettingsOrHost Some compilation settings like target affects the 7710 * shape of a the resulting SourceFile. This allows the DocumentRegistry to store 7711 * multiple copies of the same file for different compilation settings. A minimal 7712 * resolution cache is needed to fully define a source file's shape when 7713 * the compilation settings include `module: node16`+, so providing a cache host 7714 * object should be preferred. A common host is a language service `ConfiguredProject`. 7715 * @param scriptSnapshot Text of the file. 7716 * @param version Current version of the file. 7717 */ 7718 updateDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; 7719 updateDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; 7720 getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey; 7721 /** 7722 * Informs the DocumentRegistry that a file is not needed any longer. 7723 * 7724 * Note: It is not allowed to call release on a SourceFile that was not acquired from 7725 * this registry originally. 7726 * 7727 * @param fileName The name of the file to be released 7728 * @param compilationSettings The compilation settings used to acquire the file 7729 * @param scriptKind The script kind of the file to be released 7730 * 7731 * @deprecated pass scriptKind and impliedNodeFormat for correctness 7732 */ 7733 releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind?: ScriptKind): void; 7734 /** 7735 * Informs the DocumentRegistry that a file is not needed any longer. 7736 * 7737 * Note: It is not allowed to call release on a SourceFile that was not acquired from 7738 * this registry originally. 7739 * 7740 * @param fileName The name of the file to be released 7741 * @param compilationSettings The compilation settings used to acquire the file 7742 * @param scriptKind The script kind of the file to be released 7743 * @param impliedNodeFormat The implied source file format of the file to be released 7744 */ 7745 releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind, impliedNodeFormat: SourceFile["impliedNodeFormat"]): void; 7746 /** 7747 * @deprecated pass scriptKind for and impliedNodeFormat correctness */ 7748 releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind?: ScriptKind): void; 7749 releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind: ScriptKind, impliedNodeFormat: SourceFile["impliedNodeFormat"]): void; 7750 reportStats(): string; 7751 } 7752 type DocumentRegistryBucketKey = string & { 7753 __bucketKey: any; 7754 }; 7755 function preProcessFile(sourceText: string, readImportFiles?: boolean, detectJavaScriptImports?: boolean): PreProcessedFileInfo; 7756 function transpileModule(input: string, transpileOptions: TranspileOptions): TranspileOutput; 7757 function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string; 7758 interface TranspileOptions { 7759 compilerOptions?: CompilerOptions; 7760 fileName?: string; 7761 reportDiagnostics?: boolean; 7762 moduleName?: string; 7763 renamedDependencies?: MapLike<string>; 7764 transformers?: CustomTransformers; 7765 } 7766 interface TranspileOutput { 7767 outputText: string; 7768 diagnostics?: Diagnostic[]; 7769 sourceMapText?: string; 7770 } 7771 function toEditorSettings(options: EditorOptions | EditorSettings): EditorSettings; 7772 function displayPartsToString(displayParts: SymbolDisplayPart[] | undefined): string; 7773 function getDefaultCompilerOptions(): CompilerOptions; 7774 function getSupportedCodeFixes(): string[]; 7775 function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTargetOrOptions: ScriptTarget | CreateSourceFileOptions, version: string, setNodeParents: boolean, scriptKind?: ScriptKind, option?: CompilerOptions): SourceFile; 7776 function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange | undefined, aggressiveChecks?: boolean, option?: CompilerOptions): SourceFile; 7777 function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnlyOrLanguageServiceMode?: boolean | LanguageServiceMode): LanguageService; 7778 /** 7779 * Get the path of the default library files (lib.d.ts) as distributed with the typescript 7780 * node package. 7781 * The functionality is not supported if the ts module is consumed outside of a node module. 7782 */ 7783 function getDefaultLibFilePath(options: CompilerOptions): string; 7784 /** The version of the language service API */ 7785 const servicesVersion = "0.8"; 7786 /** 7787 * Transform one or more nodes using the supplied transformers. 7788 * @param source A single `Node` or an array of `Node` objects. 7789 * @param transformers An array of `TransformerFactory` callbacks used to process the transformation. 7790 * @param compilerOptions Optional compiler options. 7791 */ 7792 function transform<T extends Node>(source: T | T[], transformers: TransformerFactory<T>[], compilerOptions?: CompilerOptions): TransformationResult<T>; 7793 /** @deprecated Use `factory.createNodeArray` or the factory supplied by your transformation context instead. */ 7794 const createNodeArray: typeof factory.createNodeArray; 7795 /** @deprecated Use `factory.createNumericLiteral` or the factory supplied by your transformation context instead. */ 7796 const createNumericLiteral: typeof factory.createNumericLiteral; 7797 /** @deprecated Use `factory.createBigIntLiteral` or the factory supplied by your transformation context instead. */ 7798 const createBigIntLiteral: typeof factory.createBigIntLiteral; 7799 /** @deprecated Use `factory.createStringLiteral` or the factory supplied by your transformation context instead. */ 7800 const createStringLiteral: typeof factory.createStringLiteral; 7801 /** @deprecated Use `factory.createStringLiteralFromNode` or the factory supplied by your transformation context instead. */ 7802 const createStringLiteralFromNode: typeof factory.createStringLiteralFromNode; 7803 /** @deprecated Use `factory.createRegularExpressionLiteral` or the factory supplied by your transformation context instead. */ 7804 const createRegularExpressionLiteral: typeof factory.createRegularExpressionLiteral; 7805 /** @deprecated Use `factory.createLoopVariable` or the factory supplied by your transformation context instead. */ 7806 const createLoopVariable: typeof factory.createLoopVariable; 7807 /** @deprecated Use `factory.createUniqueName` or the factory supplied by your transformation context instead. */ 7808 const createUniqueName: typeof factory.createUniqueName; 7809 /** @deprecated Use `factory.createPrivateIdentifier` or the factory supplied by your transformation context instead. */ 7810 const createPrivateIdentifier: typeof factory.createPrivateIdentifier; 7811 /** @deprecated Use `factory.createSuper` or the factory supplied by your transformation context instead. */ 7812 const createSuper: typeof factory.createSuper; 7813 /** @deprecated Use `factory.createThis` or the factory supplied by your transformation context instead. */ 7814 const createThis: typeof factory.createThis; 7815 /** @deprecated Use `factory.createNull` or the factory supplied by your transformation context instead. */ 7816 const createNull: typeof factory.createNull; 7817 /** @deprecated Use `factory.createTrue` or the factory supplied by your transformation context instead. */ 7818 const createTrue: typeof factory.createTrue; 7819 /** @deprecated Use `factory.createFalse` or the factory supplied by your transformation context instead. */ 7820 const createFalse: typeof factory.createFalse; 7821 /** @deprecated Use `factory.createModifier` or the factory supplied by your transformation context instead. */ 7822 const createModifier: typeof factory.createModifier; 7823 /** @deprecated Use `factory.createModifiersFromModifierFlags` or the factory supplied by your transformation context instead. */ 7824 const createModifiersFromModifierFlags: typeof factory.createModifiersFromModifierFlags; 7825 /** @deprecated Use `factory.createQualifiedName` or the factory supplied by your transformation context instead. */ 7826 const createQualifiedName: typeof factory.createQualifiedName; 7827 /** @deprecated Use `factory.updateQualifiedName` or the factory supplied by your transformation context instead. */ 7828 const updateQualifiedName: typeof factory.updateQualifiedName; 7829 /** @deprecated Use `factory.createComputedPropertyName` or the factory supplied by your transformation context instead. */ 7830 const createComputedPropertyName: typeof factory.createComputedPropertyName; 7831 /** @deprecated Use `factory.updateComputedPropertyName` or the factory supplied by your transformation context instead. */ 7832 const updateComputedPropertyName: typeof factory.updateComputedPropertyName; 7833 /** @deprecated Use `factory.createTypeParameterDeclaration` or the factory supplied by your transformation context instead. */ 7834 const createTypeParameterDeclaration: typeof factory.createTypeParameterDeclaration; 7835 /** @deprecated Use `factory.updateTypeParameterDeclaration` or the factory supplied by your transformation context instead. */ 7836 const updateTypeParameterDeclaration: typeof factory.updateTypeParameterDeclaration; 7837 /** @deprecated Use `factory.createParameterDeclaration` or the factory supplied by your transformation context instead. */ 7838 const createParameter: typeof factory.createParameterDeclaration; 7839 /** @deprecated Use `factory.updateParameterDeclaration` or the factory supplied by your transformation context instead. */ 7840 const updateParameter: typeof factory.updateParameterDeclaration; 7841 /** @deprecated Use `factory.createDecorator` or the factory supplied by your transformation context instead. */ 7842 const createDecorator: typeof factory.createDecorator; 7843 /** @deprecated Use `factory.updateDecorator` or the factory supplied by your transformation context instead. */ 7844 const updateDecorator: typeof factory.updateDecorator; 7845 /** @deprecated Use `factory.createPropertyDeclaration` or the factory supplied by your transformation context instead. */ 7846 const createProperty: typeof factory.createPropertyDeclaration; 7847 /** @deprecated Use `factory.updatePropertyDeclaration` or the factory supplied by your transformation context instead. */ 7848 const updateProperty: typeof factory.updatePropertyDeclaration; 7849 /** @deprecated Use `factory.createMethodDeclaration` or the factory supplied by your transformation context instead. */ 7850 const createMethod: typeof factory.createMethodDeclaration; 7851 /** @deprecated Use `factory.updateMethodDeclaration` or the factory supplied by your transformation context instead. */ 7852 const updateMethod: typeof factory.updateMethodDeclaration; 7853 /** @deprecated Use `factory.createConstructorDeclaration` or the factory supplied by your transformation context instead. */ 7854 const createConstructor: typeof factory.createConstructorDeclaration; 7855 /** @deprecated Use `factory.updateConstructorDeclaration` or the factory supplied by your transformation context instead. */ 7856 const updateConstructor: typeof factory.updateConstructorDeclaration; 7857 /** @deprecated Use `factory.createGetAccessorDeclaration` or the factory supplied by your transformation context instead. */ 7858 const createGetAccessor: typeof factory.createGetAccessorDeclaration; 7859 /** @deprecated Use `factory.updateGetAccessorDeclaration` or the factory supplied by your transformation context instead. */ 7860 const updateGetAccessor: typeof factory.updateGetAccessorDeclaration; 7861 /** @deprecated Use `factory.createSetAccessorDeclaration` or the factory supplied by your transformation context instead. */ 7862 const createSetAccessor: typeof factory.createSetAccessorDeclaration; 7863 /** @deprecated Use `factory.updateSetAccessorDeclaration` or the factory supplied by your transformation context instead. */ 7864 const updateSetAccessor: typeof factory.updateSetAccessorDeclaration; 7865 /** @deprecated Use `factory.createCallSignature` or the factory supplied by your transformation context instead. */ 7866 const createCallSignature: typeof factory.createCallSignature; 7867 /** @deprecated Use `factory.updateCallSignature` or the factory supplied by your transformation context instead. */ 7868 const updateCallSignature: typeof factory.updateCallSignature; 7869 /** @deprecated Use `factory.createConstructSignature` or the factory supplied by your transformation context instead. */ 7870 const createConstructSignature: typeof factory.createConstructSignature; 7871 /** @deprecated Use `factory.updateConstructSignature` or the factory supplied by your transformation context instead. */ 7872 const updateConstructSignature: typeof factory.updateConstructSignature; 7873 /** @deprecated Use `factory.updateIndexSignature` or the factory supplied by your transformation context instead. */ 7874 const updateIndexSignature: typeof factory.updateIndexSignature; 7875 /** @deprecated Use `factory.createKeywordTypeNode` or the factory supplied by your transformation context instead. */ 7876 const createKeywordTypeNode: typeof factory.createKeywordTypeNode; 7877 /** @deprecated Use `factory.createTypePredicateNode` or the factory supplied by your transformation context instead. */ 7878 const createTypePredicateNodeWithModifier: typeof factory.createTypePredicateNode; 7879 /** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */ 7880 const updateTypePredicateNodeWithModifier: typeof factory.updateTypePredicateNode; 7881 /** @deprecated Use `factory.createTypeReferenceNode` or the factory supplied by your transformation context instead. */ 7882 const createTypeReferenceNode: typeof factory.createTypeReferenceNode; 7883 /** @deprecated Use `factory.updateTypeReferenceNode` or the factory supplied by your transformation context instead. */ 7884 const updateTypeReferenceNode: typeof factory.updateTypeReferenceNode; 7885 /** @deprecated Use `factory.createFunctionTypeNode` or the factory supplied by your transformation context instead. */ 7886 const createFunctionTypeNode: typeof factory.createFunctionTypeNode; 7887 /** @deprecated Use `factory.updateFunctionTypeNode` or the factory supplied by your transformation context instead. */ 7888 const updateFunctionTypeNode: typeof factory.updateFunctionTypeNode; 7889 /** @deprecated Use `factory.createConstructorTypeNode` or the factory supplied by your transformation context instead. */ 7890 const createConstructorTypeNode: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => ConstructorTypeNode; 7891 /** @deprecated Use `factory.updateConstructorTypeNode` or the factory supplied by your transformation context instead. */ 7892 const updateConstructorTypeNode: (node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode) => ConstructorTypeNode; 7893 /** @deprecated Use `factory.createTypeQueryNode` or the factory supplied by your transformation context instead. */ 7894 const createTypeQueryNode: typeof factory.createTypeQueryNode; 7895 /** @deprecated Use `factory.updateTypeQueryNode` or the factory supplied by your transformation context instead. */ 7896 const updateTypeQueryNode: typeof factory.updateTypeQueryNode; 7897 /** @deprecated Use `factory.createTypeLiteralNode` or the factory supplied by your transformation context instead. */ 7898 const createTypeLiteralNode: typeof factory.createTypeLiteralNode; 7899 /** @deprecated Use `factory.updateTypeLiteralNode` or the factory supplied by your transformation context instead. */ 7900 const updateTypeLiteralNode: typeof factory.updateTypeLiteralNode; 7901 /** @deprecated Use `factory.createArrayTypeNode` or the factory supplied by your transformation context instead. */ 7902 const createArrayTypeNode: typeof factory.createArrayTypeNode; 7903 /** @deprecated Use `factory.updateArrayTypeNode` or the factory supplied by your transformation context instead. */ 7904 const updateArrayTypeNode: typeof factory.updateArrayTypeNode; 7905 /** @deprecated Use `factory.createTupleTypeNode` or the factory supplied by your transformation context instead. */ 7906 const createTupleTypeNode: typeof factory.createTupleTypeNode; 7907 /** @deprecated Use `factory.updateTupleTypeNode` or the factory supplied by your transformation context instead. */ 7908 const updateTupleTypeNode: typeof factory.updateTupleTypeNode; 7909 /** @deprecated Use `factory.createOptionalTypeNode` or the factory supplied by your transformation context instead. */ 7910 const createOptionalTypeNode: typeof factory.createOptionalTypeNode; 7911 /** @deprecated Use `factory.updateOptionalTypeNode` or the factory supplied by your transformation context instead. */ 7912 const updateOptionalTypeNode: typeof factory.updateOptionalTypeNode; 7913 /** @deprecated Use `factory.createRestTypeNode` or the factory supplied by your transformation context instead. */ 7914 const createRestTypeNode: typeof factory.createRestTypeNode; 7915 /** @deprecated Use `factory.updateRestTypeNode` or the factory supplied by your transformation context instead. */ 7916 const updateRestTypeNode: typeof factory.updateRestTypeNode; 7917 /** @deprecated Use `factory.createUnionTypeNode` or the factory supplied by your transformation context instead. */ 7918 const createUnionTypeNode: typeof factory.createUnionTypeNode; 7919 /** @deprecated Use `factory.updateUnionTypeNode` or the factory supplied by your transformation context instead. */ 7920 const updateUnionTypeNode: typeof factory.updateUnionTypeNode; 7921 /** @deprecated Use `factory.createIntersectionTypeNode` or the factory supplied by your transformation context instead. */ 7922 const createIntersectionTypeNode: typeof factory.createIntersectionTypeNode; 7923 /** @deprecated Use `factory.updateIntersectionTypeNode` or the factory supplied by your transformation context instead. */ 7924 const updateIntersectionTypeNode: typeof factory.updateIntersectionTypeNode; 7925 /** @deprecated Use `factory.createConditionalTypeNode` or the factory supplied by your transformation context instead. */ 7926 const createConditionalTypeNode: typeof factory.createConditionalTypeNode; 7927 /** @deprecated Use `factory.updateConditionalTypeNode` or the factory supplied by your transformation context instead. */ 7928 const updateConditionalTypeNode: typeof factory.updateConditionalTypeNode; 7929 /** @deprecated Use `factory.createInferTypeNode` or the factory supplied by your transformation context instead. */ 7930 const createInferTypeNode: typeof factory.createInferTypeNode; 7931 /** @deprecated Use `factory.updateInferTypeNode` or the factory supplied by your transformation context instead. */ 7932 const updateInferTypeNode: typeof factory.updateInferTypeNode; 7933 /** @deprecated Use `factory.createImportTypeNode` or the factory supplied by your transformation context instead. */ 7934 const createImportTypeNode: typeof factory.createImportTypeNode; 7935 /** @deprecated Use `factory.updateImportTypeNode` or the factory supplied by your transformation context instead. */ 7936 const updateImportTypeNode: typeof factory.updateImportTypeNode; 7937 /** @deprecated Use `factory.createParenthesizedType` or the factory supplied by your transformation context instead. */ 7938 const createParenthesizedType: typeof factory.createParenthesizedType; 7939 /** @deprecated Use `factory.updateParenthesizedType` or the factory supplied by your transformation context instead. */ 7940 const updateParenthesizedType: typeof factory.updateParenthesizedType; 7941 /** @deprecated Use `factory.createThisTypeNode` or the factory supplied by your transformation context instead. */ 7942 const createThisTypeNode: typeof factory.createThisTypeNode; 7943 /** @deprecated Use `factory.updateTypeOperatorNode` or the factory supplied by your transformation context instead. */ 7944 const updateTypeOperatorNode: typeof factory.updateTypeOperatorNode; 7945 /** @deprecated Use `factory.createIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */ 7946 const createIndexedAccessTypeNode: typeof factory.createIndexedAccessTypeNode; 7947 /** @deprecated Use `factory.updateIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */ 7948 const updateIndexedAccessTypeNode: typeof factory.updateIndexedAccessTypeNode; 7949 /** @deprecated Use `factory.createMappedTypeNode` or the factory supplied by your transformation context instead. */ 7950 const createMappedTypeNode: typeof factory.createMappedTypeNode; 7951 /** @deprecated Use `factory.updateMappedTypeNode` or the factory supplied by your transformation context instead. */ 7952 const updateMappedTypeNode: typeof factory.updateMappedTypeNode; 7953 /** @deprecated Use `factory.createLiteralTypeNode` or the factory supplied by your transformation context instead. */ 7954 const createLiteralTypeNode: typeof factory.createLiteralTypeNode; 7955 /** @deprecated Use `factory.updateLiteralTypeNode` or the factory supplied by your transformation context instead. */ 7956 const updateLiteralTypeNode: typeof factory.updateLiteralTypeNode; 7957 /** @deprecated Use `factory.createObjectBindingPattern` or the factory supplied by your transformation context instead. */ 7958 const createObjectBindingPattern: typeof factory.createObjectBindingPattern; 7959 /** @deprecated Use `factory.updateObjectBindingPattern` or the factory supplied by your transformation context instead. */ 7960 const updateObjectBindingPattern: typeof factory.updateObjectBindingPattern; 7961 /** @deprecated Use `factory.createArrayBindingPattern` or the factory supplied by your transformation context instead. */ 7962 const createArrayBindingPattern: typeof factory.createArrayBindingPattern; 7963 /** @deprecated Use `factory.updateArrayBindingPattern` or the factory supplied by your transformation context instead. */ 7964 const updateArrayBindingPattern: typeof factory.updateArrayBindingPattern; 7965 /** @deprecated Use `factory.createBindingElement` or the factory supplied by your transformation context instead. */ 7966 const createBindingElement: typeof factory.createBindingElement; 7967 /** @deprecated Use `factory.updateBindingElement` or the factory supplied by your transformation context instead. */ 7968 const updateBindingElement: typeof factory.updateBindingElement; 7969 /** @deprecated Use `factory.createArrayLiteralExpression` or the factory supplied by your transformation context instead. */ 7970 const createArrayLiteral: typeof factory.createArrayLiteralExpression; 7971 /** @deprecated Use `factory.updateArrayLiteralExpression` or the factory supplied by your transformation context instead. */ 7972 const updateArrayLiteral: typeof factory.updateArrayLiteralExpression; 7973 /** @deprecated Use `factory.createObjectLiteralExpression` or the factory supplied by your transformation context instead. */ 7974 const createObjectLiteral: typeof factory.createObjectLiteralExpression; 7975 /** @deprecated Use `factory.updateObjectLiteralExpression` or the factory supplied by your transformation context instead. */ 7976 const updateObjectLiteral: typeof factory.updateObjectLiteralExpression; 7977 /** @deprecated Use `factory.createPropertyAccessExpression` or the factory supplied by your transformation context instead. */ 7978 const createPropertyAccess: typeof factory.createPropertyAccessExpression; 7979 /** @deprecated Use `factory.updatePropertyAccessExpression` or the factory supplied by your transformation context instead. */ 7980 const updatePropertyAccess: typeof factory.updatePropertyAccessExpression; 7981 /** @deprecated Use `factory.createPropertyAccessChain` or the factory supplied by your transformation context instead. */ 7982 const createPropertyAccessChain: typeof factory.createPropertyAccessChain; 7983 /** @deprecated Use `factory.updatePropertyAccessChain` or the factory supplied by your transformation context instead. */ 7984 const updatePropertyAccessChain: typeof factory.updatePropertyAccessChain; 7985 /** @deprecated Use `factory.createElementAccessExpression` or the factory supplied by your transformation context instead. */ 7986 const createElementAccess: typeof factory.createElementAccessExpression; 7987 /** @deprecated Use `factory.updateElementAccessExpression` or the factory supplied by your transformation context instead. */ 7988 const updateElementAccess: typeof factory.updateElementAccessExpression; 7989 /** @deprecated Use `factory.createElementAccessChain` or the factory supplied by your transformation context instead. */ 7990 const createElementAccessChain: typeof factory.createElementAccessChain; 7991 /** @deprecated Use `factory.updateElementAccessChain` or the factory supplied by your transformation context instead. */ 7992 const updateElementAccessChain: typeof factory.updateElementAccessChain; 7993 /** @deprecated Use `factory.createCallExpression` or the factory supplied by your transformation context instead. */ 7994 const createCall: typeof factory.createCallExpression; 7995 /** @deprecated Use `factory.updateCallExpression` or the factory supplied by your transformation context instead. */ 7996 const updateCall: typeof factory.updateCallExpression; 7997 /** @deprecated Use `factory.createCallChain` or the factory supplied by your transformation context instead. */ 7998 const createCallChain: typeof factory.createCallChain; 7999 /** @deprecated Use `factory.updateCallChain` or the factory supplied by your transformation context instead. */ 8000 const updateCallChain: typeof factory.updateCallChain; 8001 /** @deprecated Use `factory.createNewExpression` or the factory supplied by your transformation context instead. */ 8002 const createNew: typeof factory.createNewExpression; 8003 /** @deprecated Use `factory.updateNewExpression` or the factory supplied by your transformation context instead. */ 8004 const updateNew: typeof factory.updateNewExpression; 8005 /** @deprecated Use `factory.createTypeAssertion` or the factory supplied by your transformation context instead. */ 8006 const createTypeAssertion: typeof factory.createTypeAssertion; 8007 /** @deprecated Use `factory.updateTypeAssertion` or the factory supplied by your transformation context instead. */ 8008 const updateTypeAssertion: typeof factory.updateTypeAssertion; 8009 /** @deprecated Use `factory.createParenthesizedExpression` or the factory supplied by your transformation context instead. */ 8010 const createParen: typeof factory.createParenthesizedExpression; 8011 /** @deprecated Use `factory.updateParenthesizedExpression` or the factory supplied by your transformation context instead. */ 8012 const updateParen: typeof factory.updateParenthesizedExpression; 8013 /** @deprecated Use `factory.createFunctionExpression` or the factory supplied by your transformation context instead. */ 8014 const createFunctionExpression: typeof factory.createFunctionExpression; 8015 /** @deprecated Use `factory.updateFunctionExpression` or the factory supplied by your transformation context instead. */ 8016 const updateFunctionExpression: typeof factory.updateFunctionExpression; 8017 /** @deprecated Use `factory.createDeleteExpression` or the factory supplied by your transformation context instead. */ 8018 const createDelete: typeof factory.createDeleteExpression; 8019 /** @deprecated Use `factory.updateDeleteExpression` or the factory supplied by your transformation context instead. */ 8020 const updateDelete: typeof factory.updateDeleteExpression; 8021 /** @deprecated Use `factory.createTypeOfExpression` or the factory supplied by your transformation context instead. */ 8022 const createTypeOf: typeof factory.createTypeOfExpression; 8023 /** @deprecated Use `factory.updateTypeOfExpression` or the factory supplied by your transformation context instead. */ 8024 const updateTypeOf: typeof factory.updateTypeOfExpression; 8025 /** @deprecated Use `factory.createVoidExpression` or the factory supplied by your transformation context instead. */ 8026 const createVoid: typeof factory.createVoidExpression; 8027 /** @deprecated Use `factory.updateVoidExpression` or the factory supplied by your transformation context instead. */ 8028 const updateVoid: typeof factory.updateVoidExpression; 8029 /** @deprecated Use `factory.createAwaitExpression` or the factory supplied by your transformation context instead. */ 8030 const createAwait: typeof factory.createAwaitExpression; 8031 /** @deprecated Use `factory.updateAwaitExpression` or the factory supplied by your transformation context instead. */ 8032 const updateAwait: typeof factory.updateAwaitExpression; 8033 /** @deprecated Use `factory.createPrefixExpression` or the factory supplied by your transformation context instead. */ 8034 const createPrefix: typeof factory.createPrefixUnaryExpression; 8035 /** @deprecated Use `factory.updatePrefixExpression` or the factory supplied by your transformation context instead. */ 8036 const updatePrefix: typeof factory.updatePrefixUnaryExpression; 8037 /** @deprecated Use `factory.createPostfixUnaryExpression` or the factory supplied by your transformation context instead. */ 8038 const createPostfix: typeof factory.createPostfixUnaryExpression; 8039 /** @deprecated Use `factory.updatePostfixUnaryExpression` or the factory supplied by your transformation context instead. */ 8040 const updatePostfix: typeof factory.updatePostfixUnaryExpression; 8041 /** @deprecated Use `factory.createBinaryExpression` or the factory supplied by your transformation context instead. */ 8042 const createBinary: typeof factory.createBinaryExpression; 8043 /** @deprecated Use `factory.updateConditionalExpression` or the factory supplied by your transformation context instead. */ 8044 const updateConditional: typeof factory.updateConditionalExpression; 8045 /** @deprecated Use `factory.createTemplateExpression` or the factory supplied by your transformation context instead. */ 8046 const createTemplateExpression: typeof factory.createTemplateExpression; 8047 /** @deprecated Use `factory.updateTemplateExpression` or the factory supplied by your transformation context instead. */ 8048 const updateTemplateExpression: typeof factory.updateTemplateExpression; 8049 /** @deprecated Use `factory.createTemplateHead` or the factory supplied by your transformation context instead. */ 8050 const createTemplateHead: typeof factory.createTemplateHead; 8051 /** @deprecated Use `factory.createTemplateMiddle` or the factory supplied by your transformation context instead. */ 8052 const createTemplateMiddle: typeof factory.createTemplateMiddle; 8053 /** @deprecated Use `factory.createTemplateTail` or the factory supplied by your transformation context instead. */ 8054 const createTemplateTail: typeof factory.createTemplateTail; 8055 /** @deprecated Use `factory.createNoSubstitutionTemplateLiteral` or the factory supplied by your transformation context instead. */ 8056 const createNoSubstitutionTemplateLiteral: typeof factory.createNoSubstitutionTemplateLiteral; 8057 /** @deprecated Use `factory.updateYieldExpression` or the factory supplied by your transformation context instead. */ 8058 const updateYield: typeof factory.updateYieldExpression; 8059 /** @deprecated Use `factory.createSpreadExpression` or the factory supplied by your transformation context instead. */ 8060 const createSpread: typeof factory.createSpreadElement; 8061 /** @deprecated Use `factory.updateSpreadExpression` or the factory supplied by your transformation context instead. */ 8062 const updateSpread: typeof factory.updateSpreadElement; 8063 /** @deprecated Use `factory.createOmittedExpression` or the factory supplied by your transformation context instead. */ 8064 const createOmittedExpression: typeof factory.createOmittedExpression; 8065 /** @deprecated Use `factory.createAsExpression` or the factory supplied by your transformation context instead. */ 8066 const createAsExpression: typeof factory.createAsExpression; 8067 /** @deprecated Use `factory.updateAsExpression` or the factory supplied by your transformation context instead. */ 8068 const updateAsExpression: typeof factory.updateAsExpression; 8069 /** @deprecated Use `factory.createNonNullExpression` or the factory supplied by your transformation context instead. */ 8070 const createNonNullExpression: typeof factory.createNonNullExpression; 8071 /** @deprecated Use `factory.updateNonNullExpression` or the factory supplied by your transformation context instead. */ 8072 const updateNonNullExpression: typeof factory.updateNonNullExpression; 8073 /** @deprecated Use `factory.createNonNullChain` or the factory supplied by your transformation context instead. */ 8074 const createNonNullChain: typeof factory.createNonNullChain; 8075 /** @deprecated Use `factory.updateNonNullChain` or the factory supplied by your transformation context instead. */ 8076 const updateNonNullChain: typeof factory.updateNonNullChain; 8077 /** @deprecated Use `factory.createMetaProperty` or the factory supplied by your transformation context instead. */ 8078 const createMetaProperty: typeof factory.createMetaProperty; 8079 /** @deprecated Use `factory.updateMetaProperty` or the factory supplied by your transformation context instead. */ 8080 const updateMetaProperty: typeof factory.updateMetaProperty; 8081 /** @deprecated Use `factory.createTemplateSpan` or the factory supplied by your transformation context instead. */ 8082 const createTemplateSpan: typeof factory.createTemplateSpan; 8083 /** @deprecated Use `factory.updateTemplateSpan` or the factory supplied by your transformation context instead. */ 8084 const updateTemplateSpan: typeof factory.updateTemplateSpan; 8085 /** @deprecated Use `factory.createSemicolonClassElement` or the factory supplied by your transformation context instead. */ 8086 const createSemicolonClassElement: typeof factory.createSemicolonClassElement; 8087 /** @deprecated Use `factory.createBlock` or the factory supplied by your transformation context instead. */ 8088 const createBlock: typeof factory.createBlock; 8089 /** @deprecated Use `factory.updateBlock` or the factory supplied by your transformation context instead. */ 8090 const updateBlock: typeof factory.updateBlock; 8091 /** @deprecated Use `factory.createVariableStatement` or the factory supplied by your transformation context instead. */ 8092 const createVariableStatement: typeof factory.createVariableStatement; 8093 /** @deprecated Use `factory.updateVariableStatement` or the factory supplied by your transformation context instead. */ 8094 const updateVariableStatement: typeof factory.updateVariableStatement; 8095 /** @deprecated Use `factory.createEmptyStatement` or the factory supplied by your transformation context instead. */ 8096 const createEmptyStatement: typeof factory.createEmptyStatement; 8097 /** @deprecated Use `factory.createExpressionStatement` or the factory supplied by your transformation context instead. */ 8098 const createExpressionStatement: typeof factory.createExpressionStatement; 8099 /** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */ 8100 const updateExpressionStatement: typeof factory.updateExpressionStatement; 8101 /** @deprecated Use `factory.createExpressionStatement` or the factory supplied by your transformation context instead. */ 8102 const createStatement: typeof factory.createExpressionStatement; 8103 /** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */ 8104 const updateStatement: typeof factory.updateExpressionStatement; 8105 /** @deprecated Use `factory.createIfStatement` or the factory supplied by your transformation context instead. */ 8106 const createIf: typeof factory.createIfStatement; 8107 /** @deprecated Use `factory.updateIfStatement` or the factory supplied by your transformation context instead. */ 8108 const updateIf: typeof factory.updateIfStatement; 8109 /** @deprecated Use `factory.createDoStatement` or the factory supplied by your transformation context instead. */ 8110 const createDo: typeof factory.createDoStatement; 8111 /** @deprecated Use `factory.updateDoStatement` or the factory supplied by your transformation context instead. */ 8112 const updateDo: typeof factory.updateDoStatement; 8113 /** @deprecated Use `factory.createWhileStatement` or the factory supplied by your transformation context instead. */ 8114 const createWhile: typeof factory.createWhileStatement; 8115 /** @deprecated Use `factory.updateWhileStatement` or the factory supplied by your transformation context instead. */ 8116 const updateWhile: typeof factory.updateWhileStatement; 8117 /** @deprecated Use `factory.createForStatement` or the factory supplied by your transformation context instead. */ 8118 const createFor: typeof factory.createForStatement; 8119 /** @deprecated Use `factory.updateForStatement` or the factory supplied by your transformation context instead. */ 8120 const updateFor: typeof factory.updateForStatement; 8121 /** @deprecated Use `factory.createForInStatement` or the factory supplied by your transformation context instead. */ 8122 const createForIn: typeof factory.createForInStatement; 8123 /** @deprecated Use `factory.updateForInStatement` or the factory supplied by your transformation context instead. */ 8124 const updateForIn: typeof factory.updateForInStatement; 8125 /** @deprecated Use `factory.createForOfStatement` or the factory supplied by your transformation context instead. */ 8126 const createForOf: typeof factory.createForOfStatement; 8127 /** @deprecated Use `factory.updateForOfStatement` or the factory supplied by your transformation context instead. */ 8128 const updateForOf: typeof factory.updateForOfStatement; 8129 /** @deprecated Use `factory.createContinueStatement` or the factory supplied by your transformation context instead. */ 8130 const createContinue: typeof factory.createContinueStatement; 8131 /** @deprecated Use `factory.updateContinueStatement` or the factory supplied by your transformation context instead. */ 8132 const updateContinue: typeof factory.updateContinueStatement; 8133 /** @deprecated Use `factory.createBreakStatement` or the factory supplied by your transformation context instead. */ 8134 const createBreak: typeof factory.createBreakStatement; 8135 /** @deprecated Use `factory.updateBreakStatement` or the factory supplied by your transformation context instead. */ 8136 const updateBreak: typeof factory.updateBreakStatement; 8137 /** @deprecated Use `factory.createReturnStatement` or the factory supplied by your transformation context instead. */ 8138 const createReturn: typeof factory.createReturnStatement; 8139 /** @deprecated Use `factory.updateReturnStatement` or the factory supplied by your transformation context instead. */ 8140 const updateReturn: typeof factory.updateReturnStatement; 8141 /** @deprecated Use `factory.createWithStatement` or the factory supplied by your transformation context instead. */ 8142 const createWith: typeof factory.createWithStatement; 8143 /** @deprecated Use `factory.updateWithStatement` or the factory supplied by your transformation context instead. */ 8144 const updateWith: typeof factory.updateWithStatement; 8145 /** @deprecated Use `factory.createSwitchStatement` or the factory supplied by your transformation context instead. */ 8146 const createSwitch: typeof factory.createSwitchStatement; 8147 /** @deprecated Use `factory.updateSwitchStatement` or the factory supplied by your transformation context instead. */ 8148 const updateSwitch: typeof factory.updateSwitchStatement; 8149 /** @deprecated Use `factory.createLabelStatement` or the factory supplied by your transformation context instead. */ 8150 const createLabel: typeof factory.createLabeledStatement; 8151 /** @deprecated Use `factory.updateLabelStatement` or the factory supplied by your transformation context instead. */ 8152 const updateLabel: typeof factory.updateLabeledStatement; 8153 /** @deprecated Use `factory.createThrowStatement` or the factory supplied by your transformation context instead. */ 8154 const createThrow: typeof factory.createThrowStatement; 8155 /** @deprecated Use `factory.updateThrowStatement` or the factory supplied by your transformation context instead. */ 8156 const updateThrow: typeof factory.updateThrowStatement; 8157 /** @deprecated Use `factory.createTryStatement` or the factory supplied by your transformation context instead. */ 8158 const createTry: typeof factory.createTryStatement; 8159 /** @deprecated Use `factory.updateTryStatement` or the factory supplied by your transformation context instead. */ 8160 const updateTry: typeof factory.updateTryStatement; 8161 /** @deprecated Use `factory.createDebuggerStatement` or the factory supplied by your transformation context instead. */ 8162 const createDebuggerStatement: typeof factory.createDebuggerStatement; 8163 /** @deprecated Use `factory.createVariableDeclarationList` or the factory supplied by your transformation context instead. */ 8164 const createVariableDeclarationList: typeof factory.createVariableDeclarationList; 8165 /** @deprecated Use `factory.updateVariableDeclarationList` or the factory supplied by your transformation context instead. */ 8166 const updateVariableDeclarationList: typeof factory.updateVariableDeclarationList; 8167 /** @deprecated Use `factory.createFunctionDeclaration` or the factory supplied by your transformation context instead. */ 8168 const createFunctionDeclaration: typeof factory.createFunctionDeclaration; 8169 /** @deprecated Use `factory.updateFunctionDeclaration` or the factory supplied by your transformation context instead. */ 8170 const updateFunctionDeclaration: typeof factory.updateFunctionDeclaration; 8171 /** @deprecated Use `factory.createClassDeclaration` or the factory supplied by your transformation context instead. */ 8172 const createClassDeclaration: typeof factory.createClassDeclaration; 8173 /** @deprecated Use `factory.updateClassDeclaration` or the factory supplied by your transformation context instead. */ 8174 const updateClassDeclaration: typeof factory.updateClassDeclaration; 8175 /** @deprecated Use `factory.createInterfaceDeclaration` or the factory supplied by your transformation context instead. */ 8176 const createInterfaceDeclaration: typeof factory.createInterfaceDeclaration; 8177 /** @deprecated Use `factory.updateInterfaceDeclaration` or the factory supplied by your transformation context instead. */ 8178 const updateInterfaceDeclaration: typeof factory.updateInterfaceDeclaration; 8179 /** @deprecated Use `factory.createTypeAliasDeclaration` or the factory supplied by your transformation context instead. */ 8180 const createTypeAliasDeclaration: typeof factory.createTypeAliasDeclaration; 8181 /** @deprecated Use `factory.updateTypeAliasDeclaration` or the factory supplied by your transformation context instead. */ 8182 const updateTypeAliasDeclaration: typeof factory.updateTypeAliasDeclaration; 8183 /** @deprecated Use `factory.createEnumDeclaration` or the factory supplied by your transformation context instead. */ 8184 const createEnumDeclaration: typeof factory.createEnumDeclaration; 8185 /** @deprecated Use `factory.updateEnumDeclaration` or the factory supplied by your transformation context instead. */ 8186 const updateEnumDeclaration: typeof factory.updateEnumDeclaration; 8187 /** @deprecated Use `factory.createModuleDeclaration` or the factory supplied by your transformation context instead. */ 8188 const createModuleDeclaration: typeof factory.createModuleDeclaration; 8189 /** @deprecated Use `factory.updateModuleDeclaration` or the factory supplied by your transformation context instead. */ 8190 const updateModuleDeclaration: typeof factory.updateModuleDeclaration; 8191 /** @deprecated Use `factory.createModuleBlock` or the factory supplied by your transformation context instead. */ 8192 const createModuleBlock: typeof factory.createModuleBlock; 8193 /** @deprecated Use `factory.updateModuleBlock` or the factory supplied by your transformation context instead. */ 8194 const updateModuleBlock: typeof factory.updateModuleBlock; 8195 /** @deprecated Use `factory.createCaseBlock` or the factory supplied by your transformation context instead. */ 8196 const createCaseBlock: typeof factory.createCaseBlock; 8197 /** @deprecated Use `factory.updateCaseBlock` or the factory supplied by your transformation context instead. */ 8198 const updateCaseBlock: typeof factory.updateCaseBlock; 8199 /** @deprecated Use `factory.createNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */ 8200 const createNamespaceExportDeclaration: typeof factory.createNamespaceExportDeclaration; 8201 /** @deprecated Use `factory.updateNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */ 8202 const updateNamespaceExportDeclaration: typeof factory.updateNamespaceExportDeclaration; 8203 /** @deprecated Use `factory.createImportEqualsDeclaration` or the factory supplied by your transformation context instead. */ 8204 const createImportEqualsDeclaration: typeof factory.createImportEqualsDeclaration; 8205 /** @deprecated Use `factory.updateImportEqualsDeclaration` or the factory supplied by your transformation context instead. */ 8206 const updateImportEqualsDeclaration: typeof factory.updateImportEqualsDeclaration; 8207 /** @deprecated Use `factory.createImportDeclaration` or the factory supplied by your transformation context instead. */ 8208 const createImportDeclaration: typeof factory.createImportDeclaration; 8209 /** @deprecated Use `factory.updateImportDeclaration` or the factory supplied by your transformation context instead. */ 8210 const updateImportDeclaration: typeof factory.updateImportDeclaration; 8211 /** @deprecated Use `factory.createNamespaceImport` or the factory supplied by your transformation context instead. */ 8212 const createNamespaceImport: typeof factory.createNamespaceImport; 8213 /** @deprecated Use `factory.updateNamespaceImport` or the factory supplied by your transformation context instead. */ 8214 const updateNamespaceImport: typeof factory.updateNamespaceImport; 8215 /** @deprecated Use `factory.createNamedImports` or the factory supplied by your transformation context instead. */ 8216 const createNamedImports: typeof factory.createNamedImports; 8217 /** @deprecated Use `factory.updateNamedImports` or the factory supplied by your transformation context instead. */ 8218 const updateNamedImports: typeof factory.updateNamedImports; 8219 /** @deprecated Use `factory.createImportSpecifier` or the factory supplied by your transformation context instead. */ 8220 const createImportSpecifier: typeof factory.createImportSpecifier; 8221 /** @deprecated Use `factory.updateImportSpecifier` or the factory supplied by your transformation context instead. */ 8222 const updateImportSpecifier: typeof factory.updateImportSpecifier; 8223 /** @deprecated Use `factory.createExportAssignment` or the factory supplied by your transformation context instead. */ 8224 const createExportAssignment: typeof factory.createExportAssignment; 8225 /** @deprecated Use `factory.updateExportAssignment` or the factory supplied by your transformation context instead. */ 8226 const updateExportAssignment: typeof factory.updateExportAssignment; 8227 /** @deprecated Use `factory.createNamedExports` or the factory supplied by your transformation context instead. */ 8228 const createNamedExports: typeof factory.createNamedExports; 8229 /** @deprecated Use `factory.updateNamedExports` or the factory supplied by your transformation context instead. */ 8230 const updateNamedExports: typeof factory.updateNamedExports; 8231 /** @deprecated Use `factory.createExportSpecifier` or the factory supplied by your transformation context instead. */ 8232 const createExportSpecifier: typeof factory.createExportSpecifier; 8233 /** @deprecated Use `factory.updateExportSpecifier` or the factory supplied by your transformation context instead. */ 8234 const updateExportSpecifier: typeof factory.updateExportSpecifier; 8235 /** @deprecated Use `factory.createExternalModuleReference` or the factory supplied by your transformation context instead. */ 8236 const createExternalModuleReference: typeof factory.createExternalModuleReference; 8237 /** @deprecated Use `factory.updateExternalModuleReference` or the factory supplied by your transformation context instead. */ 8238 const updateExternalModuleReference: typeof factory.updateExternalModuleReference; 8239 /** @deprecated Use `factory.createJSDocTypeExpression` or the factory supplied by your transformation context instead. */ 8240 const createJSDocTypeExpression: typeof factory.createJSDocTypeExpression; 8241 /** @deprecated Use `factory.createJSDocTypeTag` or the factory supplied by your transformation context instead. */ 8242 const createJSDocTypeTag: typeof factory.createJSDocTypeTag; 8243 /** @deprecated Use `factory.createJSDocReturnTag` or the factory supplied by your transformation context instead. */ 8244 const createJSDocReturnTag: typeof factory.createJSDocReturnTag; 8245 /** @deprecated Use `factory.createJSDocThisTag` or the factory supplied by your transformation context instead. */ 8246 const createJSDocThisTag: typeof factory.createJSDocThisTag; 8247 /** @deprecated Use `factory.createJSDocComment` or the factory supplied by your transformation context instead. */ 8248 const createJSDocComment: typeof factory.createJSDocComment; 8249 /** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */ 8250 const createJSDocParameterTag: typeof factory.createJSDocParameterTag; 8251 /** @deprecated Use `factory.createJSDocClassTag` or the factory supplied by your transformation context instead. */ 8252 const createJSDocClassTag: typeof factory.createJSDocClassTag; 8253 /** @deprecated Use `factory.createJSDocAugmentsTag` or the factory supplied by your transformation context instead. */ 8254 const createJSDocAugmentsTag: typeof factory.createJSDocAugmentsTag; 8255 /** @deprecated Use `factory.createJSDocEnumTag` or the factory supplied by your transformation context instead. */ 8256 const createJSDocEnumTag: typeof factory.createJSDocEnumTag; 8257 /** @deprecated Use `factory.createJSDocTemplateTag` or the factory supplied by your transformation context instead. */ 8258 const createJSDocTemplateTag: typeof factory.createJSDocTemplateTag; 8259 /** @deprecated Use `factory.createJSDocTypedefTag` or the factory supplied by your transformation context instead. */ 8260 const createJSDocTypedefTag: typeof factory.createJSDocTypedefTag; 8261 /** @deprecated Use `factory.createJSDocCallbackTag` or the factory supplied by your transformation context instead. */ 8262 const createJSDocCallbackTag: typeof factory.createJSDocCallbackTag; 8263 /** @deprecated Use `factory.createJSDocSignature` or the factory supplied by your transformation context instead. */ 8264 const createJSDocSignature: typeof factory.createJSDocSignature; 8265 /** @deprecated Use `factory.createJSDocPropertyTag` or the factory supplied by your transformation context instead. */ 8266 const createJSDocPropertyTag: typeof factory.createJSDocPropertyTag; 8267 /** @deprecated Use `factory.createJSDocTypeLiteral` or the factory supplied by your transformation context instead. */ 8268 const createJSDocTypeLiteral: typeof factory.createJSDocTypeLiteral; 8269 /** @deprecated Use `factory.createJSDocImplementsTag` or the factory supplied by your transformation context instead. */ 8270 const createJSDocImplementsTag: typeof factory.createJSDocImplementsTag; 8271 /** @deprecated Use `factory.createJSDocAuthorTag` or the factory supplied by your transformation context instead. */ 8272 const createJSDocAuthorTag: typeof factory.createJSDocAuthorTag; 8273 /** @deprecated Use `factory.createJSDocPublicTag` or the factory supplied by your transformation context instead. */ 8274 const createJSDocPublicTag: typeof factory.createJSDocPublicTag; 8275 /** @deprecated Use `factory.createJSDocPrivateTag` or the factory supplied by your transformation context instead. */ 8276 const createJSDocPrivateTag: typeof factory.createJSDocPrivateTag; 8277 /** @deprecated Use `factory.createJSDocProtectedTag` or the factory supplied by your transformation context instead. */ 8278 const createJSDocProtectedTag: typeof factory.createJSDocProtectedTag; 8279 /** @deprecated Use `factory.createJSDocReadonlyTag` or the factory supplied by your transformation context instead. */ 8280 const createJSDocReadonlyTag: typeof factory.createJSDocReadonlyTag; 8281 /** @deprecated Use `factory.createJSDocUnknownTag` or the factory supplied by your transformation context instead. */ 8282 const createJSDocTag: typeof factory.createJSDocUnknownTag; 8283 /** @deprecated Use `factory.createJsxElement` or the factory supplied by your transformation context instead. */ 8284 const createJsxElement: typeof factory.createJsxElement; 8285 /** @deprecated Use `factory.updateJsxElement` or the factory supplied by your transformation context instead. */ 8286 const updateJsxElement: typeof factory.updateJsxElement; 8287 /** @deprecated Use `factory.createJsxSelfClosingElement` or the factory supplied by your transformation context instead. */ 8288 const createJsxSelfClosingElement: typeof factory.createJsxSelfClosingElement; 8289 /** @deprecated Use `factory.updateJsxSelfClosingElement` or the factory supplied by your transformation context instead. */ 8290 const updateJsxSelfClosingElement: typeof factory.updateJsxSelfClosingElement; 8291 /** @deprecated Use `factory.createJsxOpeningElement` or the factory supplied by your transformation context instead. */ 8292 const createJsxOpeningElement: typeof factory.createJsxOpeningElement; 8293 /** @deprecated Use `factory.updateJsxOpeningElement` or the factory supplied by your transformation context instead. */ 8294 const updateJsxOpeningElement: typeof factory.updateJsxOpeningElement; 8295 /** @deprecated Use `factory.createJsxClosingElement` or the factory supplied by your transformation context instead. */ 8296 const createJsxClosingElement: typeof factory.createJsxClosingElement; 8297 /** @deprecated Use `factory.updateJsxClosingElement` or the factory supplied by your transformation context instead. */ 8298 const updateJsxClosingElement: typeof factory.updateJsxClosingElement; 8299 /** @deprecated Use `factory.createJsxFragment` or the factory supplied by your transformation context instead. */ 8300 const createJsxFragment: typeof factory.createJsxFragment; 8301 /** @deprecated Use `factory.createJsxText` or the factory supplied by your transformation context instead. */ 8302 const createJsxText: typeof factory.createJsxText; 8303 /** @deprecated Use `factory.updateJsxText` or the factory supplied by your transformation context instead. */ 8304 const updateJsxText: typeof factory.updateJsxText; 8305 /** @deprecated Use `factory.createJsxOpeningFragment` or the factory supplied by your transformation context instead. */ 8306 const createJsxOpeningFragment: typeof factory.createJsxOpeningFragment; 8307 /** @deprecated Use `factory.createJsxJsxClosingFragment` or the factory supplied by your transformation context instead. */ 8308 const createJsxJsxClosingFragment: typeof factory.createJsxJsxClosingFragment; 8309 /** @deprecated Use `factory.updateJsxFragment` or the factory supplied by your transformation context instead. */ 8310 const updateJsxFragment: typeof factory.updateJsxFragment; 8311 /** @deprecated Use `factory.createJsxAttribute` or the factory supplied by your transformation context instead. */ 8312 const createJsxAttribute: typeof factory.createJsxAttribute; 8313 /** @deprecated Use `factory.updateJsxAttribute` or the factory supplied by your transformation context instead. */ 8314 const updateJsxAttribute: typeof factory.updateJsxAttribute; 8315 /** @deprecated Use `factory.createJsxAttributes` or the factory supplied by your transformation context instead. */ 8316 const createJsxAttributes: typeof factory.createJsxAttributes; 8317 /** @deprecated Use `factory.updateJsxAttributes` or the factory supplied by your transformation context instead. */ 8318 const updateJsxAttributes: typeof factory.updateJsxAttributes; 8319 /** @deprecated Use `factory.createJsxSpreadAttribute` or the factory supplied by your transformation context instead. */ 8320 const createJsxSpreadAttribute: typeof factory.createJsxSpreadAttribute; 8321 /** @deprecated Use `factory.updateJsxSpreadAttribute` or the factory supplied by your transformation context instead. */ 8322 const updateJsxSpreadAttribute: typeof factory.updateJsxSpreadAttribute; 8323 /** @deprecated Use `factory.createJsxExpression` or the factory supplied by your transformation context instead. */ 8324 const createJsxExpression: typeof factory.createJsxExpression; 8325 /** @deprecated Use `factory.updateJsxExpression` or the factory supplied by your transformation context instead. */ 8326 const updateJsxExpression: typeof factory.updateJsxExpression; 8327 /** @deprecated Use `factory.createCaseClause` or the factory supplied by your transformation context instead. */ 8328 const createCaseClause: typeof factory.createCaseClause; 8329 /** @deprecated Use `factory.updateCaseClause` or the factory supplied by your transformation context instead. */ 8330 const updateCaseClause: typeof factory.updateCaseClause; 8331 /** @deprecated Use `factory.createDefaultClause` or the factory supplied by your transformation context instead. */ 8332 const createDefaultClause: typeof factory.createDefaultClause; 8333 /** @deprecated Use `factory.updateDefaultClause` or the factory supplied by your transformation context instead. */ 8334 const updateDefaultClause: typeof factory.updateDefaultClause; 8335 /** @deprecated Use `factory.createHeritageClause` or the factory supplied by your transformation context instead. */ 8336 const createHeritageClause: typeof factory.createHeritageClause; 8337 /** @deprecated Use `factory.updateHeritageClause` or the factory supplied by your transformation context instead. */ 8338 const updateHeritageClause: typeof factory.updateHeritageClause; 8339 /** @deprecated Use `factory.createCatchClause` or the factory supplied by your transformation context instead. */ 8340 const createCatchClause: typeof factory.createCatchClause; 8341 /** @deprecated Use `factory.updateCatchClause` or the factory supplied by your transformation context instead. */ 8342 const updateCatchClause: typeof factory.updateCatchClause; 8343 /** @deprecated Use `factory.createPropertyAssignment` or the factory supplied by your transformation context instead. */ 8344 const createPropertyAssignment: typeof factory.createPropertyAssignment; 8345 /** @deprecated Use `factory.updatePropertyAssignment` or the factory supplied by your transformation context instead. */ 8346 const updatePropertyAssignment: typeof factory.updatePropertyAssignment; 8347 /** @deprecated Use `factory.createShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */ 8348 const createShorthandPropertyAssignment: typeof factory.createShorthandPropertyAssignment; 8349 /** @deprecated Use `factory.updateShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */ 8350 const updateShorthandPropertyAssignment: typeof factory.updateShorthandPropertyAssignment; 8351 /** @deprecated Use `factory.createSpreadAssignment` or the factory supplied by your transformation context instead. */ 8352 const createSpreadAssignment: typeof factory.createSpreadAssignment; 8353 /** @deprecated Use `factory.updateSpreadAssignment` or the factory supplied by your transformation context instead. */ 8354 const updateSpreadAssignment: typeof factory.updateSpreadAssignment; 8355 /** @deprecated Use `factory.createEnumMember` or the factory supplied by your transformation context instead. */ 8356 const createEnumMember: typeof factory.createEnumMember; 8357 /** @deprecated Use `factory.updateEnumMember` or the factory supplied by your transformation context instead. */ 8358 const updateEnumMember: typeof factory.updateEnumMember; 8359 /** @deprecated Use `factory.updateSourceFile` or the factory supplied by your transformation context instead. */ 8360 const updateSourceFileNode: typeof factory.updateSourceFile; 8361 /** @deprecated Use `factory.createNotEmittedStatement` or the factory supplied by your transformation context instead. */ 8362 const createNotEmittedStatement: typeof factory.createNotEmittedStatement; 8363 /** @deprecated Use `factory.createPartiallyEmittedExpression` or the factory supplied by your transformation context instead. */ 8364 const createPartiallyEmittedExpression: typeof factory.createPartiallyEmittedExpression; 8365 /** @deprecated Use `factory.updatePartiallyEmittedExpression` or the factory supplied by your transformation context instead. */ 8366 const updatePartiallyEmittedExpression: typeof factory.updatePartiallyEmittedExpression; 8367 /** @deprecated Use `factory.createCommaListExpression` or the factory supplied by your transformation context instead. */ 8368 const createCommaList: typeof factory.createCommaListExpression; 8369 /** @deprecated Use `factory.updateCommaListExpression` or the factory supplied by your transformation context instead. */ 8370 const updateCommaList: typeof factory.updateCommaListExpression; 8371 /** @deprecated Use `factory.createBundle` or the factory supplied by your transformation context instead. */ 8372 const createBundle: typeof factory.createBundle; 8373 /** @deprecated Use `factory.updateBundle` or the factory supplied by your transformation context instead. */ 8374 const updateBundle: typeof factory.updateBundle; 8375 /** @deprecated Use `factory.createImmediatelyInvokedFunctionExpression` or the factory supplied by your transformation context instead. */ 8376 const createImmediatelyInvokedFunctionExpression: typeof factory.createImmediatelyInvokedFunctionExpression; 8377 /** @deprecated Use `factory.createImmediatelyInvokedArrowFunction` or the factory supplied by your transformation context instead. */ 8378 const createImmediatelyInvokedArrowFunction: typeof factory.createImmediatelyInvokedArrowFunction; 8379 /** @deprecated Use `factory.createVoidZero` or the factory supplied by your transformation context instead. */ 8380 const createVoidZero: typeof factory.createVoidZero; 8381 /** @deprecated Use `factory.createExportDefault` or the factory supplied by your transformation context instead. */ 8382 const createExportDefault: typeof factory.createExportDefault; 8383 /** @deprecated Use `factory.createExternalModuleExport` or the factory supplied by your transformation context instead. */ 8384 const createExternalModuleExport: typeof factory.createExternalModuleExport; 8385 /** @deprecated Use `factory.createNamespaceExport` or the factory supplied by your transformation context instead. */ 8386 const createNamespaceExport: typeof factory.createNamespaceExport; 8387 /** @deprecated Use `factory.updateNamespaceExport` or the factory supplied by your transformation context instead. */ 8388 const updateNamespaceExport: typeof factory.updateNamespaceExport; 8389 /** @deprecated Use `factory.createToken` or the factory supplied by your transformation context instead. */ 8390 const createToken: <TKind extends SyntaxKind>(kind: TKind) => Token<TKind>; 8391 /** @deprecated Use `factory.createIdentifier` or the factory supplied by your transformation context instead. */ 8392 const createIdentifier: (text: string) => Identifier; 8393 /** @deprecated Use `factory.createTempVariable` or the factory supplied by your transformation context instead. */ 8394 const createTempVariable: (recordTempVariable: ((node: Identifier) => void) | undefined) => Identifier; 8395 /** @deprecated Use `factory.getGeneratedNameForNode` or the factory supplied by your transformation context instead. */ 8396 const getGeneratedNameForNode: (node: Node | undefined) => Identifier; 8397 /** @deprecated Use `factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic)` or the factory supplied by your transformation context instead. */ 8398 const createOptimisticUniqueName: (text: string) => Identifier; 8399 /** @deprecated Use `factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel)` or the factory supplied by your transformation context instead. */ 8400 const createFileLevelUniqueName: (text: string) => Identifier; 8401 /** @deprecated Use `factory.createIndexSignature` or the factory supplied by your transformation context instead. */ 8402 const createIndexSignature: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => IndexSignatureDeclaration; 8403 /** @deprecated Use `factory.createTypePredicateNode` or the factory supplied by your transformation context instead. */ 8404 const createTypePredicateNode: (parameterName: Identifier | ThisTypeNode | string, type: TypeNode) => TypePredicateNode; 8405 /** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */ 8406 const updateTypePredicateNode: (node: TypePredicateNode, parameterName: Identifier | ThisTypeNode, type: TypeNode) => TypePredicateNode; 8407 /** @deprecated Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead. */ 8408 const createLiteral: { 8409 (value: string | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): StringLiteral; 8410 (value: number | PseudoBigInt): NumericLiteral; 8411 (value: boolean): BooleanLiteral; 8412 (value: string | number | PseudoBigInt | boolean): PrimaryExpression; 8413 }; 8414 /** @deprecated Use `factory.createMethodSignature` or the factory supplied by your transformation context instead. */ 8415 const createMethodSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined) => MethodSignature; 8416 /** @deprecated Use `factory.updateMethodSignature` or the factory supplied by your transformation context instead. */ 8417 const updateMethodSignature: (node: MethodSignature, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined, name: PropertyName, questionToken: QuestionToken | undefined) => MethodSignature; 8418 /** @deprecated Use `factory.createTypeOperatorNode` or the factory supplied by your transformation context instead. */ 8419 const createTypeOperatorNode: { 8420 (type: TypeNode): TypeOperatorNode; 8421 (operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode; 8422 }; 8423 /** @deprecated Use `factory.createTaggedTemplate` or the factory supplied by your transformation context instead. */ 8424 const createTaggedTemplate: { 8425 (tag: Expression, template: TemplateLiteral): TaggedTemplateExpression; 8426 (tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; 8427 }; 8428 /** @deprecated Use `factory.updateTaggedTemplate` or the factory supplied by your transformation context instead. */ 8429 const updateTaggedTemplate: { 8430 (node: TaggedTemplateExpression, tag: Expression, template: TemplateLiteral): TaggedTemplateExpression; 8431 (node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; 8432 }; 8433 /** @deprecated Use `factory.updateBinary` or the factory supplied by your transformation context instead. */ 8434 const updateBinary: (node: BinaryExpression, left: Expression, right: Expression, operator?: BinaryOperator | BinaryOperatorToken) => BinaryExpression; 8435 /** @deprecated Use `factory.createConditional` or the factory supplied by your transformation context instead. */ 8436 const createConditional: { 8437 (condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression; 8438 (condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression; 8439 }; 8440 /** @deprecated Use `factory.createYield` or the factory supplied by your transformation context instead. */ 8441 const createYield: { 8442 (expression?: Expression | undefined): YieldExpression; 8443 (asteriskToken: AsteriskToken | undefined, expression: Expression): YieldExpression; 8444 }; 8445 /** @deprecated Use `factory.createClassExpression` or the factory supplied by your transformation context instead. */ 8446 const createClassExpression: (modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassExpression; 8447 /** @deprecated Use `factory.updateClassExpression` or the factory supplied by your transformation context instead. */ 8448 const updateClassExpression: (node: ClassExpression, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassExpression; 8449 /** @deprecated Use `factory.createPropertySignature` or the factory supplied by your transformation context instead. */ 8450 const createPropertySignature: (modifiers: readonly Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer?: Expression | undefined) => PropertySignature; 8451 /** @deprecated Use `factory.updatePropertySignature` or the factory supplied by your transformation context instead. */ 8452 const updatePropertySignature: (node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => PropertySignature; 8453 /** @deprecated Use `factory.createExpressionWithTypeArguments` or the factory supplied by your transformation context instead. */ 8454 const createExpressionWithTypeArguments: (typeArguments: readonly TypeNode[] | undefined, expression: Expression) => ExpressionWithTypeArguments; 8455 /** @deprecated Use `factory.updateExpressionWithTypeArguments` or the factory supplied by your transformation context instead. */ 8456 const updateExpressionWithTypeArguments: (node: ExpressionWithTypeArguments, typeArguments: readonly TypeNode[] | undefined, expression: Expression) => ExpressionWithTypeArguments; 8457 /** @deprecated Use `factory.createArrowFunction` or the factory supplied by your transformation context instead. */ 8458 const createArrowFunction: { 8459 (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction; 8460 (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction; 8461 }; 8462 /** @deprecated Use `factory.updateArrowFunction` or the factory supplied by your transformation context instead. */ 8463 const updateArrowFunction: { 8464 (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction; 8465 (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction; 8466 }; 8467 /** @deprecated Use `factory.createVariableDeclaration` or the factory supplied by your transformation context instead. */ 8468 const createVariableDeclaration: { 8469 (name: string | BindingName, type?: TypeNode | undefined, initializer?: Expression | undefined): VariableDeclaration; 8470 (name: string | BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; 8471 }; 8472 /** @deprecated Use `factory.updateVariableDeclaration` or the factory supplied by your transformation context instead. */ 8473 const updateVariableDeclaration: { 8474 (node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; 8475 (node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; 8476 }; 8477 /** @deprecated Use `factory.createImportClause` or the factory supplied by your transformation context instead. */ 8478 const createImportClause: (name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly?: any) => ImportClause; 8479 /** @deprecated Use `factory.updateImportClause` or the factory supplied by your transformation context instead. */ 8480 const updateImportClause: (node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly: boolean) => ImportClause; 8481 /** @deprecated Use `factory.createExportDeclaration` or the factory supplied by your transformation context instead. */ 8482 const createExportDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression | undefined, isTypeOnly?: any) => ExportDeclaration; 8483 /** @deprecated Use `factory.updateExportDeclaration` or the factory supplied by your transformation context instead. */ 8484 const updateExportDeclaration: (node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, isTypeOnly: boolean) => ExportDeclaration; 8485 /** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */ 8486 const createJSDocParamTag: (name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocParameterTag; 8487 /** @deprecated Use `factory.createComma` or the factory supplied by your transformation context instead. */ 8488 const createComma: (left: Expression, right: Expression) => Expression; 8489 /** @deprecated Use `factory.createLessThan` or the factory supplied by your transformation context instead. */ 8490 const createLessThan: (left: Expression, right: Expression) => Expression; 8491 /** @deprecated Use `factory.createAssignment` or the factory supplied by your transformation context instead. */ 8492 const createAssignment: (left: Expression, right: Expression) => BinaryExpression; 8493 /** @deprecated Use `factory.createStrictEquality` or the factory supplied by your transformation context instead. */ 8494 const createStrictEquality: (left: Expression, right: Expression) => BinaryExpression; 8495 /** @deprecated Use `factory.createStrictInequality` or the factory supplied by your transformation context instead. */ 8496 const createStrictInequality: (left: Expression, right: Expression) => BinaryExpression; 8497 /** @deprecated Use `factory.createAdd` or the factory supplied by your transformation context instead. */ 8498 const createAdd: (left: Expression, right: Expression) => BinaryExpression; 8499 /** @deprecated Use `factory.createSubtract` or the factory supplied by your transformation context instead. */ 8500 const createSubtract: (left: Expression, right: Expression) => BinaryExpression; 8501 /** @deprecated Use `factory.createLogicalAnd` or the factory supplied by your transformation context instead. */ 8502 const createLogicalAnd: (left: Expression, right: Expression) => BinaryExpression; 8503 /** @deprecated Use `factory.createLogicalOr` or the factory supplied by your transformation context instead. */ 8504 const createLogicalOr: (left: Expression, right: Expression) => BinaryExpression; 8505 /** @deprecated Use `factory.createPostfixIncrement` or the factory supplied by your transformation context instead. */ 8506 const createPostfixIncrement: (operand: Expression) => PostfixUnaryExpression; 8507 /** @deprecated Use `factory.createLogicalNot` or the factory supplied by your transformation context instead. */ 8508 const createLogicalNot: (operand: Expression) => PrefixUnaryExpression; 8509 /** @deprecated Use an appropriate `factory` method instead. */ 8510 const createNode: (kind: SyntaxKind, pos?: any, end?: any) => Node; 8511 /** 8512 * Creates a shallow, memberwise clone of a node ~for mutation~ with its `pos`, `end`, and `parent` set. 8513 * 8514 * NOTE: It is unsafe to change any properties of a `Node` that relate to its AST children, as those changes won't be 8515 * captured with respect to transformations. 8516 * 8517 * @deprecated Use an appropriate `factory.update...` method instead, use `setCommentRange` or `setSourceMapRange`, and avoid setting `parent`. 8518 */ 8519 const getMutableClone: <T extends Node>(node: T) => T; 8520 /** @deprecated Use `isTypeAssertionExpression` instead. */ 8521 const isTypeAssertion: (node: Node) => node is TypeAssertion; 8522 /** 8523 * @deprecated Use `isMemberName` instead. 8524 */ 8525 const isIdentifierOrPrivateIdentifier: (node: Node) => node is MemberName; 8526 namespace ArkTSLinter_1_0 { 8527 interface AutofixInfo { 8528 problemID: string; 8529 start: number; 8530 end: number; 8531 } 8532 interface CommandLineOptions { 8533 strictMode?: boolean; 8534 ideMode?: boolean; 8535 logTscErrors?: boolean; 8536 warningsAsErrors: boolean; 8537 parsedConfigFile?: ParsedCommandLine; 8538 inputFiles: string[]; 8539 autofixInfo?: AutofixInfo[]; 8540 } 8541 interface LintOptions { 8542 cmdOptions: CommandLineOptions; 8543 tsProgram?: Program; 8544 [key: string]: any; 8545 } 8546 const cookBookMsg: string[]; 8547 const cookBookTag: string[]; 8548 interface DiagnosticChecker { 8549 checkDiagnosticMessage(msgText: string | DiagnosticMessageChain): boolean; 8550 } 8551 const TYPE_0_IS_NOT_ASSIGNABLE_TO_TYPE_1_ERROR_CODE = 2322; 8552 const TYPE_UNKNOWN_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 8553 const TYPE_NULL_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 8554 const TYPE_UNDEFINED_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 8555 const ARGUMENT_OF_TYPE_0_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_ERROR_CODE = 2345; 8556 const ARGUMENT_OF_TYPE_NULL_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_RE: RegExp; 8557 const ARGUMENT_OF_TYPE_UNDEFINED_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_RE: RegExp; 8558 const NO_OVERLOAD_MATCHES_THIS_CALL_ERROR_CODE = 2769; 8559 class LibraryTypeCallDiagnosticChecker implements DiagnosticChecker { 8560 inLibCall: boolean; 8561 diagnosticMessages: Array<DiagnosticMessageChain> | undefined; 8562 filteredDiagnosticMessages: DiagnosticMessageChain[]; 8563 constructor(filteredDiagnosticMessages: DiagnosticMessageChain[]); 8564 configure(inLibCall: boolean, diagnosticMessages: Array<DiagnosticMessageChain>): void; 8565 checkMessageText(msg: string): boolean; 8566 checkMessageChain(chain: DiagnosticMessageChain): boolean; 8567 checkFilteredDiagnosticMessages(msgText: DiagnosticMessageChain | string): boolean; 8568 checkDiagnosticMessage(msgText: string | DiagnosticMessageChain): boolean; 8569 } 8570 function setTypeChecker(tsTypeChecker: TypeChecker): void; 8571 function clearTypeChecker(): void; 8572 function setTestMode(tsTestMode: boolean): void; 8573 function getStartPos(nodeOrComment: Node | CommentRange): number; 8574 function getEndPos(nodeOrComment: Node | CommentRange): number; 8575 function isAssignmentOperator(tsBinOp: BinaryOperatorToken): boolean; 8576 function isTypedArray(tsType: TypeNode | undefined): boolean; 8577 function isType(tsType: TypeNode | undefined, checkType: string): boolean; 8578 function entityNameToString(name: EntityName): string; 8579 function isNumberType(tsType: Type): boolean; 8580 function isBooleanType(tsType: Type): boolean; 8581 function isStringLikeType(tsType: Type): boolean; 8582 function isStringType(type: Type): boolean; 8583 function isPrimitiveEnumType(type: Type, primitiveType: TypeFlags): boolean; 8584 function isPrimitiveEnumMemberType(type: Type, primitiveType: TypeFlags): boolean; 8585 function unwrapParenthesizedType(tsType: TypeNode): TypeNode; 8586 function findParentIf(asExpr: AsExpression): IfStatement | null; 8587 function isDestructuringAssignmentLHS(tsExpr: ArrayLiteralExpression | ObjectLiteralExpression): boolean; 8588 function isEnumType(tsType: Type): boolean; 8589 function isEnumMemberType(tsType: Type): boolean; 8590 function isObjectLiteralType(tsType: Type): boolean; 8591 function isNumberLikeType(tsType: Type): boolean; 8592 function hasModifier(tsModifiers: readonly Modifier[] | undefined, tsModifierKind: number): boolean; 8593 function unwrapParenthesized(tsExpr: Expression): Expression; 8594 function followIfAliased(sym: Symbol): Symbol; 8595 function trueSymbolAtLocation(node: Node): Symbol | undefined; 8596 function clearTrueSymbolAtLocationCache(): void; 8597 function isTypeDeclSyntaxKind(kind: SyntaxKind): boolean; 8598 function symbolHasDuplicateName(symbol: Symbol, tsDeclKind: SyntaxKind): boolean; 8599 function isReferenceType(tsType: Type): boolean; 8600 function isPrimitiveType(type: Type): boolean; 8601 function isTypeSymbol(symbol: Symbol | undefined): boolean; 8602 function isGenericArrayType(tsType: Type): tsType is TypeReference; 8603 function isDerivedFrom(tsType: Type, checkType: CheckType): tsType is TypeReference; 8604 function isTypeReference(tsType: Type): tsType is TypeReference; 8605 function isNullType(tsTypeNode: TypeNode): boolean; 8606 function isThisOrSuperExpr(tsExpr: Expression): boolean; 8607 function isPrototypeSymbol(symbol: Symbol | undefined): boolean; 8608 function isFunctionSymbol(symbol: Symbol | undefined): boolean; 8609 function isInterfaceType(tsType: Type | undefined): boolean; 8610 function isAnyType(tsType: Type): tsType is TypeReference; 8611 function isUnknownType(tsType: Type): boolean; 8612 function isUnsupportedType(tsType: Type): boolean; 8613 function isUnsupportedUnionType(tsType: Type): boolean; 8614 function isFunctionOrMethod(tsSymbol: Symbol | undefined): boolean; 8615 function isMethodAssignment(tsSymbol: Symbol | undefined): boolean; 8616 function getDeclaration(tsSymbol: Symbol | undefined): Declaration | undefined; 8617 function isValidEnumMemberInit(tsExpr: Expression): boolean; 8618 function isCompileTimeExpression(tsExpr: Expression): boolean; 8619 function isConst(tsNode: Node): boolean; 8620 function isNumberConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression | NumericLiteral): boolean; 8621 function isIntegerConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression | NumericLiteral): boolean; 8622 function isStringConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression): boolean; 8623 function relatedByInheritanceOrIdentical(typeA: Type, typeB: Type): boolean; 8624 function needToDeduceStructuralIdentity(typeFrom: Type, typeTo: Type, allowPromotion?: boolean): boolean; 8625 function hasPredecessor(node: Node, predicate: (node: Node) => boolean): boolean; 8626 function processParentTypes(parentTypes: NodeArray<ExpressionWithTypeArguments>, typeB: Type, processInterfaces: boolean): boolean; 8627 function processParentTypesCheck(parentTypes: NodeArray<ExpressionWithTypeArguments>, checkType: CheckType): boolean; 8628 function isObjectType(tsType: Type): boolean; 8629 function logTscDiagnostic(diagnostics: readonly Diagnostic[], log: (message: any, ...args: any[]) => void): void; 8630 function encodeProblemInfo(problem: ProblemInfo): string; 8631 function decodeAutofixInfo(info: string): AutofixInfo; 8632 function isCallToFunctionWithOmittedReturnType(tsExpr: Expression): boolean; 8633 function validateObjectLiteralType(type: Type | undefined): boolean; 8634 function isStructDeclarationKind(kind: SyntaxKind): boolean; 8635 function isStructDeclaration(node: Node): boolean; 8636 function isStructObjectInitializer(objectLiteral: ObjectLiteralExpression): boolean; 8637 function hasMethods(type: Type): boolean; 8638 function isExpressionAssignableToType(lhsType: Type | undefined, rhsExpr: Expression): boolean; 8639 function isLiteralType(type: Type): boolean; 8640 function validateFields(type: Type, objectLiteral: ObjectLiteralExpression): boolean; 8641 function isSupportedType(typeNode: TypeNode): boolean; 8642 function isStruct(symbol: Symbol): boolean; 8643 function getParentSymbolName(symbol: Symbol): string | undefined; 8644 function isGlobalSymbol(symbol: Symbol): boolean; 8645 function isSymbolAPI(symbol: Symbol): boolean; 8646 function isStdSymbol(symbol: Symbol): boolean; 8647 function isSymbolIterator(symbol: Symbol): boolean; 8648 function isDefaultImport(importSpec: ImportSpecifier): boolean; 8649 function hasAccessModifier(decl: Declaration): boolean; 8650 function getModifier(modifiers: readonly Modifier[] | undefined, modifierKind: SyntaxKind): Modifier | undefined; 8651 function getAccessModifier(modifiers: readonly Modifier[] | undefined): Modifier | undefined; 8652 function isStdRecordType(type: Type): boolean; 8653 function isStdPartialType(type: Type): boolean; 8654 function isStdRequiredType(type: Type): boolean; 8655 function isStdReadonlyType(type: Type): boolean; 8656 function isLibraryType(type: Type): boolean; 8657 function hasLibraryType(node: Node): boolean; 8658 function isLibrarySymbol(sym: Symbol | undefined): boolean; 8659 function pathContainsDirectory(targetPath: string, dir: string): boolean; 8660 function getScriptKind(srcFile: SourceFile): ScriptKind; 8661 function isStdLibraryType(type: Type): boolean; 8662 function isStdLibrarySymbol(sym: Symbol | undefined): boolean; 8663 function isIntrinsicObjectType(type: Type): boolean; 8664 function isDynamicType(type: Type | undefined): boolean | undefined; 8665 function isDynamicLiteralInitializer(expr: Expression): boolean; 8666 function isEsObjectType(typeNode: TypeNode): boolean; 8667 function isInsideBlock(node: Node): boolean; 8668 function isEsObjectPossiblyAllowed(typeRef: TypeReferenceNode): boolean; 8669 function isValueAssignableToESObject(node: Node): boolean; 8670 function getVariableDeclarationTypeNode(node: Node): TypeNode | undefined; 8671 function getSymbolDeclarationTypeNode(sym: Symbol): TypeNode | undefined; 8672 function hasEsObjectType(node: Node): boolean; 8673 function symbolHasEsObjectType(sym: Symbol): boolean; 8674 function isEsObjectSymbol(sym: Symbol): boolean; 8675 function isAnonymousType(type: Type): boolean; 8676 function getSymbolOfCallExpression(callExpr: CallExpression): Symbol | undefined; 8677 function typeIsRecursive(topType: Type, type?: Type | undefined): boolean; 8678 const PROPERTY_HAS_NO_INITIALIZER_ERROR_CODE = 2564; 8679 const NON_INITIALIZABLE_PROPERTY_DECORATORS: string[]; 8680 const NON_INITIALIZABLE_PROPERTY_ClASS_DECORATORS: string[]; 8681 const LIMITED_STANDARD_UTILITY_TYPES: string[]; 8682 const ALLOWED_STD_SYMBOL_API: string[]; 8683 enum ProblemSeverity { 8684 WARNING = 1, 8685 ERROR = 2 8686 } 8687 const ARKTS_IGNORE_DIRS: string[]; 8688 const ARKTS_IGNORE_FILES: string[]; 8689 enum CheckType { 8690 Array = 0, 8691 String = "String", 8692 Set = "Set", 8693 Map = "Map", 8694 Error = "Error" 8695 } 8696 const ES_OBJECT = "ESObject"; 8697 const LIMITED_STD_GLOBAL_FUNC: string[]; 8698 const LIMITED_STD_OBJECT_API: string[]; 8699 const LIMITED_STD_REFLECT_API: string[]; 8700 const LIMITED_STD_PROXYHANDLER_API: string[]; 8701 const ARKUI_DECORATORS: string[]; 8702 const FUNCTION_HAS_NO_RETURN_ERROR_CODE = 2366; 8703 const NON_RETURN_FUNCTION_DECORATORS: string[]; 8704 const STANDARD_LIBRARIES: string[]; 8705 const TYPED_ARRAYS: string[]; 8706 enum FaultID { 8707 AnyType = 0, 8708 SymbolType = 1, 8709 ObjectLiteralNoContextType = 2, 8710 ArrayLiteralNoContextType = 3, 8711 ComputedPropertyName = 4, 8712 LiteralAsPropertyName = 5, 8713 TypeQuery = 6, 8714 RegexLiteral = 7, 8715 IsOperator = 8, 8716 DestructuringParameter = 9, 8717 YieldExpression = 10, 8718 InterfaceMerging = 11, 8719 EnumMerging = 12, 8720 InterfaceExtendsClass = 13, 8721 IndexMember = 14, 8722 WithStatement = 15, 8723 ThrowStatement = 16, 8724 IndexedAccessType = 17, 8725 UnknownType = 18, 8726 ForInStatement = 19, 8727 InOperator = 20, 8728 ImportFromPath = 21, 8729 FunctionExpression = 22, 8730 IntersectionType = 23, 8731 ObjectTypeLiteral = 24, 8732 CommaOperator = 25, 8733 LimitedReturnTypeInference = 26, 8734 LambdaWithTypeParameters = 27, 8735 ClassExpression = 28, 8736 DestructuringAssignment = 29, 8737 DestructuringDeclaration = 30, 8738 VarDeclaration = 31, 8739 CatchWithUnsupportedType = 32, 8740 DeleteOperator = 33, 8741 DeclWithDuplicateName = 34, 8742 UnaryArithmNotNumber = 35, 8743 ConstructorType = 36, 8744 ConstructorIface = 37, 8745 ConstructorFuncs = 38, 8746 CallSignature = 39, 8747 TypeAssertion = 40, 8748 PrivateIdentifier = 41, 8749 LocalFunction = 42, 8750 ConditionalType = 43, 8751 MappedType = 44, 8752 NamespaceAsObject = 45, 8753 ClassAsObject = 46, 8754 NonDeclarationInNamespace = 47, 8755 GeneratorFunction = 48, 8756 FunctionContainsThis = 49, 8757 PropertyAccessByIndex = 50, 8758 JsxElement = 51, 8759 EnumMemberNonConstInit = 52, 8760 ImplementsClass = 53, 8761 NoUndefinedPropAccess = 54, 8762 MultipleStaticBlocks = 55, 8763 ThisType = 56, 8764 IntefaceExtendDifProps = 57, 8765 StructuralIdentity = 58, 8766 DefaultImport = 59, 8767 ExportAssignment = 60, 8768 ImportAssignment = 61, 8769 GenericCallNoTypeArgs = 62, 8770 ParameterProperties = 63, 8771 InstanceofUnsupported = 64, 8772 ShorthandAmbientModuleDecl = 65, 8773 WildcardsInModuleName = 66, 8774 UMDModuleDefinition = 67, 8775 NewTarget = 68, 8776 DefiniteAssignment = 69, 8777 Prototype = 70, 8778 GlobalThis = 71, 8779 UtilityType = 72, 8780 PropertyDeclOnFunction = 73, 8781 FunctionApplyBindCall = 74, 8782 ConstAssertion = 75, 8783 ImportAssertion = 76, 8784 SpreadOperator = 77, 8785 LimitedStdLibApi = 78, 8786 ErrorSuppression = 79, 8787 StrictDiagnostic = 80, 8788 UnsupportedDecorators = 81, 8789 ImportAfterStatement = 82, 8790 EsObjectType = 83, 8791 LAST_ID = 84 8792 } 8793 class FaultAttributs { 8794 migratable?: boolean; 8795 warning?: boolean; 8796 cookBookRef: string; 8797 } 8798 const faultsAttrs: FaultAttributs[]; 8799 function shouldAutofix(node: Node, faultID: FaultID): boolean; 8800 function fixLiteralAsPropertyName(node: Node): Autofix[] | undefined; 8801 function fixPropertyAccessByIndex(node: Node): Autofix[] | undefined; 8802 function fixFunctionExpression(funcExpr: FunctionExpression, params?: NodeArray<ParameterDeclaration>, retType?: TypeNode | undefined): Autofix; 8803 function fixReturnType(funcLikeDecl: FunctionLikeDeclaration, typeNode: TypeNode): Autofix; 8804 function fixCtorParameterProperties(ctorDecl: ConstructorDeclaration, paramTypes: TypeNode[]): Autofix[] | undefined; 8805 const AUTOFIX_ALL: AutofixInfo; 8806 const autofixInfo: AutofixInfo[]; 8807 interface Autofix { 8808 replacementText: string; 8809 start: number; 8810 end: number; 8811 } 8812 class LinterConfig { 8813 static nodeDesc: string[]; 8814 static tsSyntaxKindNames: string[]; 8815 static initStatic(): void; 8816 static terminalTokens: Set<SyntaxKind>; 8817 static incrementOnlyTokens: ESMap<SyntaxKind, FaultID>; 8818 } 8819 interface ProblemInfo { 8820 line: number; 8821 column: number; 8822 start: number; 8823 end: number; 8824 type: string; 8825 severity: number; 8826 problem: string; 8827 suggest: string; 8828 rule: string; 8829 ruleTag: number; 8830 autofixable: boolean; 8831 autofix?: Autofix[]; 8832 } 8833 class TypeScriptLinter { 8834 private sourceFile; 8835 private tscStrictDiagnostics?; 8836 static ideMode: boolean; 8837 static strictMode: boolean; 8838 static logTscErrors: boolean; 8839 static warningsAsErrors: boolean; 8840 static lintEtsOnly: boolean; 8841 static totalVisitedNodes: number; 8842 static nodeCounters: number[]; 8843 static lineCounters: number[]; 8844 static totalErrorLines: number; 8845 static errorLineNumbersString: string; 8846 static totalWarningLines: number; 8847 static warningLineNumbersString: string; 8848 static reportDiagnostics: boolean; 8849 static problemsInfos: ProblemInfo[]; 8850 static filteredDiagnosticMessages: DiagnosticMessageChain[]; 8851 static initGlobals(): void; 8852 static initStatic(): void; 8853 static tsTypeChecker: TypeChecker; 8854 currentErrorLine: number; 8855 currentWarningLine: number; 8856 staticBlocks: Set<string>; 8857 libraryTypeCallDiagnosticChecker: LibraryTypeCallDiagnosticChecker; 8858 skipArkTSStaticBlocksCheck: boolean; 8859 constructor(sourceFile: SourceFile, tsProgram: Program, tscStrictDiagnostics?: ts.Map<ts.Diagnostic[]> | undefined); 8860 static clearTsTypeChecker(): void; 8861 static clearQualifiedNameCache(): void; 8862 readonly handlersMap: ts.ESMap<SyntaxKind, (node: Node) => void>; 8863 incrementCounters(node: Node | CommentRange, faultId: number, autofixable?: boolean, autofix?: Autofix[]): void; 8864 visitTSNode(node: Node): void; 8865 private countInterfaceExtendsDifferentPropertyTypes; 8866 private countDeclarationsWithDuplicateName; 8867 private countClassMembersWithDuplicateName; 8868 private functionContainsThis; 8869 private isPrototypePropertyAccess; 8870 private interfaceInheritanceLint; 8871 private lintForInterfaceExtendsDifferentPorpertyTypes; 8872 private handleObjectLiteralExpression; 8873 private handleArrayLiteralExpression; 8874 private handleParameter; 8875 private handleEnumDeclaration; 8876 private handleInterfaceDeclaration; 8877 private handleThrowStatement; 8878 private handleForStatement; 8879 private handleForInStatement; 8880 private handleForOfStatement; 8881 private handleImportDeclaration; 8882 private handlePropertyAccessExpression; 8883 private handlePropertyAssignmentOrDeclaration; 8884 private filterOutDecoratorsDiagnostics; 8885 private checkInRange; 8886 private filterStrictDiagnostics; 8887 private handleFunctionExpression; 8888 private handleArrowFunction; 8889 private handleClassExpression; 8890 private handleFunctionDeclaration; 8891 private handleMissingReturnType; 8892 private hasLimitedTypeInferenceFromReturnExpr; 8893 private handlePrefixUnaryExpression; 8894 private handleBinaryExpression; 8895 private handleVariableDeclarationList; 8896 private handleVariableDeclaration; 8897 private handleEsObjectDelaration; 8898 private handleEsObjectAssignment; 8899 private handleCatchClause; 8900 private handleClassDeclaration; 8901 private handleModuleDeclaration; 8902 private handleTypeAliasDeclaration; 8903 private handleImportClause; 8904 private handleImportSpecifier; 8905 private handleNamespaceImport; 8906 private handleTypeAssertionExpression; 8907 private handleMethodDeclaration; 8908 private handleIdentifier; 8909 private isAllowedClassValueContext; 8910 private handleRestrictedValues; 8911 private identiferUseInValueContext; 8912 private isEnumPropAccess; 8913 private handleElementAccessExpression; 8914 private handleEnumMember; 8915 private handleExportAssignment; 8916 private handleCallExpression; 8917 private handleImportCall; 8918 private handleRequireCall; 8919 private handleGenericCallWithNoTypeArgs; 8920 private static listApplyBindCallApis; 8921 private handleFunctionApplyBindPropCall; 8922 private handleStructIdentAndUndefinedInArgs; 8923 private static LimitedApis; 8924 private handleStdlibAPICall; 8925 private findNonFilteringRangesFunctionCalls; 8926 private handleLibraryTypeCall; 8927 private handleNewExpression; 8928 private handleAsExpression; 8929 private handleTypeReference; 8930 private handleMetaProperty; 8931 private handleStructDeclaration; 8932 private handleSpreadOp; 8933 private handleConstructSignature; 8934 private handleComments; 8935 private handleExpressionWithTypeArguments; 8936 private handleComputedPropertyName; 8937 private checkErrorSuppressingAnnotation; 8938 private handleDecorators; 8939 private handleGetAccessor; 8940 private handleSetAccessor; 8941 private handleDeclarationInferredType; 8942 private handleDefiniteAssignmentAssertion; 8943 private validatedTypesSet; 8944 private checkAnyOrUnknownChildNode; 8945 private handleInferredObjectreference; 8946 private validateDeclInferredType; 8947 private handleClassStaticBlockDeclaration; 8948 lint(): void; 8949 } 8950 class TSCCompiledProgram { 8951 private diagnosticsExtractor; 8952 constructor(program: BuilderProgram); 8953 getProgram(): Program; 8954 getBuilderProgram(): BuilderProgram; 8955 getStrictDiagnostics(fileName: string): Diagnostic[]; 8956 doAllGetDiagnostics(): void; 8957 } 8958 function translateDiag(srcFile: SourceFile, problemInfo: ProblemInfo): Diagnostic; 8959 function runArkTSLinter(tsBuilderProgram: BuilderProgram, srcFile?: SourceFile, buildInfoWriteFile?: WriteFileCallback, arkTSVersion?: string): Diagnostic[]; 8960 } 8961 namespace ArkTSLinter_1_1 { 8962 interface AutofixInfo { 8963 problemID: string; 8964 start: number; 8965 end: number; 8966 } 8967 interface CommandLineOptions { 8968 strictMode?: boolean; 8969 ideMode?: boolean; 8970 logTscErrors?: boolean; 8971 warningsAsErrors: boolean; 8972 parsedConfigFile?: ParsedCommandLine; 8973 inputFiles: string[]; 8974 autofixInfo?: AutofixInfo[]; 8975 } 8976 interface LintOptions { 8977 cmdOptions: CommandLineOptions; 8978 tsProgram?: Program; 8979 [key: string]: any; 8980 } 8981 enum ProblemSeverity { 8982 WARNING = 1, 8983 ERROR = 2 8984 } 8985 const cookBookMsg: string[]; 8986 const cookBookTag: string[]; 8987 interface DiagnosticChecker { 8988 checkDiagnosticMessage(msgText: string | DiagnosticMessageChain): boolean; 8989 } 8990 const TYPE_0_IS_NOT_ASSIGNABLE_TO_TYPE_1_ERROR_CODE = 2322; 8991 const TYPE_UNKNOWN_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 8992 const TYPE_NULL_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 8993 const TYPE_UNDEFINED_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 8994 const ARGUMENT_OF_TYPE_0_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_ERROR_CODE = 2345; 8995 const OBJECT_IS_POSSIBLY_UNDEFINED_ERROR_CODE = 2532; 8996 const ARGUMENT_OF_TYPE_NULL_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_RE: RegExp; 8997 const ARGUMENT_OF_TYPE_UNDEFINED_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_RE: RegExp; 8998 const NO_OVERLOAD_MATCHES_THIS_CALL_ERROR_CODE = 2769; 8999 const TYPE = "Type"; 9000 const IS_NOT_ASSIGNABLE_TO_TYPE = "is not assignable to type"; 9001 const ARGUMENT_OF_TYPE = "Argument of type"; 9002 const IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE = "is not assignable to parameter of type"; 9003 enum ErrorType { 9004 NO_ERROR = 0, 9005 UNKNOW = 1, 9006 NULL = 2, 9007 POSSIBLY_UNDEFINED = 3 9008 } 9009 class LibraryTypeCallDiagnosticChecker { 9010 private static _instance; 9011 static get instance(): LibraryTypeCallDiagnosticChecker; 9012 private _diagnosticErrorTypeMap; 9013 private constructor(); 9014 clear(): void; 9015 rebuildTscDiagnostics(tscStrictDiagnostics: ESMap<string, ts.Diagnostic[]>): void; 9016 filterDiagnostics(tscDiagnostics: readonly ts.Diagnostic[], expr: ts.CallExpression | ts.NewExpression, isLibCall: boolean, filterHandle: (diagnositc: ts.Diagnostic, errorType: ErrorType) => void): void; 9017 private getErrorType; 9018 private static isValidErrorType; 9019 private static isValidDiagnosticRange; 9020 } 9021 enum FaultID { 9022 AnyType = 0, 9023 SymbolType = 1, 9024 ObjectLiteralNoContextType = 2, 9025 ArrayLiteralNoContextType = 3, 9026 ComputedPropertyName = 4, 9027 LiteralAsPropertyName = 5, 9028 TypeQuery = 6, 9029 IsOperator = 7, 9030 DestructuringParameter = 8, 9031 YieldExpression = 9, 9032 InterfaceMerging = 10, 9033 EnumMerging = 11, 9034 InterfaceExtendsClass = 12, 9035 IndexMember = 13, 9036 WithStatement = 14, 9037 ThrowStatement = 15, 9038 IndexedAccessType = 16, 9039 UnknownType = 17, 9040 ForInStatement = 18, 9041 InOperator = 19, 9042 FunctionExpression = 20, 9043 IntersectionType = 21, 9044 ObjectTypeLiteral = 22, 9045 CommaOperator = 23, 9046 LimitedReturnTypeInference = 24, 9047 ClassExpression = 25, 9048 DestructuringAssignment = 26, 9049 DestructuringDeclaration = 27, 9050 VarDeclaration = 28, 9051 CatchWithUnsupportedType = 29, 9052 DeleteOperator = 30, 9053 DeclWithDuplicateName = 31, 9054 UnaryArithmNotNumber = 32, 9055 ConstructorType = 33, 9056 ConstructorIface = 34, 9057 ConstructorFuncs = 35, 9058 CallSignature = 36, 9059 TypeAssertion = 37, 9060 PrivateIdentifier = 38, 9061 LocalFunction = 39, 9062 ConditionalType = 40, 9063 MappedType = 41, 9064 NamespaceAsObject = 42, 9065 ClassAsObject = 43, 9066 NonDeclarationInNamespace = 44, 9067 GeneratorFunction = 45, 9068 FunctionContainsThis = 46, 9069 PropertyAccessByIndex = 47, 9070 JsxElement = 48, 9071 EnumMemberNonConstInit = 49, 9072 ImplementsClass = 50, 9073 MethodReassignment = 51, 9074 MultipleStaticBlocks = 52, 9075 ThisType = 53, 9076 IntefaceExtendDifProps = 54, 9077 StructuralIdentity = 55, 9078 ExportAssignment = 56, 9079 ImportAssignment = 57, 9080 GenericCallNoTypeArgs = 58, 9081 ParameterProperties = 59, 9082 InstanceofUnsupported = 60, 9083 ShorthandAmbientModuleDecl = 61, 9084 WildcardsInModuleName = 62, 9085 UMDModuleDefinition = 63, 9086 NewTarget = 64, 9087 DefiniteAssignment = 65, 9088 Prototype = 66, 9089 GlobalThis = 67, 9090 UtilityType = 68, 9091 PropertyDeclOnFunction = 69, 9092 FunctionApplyCall = 70, 9093 FunctionBind = 71, 9094 ConstAssertion = 72, 9095 ImportAssertion = 73, 9096 SpreadOperator = 74, 9097 LimitedStdLibApi = 75, 9098 ErrorSuppression = 76, 9099 StrictDiagnostic = 77, 9100 ImportAfterStatement = 78, 9101 EsObjectType = 79, 9102 SendableClassInheritance = 80, 9103 SendablePropType = 81, 9104 SendableDefiniteAssignment = 82, 9105 SendableGenericTypes = 83, 9106 SendableCapturedVars = 84, 9107 SendableClassDecorator = 85, 9108 SendableObjectInitialization = 86, 9109 SendableComputedPropName = 87, 9110 SendableAsExpr = 88, 9111 SharedNoSideEffectImport = 89, 9112 SharedModuleExports = 90, 9113 SharedModuleNoWildcardExport = 91, 9114 NoTsImportEts = 92, 9115 SendableTypeInheritance = 93, 9116 SendableTypeExported = 94, 9117 NoTsReExportEts = 95, 9118 NoNamespaceImportEtsToTs = 96, 9119 NoSideEffectImportEtsToTs = 97, 9120 SendableExplicitFieldType = 98, 9121 SendableFunctionImportedVariables = 99, 9122 SendableFunctionDecorator = 100, 9123 SendableTypeAliasDecorator = 101, 9124 SendableTypeAliasDeclaration = 102, 9125 SendableFunctionAssignment = 103, 9126 SendableFunctionOverloadDecorator = 104, 9127 SendableFunctionProperty = 105, 9128 SendableFunctionAsExpr = 106, 9129 SendableDecoratorLimited = 107, 9130 SharedModuleExportsWarning = 108, 9131 SendableBetaCompatible = 109, 9132 SendablePropTypeWarning = 110, 9133 TaskpoolFunctionArg = 111, 9134 ObjectLiteralAmbiguity = 112, 9135 LAST_ID = 113 9136 } 9137 class FaultAttributes { 9138 cookBookRef: number; 9139 migratable: boolean; 9140 severity: ProblemSeverity; 9141 constructor(cookBookRef: number, migratable?: boolean, severity?: ProblemSeverity); 9142 } 9143 const faultsAttrs: FaultAttributes[]; 9144 function setTypeChecker(tsTypeChecker: TypeChecker): void; 9145 function clearTypeChecker(): void; 9146 function setTestMode(tsTestMode: boolean): void; 9147 function setMixCompile(isMixCompile: boolean): void; 9148 function getStartPos(nodeOrComment: Node | CommentRange): number; 9149 function getEndPos(nodeOrComment: Node | CommentRange): number; 9150 function getHighlightRange(nodeOrComment: Node | CommentRange, faultId: number): [ 9151 number, 9152 number 9153 ]; 9154 function getVarDeclarationHighlightRange(nodeOrComment: Node | CommentRange): [ 9155 number, 9156 number 9157 ] | undefined; 9158 function getCatchWithUnsupportedTypeHighlightRange(nodeOrComment: Node | CommentRange): [ 9159 number, 9160 number 9161 ] | undefined; 9162 function getForInStatementHighlightRange(nodeOrComment: Node | CommentRange): [ 9163 number, 9164 number 9165 ] | undefined; 9166 function getWithStatementHighlightRange(nodeOrComment: Node | CommentRange): [ 9167 number, 9168 number 9169 ] | undefined; 9170 function getDeleteOperatorHighlightRange(nodeOrComment: Node | CommentRange): [ 9171 number, 9172 number 9173 ] | undefined; 9174 function getTypeQueryHighlightRange(nodeOrComment: Node | CommentRange): [ 9175 number, 9176 number 9177 ] | undefined; 9178 function getInstanceofUnsupportedHighlightRange(nodeOrComment: Node | CommentRange): [ 9179 number, 9180 number 9181 ] | undefined; 9182 function getConstAssertionHighlightRange(nodeOrComment: Node | CommentRange): [ 9183 number, 9184 number 9185 ] | undefined; 9186 function getLimitedReturnTypeInferenceHighlightRange(nodeOrComment: Node | CommentRange): [ 9187 number, 9188 number 9189 ] | undefined; 9190 function getLocalFunctionHighlightRange(nodeOrComment: Node | CommentRange): [ 9191 number, 9192 number 9193 ] | undefined; 9194 function getFunctionApplyCallHighlightRange(nodeOrComment: Node | CommentRange): [ 9195 number, 9196 number 9197 ] | undefined; 9198 function getDeclWithDuplicateNameHighlightRange(nodeOrComment: Node | CommentRange): [ 9199 number, 9200 number 9201 ] | undefined; 9202 function getObjectLiteralNoContextTypeHighlightRange(nodeOrComment: Node | CommentRange): [ 9203 number, 9204 number 9205 ] | undefined; 9206 function getClassExpressionHighlightRange(nodeOrComment: Node | CommentRange): [ 9207 number, 9208 number 9209 ] | undefined; 9210 function getMultipleStaticBlocksHighlightRange(nodeOrComment: Node | CommentRange): [ 9211 number, 9212 number 9213 ] | undefined; 9214 function getSendableDefiniteAssignmentHighlightRange(nodeOrComment: Node | CommentRange): [ 9215 number, 9216 number 9217 ] | undefined; 9218 function getKeywordHighlightRange(nodeOrComment: Node | CommentRange, keyword: string): [ 9219 number, 9220 number 9221 ]; 9222 function isAssignmentOperator(tsBinOp: BinaryOperatorToken): boolean; 9223 function isType(tsType: TypeNode | undefined, checkType: string): boolean; 9224 function entityNameToString(name: EntityName): string; 9225 function isNumberLikeType(tsType: Type): boolean; 9226 function isBooleanLikeType(tsType: Type): boolean; 9227 function isStringLikeType(tsType: Type): boolean; 9228 function isStringType(tsType: Type): boolean; 9229 function isPrimitiveEnumMemberType(type: Type, primitiveType: TypeFlags): boolean; 9230 function unwrapParenthesizedType(tsType: TypeNode): TypeNode; 9231 function findParentIf(asExpr: AsExpression): IfStatement | null; 9232 function isDestructuringAssignmentLHS(tsExpr: ArrayLiteralExpression | ObjectLiteralExpression): boolean; 9233 function isEnumType(tsType: Type): boolean; 9234 function isEnum(tsSymbol: Symbol): boolean; 9235 function isEnumMemberType(tsType: Type): boolean; 9236 function isObjectLiteralType(tsType: Type): boolean; 9237 function hasModifier(tsModifiers: readonly Modifier[] | undefined, tsModifierKind: number): boolean; 9238 function unwrapParenthesized(tsExpr: Expression): Expression; 9239 function followIfAliased(sym: Symbol): Symbol; 9240 function trueSymbolAtLocation(node: Node): Symbol | undefined; 9241 function clearTrueSymbolAtLocationCache(): void; 9242 function isTypeDeclSyntaxKind(kind: SyntaxKind): boolean; 9243 function symbolHasDuplicateName(symbol: Symbol, tsDeclKind: SyntaxKind): boolean; 9244 function isReferenceType(tsType: Type): boolean; 9245 function isPrimitiveType(type: Type): boolean; 9246 function isPrimitiveLiteralType(type: Type): boolean; 9247 function isPurePrimitiveLiteralType(type: Type): boolean; 9248 function isTypeSymbol(symbol: Symbol | undefined): boolean; 9249 function isGenericArrayType(tsType: Type): tsType is TypeReference; 9250 function isReadonlyArrayType(tsType: Type): boolean; 9251 function isConcatArrayType(tsType: Type): boolean; 9252 function isArrayLikeType(tsType: Type): boolean; 9253 function isTypedArray(tsType: Type, allowTypeArrays: string[]): boolean; 9254 function isArray(tsType: Type): boolean; 9255 function isCollectionArrayType(tsType: Type): boolean; 9256 function isIndexableArray(tsType: Type): boolean; 9257 function isTuple(tsType: Type): boolean; 9258 function isOrDerivedFrom(tsType: Type, checkType: CheckType, checkedBaseTypes?: Set<Type>): boolean; 9259 function isTypeReference(tsType: Type): tsType is TypeReference; 9260 function isNullType(tsTypeNode: TypeNode): boolean; 9261 function isThisOrSuperExpr(tsExpr: Expression): boolean; 9262 function isPrototypeSymbol(symbol: Symbol | undefined): boolean; 9263 function isFunctionSymbol(symbol: Symbol | undefined): boolean; 9264 function isInterfaceType(tsType: Type | undefined): boolean; 9265 function isAnyType(tsType: Type): tsType is TypeReference; 9266 function isUnknownType(tsType: Type): boolean; 9267 function isUnsupportedType(tsType: Type): boolean; 9268 function isUnsupportedUnionType(tsType: Type): boolean; 9269 function isFunctionOrMethod(tsSymbol: Symbol | undefined): boolean; 9270 function isMethodAssignment(tsSymbol: Symbol | undefined): boolean; 9271 function getDeclaration(tsSymbol: Symbol | undefined): Declaration | undefined; 9272 function isValidEnumMemberInit(tsExpr: Expression): boolean; 9273 function isCompileTimeExpression(tsExpr: Expression): boolean; 9274 function isConst(tsNode: Node): boolean; 9275 function isNumberConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression | NumericLiteral): boolean; 9276 function isIntegerConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression | NumericLiteral): boolean; 9277 function isStringConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression): boolean; 9278 function relatedByInheritanceOrIdentical(typeA: Type, typeB: Type): boolean; 9279 function reduceReference(t: Type): Type; 9280 function needToDeduceStructuralIdentity(lhsType: Type, rhsType: Type, rhsExpr: Expression, isStrict?: boolean): boolean; 9281 function needStrictMatchType(lhsType: Type, rhsType: Type): boolean; 9282 function hasPredecessor(node: Node, predicate: (node: Node) => boolean): boolean; 9283 function processParentTypes(parentTypes: NodeArray<ExpressionWithTypeArguments>, typeB: Type, processInterfaces: boolean): boolean; 9284 function isObject(tsType: Type): boolean; 9285 function logTscDiagnostic(diagnostics: readonly Diagnostic[], log: (message: any, ...args: any[]) => void): void; 9286 function encodeProblemInfo(problem: ProblemInfo): string; 9287 function decodeAutofixInfo(info: string): AutofixInfo; 9288 function isCallToFunctionWithOmittedReturnType(tsExpr: Expression): boolean; 9289 function validateObjectLiteralType(type: Type | undefined): boolean; 9290 function isStructDeclarationKind(kind: SyntaxKind): boolean; 9291 function isStructDeclaration(node: Node): boolean; 9292 function isStructObjectInitializer(objectLiteral: ObjectLiteralExpression): boolean; 9293 function hasMethods(type: Type): boolean; 9294 function checkTypeSet(typeSet: Type, predicate: CheckType): boolean; 9295 function getNonNullableType(t: Type): Type; 9296 function isObjectLiteralAssignable(lhsType: Type | undefined, rhsExpr: ObjectLiteralExpression): boolean; 9297 function isLiteralType(type: Type): boolean; 9298 function validateFields(objectType: Type, objectLiteral: ObjectLiteralExpression): boolean; 9299 function isSupportedType(typeNode: TypeNode): boolean; 9300 function isStruct(symbol: Symbol): boolean; 9301 function getParentSymbolName(symbol: Symbol): string | undefined; 9302 function isGlobalSymbol(symbol: Symbol): boolean; 9303 function isSymbolAPI(symbol: Symbol): boolean; 9304 function isStdSymbol(symbol: Symbol): boolean; 9305 function isSymbolIterator(symbol: Symbol): boolean; 9306 function isSymbolIteratorExpression(expr: Expression): boolean; 9307 function isDefaultImport(importSpec: ImportSpecifier): boolean; 9308 function hasAccessModifier(decl: Declaration): boolean; 9309 function getModifier(modifiers: readonly Modifier[] | undefined, modifierKind: SyntaxKind): Modifier | undefined; 9310 function getAccessModifier(modifiers: readonly Modifier[] | undefined): Modifier | undefined; 9311 function isStdRecordType(type: Type): boolean; 9312 function isStdMapType(type: Type): boolean; 9313 function isStdErrorType(type: Type): boolean; 9314 function isStdPartialType(type: Type): boolean; 9315 function isStdRequiredType(type: Type): boolean; 9316 function isStdReadonlyType(type: Type): boolean; 9317 function isLibraryType(type: Type): boolean; 9318 function hasLibraryType(node: Node): boolean; 9319 function isLibrarySymbol(sym: Symbol | undefined): boolean; 9320 function srcFilePathContainsDirectory(srcFile: SourceFile, dir: string): boolean; 9321 function pathContainsDirectory(targetPath: string, dir: string): boolean; 9322 function getScriptKind(srcFile: SourceFile): ScriptKind; 9323 function isStdLibraryType(type: Type): boolean; 9324 function isStdLibrarySymbol(sym: Symbol | undefined): boolean; 9325 function isIntrinsicObjectType(type: Type): boolean; 9326 function isOhModulesEtsSymbol(sym: Symbol | undefined): boolean; 9327 function isDynamicType(type: Type | undefined): boolean | undefined; 9328 function isObjectType(type: Type): type is ObjectType; 9329 function isAnonymous(type: Type): boolean; 9330 function isDynamicLiteralInitializer(expr: Expression): boolean; 9331 function isEsObjectType(typeNode: TypeNode | undefined): boolean; 9332 function isInsideBlock(node: Node): boolean; 9333 function isValueAssignableToESObject(node: Node): boolean; 9334 function getVariableDeclarationTypeNode(node: Node): TypeNode | undefined; 9335 function getSymbolDeclarationTypeNode(sym: Symbol): TypeNode | undefined; 9336 function hasEsObjectType(node: Node): boolean; 9337 function symbolHasEsObjectType(sym: Symbol): boolean; 9338 function isEsObjectSymbol(sym: Symbol): boolean; 9339 function isAnonymousType(type: Type): boolean; 9340 function getSymbolOfCallExpression(callExpr: CallExpression): Symbol | undefined; 9341 function typeIsRecursive(topType: Type, type?: Type | undefined): boolean; 9342 function getTypeOrTypeConstraintAtLocation(expr: Expression): Type; 9343 function isStdBigIntType(type: Type): boolean; 9344 function isStdNumberType(type: Type): boolean; 9345 function isStdBooleanType(type: Type): boolean; 9346 function isEnumStringLiteral(expr: Expression): boolean; 9347 function isValidComputedPropertyName(computedProperty: ComputedPropertyName, isRecordObjectInitializer?: boolean): boolean; 9348 function isAllowedIndexSignature(node: IndexSignatureDeclaration): boolean; 9349 function isArkTSCollectionsArrayLikeType(type: Type): boolean; 9350 function isArkTSCollectionsClassOrInterfaceDeclaration(decl: Node): boolean; 9351 function getDecoratorName(decorator: Decorator): string; 9352 function unwrapParenthesizedTypeNode(typeNode: TypeNode): TypeNode; 9353 function isSendableTypeNode(typeNode: TypeNode, isShared?: boolean): boolean; 9354 function isSendableType(type: Type): boolean; 9355 function isShareableType(tsType: Type): boolean; 9356 function isSendableClassOrInterface(type: Type): boolean; 9357 function typeContainsSendableClassOrInterface(type: Type): boolean; 9358 function typeContainsNonSendableClassOrInterface(type: Type): boolean; 9359 function isConstEnum(sym: Symbol | undefined): boolean; 9360 function isSendableUnionType(type: UnionType): boolean; 9361 function hasSendableDecorator(decl: ClassDeclaration | FunctionDeclaration | TypeAliasDeclaration): boolean; 9362 function getNonSendableDecorators(decl: ClassDeclaration | FunctionDeclaration | TypeAliasDeclaration): Decorator[] | undefined; 9363 function getSendableDecorator(decl: ClassDeclaration | FunctionDeclaration | TypeAliasDeclaration): Decorator | undefined; 9364 function getDecoratorsIfInSendableClass(declaration: HasDecorators): readonly Decorator[] | undefined; 9365 function isISendableInterface(type: Type): boolean; 9366 function isSharedModule(sourceFile: SourceFile): boolean; 9367 function getDeclarationNode(node: Node): Declaration | undefined; 9368 function isShareableEntity(node: Node): boolean; 9369 function isSendableClassOrInterfaceEntity(node: Node): boolean; 9370 function isInImportWhiteList(resolvedModule: ResolvedModuleFull): boolean; 9371 function hasSendableDecoratorFunctionOverload(decl: FunctionDeclaration): boolean; 9372 function isSendableFunction(type: Type): boolean; 9373 function isSendableTypeAlias(type: Type): boolean; 9374 function hasSendableTypeAlias(type: Type): boolean; 9375 function isNonSendableFunctionTypeAlias(type: Type): boolean; 9376 function isWrongSendableFunctionAssignment(lhsType: Type, rhsType: Type): boolean; 9377 function searchFileExportDecl(sourceFile: SourceFile, targetDecls?: SyntaxKind[]): Set<Node>; 9378 function clearUtilsGlobalvariables(): void; 9379 function isTaskPoolApi(exprSym: Symbol | undefined, node: Node): boolean; 9380 function isConcurrentFunction(type: Type): boolean; 9381 function hasConcurrentDecoratorFunctionOverload(decl: FunctionDeclaration): boolean; 9382 function hasUseConcurrentDirective(decl: FunctionDeclaration): boolean; 9383 function isDeclarationSymbol(sym: Symbol | undefined): boolean; 9384 function checkTaskpoolFunction(arg: Expression, argType: Type, argSym: Symbol | undefined): boolean; 9385 function getTypeAtLocationForLinter(node: Node): Type; 9386 const PROPERTY_HAS_NO_INITIALIZER_ERROR_CODE = 2564; 9387 const NON_INITIALIZABLE_PROPERTY_DECORATORS: string[]; 9388 const NON_INITIALIZABLE_PROPERTY_CLASS_DECORATORS: string[]; 9389 const LIMITED_STANDARD_UTILITY_TYPES: string[]; 9390 const ALLOWED_STD_SYMBOL_API: string[]; 9391 const ARKTS_IGNORE_DIRS: string[]; 9392 const ARKTS_IGNORE_FILES: string[]; 9393 const ARKTS_IGNORE_DIRS_OH_MODULES = "oh_modules"; 9394 const SENDABLE_DECORATOR = "Sendable"; 9395 const SENDABLE_INTERFACE = "ISendable"; 9396 const PROMISE = "Promise"; 9397 const SENDABLE_DECORATOR_NODES: SyntaxKind[]; 9398 const SENDABLE_CLOSURE_DECLS: SyntaxKind[]; 9399 const ARKTS_COLLECTIONS_D_ETS = "@arkts.collections.d.ets"; 9400 const COLLECTIONS_NAMESPACE = "collections"; 9401 const ARKTS_LANG_D_ETS = "@arkts.lang.d.ets"; 9402 const LANG_NAMESPACE = "lang"; 9403 const ISENDABLE_TYPE = "ISendable"; 9404 const USE_SHARED = "use shared"; 9405 const D_TS = ".d.ts"; 9406 const TASKPOOL = "taskpool"; 9407 const TASKGROUP = "TaskGroup"; 9408 const TASKPOOL_API: string[]; 9409 const TASK_LIST: string[]; 9410 const CONCURRENT_DECORATOR = "Concurrent"; 9411 const USE_CONCURRENT = "use concurrent"; 9412 type CheckType = ((t: Type) => boolean); 9413 const ES_OBJECT = "ESObject"; 9414 const LIMITED_STD_GLOBAL_FUNC: string[]; 9415 const LIMITED_STD_OBJECT_API: string[]; 9416 const LIMITED_STD_REFLECT_API: string[]; 9417 const LIMITED_STD_PROXYHANDLER_API: string[]; 9418 const FUNCTION_HAS_NO_RETURN_ERROR_CODE = 2366; 9419 const NON_RETURN_FUNCTION_DECORATORS: string[]; 9420 const STANDARD_LIBRARIES: string[]; 9421 const TYPED_ARRAYS: string[]; 9422 const TYPED_COLLECTIONS: string[]; 9423 function shouldAutofix(node: Node, faultID: FaultID): boolean; 9424 function fixLiteralAsPropertyName(node: Node): Autofix[] | undefined; 9425 function fixPropertyAccessByIndex(node: Node): Autofix[] | undefined; 9426 function fixFunctionExpression(funcExpr: FunctionExpression, params?: NodeArray<ParameterDeclaration>, retType?: TypeNode | undefined): Autofix; 9427 function fixReturnType(funcLikeDecl: FunctionLikeDeclaration, typeNode: TypeNode): Autofix; 9428 function fixCtorParameterProperties(ctorDecl: ConstructorDeclaration, paramTypes: TypeNode[]): Autofix[] | undefined; 9429 const AUTOFIX_ALL: AutofixInfo; 9430 const autofixInfo: AutofixInfo[]; 9431 interface Autofix { 9432 replacementText: string; 9433 start: number; 9434 end: number; 9435 } 9436 class LinterConfig { 9437 static nodeDesc: string[]; 9438 static tsSyntaxKindNames: string[]; 9439 static initStatic(): void; 9440 static terminalTokens: Set<SyntaxKind>; 9441 static incrementOnlyTokens: ESMap<SyntaxKind, FaultID>; 9442 } 9443 interface ProblemInfo { 9444 line: number; 9445 column: number; 9446 start: number; 9447 end: number; 9448 type: string; 9449 severity: number; 9450 problem: string; 9451 suggest: string; 9452 rule: string; 9453 ruleTag: number; 9454 autofixable: boolean; 9455 autofix?: Autofix[]; 9456 } 9457 class TypeScriptLinter { 9458 private sourceFile; 9459 private tscStrictDiagnostics?; 9460 static ideMode: boolean; 9461 static strictMode: boolean; 9462 static logTscErrors: boolean; 9463 static warningsAsErrors: boolean; 9464 static lintEtsOnly: boolean; 9465 static totalVisitedNodes: number; 9466 static nodeCounters: number[]; 9467 static lineCounters: number[]; 9468 static totalErrorLines: number; 9469 static errorLineNumbersString: string; 9470 static totalWarningLines: number; 9471 static warningLineNumbersString: string; 9472 static reportDiagnostics: boolean; 9473 static problemsInfos: ProblemInfo[]; 9474 static filteredDiagnosticMessages: DiagnosticMessageChain[]; 9475 static sharedModulesCache: ESMap<string, boolean>; 9476 static strictDiagnosticCache: Set<Diagnostic>; 9477 static unknowDiagnosticCache: Set<Diagnostic>; 9478 static initGlobals(): void; 9479 static initStatic(): void; 9480 static tsTypeChecker: TypeChecker; 9481 currentErrorLine: number; 9482 currentWarningLine: number; 9483 staticBlocks: Set<string>; 9484 skipArkTSStaticBlocksCheck: boolean; 9485 private fileExportDeclCaches?; 9486 private compatibleSdkVersionStage; 9487 private compatibleSdkVersion; 9488 private mixCompile; 9489 constructor(sourceFile: SourceFile, tsProgram: Program, tscStrictDiagnostics?: ts.Map<ts.Diagnostic[]> | undefined); 9490 static clearTsTypeChecker(): void; 9491 static clearQualifiedNameCache(): void; 9492 readonly handlersMap: ts.ESMap<ts.SyntaxKind, { 9493 handler: (node: Node) => void; 9494 name: string; 9495 }>; 9496 incrementCounters(node: Node | CommentRange, faultId: number, autofixable?: boolean, autofix?: Autofix[]): void; 9497 private forEachNodeInSubtree; 9498 private visitSourceFile; 9499 private countInterfaceExtendsDifferentPropertyTypes; 9500 private countDeclarationsWithDuplicateName; 9501 private countClassMembersWithDuplicateName; 9502 private static scopeContainsThis; 9503 private isPrototypePropertyAccess; 9504 private interfaceInheritanceLint; 9505 private lintForInterfaceExtendsDifferentPorpertyTypes; 9506 private handleObjectLiteralExpression; 9507 private handleUnionTypeObjectLiteral; 9508 private getSourceFileFromType; 9509 private handleArrayLiteralExpression; 9510 private handleParameter; 9511 private handleEnumDeclaration; 9512 private handleInterfaceDeclaration; 9513 private handleThrowStatement; 9514 private handleForStatement; 9515 private handleForInStatement; 9516 private handleForOfStatement; 9517 private handleImportDeclaration; 9518 private handleSharedModuleNoSideEffectImport; 9519 private static inSharedModule; 9520 private handlePropertyAccessExpression; 9521 private handleTaskpooApiForNewExpression; 9522 private handlePropertyDeclaration; 9523 private handleSendableClassProperty; 9524 private checkTypeAliasInSendableScope; 9525 private isNoneSendableTypeAlias; 9526 private handlePropertyAssignment; 9527 private handlePropertySignature; 9528 private handleSendableInterfaceProperty; 9529 private filterOutDecoratorsDiagnostics; 9530 private static isClassLikeOrIface; 9531 private handleFunctionExpression; 9532 private handleArrowFunction; 9533 private handleFunctionDeclaration; 9534 private handleMissingReturnType; 9535 private hasLimitedTypeInferenceFromReturnExpr; 9536 private checkReturnExpression; 9537 private isValidTypeForUnaryArithmeticOperator; 9538 private handlePrefixUnaryExpression; 9539 private handleBinaryExpression; 9540 private handleVariableDeclarationList; 9541 private handleVariableDeclaration; 9542 private handleEsObjectAssignment; 9543 private handleCatchClause; 9544 private handleClassDeclaration; 9545 private scanCapturedVarsInSendableScope; 9546 private checkLocalDecl; 9547 private checkLocalDeclWithSendableClosure; 9548 private checkIsTopClosure; 9549 private checkNamespaceImportVar; 9550 isFileExportDecl(decl: Declaration): boolean; 9551 private checkClassDeclarationHeritageClause; 9552 private isValidSendableClassExtends; 9553 private checkSendableTypeParameter; 9554 private processClassStaticBlocks; 9555 private handleModuleDeclaration; 9556 private handleTypeAliasDeclaration; 9557 private handleImportClause; 9558 private handleImportSpecifier; 9559 private handleNamespaceImport; 9560 private handleTypeAssertionExpression; 9561 private handleMethodDeclaration; 9562 private handleMethodSignature; 9563 private handleIdentifier; 9564 private isAllowedClassValueContext; 9565 private handleRestrictedValues; 9566 private identiferUseInValueContext; 9567 private isEnumPropAccess; 9568 private isElementAcessAllowed; 9569 private handleElementAccessExpression; 9570 private handleEnumMember; 9571 private handleExportAssignment; 9572 private handleCallExpression; 9573 private handleTaskpoolApiForCallExpression; 9574 private handleEtsComponentExpression; 9575 private handleImportCall; 9576 private handleRequireCall; 9577 private handleGenericCallWithNoTypeArgs; 9578 private static readonly listFunctionApplyCallApis; 9579 private static readonly listFunctionBindApis; 9580 private handleFunctionApplyBindPropCall; 9581 private handleStructIdentAndUndefinedInArgs; 9582 private static LimitedApis; 9583 private handleStdlibAPICall; 9584 private handleLibraryTypeCall; 9585 private handleNewExpression; 9586 private handleSendableGenericTypes; 9587 private handleAsExpression; 9588 isEsObjectPossiblyAllowed(typeRef: TypeReferenceNode): boolean; 9589 isObjectLiteralFromFunc(node: Node, isPromise?: boolean): boolean; 9590 private handleTypeReference; 9591 private checkSendableTypeArguments; 9592 private handleMetaProperty; 9593 private handleSpreadOp; 9594 private handleConstructSignature; 9595 private handleExpressionWithTypeArguments; 9596 private handleComputedPropertyName; 9597 private isSendableCompPropName; 9598 private handleGetAccessor; 9599 private handleSetAccessor; 9600 private handleDeclarationInferredType; 9601 private handleDefiniteAssignmentAssertion; 9602 private validatedTypesSet; 9603 private checkAnyOrUnknownChildNode; 9604 private handleInferredObjectreference; 9605 private validateDeclInferredType; 9606 private processNoCheckEntry; 9607 private reportThisKeywordsInScope; 9608 private handleCommentDirectives; 9609 private handleClassStaticBlockDeclaration; 9610 private handleIndexSignature; 9611 lint(): void; 9612 private handleExportKeyword; 9613 private handleExportDeclaration; 9614 private handleReturnStatement; 9615 /** 9616 * 'arkts-no-structural-typing' check was missing in some scenarios, 9617 * in order not to cause incompatibility, 9618 * only need to strictly match the type of filling the check again 9619 */ 9620 private checkAssignmentMatching; 9621 private handleDecorator; 9622 private isSendableDecoratorValid; 9623 } 9624 interface KitSymbol { 9625 source: string; 9626 bindings: string; 9627 } 9628 type KitSymbols = Record<string, KitSymbol>; 9629 interface KitInfo { 9630 symbols?: KitSymbols; 9631 } 9632 class InteropTypescriptLinter { 9633 private sourceFile; 9634 private isInSdk; 9635 static strictMode: boolean; 9636 static totalVisitedNodes: number; 9637 static nodeCounters: number[]; 9638 static lineCounters: number[]; 9639 static totalErrorLines: number; 9640 static errorLineNumbersString: string; 9641 static totalWarningLines: number; 9642 static warningLineNumbersString: string; 9643 static reportDiagnostics: boolean; 9644 static problemsInfos: ProblemInfo[]; 9645 static initGlobals(): void; 9646 static initStatic(): void; 9647 static tsTypeChecker: TypeChecker; 9648 static etsLoaderPath?: string; 9649 static kitInfos: Map<KitInfo>; 9650 private KIT; 9651 private D_TS; 9652 private D_ETS; 9653 private ETS; 9654 private SDK_PATH; 9655 currentErrorLine: number; 9656 currentWarningLine: number; 9657 constructor(sourceFile: SourceFile, tsProgram: Program, isInSdk: boolean); 9658 static clearTsTypeChecker(): void; 9659 readonly handlersMap: ts.ESMap<SyntaxKind, (node: Node) => void>; 9660 incrementCounters(node: Node | CommentRange, faultId: number, autofixable?: boolean, autofix?: Autofix[]): void; 9661 private forEachNodeInSubtree; 9662 private visitSourceFile; 9663 private handleImportDeclaration; 9664 private checkSendableClassorISendable; 9665 private checkKitImportClause; 9666 private checkImportClause; 9667 private allowInSdkImportSendable; 9668 private handleClassDeclaration; 9669 private checkClassOrInterfaceDeclarationHeritageClause; 9670 private handleInterfaceDeclaration; 9671 private handleNewExpression; 9672 private handleSendableGenericTypes; 9673 private handleObjectLiteralExpression; 9674 private handleArrayLiteralExpression; 9675 private handleAsExpression; 9676 private handleExportDeclaration; 9677 private handleExportAssignment; 9678 private initKitInfos; 9679 private getKitModuleFileNames; 9680 lint(): void; 9681 } 9682 class TSCCompiledProgram { 9683 private diagnosticsExtractor; 9684 constructor(program: BuilderProgram); 9685 getProgram(): Program; 9686 getBuilderProgram(): BuilderProgram; 9687 getStrictDiagnostics(sourceFile: SourceFile): Diagnostic[]; 9688 doAllGetDiagnostics(): void; 9689 } 9690 function translateDiag(srcFile: SourceFile, problemInfo: ProblemInfo): Diagnostic; 9691 function runArkTSLinter(tsBuilderProgram: BuilderProgram, srcFile?: SourceFile, buildInfoWriteFile?: WriteFileCallback, arkTSVersion?: string): Diagnostic[]; 9692 } 9693 enum TimePhase { 9694 START = "start", 9695 GET_PROGRAM = "getProgram(not ArkTSLinter)", 9696 UPDATE_ERROR_FILE = "updateErrorFile", 9697 INIT = "init", 9698 STRICT_PROGRAM_GET_SEMANTIC_DIAGNOSTICS = "strictProgramGetSemanticDiagnostics", 9699 NON_STRICT_PROGRAM_GET_SEMANTIC_DIAGNOSTICS = "nonStrictProgramGetSemanticDiagnostics", 9700 NON_STRICT_PROGRAM_GET_SYNTACTIC_DIAGNOSTICS = "nonStrictProgramGetSyntacticDiagnostics", 9701 GET_TSC_DIAGNOSTICS = "getTscDiagnostics", 9702 EMIT_BUILD_INFO = "emitBuildInfo", 9703 LINT = "lint" 9704 } 9705 class ArkTSLinterTimePrinter { 9706 private static instance?; 9707 private arkTSTimePrintSwitch; 9708 private timeMap; 9709 private constructor(); 9710 static getInstance(): ArkTSLinterTimePrinter; 9711 static destroyInstance(): void; 9712 setArkTSTimePrintSwitch(arkTSTimePrintSwitch: boolean): void; 9713 appendTime(key: string): void; 9714 private formatMapAsTable; 9715 printTimes(): void; 9716 } 9717} 9718export = ts;