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<[K, V]>; 50 forEach(action: (value: V, key: K) => void): void; 51 } 52 /** 53 * ES6 Map interface, only read methods included. 54 */ 55 interface ReadonlyMap<T> extends ReadonlyESMap<string, T> { 56 } 57 /** ES6 Map interface. */ 58 interface ESMap<K, V> extends ReadonlyESMap<K, V>, Collection<K> { 59 set(key: K, value: V): this; 60 } 61 /** 62 * ES6 Map interface. 63 */ 64 interface Map<T> extends ESMap<string, T> { 65 } 66 /** ES6 Set interface, only read methods included. */ 67 interface ReadonlySet<T> extends ReadonlyCollection<T> { 68 has(value: T): boolean; 69 values(): Iterator<T>; 70 entries(): Iterator<[T, T]>; 71 forEach(action: (value: T, key: T) => void): void; 72 } 73 /** ES6 Set interface. */ 74 interface Set<T> extends ReadonlySet<T>, Collection<T> { 75 add(value: T): this; 76 delete(value: T): boolean; 77 } 78 /** ES6 Iterator type. */ 79 interface Iterator<T> { 80 next(): { 81 value: T; 82 done?: false; 83 } | { 84 value: void; 85 done: true; 86 }; 87 } 88 /** Array that is only intended to be pushed to, never read. */ 89 interface Push<T> { 90 push(...values: T[]): void; 91 } 92} 93declare namespace ts { 94 export type Path = string & { 95 __pathBrand: any; 96 }; 97 export interface TextRange { 98 pos: number; 99 end: number; 100 } 101 export interface ReadonlyTextRange { 102 readonly pos: number; 103 readonly end: number; 104 } 105 export enum SyntaxKind { 106 Unknown = 0, 107 EndOfFileToken = 1, 108 SingleLineCommentTrivia = 2, 109 MultiLineCommentTrivia = 3, 110 NewLineTrivia = 4, 111 WhitespaceTrivia = 5, 112 ShebangTrivia = 6, 113 ConflictMarkerTrivia = 7, 114 NumericLiteral = 8, 115 BigIntLiteral = 9, 116 StringLiteral = 10, 117 JsxText = 11, 118 JsxTextAllWhiteSpaces = 12, 119 RegularExpressionLiteral = 13, 120 NoSubstitutionTemplateLiteral = 14, 121 TemplateHead = 15, 122 TemplateMiddle = 16, 123 TemplateTail = 17, 124 OpenBraceToken = 18, 125 CloseBraceToken = 19, 126 OpenParenToken = 20, 127 CloseParenToken = 21, 128 OpenBracketToken = 22, 129 CloseBracketToken = 23, 130 DotToken = 24, 131 DotDotDotToken = 25, 132 SemicolonToken = 26, 133 CommaToken = 27, 134 QuestionDotToken = 28, 135 LessThanToken = 29, 136 LessThanSlashToken = 30, 137 GreaterThanToken = 31, 138 LessThanEqualsToken = 32, 139 GreaterThanEqualsToken = 33, 140 EqualsEqualsToken = 34, 141 ExclamationEqualsToken = 35, 142 EqualsEqualsEqualsToken = 36, 143 ExclamationEqualsEqualsToken = 37, 144 EqualsGreaterThanToken = 38, 145 PlusToken = 39, 146 MinusToken = 40, 147 AsteriskToken = 41, 148 AsteriskAsteriskToken = 42, 149 SlashToken = 43, 150 PercentToken = 44, 151 PlusPlusToken = 45, 152 MinusMinusToken = 46, 153 LessThanLessThanToken = 47, 154 GreaterThanGreaterThanToken = 48, 155 GreaterThanGreaterThanGreaterThanToken = 49, 156 AmpersandToken = 50, 157 BarToken = 51, 158 CaretToken = 52, 159 ExclamationToken = 53, 160 TildeToken = 54, 161 AmpersandAmpersandToken = 55, 162 BarBarToken = 56, 163 QuestionToken = 57, 164 ColonToken = 58, 165 AtToken = 59, 166 QuestionQuestionToken = 60, 167 /** Only the JSDoc scanner produces BacktickToken. The normal scanner produces NoSubstitutionTemplateLiteral and related kinds. */ 168 BacktickToken = 61, 169 /** Only the JSDoc scanner produces HashToken. The normal scanner produces PrivateIdentifier. */ 170 HashToken = 62, 171 EqualsToken = 63, 172 PlusEqualsToken = 64, 173 MinusEqualsToken = 65, 174 AsteriskEqualsToken = 66, 175 AsteriskAsteriskEqualsToken = 67, 176 SlashEqualsToken = 68, 177 PercentEqualsToken = 69, 178 LessThanLessThanEqualsToken = 70, 179 GreaterThanGreaterThanEqualsToken = 71, 180 GreaterThanGreaterThanGreaterThanEqualsToken = 72, 181 AmpersandEqualsToken = 73, 182 BarEqualsToken = 74, 183 BarBarEqualsToken = 75, 184 AmpersandAmpersandEqualsToken = 76, 185 QuestionQuestionEqualsToken = 77, 186 CaretEqualsToken = 78, 187 Identifier = 79, 188 PrivateIdentifier = 80, 189 BreakKeyword = 81, 190 CaseKeyword = 82, 191 CatchKeyword = 83, 192 ClassKeyword = 84, 193 StructKeyword = 85, 194 ConstKeyword = 86, 195 ContinueKeyword = 87, 196 DebuggerKeyword = 88, 197 DefaultKeyword = 89, 198 DeleteKeyword = 90, 199 DoKeyword = 91, 200 ElseKeyword = 92, 201 EnumKeyword = 93, 202 ExportKeyword = 94, 203 ExtendsKeyword = 95, 204 FalseKeyword = 96, 205 FinallyKeyword = 97, 206 ForKeyword = 98, 207 FunctionKeyword = 99, 208 IfKeyword = 100, 209 ImportKeyword = 101, 210 InKeyword = 102, 211 InstanceOfKeyword = 103, 212 NewKeyword = 104, 213 NullKeyword = 105, 214 ReturnKeyword = 106, 215 SuperKeyword = 107, 216 SwitchKeyword = 108, 217 ThisKeyword = 109, 218 ThrowKeyword = 110, 219 TrueKeyword = 111, 220 TryKeyword = 112, 221 TypeOfKeyword = 113, 222 VarKeyword = 114, 223 VoidKeyword = 115, 224 WhileKeyword = 116, 225 WithKeyword = 117, 226 ImplementsKeyword = 118, 227 InterfaceKeyword = 119, 228 LetKeyword = 120, 229 PackageKeyword = 121, 230 PrivateKeyword = 122, 231 ProtectedKeyword = 123, 232 PublicKeyword = 124, 233 StaticKeyword = 125, 234 YieldKeyword = 126, 235 AbstractKeyword = 127, 236 AccessorKeyword = 128, 237 AsKeyword = 129, 238 AssertsKeyword = 130, 239 AssertKeyword = 131, 240 AnyKeyword = 132, 241 AsyncKeyword = 133, 242 AwaitKeyword = 134, 243 BooleanKeyword = 135, 244 ConstructorKeyword = 136, 245 DeclareKeyword = 137, 246 GetKeyword = 138, 247 InferKeyword = 139, 248 IntrinsicKeyword = 140, 249 IsKeyword = 141, 250 KeyOfKeyword = 142, 251 ModuleKeyword = 143, 252 NamespaceKeyword = 144, 253 NeverKeyword = 145, 254 OutKeyword = 146, 255 ReadonlyKeyword = 147, 256 RequireKeyword = 148, 257 NumberKeyword = 149, 258 ObjectKeyword = 150, 259 SatisfiesKeyword = 151, 260 SetKeyword = 152, 261 StringKeyword = 153, 262 SymbolKeyword = 154, 263 TypeKeyword = 155, 264 LazyKeyword = 156, 265 UndefinedKeyword = 157, 266 UniqueKeyword = 158, 267 UnknownKeyword = 159, 268 FromKeyword = 160, 269 GlobalKeyword = 161, 270 BigIntKeyword = 162, 271 OverrideKeyword = 163, 272 OfKeyword = 164, 273 QualifiedName = 165, 274 ComputedPropertyName = 166, 275 TypeParameter = 167, 276 Parameter = 168, 277 Decorator = 169, 278 PropertySignature = 170, 279 PropertyDeclaration = 171, 280 AnnotationPropertyDeclaration = 172, 281 MethodSignature = 173, 282 MethodDeclaration = 174, 283 ClassStaticBlockDeclaration = 175, 284 Constructor = 176, 285 GetAccessor = 177, 286 SetAccessor = 178, 287 CallSignature = 179, 288 ConstructSignature = 180, 289 IndexSignature = 181, 290 TypePredicate = 182, 291 TypeReference = 183, 292 FunctionType = 184, 293 ConstructorType = 185, 294 TypeQuery = 186, 295 TypeLiteral = 187, 296 ArrayType = 188, 297 TupleType = 189, 298 OptionalType = 190, 299 RestType = 191, 300 UnionType = 192, 301 IntersectionType = 193, 302 ConditionalType = 194, 303 InferType = 195, 304 ParenthesizedType = 196, 305 ThisType = 197, 306 TypeOperator = 198, 307 IndexedAccessType = 199, 308 MappedType = 200, 309 LiteralType = 201, 310 NamedTupleMember = 202, 311 TemplateLiteralType = 203, 312 TemplateLiteralTypeSpan = 204, 313 ImportType = 205, 314 ObjectBindingPattern = 206, 315 ArrayBindingPattern = 207, 316 BindingElement = 208, 317 ArrayLiteralExpression = 209, 318 ObjectLiteralExpression = 210, 319 PropertyAccessExpression = 211, 320 ElementAccessExpression = 212, 321 CallExpression = 213, 322 NewExpression = 214, 323 TaggedTemplateExpression = 215, 324 TypeAssertionExpression = 216, 325 ParenthesizedExpression = 217, 326 FunctionExpression = 218, 327 ArrowFunction = 219, 328 EtsComponentExpression = 220, 329 DeleteExpression = 221, 330 TypeOfExpression = 222, 331 VoidExpression = 223, 332 AwaitExpression = 224, 333 PrefixUnaryExpression = 225, 334 PostfixUnaryExpression = 226, 335 BinaryExpression = 227, 336 ConditionalExpression = 228, 337 TemplateExpression = 229, 338 YieldExpression = 230, 339 SpreadElement = 231, 340 ClassExpression = 232, 341 OmittedExpression = 233, 342 ExpressionWithTypeArguments = 234, 343 AsExpression = 235, 344 NonNullExpression = 236, 345 MetaProperty = 237, 346 SyntheticExpression = 238, 347 SatisfiesExpression = 239, 348 TemplateSpan = 240, 349 SemicolonClassElement = 241, 350 Block = 242, 351 EmptyStatement = 243, 352 VariableStatement = 244, 353 ExpressionStatement = 245, 354 IfStatement = 246, 355 DoStatement = 247, 356 WhileStatement = 248, 357 ForStatement = 249, 358 ForInStatement = 250, 359 ForOfStatement = 251, 360 ContinueStatement = 252, 361 BreakStatement = 253, 362 ReturnStatement = 254, 363 WithStatement = 255, 364 SwitchStatement = 256, 365 LabeledStatement = 257, 366 ThrowStatement = 258, 367 TryStatement = 259, 368 DebuggerStatement = 260, 369 VariableDeclaration = 261, 370 VariableDeclarationList = 262, 371 FunctionDeclaration = 263, 372 ClassDeclaration = 264, 373 StructDeclaration = 265, 374 AnnotationDeclaration = 266, 375 InterfaceDeclaration = 267, 376 TypeAliasDeclaration = 268, 377 EnumDeclaration = 269, 378 ModuleDeclaration = 270, 379 ModuleBlock = 271, 380 CaseBlock = 272, 381 NamespaceExportDeclaration = 273, 382 ImportEqualsDeclaration = 274, 383 ImportDeclaration = 275, 384 ImportClause = 276, 385 NamespaceImport = 277, 386 NamedImports = 278, 387 ImportSpecifier = 279, 388 ExportAssignment = 280, 389 ExportDeclaration = 281, 390 NamedExports = 282, 391 NamespaceExport = 283, 392 ExportSpecifier = 284, 393 MissingDeclaration = 285, 394 ExternalModuleReference = 286, 395 JsxElement = 287, 396 JsxSelfClosingElement = 288, 397 JsxOpeningElement = 289, 398 JsxClosingElement = 290, 399 JsxFragment = 291, 400 JsxOpeningFragment = 292, 401 JsxClosingFragment = 293, 402 JsxAttribute = 294, 403 JsxAttributes = 295, 404 JsxSpreadAttribute = 296, 405 JsxExpression = 297, 406 CaseClause = 298, 407 DefaultClause = 299, 408 HeritageClause = 300, 409 CatchClause = 301, 410 AssertClause = 302, 411 AssertEntry = 303, 412 ImportTypeAssertionContainer = 304, 413 PropertyAssignment = 305, 414 ShorthandPropertyAssignment = 306, 415 SpreadAssignment = 307, 416 EnumMember = 308, 417 UnparsedPrologue = 309, 418 UnparsedPrepend = 310, 419 UnparsedText = 311, 420 UnparsedInternalText = 312, 421 UnparsedSyntheticReference = 313, 422 SourceFile = 314, 423 Bundle = 315, 424 UnparsedSource = 316, 425 InputFiles = 317, 426 JSDocTypeExpression = 318, 427 JSDocNameReference = 319, 428 JSDocMemberName = 320, 429 JSDocAllType = 321, 430 JSDocUnknownType = 322, 431 JSDocNullableType = 323, 432 JSDocNonNullableType = 324, 433 JSDocOptionalType = 325, 434 JSDocFunctionType = 326, 435 JSDocVariadicType = 327, 436 JSDocNamepathType = 328, 437 JSDoc = 329, 438 /** @deprecated Use SyntaxKind.JSDoc */ 439 JSDocComment = 329, 440 JSDocText = 330, 441 JSDocTypeLiteral = 331, 442 JSDocSignature = 332, 443 JSDocLink = 333, 444 JSDocLinkCode = 334, 445 JSDocLinkPlain = 335, 446 JSDocTag = 336, 447 JSDocAugmentsTag = 337, 448 JSDocImplementsTag = 338, 449 JSDocAuthorTag = 339, 450 JSDocDeprecatedTag = 340, 451 JSDocClassTag = 341, 452 JSDocPublicTag = 342, 453 JSDocPrivateTag = 343, 454 JSDocProtectedTag = 344, 455 JSDocReadonlyTag = 345, 456 JSDocOverrideTag = 346, 457 JSDocCallbackTag = 347, 458 JSDocEnumTag = 348, 459 JSDocParameterTag = 349, 460 JSDocReturnTag = 350, 461 JSDocThisTag = 351, 462 JSDocTypeTag = 352, 463 JSDocTemplateTag = 353, 464 JSDocTypedefTag = 354, 465 JSDocSeeTag = 355, 466 JSDocPropertyTag = 356, 467 SyntaxList = 357, 468 NotEmittedStatement = 358, 469 PartiallyEmittedExpression = 359, 470 CommaListExpression = 360, 471 MergeDeclarationMarker = 361, 472 EndOfDeclarationMarker = 362, 473 SyntheticReferenceExpression = 363, 474 Count = 364, 475 FirstAssignment = 63, 476 LastAssignment = 78, 477 FirstCompoundAssignment = 64, 478 LastCompoundAssignment = 78, 479 FirstReservedWord = 81, 480 LastReservedWord = 117, 481 FirstKeyword = 81, 482 LastKeyword = 164, 483 FirstFutureReservedWord = 118, 484 LastFutureReservedWord = 126, 485 FirstTypeNode = 182, 486 LastTypeNode = 205, 487 FirstPunctuation = 18, 488 LastPunctuation = 78, 489 FirstToken = 0, 490 LastToken = 164, 491 FirstTriviaToken = 2, 492 LastTriviaToken = 7, 493 FirstLiteralToken = 8, 494 LastLiteralToken = 14, 495 FirstTemplateToken = 14, 496 LastTemplateToken = 17, 497 FirstBinaryOperator = 29, 498 LastBinaryOperator = 78, 499 FirstStatement = 244, 500 LastStatement = 260, 501 FirstNode = 165, 502 FirstJSDocNode = 318, 503 LastJSDocNode = 356, 504 FirstJSDocTagNode = 336, 505 LastJSDocTagNode = 356, 506 } 507 export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia; 508 export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; 509 export type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail; 510 export type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.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; 511 export 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; 512 export 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; 513 export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword; 514 export type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind; 515 export type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken; 516 export type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.Unknown | KeywordSyntaxKind; 517 export enum NodeFlags { 518 None = 0, 519 Let = 1, 520 Const = 2, 521 NestedNamespace = 4, 522 Synthesized = 8, 523 Namespace = 16, 524 OptionalChain = 32, 525 ExportContext = 64, 526 ContainsThis = 128, 527 HasImplicitReturn = 256, 528 HasExplicitReturn = 512, 529 GlobalAugmentation = 1024, 530 HasAsyncFunctions = 2048, 531 DisallowInContext = 4096, 532 YieldContext = 8192, 533 DecoratorContext = 16384, 534 AwaitContext = 32768, 535 DisallowConditionalTypesContext = 65536, 536 ThisNodeHasError = 131072, 537 JavaScriptFile = 262144, 538 ThisNodeOrAnySubNodesHasError = 524288, 539 HasAggregatedChildData = 1048576, 540 JSDoc = 8388608, 541 JsonFile = 67108864, 542 EtsContext = 1073741824, 543 BlockScoped = 3, 544 ReachabilityCheckFlags = 768, 545 ReachabilityAndEmitFlags = 2816, 546 ContextFlags = 1124462592, 547 TypeExcludesFlags = 40960, 548 } 549 export enum EtsFlags { 550 None = 0, 551 StructContext = 2, 552 EtsExtendComponentsContext = 4, 553 EtsStylesComponentsContext = 8, 554 EtsBuildContext = 16, 555 EtsBuilderContext = 32, 556 EtsStateStylesContext = 64, 557 EtsComponentsContext = 128, 558 EtsNewExpressionContext = 256, 559 UICallbackContext = 512, 560 SyntaxComponentContext = 1024 561 } 562 export enum ModifierFlags { 563 None = 0, 564 Export = 1, 565 Ambient = 2, 566 Public = 4, 567 Private = 8, 568 Protected = 16, 569 Static = 32, 570 Readonly = 64, 571 Accessor = 128, 572 Abstract = 256, 573 Async = 512, 574 Default = 1024, 575 Const = 2048, 576 HasComputedJSDocModifiers = 4096, 577 Deprecated = 8192, 578 Override = 16384, 579 In = 32768, 580 Out = 65536, 581 Decorator = 131072, 582 HasComputedFlags = 536870912, 583 AccessibilityModifier = 28, 584 ParameterPropertyModifier = 16476, 585 NonPublicAccessibilityModifier = 24, 586 TypeScriptModifier = 117086, 587 ExportDefault = 1025, 588 All = 258047, 589 Modifier = 126975 590 } 591 export enum JsxFlags { 592 None = 0, 593 /** An element from a named property of the JSX.IntrinsicElements interface */ 594 IntrinsicNamedElement = 1, 595 /** An element inferred from the string index signature of the JSX.IntrinsicElements interface */ 596 IntrinsicIndexedElement = 2, 597 IntrinsicElement = 3 598 } 599 export interface Node extends ReadonlyTextRange { 600 readonly kind: SyntaxKind; 601 readonly flags: NodeFlags; 602 readonly parent: Node; 603 symbol: Symbol; 604 locals?: SymbolTable; 605 skipCheck?: boolean; 606 } 607 export interface JSDocContainer { 608 } 609 export 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; 610 export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | AnnotationPropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType; 611 export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement; 612 export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute; 613 export type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | AnnotationPropertyDeclaration | PropertyAssignment | EnumMember; 614 export type HasDecorators = ParameterDeclaration | PropertyDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ClassExpression | ClassDeclaration | StructDeclaration | FunctionDeclaration; 615 export type HasIllegalDecorators = PropertyAssignment | ShorthandPropertyAssignment | FunctionDeclaration | ConstructorDeclaration | IndexSignatureDeclaration | ClassStaticBlockDeclaration | MissingDeclaration | VariableStatement | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportDeclaration | ExportAssignment; 616 export 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; 617 export interface NodeArray<T extends Node> extends ReadonlyArray<T>, ReadonlyTextRange { 618 readonly hasTrailingComma: boolean; 619 } 620 export interface Token<TKind extends SyntaxKind> extends Node { 621 readonly kind: TKind; 622 } 623 export type EndOfFileToken = Token<SyntaxKind.EndOfFileToken> & JSDocContainer; 624 export interface PunctuationToken<TKind extends PunctuationSyntaxKind> extends Token<TKind> { 625 } 626 export type DotToken = PunctuationToken<SyntaxKind.DotToken>; 627 export type DotDotDotToken = PunctuationToken<SyntaxKind.DotDotDotToken>; 628 export type QuestionToken = PunctuationToken<SyntaxKind.QuestionToken>; 629 export type ExclamationToken = PunctuationToken<SyntaxKind.ExclamationToken>; 630 export type ColonToken = PunctuationToken<SyntaxKind.ColonToken>; 631 export type EqualsToken = PunctuationToken<SyntaxKind.EqualsToken>; 632 export type AsteriskToken = PunctuationToken<SyntaxKind.AsteriskToken>; 633 export type EqualsGreaterThanToken = PunctuationToken<SyntaxKind.EqualsGreaterThanToken>; 634 export type PlusToken = PunctuationToken<SyntaxKind.PlusToken>; 635 export type MinusToken = PunctuationToken<SyntaxKind.MinusToken>; 636 export type QuestionDotToken = PunctuationToken<SyntaxKind.QuestionDotToken>; 637 export interface KeywordToken<TKind extends KeywordSyntaxKind> extends Token<TKind> { 638 } 639 export type AssertsKeyword = KeywordToken<SyntaxKind.AssertsKeyword>; 640 export type AssertKeyword = KeywordToken<SyntaxKind.AssertKeyword>; 641 export type AwaitKeyword = KeywordToken<SyntaxKind.AwaitKeyword>; 642 /** @deprecated Use `AwaitKeyword` instead. */ 643 export type AwaitKeywordToken = AwaitKeyword; 644 /** @deprecated Use `AssertsKeyword` instead. */ 645 export type AssertsToken = AssertsKeyword; 646 export interface ModifierToken<TKind extends ModifierSyntaxKind> extends KeywordToken<TKind> { 647 } 648 export type AbstractKeyword = ModifierToken<SyntaxKind.AbstractKeyword>; 649 export type AccessorKeyword = ModifierToken<SyntaxKind.AccessorKeyword>; 650 export type AsyncKeyword = ModifierToken<SyntaxKind.AsyncKeyword>; 651 export type ConstKeyword = ModifierToken<SyntaxKind.ConstKeyword>; 652 export type DeclareKeyword = ModifierToken<SyntaxKind.DeclareKeyword>; 653 export type DefaultKeyword = ModifierToken<SyntaxKind.DefaultKeyword>; 654 export type ExportKeyword = ModifierToken<SyntaxKind.ExportKeyword>; 655 export type InKeyword = ModifierToken<SyntaxKind.InKeyword>; 656 export type PrivateKeyword = ModifierToken<SyntaxKind.PrivateKeyword>; 657 export type ProtectedKeyword = ModifierToken<SyntaxKind.ProtectedKeyword>; 658 export type PublicKeyword = ModifierToken<SyntaxKind.PublicKeyword>; 659 export type ReadonlyKeyword = ModifierToken<SyntaxKind.ReadonlyKeyword>; 660 export type OutKeyword = ModifierToken<SyntaxKind.OutKeyword>; 661 export type OverrideKeyword = ModifierToken<SyntaxKind.OverrideKeyword>; 662 export type StaticKeyword = ModifierToken<SyntaxKind.StaticKeyword>; 663 /** @deprecated Use `ReadonlyKeyword` instead. */ 664 export type ReadonlyToken = ReadonlyKeyword; 665 export type Modifier = AbstractKeyword | AccessorKeyword | AsyncKeyword | ConstKeyword | DeclareKeyword | DefaultKeyword | ExportKeyword | InKeyword | PrivateKeyword | ProtectedKeyword | PublicKeyword | OutKeyword | OverrideKeyword | ReadonlyKeyword | StaticKeyword; 666 export type ModifierLike = Modifier | Decorator; 667 export type AccessibilityModifier = PublicKeyword | PrivateKeyword | ProtectedKeyword; 668 export type ParameterPropertyModifier = AccessibilityModifier | ReadonlyKeyword; 669 export type ClassMemberModifier = AccessibilityModifier | ReadonlyKeyword | StaticKeyword | AccessorKeyword; 670 export type ModifiersArray = NodeArray<Modifier>; 671 export enum GeneratedIdentifierFlags { 672 None = 0, 673 ReservedInNestedScopes = 8, 674 Optimistic = 16, 675 FileLevel = 32, 676 AllowNameSubstitution = 64 677 } 678 export interface Identifier extends PrimaryExpression, Declaration { 679 readonly kind: SyntaxKind.Identifier; 680 /** 681 * Prefer to use `id.unescapedText`. (Note: This is available only in services, not internally to the TypeScript compiler.) 682 * Text of identifier, but if the identifier begins with two underscores, this will begin with three. 683 */ 684 readonly escapedText: __String; 685 readonly originalKeywordKind?: SyntaxKind; 686 isInJSDocNamespace?: boolean; 687 } 688 export interface TransientIdentifier extends Identifier { 689 resolvedSymbol: Symbol; 690 } 691 export interface QualifiedName extends Node { 692 readonly kind: SyntaxKind.QualifiedName; 693 readonly left: EntityName; 694 readonly right: Identifier; 695 } 696 export type EntityName = Identifier | QualifiedName; 697 export type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier; 698 export type MemberName = Identifier | PrivateIdentifier; 699 export type DeclarationName = Identifier | PrivateIdentifier | StringLiteralLike | NumericLiteral | ComputedPropertyName | ElementAccessExpression | BindingPattern | EntityNameExpression; 700 export interface Declaration extends Node { 701 _declarationBrand: any; 702 } 703 export interface NamedDeclaration extends Declaration { 704 readonly name?: DeclarationName; 705 } 706 export interface DeclarationStatement extends NamedDeclaration, Statement { 707 readonly name?: Identifier | StringLiteral | NumericLiteral; 708 } 709 export interface ComputedPropertyName extends Node { 710 readonly kind: SyntaxKind.ComputedPropertyName; 711 readonly parent: Declaration; 712 readonly expression: Expression; 713 } 714 export interface PrivateIdentifier extends PrimaryExpression { 715 readonly kind: SyntaxKind.PrivateIdentifier; 716 readonly escapedText: __String; 717 } 718 export interface Decorator extends Node { 719 readonly kind: SyntaxKind.Decorator; 720 readonly parent: NamedDeclaration; 721 readonly expression: LeftHandSideExpression; 722 /** Refers to a annotation declaration (or undefined when decorator isn't annotation) */ 723 readonly annotationDeclaration?: AnnotationDeclaration; 724 } 725 export type Annotation = Decorator; 726 export interface TypeParameterDeclaration extends NamedDeclaration { 727 readonly kind: SyntaxKind.TypeParameter; 728 readonly parent: DeclarationWithTypeParameterChildren | InferTypeNode; 729 readonly modifiers?: NodeArray<Modifier>; 730 readonly name: Identifier; 731 /** Note: Consider calling `getEffectiveConstraintOfTypeParameter` */ 732 readonly constraint?: TypeNode; 733 readonly default?: TypeNode; 734 expression?: Expression; 735 } 736 export interface SignatureDeclarationBase extends NamedDeclaration, JSDocContainer { 737 readonly kind: SignatureDeclaration["kind"]; 738 readonly name?: PropertyName; 739 readonly typeParameters?: NodeArray<TypeParameterDeclaration> | undefined; 740 readonly parameters: NodeArray<ParameterDeclaration>; 741 readonly type?: TypeNode | undefined; 742 } 743 export type SignatureDeclaration = CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction; 744 export interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement { 745 readonly kind: SyntaxKind.CallSignature; 746 } 747 export interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement { 748 readonly kind: SyntaxKind.ConstructSignature; 749 } 750 export type BindingName = Identifier | BindingPattern; 751 export interface VariableDeclaration extends NamedDeclaration, JSDocContainer { 752 readonly kind: SyntaxKind.VariableDeclaration; 753 readonly parent: VariableDeclarationList | CatchClause; 754 readonly name: BindingName; 755 readonly exclamationToken?: ExclamationToken; 756 readonly type?: TypeNode; 757 readonly initializer?: Expression; 758 } 759 export interface VariableDeclarationList extends Node { 760 readonly kind: SyntaxKind.VariableDeclarationList; 761 readonly parent: VariableStatement | ForStatement | ForOfStatement | ForInStatement; 762 readonly declarations: NodeArray<VariableDeclaration>; 763 } 764 export interface ParameterDeclaration extends NamedDeclaration, JSDocContainer { 765 readonly kind: SyntaxKind.Parameter; 766 readonly parent: SignatureDeclaration; 767 readonly modifiers?: NodeArray<ModifierLike>; 768 readonly dotDotDotToken?: DotDotDotToken; 769 readonly name: BindingName; 770 readonly questionToken?: QuestionToken; 771 readonly type?: TypeNode; 772 readonly initializer?: Expression; 773 } 774 export interface BindingElement extends NamedDeclaration { 775 readonly kind: SyntaxKind.BindingElement; 776 readonly parent: BindingPattern; 777 readonly propertyName?: PropertyName; 778 readonly dotDotDotToken?: DotDotDotToken; 779 readonly name: BindingName; 780 readonly initializer?: Expression; 781 } 782 export interface PropertySignature extends TypeElement, JSDocContainer { 783 readonly kind: SyntaxKind.PropertySignature; 784 readonly modifiers?: NodeArray<Modifier>; 785 readonly name: PropertyName; 786 readonly questionToken?: QuestionToken; 787 readonly type?: TypeNode; 788 } 789 export interface PropertyDeclaration extends ClassElement, JSDocContainer { 790 readonly kind: SyntaxKind.PropertyDeclaration; 791 readonly parent: ClassLikeDeclaration; 792 readonly modifiers?: NodeArray<ModifierLike>; 793 readonly name: PropertyName; 794 readonly questionToken?: QuestionToken; 795 readonly exclamationToken?: ExclamationToken; 796 readonly type?: TypeNode; 797 readonly initializer?: Expression; 798 } 799 export interface AnnotationPropertyDeclaration extends AnnotationElement, JSDocContainer { 800 readonly kind: SyntaxKind.AnnotationPropertyDeclaration; 801 readonly parent: AnnotationDeclaration; 802 readonly name: PropertyName; 803 readonly type?: TypeNode; 804 readonly initializer?: Expression; 805 } 806 export interface AutoAccessorPropertyDeclaration extends PropertyDeclaration { 807 _autoAccessorBrand: any; 808 } 809 export interface ObjectLiteralElement extends NamedDeclaration { 810 _objectLiteralBrand: any; 811 readonly name?: PropertyName; 812 } 813 /** Unlike ObjectLiteralElement, excludes JSXAttribute and JSXSpreadAttribute. */ 814 export type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration; 815 export interface PropertyAssignment extends ObjectLiteralElement, JSDocContainer { 816 readonly kind: SyntaxKind.PropertyAssignment; 817 readonly parent: ObjectLiteralExpression; 818 readonly name: PropertyName; 819 readonly initializer: Expression; 820 } 821 export interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer { 822 readonly kind: SyntaxKind.ShorthandPropertyAssignment; 823 readonly parent: ObjectLiteralExpression; 824 readonly name: Identifier; 825 readonly equalsToken?: EqualsToken; 826 readonly objectAssignmentInitializer?: Expression; 827 } 828 export interface SpreadAssignment extends ObjectLiteralElement, JSDocContainer { 829 readonly kind: SyntaxKind.SpreadAssignment; 830 readonly parent: ObjectLiteralExpression; 831 readonly expression: Expression; 832 } 833 export type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | AnnotationPropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag; 834 export interface PropertyLikeDeclaration extends NamedDeclaration { 835 readonly name: PropertyName; 836 } 837 export interface ObjectBindingPattern extends Node { 838 readonly kind: SyntaxKind.ObjectBindingPattern; 839 readonly parent: VariableDeclaration | ParameterDeclaration | BindingElement; 840 readonly elements: NodeArray<BindingElement>; 841 } 842 export interface ArrayBindingPattern extends Node { 843 readonly kind: SyntaxKind.ArrayBindingPattern; 844 readonly parent: VariableDeclaration | ParameterDeclaration | BindingElement; 845 readonly elements: NodeArray<ArrayBindingElement>; 846 } 847 export type BindingPattern = ObjectBindingPattern | ArrayBindingPattern; 848 export type ArrayBindingElement = BindingElement | OmittedExpression; 849 /** 850 * Several node kinds share function-like features such as a signature, 851 * a name, and a body. These nodes should extend FunctionLikeDeclarationBase. 852 * Examples: 853 * - FunctionDeclaration 854 * - MethodDeclaration 855 * - AccessorDeclaration 856 */ 857 export interface FunctionLikeDeclarationBase extends SignatureDeclarationBase { 858 _functionLikeDeclarationBrand: any; 859 readonly asteriskToken?: AsteriskToken | undefined; 860 readonly questionToken?: QuestionToken | undefined; 861 readonly exclamationToken?: ExclamationToken | undefined; 862 readonly body?: Block | Expression | undefined; 863 } 864 export type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction; 865 /** @deprecated Use SignatureDeclaration */ 866 export type FunctionLike = SignatureDeclaration; 867 export interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement { 868 readonly kind: SyntaxKind.FunctionDeclaration; 869 readonly modifiers?: NodeArray<Modifier>; 870 readonly name?: Identifier; 871 readonly body?: FunctionBody; 872 } 873 export interface MethodSignature extends SignatureDeclarationBase, TypeElement { 874 readonly kind: SyntaxKind.MethodSignature; 875 readonly parent: ObjectTypeDeclaration; 876 readonly modifiers?: NodeArray<Modifier>; 877 readonly name: PropertyName; 878 } 879 export interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer { 880 readonly kind: SyntaxKind.MethodDeclaration; 881 readonly parent: ClassLikeDeclaration | ObjectLiteralExpression; 882 readonly modifiers?: NodeArray<ModifierLike> | undefined; 883 readonly name: PropertyName; 884 readonly body?: FunctionBody | undefined; 885 } 886 export interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer { 887 readonly kind: SyntaxKind.Constructor; 888 readonly parent: ClassLikeDeclaration; 889 readonly modifiers?: NodeArray<Modifier> | undefined; 890 readonly body?: FunctionBody | undefined; 891 } 892 /** For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. */ 893 export interface SemicolonClassElement extends ClassElement { 894 readonly kind: SyntaxKind.SemicolonClassElement; 895 readonly parent: ClassLikeDeclaration; 896 } 897 export interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer { 898 readonly kind: SyntaxKind.GetAccessor; 899 readonly parent: ClassLikeDeclaration | ObjectLiteralExpression | TypeLiteralNode | InterfaceDeclaration; 900 readonly modifiers?: NodeArray<ModifierLike>; 901 readonly name: PropertyName; 902 readonly body?: FunctionBody; 903 } 904 export interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer { 905 readonly kind: SyntaxKind.SetAccessor; 906 readonly parent: ClassLikeDeclaration | ObjectLiteralExpression | TypeLiteralNode | InterfaceDeclaration; 907 readonly modifiers?: NodeArray<ModifierLike>; 908 readonly name: PropertyName; 909 readonly body?: FunctionBody; 910 } 911 export type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration; 912 export interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement { 913 readonly kind: SyntaxKind.IndexSignature; 914 readonly parent: ObjectTypeDeclaration; 915 readonly modifiers?: NodeArray<Modifier>; 916 readonly type: TypeNode; 917 } 918 export interface ClassStaticBlockDeclaration extends ClassElement, JSDocContainer { 919 readonly kind: SyntaxKind.ClassStaticBlockDeclaration; 920 readonly parent: ClassDeclaration | ClassExpression; 921 readonly body: Block; 922 } 923 export interface TypeNode extends Node { 924 _typeNodeBrand: any; 925 } 926 export interface KeywordTypeNode<TKind extends KeywordTypeSyntaxKind = KeywordTypeSyntaxKind> extends KeywordToken<TKind>, TypeNode { 927 readonly kind: TKind; 928 } 929 export interface ImportTypeAssertionContainer extends Node { 930 readonly kind: SyntaxKind.ImportTypeAssertionContainer; 931 readonly parent: ImportTypeNode; 932 readonly assertClause: AssertClause; 933 readonly multiLine?: boolean; 934 } 935 export interface ImportTypeNode extends NodeWithTypeArguments { 936 readonly kind: SyntaxKind.ImportType; 937 readonly isTypeOf: boolean; 938 readonly argument: TypeNode; 939 readonly assertions?: ImportTypeAssertionContainer; 940 readonly qualifier?: EntityName; 941 } 942 export interface ThisTypeNode extends TypeNode { 943 readonly kind: SyntaxKind.ThisType; 944 } 945 export type FunctionOrConstructorTypeNode = FunctionTypeNode | ConstructorTypeNode; 946 export interface FunctionOrConstructorTypeNodeBase extends TypeNode, SignatureDeclarationBase { 947 readonly kind: SyntaxKind.FunctionType | SyntaxKind.ConstructorType; 948 readonly type: TypeNode; 949 } 950 export interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase { 951 readonly kind: SyntaxKind.FunctionType; 952 } 953 export interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase { 954 readonly kind: SyntaxKind.ConstructorType; 955 readonly modifiers?: NodeArray<Modifier>; 956 } 957 export interface NodeWithTypeArguments extends TypeNode { 958 readonly typeArguments?: NodeArray<TypeNode>; 959 } 960 export type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments; 961 export interface TypeReferenceNode extends NodeWithTypeArguments { 962 readonly kind: SyntaxKind.TypeReference; 963 readonly typeName: EntityName; 964 } 965 export interface TypePredicateNode extends TypeNode { 966 readonly kind: SyntaxKind.TypePredicate; 967 readonly parent: SignatureDeclaration | JSDocTypeExpression; 968 readonly assertsModifier?: AssertsKeyword; 969 readonly parameterName: Identifier | ThisTypeNode; 970 readonly type?: TypeNode; 971 } 972 export interface TypeQueryNode extends NodeWithTypeArguments { 973 readonly kind: SyntaxKind.TypeQuery; 974 readonly exprName: EntityName; 975 } 976 export interface TypeLiteralNode extends TypeNode, Declaration { 977 readonly kind: SyntaxKind.TypeLiteral; 978 readonly members: NodeArray<TypeElement>; 979 } 980 export interface ArrayTypeNode extends TypeNode { 981 readonly kind: SyntaxKind.ArrayType; 982 readonly elementType: TypeNode; 983 } 984 export interface TupleTypeNode extends TypeNode { 985 readonly kind: SyntaxKind.TupleType; 986 readonly elements: NodeArray<TypeNode | NamedTupleMember>; 987 } 988 export interface NamedTupleMember extends TypeNode, JSDocContainer, Declaration { 989 readonly kind: SyntaxKind.NamedTupleMember; 990 readonly dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>; 991 readonly name: Identifier; 992 readonly questionToken?: Token<SyntaxKind.QuestionToken>; 993 readonly type: TypeNode; 994 } 995 export interface OptionalTypeNode extends TypeNode { 996 readonly kind: SyntaxKind.OptionalType; 997 readonly type: TypeNode; 998 } 999 export interface RestTypeNode extends TypeNode { 1000 readonly kind: SyntaxKind.RestType; 1001 readonly type: TypeNode; 1002 } 1003 export type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode; 1004 export interface UnionTypeNode extends TypeNode { 1005 readonly kind: SyntaxKind.UnionType; 1006 readonly types: NodeArray<TypeNode>; 1007 } 1008 export interface IntersectionTypeNode extends TypeNode { 1009 readonly kind: SyntaxKind.IntersectionType; 1010 readonly types: NodeArray<TypeNode>; 1011 } 1012 export interface ConditionalTypeNode extends TypeNode { 1013 readonly kind: SyntaxKind.ConditionalType; 1014 readonly checkType: TypeNode; 1015 readonly extendsType: TypeNode; 1016 readonly trueType: TypeNode; 1017 readonly falseType: TypeNode; 1018 } 1019 export interface InferTypeNode extends TypeNode { 1020 readonly kind: SyntaxKind.InferType; 1021 readonly typeParameter: TypeParameterDeclaration; 1022 } 1023 export interface ParenthesizedTypeNode extends TypeNode { 1024 readonly kind: SyntaxKind.ParenthesizedType; 1025 readonly type: TypeNode; 1026 } 1027 export interface TypeOperatorNode extends TypeNode { 1028 readonly kind: SyntaxKind.TypeOperator; 1029 readonly operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword; 1030 readonly type: TypeNode; 1031 } 1032 export interface IndexedAccessTypeNode extends TypeNode { 1033 readonly kind: SyntaxKind.IndexedAccessType; 1034 readonly objectType: TypeNode; 1035 readonly indexType: TypeNode; 1036 } 1037 export interface MappedTypeNode extends TypeNode, Declaration { 1038 readonly kind: SyntaxKind.MappedType; 1039 readonly readonlyToken?: ReadonlyKeyword | PlusToken | MinusToken; 1040 readonly typeParameter: TypeParameterDeclaration; 1041 readonly nameType?: TypeNode; 1042 readonly questionToken?: QuestionToken | PlusToken | MinusToken; 1043 readonly type?: TypeNode; 1044 /** Used only to produce grammar errors */ 1045 readonly members?: NodeArray<TypeElement>; 1046 } 1047 export interface LiteralTypeNode extends TypeNode { 1048 readonly kind: SyntaxKind.LiteralType; 1049 readonly literal: NullLiteral | BooleanLiteral | LiteralExpression | PrefixUnaryExpression; 1050 } 1051 export interface StringLiteral extends LiteralExpression, Declaration { 1052 readonly kind: SyntaxKind.StringLiteral; 1053 } 1054 export type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral; 1055 export type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral; 1056 export interface TemplateLiteralTypeNode extends TypeNode { 1057 kind: SyntaxKind.TemplateLiteralType; 1058 readonly head: TemplateHead; 1059 readonly templateSpans: NodeArray<TemplateLiteralTypeSpan>; 1060 } 1061 export interface TemplateLiteralTypeSpan extends TypeNode { 1062 readonly kind: SyntaxKind.TemplateLiteralTypeSpan; 1063 readonly parent: TemplateLiteralTypeNode; 1064 readonly type: TypeNode; 1065 readonly literal: TemplateMiddle | TemplateTail; 1066 } 1067 export interface Expression extends Node { 1068 _expressionBrand: any; 1069 } 1070 export interface OmittedExpression extends Expression { 1071 readonly kind: SyntaxKind.OmittedExpression; 1072 } 1073 export interface PartiallyEmittedExpression extends LeftHandSideExpression { 1074 readonly kind: SyntaxKind.PartiallyEmittedExpression; 1075 readonly expression: Expression; 1076 } 1077 export interface UnaryExpression extends Expression { 1078 _unaryExpressionBrand: any; 1079 } 1080 /** Deprecated, please use UpdateExpression */ 1081 export type IncrementExpression = UpdateExpression; 1082 export interface UpdateExpression extends UnaryExpression { 1083 _updateExpressionBrand: any; 1084 } 1085 export type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken; 1086 export interface PrefixUnaryExpression extends UpdateExpression { 1087 readonly kind: SyntaxKind.PrefixUnaryExpression; 1088 readonly operator: PrefixUnaryOperator; 1089 readonly operand: UnaryExpression; 1090 } 1091 export type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken; 1092 export interface PostfixUnaryExpression extends UpdateExpression { 1093 readonly kind: SyntaxKind.PostfixUnaryExpression; 1094 readonly operand: LeftHandSideExpression; 1095 readonly operator: PostfixUnaryOperator; 1096 } 1097 export interface LeftHandSideExpression extends UpdateExpression { 1098 _leftHandSideExpressionBrand: any; 1099 } 1100 export interface MemberExpression extends LeftHandSideExpression { 1101 _memberExpressionBrand: any; 1102 } 1103 export interface PrimaryExpression extends MemberExpression { 1104 _primaryExpressionBrand: any; 1105 } 1106 export interface NullLiteral extends PrimaryExpression { 1107 readonly kind: SyntaxKind.NullKeyword; 1108 } 1109 export interface TrueLiteral extends PrimaryExpression { 1110 readonly kind: SyntaxKind.TrueKeyword; 1111 } 1112 export interface FalseLiteral extends PrimaryExpression { 1113 readonly kind: SyntaxKind.FalseKeyword; 1114 } 1115 export type BooleanLiteral = TrueLiteral | FalseLiteral; 1116 export interface ThisExpression extends PrimaryExpression { 1117 readonly kind: SyntaxKind.ThisKeyword; 1118 } 1119 export interface SuperExpression extends PrimaryExpression { 1120 readonly kind: SyntaxKind.SuperKeyword; 1121 } 1122 export interface ImportExpression extends PrimaryExpression { 1123 readonly kind: SyntaxKind.ImportKeyword; 1124 } 1125 export interface DeleteExpression extends UnaryExpression { 1126 readonly kind: SyntaxKind.DeleteExpression; 1127 readonly expression: UnaryExpression; 1128 } 1129 export interface TypeOfExpression extends UnaryExpression { 1130 readonly kind: SyntaxKind.TypeOfExpression; 1131 readonly expression: UnaryExpression; 1132 } 1133 export interface VoidExpression extends UnaryExpression { 1134 readonly kind: SyntaxKind.VoidExpression; 1135 readonly expression: UnaryExpression; 1136 } 1137 export interface AwaitExpression extends UnaryExpression { 1138 readonly kind: SyntaxKind.AwaitExpression; 1139 readonly expression: UnaryExpression; 1140 } 1141 export interface YieldExpression extends Expression { 1142 readonly kind: SyntaxKind.YieldExpression; 1143 readonly asteriskToken?: AsteriskToken; 1144 readonly expression?: Expression; 1145 } 1146 export interface SyntheticExpression extends Expression { 1147 readonly kind: SyntaxKind.SyntheticExpression; 1148 readonly isSpread: boolean; 1149 readonly type: Type; 1150 readonly tupleNameSource?: ParameterDeclaration | NamedTupleMember; 1151 } 1152 export type ExponentiationOperator = SyntaxKind.AsteriskAsteriskToken; 1153 export type MultiplicativeOperator = SyntaxKind.AsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken; 1154 export type MultiplicativeOperatorOrHigher = ExponentiationOperator | MultiplicativeOperator; 1155 export type AdditiveOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken; 1156 export type AdditiveOperatorOrHigher = MultiplicativeOperatorOrHigher | AdditiveOperator; 1157 export type ShiftOperator = SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken; 1158 export type ShiftOperatorOrHigher = AdditiveOperatorOrHigher | ShiftOperator; 1159 export type RelationalOperator = SyntaxKind.LessThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.InstanceOfKeyword | SyntaxKind.InKeyword; 1160 export type RelationalOperatorOrHigher = ShiftOperatorOrHigher | RelationalOperator; 1161 export type EqualityOperator = SyntaxKind.EqualsEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.ExclamationEqualsToken; 1162 export type EqualityOperatorOrHigher = RelationalOperatorOrHigher | EqualityOperator; 1163 export type BitwiseOperator = SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken; 1164 export type BitwiseOperatorOrHigher = EqualityOperatorOrHigher | BitwiseOperator; 1165 export type LogicalOperator = SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken; 1166 export type LogicalOperatorOrHigher = BitwiseOperatorOrHigher | LogicalOperator; 1167 export 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; 1168 export type AssignmentOperator = SyntaxKind.EqualsToken | CompoundAssignmentOperator; 1169 export type AssignmentOperatorOrHigher = SyntaxKind.QuestionQuestionToken | LogicalOperatorOrHigher | AssignmentOperator; 1170 export type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken; 1171 export type LogicalOrCoalescingAssignmentOperator = SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionEqualsToken; 1172 export type BinaryOperatorToken = Token<BinaryOperator>; 1173 export interface BinaryExpression extends Expression, Declaration { 1174 readonly kind: SyntaxKind.BinaryExpression; 1175 readonly left: Expression; 1176 readonly operatorToken: BinaryOperatorToken; 1177 readonly right: Expression; 1178 } 1179 export type AssignmentOperatorToken = Token<AssignmentOperator>; 1180 export interface AssignmentExpression<TOperator extends AssignmentOperatorToken> extends BinaryExpression { 1181 readonly left: LeftHandSideExpression; 1182 readonly operatorToken: TOperator; 1183 } 1184 export interface ObjectDestructuringAssignment extends AssignmentExpression<EqualsToken> { 1185 readonly left: ObjectLiteralExpression; 1186 } 1187 export interface ArrayDestructuringAssignment extends AssignmentExpression<EqualsToken> { 1188 readonly left: ArrayLiteralExpression; 1189 } 1190 export type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment; 1191 export type BindingOrAssignmentElement = VariableDeclaration | ParameterDeclaration | ObjectBindingOrAssignmentElement | ArrayBindingOrAssignmentElement; 1192 export type ObjectBindingOrAssignmentElement = BindingElement | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment; 1193 export type ArrayBindingOrAssignmentElement = BindingElement | OmittedExpression | SpreadElement | ArrayLiteralExpression | ObjectLiteralExpression | AssignmentExpression<EqualsToken> | Identifier | PropertyAccessExpression | ElementAccessExpression; 1194 export type BindingOrAssignmentElementRestIndicator = DotDotDotToken | SpreadElement | SpreadAssignment; 1195 export type BindingOrAssignmentElementTarget = BindingOrAssignmentPattern | Identifier | PropertyAccessExpression | ElementAccessExpression | OmittedExpression; 1196 export type ObjectBindingOrAssignmentPattern = ObjectBindingPattern | ObjectLiteralExpression; 1197 export type ArrayBindingOrAssignmentPattern = ArrayBindingPattern | ArrayLiteralExpression; 1198 export type AssignmentPattern = ObjectLiteralExpression | ArrayLiteralExpression; 1199 export type BindingOrAssignmentPattern = ObjectBindingOrAssignmentPattern | ArrayBindingOrAssignmentPattern; 1200 export interface ConditionalExpression extends Expression { 1201 readonly kind: SyntaxKind.ConditionalExpression; 1202 readonly condition: Expression; 1203 readonly questionToken: QuestionToken; 1204 readonly whenTrue: Expression; 1205 readonly colonToken: ColonToken; 1206 readonly whenFalse: Expression; 1207 } 1208 export type FunctionBody = Block; 1209 export type ConciseBody = FunctionBody | Expression; 1210 export interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer { 1211 readonly kind: SyntaxKind.FunctionExpression; 1212 readonly modifiers?: NodeArray<Modifier>; 1213 readonly name?: Identifier; 1214 readonly body: FunctionBody; 1215 } 1216 export interface EtsComponentExpression extends PrimaryExpression, Declaration { 1217 readonly kind: SyntaxKind.EtsComponentExpression; 1218 readonly expression: LeftHandSideExpression; 1219 readonly typeArguments?: NodeArray<TypeNode>; 1220 readonly arguments: NodeArray<Expression>; 1221 readonly body?: Block; 1222 } 1223 export interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer { 1224 readonly kind: SyntaxKind.ArrowFunction; 1225 readonly modifiers?: NodeArray<Modifier>; 1226 readonly equalsGreaterThanToken: EqualsGreaterThanToken; 1227 readonly body: ConciseBody; 1228 readonly name: never; 1229 } 1230 export interface LiteralLikeNode extends Node { 1231 text: string; 1232 isUnterminated?: boolean; 1233 hasExtendedUnicodeEscape?: boolean; 1234 } 1235 export interface TemplateLiteralLikeNode extends LiteralLikeNode { 1236 rawText?: string; 1237 } 1238 export interface LiteralExpression extends LiteralLikeNode, PrimaryExpression { 1239 _literalExpressionBrand: any; 1240 } 1241 export interface RegularExpressionLiteral extends LiteralExpression { 1242 readonly kind: SyntaxKind.RegularExpressionLiteral; 1243 } 1244 export interface NoSubstitutionTemplateLiteral extends LiteralExpression, TemplateLiteralLikeNode, Declaration { 1245 readonly kind: SyntaxKind.NoSubstitutionTemplateLiteral; 1246 } 1247 export enum TokenFlags { 1248 None = 0, 1249 Scientific = 16, 1250 Octal = 32, 1251 HexSpecifier = 64, 1252 BinarySpecifier = 128, 1253 OctalSpecifier = 256, 1254 } 1255 export interface NumericLiteral extends LiteralExpression, Declaration { 1256 readonly kind: SyntaxKind.NumericLiteral; 1257 } 1258 export interface BigIntLiteral extends LiteralExpression { 1259 readonly kind: SyntaxKind.BigIntLiteral; 1260 } 1261 export type LiteralToken = NumericLiteral | BigIntLiteral | StringLiteral | JsxText | RegularExpressionLiteral | NoSubstitutionTemplateLiteral; 1262 export interface TemplateHead extends TemplateLiteralLikeNode { 1263 readonly kind: SyntaxKind.TemplateHead; 1264 readonly parent: TemplateExpression | TemplateLiteralTypeNode; 1265 } 1266 export interface TemplateMiddle extends TemplateLiteralLikeNode { 1267 readonly kind: SyntaxKind.TemplateMiddle; 1268 readonly parent: TemplateSpan | TemplateLiteralTypeSpan; 1269 } 1270 export interface TemplateTail extends TemplateLiteralLikeNode { 1271 readonly kind: SyntaxKind.TemplateTail; 1272 readonly parent: TemplateSpan | TemplateLiteralTypeSpan; 1273 } 1274 export type PseudoLiteralToken = TemplateHead | TemplateMiddle | TemplateTail; 1275 export type TemplateLiteralToken = NoSubstitutionTemplateLiteral | PseudoLiteralToken; 1276 export interface TemplateExpression extends PrimaryExpression { 1277 readonly kind: SyntaxKind.TemplateExpression; 1278 readonly head: TemplateHead; 1279 readonly templateSpans: NodeArray<TemplateSpan>; 1280 } 1281 export type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral; 1282 export interface TemplateSpan extends Node { 1283 readonly kind: SyntaxKind.TemplateSpan; 1284 readonly parent: TemplateExpression; 1285 readonly expression: Expression; 1286 readonly literal: TemplateMiddle | TemplateTail; 1287 } 1288 export interface ParenthesizedExpression extends PrimaryExpression, JSDocContainer { 1289 readonly kind: SyntaxKind.ParenthesizedExpression; 1290 readonly expression: Expression; 1291 } 1292 export interface ArrayLiteralExpression extends PrimaryExpression { 1293 readonly kind: SyntaxKind.ArrayLiteralExpression; 1294 readonly elements: NodeArray<Expression>; 1295 } 1296 export interface SpreadElement extends Expression { 1297 readonly kind: SyntaxKind.SpreadElement; 1298 readonly parent: ArrayLiteralExpression | CallExpression | NewExpression; 1299 readonly expression: Expression; 1300 } 1301 /** 1302 * This interface is a base interface for ObjectLiteralExpression and JSXAttributes to extend from. JSXAttributes is similar to 1303 * ObjectLiteralExpression in that it contains array of properties; however, JSXAttributes' properties can only be 1304 * JSXAttribute or JSXSpreadAttribute. ObjectLiteralExpression, on the other hand, can only have properties of type 1305 * ObjectLiteralElement (e.g. PropertyAssignment, ShorthandPropertyAssignment etc.) 1306 */ 1307 export interface ObjectLiteralExpressionBase<T extends ObjectLiteralElement> extends PrimaryExpression, Declaration { 1308 readonly properties: NodeArray<T>; 1309 } 1310 export interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike> { 1311 readonly kind: SyntaxKind.ObjectLiteralExpression; 1312 } 1313 export type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression; 1314 export type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression; 1315 export type AccessExpression = PropertyAccessExpression | ElementAccessExpression; 1316 export interface PropertyAccessExpression extends MemberExpression, NamedDeclaration { 1317 readonly kind: SyntaxKind.PropertyAccessExpression; 1318 readonly expression: LeftHandSideExpression; 1319 readonly questionDotToken?: QuestionDotToken; 1320 readonly name: MemberName; 1321 } 1322 export interface PropertyAccessChain extends PropertyAccessExpression { 1323 _optionalChainBrand: any; 1324 readonly name: MemberName; 1325 } 1326 export interface SuperPropertyAccessExpression extends PropertyAccessExpression { 1327 readonly expression: SuperExpression; 1328 } 1329 /** Brand for a PropertyAccessExpression which, like a QualifiedName, consists of a sequence of identifiers separated by dots. */ 1330 export interface PropertyAccessEntityNameExpression extends PropertyAccessExpression { 1331 _propertyAccessExpressionLikeQualifiedNameBrand?: any; 1332 readonly expression: EntityNameExpression; 1333 readonly name: Identifier; 1334 } 1335 export interface ElementAccessExpression extends MemberExpression { 1336 readonly kind: SyntaxKind.ElementAccessExpression; 1337 readonly expression: LeftHandSideExpression; 1338 readonly questionDotToken?: QuestionDotToken; 1339 readonly argumentExpression: Expression; 1340 } 1341 export interface ElementAccessChain extends ElementAccessExpression { 1342 _optionalChainBrand: any; 1343 } 1344 export interface SuperElementAccessExpression extends ElementAccessExpression { 1345 readonly expression: SuperExpression; 1346 } 1347 export type SuperProperty = SuperPropertyAccessExpression | SuperElementAccessExpression; 1348 export interface CallExpression extends LeftHandSideExpression, Declaration { 1349 readonly kind: SyntaxKind.CallExpression; 1350 readonly expression: LeftHandSideExpression; 1351 readonly questionDotToken?: QuestionDotToken; 1352 readonly typeArguments?: NodeArray<TypeNode>; 1353 readonly arguments: NodeArray<Expression>; 1354 } 1355 export interface CallChain extends CallExpression { 1356 _optionalChainBrand: any; 1357 } 1358 export type OptionalChain = PropertyAccessChain | ElementAccessChain | CallChain | NonNullChain; 1359 export interface SuperCall extends CallExpression { 1360 readonly expression: SuperExpression; 1361 } 1362 export interface ImportCall extends CallExpression { 1363 readonly expression: ImportExpression; 1364 } 1365 export interface ExpressionWithTypeArguments extends MemberExpression, NodeWithTypeArguments { 1366 readonly kind: SyntaxKind.ExpressionWithTypeArguments; 1367 readonly expression: LeftHandSideExpression; 1368 } 1369 export interface NewExpression extends PrimaryExpression, Declaration { 1370 readonly kind: SyntaxKind.NewExpression; 1371 readonly expression: LeftHandSideExpression; 1372 readonly typeArguments?: NodeArray<TypeNode>; 1373 readonly arguments?: NodeArray<Expression>; 1374 } 1375 export interface TaggedTemplateExpression extends MemberExpression { 1376 readonly kind: SyntaxKind.TaggedTemplateExpression; 1377 readonly tag: LeftHandSideExpression; 1378 readonly typeArguments?: NodeArray<TypeNode>; 1379 readonly template: TemplateLiteral; 1380 } 1381 export type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement | EtsComponentExpression; 1382 export interface AsExpression extends Expression { 1383 readonly kind: SyntaxKind.AsExpression; 1384 readonly expression: Expression; 1385 readonly type: TypeNode; 1386 } 1387 export interface TypeAssertion extends UnaryExpression { 1388 readonly kind: SyntaxKind.TypeAssertionExpression; 1389 readonly type: TypeNode; 1390 readonly expression: UnaryExpression; 1391 } 1392 export interface SatisfiesExpression extends Expression { 1393 readonly kind: SyntaxKind.SatisfiesExpression; 1394 readonly expression: Expression; 1395 readonly type: TypeNode; 1396 } 1397 export type AssertionExpression = TypeAssertion | AsExpression; 1398 export interface NonNullExpression extends LeftHandSideExpression { 1399 readonly kind: SyntaxKind.NonNullExpression; 1400 readonly expression: Expression; 1401 } 1402 export interface NonNullChain extends NonNullExpression { 1403 _optionalChainBrand: any; 1404 } 1405 export interface MetaProperty extends PrimaryExpression { 1406 readonly kind: SyntaxKind.MetaProperty; 1407 readonly keywordToken: SyntaxKind.NewKeyword | SyntaxKind.ImportKeyword; 1408 readonly name: Identifier; 1409 } 1410 export interface JsxElement extends PrimaryExpression { 1411 readonly kind: SyntaxKind.JsxElement; 1412 readonly openingElement: JsxOpeningElement; 1413 readonly children: NodeArray<JsxChild>; 1414 readonly closingElement: JsxClosingElement; 1415 } 1416 export type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement; 1417 export type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute; 1418 export type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess; 1419 export interface JsxTagNamePropertyAccess extends PropertyAccessExpression { 1420 readonly expression: JsxTagNameExpression; 1421 } 1422 export interface JsxAttributes extends ObjectLiteralExpressionBase<JsxAttributeLike> { 1423 readonly kind: SyntaxKind.JsxAttributes; 1424 readonly parent: JsxOpeningLikeElement; 1425 } 1426 export interface JsxOpeningElement extends Expression { 1427 readonly kind: SyntaxKind.JsxOpeningElement; 1428 readonly parent: JsxElement; 1429 readonly tagName: JsxTagNameExpression; 1430 readonly typeArguments?: NodeArray<TypeNode>; 1431 readonly attributes: JsxAttributes; 1432 } 1433 export interface JsxSelfClosingElement extends PrimaryExpression { 1434 readonly kind: SyntaxKind.JsxSelfClosingElement; 1435 readonly tagName: JsxTagNameExpression; 1436 readonly typeArguments?: NodeArray<TypeNode>; 1437 readonly attributes: JsxAttributes; 1438 } 1439 export interface JsxFragment extends PrimaryExpression { 1440 readonly kind: SyntaxKind.JsxFragment; 1441 readonly openingFragment: JsxOpeningFragment; 1442 readonly children: NodeArray<JsxChild>; 1443 readonly closingFragment: JsxClosingFragment; 1444 } 1445 export interface JsxOpeningFragment extends Expression { 1446 readonly kind: SyntaxKind.JsxOpeningFragment; 1447 readonly parent: JsxFragment; 1448 } 1449 export interface JsxClosingFragment extends Expression { 1450 readonly kind: SyntaxKind.JsxClosingFragment; 1451 readonly parent: JsxFragment; 1452 } 1453 export interface JsxAttribute extends ObjectLiteralElement { 1454 readonly kind: SyntaxKind.JsxAttribute; 1455 readonly parent: JsxAttributes; 1456 readonly name: Identifier; 1457 readonly initializer?: JsxAttributeValue; 1458 } 1459 export type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment; 1460 export interface JsxSpreadAttribute extends ObjectLiteralElement { 1461 readonly kind: SyntaxKind.JsxSpreadAttribute; 1462 readonly parent: JsxAttributes; 1463 readonly expression: Expression; 1464 } 1465 export interface JsxClosingElement extends Node { 1466 readonly kind: SyntaxKind.JsxClosingElement; 1467 readonly parent: JsxElement; 1468 readonly tagName: JsxTagNameExpression; 1469 } 1470 export interface JsxExpression extends Expression { 1471 readonly kind: SyntaxKind.JsxExpression; 1472 readonly parent: JsxElement | JsxFragment | JsxAttributeLike; 1473 readonly dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>; 1474 readonly expression?: Expression; 1475 } 1476 export interface JsxText extends LiteralLikeNode { 1477 readonly kind: SyntaxKind.JsxText; 1478 readonly parent: JsxElement | JsxFragment; 1479 readonly containsOnlyTriviaWhiteSpaces: boolean; 1480 } 1481 export type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment; 1482 export interface Statement extends Node, JSDocContainer { 1483 _statementBrand: any; 1484 } 1485 export interface NotEmittedStatement extends Statement { 1486 readonly kind: SyntaxKind.NotEmittedStatement; 1487 } 1488 /** 1489 * A list of comma-separated expressions. This node is only created by transformations. 1490 */ 1491 export interface CommaListExpression extends Expression { 1492 readonly kind: SyntaxKind.CommaListExpression; 1493 readonly elements: NodeArray<Expression>; 1494 } 1495 export interface EmptyStatement extends Statement { 1496 readonly kind: SyntaxKind.EmptyStatement; 1497 } 1498 export interface DebuggerStatement extends Statement { 1499 readonly kind: SyntaxKind.DebuggerStatement; 1500 } 1501 export interface MissingDeclaration extends DeclarationStatement { 1502 readonly kind: SyntaxKind.MissingDeclaration; 1503 readonly name?: Identifier; 1504 } 1505 export type BlockLike = SourceFile | Block | ModuleBlock | CaseOrDefaultClause; 1506 export interface Block extends Statement { 1507 readonly kind: SyntaxKind.Block; 1508 readonly statements: NodeArray<Statement>; 1509 } 1510 export interface VariableStatement extends Statement { 1511 readonly kind: SyntaxKind.VariableStatement; 1512 readonly modifiers?: NodeArray<Modifier>; 1513 readonly declarationList: VariableDeclarationList; 1514 } 1515 export interface ExpressionStatement extends Statement { 1516 readonly kind: SyntaxKind.ExpressionStatement; 1517 readonly expression: Expression; 1518 } 1519 export interface IfStatement extends Statement { 1520 readonly kind: SyntaxKind.IfStatement; 1521 readonly expression: Expression; 1522 readonly thenStatement: Statement; 1523 readonly elseStatement?: Statement; 1524 } 1525 export interface IterationStatement extends Statement { 1526 readonly statement: Statement; 1527 } 1528 export interface DoStatement extends IterationStatement { 1529 readonly kind: SyntaxKind.DoStatement; 1530 readonly expression: Expression; 1531 } 1532 export interface WhileStatement extends IterationStatement { 1533 readonly kind: SyntaxKind.WhileStatement; 1534 readonly expression: Expression; 1535 } 1536 export type ForInitializer = VariableDeclarationList | Expression; 1537 export interface ForStatement extends IterationStatement { 1538 readonly kind: SyntaxKind.ForStatement; 1539 readonly initializer?: ForInitializer; 1540 readonly condition?: Expression; 1541 readonly incrementor?: Expression; 1542 } 1543 export type ForInOrOfStatement = ForInStatement | ForOfStatement; 1544 export interface ForInStatement extends IterationStatement { 1545 readonly kind: SyntaxKind.ForInStatement; 1546 readonly initializer: ForInitializer; 1547 readonly expression: Expression; 1548 } 1549 export interface ForOfStatement extends IterationStatement { 1550 readonly kind: SyntaxKind.ForOfStatement; 1551 readonly awaitModifier?: AwaitKeyword; 1552 readonly initializer: ForInitializer; 1553 readonly expression: Expression; 1554 } 1555 export interface BreakStatement extends Statement { 1556 readonly kind: SyntaxKind.BreakStatement; 1557 readonly label?: Identifier; 1558 } 1559 export interface ContinueStatement extends Statement { 1560 readonly kind: SyntaxKind.ContinueStatement; 1561 readonly label?: Identifier; 1562 } 1563 export type BreakOrContinueStatement = BreakStatement | ContinueStatement; 1564 export interface ReturnStatement extends Statement { 1565 readonly kind: SyntaxKind.ReturnStatement; 1566 readonly expression?: Expression; 1567 } 1568 export interface WithStatement extends Statement { 1569 readonly kind: SyntaxKind.WithStatement; 1570 readonly expression: Expression; 1571 readonly statement: Statement; 1572 } 1573 export interface SwitchStatement extends Statement { 1574 readonly kind: SyntaxKind.SwitchStatement; 1575 readonly expression: Expression; 1576 readonly caseBlock: CaseBlock; 1577 possiblyExhaustive?: boolean; 1578 } 1579 export interface CaseBlock extends Node { 1580 readonly kind: SyntaxKind.CaseBlock; 1581 readonly parent: SwitchStatement; 1582 readonly clauses: NodeArray<CaseOrDefaultClause>; 1583 } 1584 export interface CaseClause extends Node, JSDocContainer { 1585 readonly kind: SyntaxKind.CaseClause; 1586 readonly parent: CaseBlock; 1587 readonly expression: Expression; 1588 readonly statements: NodeArray<Statement>; 1589 } 1590 export interface DefaultClause extends Node { 1591 readonly kind: SyntaxKind.DefaultClause; 1592 readonly parent: CaseBlock; 1593 readonly statements: NodeArray<Statement>; 1594 } 1595 export type CaseOrDefaultClause = CaseClause | DefaultClause; 1596 export interface LabeledStatement extends Statement { 1597 readonly kind: SyntaxKind.LabeledStatement; 1598 readonly label: Identifier; 1599 readonly statement: Statement; 1600 } 1601 export interface ThrowStatement extends Statement { 1602 readonly kind: SyntaxKind.ThrowStatement; 1603 readonly expression: Expression; 1604 } 1605 export interface TryStatement extends Statement { 1606 readonly kind: SyntaxKind.TryStatement; 1607 readonly tryBlock: Block; 1608 readonly catchClause?: CatchClause; 1609 readonly finallyBlock?: Block; 1610 } 1611 export interface CatchClause extends Node { 1612 readonly kind: SyntaxKind.CatchClause; 1613 readonly parent: TryStatement; 1614 readonly variableDeclaration?: VariableDeclaration; 1615 readonly block: Block; 1616 } 1617 export type ObjectTypeDeclaration = ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode; 1618 export type DeclarationWithTypeParameters = DeclarationWithTypeParameterChildren | JSDocTypedefTag | JSDocCallbackTag | JSDocSignature; 1619 export type DeclarationWithTypeParameterChildren = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag; 1620 export interface ClassLikeDeclarationBase extends NamedDeclaration, JSDocContainer { 1621 readonly kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression | SyntaxKind.StructDeclaration | SyntaxKind.AnnotationDeclaration; 1622 readonly name?: Identifier; 1623 readonly typeParameters?: NodeArray<TypeParameterDeclaration>; 1624 readonly heritageClauses?: NodeArray<HeritageClause>; 1625 readonly members: NodeArray<ClassElement>; 1626 } 1627 export interface ClassDeclaration extends ClassLikeDeclarationBase, DeclarationStatement { 1628 readonly kind: SyntaxKind.ClassDeclaration; 1629 readonly modifiers?: NodeArray<ModifierLike>; 1630 /** May be undefined in `export default class { ... }`. */ 1631 readonly name?: Identifier; 1632 } 1633 export interface StructDeclaration extends ClassLikeDeclarationBase, DeclarationStatement { 1634 readonly kind: SyntaxKind.StructDeclaration; 1635 readonly modifiers?: NodeArray<ModifierLike>; 1636 /** May be undefined in `export default class { ... }`. */ 1637 readonly name?: Identifier; 1638 } 1639 export interface AnnotationDeclaration extends DeclarationStatement { 1640 readonly kind: SyntaxKind.AnnotationDeclaration; 1641 readonly modifiers?: NodeArray<ModifierLike>; 1642 readonly name: Identifier; 1643 readonly members: NodeArray<AnnotationElement>; 1644 } 1645 export interface ClassExpression extends ClassLikeDeclarationBase, PrimaryExpression { 1646 readonly kind: SyntaxKind.ClassExpression; 1647 readonly modifiers?: NodeArray<ModifierLike>; 1648 } 1649 export type ClassLikeDeclaration = ClassDeclaration | ClassExpression | StructDeclaration; 1650 export interface ClassElement extends NamedDeclaration { 1651 _classElementBrand: any; 1652 readonly name?: PropertyName; 1653 } 1654 export interface AnnotationElement extends NamedDeclaration { 1655 _annnotationElementBrand: any; 1656 readonly name: PropertyName; 1657 } 1658 export interface TypeElement extends NamedDeclaration { 1659 _typeElementBrand: any; 1660 readonly name?: PropertyName; 1661 readonly questionToken?: QuestionToken | undefined; 1662 } 1663 export interface InterfaceDeclaration extends DeclarationStatement, JSDocContainer { 1664 readonly kind: SyntaxKind.InterfaceDeclaration; 1665 readonly modifiers?: NodeArray<Modifier>; 1666 readonly name: Identifier; 1667 readonly typeParameters?: NodeArray<TypeParameterDeclaration>; 1668 readonly heritageClauses?: NodeArray<HeritageClause>; 1669 readonly members: NodeArray<TypeElement>; 1670 } 1671 export interface HeritageClause extends Node { 1672 readonly kind: SyntaxKind.HeritageClause; 1673 readonly parent: InterfaceDeclaration | ClassLikeDeclaration; 1674 readonly token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword; 1675 readonly types: NodeArray<ExpressionWithTypeArguments>; 1676 } 1677 export interface TypeAliasDeclaration extends DeclarationStatement, JSDocContainer { 1678 readonly kind: SyntaxKind.TypeAliasDeclaration; 1679 readonly modifiers?: NodeArray<Modifier>; 1680 readonly name: Identifier; 1681 readonly typeParameters?: NodeArray<TypeParameterDeclaration>; 1682 readonly type: TypeNode; 1683 } 1684 export interface EnumMember extends NamedDeclaration, JSDocContainer { 1685 readonly kind: SyntaxKind.EnumMember; 1686 readonly parent: EnumDeclaration; 1687 readonly name: PropertyName; 1688 readonly initializer?: Expression; 1689 } 1690 export interface EnumDeclaration extends DeclarationStatement, JSDocContainer { 1691 readonly kind: SyntaxKind.EnumDeclaration; 1692 readonly modifiers?: NodeArray<Modifier>; 1693 readonly name: Identifier; 1694 readonly members: NodeArray<EnumMember>; 1695 } 1696 export type ModuleName = Identifier | StringLiteral; 1697 export type ModuleBody = NamespaceBody | JSDocNamespaceBody; 1698 export interface ModuleDeclaration extends DeclarationStatement, JSDocContainer { 1699 readonly kind: SyntaxKind.ModuleDeclaration; 1700 readonly parent: ModuleBody | SourceFile; 1701 readonly modifiers?: NodeArray<Modifier>; 1702 readonly name: ModuleName; 1703 readonly body?: ModuleBody | JSDocNamespaceDeclaration; 1704 } 1705 export type NamespaceBody = ModuleBlock | NamespaceDeclaration; 1706 export interface NamespaceDeclaration extends ModuleDeclaration { 1707 readonly name: Identifier; 1708 readonly body: NamespaceBody; 1709 } 1710 export type JSDocNamespaceBody = Identifier | JSDocNamespaceDeclaration; 1711 export interface JSDocNamespaceDeclaration extends ModuleDeclaration { 1712 readonly name: Identifier; 1713 readonly body?: JSDocNamespaceBody; 1714 } 1715 export interface ModuleBlock extends Node, Statement { 1716 readonly kind: SyntaxKind.ModuleBlock; 1717 readonly parent: ModuleDeclaration; 1718 readonly statements: NodeArray<Statement>; 1719 } 1720 export type ModuleReference = EntityName | ExternalModuleReference; 1721 /** 1722 * One of: 1723 * - import x = require("mod"); 1724 * - import x = M.x; 1725 */ 1726 export interface ImportEqualsDeclaration extends DeclarationStatement, JSDocContainer { 1727 readonly kind: SyntaxKind.ImportEqualsDeclaration; 1728 readonly parent: SourceFile | ModuleBlock; 1729 readonly modifiers?: NodeArray<Modifier>; 1730 readonly name: Identifier; 1731 readonly isTypeOnly: boolean; 1732 readonly moduleReference: ModuleReference; 1733 } 1734 export interface ExternalModuleReference extends Node { 1735 readonly kind: SyntaxKind.ExternalModuleReference; 1736 readonly parent: ImportEqualsDeclaration; 1737 readonly expression: Expression; 1738 } 1739 export interface ImportDeclaration extends Statement { 1740 readonly kind: SyntaxKind.ImportDeclaration; 1741 readonly parent: SourceFile | ModuleBlock; 1742 readonly modifiers?: NodeArray<Modifier>; 1743 readonly importClause?: ImportClause; 1744 /** If this is not a StringLiteral it will be a grammar error. */ 1745 readonly moduleSpecifier: Expression; 1746 readonly assertClause?: AssertClause; 1747 } 1748 export type NamedImportBindings = NamespaceImport | NamedImports; 1749 export type NamedExportBindings = NamespaceExport | NamedExports; 1750 export interface ImportClause extends NamedDeclaration { 1751 readonly kind: SyntaxKind.ImportClause; 1752 readonly parent: ImportDeclaration; 1753 readonly isTypeOnly: boolean; 1754 readonly name?: Identifier; 1755 readonly namedBindings?: NamedImportBindings; 1756 readonly isLazy?: boolean; 1757 } 1758 export type AssertionKey = Identifier | StringLiteral; 1759 export interface AssertEntry extends Node { 1760 readonly kind: SyntaxKind.AssertEntry; 1761 readonly parent: AssertClause; 1762 readonly name: AssertionKey; 1763 readonly value: Expression; 1764 } 1765 export interface AssertClause extends Node { 1766 readonly kind: SyntaxKind.AssertClause; 1767 readonly parent: ImportDeclaration | ExportDeclaration; 1768 readonly elements: NodeArray<AssertEntry>; 1769 readonly multiLine?: boolean; 1770 } 1771 export interface NamespaceImport extends NamedDeclaration { 1772 readonly kind: SyntaxKind.NamespaceImport; 1773 readonly parent: ImportClause; 1774 readonly name: Identifier; 1775 } 1776 export interface NamespaceExport extends NamedDeclaration { 1777 readonly kind: SyntaxKind.NamespaceExport; 1778 readonly parent: ExportDeclaration; 1779 readonly name: Identifier; 1780 } 1781 export interface NamespaceExportDeclaration extends DeclarationStatement, JSDocContainer { 1782 readonly kind: SyntaxKind.NamespaceExportDeclaration; 1783 readonly name: Identifier; 1784 } 1785 export interface ExportDeclaration extends DeclarationStatement, JSDocContainer { 1786 readonly kind: SyntaxKind.ExportDeclaration; 1787 readonly parent: SourceFile | ModuleBlock; 1788 readonly modifiers?: NodeArray<Modifier>; 1789 readonly isTypeOnly: boolean; 1790 /** Will not be assigned in the case of `export * from "foo";` */ 1791 readonly exportClause?: NamedExportBindings; 1792 /** If this is not a StringLiteral it will be a grammar error. */ 1793 readonly moduleSpecifier?: Expression; 1794 readonly assertClause?: AssertClause; 1795 } 1796 export interface NamedImports extends Node { 1797 readonly kind: SyntaxKind.NamedImports; 1798 readonly parent: ImportClause; 1799 readonly elements: NodeArray<ImportSpecifier>; 1800 } 1801 export interface NamedExports extends Node { 1802 readonly kind: SyntaxKind.NamedExports; 1803 readonly parent: ExportDeclaration; 1804 readonly elements: NodeArray<ExportSpecifier>; 1805 } 1806 export type NamedImportsOrExports = NamedImports | NamedExports; 1807 export interface ImportSpecifier extends NamedDeclaration { 1808 readonly kind: SyntaxKind.ImportSpecifier; 1809 readonly parent: NamedImports; 1810 readonly propertyName?: Identifier; 1811 readonly name: Identifier; 1812 readonly isTypeOnly: boolean; 1813 } 1814 export interface ExportSpecifier extends NamedDeclaration, JSDocContainer { 1815 readonly kind: SyntaxKind.ExportSpecifier; 1816 readonly parent: NamedExports; 1817 readonly isTypeOnly: boolean; 1818 readonly propertyName?: Identifier; 1819 readonly name: Identifier; 1820 } 1821 export type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier; 1822 export type TypeOnlyCompatibleAliasDeclaration = ImportClause | ImportEqualsDeclaration | NamespaceImport | ImportOrExportSpecifier; 1823 export type TypeOnlyAliasDeclaration = ImportClause & { 1824 readonly isTypeOnly: true; 1825 readonly name: Identifier; 1826 } | ImportEqualsDeclaration & { 1827 readonly isTypeOnly: true; 1828 } | NamespaceImport & { 1829 readonly parent: ImportClause & { 1830 readonly isTypeOnly: true; 1831 }; 1832 } | ImportSpecifier & ({ 1833 readonly isTypeOnly: true; 1834 } | { 1835 readonly parent: NamedImports & { 1836 readonly parent: ImportClause & { 1837 readonly isTypeOnly: true; 1838 }; 1839 }; 1840 }) | ExportSpecifier & ({ 1841 readonly isTypeOnly: true; 1842 } | { 1843 readonly parent: NamedExports & { 1844 readonly parent: ExportDeclaration & { 1845 readonly isTypeOnly: true; 1846 }; 1847 }; 1848 }); 1849 /** 1850 * This is either an `export =` or an `export default` declaration. 1851 * Unless `isExportEquals` is set, this node was parsed as an `export default`. 1852 */ 1853 export interface ExportAssignment extends DeclarationStatement, JSDocContainer { 1854 readonly kind: SyntaxKind.ExportAssignment; 1855 readonly parent: SourceFile; 1856 readonly modifiers?: NodeArray<Modifier>; 1857 readonly isExportEquals?: boolean; 1858 readonly expression: Expression; 1859 } 1860 export interface FileReference extends TextRange { 1861 fileName: string; 1862 resolutionMode?: SourceFile["impliedNodeFormat"]; 1863 } 1864 export interface CheckJsDirective extends TextRange { 1865 enabled: boolean; 1866 } 1867 export type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia; 1868 export interface CommentRange extends TextRange { 1869 hasTrailingNewLine?: boolean; 1870 kind: CommentKind; 1871 } 1872 export interface SynthesizedComment extends CommentRange { 1873 text: string; 1874 pos: -1; 1875 end: -1; 1876 hasLeadingNewline?: boolean; 1877 } 1878 export interface JSDocTypeExpression extends TypeNode { 1879 readonly kind: SyntaxKind.JSDocTypeExpression; 1880 readonly type: TypeNode; 1881 } 1882 export interface JSDocNameReference extends Node { 1883 readonly kind: SyntaxKind.JSDocNameReference; 1884 readonly name: EntityName | JSDocMemberName; 1885 } 1886 /** Class#method reference in JSDoc */ 1887 export interface JSDocMemberName extends Node { 1888 readonly kind: SyntaxKind.JSDocMemberName; 1889 readonly left: EntityName | JSDocMemberName; 1890 readonly right: Identifier; 1891 } 1892 export interface JSDocType extends TypeNode { 1893 _jsDocTypeBrand: any; 1894 } 1895 export interface JSDocAllType extends JSDocType { 1896 readonly kind: SyntaxKind.JSDocAllType; 1897 } 1898 export interface JSDocUnknownType extends JSDocType { 1899 readonly kind: SyntaxKind.JSDocUnknownType; 1900 } 1901 export interface JSDocNonNullableType extends JSDocType { 1902 readonly kind: SyntaxKind.JSDocNonNullableType; 1903 readonly type: TypeNode; 1904 readonly postfix: boolean; 1905 } 1906 export interface JSDocNullableType extends JSDocType { 1907 readonly kind: SyntaxKind.JSDocNullableType; 1908 readonly type: TypeNode; 1909 readonly postfix: boolean; 1910 } 1911 export interface JSDocOptionalType extends JSDocType { 1912 readonly kind: SyntaxKind.JSDocOptionalType; 1913 readonly type: TypeNode; 1914 } 1915 export interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase { 1916 readonly kind: SyntaxKind.JSDocFunctionType; 1917 } 1918 export interface JSDocVariadicType extends JSDocType { 1919 readonly kind: SyntaxKind.JSDocVariadicType; 1920 readonly type: TypeNode; 1921 } 1922 export interface JSDocNamepathType extends JSDocType { 1923 readonly kind: SyntaxKind.JSDocNamepathType; 1924 readonly type: TypeNode; 1925 } 1926 export type JSDocTypeReferencingNode = JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType; 1927 export interface JSDoc extends Node { 1928 readonly kind: SyntaxKind.JSDoc; 1929 readonly parent: HasJSDoc; 1930 readonly tags?: NodeArray<JSDocTag>; 1931 readonly comment?: string | NodeArray<JSDocComment>; 1932 } 1933 export interface JSDocTag extends Node { 1934 readonly parent: JSDoc | JSDocTypeLiteral; 1935 readonly tagName: Identifier; 1936 readonly comment?: string | NodeArray<JSDocComment>; 1937 } 1938 export interface JSDocLink extends Node { 1939 readonly kind: SyntaxKind.JSDocLink; 1940 readonly name?: EntityName | JSDocMemberName; 1941 text: string; 1942 } 1943 export interface JSDocLinkCode extends Node { 1944 readonly kind: SyntaxKind.JSDocLinkCode; 1945 readonly name?: EntityName | JSDocMemberName; 1946 text: string; 1947 } 1948 export interface JSDocLinkPlain extends Node { 1949 readonly kind: SyntaxKind.JSDocLinkPlain; 1950 readonly name?: EntityName | JSDocMemberName; 1951 text: string; 1952 } 1953 export type JSDocComment = JSDocText | JSDocLink | JSDocLinkCode | JSDocLinkPlain; 1954 export interface JSDocText extends Node { 1955 readonly kind: SyntaxKind.JSDocText; 1956 text: string; 1957 } 1958 export interface JSDocUnknownTag extends JSDocTag { 1959 readonly kind: SyntaxKind.JSDocTag; 1960 } 1961 /** 1962 * Note that `@extends` is a synonym of `@augments`. 1963 * Both tags are represented by this interface. 1964 */ 1965 export interface JSDocAugmentsTag extends JSDocTag { 1966 readonly kind: SyntaxKind.JSDocAugmentsTag; 1967 readonly class: ExpressionWithTypeArguments & { 1968 readonly expression: Identifier | PropertyAccessEntityNameExpression; 1969 }; 1970 } 1971 export interface JSDocImplementsTag extends JSDocTag { 1972 readonly kind: SyntaxKind.JSDocImplementsTag; 1973 readonly class: ExpressionWithTypeArguments & { 1974 readonly expression: Identifier | PropertyAccessEntityNameExpression; 1975 }; 1976 } 1977 export interface JSDocAuthorTag extends JSDocTag { 1978 readonly kind: SyntaxKind.JSDocAuthorTag; 1979 } 1980 export interface JSDocDeprecatedTag extends JSDocTag { 1981 kind: SyntaxKind.JSDocDeprecatedTag; 1982 } 1983 export interface JSDocClassTag extends JSDocTag { 1984 readonly kind: SyntaxKind.JSDocClassTag; 1985 } 1986 export interface JSDocPublicTag extends JSDocTag { 1987 readonly kind: SyntaxKind.JSDocPublicTag; 1988 } 1989 export interface JSDocPrivateTag extends JSDocTag { 1990 readonly kind: SyntaxKind.JSDocPrivateTag; 1991 } 1992 export interface JSDocProtectedTag extends JSDocTag { 1993 readonly kind: SyntaxKind.JSDocProtectedTag; 1994 } 1995 export interface JSDocReadonlyTag extends JSDocTag { 1996 readonly kind: SyntaxKind.JSDocReadonlyTag; 1997 } 1998 export interface JSDocOverrideTag extends JSDocTag { 1999 readonly kind: SyntaxKind.JSDocOverrideTag; 2000 } 2001 export interface JSDocEnumTag extends JSDocTag, Declaration { 2002 readonly kind: SyntaxKind.JSDocEnumTag; 2003 readonly parent: JSDoc; 2004 readonly typeExpression: JSDocTypeExpression; 2005 } 2006 export interface JSDocThisTag extends JSDocTag { 2007 readonly kind: SyntaxKind.JSDocThisTag; 2008 readonly typeExpression: JSDocTypeExpression; 2009 } 2010 export interface JSDocTemplateTag extends JSDocTag { 2011 readonly kind: SyntaxKind.JSDocTemplateTag; 2012 readonly constraint: JSDocTypeExpression | undefined; 2013 readonly typeParameters: NodeArray<TypeParameterDeclaration>; 2014 } 2015 export interface JSDocSeeTag extends JSDocTag { 2016 readonly kind: SyntaxKind.JSDocSeeTag; 2017 readonly name?: JSDocNameReference; 2018 } 2019 export interface JSDocReturnTag extends JSDocTag { 2020 readonly kind: SyntaxKind.JSDocReturnTag; 2021 readonly typeExpression?: JSDocTypeExpression; 2022 } 2023 export interface JSDocTypeTag extends JSDocTag { 2024 readonly kind: SyntaxKind.JSDocTypeTag; 2025 readonly typeExpression: JSDocTypeExpression; 2026 } 2027 export interface JSDocTypedefTag extends JSDocTag, NamedDeclaration { 2028 readonly kind: SyntaxKind.JSDocTypedefTag; 2029 readonly parent: JSDoc; 2030 readonly fullName?: JSDocNamespaceDeclaration | Identifier; 2031 readonly name?: Identifier; 2032 readonly typeExpression?: JSDocTypeExpression | JSDocTypeLiteral; 2033 } 2034 export interface JSDocCallbackTag extends JSDocTag, NamedDeclaration { 2035 readonly kind: SyntaxKind.JSDocCallbackTag; 2036 readonly parent: JSDoc; 2037 readonly fullName?: JSDocNamespaceDeclaration | Identifier; 2038 readonly name?: Identifier; 2039 readonly typeExpression: JSDocSignature; 2040 } 2041 export interface JSDocSignature extends JSDocType, Declaration { 2042 readonly kind: SyntaxKind.JSDocSignature; 2043 readonly typeParameters?: readonly JSDocTemplateTag[]; 2044 readonly parameters: readonly JSDocParameterTag[]; 2045 readonly type: JSDocReturnTag | undefined; 2046 } 2047 export interface JSDocPropertyLikeTag extends JSDocTag, Declaration { 2048 readonly parent: JSDoc; 2049 readonly name: EntityName; 2050 readonly typeExpression?: JSDocTypeExpression; 2051 /** Whether the property name came before the type -- non-standard for JSDoc, but Typescript-like */ 2052 readonly isNameFirst: boolean; 2053 readonly isBracketed: boolean; 2054 } 2055 export interface JSDocPropertyTag extends JSDocPropertyLikeTag { 2056 readonly kind: SyntaxKind.JSDocPropertyTag; 2057 } 2058 export interface JSDocParameterTag extends JSDocPropertyLikeTag { 2059 readonly kind: SyntaxKind.JSDocParameterTag; 2060 } 2061 export interface JSDocTypeLiteral extends JSDocType { 2062 readonly kind: SyntaxKind.JSDocTypeLiteral; 2063 readonly jsDocPropertyTags?: readonly JSDocPropertyLikeTag[]; 2064 /** If true, then this type literal represents an *array* of its type. */ 2065 readonly isArrayType: boolean; 2066 } 2067 export enum FlowFlags { 2068 Unreachable = 1, 2069 Start = 2, 2070 BranchLabel = 4, 2071 LoopLabel = 8, 2072 Assignment = 16, 2073 TrueCondition = 32, 2074 FalseCondition = 64, 2075 SwitchClause = 128, 2076 ArrayMutation = 256, 2077 Call = 512, 2078 ReduceLabel = 1024, 2079 Referenced = 2048, 2080 Shared = 4096, 2081 Label = 12, 2082 Condition = 96 2083 } 2084 export type FlowNode = FlowStart | FlowLabel | FlowAssignment | FlowCondition | FlowSwitchClause | FlowArrayMutation | FlowCall | FlowReduceLabel; 2085 export interface FlowNodeBase { 2086 flags: FlowFlags; 2087 id?: number; 2088 } 2089 export interface FlowStart extends FlowNodeBase { 2090 node?: FunctionExpression | ArrowFunction | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration; 2091 } 2092 export interface FlowLabel extends FlowNodeBase { 2093 antecedents: FlowNode[] | undefined; 2094 } 2095 export interface FlowAssignment extends FlowNodeBase { 2096 node: Expression | VariableDeclaration | BindingElement; 2097 antecedent: FlowNode; 2098 } 2099 export interface FlowCall extends FlowNodeBase { 2100 node: CallExpression; 2101 antecedent: FlowNode; 2102 } 2103 export interface FlowCondition extends FlowNodeBase { 2104 node: Expression; 2105 antecedent: FlowNode; 2106 } 2107 export interface FlowSwitchClause extends FlowNodeBase { 2108 switchStatement: SwitchStatement; 2109 clauseStart: number; 2110 clauseEnd: number; 2111 antecedent: FlowNode; 2112 } 2113 export interface FlowArrayMutation extends FlowNodeBase { 2114 node: CallExpression | BinaryExpression; 2115 antecedent: FlowNode; 2116 } 2117 export interface FlowReduceLabel extends FlowNodeBase { 2118 target: FlowLabel; 2119 antecedents: FlowNode[]; 2120 antecedent: FlowNode; 2121 } 2122 export type FlowType = Type | IncompleteType; 2123 export interface IncompleteType { 2124 flags: TypeFlags; 2125 type: Type; 2126 } 2127 export interface AmdDependency { 2128 path: string; 2129 name?: string; 2130 } 2131 /** 2132 * Subset of properties from SourceFile that are used in multiple utility functions 2133 */ 2134 export interface SourceFileLike { 2135 readonly text: string; 2136 readonly fileName?: string; 2137 } 2138 export interface SourceFile extends Declaration { 2139 readonly kind: SyntaxKind.SourceFile; 2140 readonly statements: NodeArray<Statement>; 2141 readonly endOfFileToken: Token<SyntaxKind.EndOfFileToken>; 2142 fileName: string; 2143 text: string; 2144 amdDependencies: readonly AmdDependency[]; 2145 moduleName?: string; 2146 referencedFiles: readonly FileReference[]; 2147 typeReferenceDirectives: readonly FileReference[]; 2148 libReferenceDirectives: readonly FileReference[]; 2149 languageVariant: LanguageVariant; 2150 isDeclarationFile: boolean; 2151 /** 2152 * lib.d.ts should have a reference comment like 2153 * 2154 * /// <reference no-default-lib="true"/> 2155 * 2156 * If any other file has this comment, it signals not to include lib.d.ts 2157 * because this containing file is intended to act as a default library. 2158 */ 2159 hasNoDefaultLib: boolean; 2160 languageVersion: ScriptTarget; 2161 /** 2162 * When `module` is `Node16` or `NodeNext`, this field controls whether the 2163 * source file in question is an ESNext-output-format file, or a CommonJS-output-format 2164 * module. This is derived by the module resolver as it looks up the file, since 2165 * it is derived from either the file extension of the module, or the containing 2166 * `package.json` context, and affects both checking and emit. 2167 * 2168 * It is _public_ so that (pre)transformers can set this field, 2169 * since it switches the builtin `node` module transform. Generally speaking, if unset, 2170 * the field is treated as though it is `ModuleKind.CommonJS`. 2171 * 2172 * Note that this field is only set by the module resolution process when 2173 * `moduleResolution` is `Node16` or `NodeNext`, which is implied by the `module` setting 2174 * of `Node16` or `NodeNext`, respectively, but may be overriden (eg, by a `moduleResolution` 2175 * of `node`). If so, this field will be unset and source files will be considered to be 2176 * CommonJS-output-format by the node module transformer and type checker, regardless of extension or context. 2177 */ 2178 impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS; 2179 } 2180 export interface Bundle extends Node { 2181 readonly kind: SyntaxKind.Bundle; 2182 readonly prepends: readonly (InputFiles | UnparsedSource)[]; 2183 readonly sourceFiles: readonly SourceFile[]; 2184 } 2185 export interface InputFiles extends Node { 2186 readonly kind: SyntaxKind.InputFiles; 2187 javascriptPath?: string; 2188 javascriptText: string; 2189 javascriptMapPath?: string; 2190 javascriptMapText?: string; 2191 declarationPath?: string; 2192 declarationText: string; 2193 declarationMapPath?: string; 2194 declarationMapText?: string; 2195 } 2196 export interface UnparsedSource extends Node { 2197 readonly kind: SyntaxKind.UnparsedSource; 2198 fileName: string; 2199 text: string; 2200 readonly prologues: readonly UnparsedPrologue[]; 2201 helpers: readonly UnscopedEmitHelper[] | undefined; 2202 referencedFiles: readonly FileReference[]; 2203 typeReferenceDirectives: readonly FileReference[] | undefined; 2204 libReferenceDirectives: readonly FileReference[]; 2205 hasNoDefaultLib?: boolean; 2206 sourceMapPath?: string; 2207 sourceMapText?: string; 2208 readonly syntheticReferences?: readonly UnparsedSyntheticReference[]; 2209 readonly texts: readonly UnparsedSourceText[]; 2210 } 2211 export type UnparsedSourceText = UnparsedPrepend | UnparsedTextLike; 2212 export type UnparsedNode = UnparsedPrologue | UnparsedSourceText | UnparsedSyntheticReference; 2213 export interface UnparsedSection extends Node { 2214 readonly kind: SyntaxKind; 2215 readonly parent: UnparsedSource; 2216 readonly data?: string; 2217 } 2218 export interface UnparsedPrologue extends UnparsedSection { 2219 readonly kind: SyntaxKind.UnparsedPrologue; 2220 readonly parent: UnparsedSource; 2221 readonly data: string; 2222 } 2223 export interface UnparsedPrepend extends UnparsedSection { 2224 readonly kind: SyntaxKind.UnparsedPrepend; 2225 readonly parent: UnparsedSource; 2226 readonly data: string; 2227 readonly texts: readonly UnparsedTextLike[]; 2228 } 2229 export interface UnparsedTextLike extends UnparsedSection { 2230 readonly kind: SyntaxKind.UnparsedText | SyntaxKind.UnparsedInternalText; 2231 readonly parent: UnparsedSource; 2232 } 2233 export interface UnparsedSyntheticReference extends UnparsedSection { 2234 readonly kind: SyntaxKind.UnparsedSyntheticReference; 2235 readonly parent: UnparsedSource; 2236 } 2237 export interface JsonSourceFile extends SourceFile { 2238 readonly statements: NodeArray<JsonObjectExpressionStatement>; 2239 } 2240 export interface TsConfigSourceFile extends JsonSourceFile { 2241 extendedSourceFiles?: string[]; 2242 } 2243 export interface JsonMinusNumericLiteral extends PrefixUnaryExpression { 2244 readonly kind: SyntaxKind.PrefixUnaryExpression; 2245 readonly operator: SyntaxKind.MinusToken; 2246 readonly operand: NumericLiteral; 2247 } 2248 export type JsonObjectExpression = ObjectLiteralExpression | ArrayLiteralExpression | JsonMinusNumericLiteral | NumericLiteral | StringLiteral | BooleanLiteral | NullLiteral; 2249 export interface JsonObjectExpressionStatement extends ExpressionStatement { 2250 readonly expression: JsonObjectExpression; 2251 } 2252 export interface ScriptReferenceHost { 2253 getCompilerOptions(): CompilerOptions; 2254 getSourceFile(fileName: string): SourceFile | undefined; 2255 getSourceFileByPath(path: Path): SourceFile | undefined; 2256 getCurrentDirectory(): string; 2257 } 2258 export interface ParseConfigHost { 2259 useCaseSensitiveFileNames: boolean; 2260 readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[]; 2261 /** 2262 * Gets a value indicating whether the specified path exists and is a file. 2263 * @param path The path to test. 2264 */ 2265 fileExists(path: string): boolean; 2266 readFile(path: string): string | undefined; 2267 trace?(s: string): void; 2268 } 2269 /** 2270 * Branded string for keeping track of when we've turned an ambiguous path 2271 * specified like "./blah" to an absolute path to an actual 2272 * tsconfig file, e.g. "/root/blah/tsconfig.json" 2273 */ 2274 export type ResolvedConfigFileName = string & { 2275 _isResolvedConfigFileName: never; 2276 }; 2277 export interface WriteFileCallbackData { 2278 } 2279 export type WriteFileCallback = (fileName: string, text: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[], data?: WriteFileCallbackData) => void; 2280 export class OperationCanceledException { 2281 } 2282 export interface CancellationToken { 2283 isCancellationRequested(): boolean; 2284 /** @throws OperationCanceledException if isCancellationRequested is true */ 2285 throwIfCancellationRequested(): void; 2286 } 2287 export interface SymbolDisplayPart { 2288 text: string; 2289 kind: string; 2290 } 2291 export interface JsDocTagInfo { 2292 name: string; 2293 text?: string | SymbolDisplayPart[]; 2294 } 2295 export interface Program extends ScriptReferenceHost { 2296 getCurrentDirectory(): string; 2297 /** 2298 * Get a list of root file names that were passed to a 'createProgram' 2299 */ 2300 getRootFileNames(): readonly string[]; 2301 /** 2302 * Get a list of files in the program 2303 */ 2304 getSourceFiles(): readonly SourceFile[]; 2305 /** 2306 * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then 2307 * the JavaScript and declaration files will be produced for all the files in this program. 2308 * If targetSourceFile is specified, then only the JavaScript and declaration for that 2309 * specific file will be generated. 2310 * 2311 * If writeFile is not specified then the writeFile callback from the compiler host will be 2312 * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter 2313 * will be invoked when writing the JavaScript and declaration files. 2314 */ 2315 emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult; 2316 getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; 2317 getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; 2318 getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[]; 2319 /** The first time this is called, it will return global diagnostics (no location). */ 2320 getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 2321 getSemanticDiagnosticsForLinter(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 2322 getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[]; 2323 getConfigFileParsingDiagnostics(): readonly Diagnostic[]; 2324 getEtsLibSFromProgram(): string[]; 2325 /** 2326 * Gets a type checker that can be used to semantically analyze source files in the program. 2327 */ 2328 getTypeChecker(): TypeChecker; 2329 /** 2330 * Gets a type checker that can be used to semantically analyze source files in the program for arkts linter. 2331 */ 2332 getLinterTypeChecker(): TypeChecker; 2333 getNodeCount(): number; 2334 getIdentifierCount(): number; 2335 getSymbolCount(): number; 2336 getTypeCount(): number; 2337 getInstantiationCount(): number; 2338 getRelationCacheSizes(): { 2339 assignable: number; 2340 identity: number; 2341 subtype: number; 2342 strictSubtype: number; 2343 }; 2344 isSourceFileFromExternalLibrary(file: SourceFile): boolean; 2345 isSourceFileDefaultLibrary(file: SourceFile): boolean; 2346 getSourceFileFromReference(referencingFile: SourceFile | UnparsedSource, ref: FileReference): SourceFile | undefined; 2347 getProjectReferences(): readonly ProjectReference[] | undefined; 2348 getResolvedProjectReferences(): readonly (ResolvedProjectReference | undefined)[] | undefined; 2349 getJsDocNodeCheckedConfig?(jsDocFileCheckInfo: FileCheckModuleInfo, symbolSourceFilePath: string): JsDocNodeCheckConfig; 2350 getJsDocNodeConditionCheckedResult?(jsDocFileCheckedInfo: FileCheckModuleInfo, jsDocs: JsDocTagInfo[]): ConditionCheckResult; 2351 getFileCheckedModuleInfo?(containFilePath: string): FileCheckModuleInfo; 2352 /** 2353 * Release typeChecker & linterTypeChecker 2354 */ 2355 releaseTypeChecker(): void; 2356 getEmitHost(writeFileCallback?: WriteFileCallback): EmitHost; 2357 refreshTypeChecker(): void; 2358 setProgramSourceFiles(file: SourceFile): void; 2359 initProcessingFiles(): void; 2360 processImportedModules(file: SourceFile): void; 2361 getProcessingFiles(): SourceFile[] | undefined; 2362 deleteProgramSourceFiles(fileNames: string[]): void; 2363 } 2364 export type RedirectTargetsMap = ReadonlyESMap<Path, readonly string[]>; 2365 export interface ResolvedProjectReference { 2366 commandLine: ParsedCommandLine; 2367 sourceFile: SourceFile; 2368 references?: readonly (ResolvedProjectReference | undefined)[]; 2369 } 2370 export type CustomTransformerFactory = (context: TransformationContext) => CustomTransformer; 2371 export interface CustomTransformer { 2372 transformSourceFile(node: SourceFile): SourceFile; 2373 transformBundle(node: Bundle): Bundle; 2374 } 2375 export interface CustomTransformers { 2376 /** Custom transformers to evaluate before built-in .js transformations. */ 2377 before?: (TransformerFactory<SourceFile> | CustomTransformerFactory)[]; 2378 /** Custom transformers to evaluate after built-in .js transformations. */ 2379 after?: (TransformerFactory<SourceFile> | CustomTransformerFactory)[]; 2380 /** Custom transformers to evaluate after built-in .d.ts transformations. */ 2381 afterDeclarations?: (TransformerFactory<Bundle | SourceFile> | CustomTransformerFactory)[]; 2382 } 2383 export interface SourceMapSpan { 2384 /** Line number in the .js file. */ 2385 emittedLine: number; 2386 /** Column number in the .js file. */ 2387 emittedColumn: number; 2388 /** Line number in the .ts file. */ 2389 sourceLine: number; 2390 /** Column number in the .ts file. */ 2391 sourceColumn: number; 2392 /** Optional name (index into names array) associated with this span. */ 2393 nameIndex?: number; 2394 /** .ts file (index into sources array) associated with this span */ 2395 sourceIndex: number; 2396 } 2397 /** Return code used by getEmitOutput function to indicate status of the function */ 2398 export enum ExitStatus { 2399 Success = 0, 2400 DiagnosticsPresent_OutputsSkipped = 1, 2401 DiagnosticsPresent_OutputsGenerated = 2, 2402 InvalidProject_OutputsSkipped = 3, 2403 ProjectReferenceCycle_OutputsSkipped = 4, 2404 /** @deprecated Use ProjectReferenceCycle_OutputsSkipped instead. */ 2405 ProjectReferenceCycle_OutputsSkupped = 4 2406 } 2407 export interface EmitResult { 2408 emitSkipped: boolean; 2409 /** Contains declaration emit diagnostics */ 2410 diagnostics: readonly Diagnostic[]; 2411 emittedFiles?: string[]; 2412 } 2413 export interface TypeChecker { 2414 getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; 2415 getDeclaredTypeOfSymbol(symbol: Symbol): Type; 2416 getPropertiesOfType(type: Type): Symbol[]; 2417 getPropertyOfType(type: Type, propertyName: string): Symbol | undefined; 2418 getPrivateIdentifierPropertyOfType(leftType: Type, name: string, location: Node): Symbol | undefined; 2419 getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined; 2420 getIndexInfosOfType(type: Type): readonly IndexInfo[]; 2421 getIndexInfosOfIndexSymbol: (indexSymbol: Symbol) => IndexInfo[]; 2422 getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[]; 2423 getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined; 2424 getBaseTypes(type: InterfaceType): BaseType[]; 2425 getBaseTypeOfLiteralType(type: Type): Type; 2426 getWidenedType(type: Type): Type; 2427 getReturnTypeOfSignature(signature: Signature): Type; 2428 getNullableType(type: Type, flags: TypeFlags): Type; 2429 getNonNullableType(type: Type): Type; 2430 getTypeArguments(type: TypeReference): readonly Type[]; 2431 /** Note that the resulting nodes cannot be checked. */ 2432 typeToTypeNode(type: Type, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeNode | undefined; 2433 /** Note that the resulting nodes cannot be checked. */ 2434 signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): SignatureDeclaration & { 2435 typeArguments?: NodeArray<TypeNode>; 2436 } | undefined; 2437 /** Note that the resulting nodes cannot be checked. */ 2438 indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): IndexSignatureDeclaration | undefined; 2439 /** Note that the resulting nodes cannot be checked. */ 2440 symbolToEntityName(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): EntityName | undefined; 2441 /** Note that the resulting nodes cannot be checked. */ 2442 symbolToExpression(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): Expression | undefined; 2443 /** Note that the resulting nodes cannot be checked. */ 2444 symbolToTypeParameterDeclarations(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): NodeArray<TypeParameterDeclaration> | undefined; 2445 /** Note that the resulting nodes cannot be checked. */ 2446 symbolToParameterDeclaration(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): ParameterDeclaration | undefined; 2447 /** Note that the resulting nodes cannot be checked. */ 2448 typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeParameterDeclaration | undefined; 2449 getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; 2450 getSymbolAtLocation(node: Node): Symbol | undefined; 2451 getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[]; 2452 /** 2453 * The function returns the value (local variable) symbol of an identifier in the short-hand property assignment. 2454 * This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value. 2455 */ 2456 getShorthandAssignmentValueSymbol(location: Node | undefined): Symbol | undefined; 2457 getExportSpecifierLocalTargetSymbol(location: ExportSpecifier | Identifier): Symbol | undefined; 2458 /** 2459 * If a symbol is a local symbol with an associated exported symbol, returns the exported symbol. 2460 * Otherwise returns its input. 2461 * For example, at `export type T = number;`: 2462 * - `getSymbolAtLocation` at the location `T` will return the exported symbol for `T`. 2463 * - But the result of `getSymbolsInScope` will contain the *local* symbol for `T`, not the exported symbol. 2464 * - Calling `getExportSymbolOfSymbol` on that local symbol will return the exported symbol. 2465 */ 2466 getExportSymbolOfSymbol(symbol: Symbol): Symbol; 2467 getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol | undefined; 2468 getTypeOfAssignmentPattern(pattern: AssignmentPattern): Type; 2469 getTypeAtLocation(node: Node): Type; 2470 tryGetTypeAtLocationWithoutCheck(node: Node): Type; 2471 getTypeFromTypeNode(node: TypeNode): Type; 2472 signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string; 2473 typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; 2474 symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): string; 2475 typePredicateToString(predicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; 2476 getFullyQualifiedName(symbol: Symbol): string; 2477 getAugmentedPropertiesOfType(type: Type): Symbol[]; 2478 getRootSymbols(symbol: Symbol): readonly Symbol[]; 2479 getSymbolOfExpando(node: Node, allowDeclaration: boolean): Symbol | undefined; 2480 getContextualType(node: Expression): Type | undefined; 2481 /** 2482 * returns unknownSignature in the case of an error. 2483 * returns undefined if the node is not valid. 2484 * @param argumentCount Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`. 2485 */ 2486 getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined; 2487 tryGetResolvedSignatureWithoutCheck(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined; 2488 getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined; 2489 isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined; 2490 isUndefinedSymbol(symbol: Symbol): boolean; 2491 isArgumentsSymbol(symbol: Symbol): boolean; 2492 isUnknownSymbol(symbol: Symbol): boolean; 2493 getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined; 2494 isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName | ImportTypeNode, propertyName: string): boolean; 2495 /** Follow all aliases to get the original symbol. */ 2496 getAliasedSymbol(symbol: Symbol): Symbol; 2497 /** Follow a *single* alias to get the immediately aliased symbol. */ 2498 getImmediateAliasedSymbol(symbol: Symbol): Symbol | undefined; 2499 getExportsOfModule(moduleSymbol: Symbol): Symbol[]; 2500 getJsxIntrinsicTagNamesAt(location: Node): Symbol[]; 2501 isOptionalParameter(node: ParameterDeclaration): boolean; 2502 getAmbientModules(): Symbol[]; 2503 tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined; 2504 getApparentType(type: Type): Type; 2505 getBaseConstraintOfType(type: Type): Type | undefined; 2506 getDefaultFromTypeParameter(type: Type): Type | undefined; 2507 getTypePredicateOfSignature(signature: Signature): TypePredicate | undefined; 2508 /** 2509 * Depending on the operation performed, it may be appropriate to throw away the checker 2510 * if the cancellation token is triggered. Typically, if it is used for error checking 2511 * and the operation is cancelled, then it should be discarded, otherwise it is safe to keep. 2512 */ 2513 runWithCancellationToken<T>(token: CancellationToken, cb: (checker: TypeChecker) => T): T; 2514 getConstEnumRelate?(): ESMap<string, ESMap<string, string>>; 2515 clearConstEnumRelate?(): void; 2516 deleteConstEnumRelate?(path: string): void; 2517 } 2518 export enum NodeBuilderFlags { 2519 None = 0, 2520 NoTruncation = 1, 2521 WriteArrayAsGenericType = 2, 2522 GenerateNamesForShadowedTypeParams = 4, 2523 UseStructuralFallback = 8, 2524 ForbidIndexedAccessSymbolReferences = 16, 2525 WriteTypeArgumentsOfSignature = 32, 2526 UseFullyQualifiedType = 64, 2527 UseOnlyExternalAliasing = 128, 2528 SuppressAnyReturnType = 256, 2529 WriteTypeParametersInQualifiedName = 512, 2530 MultilineObjectLiterals = 1024, 2531 WriteClassExpressionAsTypeLiteral = 2048, 2532 UseTypeOfFunction = 4096, 2533 OmitParameterModifiers = 8192, 2534 UseAliasDefinedOutsideCurrentScope = 16384, 2535 UseSingleQuotesForStringLiteralType = 268435456, 2536 NoTypeReduction = 536870912, 2537 OmitThisParameter = 33554432, 2538 AllowThisInObjectLiteral = 32768, 2539 AllowQualifiedNameInPlaceOfIdentifier = 65536, 2540 /** @deprecated AllowQualifedNameInPlaceOfIdentifier. Use AllowQualifiedNameInPlaceOfIdentifier instead. */ 2541 AllowQualifedNameInPlaceOfIdentifier = 65536, 2542 AllowAnonymousIdentifier = 131072, 2543 AllowEmptyUnionOrIntersection = 262144, 2544 AllowEmptyTuple = 524288, 2545 AllowUniqueESSymbolType = 1048576, 2546 AllowEmptyIndexInfoType = 2097152, 2547 AllowNodeModulesRelativePaths = 67108864, 2548 IgnoreErrors = 70221824, 2549 InObjectTypeLiteral = 4194304, 2550 InTypeAlias = 8388608, 2551 InInitialEntityName = 16777216 2552 } 2553 export enum TypeFormatFlags { 2554 None = 0, 2555 NoTruncation = 1, 2556 WriteArrayAsGenericType = 2, 2557 UseStructuralFallback = 8, 2558 WriteTypeArgumentsOfSignature = 32, 2559 UseFullyQualifiedType = 64, 2560 SuppressAnyReturnType = 256, 2561 MultilineObjectLiterals = 1024, 2562 WriteClassExpressionAsTypeLiteral = 2048, 2563 UseTypeOfFunction = 4096, 2564 OmitParameterModifiers = 8192, 2565 UseAliasDefinedOutsideCurrentScope = 16384, 2566 UseSingleQuotesForStringLiteralType = 268435456, 2567 NoTypeReduction = 536870912, 2568 OmitThisParameter = 33554432, 2569 AllowUniqueESSymbolType = 1048576, 2570 AddUndefined = 131072, 2571 WriteArrowStyleSignature = 262144, 2572 InArrayType = 524288, 2573 InElementType = 2097152, 2574 InFirstTypeArgument = 4194304, 2575 InTypeAlias = 8388608, 2576 /** @deprecated */ WriteOwnNameForAnyLike = 0, 2577 NodeBuilderFlagsMask = 848330091 2578 } 2579 export enum SymbolFormatFlags { 2580 None = 0, 2581 WriteTypeParametersOrArguments = 1, 2582 UseOnlyExternalAliasing = 2, 2583 AllowAnyNodeKind = 4, 2584 UseAliasDefinedOutsideCurrentScope = 8, 2585 } 2586 interface SymbolWriter extends SymbolTracker { 2587 writeKeyword(text: string): void; 2588 writeOperator(text: string): void; 2589 writePunctuation(text: string): void; 2590 writeSpace(text: string): void; 2591 writeStringLiteral(text: string): void; 2592 writeParameter(text: string): void; 2593 writeProperty(text: string): void; 2594 writeSymbol(text: string, symbol: Symbol): void; 2595 writeLine(force?: boolean): void; 2596 increaseIndent(): void; 2597 decreaseIndent(): void; 2598 clear(): void; 2599 } 2600 export enum TypePredicateKind { 2601 This = 0, 2602 Identifier = 1, 2603 AssertsThis = 2, 2604 AssertsIdentifier = 3 2605 } 2606 export interface TypePredicateBase { 2607 kind: TypePredicateKind; 2608 type: Type | undefined; 2609 } 2610 export interface ThisTypePredicate extends TypePredicateBase { 2611 kind: TypePredicateKind.This; 2612 parameterName: undefined; 2613 parameterIndex: undefined; 2614 type: Type; 2615 } 2616 export interface IdentifierTypePredicate extends TypePredicateBase { 2617 kind: TypePredicateKind.Identifier; 2618 parameterName: string; 2619 parameterIndex: number; 2620 type: Type; 2621 } 2622 export interface AssertsThisTypePredicate extends TypePredicateBase { 2623 kind: TypePredicateKind.AssertsThis; 2624 parameterName: undefined; 2625 parameterIndex: undefined; 2626 type: Type | undefined; 2627 } 2628 export interface AssertsIdentifierTypePredicate extends TypePredicateBase { 2629 kind: TypePredicateKind.AssertsIdentifier; 2630 parameterName: string; 2631 parameterIndex: number; 2632 type: Type | undefined; 2633 } 2634 export type TypePredicate = ThisTypePredicate | IdentifierTypePredicate | AssertsThisTypePredicate | AssertsIdentifierTypePredicate; 2635 export enum SymbolFlags { 2636 None = 0, 2637 FunctionScopedVariable = 1, 2638 BlockScopedVariable = 2, 2639 Property = 4, 2640 EnumMember = 8, 2641 Function = 16, 2642 Class = 32, 2643 Interface = 64, 2644 ConstEnum = 128, 2645 RegularEnum = 256, 2646 ValueModule = 512, 2647 NamespaceModule = 1024, 2648 TypeLiteral = 2048, 2649 ObjectLiteral = 4096, 2650 Method = 8192, 2651 Constructor = 16384, 2652 GetAccessor = 32768, 2653 SetAccessor = 65536, 2654 Signature = 131072, 2655 TypeParameter = 262144, 2656 TypeAlias = 524288, 2657 ExportValue = 1048576, 2658 Alias = 2097152, 2659 Prototype = 4194304, 2660 ExportStar = 8388608, 2661 Optional = 16777216, 2662 Transient = 33554432, 2663 Assignment = 67108864, 2664 ModuleExports = 134217728, 2665 Annotation = 268435456, 2666 Enum = 384, 2667 Variable = 3, 2668 Value = 111551, 2669 Type = 788968, 2670 Namespace = 1920, 2671 Module = 1536, 2672 Accessor = 98304, 2673 FunctionScopedVariableExcludes = 111550, 2674 BlockScopedVariableExcludes = 111551, 2675 ParameterExcludes = 111551, 2676 PropertyExcludes = 0, 2677 EnumMemberExcludes = 900095, 2678 FunctionExcludes = 110991, 2679 ClassExcludes = 899503, 2680 InterfaceExcludes = 788872, 2681 RegularEnumExcludes = 899327, 2682 ConstEnumExcludes = 899967, 2683 ValueModuleExcludes = 110735, 2684 NamespaceModuleExcludes = 0, 2685 MethodExcludes = 103359, 2686 GetAccessorExcludes = 46015, 2687 SetAccessorExcludes = 78783, 2688 AccessorExcludes = 13247, 2689 TypeParameterExcludes = 526824, 2690 TypeAliasExcludes = 788968, 2691 AliasExcludes = 2097152, 2692 ModuleMember = 2623475, 2693 ExportHasLocal = 944, 2694 BlockScoped = 418, 2695 PropertyOrAccessor = 98308, 2696 ClassMember = 106500, 2697 } 2698 export interface Symbol { 2699 flags: SymbolFlags; 2700 escapedName: __String; 2701 declarations?: Declaration[]; 2702 valueDeclaration?: Declaration; 2703 members?: SymbolTable; 2704 exports?: SymbolTable; 2705 globalExports?: SymbolTable; 2706 exportSymbol?: Symbol; 2707 } 2708 export enum InternalSymbolName { 2709 Call = "__call", 2710 Constructor = "__constructor", 2711 New = "__new", 2712 Index = "__index", 2713 ExportStar = "__export", 2714 Global = "__global", 2715 Missing = "__missing", 2716 Type = "__type", 2717 Object = "__object", 2718 JSXAttributes = "__jsxAttributes", 2719 Class = "__class", 2720 Function = "__function", 2721 Computed = "__computed", 2722 Resolving = "__resolving__", 2723 ExportEquals = "export=", 2724 Default = "default", 2725 This = "this" 2726 } 2727 /** 2728 * This represents a string whose leading underscore have been escaped by adding extra leading underscores. 2729 * The shape of this brand is rather unique compared to others we've used. 2730 * Instead of just an intersection of a string and an object, it is that union-ed 2731 * with an intersection of void and an object. This makes it wholly incompatible 2732 * with a normal string (which is good, it cannot be misused on assignment or on usage), 2733 * while still being comparable with a normal string via === (also good) and castable from a string. 2734 */ 2735 export type __String = (string & { 2736 __escapedIdentifier: void; 2737 }) | (void & { 2738 __escapedIdentifier: void; 2739 }) | InternalSymbolName; 2740 /** ReadonlyMap where keys are `__String`s. */ 2741 export interface ReadonlyUnderscoreEscapedMap<T> extends ReadonlyESMap<__String, T> { 2742 } 2743 /** Map where keys are `__String`s. */ 2744 export interface UnderscoreEscapedMap<T> extends ESMap<__String, T>, ReadonlyUnderscoreEscapedMap<T> { 2745 } 2746 /** SymbolTable based on ES6 Map interface. */ 2747 export type SymbolTable = UnderscoreEscapedMap<Symbol>; 2748 export enum TypeFlags { 2749 Any = 1, 2750 Unknown = 2, 2751 String = 4, 2752 Number = 8, 2753 Boolean = 16, 2754 Enum = 32, 2755 BigInt = 64, 2756 StringLiteral = 128, 2757 NumberLiteral = 256, 2758 BooleanLiteral = 512, 2759 EnumLiteral = 1024, 2760 BigIntLiteral = 2048, 2761 ESSymbol = 4096, 2762 UniqueESSymbol = 8192, 2763 Void = 16384, 2764 Undefined = 32768, 2765 Null = 65536, 2766 Never = 131072, 2767 TypeParameter = 262144, 2768 Object = 524288, 2769 Union = 1048576, 2770 Intersection = 2097152, 2771 Index = 4194304, 2772 IndexedAccess = 8388608, 2773 Conditional = 16777216, 2774 Substitution = 33554432, 2775 NonPrimitive = 67108864, 2776 TemplateLiteral = 134217728, 2777 StringMapping = 268435456, 2778 Literal = 2944, 2779 Unit = 109440, 2780 StringOrNumberLiteral = 384, 2781 PossiblyFalsy = 117724, 2782 StringLike = 402653316, 2783 NumberLike = 296, 2784 BigIntLike = 2112, 2785 BooleanLike = 528, 2786 EnumLike = 1056, 2787 ESSymbolLike = 12288, 2788 VoidLike = 49152, 2789 UnionOrIntersection = 3145728, 2790 StructuredType = 3670016, 2791 TypeVariable = 8650752, 2792 InstantiableNonPrimitive = 58982400, 2793 InstantiablePrimitive = 406847488, 2794 Instantiable = 465829888, 2795 StructuredOrInstantiable = 469499904, 2796 Narrowable = 536624127, 2797 } 2798 export type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression; 2799 export interface Type { 2800 flags: TypeFlags; 2801 symbol: Symbol; 2802 pattern?: DestructuringPattern; 2803 aliasSymbol?: Symbol; 2804 aliasTypeArguments?: readonly Type[]; 2805 } 2806 export interface LiteralType extends Type { 2807 value: string | number | PseudoBigInt; 2808 freshType: LiteralType; 2809 regularType: LiteralType; 2810 } 2811 export interface UniqueESSymbolType extends Type { 2812 symbol: Symbol; 2813 escapedName: __String; 2814 } 2815 export interface StringLiteralType extends LiteralType { 2816 value: string; 2817 } 2818 export interface NumberLiteralType extends LiteralType { 2819 value: number; 2820 } 2821 export interface BigIntLiteralType extends LiteralType { 2822 value: PseudoBigInt; 2823 } 2824 export interface EnumType extends Type { 2825 } 2826 export enum ObjectFlags { 2827 Class = 1, 2828 Interface = 2, 2829 Reference = 4, 2830 Tuple = 8, 2831 Anonymous = 16, 2832 Mapped = 32, 2833 Instantiated = 64, 2834 ObjectLiteral = 128, 2835 EvolvingArray = 256, 2836 ObjectLiteralPatternWithComputedProperties = 512, 2837 ReverseMapped = 1024, 2838 JsxAttributes = 2048, 2839 JSLiteral = 4096, 2840 FreshLiteral = 8192, 2841 ArrayLiteral = 16384, 2842 Annotation = 134217728, 2843 ClassOrInterface = 3, 2844 ContainsSpread = 2097152, 2845 ObjectRestType = 4194304, 2846 InstantiationExpressionType = 8388608, 2847 } 2848 export interface ObjectType extends Type { 2849 objectFlags: ObjectFlags; 2850 } 2851 /** Class and interface types (ObjectFlags.Class and ObjectFlags.Interface). */ 2852 export interface InterfaceType extends ObjectType { 2853 typeParameters: TypeParameter[] | undefined; 2854 outerTypeParameters: TypeParameter[] | undefined; 2855 localTypeParameters: TypeParameter[] | undefined; 2856 thisType: TypeParameter | undefined; 2857 } 2858 export type BaseType = ObjectType | IntersectionType | TypeVariable; 2859 export interface InterfaceTypeWithDeclaredMembers extends InterfaceType { 2860 declaredProperties: Symbol[]; 2861 declaredCallSignatures: Signature[]; 2862 declaredConstructSignatures: Signature[]; 2863 declaredIndexInfos: IndexInfo[]; 2864 } 2865 /** 2866 * Type references (ObjectFlags.Reference). When a class or interface has type parameters or 2867 * a "this" type, references to the class or interface are made using type references. The 2868 * typeArguments property specifies the types to substitute for the type parameters of the 2869 * class or interface and optionally includes an extra element that specifies the type to 2870 * substitute for "this" in the resulting instantiation. When no extra argument is present, 2871 * the type reference itself is substituted for "this". The typeArguments property is undefined 2872 * if the class or interface has no type parameters and the reference isn't specifying an 2873 * explicit "this" argument. 2874 */ 2875 export interface TypeReference extends ObjectType { 2876 target: GenericType; 2877 node?: TypeReferenceNode | ArrayTypeNode | TupleTypeNode; 2878 } 2879 export interface DeferredTypeReference extends TypeReference { 2880 } 2881 export interface GenericType extends InterfaceType, TypeReference { 2882 } 2883 export enum ElementFlags { 2884 Required = 1, 2885 Optional = 2, 2886 Rest = 4, 2887 Variadic = 8, 2888 Fixed = 3, 2889 Variable = 12, 2890 NonRequired = 14, 2891 NonRest = 11 2892 } 2893 export interface TupleType extends GenericType { 2894 elementFlags: readonly ElementFlags[]; 2895 minLength: number; 2896 fixedLength: number; 2897 hasRestElement: boolean; 2898 combinedFlags: ElementFlags; 2899 readonly: boolean; 2900 labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration)[]; 2901 } 2902 export interface TupleTypeReference extends TypeReference { 2903 target: TupleType; 2904 } 2905 export interface UnionOrIntersectionType extends Type { 2906 types: Type[]; 2907 } 2908 export interface UnionType extends UnionOrIntersectionType { 2909 } 2910 export interface IntersectionType extends UnionOrIntersectionType { 2911 } 2912 export type StructuredType = ObjectType | UnionType | IntersectionType; 2913 export interface EvolvingArrayType extends ObjectType { 2914 elementType: Type; 2915 finalArrayType?: Type; 2916 } 2917 export interface InstantiableType extends Type { 2918 } 2919 export interface TypeParameter extends InstantiableType { 2920 } 2921 export interface IndexedAccessType extends InstantiableType { 2922 objectType: Type; 2923 indexType: Type; 2924 constraint?: Type; 2925 simplifiedForReading?: Type; 2926 simplifiedForWriting?: Type; 2927 } 2928 export type TypeVariable = TypeParameter | IndexedAccessType; 2929 export interface IndexType extends InstantiableType { 2930 type: InstantiableType | UnionOrIntersectionType; 2931 } 2932 export interface ConditionalRoot { 2933 node: ConditionalTypeNode; 2934 checkType: Type; 2935 extendsType: Type; 2936 isDistributive: boolean; 2937 inferTypeParameters?: TypeParameter[]; 2938 outerTypeParameters?: TypeParameter[]; 2939 instantiations?: Map<Type>; 2940 aliasSymbol?: Symbol; 2941 aliasTypeArguments?: Type[]; 2942 } 2943 export interface ConditionalType extends InstantiableType { 2944 root: ConditionalRoot; 2945 checkType: Type; 2946 extendsType: Type; 2947 resolvedTrueType?: Type; 2948 resolvedFalseType?: Type; 2949 } 2950 export interface TemplateLiteralType extends InstantiableType { 2951 texts: readonly string[]; 2952 types: readonly Type[]; 2953 } 2954 export interface StringMappingType extends InstantiableType { 2955 symbol: Symbol; 2956 type: Type; 2957 } 2958 export interface SubstitutionType extends InstantiableType { 2959 objectFlags: ObjectFlags; 2960 baseType: Type; 2961 constraint: Type; 2962 } 2963 export enum SignatureKind { 2964 Call = 0, 2965 Construct = 1 2966 } 2967 export interface Signature { 2968 declaration?: SignatureDeclaration | JSDocSignature; 2969 typeParameters?: readonly TypeParameter[]; 2970 parameters: readonly Symbol[]; 2971 } 2972 export enum IndexKind { 2973 String = 0, 2974 Number = 1 2975 } 2976 export interface IndexInfo { 2977 keyType: Type; 2978 type: Type; 2979 isReadonly: boolean; 2980 declaration?: IndexSignatureDeclaration; 2981 } 2982 export enum InferencePriority { 2983 NakedTypeVariable = 1, 2984 SpeculativeTuple = 2, 2985 SubstituteSource = 4, 2986 HomomorphicMappedType = 8, 2987 PartialHomomorphicMappedType = 16, 2988 MappedTypeConstraint = 32, 2989 ContravariantConditional = 64, 2990 ReturnType = 128, 2991 LiteralKeyof = 256, 2992 NoConstraints = 512, 2993 AlwaysStrict = 1024, 2994 MaxValue = 2048, 2995 PriorityImpliesCombination = 416, 2996 Circularity = -1 2997 } 2998 /** @deprecated Use FileExtensionInfo instead. */ 2999 export type JsFileExtensionInfo = FileExtensionInfo; 3000 export interface FileExtensionInfo { 3001 extension: string; 3002 isMixedContent: boolean; 3003 scriptKind?: ScriptKind; 3004 } 3005 export interface DiagnosticMessage { 3006 key: string; 3007 category: DiagnosticCategory; 3008 code: number; 3009 message: string; 3010 reportsUnnecessary?: {}; 3011 reportsDeprecated?: {}; 3012 } 3013 /** 3014 * A linked list of formatted diagnostic messages to be used as part of a multiline message. 3015 * It is built from the bottom up, leaving the head to be the "main" diagnostic. 3016 * While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage, 3017 * the difference is that messages are all preformatted in DMC. 3018 */ 3019 export interface DiagnosticMessageChain { 3020 messageText: string; 3021 category: DiagnosticCategory; 3022 code: number; 3023 next?: DiagnosticMessageChain[]; 3024 } 3025 export interface Diagnostic extends DiagnosticRelatedInformation { 3026 /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */ 3027 reportsUnnecessary?: {}; 3028 reportsDeprecated?: {}; 3029 source?: string; 3030 relatedInformation?: DiagnosticRelatedInformation[]; 3031 } 3032 export interface DiagnosticRelatedInformation { 3033 category: DiagnosticCategory; 3034 code: number; 3035 file: SourceFile | undefined; 3036 start: number | undefined; 3037 length: number | undefined; 3038 messageText: string | DiagnosticMessageChain; 3039 } 3040 export interface DiagnosticWithLocation extends Diagnostic { 3041 file: SourceFile; 3042 start: number; 3043 length: number; 3044 } 3045 export enum DiagnosticCategory { 3046 Warning = 0, 3047 Error = 1, 3048 Suggestion = 2, 3049 Message = 3 3050 } 3051 export enum ModuleResolutionKind { 3052 Classic = 1, 3053 NodeJs = 2, 3054 Node16 = 3, 3055 NodeNext = 99 3056 } 3057 export enum ModuleDetectionKind { 3058 /** 3059 * Files with imports, exports and/or import.meta are considered modules 3060 */ 3061 Legacy = 1, 3062 /** 3063 * Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node16+ 3064 */ 3065 Auto = 2, 3066 /** 3067 * Consider all non-declaration files modules, regardless of present syntax 3068 */ 3069 Force = 3 3070 } 3071 export interface PluginImport { 3072 name: string; 3073 } 3074 export interface ProjectReference { 3075 /** A normalized path on disk */ 3076 path: string; 3077 /** The path as the user originally wrote it */ 3078 originalPath?: string; 3079 /** True if the output of this reference should be prepended to the output of this project. Only valid for --outFile compilations */ 3080 prepend?: boolean; 3081 /** True if it is intended that this reference form a circularity */ 3082 circular?: boolean; 3083 } 3084 export enum WatchFileKind { 3085 FixedPollingInterval = 0, 3086 PriorityPollingInterval = 1, 3087 DynamicPriorityPolling = 2, 3088 FixedChunkSizePolling = 3, 3089 UseFsEvents = 4, 3090 UseFsEventsOnParentDirectory = 5 3091 } 3092 export enum WatchDirectoryKind { 3093 UseFsEvents = 0, 3094 FixedPollingInterval = 1, 3095 DynamicPriorityPolling = 2, 3096 FixedChunkSizePolling = 3 3097 } 3098 export enum PollingWatchKind { 3099 FixedInterval = 0, 3100 PriorityInterval = 1, 3101 DynamicPriority = 2, 3102 FixedChunkSize = 3 3103 } 3104 export type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined | EtsOptions; 3105 export interface CompilerOptions { 3106 allowJs?: boolean; 3107 allowSyntheticDefaultImports?: boolean; 3108 allowUmdGlobalAccess?: boolean; 3109 allowUnreachableCode?: boolean; 3110 allowUnusedLabels?: boolean; 3111 alwaysStrict?: boolean; 3112 baseUrl?: string; 3113 charset?: string; 3114 checkJs?: boolean; 3115 declaration?: boolean; 3116 declarationMap?: boolean; 3117 emitDeclarationOnly?: boolean; 3118 declarationDir?: string; 3119 disableSizeLimit?: boolean; 3120 disableSourceOfProjectReferenceRedirect?: boolean; 3121 disableSolutionSearching?: boolean; 3122 disableReferencedProjectLoad?: boolean; 3123 downlevelIteration?: boolean; 3124 emitBOM?: boolean; 3125 emitDecoratorMetadata?: boolean; 3126 exactOptionalPropertyTypes?: boolean; 3127 experimentalDecorators?: boolean; 3128 forceConsistentCasingInFileNames?: boolean; 3129 importHelpers?: boolean; 3130 importsNotUsedAsValues?: ImportsNotUsedAsValues; 3131 inlineSourceMap?: boolean; 3132 inlineSources?: boolean; 3133 isolatedModules?: boolean; 3134 jsx?: JsxEmit; 3135 keyofStringsOnly?: boolean; 3136 lib?: string[]; 3137 locale?: string; 3138 mapRoot?: string; 3139 maxNodeModuleJsDepth?: number; 3140 module?: ModuleKind; 3141 moduleResolution?: ModuleResolutionKind; 3142 moduleSuffixes?: string[]; 3143 moduleDetection?: ModuleDetectionKind; 3144 newLine?: NewLineKind; 3145 noEmit?: boolean; 3146 noEmitHelpers?: boolean; 3147 noEmitOnError?: boolean; 3148 noErrorTruncation?: boolean; 3149 noFallthroughCasesInSwitch?: boolean; 3150 noImplicitAny?: boolean; 3151 noImplicitReturns?: boolean; 3152 noImplicitThis?: boolean; 3153 noStrictGenericChecks?: boolean; 3154 noUnusedLocals?: boolean; 3155 noUnusedParameters?: boolean; 3156 noImplicitUseStrict?: boolean; 3157 noPropertyAccessFromIndexSignature?: boolean; 3158 assumeChangesOnlyAffectDirectDependencies?: boolean; 3159 noLib?: boolean; 3160 noResolve?: boolean; 3161 noUncheckedIndexedAccess?: boolean; 3162 out?: string; 3163 outDir?: string; 3164 outFile?: string; 3165 paths?: MapLike<string[]>; 3166 preserveConstEnums?: boolean; 3167 noImplicitOverride?: boolean; 3168 preserveSymlinks?: boolean; 3169 preserveValueImports?: boolean; 3170 project?: string; 3171 reactNamespace?: string; 3172 jsxFactory?: string; 3173 jsxFragmentFactory?: string; 3174 jsxImportSource?: string; 3175 composite?: boolean; 3176 incremental?: boolean; 3177 tsBuildInfoFile?: string; 3178 removeComments?: boolean; 3179 rootDir?: string; 3180 rootDirs?: string[]; 3181 skipLibCheck?: boolean; 3182 skipDefaultLibCheck?: boolean; 3183 sourceMap?: boolean; 3184 sourceRoot?: string; 3185 strict?: boolean; 3186 strictFunctionTypes?: boolean; 3187 strictBindCallApply?: boolean; 3188 strictNullChecks?: boolean; 3189 strictPropertyInitialization?: boolean; 3190 stripInternal?: boolean; 3191 suppressExcessPropertyErrors?: boolean; 3192 suppressImplicitAnyIndexErrors?: boolean; 3193 target?: ScriptTarget; 3194 traceResolution?: boolean; 3195 useUnknownInCatchVariables?: boolean; 3196 resolveJsonModule?: boolean; 3197 types?: string[]; 3198 /** Paths used to compute primary types search locations */ 3199 typeRoots?: string[]; 3200 esModuleInterop?: boolean; 3201 useDefineForClassFields?: boolean; 3202 ets?: EtsOptions; 3203 packageManagerType?: string; 3204 emitNodeModulesFiles?: boolean; 3205 etsLoaderPath?: string; 3206 tsImportSendableEnable?: boolean; 3207 skipPathsInKeyForCompilationSettings?: boolean; 3208 compatibleSdkVersion?: number; 3209 compatibleSdkVersionStage?: string; 3210 noTransformedKitInParser?: boolean; 3211 [option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined; 3212 etsAnnotationsEnable?: boolean; 3213 maxFlowDepth?: number; 3214 } 3215 export interface EtsOptions { 3216 render: { 3217 method: string[]; 3218 decorator: string[]; 3219 }; 3220 components: string[]; 3221 libs: string[]; 3222 extend: { 3223 decorator: string[]; 3224 components: { 3225 name: string; 3226 type: string; 3227 instance: string; 3228 }[]; 3229 }; 3230 styles: { 3231 decorator: string; 3232 component: { 3233 name: string; 3234 type: string; 3235 instance: string; 3236 }; 3237 property: string; 3238 }; 3239 concurrent: { 3240 decorator: string; 3241 }; 3242 customComponent?: string; 3243 propertyDecorators: { 3244 name: string; 3245 needInitialization: boolean; 3246 }[]; 3247 emitDecorators: { 3248 name: string; 3249 emitParameters: boolean; 3250 }[]; 3251 syntaxComponents: { 3252 paramsUICallback: string[]; 3253 attrUICallback: { 3254 name: string; 3255 attributes: string[]; 3256 }[]; 3257 }; 3258 } 3259 export interface WatchOptions { 3260 watchFile?: WatchFileKind; 3261 watchDirectory?: WatchDirectoryKind; 3262 fallbackPolling?: PollingWatchKind; 3263 synchronousWatchDirectory?: boolean; 3264 excludeDirectories?: string[]; 3265 excludeFiles?: string[]; 3266 [option: string]: CompilerOptionsValue | undefined; 3267 } 3268 export interface TypeAcquisition { 3269 /** 3270 * @deprecated typingOptions.enableAutoDiscovery 3271 * Use typeAcquisition.enable instead. 3272 */ 3273 enableAutoDiscovery?: boolean; 3274 enable?: boolean; 3275 include?: string[]; 3276 exclude?: string[]; 3277 disableFilenameBasedTypeAcquisition?: boolean; 3278 [option: string]: CompilerOptionsValue | undefined; 3279 } 3280 export enum ModuleKind { 3281 None = 0, 3282 CommonJS = 1, 3283 AMD = 2, 3284 UMD = 3, 3285 System = 4, 3286 ES2015 = 5, 3287 ES2020 = 6, 3288 ES2022 = 7, 3289 ESNext = 99, 3290 Node16 = 100, 3291 NodeNext = 199 3292 } 3293 export enum JsxEmit { 3294 None = 0, 3295 Preserve = 1, 3296 React = 2, 3297 ReactNative = 3, 3298 ReactJSX = 4, 3299 ReactJSXDev = 5 3300 } 3301 export enum ImportsNotUsedAsValues { 3302 Remove = 0, 3303 Preserve = 1, 3304 Error = 2 3305 } 3306 export enum NewLineKind { 3307 CarriageReturnLineFeed = 0, 3308 LineFeed = 1 3309 } 3310 export interface LineAndCharacter { 3311 /** 0-based. */ 3312 line: number; 3313 character: number; 3314 } 3315 export enum ScriptKind { 3316 Unknown = 0, 3317 JS = 1, 3318 JSX = 2, 3319 TS = 3, 3320 TSX = 4, 3321 External = 5, 3322 JSON = 6, 3323 /** 3324 * Used on extensions that doesn't define the ScriptKind but the content defines it. 3325 * Deferred extensions are going to be included in all project contexts. 3326 */ 3327 Deferred = 7, 3328 ETS = 8 3329 } 3330 export enum ScriptTarget { 3331 ES3 = 0, 3332 ES5 = 1, 3333 ES2015 = 2, 3334 ES2016 = 3, 3335 ES2017 = 4, 3336 ES2018 = 5, 3337 ES2019 = 6, 3338 ES2020 = 7, 3339 ES2021 = 8, 3340 ES2022 = 9, 3341 ESNext = 99, 3342 JSON = 100, 3343 Latest = 99 3344 } 3345 export enum LanguageVariant { 3346 Standard = 0, 3347 JSX = 1 3348 } 3349 /** Either a parsed command line or a parsed tsconfig.json */ 3350 export interface ParsedCommandLine { 3351 options: CompilerOptions; 3352 typeAcquisition?: TypeAcquisition; 3353 fileNames: string[]; 3354 projectReferences?: readonly ProjectReference[]; 3355 watchOptions?: WatchOptions; 3356 raw?: any; 3357 errors: Diagnostic[]; 3358 wildcardDirectories?: MapLike<WatchDirectoryFlags>; 3359 compileOnSave?: boolean; 3360 } 3361 export enum WatchDirectoryFlags { 3362 None = 0, 3363 Recursive = 1 3364 } 3365 export interface CreateProgramOptions { 3366 rootNames: readonly string[]; 3367 options: CompilerOptions; 3368 projectReferences?: readonly ProjectReference[]; 3369 host?: CompilerHost; 3370 oldProgram?: Program; 3371 configFileParsingDiagnostics?: readonly Diagnostic[]; 3372 } 3373 export interface ModuleResolutionHost { 3374 fileExists(fileName: string): boolean; 3375 readFile(fileName: string): string | undefined; 3376 trace?(s: string): void; 3377 directoryExists?(directoryName: string): boolean; 3378 /** 3379 * Resolve a symbolic link. 3380 * @see https://nodejs.org/api/fs.html#fs_fs_realpathsync_path_options 3381 */ 3382 realpath?(path: string): string; 3383 getCurrentDirectory?(): string; 3384 getDirectories?(path: string): string[]; 3385 useCaseSensitiveFileNames?: boolean | (() => boolean) | undefined; 3386 getJsDocNodeCheckedConfig?(jsDocFileCheckInfo: FileCheckModuleInfo, symbolSourceFilePath: string): JsDocNodeCheckConfig; 3387 getJsDocNodeConditionCheckedResult?(jsDocFileCheckedInfo: FileCheckModuleInfo, jsDocs: JsDocTagInfo[]): ConditionCheckResult; 3388 getFileCheckedModuleInfo?(containFilePath: string): FileCheckModuleInfo; 3389 } 3390 /** 3391 * Used by services to specify the minimum host area required to set up source files under any compilation settings 3392 */ 3393 export interface MinimalResolutionCacheHost extends ModuleResolutionHost { 3394 getCompilationSettings(): CompilerOptions; 3395 getCompilerHost?(): CompilerHost | undefined; 3396 } 3397 /** 3398 * Represents the result of module resolution. 3399 * Module resolution will pick up tsx/jsx/js files even if '--jsx' and '--allowJs' are turned off. 3400 * The Program will then filter results based on these flags. 3401 * 3402 * Prefer to return a `ResolvedModuleFull` so that the file type does not have to be inferred. 3403 */ 3404 export interface ResolvedModule { 3405 /** Path of the file the module was resolved to. */ 3406 resolvedFileName: string; 3407 /** True if `resolvedFileName` comes from `node_modules`. */ 3408 isExternalLibraryImport?: boolean; 3409 } 3410 /** 3411 * ResolvedModule with an explicitly provided `extension` property. 3412 * Prefer this over `ResolvedModule`. 3413 * If changing this, remember to change `moduleResolutionIsEqualTo`. 3414 */ 3415 export interface ResolvedModuleFull extends ResolvedModule { 3416 /** 3417 * Extension of resolvedFileName. This must match what's at the end of resolvedFileName. 3418 * This is optional for backwards-compatibility, but will be added if not provided. 3419 */ 3420 extension: Extension; 3421 packageId?: PackageId; 3422 } 3423 /** 3424 * Unique identifier with a package name and version. 3425 * If changing this, remember to change `packageIdIsEqual`. 3426 */ 3427 export interface PackageId { 3428 /** 3429 * Name of the package. 3430 * Should not include `@types`. 3431 * If accessing a non-index file, this should include its name e.g. "foo/bar". 3432 */ 3433 name: string; 3434 /** 3435 * Name of a submodule within this package. 3436 * May be "". 3437 */ 3438 subModuleName: string; 3439 /** Version of the package, e.g. "1.2.3" */ 3440 version: string; 3441 } 3442 export enum Extension { 3443 Ts = ".ts", 3444 Tsx = ".tsx", 3445 Dts = ".d.ts", 3446 Js = ".js", 3447 Jsx = ".jsx", 3448 Json = ".json", 3449 TsBuildInfo = ".tsbuildinfo", 3450 Mjs = ".mjs", 3451 Mts = ".mts", 3452 Dmts = ".d.mts", 3453 Cjs = ".cjs", 3454 Cts = ".cts", 3455 Dcts = ".d.cts", 3456 Ets = ".ets", 3457 Dets = ".d.ets" 3458 } 3459 export interface ResolvedModuleWithFailedLookupLocations { 3460 readonly resolvedModule: ResolvedModuleFull | undefined; 3461 } 3462 export interface ResolvedTypeReferenceDirective { 3463 primary: boolean; 3464 resolvedFileName: string | undefined; 3465 packageId?: PackageId; 3466 /** True if `resolvedFileName` comes from `node_modules` or `oh_modules`. */ 3467 isExternalLibraryImport?: boolean; 3468 } 3469 export interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations { 3470 readonly resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective | undefined; 3471 readonly failedLookupLocations: string[]; 3472 } 3473 export interface FileCheckModuleInfo { 3474 fileNeedCheck: boolean; 3475 checkPayload: any; 3476 currentFileName: string; 3477 } 3478 export interface JsDocNodeCheckConfig { 3479 nodeNeedCheck: boolean; 3480 checkConfig: JsDocNodeCheckConfigItem[]; 3481 } 3482 export interface JsDocNodeCheckConfigItem { 3483 tagName: string[]; 3484 message: string; 3485 needConditionCheck: boolean; 3486 type: DiagnosticCategory; 3487 specifyCheckConditionFuncName: string; 3488 tagNameShouldExisted: boolean; 3489 checkValidCallback?: (jsDocTag: JSDocTag, config: JsDocNodeCheckConfigItem) => boolean; 3490 checkJsDocSpecialValidCallback?: (jsDocTags: readonly JSDocTag[], config: JsDocNodeCheckConfigItem) => boolean; 3491 } 3492 export interface TagCheckParam { 3493 needCheck: boolean; 3494 checkConfig: TagCheckConfig[]; 3495 } 3496 export interface TagCheckConfig { 3497 tagName: string; 3498 message: string; 3499 needConditionCheck: boolean; 3500 specifyCheckConditionFuncName: string; 3501 } 3502 export interface ConditionCheckResult { 3503 valid: boolean; 3504 type?: DiagnosticCategory; 3505 message?: string; 3506 } 3507 export interface CompilerHost extends ModuleResolutionHost { 3508 getSourceFile(fileName: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean, options?: CompilerOptions): SourceFile | undefined; 3509 getSourceFileByPath?(fileName: string, path: Path, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined; 3510 getCancellationToken?(): CancellationToken; 3511 getDefaultLibFileName(options: CompilerOptions): string; 3512 getDefaultLibLocation?(): string; 3513 writeFile: WriteFileCallback; 3514 getCurrentDirectory(): string; 3515 getCanonicalFileName(fileName: string): string; 3516 useCaseSensitiveFileNames(): boolean; 3517 getNewLine(): string; 3518 readDirectory?(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): string[]; 3519 resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[]; 3520 /** 3521 * 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 3522 */ 3523 getModuleResolutionCache?(): ModuleResolutionCache | undefined; 3524 /** 3525 * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files 3526 */ 3527 resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[]; 3528 getEnvironmentVariable?(name: string): string | undefined; 3529 /** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */ 3530 hasInvalidatedResolutions?(filePath: Path): boolean; 3531 createHash?(data: string): string; 3532 getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; 3533 /** 3534 * get tagName where need to be determined based on the file path 3535 * @param jsDocFileCheckInfo filePath 3536 * @param symbolSourceFilePath filePath 3537 */ 3538 getJsDocNodeCheckedConfig?(jsDocFileCheckInfo: FileCheckModuleInfo, symbolSourceFilePath: string): JsDocNodeCheckConfig; 3539 /** 3540 * get checked results based on the file path and jsDocs 3541 * @param jsDocFileCheckedInfo 3542 * @param jsDocs 3543 */ 3544 getJsDocNodeConditionCheckedResult?(jsDocFileCheckedInfo: FileCheckModuleInfo, jsDocs: JsDocTagInfo[]): ConditionCheckResult; 3545 getFileCheckedModuleInfo?(containFilePath: string): FileCheckModuleInfo; 3546 getLastCompiledProgram?(): Program; 3547 } 3548 export interface SourceMapRange extends TextRange { 3549 source?: SourceMapSource; 3550 } 3551 export interface SourceMapSource { 3552 fileName: string; 3553 text: string; 3554 skipTrivia?: (pos: number) => number; 3555 } 3556 export enum EmitFlags { 3557 None = 0, 3558 SingleLine = 1, 3559 AdviseOnEmitNode = 2, 3560 NoSubstitution = 4, 3561 CapturesThis = 8, 3562 NoLeadingSourceMap = 16, 3563 NoTrailingSourceMap = 32, 3564 NoSourceMap = 48, 3565 NoNestedSourceMaps = 64, 3566 NoTokenLeadingSourceMaps = 128, 3567 NoTokenTrailingSourceMaps = 256, 3568 NoTokenSourceMaps = 384, 3569 NoLeadingComments = 512, 3570 NoTrailingComments = 1024, 3571 NoComments = 1536, 3572 NoNestedComments = 2048, 3573 HelperName = 4096, 3574 ExportName = 8192, 3575 LocalName = 16384, 3576 InternalName = 32768, 3577 Indented = 65536, 3578 NoIndentation = 131072, 3579 AsyncFunctionBody = 262144, 3580 ReuseTempVariableScope = 524288, 3581 CustomPrologue = 1048576, 3582 NoHoisting = 2097152, 3583 HasEndOfDeclarationMarker = 4194304, 3584 Iterator = 8388608, 3585 NoAsciiEscaping = 16777216, 3586 } 3587 export interface EmitHelperBase { 3588 readonly name: string; 3589 readonly scoped: boolean; 3590 readonly text: string | ((node: EmitHelperUniqueNameCallback) => string); 3591 readonly priority?: number; 3592 readonly dependencies?: EmitHelper[]; 3593 } 3594 export interface ScopedEmitHelper extends EmitHelperBase { 3595 readonly scoped: true; 3596 } 3597 export interface UnscopedEmitHelper extends EmitHelperBase { 3598 readonly scoped: false; 3599 readonly text: string; 3600 } 3601 export type EmitHelper = ScopedEmitHelper | UnscopedEmitHelper; 3602 export type EmitHelperUniqueNameCallback = (name: string) => string; 3603 export enum EmitHint { 3604 SourceFile = 0, 3605 Expression = 1, 3606 IdentifierName = 2, 3607 MappedTypeParameter = 3, 3608 Unspecified = 4, 3609 EmbeddedStatement = 5, 3610 JsxAttributeValue = 6 3611 } 3612 export interface SourceFileMayBeEmittedHost { 3613 getCompilerOptions(): CompilerOptions; 3614 isSourceFileFromExternalLibrary(file: SourceFile): boolean; 3615 getResolvedProjectReferenceToRedirect(fileName: string): ResolvedProjectReference | undefined; 3616 isSourceOfProjectReferenceRedirect(fileName: string): boolean; 3617 } 3618 export interface EmitHost extends ScriptReferenceHost, ModuleSpecifierResolutionHost, SourceFileMayBeEmittedHost { 3619 getSourceFiles(): readonly SourceFile[]; 3620 useCaseSensitiveFileNames(): boolean; 3621 getCurrentDirectory(): string; 3622 getLibFileFromReference(ref: FileReference): SourceFile | undefined; 3623 getCommonSourceDirectory(): string; 3624 getCanonicalFileName(fileName: string): string; 3625 getNewLine(): string; 3626 isEmitBlocked(emitFileName: string): boolean; 3627 getPrependNodes(): readonly (InputFiles | UnparsedSource)[]; 3628 writeFile: WriteFileCallback; 3629 getSourceFileFromReference: Program["getSourceFileFromReference"]; 3630 readonly redirectTargetsMap: RedirectTargetsMap; 3631 createHash?(data: string): string; 3632 } 3633 export enum OuterExpressionKinds { 3634 Parentheses = 1, 3635 TypeAssertions = 2, 3636 NonNullAssertions = 4, 3637 PartiallyEmittedExpressions = 8, 3638 Assertions = 6, 3639 All = 15, 3640 ExcludeJSDocTypeAssertion = 16 3641 } 3642 export type TypeOfTag = "undefined" | "number" | "bigint" | "boolean" | "string" | "symbol" | "object" | "function"; 3643 export interface NodeFactory { 3644 createNodeArray<T extends Node>(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray<T>; 3645 createNumericLiteral(value: string | number, numericLiteralFlags?: TokenFlags): NumericLiteral; 3646 createBigIntLiteral(value: string | PseudoBigInt): BigIntLiteral; 3647 createStringLiteral(text: string, isSingleQuote?: boolean): StringLiteral; 3648 createStringLiteralFromNode(sourceNode: PropertyNameLiteral | PrivateIdentifier, isSingleQuote?: boolean): StringLiteral; 3649 createRegularExpressionLiteral(text: string): RegularExpressionLiteral; 3650 createIdentifier(text: string): Identifier; 3651 /** 3652 * Create a unique temporary variable. 3653 * @param recordTempVariable An optional callback used to record the temporary variable name. This 3654 * should usually be a reference to `hoistVariableDeclaration` from a `TransformationContext`, but 3655 * can be `undefined` if you plan to record the temporary variable manually. 3656 * @param reservedInNestedScopes When `true`, reserves the temporary variable name in all nested scopes 3657 * during emit so that the variable can be referenced in a nested function body. This is an alternative to 3658 * setting `EmitFlags.ReuseTempVariableScope` on the nested function itself. 3659 */ 3660 createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined, reservedInNestedScopes?: boolean): Identifier; 3661 /** 3662 * Create a unique temporary variable for use in a loop. 3663 * @param reservedInNestedScopes When `true`, reserves the temporary variable name in all nested scopes 3664 * during emit so that the variable can be referenced in a nested function body. This is an alternative to 3665 * setting `EmitFlags.ReuseTempVariableScope` on the nested function itself. 3666 */ 3667 createLoopVariable(reservedInNestedScopes?: boolean): Identifier; 3668 /** Create a unique name based on the supplied text. */ 3669 createUniqueName(text: string, flags?: GeneratedIdentifierFlags): Identifier; 3670 /** Create a unique name generated for a node. */ 3671 getGeneratedNameForNode(node: Node | undefined, flags?: GeneratedIdentifierFlags): Identifier; 3672 createPrivateIdentifier(text: string): PrivateIdentifier; 3673 createUniquePrivateName(text?: string): PrivateIdentifier; 3674 getGeneratedPrivateNameForNode(node: Node): PrivateIdentifier; 3675 createToken(token: SyntaxKind.SuperKeyword): SuperExpression; 3676 createToken(token: SyntaxKind.ThisKeyword): ThisExpression; 3677 createToken(token: SyntaxKind.NullKeyword): NullLiteral; 3678 createToken(token: SyntaxKind.TrueKeyword): TrueLiteral; 3679 createToken(token: SyntaxKind.FalseKeyword): FalseLiteral; 3680 createToken<TKind extends PunctuationSyntaxKind>(token: TKind): PunctuationToken<TKind>; 3681 createToken<TKind extends KeywordTypeSyntaxKind>(token: TKind): KeywordTypeNode<TKind>; 3682 createToken<TKind extends ModifierSyntaxKind>(token: TKind): ModifierToken<TKind>; 3683 createToken<TKind extends KeywordSyntaxKind>(token: TKind): KeywordToken<TKind>; 3684 createToken<TKind extends SyntaxKind.Unknown | SyntaxKind.EndOfFileToken>(token: TKind): Token<TKind>; 3685 createSuper(): SuperExpression; 3686 createThis(): ThisExpression; 3687 createNull(): NullLiteral; 3688 createTrue(): TrueLiteral; 3689 createFalse(): FalseLiteral; 3690 createModifier<T extends ModifierSyntaxKind>(kind: T): ModifierToken<T>; 3691 createModifiersFromModifierFlags(flags: ModifierFlags): Modifier[] | undefined; 3692 createQualifiedName(left: EntityName, right: string | Identifier): QualifiedName; 3693 updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName; 3694 createComputedPropertyName(expression: Expression): ComputedPropertyName; 3695 updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName; 3696 createTypeParameterDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; 3697 updateTypeParameterDeclaration(node: TypeParameterDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; 3698 createParameterDeclaration(modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration; 3699 updateParameterDeclaration(node: ParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration; 3700 createDecorator(expression: Expression, annotationDeclaration?: AnnotationDeclaration): Decorator; 3701 updateDecorator(node: Decorator, expression: Expression, annotationDeclaration?: AnnotationDeclaration): Decorator; 3702 createPropertySignature(modifiers: readonly Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined): PropertySignature; 3703 updatePropertySignature(node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined): PropertySignature; 3704 createPropertyDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 3705 updatePropertyDeclaration(node: PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 3706 createAnnotationPropertyDeclaration(name: string | PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): AnnotationPropertyDeclaration; 3707 updateAnnotationPropertyDeclaration(node: AnnotationPropertyDeclaration, name: string | PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): AnnotationPropertyDeclaration; 3708 createMethodSignature(modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): MethodSignature; 3709 updateMethodSignature(node: MethodSignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): MethodSignature; 3710 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; 3711 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; 3712 createConstructorDeclaration(modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 3713 updateConstructorDeclaration(node: ConstructorDeclaration, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 3714 createGetAccessorDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 3715 updateGetAccessorDeclaration(node: GetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 3716 createSetAccessorDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 3717 updateSetAccessorDeclaration(node: SetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 3718 createCallSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): CallSignatureDeclaration; 3719 updateCallSignature(node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): CallSignatureDeclaration; 3720 createConstructSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): ConstructSignatureDeclaration; 3721 updateConstructSignature(node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructSignatureDeclaration; 3722 createIndexSignature(modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; 3723 updateIndexSignature(node: IndexSignatureDeclaration, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; 3724 createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan; 3725 updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan; 3726 createClassStaticBlockDeclaration(body: Block): ClassStaticBlockDeclaration; 3727 updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, body: Block): ClassStaticBlockDeclaration; 3728 createKeywordTypeNode<TKind extends KeywordTypeSyntaxKind>(kind: TKind): KeywordTypeNode<TKind>; 3729 createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode; 3730 updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode; 3731 createTypeReferenceNode(typeName: string | EntityName, typeArguments?: readonly TypeNode[]): TypeReferenceNode; 3732 updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined): TypeReferenceNode; 3733 createFunctionTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): FunctionTypeNode; 3734 updateFunctionTypeNode(node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): FunctionTypeNode; 3735 createConstructorTypeNode(modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode; 3736 updateConstructorTypeNode(node: ConstructorTypeNode, modifiers: readonly Modifier[] | undefined, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode; 3737 createTypeQueryNode(exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode; 3738 updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode; 3739 createTypeLiteralNode(members: readonly TypeElement[] | undefined): TypeLiteralNode; 3740 updateTypeLiteralNode(node: TypeLiteralNode, members: NodeArray<TypeElement>): TypeLiteralNode; 3741 createArrayTypeNode(elementType: TypeNode): ArrayTypeNode; 3742 updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode; 3743 createTupleTypeNode(elements: readonly (TypeNode | NamedTupleMember)[]): TupleTypeNode; 3744 updateTupleTypeNode(node: TupleTypeNode, elements: readonly (TypeNode | NamedTupleMember)[]): TupleTypeNode; 3745 createNamedTupleMember(dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember; 3746 updateNamedTupleMember(node: NamedTupleMember, dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember; 3747 createOptionalTypeNode(type: TypeNode): OptionalTypeNode; 3748 updateOptionalTypeNode(node: OptionalTypeNode, type: TypeNode): OptionalTypeNode; 3749 createRestTypeNode(type: TypeNode): RestTypeNode; 3750 updateRestTypeNode(node: RestTypeNode, type: TypeNode): RestTypeNode; 3751 createUnionTypeNode(types: readonly TypeNode[]): UnionTypeNode; 3752 updateUnionTypeNode(node: UnionTypeNode, types: NodeArray<TypeNode>): UnionTypeNode; 3753 createIntersectionTypeNode(types: readonly TypeNode[]): IntersectionTypeNode; 3754 updateIntersectionTypeNode(node: IntersectionTypeNode, types: NodeArray<TypeNode>): IntersectionTypeNode; 3755 createConditionalTypeNode(checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode; 3756 updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode; 3757 createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode; 3758 updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode; 3759 createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; 3760 updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode; 3761 createParenthesizedType(type: TypeNode): ParenthesizedTypeNode; 3762 updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode; 3763 createThisTypeNode(): ThisTypeNode; 3764 createTypeOperatorNode(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode; 3765 updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode; 3766 createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; 3767 updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; 3768 createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined, members: NodeArray<TypeElement> | undefined): MappedTypeNode; 3769 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; 3770 createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode; 3771 updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]): LiteralTypeNode; 3772 createTemplateLiteralType(head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; 3773 updateTemplateLiteralType(node: TemplateLiteralTypeNode, head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; 3774 createObjectBindingPattern(elements: readonly BindingElement[]): ObjectBindingPattern; 3775 updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]): ObjectBindingPattern; 3776 createArrayBindingPattern(elements: readonly ArrayBindingElement[]): ArrayBindingPattern; 3777 updateArrayBindingPattern(node: ArrayBindingPattern, elements: readonly ArrayBindingElement[]): ArrayBindingPattern; 3778 createBindingElement(dotDotDotToken: DotDotDotToken | undefined, propertyName: string | PropertyName | undefined, name: string | BindingName, initializer?: Expression): BindingElement; 3779 updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, initializer: Expression | undefined): BindingElement; 3780 createArrayLiteralExpression(elements?: readonly Expression[], multiLine?: boolean): ArrayLiteralExpression; 3781 updateArrayLiteralExpression(node: ArrayLiteralExpression, elements: readonly Expression[]): ArrayLiteralExpression; 3782 createObjectLiteralExpression(properties?: readonly ObjectLiteralElementLike[], multiLine?: boolean): ObjectLiteralExpression; 3783 updateObjectLiteralExpression(node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]): ObjectLiteralExpression; 3784 createPropertyAccessExpression(expression: Expression, name: string | MemberName): PropertyAccessExpression; 3785 updatePropertyAccessExpression(node: PropertyAccessExpression, expression: Expression, name: MemberName): PropertyAccessExpression; 3786 createPropertyAccessChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, name: string | MemberName): PropertyAccessChain; 3787 updatePropertyAccessChain(node: PropertyAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: MemberName): PropertyAccessChain; 3788 createElementAccessExpression(expression: Expression, index: number | Expression): ElementAccessExpression; 3789 updateElementAccessExpression(node: ElementAccessExpression, expression: Expression, argumentExpression: Expression): ElementAccessExpression; 3790 createElementAccessChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, index: number | Expression): ElementAccessChain; 3791 updateElementAccessChain(node: ElementAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression): ElementAccessChain; 3792 createCallExpression(expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): CallExpression; 3793 updateCallExpression(node: CallExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]): CallExpression; 3794 createCallChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): CallChain; 3795 updateCallChain(node: CallChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]): CallChain; 3796 createNewExpression(expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): NewExpression; 3797 updateNewExpression(node: NewExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): NewExpression; 3798 createTaggedTemplateExpression(tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; 3799 updateTaggedTemplateExpression(node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; 3800 createTypeAssertion(type: TypeNode, expression: Expression): TypeAssertion; 3801 updateTypeAssertion(node: TypeAssertion, type: TypeNode, expression: Expression): TypeAssertion; 3802 createParenthesizedExpression(expression: Expression): ParenthesizedExpression; 3803 updateParenthesizedExpression(node: ParenthesizedExpression, expression: Expression): ParenthesizedExpression; 3804 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; 3805 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; 3806 createArrowFunction(modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction; 3807 updateArrowFunction(node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction; 3808 createEtsComponentExpression(name: Expression, argumentExpression: Expression[] | NodeArray<Expression> | undefined, body: Block | undefined): EtsComponentExpression; 3809 updateEtsComponentExpression(node: EtsComponentExpression, name: Expression | undefined, argumentExpression: Expression[] | NodeArray<Expression> | undefined, body: Block | undefined): EtsComponentExpression; 3810 createDeleteExpression(expression: Expression): DeleteExpression; 3811 updateDeleteExpression(node: DeleteExpression, expression: Expression): DeleteExpression; 3812 createTypeOfExpression(expression: Expression): TypeOfExpression; 3813 updateTypeOfExpression(node: TypeOfExpression, expression: Expression): TypeOfExpression; 3814 createVoidExpression(expression: Expression): VoidExpression; 3815 updateVoidExpression(node: VoidExpression, expression: Expression): VoidExpression; 3816 createAwaitExpression(expression: Expression): AwaitExpression; 3817 updateAwaitExpression(node: AwaitExpression, expression: Expression): AwaitExpression; 3818 createPrefixUnaryExpression(operator: PrefixUnaryOperator, operand: Expression): PrefixUnaryExpression; 3819 updatePrefixUnaryExpression(node: PrefixUnaryExpression, operand: Expression): PrefixUnaryExpression; 3820 createPostfixUnaryExpression(operand: Expression, operator: PostfixUnaryOperator): PostfixUnaryExpression; 3821 updatePostfixUnaryExpression(node: PostfixUnaryExpression, operand: Expression): PostfixUnaryExpression; 3822 createBinaryExpression(left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression; 3823 updateBinaryExpression(node: BinaryExpression, left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression; 3824 createConditionalExpression(condition: Expression, questionToken: QuestionToken | undefined, whenTrue: Expression, colonToken: ColonToken | undefined, whenFalse: Expression): ConditionalExpression; 3825 updateConditionalExpression(node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression; 3826 createTemplateExpression(head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression; 3827 updateTemplateExpression(node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression; 3828 createTemplateHead(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateHead; 3829 createTemplateHead(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateHead; 3830 createTemplateMiddle(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateMiddle; 3831 createTemplateMiddle(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateMiddle; 3832 createTemplateTail(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateTail; 3833 createTemplateTail(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateTail; 3834 createNoSubstitutionTemplateLiteral(text: string, rawText?: string): NoSubstitutionTemplateLiteral; 3835 createNoSubstitutionTemplateLiteral(text: string | undefined, rawText: string): NoSubstitutionTemplateLiteral; 3836 createYieldExpression(asteriskToken: AsteriskToken, expression: Expression): YieldExpression; 3837 createYieldExpression(asteriskToken: undefined, expression: Expression | undefined): YieldExpression; 3838 updateYieldExpression(node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression | undefined): YieldExpression; 3839 createSpreadElement(expression: Expression): SpreadElement; 3840 updateSpreadElement(node: SpreadElement, expression: Expression): SpreadElement; 3841 createClassExpression(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; 3842 updateClassExpression(node: ClassExpression, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; 3843 createOmittedExpression(): OmittedExpression; 3844 createExpressionWithTypeArguments(expression: Expression, typeArguments: readonly TypeNode[] | undefined): ExpressionWithTypeArguments; 3845 updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, expression: Expression, typeArguments: readonly TypeNode[] | undefined): ExpressionWithTypeArguments; 3846 createAsExpression(expression: Expression, type: TypeNode): AsExpression; 3847 updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression; 3848 createNonNullExpression(expression: Expression): NonNullExpression; 3849 updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression; 3850 createNonNullChain(expression: Expression): NonNullChain; 3851 updateNonNullChain(node: NonNullChain, expression: Expression): NonNullChain; 3852 createMetaProperty(keywordToken: MetaProperty["keywordToken"], name: Identifier): MetaProperty; 3853 updateMetaProperty(node: MetaProperty, name: Identifier): MetaProperty; 3854 createSatisfiesExpression(expression: Expression, type: TypeNode): SatisfiesExpression; 3855 updateSatisfiesExpression(node: SatisfiesExpression, expression: Expression, type: TypeNode): SatisfiesExpression; 3856 createTemplateSpan(expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan; 3857 updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan; 3858 createSemicolonClassElement(): SemicolonClassElement; 3859 createBlock(statements: readonly Statement[], multiLine?: boolean): Block; 3860 updateBlock(node: Block, statements: readonly Statement[]): Block; 3861 createVariableStatement(modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList | readonly VariableDeclaration[]): VariableStatement; 3862 updateVariableStatement(node: VariableStatement, modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList): VariableStatement; 3863 createEmptyStatement(): EmptyStatement; 3864 createExpressionStatement(expression: Expression): ExpressionStatement; 3865 updateExpressionStatement(node: ExpressionStatement, expression: Expression): ExpressionStatement; 3866 createIfStatement(expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement; 3867 updateIfStatement(node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined): IfStatement; 3868 createDoStatement(statement: Statement, expression: Expression): DoStatement; 3869 updateDoStatement(node: DoStatement, statement: Statement, expression: Expression): DoStatement; 3870 createWhileStatement(expression: Expression, statement: Statement): WhileStatement; 3871 updateWhileStatement(node: WhileStatement, expression: Expression, statement: Statement): WhileStatement; 3872 createForStatement(initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement; 3873 updateForStatement(node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement; 3874 createForInStatement(initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement; 3875 updateForInStatement(node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement; 3876 createForOfStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement; 3877 updateForOfStatement(node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement; 3878 createContinueStatement(label?: string | Identifier): ContinueStatement; 3879 updateContinueStatement(node: ContinueStatement, label: Identifier | undefined): ContinueStatement; 3880 createBreakStatement(label?: string | Identifier): BreakStatement; 3881 updateBreakStatement(node: BreakStatement, label: Identifier | undefined): BreakStatement; 3882 createReturnStatement(expression?: Expression): ReturnStatement; 3883 updateReturnStatement(node: ReturnStatement, expression: Expression | undefined): ReturnStatement; 3884 createWithStatement(expression: Expression, statement: Statement): WithStatement; 3885 updateWithStatement(node: WithStatement, expression: Expression, statement: Statement): WithStatement; 3886 createSwitchStatement(expression: Expression, caseBlock: CaseBlock): SwitchStatement; 3887 updateSwitchStatement(node: SwitchStatement, expression: Expression, caseBlock: CaseBlock): SwitchStatement; 3888 createLabeledStatement(label: string | Identifier, statement: Statement): LabeledStatement; 3889 updateLabeledStatement(node: LabeledStatement, label: Identifier, statement: Statement): LabeledStatement; 3890 createThrowStatement(expression: Expression): ThrowStatement; 3891 updateThrowStatement(node: ThrowStatement, expression: Expression): ThrowStatement; 3892 createTryStatement(tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement; 3893 updateTryStatement(node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement; 3894 createDebuggerStatement(): DebuggerStatement; 3895 createVariableDeclaration(name: string | BindingName, exclamationToken?: ExclamationToken, type?: TypeNode, initializer?: Expression): VariableDeclaration; 3896 updateVariableDeclaration(node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; 3897 createVariableDeclarationList(declarations: readonly VariableDeclaration[], flags?: NodeFlags): VariableDeclarationList; 3898 updateVariableDeclarationList(node: VariableDeclarationList, declarations: readonly VariableDeclaration[]): VariableDeclarationList; 3899 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; 3900 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; 3901 createClassDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; 3902 updateClassDeclaration(node: ClassDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; 3903 createStructDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): StructDeclaration; 3904 updateStructDeclaration(node: StructDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): StructDeclaration; 3905 createAnnotationDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, members: readonly AnnotationElement[]): AnnotationDeclaration; 3906 updateAnnotationDeclaration(node: AnnotationDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, members: readonly AnnotationElement[]): AnnotationDeclaration; 3907 createInterfaceDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 3908 updateInterfaceDeclaration(node: InterfaceDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 3909 createTypeAliasDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 3910 updateTypeAliasDeclaration(node: TypeAliasDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 3911 createEnumDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration; 3912 updateEnumDeclaration(node: EnumDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; 3913 createModuleDeclaration(modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration; 3914 updateModuleDeclaration(node: ModuleDeclaration, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration; 3915 createModuleBlock(statements: readonly Statement[]): ModuleBlock; 3916 updateModuleBlock(node: ModuleBlock, statements: readonly Statement[]): ModuleBlock; 3917 createCaseBlock(clauses: readonly CaseOrDefaultClause[]): CaseBlock; 3918 updateCaseBlock(node: CaseBlock, clauses: readonly CaseOrDefaultClause[]): CaseBlock; 3919 createNamespaceExportDeclaration(name: string | Identifier): NamespaceExportDeclaration; 3920 updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, name: Identifier): NamespaceExportDeclaration; 3921 createImportEqualsDeclaration(modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 3922 updateImportEqualsDeclaration(node: ImportEqualsDeclaration, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 3923 createImportDeclaration(modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause): ImportDeclaration; 3924 updateImportDeclaration(node: ImportDeclaration, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration; 3925 createImportClause(isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; 3926 updateImportClause(node: ImportClause, isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; 3927 createAssertClause(elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause; 3928 updateAssertClause(node: AssertClause, elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause; 3929 createAssertEntry(name: AssertionKey, value: Expression): AssertEntry; 3930 updateAssertEntry(node: AssertEntry, name: AssertionKey, value: Expression): AssertEntry; 3931 createImportTypeAssertionContainer(clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer; 3932 updateImportTypeAssertionContainer(node: ImportTypeAssertionContainer, clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer; 3933 createNamespaceImport(name: Identifier): NamespaceImport; 3934 updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport; 3935 createNamespaceExport(name: Identifier): NamespaceExport; 3936 updateNamespaceExport(node: NamespaceExport, name: Identifier): NamespaceExport; 3937 createNamedImports(elements: readonly ImportSpecifier[]): NamedImports; 3938 updateNamedImports(node: NamedImports, elements: readonly ImportSpecifier[]): NamedImports; 3939 createImportSpecifier(isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier; 3940 updateImportSpecifier(node: ImportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier; 3941 createExportAssignment(modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment; 3942 updateExportAssignment(node: ExportAssignment, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment; 3943 createExportDeclaration(modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, assertClause?: AssertClause): ExportDeclaration; 3944 updateExportDeclaration(node: ExportDeclaration, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration; 3945 createNamedExports(elements: readonly ExportSpecifier[]): NamedExports; 3946 updateNamedExports(node: NamedExports, elements: readonly ExportSpecifier[]): NamedExports; 3947 createExportSpecifier(isTypeOnly: boolean, propertyName: string | Identifier | undefined, name: string | Identifier): ExportSpecifier; 3948 updateExportSpecifier(node: ExportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ExportSpecifier; 3949 createExternalModuleReference(expression: Expression): ExternalModuleReference; 3950 updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference; 3951 createJSDocAllType(): JSDocAllType; 3952 createJSDocUnknownType(): JSDocUnknownType; 3953 createJSDocNonNullableType(type: TypeNode, postfix?: boolean): JSDocNonNullableType; 3954 updateJSDocNonNullableType(node: JSDocNonNullableType, type: TypeNode): JSDocNonNullableType; 3955 createJSDocNullableType(type: TypeNode, postfix?: boolean): JSDocNullableType; 3956 updateJSDocNullableType(node: JSDocNullableType, type: TypeNode): JSDocNullableType; 3957 createJSDocOptionalType(type: TypeNode): JSDocOptionalType; 3958 updateJSDocOptionalType(node: JSDocOptionalType, type: TypeNode): JSDocOptionalType; 3959 createJSDocFunctionType(parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): JSDocFunctionType; 3960 updateJSDocFunctionType(node: JSDocFunctionType, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): JSDocFunctionType; 3961 createJSDocVariadicType(type: TypeNode): JSDocVariadicType; 3962 updateJSDocVariadicType(node: JSDocVariadicType, type: TypeNode): JSDocVariadicType; 3963 createJSDocNamepathType(type: TypeNode): JSDocNamepathType; 3964 updateJSDocNamepathType(node: JSDocNamepathType, type: TypeNode): JSDocNamepathType; 3965 createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression; 3966 updateJSDocTypeExpression(node: JSDocTypeExpression, type: TypeNode): JSDocTypeExpression; 3967 createJSDocNameReference(name: EntityName | JSDocMemberName): JSDocNameReference; 3968 updateJSDocNameReference(node: JSDocNameReference, name: EntityName | JSDocMemberName): JSDocNameReference; 3969 createJSDocMemberName(left: EntityName | JSDocMemberName, right: Identifier): JSDocMemberName; 3970 updateJSDocMemberName(node: JSDocMemberName, left: EntityName | JSDocMemberName, right: Identifier): JSDocMemberName; 3971 createJSDocLink(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink; 3972 updateJSDocLink(node: JSDocLink, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink; 3973 createJSDocLinkCode(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode; 3974 updateJSDocLinkCode(node: JSDocLinkCode, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode; 3975 createJSDocLinkPlain(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain; 3976 updateJSDocLinkPlain(node: JSDocLinkPlain, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain; 3977 createJSDocTypeLiteral(jsDocPropertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral; 3978 updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsDocPropertyTags: readonly JSDocPropertyLikeTag[] | undefined, isArrayType: boolean | undefined): JSDocTypeLiteral; 3979 createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature; 3980 updateJSDocSignature(node: JSDocSignature, typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type: JSDocReturnTag | undefined): JSDocSignature; 3981 createJSDocTemplateTag(tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocComment>): JSDocTemplateTag; 3982 updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment: string | NodeArray<JSDocComment> | undefined): JSDocTemplateTag; 3983 createJSDocTypedefTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | JSDocTypeLiteral, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocTypedefTag; 3984 updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | JSDocTypeLiteral | undefined, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocTypedefTag; 3985 createJSDocParameterTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocParameterTag; 3986 updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocComment> | undefined): JSDocParameterTag; 3987 createJSDocPropertyTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocPropertyTag; 3988 updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocComment> | undefined): JSDocPropertyTag; 3989 createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocTypeTag; 3990 updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocTypeTag; 3991 createJSDocSeeTag(tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag; 3992 updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag; 3993 createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocReturnTag; 3994 updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocReturnTag; 3995 createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocThisTag; 3996 updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocThisTag; 3997 createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocEnumTag; 3998 updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocEnumTag; 3999 createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocCallbackTag; 4000 updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocCallbackTag; 4001 createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocAugmentsTag; 4002 updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocAugmentsTag; 4003 createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocImplementsTag; 4004 updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocImplementsTag; 4005 createJSDocAuthorTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocAuthorTag; 4006 updateJSDocAuthorTag(node: JSDocAuthorTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocAuthorTag; 4007 createJSDocClassTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocClassTag; 4008 updateJSDocClassTag(node: JSDocClassTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocClassTag; 4009 createJSDocPublicTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocPublicTag; 4010 updateJSDocPublicTag(node: JSDocPublicTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocPublicTag; 4011 createJSDocPrivateTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocPrivateTag; 4012 updateJSDocPrivateTag(node: JSDocPrivateTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocPrivateTag; 4013 createJSDocProtectedTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocProtectedTag; 4014 updateJSDocProtectedTag(node: JSDocProtectedTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocProtectedTag; 4015 createJSDocReadonlyTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocReadonlyTag; 4016 updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocReadonlyTag; 4017 createJSDocUnknownTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocUnknownTag; 4018 updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | NodeArray<JSDocComment> | undefined): JSDocUnknownTag; 4019 createJSDocDeprecatedTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag; 4020 updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag; 4021 createJSDocOverrideTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag; 4022 updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag; 4023 createJSDocText(text: string): JSDocText; 4024 updateJSDocText(node: JSDocText, text: string): JSDocText; 4025 createJSDocComment(comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc; 4026 updateJSDocComment(node: JSDoc, comment: string | NodeArray<JSDocComment> | undefined, tags: readonly JSDocTag[] | undefined): JSDoc; 4027 createJsxElement(openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement; 4028 updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement; 4029 createJsxSelfClosingElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement; 4030 updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement; 4031 createJsxOpeningElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement; 4032 updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement; 4033 createJsxClosingElement(tagName: JsxTagNameExpression): JsxClosingElement; 4034 updateJsxClosingElement(node: JsxClosingElement, tagName: JsxTagNameExpression): JsxClosingElement; 4035 createJsxFragment(openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment; 4036 createJsxText(text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText; 4037 updateJsxText(node: JsxText, text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText; 4038 createJsxOpeningFragment(): JsxOpeningFragment; 4039 createJsxJsxClosingFragment(): JsxClosingFragment; 4040 updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment; 4041 createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute; 4042 updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute; 4043 createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes; 4044 updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes; 4045 createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute; 4046 updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute; 4047 createJsxExpression(dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined): JsxExpression; 4048 updateJsxExpression(node: JsxExpression, expression: Expression | undefined): JsxExpression; 4049 createCaseClause(expression: Expression, statements: readonly Statement[]): CaseClause; 4050 updateCaseClause(node: CaseClause, expression: Expression, statements: readonly Statement[]): CaseClause; 4051 createDefaultClause(statements: readonly Statement[]): DefaultClause; 4052 updateDefaultClause(node: DefaultClause, statements: readonly Statement[]): DefaultClause; 4053 createHeritageClause(token: HeritageClause["token"], types: readonly ExpressionWithTypeArguments[]): HeritageClause; 4054 updateHeritageClause(node: HeritageClause, types: readonly ExpressionWithTypeArguments[]): HeritageClause; 4055 createCatchClause(variableDeclaration: string | BindingName | VariableDeclaration | undefined, block: Block): CatchClause; 4056 updateCatchClause(node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block): CatchClause; 4057 createPropertyAssignment(name: string | PropertyName, initializer: Expression): PropertyAssignment; 4058 updatePropertyAssignment(node: PropertyAssignment, name: PropertyName, initializer: Expression): PropertyAssignment; 4059 createShorthandPropertyAssignment(name: string | Identifier, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment; 4060 updateShorthandPropertyAssignment(node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression | undefined): ShorthandPropertyAssignment; 4061 createSpreadAssignment(expression: Expression): SpreadAssignment; 4062 updateSpreadAssignment(node: SpreadAssignment, expression: Expression): SpreadAssignment; 4063 createEnumMember(name: string | PropertyName, initializer?: Expression): EnumMember; 4064 updateEnumMember(node: EnumMember, name: PropertyName, initializer: Expression | undefined): EnumMember; 4065 createSourceFile(statements: readonly Statement[], endOfFileToken: EndOfFileToken, flags: NodeFlags): SourceFile; 4066 updateSourceFile(node: SourceFile, statements: readonly Statement[], isDeclarationFile?: boolean, referencedFiles?: readonly FileReference[], typeReferences?: readonly FileReference[], hasNoDefaultLib?: boolean, libReferences?: readonly FileReference[]): SourceFile; 4067 createNotEmittedStatement(original: Node): NotEmittedStatement; 4068 createPartiallyEmittedExpression(expression: Expression, original?: Node): PartiallyEmittedExpression; 4069 updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression; 4070 createCommaListExpression(elements: readonly Expression[]): CommaListExpression; 4071 updateCommaListExpression(node: CommaListExpression, elements: readonly Expression[]): CommaListExpression; 4072 createBundle(sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle; 4073 updateBundle(node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle; 4074 createComma(left: Expression, right: Expression): BinaryExpression; 4075 createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment; 4076 createAssignment(left: Expression, right: Expression): AssignmentExpression<EqualsToken>; 4077 createLogicalOr(left: Expression, right: Expression): BinaryExpression; 4078 createLogicalAnd(left: Expression, right: Expression): BinaryExpression; 4079 createBitwiseOr(left: Expression, right: Expression): BinaryExpression; 4080 createBitwiseXor(left: Expression, right: Expression): BinaryExpression; 4081 createBitwiseAnd(left: Expression, right: Expression): BinaryExpression; 4082 createStrictEquality(left: Expression, right: Expression): BinaryExpression; 4083 createStrictInequality(left: Expression, right: Expression): BinaryExpression; 4084 createEquality(left: Expression, right: Expression): BinaryExpression; 4085 createInequality(left: Expression, right: Expression): BinaryExpression; 4086 createLessThan(left: Expression, right: Expression): BinaryExpression; 4087 createLessThanEquals(left: Expression, right: Expression): BinaryExpression; 4088 createGreaterThan(left: Expression, right: Expression): BinaryExpression; 4089 createGreaterThanEquals(left: Expression, right: Expression): BinaryExpression; 4090 createLeftShift(left: Expression, right: Expression): BinaryExpression; 4091 createRightShift(left: Expression, right: Expression): BinaryExpression; 4092 createUnsignedRightShift(left: Expression, right: Expression): BinaryExpression; 4093 createAdd(left: Expression, right: Expression): BinaryExpression; 4094 createSubtract(left: Expression, right: Expression): BinaryExpression; 4095 createMultiply(left: Expression, right: Expression): BinaryExpression; 4096 createDivide(left: Expression, right: Expression): BinaryExpression; 4097 createModulo(left: Expression, right: Expression): BinaryExpression; 4098 createExponent(left: Expression, right: Expression): BinaryExpression; 4099 createPrefixPlus(operand: Expression): PrefixUnaryExpression; 4100 createPrefixMinus(operand: Expression): PrefixUnaryExpression; 4101 createPrefixIncrement(operand: Expression): PrefixUnaryExpression; 4102 createPrefixDecrement(operand: Expression): PrefixUnaryExpression; 4103 createBitwiseNot(operand: Expression): PrefixUnaryExpression; 4104 createLogicalNot(operand: Expression): PrefixUnaryExpression; 4105 createPostfixIncrement(operand: Expression): PostfixUnaryExpression; 4106 createPostfixDecrement(operand: Expression): PostfixUnaryExpression; 4107 createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): CallExpression; 4108 createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; 4109 createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): CallExpression; 4110 createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; 4111 createVoidZero(): VoidExpression; 4112 createExportDefault(expression: Expression): ExportAssignment; 4113 createExternalModuleExport(exportName: Identifier): ExportDeclaration; 4114 restoreOuterExpressions(outerExpression: Expression | undefined, innerExpression: Expression, kinds?: OuterExpressionKinds): Expression; 4115 } 4116 export interface CoreTransformationContext { 4117 readonly factory: NodeFactory; 4118 /** Gets the compiler options supplied to the transformer. */ 4119 getCompilerOptions(): CompilerOptions; 4120 /** Starts a new lexical environment. */ 4121 startLexicalEnvironment(): void; 4122 /** Suspends the current lexical environment, usually after visiting a parameter list. */ 4123 suspendLexicalEnvironment(): void; 4124 /** Resumes a suspended lexical environment, usually before visiting a function body. */ 4125 resumeLexicalEnvironment(): void; 4126 /** Ends a lexical environment, returning any declarations. */ 4127 endLexicalEnvironment(): Statement[] | undefined; 4128 /** Hoists a function declaration to the containing scope. */ 4129 hoistFunctionDeclaration(node: FunctionDeclaration): void; 4130 /** Hoists a variable declaration to the containing scope. */ 4131 hoistVariableDeclaration(node: Identifier): void; 4132 } 4133 export interface TransformationContext extends CoreTransformationContext { 4134 /** Records a request for a non-scoped emit helper in the current context. */ 4135 requestEmitHelper(helper: EmitHelper): void; 4136 /** Gets and resets the requested non-scoped emit helpers. */ 4137 readEmitHelpers(): EmitHelper[] | undefined; 4138 /** Enables expression substitutions in the pretty printer for the provided SyntaxKind. */ 4139 enableSubstitution(kind: SyntaxKind): void; 4140 /** Determines whether expression substitutions are enabled for the provided node. */ 4141 isSubstitutionEnabled(node: Node): boolean; 4142 /** 4143 * Hook used by transformers to substitute expressions just before they 4144 * are emitted by the pretty printer. 4145 * 4146 * NOTE: Transformation hooks should only be modified during `Transformer` initialization, 4147 * before returning the `NodeTransformer` callback. 4148 */ 4149 onSubstituteNode: (hint: EmitHint, node: Node) => Node; 4150 /** 4151 * Enables before/after emit notifications in the pretty printer for the provided 4152 * SyntaxKind. 4153 */ 4154 enableEmitNotification(kind: SyntaxKind): void; 4155 /** 4156 * Determines whether before/after emit notifications should be raised in the pretty 4157 * printer when it emits a node. 4158 */ 4159 isEmitNotificationEnabled(node: Node): boolean; 4160 /** 4161 * Hook used to allow transformers to capture state before or after 4162 * the printer emits a node. 4163 * 4164 * NOTE: Transformation hooks should only be modified during `Transformer` initialization, 4165 * before returning the `NodeTransformer` callback. 4166 */ 4167 onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void; 4168 /** Determines whether the lexical environment is suspended */ 4169 isLexicalEnvironmentSuspended?(): boolean; 4170 } 4171 export interface TransformationResult<T extends Node> { 4172 /** Gets the transformed source files. */ 4173 transformed: T[]; 4174 /** Gets diagnostics for the transformation. */ 4175 diagnostics?: DiagnosticWithLocation[]; 4176 /** 4177 * Gets a substitute for a node, if one is available; otherwise, returns the original node. 4178 * 4179 * @param hint A hint as to the intended usage of the node. 4180 * @param node The node to substitute. 4181 */ 4182 substituteNode(hint: EmitHint, node: Node): Node; 4183 /** 4184 * Emits a node with possible notification. 4185 * 4186 * @param hint A hint as to the intended usage of the node. 4187 * @param node The node to emit. 4188 * @param emitCallback A callback used to emit the node. 4189 */ 4190 emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void; 4191 /** 4192 * Indicates if a given node needs an emit notification 4193 * 4194 * @param node The node to emit. 4195 */ 4196 isEmitNotificationEnabled?(node: Node): boolean; 4197 /** 4198 * Clean up EmitNode entries on any parse-tree nodes. 4199 */ 4200 dispose(): void; 4201 } 4202 /** 4203 * A function that is used to initialize and return a `Transformer` callback, which in turn 4204 * will be used to transform one or more nodes. 4205 */ 4206 export type TransformerFactory<T extends Node> = (context: TransformationContext) => Transformer<T>; 4207 /** 4208 * A function that transforms a node. 4209 */ 4210 export type Transformer<T extends Node> = (node: T) => T; 4211 /** 4212 * A function that accepts and possibly transforms a node. 4213 */ 4214 export type Visitor = (node: Node) => VisitResult<Node>; 4215 export interface NodeVisitor { 4216 <T extends Node>(nodes: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T; 4217 <T extends Node>(nodes: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T | undefined; 4218 } 4219 export interface NodesVisitor { 4220 <T extends Node>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>; 4221 <T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined; 4222 } 4223 export type VisitResult<T extends Node> = T | readonly T[] | undefined; 4224 export interface Printer { 4225 /** 4226 * Print a node and its subtree as-is, without any emit transformations. 4227 * @param hint A value indicating the purpose of a node. This is primarily used to 4228 * distinguish between an `Identifier` used in an expression position, versus an 4229 * `Identifier` used as an `IdentifierName` as part of a declaration. For most nodes you 4230 * should just pass `Unspecified`. 4231 * @param node The node to print. The node and its subtree are printed as-is, without any 4232 * emit transformations. 4233 * @param sourceFile A source file that provides context for the node. The source text of 4234 * the file is used to emit the original source content for literals and identifiers, while 4235 * the identifiers of the source file are used when generating unique names to avoid 4236 * collisions. 4237 */ 4238 printNode(hint: EmitHint, node: Node, sourceFile: SourceFile): string; 4239 /** 4240 * Prints a list of nodes using the given format flags 4241 */ 4242 printList<T extends Node>(format: ListFormat, list: NodeArray<T>, sourceFile: SourceFile): string; 4243 /** 4244 * Prints a source file as-is, without any emit transformations. 4245 */ 4246 printFile(sourceFile: SourceFile): string; 4247 /** 4248 * Prints a bundle of source files as-is, without any emit transformations. 4249 */ 4250 printBundle(bundle: Bundle): string; 4251 writeFile(sourceFile: SourceFile, writer: EmitTextWriter, sourceMapGenerator: SourceMapGenerator | undefined): void; 4252 } 4253 export interface PrintHandlers { 4254 /** 4255 * A hook used by the Printer when generating unique names to avoid collisions with 4256 * globally defined names that exist outside of the current source file. 4257 */ 4258 hasGlobalName?(name: string): boolean; 4259 /** 4260 * A hook used by the Printer to provide notifications prior to emitting a node. A 4261 * compatible implementation **must** invoke `emitCallback` with the provided `hint` and 4262 * `node` values. 4263 * @param hint A hint indicating the intended purpose of the node. 4264 * @param node The node to emit. 4265 * @param emitCallback A callback that, when invoked, will emit the node. 4266 * @example 4267 * ```ts 4268 * var printer = createPrinter(printerOptions, { 4269 * onEmitNode(hint, node, emitCallback) { 4270 * // set up or track state prior to emitting the node... 4271 * emitCallback(hint, node); 4272 * // restore state after emitting the node... 4273 * } 4274 * }); 4275 * ``` 4276 */ 4277 onEmitNode?(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void; 4278 /** 4279 * A hook used to check if an emit notification is required for a node. 4280 * @param node The node to emit. 4281 */ 4282 isEmitNotificationEnabled?(node: Node): boolean; 4283 /** 4284 * A hook used by the Printer to perform just-in-time substitution of a node. This is 4285 * primarily used by node transformations that need to substitute one node for another, 4286 * such as replacing `myExportedVar` with `exports.myExportedVar`. 4287 * @param hint A hint indicating the intended purpose of the node. 4288 * @param node The node to emit. 4289 * @example 4290 * ```ts 4291 * var printer = createPrinter(printerOptions, { 4292 * substituteNode(hint, node) { 4293 * // perform substitution if necessary... 4294 * return node; 4295 * } 4296 * }); 4297 * ``` 4298 */ 4299 substituteNode?(hint: EmitHint, node: Node): Node; 4300 } 4301 export interface PrinterOptions { 4302 removeComments?: boolean; 4303 newLine?: NewLineKind; 4304 omitTrailingSemicolon?: boolean; 4305 noEmitHelpers?: boolean; 4306 sourceMap?: boolean; 4307 inlineSourceMap?: boolean; 4308 inlineSources?: boolean; 4309 } 4310 export interface RawSourceMap { 4311 version: 3; 4312 file: string; 4313 sourceRoot?: string | null; 4314 sources: string[]; 4315 sourcesContent?: (string | null)[] | null; 4316 mappings: string; 4317 names?: string[] | null; 4318 } 4319 /** 4320 * Generates a source map. 4321 */ 4322 export interface SourceMapGenerator { 4323 getSources(): readonly string[]; 4324 /** 4325 * Adds a source to the source map. 4326 */ 4327 addSource(fileName: string): number; 4328 /** 4329 * Set the content for a source. 4330 */ 4331 setSourceContent(sourceIndex: number, content: string | null): void; 4332 /** 4333 * Adds a name. 4334 */ 4335 addName(name: string): number; 4336 /** 4337 * Adds a mapping without source information. 4338 */ 4339 addMapping(generatedLine: number, generatedCharacter: number): void; 4340 /** 4341 * Adds a mapping with source information. 4342 */ 4343 addMapping(generatedLine: number, generatedCharacter: number, sourceIndex: number, sourceLine: number, sourceCharacter: number, nameIndex?: number): void; 4344 /** 4345 * Appends a source map. 4346 */ 4347 appendSourceMap(generatedLine: number, generatedCharacter: number, sourceMap: RawSourceMap, sourceMapPath: string, start?: LineAndCharacter, end?: LineAndCharacter): void; 4348 /** 4349 * Gets the source map as a `RawSourceMap` object. 4350 */ 4351 toJSON(): RawSourceMap; 4352 /** 4353 * Gets the string representation of the source map. 4354 */ 4355 toString(): string; 4356 } 4357 export interface EmitTextWriter extends SymbolWriter { 4358 write(s: string): void; 4359 writeTrailingSemicolon(text: string): void; 4360 writeComment(text: string): void; 4361 getText(): string; 4362 rawWrite(s: string): void; 4363 writeLiteral(s: string): void; 4364 getTextPos(): number; 4365 getLine(): number; 4366 getColumn(): number; 4367 getIndent(): number; 4368 isAtStartOfLine(): boolean; 4369 hasTrailingComment(): boolean; 4370 hasTrailingWhitespace(): boolean; 4371 getTextPosWithWriteLine?(): number; 4372 nonEscapingWrite?(text: string): void; 4373 } 4374 export interface GetEffectiveTypeRootsHost { 4375 directoryExists?(directoryName: string): boolean; 4376 getCurrentDirectory?(): string; 4377 } 4378 export interface ModuleSpecifierResolutionHost { 4379 useCaseSensitiveFileNames?(): boolean; 4380 fileExists(path: string): boolean; 4381 getCurrentDirectory(): string; 4382 directoryExists?(path: string): boolean; 4383 readFile?(path: string): string | undefined; 4384 realpath?(path: string): string; 4385 getModuleSpecifierCache?(): ModuleSpecifierCache; 4386 getPackageJsonInfoCache?(): PackageJsonInfoCache | undefined; 4387 getGlobalTypingsCacheLocation?(): string | undefined; 4388 getNearestAncestorDirectoryWithPackageJson?(fileName: string, rootDir?: string): string | undefined; 4389 readonly redirectTargetsMap: RedirectTargetsMap; 4390 getProjectReferenceRedirect(fileName: string): string | undefined; 4391 isSourceOfProjectReferenceRedirect(fileName: string): boolean; 4392 } 4393 export interface ModulePath { 4394 path: string; 4395 isInNodeModules: boolean; 4396 isRedirect: boolean; 4397 } 4398 export interface ResolvedModuleSpecifierInfo { 4399 modulePaths: readonly ModulePath[] | undefined; 4400 moduleSpecifiers: readonly string[] | undefined; 4401 isBlockedByPackageJsonDependencies: boolean | undefined; 4402 } 4403 export interface ModuleSpecifierOptions { 4404 overrideImportMode?: SourceFile["impliedNodeFormat"]; 4405 } 4406 export interface ModuleSpecifierCache { 4407 get(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions): Readonly<ResolvedModuleSpecifierInfo> | undefined; 4408 set(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, modulePaths: readonly ModulePath[], moduleSpecifiers: readonly string[]): void; 4409 setBlockedByPackageJsonDependencies(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, isBlockedByPackageJsonDependencies: boolean): void; 4410 setModulePaths(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, modulePaths: readonly ModulePath[]): void; 4411 clear(): void; 4412 count(): number; 4413 } 4414 export interface SymbolTracker { 4415 trackSymbol?(symbol: Symbol, enclosingDeclaration: Node | undefined, meaning: SymbolFlags): boolean; 4416 reportInaccessibleThisError?(): void; 4417 reportPrivateInBaseOfClassExpression?(propertyName: string): void; 4418 reportInaccessibleUniqueSymbolError?(): void; 4419 reportCyclicStructureError?(): void; 4420 reportLikelyUnsafeImportRequiredError?(specifier: string): void; 4421 reportTruncationError?(): void; 4422 moduleResolverHost?: ModuleSpecifierResolutionHost & { 4423 getCommonSourceDirectory(): string; 4424 }; 4425 trackReferencedAmbientModule?(decl: ModuleDeclaration, symbol: Symbol): void; 4426 trackExternalModuleSymbolOfImportTypeNode?(symbol: Symbol): void; 4427 reportNonlocalAugmentation?(containingFile: SourceFile, parentSymbol: Symbol, augmentingSymbol: Symbol): void; 4428 reportNonSerializableProperty?(propertyName: string): void; 4429 reportImportTypeNodeResolutionModeOverride?(): void; 4430 } 4431 export interface TextSpan { 4432 start: number; 4433 length: number; 4434 } 4435 export interface TextChangeRange { 4436 span: TextSpan; 4437 newLength: number; 4438 } 4439 export interface SyntaxList extends Node { 4440 kind: SyntaxKind.SyntaxList; 4441 _children: Node[]; 4442 } 4443 export enum ListFormat { 4444 None = 0, 4445 SingleLine = 0, 4446 MultiLine = 1, 4447 PreserveLines = 2, 4448 LinesMask = 3, 4449 NotDelimited = 0, 4450 BarDelimited = 4, 4451 AmpersandDelimited = 8, 4452 CommaDelimited = 16, 4453 AsteriskDelimited = 32, 4454 DelimitersMask = 60, 4455 AllowTrailingComma = 64, 4456 Indented = 128, 4457 SpaceBetweenBraces = 256, 4458 SpaceBetweenSiblings = 512, 4459 Braces = 1024, 4460 Parenthesis = 2048, 4461 AngleBrackets = 4096, 4462 SquareBrackets = 8192, 4463 BracketsMask = 15360, 4464 OptionalIfUndefined = 16384, 4465 OptionalIfEmpty = 32768, 4466 Optional = 49152, 4467 PreferNewLine = 65536, 4468 NoTrailingNewLine = 131072, 4469 NoInterveningComments = 262144, 4470 NoSpaceIfEmpty = 524288, 4471 SingleElement = 1048576, 4472 SpaceAfterList = 2097152, 4473 Modifiers = 2359808, 4474 HeritageClauses = 512, 4475 SingleLineTypeLiteralMembers = 768, 4476 MultiLineTypeLiteralMembers = 32897, 4477 SingleLineTupleTypeElements = 528, 4478 MultiLineTupleTypeElements = 657, 4479 UnionTypeConstituents = 516, 4480 IntersectionTypeConstituents = 520, 4481 ObjectBindingPatternElements = 525136, 4482 ArrayBindingPatternElements = 524880, 4483 ObjectLiteralExpressionProperties = 526226, 4484 ImportClauseEntries = 526226, 4485 ArrayLiteralExpressionElements = 8914, 4486 CommaListElements = 528, 4487 CallExpressionArguments = 2576, 4488 NewExpressionArguments = 18960, 4489 TemplateExpressionSpans = 262144, 4490 SingleLineBlockStatements = 768, 4491 MultiLineBlockStatements = 129, 4492 VariableDeclarationList = 528, 4493 SingleLineFunctionBodyStatements = 768, 4494 MultiLineFunctionBodyStatements = 1, 4495 ClassHeritageClauses = 0, 4496 ClassMembers = 129, 4497 InterfaceMembers = 129, 4498 EnumMembers = 145, 4499 CaseBlockClauses = 129, 4500 NamedImportsOrExportsElements = 525136, 4501 JsxElementOrFragmentChildren = 262144, 4502 JsxElementAttributes = 262656, 4503 CaseOrDefaultClauseStatements = 163969, 4504 HeritageClauseTypes = 528, 4505 SourceFileStatements = 131073, 4506 Decorators = 2146305, 4507 TypeArguments = 53776, 4508 TypeParameters = 53776, 4509 Parameters = 2576, 4510 IndexSignatureParameters = 8848, 4511 JSDocComment = 33 4512 } 4513 export interface UserPreferences { 4514 readonly disableSuggestions?: boolean; 4515 readonly quotePreference?: "auto" | "double" | "single"; 4516 readonly includeCompletionsForModuleExports?: boolean; 4517 readonly includeCompletionsForImportStatements?: boolean; 4518 readonly includeCompletionsWithSnippetText?: boolean; 4519 readonly includeAutomaticOptionalChainCompletions?: boolean; 4520 readonly includeCompletionsWithInsertText?: boolean; 4521 readonly includeCompletionsWithClassMemberSnippets?: boolean; 4522 readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean; 4523 readonly useLabelDetailsInCompletionEntries?: boolean; 4524 readonly allowIncompleteCompletions?: boolean; 4525 readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative"; 4526 /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ 4527 readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; 4528 readonly allowTextChangesInNewFiles?: boolean; 4529 readonly providePrefixAndSuffixTextForRename?: boolean; 4530 readonly includePackageJsonAutoImports?: "auto" | "on" | "off"; 4531 readonly provideRefactorNotApplicableReason?: boolean; 4532 readonly jsxAttributeCompletionStyle?: "auto" | "braces" | "none"; 4533 readonly includeInlayParameterNameHints?: "none" | "literals" | "all"; 4534 readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean; 4535 readonly includeInlayFunctionParameterTypeHints?: boolean; 4536 readonly includeInlayVariableTypeHints?: boolean; 4537 readonly includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean; 4538 readonly includeInlayPropertyDeclarationTypeHints?: boolean; 4539 readonly includeInlayFunctionLikeReturnTypeHints?: boolean; 4540 readonly includeInlayEnumMemberValueHints?: boolean; 4541 readonly allowRenameOfImportPath?: boolean; 4542 readonly autoImportFileExcludePatterns?: string[]; 4543 } 4544 /** Represents a bigint literal value without requiring bigint support */ 4545 export interface PseudoBigInt { 4546 negative: boolean; 4547 base10Value: string; 4548 } 4549 export {}; 4550} 4551declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any; 4552declare function clearTimeout(handle: any): void; 4553declare namespace ts { 4554 export enum FileWatcherEventKind { 4555 Created = 0, 4556 Changed = 1, 4557 Deleted = 2 4558 } 4559 export type FileWatcherCallback = (fileName: string, eventKind: FileWatcherEventKind, modifiedTime?: Date) => void; 4560 export type DirectoryWatcherCallback = (fileName: string) => void; 4561 export interface System { 4562 args: string[]; 4563 newLine: string; 4564 useCaseSensitiveFileNames: boolean; 4565 write(s: string): void; 4566 writeOutputIsTTY?(): boolean; 4567 getWidthOfTerminal?(): number; 4568 readFile(path: string, encoding?: string): string | undefined; 4569 getFileSize?(path: string): number; 4570 writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; 4571 /** 4572 * @pollingInterval - this parameter is used in polling-based watchers and ignored in watchers that 4573 * use native OS file watching 4574 */ 4575 watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher; 4576 watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher; 4577 resolvePath(path: string): string; 4578 fileExists(path: string): boolean; 4579 directoryExists(path: string): boolean; 4580 createDirectory(path: string): void; 4581 getExecutingFilePath(): string; 4582 getCurrentDirectory(): string; 4583 getDirectories(path: string): string[]; 4584 readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; 4585 getModifiedTime?(path: string): Date | undefined; 4586 setModifiedTime?(path: string, time: Date): void; 4587 deleteFile?(path: string): void; 4588 /** 4589 * A good implementation is node.js' `crypto.createHash`. (https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm) 4590 */ 4591 createHash?(data: string): string; 4592 /** This must be cryptographically secure. Only implement this method using `crypto.createHash("sha256")`. */ 4593 createSHA256Hash?(data: string): string; 4594 getMemoryUsage?(): number; 4595 exit(exitCode?: number): void; 4596 realpath?(path: string): string; 4597 setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any; 4598 clearTimeout?(timeoutId: any): void; 4599 clearScreen?(): void; 4600 base64decode?(input: string): string; 4601 base64encode?(input: string): string; 4602 } 4603 export interface FileWatcher { 4604 close(): void; 4605 } 4606 export function getNodeMajorVersion(): number | undefined; 4607 export let sys: System; 4608 export {}; 4609} 4610declare namespace ts { 4611 namespace MemoryDotting { 4612 interface RecordInfo { 4613 recordStage: string; 4614 recordIndex: number; 4615 } 4616 const BINDE_SOURCE_FILE = "binder(bindSourceFile: Bind)"; 4617 const CHECK_SOURCE_FILE = "checker(checkSourceFile: Check)"; 4618 const EMIT_FILES = "emitter(emitFiles: EmitEachOutputFile)"; 4619 const CREATE_SORUCE_FILE_PARSE = "parser(createSourceFile: Parse)"; 4620 const BEFORE_PROGRAM = "program(createProgram: beforeProgram)"; 4621 const TRANSFORM = "transformer(transformNodes: Transform)"; 4622 function recordStage(stage: string): RecordInfo | null; 4623 function stopRecordStage(recordInfo: RecordInfo | null): void; 4624 function setMemoryDottingCallBack(recordCallback: (stage: string) => RecordInfo, stopCallback: (recordInfo: RecordInfo) => void): void; 4625 function clearCallBack(): void; 4626 } 4627} 4628declare namespace ts { 4629 type ErrorCallback = (message: DiagnosticMessage, length: number) => void; 4630 interface Scanner { 4631 getStartPos(): number; 4632 getToken(): SyntaxKind; 4633 getTextPos(): number; 4634 getTokenPos(): number; 4635 getTokenText(): string; 4636 getTokenValue(): string; 4637 hasUnicodeEscape(): boolean; 4638 hasExtendedUnicodeEscape(): boolean; 4639 hasPrecedingLineBreak(): boolean; 4640 isIdentifier(): boolean; 4641 isReservedWord(): boolean; 4642 isUnterminated(): boolean; 4643 reScanGreaterToken(): SyntaxKind; 4644 reScanSlashToken(): SyntaxKind; 4645 reScanAsteriskEqualsToken(): SyntaxKind; 4646 reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind; 4647 reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind; 4648 scanJsxIdentifier(): SyntaxKind; 4649 scanJsxAttributeValue(): SyntaxKind; 4650 reScanJsxAttributeValue(): SyntaxKind; 4651 reScanJsxToken(allowMultilineJsxText?: boolean): JsxTokenSyntaxKind; 4652 reScanLessThanToken(): SyntaxKind; 4653 reScanHashToken(): SyntaxKind; 4654 reScanQuestionToken(): SyntaxKind; 4655 reScanInvalidIdentifier(): SyntaxKind; 4656 scanJsxToken(): JsxTokenSyntaxKind; 4657 scanJsDocToken(): JSDocSyntaxKind; 4658 scan(): SyntaxKind; 4659 getText(): string; 4660 setText(text: string | undefined, start?: number, length?: number): void; 4661 setOnError(onError: ErrorCallback | undefined): void; 4662 setScriptTarget(scriptTarget: ScriptTarget): void; 4663 setLanguageVariant(variant: LanguageVariant): void; 4664 setTextPos(textPos: number): void; 4665 lookAhead<T>(callback: () => T): T; 4666 scanRange<T>(start: number, length: number, callback: () => T): T; 4667 tryScan<T>(callback: () => T): T; 4668 setEtsContext(isEtsContext: boolean): void; 4669 } 4670 function tokenToString(t: SyntaxKind): string | undefined; 4671 function getPositionOfLineAndCharacter(sourceFile: SourceFileLike, line: number, character: number): number; 4672 function getLineAndCharacterOfPosition(sourceFile: SourceFileLike, position: number): LineAndCharacter; 4673 function isWhiteSpaceLike(ch: number): boolean; 4674 /** Does not include line breaks. For that, see isWhiteSpaceLike. */ 4675 function isWhiteSpaceSingleLine(ch: number): boolean; 4676 function isLineBreak(ch: number): boolean; 4677 function couldStartTrivia(text: string, pos: number): boolean; 4678 function forEachLeadingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined; 4679 function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined; 4680 function forEachTrailingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined; 4681 function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined; 4682 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; 4683 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; 4684 function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined; 4685 function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined; 4686 /** Optionally, get the shebang */ 4687 function getShebang(text: string): string | undefined; 4688 function isIdentifierStart(ch: number, languageVersion: ScriptTarget | undefined): boolean; 4689 function isIdentifierPart(ch: number, languageVersion: ScriptTarget | undefined, identifierVariant?: LanguageVariant): boolean; 4690 function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, textInitial?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner; 4691} 4692declare namespace ts { 4693 function isExternalModuleNameRelative(moduleName: string): boolean; 4694 function sortAndDeduplicateDiagnostics<T extends Diagnostic>(diagnostics: readonly T[]): SortedReadonlyArray<T>; 4695 function getDefaultLibFileName(options: CompilerOptions): string; 4696 function textSpanEnd(span: TextSpan): number; 4697 function textSpanIsEmpty(span: TextSpan): boolean; 4698 function textSpanContainsPosition(span: TextSpan, position: number): boolean; 4699 function textSpanContainsTextSpan(span: TextSpan, other: TextSpan): boolean; 4700 function textSpanOverlapsWith(span: TextSpan, other: TextSpan): boolean; 4701 function textSpanOverlap(span1: TextSpan, span2: TextSpan): TextSpan | undefined; 4702 function textSpanIntersectsWithTextSpan(span: TextSpan, other: TextSpan): boolean; 4703 function textSpanIntersectsWith(span: TextSpan, start: number, length: number): boolean; 4704 function decodedTextSpanIntersectsWith(start1: number, length1: number, start2: number, length2: number): boolean; 4705 function textSpanIntersectsWithPosition(span: TextSpan, position: number): boolean; 4706 function textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan | undefined; 4707 function createTextSpan(start: number, length: number): TextSpan; 4708 function createTextSpanFromBounds(start: number, end: number): TextSpan; 4709 function textChangeRangeNewSpan(range: TextChangeRange): TextSpan; 4710 function textChangeRangeIsUnchanged(range: TextChangeRange): boolean; 4711 function createTextChangeRange(span: TextSpan, newLength: number): TextChangeRange; 4712 let unchangedTextChangeRange: TextChangeRange; 4713 /** 4714 * Called to merge all the changes that occurred across several versions of a script snapshot 4715 * into a single change. i.e. if a user keeps making successive edits to a script we will 4716 * have a text change from V1 to V2, V2 to V3, ..., Vn. 4717 * 4718 * This function will then merge those changes into a single change range valid between V1 and 4719 * Vn. 4720 */ 4721 function collapseTextChangeRangesAcrossMultipleVersions(changes: readonly TextChangeRange[]): TextChangeRange; 4722 function getTypeParameterOwner(d: Declaration): Declaration | undefined; 4723 type ParameterPropertyDeclaration = ParameterDeclaration & { 4724 parent: ConstructorDeclaration; 4725 name: Identifier; 4726 }; 4727 function isParameterPropertyDeclaration(node: Node, parent: Node): node is ParameterPropertyDeclaration; 4728 function isEmptyBindingPattern(node: BindingName): node is BindingPattern; 4729 function isEmptyBindingElement(node: BindingElement): boolean; 4730 function walkUpBindingElementsAndPatterns(binding: BindingElement): VariableDeclaration | ParameterDeclaration; 4731 function getCombinedModifierFlags(node: Declaration): ModifierFlags; 4732 function getCombinedNodeFlags(node: Node): NodeFlags; 4733 /** 4734 * Checks to see if the locale is in the appropriate format, 4735 * and if it is, attempts to set the appropriate language. 4736 */ 4737 function validateLocaleAndSetLanguage(locale: string, sys: { 4738 getExecutingFilePath(): string; 4739 resolvePath(path: string): string; 4740 fileExists(fileName: string): boolean; 4741 readFile(fileName: string): string | undefined; 4742 }, errors?: Push<Diagnostic>): void; 4743 function getOriginalNode(node: Node): Node; 4744 function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T; 4745 function getOriginalNode(node: Node | undefined): Node | undefined; 4746 function getOriginalNode<T extends Node>(node: Node | undefined, nodeTest: (node: Node | undefined) => node is T): T | undefined; 4747 /** 4748 * Iterates through the parent chain of a node and performs the callback on each parent until the callback 4749 * returns a truthy value, then returns that value. 4750 * If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit" 4751 * At that point findAncestor returns undefined. 4752 */ 4753 function findAncestor<T extends Node>(node: Node | undefined, callback: (element: Node) => element is T): T | undefined; 4754 function findAncestor(node: Node | undefined, callback: (element: Node) => boolean | "quit"): Node | undefined; 4755 /** 4756 * Gets a value indicating whether a node originated in the parse tree. 4757 * 4758 * @param node The node to test. 4759 */ 4760 function isParseTreeNode(node: Node): boolean; 4761 /** 4762 * Gets the original parse tree node for a node. 4763 * 4764 * @param node The original node. 4765 * @returns The original parse tree node if found; otherwise, undefined. 4766 */ 4767 function getParseTreeNode(node: Node | undefined): Node | undefined; 4768 /** 4769 * Gets the original parse tree node for a node. 4770 * 4771 * @param node The original node. 4772 * @param nodeTest A callback used to ensure the correct type of parse tree node is returned. 4773 * @returns The original parse tree node if found; otherwise, undefined. 4774 */ 4775 function getParseTreeNode<T extends Node>(node: T | undefined, nodeTest?: (node: Node) => node is T): T | undefined; 4776 /** Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' */ 4777 function escapeLeadingUnderscores(identifier: string): __String; 4778 /** 4779 * Remove extra underscore from escaped identifier text content. 4780 * 4781 * @param identifier The escaped identifier text. 4782 * @returns The unescaped identifier text. 4783 */ 4784 function unescapeLeadingUnderscores(identifier: __String): string; 4785 function idText(identifierOrPrivateName: Identifier | PrivateIdentifier): string; 4786 function symbolName(symbol: Symbol): string; 4787 function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined; 4788 function getNameOfDeclaration(declaration: Declaration | Expression | undefined): DeclarationName | undefined; 4789 function getDecorators(node: HasDecorators): readonly Decorator[] | undefined; 4790 function getModifiers(node: HasModifiers): readonly Modifier[] | undefined; 4791 function getAllDecorators(node: Node | undefined): readonly Decorator[]; 4792 function getIllegalDecorators(node: HasIllegalDecorators): readonly Decorator[] | undefined; 4793 /** 4794 * Gets the JSDoc parameter tags for the node if present. 4795 * 4796 * @remarks Returns any JSDoc param tag whose name matches the provided 4797 * parameter, whether a param tag on a containing function 4798 * expression, or a param tag on a variable declaration whose 4799 * initializer is the containing function. The tags closest to the 4800 * node are returned first, so in the previous example, the param 4801 * tag on the containing function expression would be first. 4802 * 4803 * For binding patterns, parameter tags are matched by position. 4804 */ 4805 function getJSDocParameterTags(param: ParameterDeclaration): readonly JSDocParameterTag[]; 4806 /** 4807 * Gets the JSDoc type parameter tags for the node if present. 4808 * 4809 * @remarks Returns any JSDoc template tag whose names match the provided 4810 * parameter, whether a template tag on a containing function 4811 * expression, or a template tag on a variable declaration whose 4812 * initializer is the containing function. The tags closest to the 4813 * node are returned first, so in the previous example, the template 4814 * tag on the containing function expression would be first. 4815 */ 4816 function getJSDocTypeParameterTags(param: TypeParameterDeclaration): readonly JSDocTemplateTag[]; 4817 /** 4818 * Return true if the node has JSDoc parameter tags. 4819 * 4820 * @remarks Includes parameter tags that are not directly on the node, 4821 * for example on a variable declaration whose initializer is a function expression. 4822 */ 4823 function hasJSDocParameterTags(node: FunctionLikeDeclaration | SignatureDeclaration): boolean; 4824 /** Gets the JSDoc augments tag for the node if present */ 4825 function getJSDocAugmentsTag(node: Node): JSDocAugmentsTag | undefined; 4826 /** Gets the JSDoc implements tags for the node if present */ 4827 function getJSDocImplementsTags(node: Node): readonly JSDocImplementsTag[]; 4828 /** Gets the JSDoc class tag for the node if present */ 4829 function getJSDocClassTag(node: Node): JSDocClassTag | undefined; 4830 /** Gets the JSDoc public tag for the node if present */ 4831 function getJSDocPublicTag(node: Node): JSDocPublicTag | undefined; 4832 /** Gets the JSDoc private tag for the node if present */ 4833 function getJSDocPrivateTag(node: Node): JSDocPrivateTag | undefined; 4834 /** Gets the JSDoc protected tag for the node if present */ 4835 function getJSDocProtectedTag(node: Node): JSDocProtectedTag | undefined; 4836 /** Gets the JSDoc protected tag for the node if present */ 4837 function getJSDocReadonlyTag(node: Node): JSDocReadonlyTag | undefined; 4838 function getJSDocOverrideTagNoCache(node: Node): JSDocOverrideTag | undefined; 4839 /** Gets the JSDoc deprecated tag for the node if present */ 4840 function getJSDocDeprecatedTag(node: Node): JSDocDeprecatedTag | undefined; 4841 /** Gets the JSDoc enum tag for the node if present */ 4842 function getJSDocEnumTag(node: Node): JSDocEnumTag | undefined; 4843 /** Gets the JSDoc this tag for the node if present */ 4844 function getJSDocThisTag(node: Node): JSDocThisTag | undefined; 4845 /** Gets the JSDoc return tag for the node if present */ 4846 function getJSDocReturnTag(node: Node): JSDocReturnTag | undefined; 4847 /** Gets the JSDoc template tag for the node if present */ 4848 function getJSDocTemplateTag(node: Node): JSDocTemplateTag | undefined; 4849 /** Gets the JSDoc type tag for the node if present and valid */ 4850 function getJSDocTypeTag(node: Node): JSDocTypeTag | undefined; 4851 /** 4852 * Gets the type node for the node if provided via JSDoc. 4853 * 4854 * @remarks The search includes any JSDoc param tag that relates 4855 * to the provided parameter, for example a type tag on the 4856 * parameter itself, or a param tag on a containing function 4857 * expression, or a param tag on a variable declaration whose 4858 * initializer is the containing function. The tags closest to the 4859 * node are examined first, so in the previous example, the type 4860 * tag directly on the node would be returned. 4861 */ 4862 function getJSDocType(node: Node): TypeNode | undefined; 4863 /** 4864 * Gets the return type node for the node if provided via JSDoc return tag or type tag. 4865 * 4866 * @remarks `getJSDocReturnTag` just gets the whole JSDoc tag. This function 4867 * gets the type from inside the braces, after the fat arrow, etc. 4868 */ 4869 function getJSDocReturnType(node: Node): TypeNode | undefined; 4870 /** Get all JSDoc tags related to a node, including those on parent nodes. */ 4871 function getJSDocTags(node: Node): readonly JSDocTag[]; 4872 /** Gets all JSDoc tags that match a specified predicate */ 4873 function getAllJSDocTags<T extends JSDocTag>(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[]; 4874 /** Gets all JSDoc tags of a specified kind */ 4875 function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[]; 4876 /** Gets the text of a jsdoc comment, flattening links to their text. */ 4877 function getTextOfJSDocComment(comment?: string | NodeArray<JSDocComment>): string | undefined; 4878 /** 4879 * Gets the effective type parameters. If the node was parsed in a 4880 * JavaScript file, gets the type parameters from the `@template` tag from JSDoc. 4881 * 4882 * This does *not* return type parameters from a jsdoc reference to a generic type, eg 4883 * 4884 * type Id = <T>(x: T) => T 4885 * /** @type {Id} / 4886 * function id(x) { return x } 4887 */ 4888 function getEffectiveTypeParameterDeclarations(node: DeclarationWithTypeParameters): readonly TypeParameterDeclaration[]; 4889 function getEffectiveConstraintOfTypeParameter(node: TypeParameterDeclaration): TypeNode | undefined; 4890 function isMemberName(node: Node): node is MemberName; 4891 function isPropertyAccessChain(node: Node): node is PropertyAccessChain; 4892 function isElementAccessChain(node: Node): node is ElementAccessChain; 4893 function isCallChain(node: Node): node is CallChain; 4894 function isOptionalChain(node: Node): node is PropertyAccessChain | ElementAccessChain | CallChain | NonNullChain; 4895 function isNullishCoalesce(node: Node): boolean; 4896 function isConstTypeReference(node: Node): boolean; 4897 function skipPartiallyEmittedExpressions(node: Expression): Expression; 4898 function skipPartiallyEmittedExpressions(node: Node): Node; 4899 function isNonNullChain(node: Node): node is NonNullChain; 4900 function isBreakOrContinueStatement(node: Node): node is BreakOrContinueStatement; 4901 function isNamedExportBindings(node: Node): node is NamedExportBindings; 4902 function isUnparsedTextLike(node: Node): node is UnparsedTextLike; 4903 function isUnparsedNode(node: Node): node is UnparsedNode; 4904 function isJSDocPropertyLikeTag(node: Node): node is JSDocPropertyLikeTag; 4905 /** 4906 * True if kind is of some token syntax kind. 4907 * For example, this is true for an IfKeyword but not for an IfStatement. 4908 * Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail. 4909 */ 4910 function isTokenKind(kind: SyntaxKind): boolean; 4911 /** 4912 * True if node is of some token syntax kind. 4913 * For example, this is true for an IfKeyword but not for an IfStatement. 4914 * Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail. 4915 */ 4916 function isToken(n: Node): boolean; 4917 function isLiteralExpression(node: Node): node is LiteralExpression; 4918 function isTemplateLiteralToken(node: Node): node is TemplateLiteralToken; 4919 function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail; 4920 function isImportOrExportSpecifier(node: Node): node is ImportSpecifier | ExportSpecifier; 4921 function isTypeOnlyImportOrExportDeclaration(node: Node): node is TypeOnlyAliasDeclaration; 4922 function isAssertionKey(node: Node): node is AssertionKey; 4923 function isStringTextContainingNode(node: Node): node is StringLiteral | TemplateLiteralToken; 4924 function isModifier(node: Node): node is Modifier; 4925 function isEntityName(node: Node): node is EntityName; 4926 function isPropertyName(node: Node): node is PropertyName; 4927 function isBindingName(node: Node): node is BindingName; 4928 function isFunctionLike(node: Node | undefined): node is SignatureDeclaration; 4929 function isAnnotationElement(node: Node): node is AnnotationElement; 4930 function isClassElement(node: Node): node is ClassElement; 4931 function isClassLike(node: Node): node is ClassLikeDeclaration; 4932 function isStruct(node: Node): node is StructDeclaration; 4933 function isAccessor(node: Node): node is AccessorDeclaration; 4934 function isAutoAccessorPropertyDeclaration(node: Node): node is AutoAccessorPropertyDeclaration; 4935 function isModifierLike(node: Node): node is ModifierLike; 4936 function isTypeElement(node: Node): node is TypeElement; 4937 function isClassOrTypeElement(node: Node): node is ClassElement | TypeElement; 4938 function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike; 4939 /** 4940 * Node test that determines whether a node is a valid type node. 4941 * This differs from the `isPartOfTypeNode` function which determines whether a node is *part* 4942 * of a TypeNode. 4943 */ 4944 function isTypeNode(node: Node): node is TypeNode; 4945 function isFunctionOrConstructorTypeNode(node: Node): node is FunctionTypeNode | ConstructorTypeNode; 4946 function isPropertyAccessOrQualifiedName(node: Node): node is PropertyAccessExpression | QualifiedName; 4947 function isCallLikeExpression(node: Node): node is CallLikeExpression; 4948 function isCallOrNewExpression(node: Node): node is CallExpression | NewExpression; 4949 function isTemplateLiteral(node: Node): node is TemplateLiteral; 4950 function isAssertionExpression(node: Node): node is AssertionExpression; 4951 function isIterationStatement(node: Node, lookInLabeledStatements: false): node is IterationStatement; 4952 function isIterationStatement(node: Node, lookInLabeledStatements: boolean): node is IterationStatement | LabeledStatement; 4953 function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement; 4954 function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause; 4955 /** True if node is of a kind that may contain comment text. */ 4956 function isJSDocCommentContainingNode(node: Node): boolean; 4957 function isSetAccessor(node: Node): node is SetAccessorDeclaration; 4958 function isGetAccessor(node: Node): node is GetAccessorDeclaration; 4959 /** True if has initializer node attached to it. */ 4960 function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer; 4961 function isObjectLiteralElement(node: Node): node is ObjectLiteralElement; 4962 function isStringLiteralLike(node: Node): node is StringLiteralLike; 4963 function isJSDocLinkLike(node: Node): node is JSDocLink | JSDocLinkCode | JSDocLinkPlain; 4964 function hasRestParameter(s: SignatureDeclaration | JSDocSignature): boolean; 4965 function isRestParameter(node: ParameterDeclaration | JSDocParameterTag): boolean; 4966} 4967declare namespace ts { 4968 function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode: SourceFile): CommentRange[] | undefined; 4969 function createTextWriter(newLine: string): EmitTextWriter; 4970 /** 4971 * Bypasses immutability and directly sets the `parent` property of each `Node` recursively. 4972 * @param rootNode The root node from which to start the recursion. 4973 * @param incremental When `true`, only recursively descends through nodes whose `parent` pointers are incorrect. 4974 * This allows us to quickly bail out of setting `parent` for subtrees during incremental parsing. 4975 */ 4976 function setParentRecursive<T extends Node>(rootNode: T, incremental: boolean): T; 4977 function setParentRecursive<T extends Node>(rootNode: T | undefined, incremental: boolean): T | undefined; 4978} 4979declare namespace ts { 4980 const factory: NodeFactory; 4981 function createUnparsedSourceFile(text: string): UnparsedSource; 4982 function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource; 4983 function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource; 4984 function createInputFiles(javascriptText: string, declarationText: string): InputFiles; 4985 function createInputFiles(readFileText: (path: string) => string | undefined, javascriptPath: string, javascriptMapPath: string | undefined, declarationPath: string, declarationMapPath: string | undefined, buildInfoPath: string | undefined): InputFiles; 4986 function createInputFiles(javascriptText: string, declarationText: string, javascriptMapPath: string | undefined, javascriptMapText: string | undefined, declarationMapPath: string | undefined, declarationMapText: string | undefined): InputFiles; 4987 /** 4988 * Create an external source map source file reference 4989 */ 4990 function createSourceMapSource(fileName: string, text: string, skipTrivia?: (pos: number) => number): SourceMapSource; 4991 function setOriginalNode<T extends Node>(node: T, original: Node | undefined): T; 4992} 4993declare namespace ts { 4994 /** 4995 * Clears any `EmitNode` entries from parse-tree nodes. 4996 * @param sourceFile A source file. 4997 */ 4998 function disposeEmitNodes(sourceFile: SourceFile | undefined): void; 4999 /** 5000 * Sets flags that control emit behavior of a node. 5001 */ 5002 function setEmitFlags<T extends Node>(node: T, emitFlags: EmitFlags): T; 5003 /** 5004 * Gets a custom text range to use when emitting source maps. 5005 */ 5006 function getSourceMapRange(node: Node): SourceMapRange; 5007 /** 5008 * Sets a custom text range to use when emitting source maps. 5009 */ 5010 function setSourceMapRange<T extends Node>(node: T, range: SourceMapRange | undefined): T; 5011 /** 5012 * Gets the TextRange to use for source maps for a token of a node. 5013 */ 5014 function getTokenSourceMapRange(node: Node, token: SyntaxKind): SourceMapRange | undefined; 5015 /** 5016 * Sets the TextRange to use for source maps for a token of a node. 5017 */ 5018 function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: SourceMapRange | undefined): T; 5019 /** 5020 * Gets a custom text range to use when emitting comments. 5021 */ 5022 function getCommentRange(node: Node): TextRange; 5023 /** 5024 * Sets a custom text range to use when emitting comments. 5025 */ 5026 function setCommentRange<T extends Node>(node: T, range: TextRange): T; 5027 function getSyntheticLeadingComments(node: Node): SynthesizedComment[] | undefined; 5028 function setSyntheticLeadingComments<T extends Node>(node: T, comments: SynthesizedComment[] | undefined): T; 5029 function addSyntheticLeadingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T; 5030 function getSyntheticTrailingComments(node: Node): SynthesizedComment[] | undefined; 5031 function setSyntheticTrailingComments<T extends Node>(node: T, comments: SynthesizedComment[] | undefined): T; 5032 function addSyntheticTrailingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T; 5033 function moveSyntheticComments<T extends Node>(node: T, original: Node): T; 5034 /** 5035 * Gets the constant value to emit for an expression representing an enum. 5036 */ 5037 function getConstantValue(node: AccessExpression): string | number | undefined; 5038 /** 5039 * Sets the constant value to emit for an expression. 5040 */ 5041 function setConstantValue(node: AccessExpression, value: string | number): AccessExpression; 5042 /** 5043 * Adds an EmitHelper to a node. 5044 */ 5045 function addEmitHelper<T extends Node>(node: T, helper: EmitHelper): T; 5046 /** 5047 * Add EmitHelpers to a node. 5048 */ 5049 function addEmitHelpers<T extends Node>(node: T, helpers: EmitHelper[] | undefined): T; 5050 /** 5051 * Removes an EmitHelper from a node. 5052 */ 5053 function removeEmitHelper(node: Node, helper: EmitHelper): boolean; 5054 /** 5055 * Gets the EmitHelpers of a node. 5056 */ 5057 function getEmitHelpers(node: Node): EmitHelper[] | undefined; 5058 /** 5059 * Moves matching emit helpers from a source node to a target node. 5060 */ 5061 function moveEmitHelpers(source: Node, target: Node, predicate: (helper: EmitHelper) => boolean): void; 5062} 5063declare namespace ts { 5064 function isNumericLiteral(node: Node): node is NumericLiteral; 5065 function isBigIntLiteral(node: Node): node is BigIntLiteral; 5066 function isStringLiteral(node: Node): node is StringLiteral; 5067 function isJsxText(node: Node): node is JsxText; 5068 function isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral; 5069 function isNoSubstitutionTemplateLiteral(node: Node): node is NoSubstitutionTemplateLiteral; 5070 function isTemplateHead(node: Node): node is TemplateHead; 5071 function isTemplateMiddle(node: Node): node is TemplateMiddle; 5072 function isTemplateTail(node: Node): node is TemplateTail; 5073 function isDotDotDotToken(node: Node): node is DotDotDotToken; 5074 function isPlusToken(node: Node): node is PlusToken; 5075 function isMinusToken(node: Node): node is MinusToken; 5076 function isAsteriskToken(node: Node): node is AsteriskToken; 5077 function isIdentifier(node: Node): node is Identifier; 5078 function isPrivateIdentifier(node: Node): node is PrivateIdentifier; 5079 function isQualifiedName(node: Node): node is QualifiedName; 5080 function isComputedPropertyName(node: Node): node is ComputedPropertyName; 5081 function isTypeParameterDeclaration(node: Node): node is TypeParameterDeclaration; 5082 function isParameter(node: Node): node is ParameterDeclaration; 5083 function isDecorator(node: Node): node is Decorator; 5084 function isAnnotation(node: Node): node is Annotation; 5085 function isPropertySignature(node: Node): node is PropertySignature; 5086 function isPropertyDeclaration(node: Node): node is PropertyDeclaration; 5087 function isAnnotationPropertyDeclaration(node: Node): node is AnnotationPropertyDeclaration; 5088 function isMethodSignature(node: Node): node is MethodSignature; 5089 function isMethodDeclaration(node: Node): node is MethodDeclaration; 5090 function isClassStaticBlockDeclaration(node: Node): node is ClassStaticBlockDeclaration; 5091 function isConstructorDeclaration(node: Node): node is ConstructorDeclaration; 5092 function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration; 5093 function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration; 5094 function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration; 5095 function isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration; 5096 function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration; 5097 function isTypePredicateNode(node: Node): node is TypePredicateNode; 5098 function isTypeReferenceNode(node: Node): node is TypeReferenceNode; 5099 function isFunctionTypeNode(node: Node): node is FunctionTypeNode; 5100 function isConstructorTypeNode(node: Node): node is ConstructorTypeNode; 5101 function isTypeQueryNode(node: Node): node is TypeQueryNode; 5102 function isTypeLiteralNode(node: Node): node is TypeLiteralNode; 5103 function isArrayTypeNode(node: Node): node is ArrayTypeNode; 5104 function isTupleTypeNode(node: Node): node is TupleTypeNode; 5105 function isNamedTupleMember(node: Node): node is NamedTupleMember; 5106 function isOptionalTypeNode(node: Node): node is OptionalTypeNode; 5107 function isRestTypeNode(node: Node): node is RestTypeNode; 5108 function isUnionTypeNode(node: Node): node is UnionTypeNode; 5109 function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode; 5110 function isConditionalTypeNode(node: Node): node is ConditionalTypeNode; 5111 function isInferTypeNode(node: Node): node is InferTypeNode; 5112 function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode; 5113 function isThisTypeNode(node: Node): node is ThisTypeNode; 5114 function isTypeOperatorNode(node: Node): node is TypeOperatorNode; 5115 function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode; 5116 function isMappedTypeNode(node: Node): node is MappedTypeNode; 5117 function isLiteralTypeNode(node: Node): node is LiteralTypeNode; 5118 function isImportTypeNode(node: Node): node is ImportTypeNode; 5119 function isTemplateLiteralTypeSpan(node: Node): node is TemplateLiteralTypeSpan; 5120 function isTemplateLiteralTypeNode(node: Node): node is TemplateLiteralTypeNode; 5121 function isObjectBindingPattern(node: Node): node is ObjectBindingPattern; 5122 function isArrayBindingPattern(node: Node): node is ArrayBindingPattern; 5123 function isBindingElement(node: Node): node is BindingElement; 5124 function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression; 5125 function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression; 5126 function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression; 5127 function isElementAccessExpression(node: Node): node is ElementAccessExpression; 5128 function isCallExpression(node: Node): node is CallExpression; 5129 function isNewExpression(node: Node): node is NewExpression; 5130 function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression; 5131 function isTypeAssertionExpression(node: Node): node is TypeAssertion; 5132 function isParenthesizedExpression(node: Node): node is ParenthesizedExpression; 5133 function isFunctionExpression(node: Node): node is FunctionExpression; 5134 function isEtsComponentExpression(node: Node): node is EtsComponentExpression; 5135 function isArrowFunction(node: Node): node is ArrowFunction; 5136 function isDeleteExpression(node: Node): node is DeleteExpression; 5137 function isTypeOfExpression(node: Node): node is TypeOfExpression; 5138 function isVoidExpression(node: Node): node is VoidExpression; 5139 function isAwaitExpression(node: Node): node is AwaitExpression; 5140 function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression; 5141 function isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression; 5142 function isBinaryExpression(node: Node): node is BinaryExpression; 5143 function isConditionalExpression(node: Node): node is ConditionalExpression; 5144 function isTemplateExpression(node: Node): node is TemplateExpression; 5145 function isYieldExpression(node: Node): node is YieldExpression; 5146 function isSpreadElement(node: Node): node is SpreadElement; 5147 function isClassExpression(node: Node): node is ClassExpression; 5148 function isOmittedExpression(node: Node): node is OmittedExpression; 5149 function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments; 5150 function isAsExpression(node: Node): node is AsExpression; 5151 function isSatisfiesExpression(node: Node): node is SatisfiesExpression; 5152 function isNonNullExpression(node: Node): node is NonNullExpression; 5153 function isMetaProperty(node: Node): node is MetaProperty; 5154 function isSyntheticExpression(node: Node): node is SyntheticExpression; 5155 function isPartiallyEmittedExpression(node: Node): node is PartiallyEmittedExpression; 5156 function isCommaListExpression(node: Node): node is CommaListExpression; 5157 function isTemplateSpan(node: Node): node is TemplateSpan; 5158 function isSemicolonClassElement(node: Node): node is SemicolonClassElement; 5159 function isBlock(node: Node): node is Block; 5160 function isVariableStatement(node: Node): node is VariableStatement; 5161 function isEmptyStatement(node: Node): node is EmptyStatement; 5162 function isExpressionStatement(node: Node): node is ExpressionStatement; 5163 function isIfStatement(node: Node): node is IfStatement; 5164 function isDoStatement(node: Node): node is DoStatement; 5165 function isWhileStatement(node: Node): node is WhileStatement; 5166 function isForStatement(node: Node): node is ForStatement; 5167 function isForInStatement(node: Node): node is ForInStatement; 5168 function isForOfStatement(node: Node): node is ForOfStatement; 5169 function isContinueStatement(node: Node): node is ContinueStatement; 5170 function isBreakStatement(node: Node): node is BreakStatement; 5171 function isReturnStatement(node: Node): node is ReturnStatement; 5172 function isWithStatement(node: Node): node is WithStatement; 5173 function isSwitchStatement(node: Node): node is SwitchStatement; 5174 function isLabeledStatement(node: Node): node is LabeledStatement; 5175 function isThrowStatement(node: Node): node is ThrowStatement; 5176 function isTryStatement(node: Node): node is TryStatement; 5177 function isDebuggerStatement(node: Node): node is DebuggerStatement; 5178 function isVariableDeclaration(node: Node): node is VariableDeclaration; 5179 function isVariableDeclarationList(node: Node): node is VariableDeclarationList; 5180 function isFunctionDeclaration(node: Node): node is FunctionDeclaration; 5181 function isClassDeclaration(node: Node): node is ClassDeclaration; 5182 function isStructDeclaration(node: Node): node is StructDeclaration; 5183 function isAnnotationDeclaration(node: Node): node is AnnotationDeclaration; 5184 function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration; 5185 function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration; 5186 function isEnumDeclaration(node: Node): node is EnumDeclaration; 5187 function isModuleDeclaration(node: Node): node is ModuleDeclaration; 5188 function isModuleBlock(node: Node): node is ModuleBlock; 5189 function isCaseBlock(node: Node): node is CaseBlock; 5190 function isNamespaceExportDeclaration(node: Node): node is NamespaceExportDeclaration; 5191 function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration; 5192 function isImportDeclaration(node: Node): node is ImportDeclaration; 5193 function isImportClause(node: Node): node is ImportClause; 5194 function isImportTypeAssertionContainer(node: Node): node is ImportTypeAssertionContainer; 5195 function isAssertClause(node: Node): node is AssertClause; 5196 function isAssertEntry(node: Node): node is AssertEntry; 5197 function isNamespaceImport(node: Node): node is NamespaceImport; 5198 function isNamespaceExport(node: Node): node is NamespaceExport; 5199 function isNamedImports(node: Node): node is NamedImports; 5200 function isImportSpecifier(node: Node): node is ImportSpecifier; 5201 function isExportAssignment(node: Node): node is ExportAssignment; 5202 function isExportDeclaration(node: Node): node is ExportDeclaration; 5203 function isNamedExports(node: Node): node is NamedExports; 5204 function isExportSpecifier(node: Node): node is ExportSpecifier; 5205 function isMissingDeclaration(node: Node): node is MissingDeclaration; 5206 function isNotEmittedStatement(node: Node): node is NotEmittedStatement; 5207 function isExternalModuleReference(node: Node): node is ExternalModuleReference; 5208 function isJsxElement(node: Node): node is JsxElement; 5209 function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement; 5210 function isJsxOpeningElement(node: Node): node is JsxOpeningElement; 5211 function isJsxClosingElement(node: Node): node is JsxClosingElement; 5212 function isJsxFragment(node: Node): node is JsxFragment; 5213 function isJsxOpeningFragment(node: Node): node is JsxOpeningFragment; 5214 function isJsxClosingFragment(node: Node): node is JsxClosingFragment; 5215 function isJsxAttribute(node: Node): node is JsxAttribute; 5216 function isJsxAttributes(node: Node): node is JsxAttributes; 5217 function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute; 5218 function isJsxExpression(node: Node): node is JsxExpression; 5219 function isCaseClause(node: Node): node is CaseClause; 5220 function isDefaultClause(node: Node): node is DefaultClause; 5221 function isHeritageClause(node: Node): node is HeritageClause; 5222 function isCatchClause(node: Node): node is CatchClause; 5223 function isPropertyAssignment(node: Node): node is PropertyAssignment; 5224 function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment; 5225 function isSpreadAssignment(node: Node): node is SpreadAssignment; 5226 function isEnumMember(node: Node): node is EnumMember; 5227 function isUnparsedPrepend(node: Node): node is UnparsedPrepend; 5228 function isSourceFile(node: Node): node is SourceFile; 5229 function isBundle(node: Node): node is Bundle; 5230 function isUnparsedSource(node: Node): node is UnparsedSource; 5231 function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression; 5232 function isJSDocNameReference(node: Node): node is JSDocNameReference; 5233 function isJSDocMemberName(node: Node): node is JSDocMemberName; 5234 function isJSDocLink(node: Node): node is JSDocLink; 5235 function isJSDocLinkCode(node: Node): node is JSDocLinkCode; 5236 function isJSDocLinkPlain(node: Node): node is JSDocLinkPlain; 5237 function isJSDocAllType(node: Node): node is JSDocAllType; 5238 function isJSDocUnknownType(node: Node): node is JSDocUnknownType; 5239 function isJSDocNullableType(node: Node): node is JSDocNullableType; 5240 function isJSDocNonNullableType(node: Node): node is JSDocNonNullableType; 5241 function isJSDocOptionalType(node: Node): node is JSDocOptionalType; 5242 function isJSDocFunctionType(node: Node): node is JSDocFunctionType; 5243 function isJSDocVariadicType(node: Node): node is JSDocVariadicType; 5244 function isJSDocNamepathType(node: Node): node is JSDocNamepathType; 5245 function isJSDoc(node: Node): node is JSDoc; 5246 function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral; 5247 function isJSDocSignature(node: Node): node is JSDocSignature; 5248 function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag; 5249 function isJSDocAuthorTag(node: Node): node is JSDocAuthorTag; 5250 function isJSDocClassTag(node: Node): node is JSDocClassTag; 5251 function isJSDocCallbackTag(node: Node): node is JSDocCallbackTag; 5252 function isJSDocPublicTag(node: Node): node is JSDocPublicTag; 5253 function isJSDocPrivateTag(node: Node): node is JSDocPrivateTag; 5254 function isJSDocProtectedTag(node: Node): node is JSDocProtectedTag; 5255 function isJSDocReadonlyTag(node: Node): node is JSDocReadonlyTag; 5256 function isJSDocOverrideTag(node: Node): node is JSDocOverrideTag; 5257 function isJSDocDeprecatedTag(node: Node): node is JSDocDeprecatedTag; 5258 function isJSDocSeeTag(node: Node): node is JSDocSeeTag; 5259 function isJSDocEnumTag(node: Node): node is JSDocEnumTag; 5260 function isJSDocParameterTag(node: Node): node is JSDocParameterTag; 5261 function isJSDocReturnTag(node: Node): node is JSDocReturnTag; 5262 function isJSDocThisTag(node: Node): node is JSDocThisTag; 5263 function isJSDocTypeTag(node: Node): node is JSDocTypeTag; 5264 function isJSDocTemplateTag(node: Node): node is JSDocTemplateTag; 5265 function isJSDocTypedefTag(node: Node): node is JSDocTypedefTag; 5266 function isJSDocUnknownTag(node: Node): node is JSDocUnknownTag; 5267 function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag; 5268 function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag; 5269} 5270declare namespace ts { 5271 function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T; 5272 function canHaveModifiers(node: Node): node is HasModifiers; 5273 function canHaveDecorators(node: Node): node is HasDecorators; 5274} 5275declare namespace ts { 5276 /** 5277 * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes 5278 * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, 5279 * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns 5280 * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. 5281 * 5282 * @param node a given node to visit its children 5283 * @param cbNode a callback to be invoked for all child nodes 5284 * @param cbNodes a callback to be invoked for embedded array 5285 * 5286 * @remarks `forEachChild` must visit the children of a node in the order 5287 * that they appear in the source code. The language service depends on this property to locate nodes by position. 5288 */ 5289 export function forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray<Node>) => T | undefined): T | undefined; 5290 export interface CreateSourceFileOptions { 5291 languageVersion: ScriptTarget; 5292 /** 5293 * Controls the format the file is detected as - this can be derived from only the path 5294 * and files on disk, but needs to be done with a module resolution cache in scope to be performant. 5295 * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`. 5296 */ 5297 impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS; 5298 /** 5299 * Controls how module-y-ness is set for the given file. Usually the result of calling 5300 * `getSetExternalModuleIndicator` on a valid `CompilerOptions` object. If not present, the default 5301 * check specified by `isFileProbablyExternalModule` will be used to set the field. 5302 */ 5303 setExternalModuleIndicator?: (file: SourceFile) => void; 5304 } 5305 export function createSourceFile(fileName: string, sourceText: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, setParentNodes?: boolean, scriptKind?: ScriptKind, options?: CompilerOptions): SourceFile; 5306 export function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName | undefined; 5307 /** 5308 * Parse json text into SyntaxTree and return node and parse errors if any 5309 * @param fileName 5310 * @param sourceText 5311 */ 5312 export function parseJsonText(fileName: string, sourceText: string): JsonSourceFile; 5313 export function isExternalModule(file: SourceFile): boolean; 5314 export function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean, option?: CompilerOptions): SourceFile; 5315 export {}; 5316} 5317declare namespace ts { 5318 export function parseCommandLine(commandLine: readonly string[], readFile?: (path: string) => string | undefined): ParsedCommandLine; 5319 export type DiagnosticReporter = (diagnostic: Diagnostic) => void; 5320 /** 5321 * Reports config file diagnostics 5322 */ 5323 export interface ConfigFileDiagnosticsReporter { 5324 /** 5325 * Reports unrecoverable error when parsing config file 5326 */ 5327 onUnRecoverableConfigFileDiagnostic: DiagnosticReporter; 5328 } 5329 /** 5330 * Interface extending ParseConfigHost to support ParseConfigFile that reads config file and reports errors 5331 */ 5332 export interface ParseConfigFileHost extends ParseConfigHost, ConfigFileDiagnosticsReporter { 5333 getCurrentDirectory(): string; 5334 } 5335 /** 5336 * Reads the config file, reports errors if any and exits if the config file cannot be found 5337 */ 5338 export function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions | undefined, host: ParseConfigFileHost, extendedConfigCache?: Map<ExtendedConfigCacheEntry>, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): ParsedCommandLine | undefined; 5339 /** 5340 * Read tsconfig.json file 5341 * @param fileName The path to the config file 5342 */ 5343 export function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): { 5344 config?: any; 5345 error?: Diagnostic; 5346 }; 5347 /** 5348 * Parse the text of the tsconfig.json file 5349 * @param fileName The path to the config file 5350 * @param jsonText The text of the config file 5351 */ 5352 export function parseConfigFileTextToJson(fileName: string, jsonText: string): { 5353 config?: any; 5354 error?: Diagnostic; 5355 }; 5356 /** 5357 * Read tsconfig.json file 5358 * @param fileName The path to the config file 5359 */ 5360 export function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile; 5361 /** 5362 * Convert the json syntax tree into the json value 5363 */ 5364 export function convertToObject(sourceFile: JsonSourceFile, errors: Push<Diagnostic>): any; 5365 /** 5366 * Parse the contents of a config file (tsconfig.json). 5367 * @param json The contents of the config file to parse 5368 * @param host Instance of ParseConfigHost used to enumerate files in folder. 5369 * @param basePath A root directory to resolve relative path entries in the config 5370 * file to. e.g. outDir 5371 */ 5372 export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map<ExtendedConfigCacheEntry>, existingWatchOptions?: WatchOptions): ParsedCommandLine; 5373 /** 5374 * Parse the contents of a config file (tsconfig.json). 5375 * @param jsonNode The contents of the config file to parse 5376 * @param host Instance of ParseConfigHost used to enumerate files in folder. 5377 * @param basePath A root directory to resolve relative path entries in the config 5378 * file to. e.g. outDir 5379 */ 5380 export function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map<ExtendedConfigCacheEntry>, existingWatchOptions?: WatchOptions): ParsedCommandLine; 5381 export interface ParsedTsconfig { 5382 raw: any; 5383 options?: CompilerOptions; 5384 watchOptions?: WatchOptions; 5385 typeAcquisition?: TypeAcquisition; 5386 /** 5387 * Note that the case of the config path has not yet been normalized, as no files have been imported into the project yet 5388 */ 5389 extendedConfigPath?: string; 5390 } 5391 export interface ExtendedConfigCacheEntry { 5392 extendedResult: TsConfigSourceFile; 5393 extendedConfig: ParsedTsconfig | undefined; 5394 } 5395 export function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): { 5396 options: CompilerOptions; 5397 errors: Diagnostic[]; 5398 }; 5399 export function convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): { 5400 options: TypeAcquisition; 5401 errors: Diagnostic[]; 5402 }; 5403 export {}; 5404} 5405declare namespace ts { 5406 export function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined; 5407 /** 5408 * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. 5409 * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups 5410 * is assumed to be the same as root directory of the project. 5411 */ 5412 export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache, resolutionMode?: SourceFile["impliedNodeFormat"]): ResolvedTypeReferenceDirectiveWithFailedLookupLocations; 5413 /** 5414 * Given a set of options, returns the set of type directive names 5415 * that should be included for this program automatically. 5416 * This list could either come from the config file, 5417 * or from enumerating the types root + initial secondary types lookup location. 5418 * More type directives might appear in the program later as a result of loading actual source files; 5419 * this list is only the set of defaults that are implicitly included. 5420 */ 5421 export function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[]; 5422 export interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache { 5423 } 5424 export interface ModeAwareCache<T> { 5425 get(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined): T | undefined; 5426 set(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined, value: T): this; 5427 delete(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined): this; 5428 has(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined): boolean; 5429 forEach(cb: (elem: T, key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined) => void): void; 5430 size(): number; 5431 } 5432 /** 5433 * Cached resolutions per containing directory. 5434 * This assumes that any module id will have the same resolution for sibling files located in the same folder. 5435 */ 5436 export interface PerDirectoryResolutionCache<T> { 5437 getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): ModeAwareCache<T>; 5438 clear(): void; 5439 /** 5440 * Updates with the current compilerOptions the cache will operate with. 5441 * This updates the redirects map as well if needed so module resolutions are cached if they can across the projects 5442 */ 5443 update(options: CompilerOptions): void; 5444 } 5445 export interface ModuleResolutionCache extends PerDirectoryResolutionCache<ResolvedModuleWithFailedLookupLocations>, NonRelativeModuleNameResolutionCache, PackageJsonInfoCache { 5446 getPackageJsonInfoCache(): PackageJsonInfoCache; 5447 } 5448 /** 5449 * Stored map from non-relative module name to a table: directory -> result of module lookup in this directory 5450 * We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive. 5451 */ 5452 export interface NonRelativeModuleNameResolutionCache extends PackageJsonInfoCache { 5453 getOrCreateCacheForModuleName(nonRelativeModuleName: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined, redirectedReference?: ResolvedProjectReference): PerModuleNameCache; 5454 } 5455 export interface PackageJsonInfoCache { 5456 clear(): void; 5457 } 5458 export interface PerModuleNameCache { 5459 get(directory: string): ResolvedModuleWithFailedLookupLocations | undefined; 5460 set(directory: string, result: ResolvedModuleWithFailedLookupLocations): void; 5461 } 5462 export function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache; 5463 export function createTypeReferenceDirectiveResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): TypeReferenceDirectiveResolutionCache; 5464 export function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache, mode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations | undefined; 5465 export function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations; 5466 export function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations; 5467 /** 5468 * This will be called on the successfully resolved path from `loadModuleFromFile`. 5469 * (Not needed for `loadModuleFromNodeModules` as that looks up the `package.json` or `oh-package.json5` as part of resolution.) 5470 * 5471 * packageDirectory is the directory of the package itself. 5472 * For `blah/node_modules/foo/index.d.ts` this is packageDirectory: "foo" 5473 * For `/node_modules/foo/bar.d.ts` this is packageDirectory: "foo" 5474 * For `/node_modules/@types/foo/bar/index.d.ts` this is packageDirectory: "@types/foo" 5475 * For `/node_modules/foo/bar/index.d.ts` this is packageDirectory: "foo" 5476 */ 5477 export function parseModuleFromPath(resolved: string, packageManagerType?: string): string | undefined; 5478 export function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations; 5479 export {}; 5480} 5481declare namespace ts { 5482 function concatenateDecoratorsAndModifiers(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined): readonly ModifierLike[] | undefined; 5483 function isEtsFunctionDecorators(name: string | undefined, options: CompilerOptions): boolean; 5484 function isOhpm(packageManagerType: string | undefined): boolean; 5485 const ohModulesPathPart: string; 5486 function isOHModules(modulePath: string): boolean; 5487 function isOhpmAndOhModules(packageManagerType: string | undefined, modulePath: string): boolean; 5488 function getModulePathPartByPMType(packageManagerType: string | undefined): string; 5489 function getModuleByPMType(packageManagerType: string | undefined): string; 5490 function getPackageJsonByPMType(packageManagerType: string | undefined): string; 5491 function isOHModulesDirectory(dirPath: Path): boolean; 5492 function isTargetModulesDerectory(dirPath: Path): boolean; 5493 function pathContainsOHModules(path: string): boolean; 5494 function choosePathContainsModules(packageManagerType: string | undefined, fileName: string): boolean; 5495 function getTypeExportImportAndConstEnumTransformer(context: TransformationContext): (node: SourceFile) => SourceFile; 5496 function getAnnotationTransformer(): TransformerFactory<SourceFile>; 5497 function transformAnnotation(context: TransformationContext): (node: SourceFile) => SourceFile; 5498 /** 5499 * Add 'type' flag to import/export when import/export an type member. 5500 * Replace const enum with number and string literal. 5501 */ 5502 function transformTypeExportImportAndConstEnumInTypeScript(context: TransformationContext): (node: SourceFile) => SourceFile; 5503 function hasTsNoCheckOrTsIgnoreFlag(node: SourceFile): boolean; 5504 function createObfTextSingleLineWriter(): EmitTextWriter; 5505 const REQUIRE_DECORATOR = "Require"; 5506 function cleanKitJsonCache(): void; 5507 function getMaxFlowDepth(compilerOptions: CompilerOptions): number; 5508 interface MoreInfo { 5509 cn: string; 5510 en: string; 5511 } 5512 class ErrorInfo { 5513 code: string; 5514 description: string; 5515 cause: string; 5516 position: string; 5517 solutions: string[]; 5518 moreInfo?: MoreInfo; 5519 getCode(): string; 5520 getDescription(): string; 5521 getCause(): string; 5522 getPosition(): string; 5523 getSolutions(): string[]; 5524 getMoreInfo(): MoreInfo | undefined; 5525 } 5526 enum ErrorCodeArea { 5527 TSC = 0, 5528 LINTER = 1, 5529 UI = 2 5530 } 5531 function getErrorCode(diagnostic: Diagnostic): ErrorInfo; 5532 function getErrorCodeArea(code: number): ErrorCodeArea; 5533} 5534declare namespace ts { 5535 /** 5536 * Visits a Node using the supplied visitor, possibly returning a new Node in its place. 5537 * 5538 * @param node The Node to visit. 5539 * @param visitor The callback used to visit the Node. 5540 * @param test A callback to execute to verify the Node is valid. 5541 * @param lift An optional callback to execute to lift a NodeArray into a valid Node. 5542 */ 5543 function visitNode<T extends Node>(node: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T; 5544 /** 5545 * Visits a Node using the supplied visitor, possibly returning a new Node in its place. 5546 * 5547 * @param node The Node to visit. 5548 * @param visitor The callback used to visit the Node. 5549 * @param test A callback to execute to verify the Node is valid. 5550 * @param lift An optional callback to execute to lift a NodeArray into a valid Node. 5551 */ 5552 function visitNode<T extends Node>(node: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T | undefined; 5553 /** 5554 * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. 5555 * 5556 * @param nodes The NodeArray to visit. 5557 * @param visitor The callback used to visit a Node. 5558 * @param test A node test to execute for each node. 5559 * @param start An optional value indicating the starting offset at which to start visiting. 5560 * @param count An optional value indicating the maximum number of nodes to visit. 5561 */ 5562 function visitNodes<T extends Node>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>; 5563 /** 5564 * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. 5565 * 5566 * @param nodes The NodeArray to visit. 5567 * @param visitor The callback used to visit a Node. 5568 * @param test A node test to execute for each node. 5569 * @param start An optional value indicating the starting offset at which to start visiting. 5570 * @param count An optional value indicating the maximum number of nodes to visit. 5571 */ 5572 function visitNodes<T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined; 5573 /** 5574 * Starts a new lexical environment and visits a statement list, ending the lexical environment 5575 * and merging hoisted declarations upon completion. 5576 */ 5577 function visitLexicalEnvironment(statements: NodeArray<Statement>, visitor: Visitor, context: TransformationContext, start?: number, ensureUseStrict?: boolean, nodesVisitor?: NodesVisitor): NodeArray<Statement>; 5578 /** 5579 * Starts a new lexical environment and visits a parameter list, suspending the lexical 5580 * environment upon completion. 5581 */ 5582 function visitParameterList(nodes: NodeArray<ParameterDeclaration>, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray<ParameterDeclaration>; 5583 function visitParameterList(nodes: NodeArray<ParameterDeclaration> | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray<ParameterDeclaration> | undefined; 5584 /** 5585 * Resumes a suspended lexical environment and visits a function body, ending the lexical 5586 * environment and merging hoisted declarations upon completion. 5587 */ 5588 function visitFunctionBody(node: FunctionBody, visitor: Visitor, context: TransformationContext): FunctionBody; 5589 /** 5590 * Resumes a suspended lexical environment and visits a function body, ending the lexical 5591 * environment and merging hoisted declarations upon completion. 5592 */ 5593 function visitFunctionBody(node: FunctionBody | undefined, visitor: Visitor, context: TransformationContext): FunctionBody | undefined; 5594 /** 5595 * Resumes a suspended lexical environment and visits a concise body, ending the lexical 5596 * environment and merging hoisted declarations upon completion. 5597 */ 5598 function visitFunctionBody(node: ConciseBody, visitor: Visitor, context: TransformationContext): ConciseBody; 5599 /** 5600 * Visits an iteration body, adding any block-scoped variables required by the transformation. 5601 */ 5602 function visitIterationBody(body: Statement, visitor: Visitor, context: TransformationContext): Statement; 5603 /** 5604 * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. 5605 * 5606 * @param node The Node whose children will be visited. 5607 * @param visitor The callback used to visit each child. 5608 * @param context A lexical environment context for the visitor. 5609 */ 5610 function visitEachChild<T extends Node>(node: T, visitor: Visitor, context: TransformationContext): T; 5611 /** 5612 * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. 5613 * 5614 * @param node The Node whose children will be visited. 5615 * @param visitor The callback used to visit each child. 5616 * @param context A lexical environment context for the visitor. 5617 */ 5618 function visitEachChild<T extends Node>(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; 5619} 5620declare namespace ts { 5621 interface SourceMapGeneratorOptions { 5622 extendedDiagnostics?: boolean; 5623 } 5624 function createSourceMapGenerator(host: EmitHost, file: string, sourceRoot: string, sourcesDirectoryPath: string, generatorOptions: SourceMapGeneratorOptions): SourceMapGenerator; 5625} 5626declare namespace ts { 5627 function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): string | undefined; 5628 function getTsBuildInfoEmitOutputFilePathForLinter(tsBuildInfoPath: string): string; 5629 function getOutputFileNames(commandLine: ParsedCommandLine, inputFileName: string, ignoreCase: boolean): readonly string[]; 5630 function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer; 5631} 5632declare namespace ts { 5633 export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string | undefined; 5634 export function resolveTripleslashReference(moduleName: string, containingFile: string): string; 5635 export function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost; 5636 export function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 5637 export interface FormatDiagnosticsHost { 5638 getCurrentDirectory(): string; 5639 getCanonicalFileName(fileName: string): string; 5640 getNewLine(): string; 5641 } 5642 export function formatDiagnostics(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string; 5643 export function formatDiagnostic(diagnostic: Diagnostic, host: FormatDiagnosticsHost): string; 5644 export function formatDiagnosticsWithColorAndContext(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string; 5645 export function flattenDiagnosticMessageText(diag: string | DiagnosticMessageChain | undefined, newLine: string, indent?: number): string; 5646 /** 5647 * Calculates the resulting resolution mode for some reference in some file - this is generally the explicitly 5648 * provided resolution mode in the reference, unless one is not present, in which case it is the mode of the containing file. 5649 */ 5650 export function getModeForFileReference(ref: FileReference | string, containingFileMode: SourceFile["impliedNodeFormat"]): ModuleKind.CommonJS | ModuleKind.ESNext | undefined; 5651 /** 5652 * Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly 5653 * 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). 5654 * If you have an actual import node, prefer using getModeForUsageLocation on the reference string node. 5655 * @param file File to fetch the resolution mode within 5656 * @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 5657 */ 5658 export function getModeForResolutionAtIndex(file: SourceFile, index: number): ModuleKind.CommonJS | ModuleKind.ESNext | undefined; 5659 /** 5660 * Calculates the final resolution mode for a given module reference node. This is generally the explicitly provided resolution mode, if 5661 * one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm). 5662 * Notably, this function always returns `undefined` if the containing file has an `undefined` `impliedNodeFormat` - this field is only set when 5663 * `moduleResolution` is `node16`+. 5664 * @param file The file the import or import-like reference is contained within 5665 * @param usage The module reference string 5666 * @returns The final resolution mode of the import 5667 */ 5668 export function getModeForUsageLocation(file: { 5669 impliedNodeFormat?: SourceFile["impliedNodeFormat"]; 5670 }, usage: StringLiteralLike): ModuleKind.CommonJS | ModuleKind.ESNext | undefined; 5671 export function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): readonly Diagnostic[]; 5672 /** 5673 * A function for determining if a given file is esm or cjs format, assuming modern node module resolution rules, as configured by the 5674 * `options` parameter. 5675 * 5676 * @param fileName The normalized absolute path to check the format of (it need not exist on disk) 5677 * @param [packageJsonInfoCache] A cache for package file lookups - it's best to have a cache when this function is called often 5678 * @param host The ModuleResolutionHost which can perform the filesystem lookups for package json data 5679 * @param options The compiler options to perform the analysis under - relevant options are `moduleResolution` and `traceResolution` 5680 * @returns `undefined` if the path has no relevant implied format, `ModuleKind.ESNext` for esm format, and `ModuleKind.CommonJS` for cjs format 5681 */ 5682 export function getImpliedNodeFormatForFile(fileName: Path, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions): ModuleKind.ESNext | ModuleKind.CommonJS | undefined; 5683 /** 5684 * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions' 5685 * that represent a compilation unit. 5686 * 5687 * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and 5688 * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in. 5689 * 5690 * @param createProgramOptions - The options for creating a program. 5691 * @returns A 'Program' object. 5692 */ 5693 export function createProgram(createProgramOptions: CreateProgramOptions): Program; 5694 /** 5695 * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions' 5696 * that represent a compilation unit. 5697 * 5698 * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and 5699 * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in. 5700 * 5701 * @param rootNames - A set of root files. 5702 * @param options - The compiler options which should be used. 5703 * @param host - The host interacts with the underlying file system. 5704 * @param oldProgram - Reuses an old program structure. 5705 * @param configFileParsingDiagnostics - error during config file parsing 5706 * @returns A 'Program' object. 5707 */ 5708 export function createProgram(rootNames: readonly string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: readonly Diagnostic[]): Program; 5709 /** @deprecated */ export interface ResolveProjectReferencePathHost { 5710 fileExists(fileName: string): boolean; 5711 } 5712 /** 5713 * Returns the target config filename of a project reference. 5714 * Note: The file might not exist. 5715 */ 5716 export function resolveProjectReferencePath(ref: ProjectReference): ResolvedConfigFileName; 5717 /** @deprecated */ export function resolveProjectReferencePath(host: ResolveProjectReferencePathHost, ref: ProjectReference): ResolvedConfigFileName; 5718 export {}; 5719} 5720declare namespace ts { 5721 interface EmitOutput { 5722 outputFiles: OutputFile[]; 5723 emitSkipped: boolean; 5724 } 5725 interface OutputFile { 5726 name: string; 5727 writeByteOrderMark: boolean; 5728 text: string; 5729 } 5730} 5731declare namespace ts { 5732 type AffectedFileResult<T> = { 5733 result: T; 5734 affected: SourceFile | Program; 5735 } | undefined; 5736 interface BuilderProgramHost { 5737 /** 5738 * return true if file names are treated with case sensitivity 5739 */ 5740 useCaseSensitiveFileNames(): boolean; 5741 /** 5742 * If provided this would be used this hash instead of actual file shape text for detecting changes 5743 */ 5744 createHash?: (data: string) => string; 5745 /** 5746 * When emit or emitNextAffectedFile are called without writeFile, 5747 * this callback if present would be used to write files 5748 */ 5749 writeFile?: WriteFileCallback; 5750 } 5751 /** 5752 * Builder to manage the program state changes 5753 */ 5754 interface BuilderProgram { 5755 /** 5756 * Returns current program 5757 */ 5758 getProgram(): Program; 5759 /** 5760 * Get compiler options of the program 5761 */ 5762 getCompilerOptions(): CompilerOptions; 5763 /** 5764 * Get the source file in the program with file name 5765 */ 5766 getSourceFile(fileName: string): SourceFile | undefined; 5767 /** 5768 * Get a list of files in the program 5769 */ 5770 getSourceFiles(): readonly SourceFile[]; 5771 /** 5772 * Get the diagnostics for compiler options 5773 */ 5774 getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; 5775 /** 5776 * Get the diagnostics that dont belong to any file 5777 */ 5778 getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; 5779 /** 5780 * Get the diagnostics from config file parsing 5781 */ 5782 getConfigFileParsingDiagnostics(): readonly Diagnostic[]; 5783 /** 5784 * Get the syntax diagnostics, for all source files if source file is not supplied 5785 */ 5786 getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 5787 /** 5788 * Get the declaration diagnostics, for all source files if source file is not supplied 5789 */ 5790 getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[]; 5791 /** 5792 * Get all the dependencies of the file 5793 */ 5794 getAllDependencies(sourceFile: SourceFile): readonly string[]; 5795 /** 5796 * Gets the semantic diagnostics from the program corresponding to this state of file (if provided) or whole program 5797 * The semantic diagnostics are cached and managed here 5798 * Note that it is assumed that when asked about semantic diagnostics through this API, 5799 * the file has been taken out of affected files so it is safe to use cache or get from program and cache the diagnostics 5800 * In case of SemanticDiagnosticsBuilderProgram if the source file is not provided, 5801 * it will iterate through all the affected files, to ensure that cache stays valid and yet provide a way to get all semantic diagnostics 5802 */ 5803 getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 5804 /** 5805 * Emits the JavaScript and declaration files. 5806 * When targetSource file is specified, emits the files corresponding to that source file, 5807 * otherwise for the whole program. 5808 * In case of EmitAndSemanticDiagnosticsBuilderProgram, when targetSourceFile is specified, 5809 * it is assumed that that file is handled from affected file list. If targetSourceFile is not specified, 5810 * it will only emit all the affected files instead of whole program 5811 * 5812 * The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host 5813 * in that order would be used to write the files 5814 */ 5815 emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult; 5816 /** 5817 * Get the current directory of the program 5818 */ 5819 getCurrentDirectory(): string; 5820 isFileUpdateInConstEnumCache?(sourceFile: SourceFile): boolean; 5821 builderProgramForLinter?: EmitAndSemanticDiagnosticsBuilderProgram; 5822 } 5823 /** 5824 * The builder that caches the semantic diagnostics for the program and handles the changed files and affected files 5825 */ 5826 interface SemanticDiagnosticsBuilderProgram extends BuilderProgram { 5827 /** 5828 * Gets the semantic diagnostics from the program for the next affected file and caches it 5829 * Returns undefined if the iteration is complete 5830 */ 5831 getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>; 5832 } 5833 /** 5834 * The builder that can handle the changes in program and iterate through changed file to emit the files 5835 * The semantic diagnostics are cached per file and managed by clearing for the changed/affected files 5836 */ 5837 interface EmitAndSemanticDiagnosticsBuilderProgram extends SemanticDiagnosticsBuilderProgram { 5838 /** 5839 * Emits the next affected file's emit result (EmitResult and sourceFiles emitted) or returns undefined if iteration is complete 5840 * The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host 5841 * in that order would be used to write the files 5842 */ 5843 emitNextAffectedFile(writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): AffectedFileResult<EmitResult>; 5844 } 5845 /** 5846 * Create the builder to manage semantic diagnostics and cache them 5847 */ 5848 function createSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram?: SemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): SemanticDiagnosticsBuilderProgram; 5849 function createSemanticDiagnosticsBuilderProgram(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: SemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): SemanticDiagnosticsBuilderProgram; 5850 /** 5851 * Create the builder that can handle the changes in program and iterate through changed files 5852 * to emit the those files and manage semantic diagnostics cache as well 5853 */ 5854 function createEmitAndSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): EmitAndSemanticDiagnosticsBuilderProgram; 5855 function createEmitAndSemanticDiagnosticsBuilderProgram(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): EmitAndSemanticDiagnosticsBuilderProgram; 5856 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; 5857 /** 5858 * Creates a builder thats just abstraction over program and can be used with watch 5859 */ 5860 function createAbstractBuilder(newProgram: Program, host: BuilderProgramHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): BuilderProgram; 5861 function createAbstractBuilder(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): BuilderProgram; 5862} 5863declare namespace ts { 5864 interface ReadBuildProgramHost { 5865 useCaseSensitiveFileNames(): boolean; 5866 getCurrentDirectory(): string; 5867 readFile(fileName: string): string | undefined; 5868 getLastCompiledProgram?(): Program; 5869 } 5870 function readBuilderProgram(compilerOptions: CompilerOptions, host: ReadBuildProgramHost, isForLinter?: boolean): EmitAndSemanticDiagnosticsBuilderProgram | undefined; 5871 function createIncrementalCompilerHost(options: CompilerOptions, system?: System): CompilerHost; 5872 interface IncrementalProgramOptions<T extends BuilderProgram> { 5873 rootNames: readonly string[]; 5874 options: CompilerOptions; 5875 configFileParsingDiagnostics?: readonly Diagnostic[]; 5876 projectReferences?: readonly ProjectReference[]; 5877 host?: CompilerHost; 5878 createProgram?: CreateProgram<T>; 5879 } 5880 function createIncrementalProgram<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>({ rootNames, options, configFileParsingDiagnostics, projectReferences, host, createProgram }: IncrementalProgramOptions<T>): T; 5881 function createIncrementalProgramForArkTs({ rootNames, options, configFileParsingDiagnostics, projectReferences, host }: IncrementalProgramOptions<EmitAndSemanticDiagnosticsBuilderProgram>): EmitAndSemanticDiagnosticsBuilderProgram; 5882 type WatchStatusReporter = (diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number) => void; 5883 /** Create the program with rootNames and options, if they are undefined, oldProgram and new configFile diagnostics create new program */ 5884 type CreateProgram<T extends BuilderProgram> = (rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: T, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[] | undefined) => T; 5885 /** Host that has watch functionality used in --watch mode */ 5886 interface WatchHost { 5887 /** If provided, called with Diagnostic message that informs about change in watch status */ 5888 onWatchStatusChange?(diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number): void; 5889 /** Used to watch changes in source files, missing files needed to update the program or config file */ 5890 watchFile(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher; 5891 /** Used to watch resolved module's failed lookup locations, config file specs, type roots where auto type reference directives are added */ 5892 watchDirectory(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher; 5893 /** If provided, will be used to set delayed compilation, so that multiple changes in short span are compiled together */ 5894 setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any; 5895 /** If provided, will be used to reset existing delayed compilation */ 5896 clearTimeout?(timeoutId: any): void; 5897 } 5898 interface ProgramHost<T extends BuilderProgram> { 5899 /** 5900 * Used to create the program when need for program creation or recreation detected 5901 */ 5902 createProgram: CreateProgram<T>; 5903 useCaseSensitiveFileNames(): boolean; 5904 getNewLine(): string; 5905 getCurrentDirectory(): string; 5906 getDefaultLibFileName(options: CompilerOptions): string; 5907 getDefaultLibLocation?(): string; 5908 createHash?(data: string): string; 5909 /** 5910 * Use to check file presence for source files and 5911 * if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well 5912 */ 5913 fileExists(path: string): boolean; 5914 /** 5915 * Use to read file text for source files and 5916 * if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well 5917 */ 5918 readFile(path: string, encoding?: string): string | undefined; 5919 /** If provided, used for module resolution as well as to handle directory structure */ 5920 directoryExists?(path: string): boolean; 5921 /** If provided, used in resolutions as well as handling directory structure */ 5922 getDirectories?(path: string): string[]; 5923 /** If provided, used to cache and handle directory structure modifications */ 5924 readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; 5925 /** Symbol links resolution */ 5926 realpath?(path: string): string; 5927 /** If provided would be used to write log about compilation */ 5928 trace?(s: string): void; 5929 /** If provided is used to get the environment variable */ 5930 getEnvironmentVariable?(name: string): string | undefined; 5931 /** If provided, used to resolve the module names, otherwise typescript's default module resolution */ 5932 resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[]; 5933 /** If provided, used to resolve type reference directives, otherwise typescript's default resolution */ 5934 resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[]; 5935 /** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */ 5936 hasInvalidatedResolutions?(filePath: Path): boolean; 5937 /** 5938 * 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 5939 */ 5940 getModuleResolutionCache?(): ModuleResolutionCache | undefined; 5941 } 5942 interface WatchCompilerHost<T extends BuilderProgram> extends ProgramHost<T>, WatchHost { 5943 /** Instead of using output d.ts file from project reference, use its source file */ 5944 useSourceOfProjectReferenceRedirect?(): boolean; 5945 /** If provided, use this method to get parsed command lines for referenced projects */ 5946 getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; 5947 /** If provided, callback to invoke after every new program creation */ 5948 afterProgramCreate?(program: T): void; 5949 } 5950 /** 5951 * Host to create watch with root files and options 5952 */ 5953 interface WatchCompilerHostOfFilesAndCompilerOptions<T extends BuilderProgram> extends WatchCompilerHost<T> { 5954 /** root files to use to generate program */ 5955 rootFiles: string[]; 5956 /** Compiler options */ 5957 options: CompilerOptions; 5958 watchOptions?: WatchOptions; 5959 /** Project References */ 5960 projectReferences?: readonly ProjectReference[]; 5961 } 5962 /** 5963 * Host to create watch with config file 5964 */ 5965 interface WatchCompilerHostOfConfigFile<T extends BuilderProgram> extends WatchCompilerHost<T>, ConfigFileDiagnosticsReporter { 5966 /** Name of the config file to compile */ 5967 configFileName: string; 5968 /** Options to extend */ 5969 optionsToExtend?: CompilerOptions; 5970 watchOptionsToExtend?: WatchOptions; 5971 extraFileExtensions?: readonly FileExtensionInfo[]; 5972 /** 5973 * Used to generate source file names from the config file and its include, exclude, files rules 5974 * and also to cache the directory stucture 5975 */ 5976 readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; 5977 } 5978 interface Watch<T> { 5979 /** Synchronize with host and get updated program */ 5980 getProgram(): T; 5981 /** Closes the watch */ 5982 close(): void; 5983 } 5984 /** 5985 * Creates the watch what generates program using the config file 5986 */ 5987 interface WatchOfConfigFile<T> extends Watch<T> { 5988 } 5989 /** 5990 * Creates the watch that generates program using the root files and compiler options 5991 */ 5992 interface WatchOfFilesAndCompilerOptions<T> extends Watch<T> { 5993 /** Updates the root files in the program, only if this is not config file compilation */ 5994 updateRootFileNames(fileNames: string[]): void; 5995 } 5996 /** 5997 * Create the watch compiler host for either configFile or fileNames and its options 5998 */ 5999 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>; 6000 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>; 6001 /** 6002 * Creates the watch from the host for root files and compiler options 6003 */ 6004 function createWatchProgram<T extends BuilderProgram>(host: WatchCompilerHostOfFilesAndCompilerOptions<T>): WatchOfFilesAndCompilerOptions<T>; 6005 /** 6006 * Creates the watch from the host for config file 6007 */ 6008 function createWatchProgram<T extends BuilderProgram>(host: WatchCompilerHostOfConfigFile<T>): WatchOfConfigFile<T>; 6009} 6010declare namespace ts { 6011 interface BuildOptions { 6012 dry?: boolean; 6013 force?: boolean; 6014 verbose?: boolean; 6015 incremental?: boolean; 6016 assumeChangesOnlyAffectDirectDependencies?: boolean; 6017 traceResolution?: boolean; 6018 [option: string]: CompilerOptionsValue | undefined; 6019 } 6020 type ReportEmitErrorSummary = (errorCount: number, filesInError: (ReportFileInError | undefined)[]) => void; 6021 interface ReportFileInError { 6022 fileName: string; 6023 line: number; 6024 } 6025 interface SolutionBuilderHostBase<T extends BuilderProgram> extends ProgramHost<T> { 6026 createDirectory?(path: string): void; 6027 /** 6028 * Should provide create directory and writeFile if done of invalidatedProjects is not invoked with 6029 * writeFileCallback 6030 */ 6031 writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void; 6032 getCustomTransformers?: (project: string) => CustomTransformers | undefined; 6033 getModifiedTime(fileName: string): Date | undefined; 6034 setModifiedTime(fileName: string, date: Date): void; 6035 deleteFile(fileName: string): void; 6036 getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; 6037 reportDiagnostic: DiagnosticReporter; 6038 reportSolutionBuilderStatus: DiagnosticReporter; 6039 afterProgramEmitAndDiagnostics?(program: T): void; 6040 } 6041 interface SolutionBuilderHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T> { 6042 reportErrorSummary?: ReportEmitErrorSummary; 6043 } 6044 interface SolutionBuilderWithWatchHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T>, WatchHost { 6045 } 6046 interface SolutionBuilder<T extends BuilderProgram> { 6047 build(project?: string, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, getCustomTransformers?: (project: string) => CustomTransformers): ExitStatus; 6048 clean(project?: string): ExitStatus; 6049 buildReferences(project: string, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, getCustomTransformers?: (project: string) => CustomTransformers): ExitStatus; 6050 cleanReferences(project?: string): ExitStatus; 6051 getNextInvalidatedProject(cancellationToken?: CancellationToken): InvalidatedProject<T> | undefined; 6052 } 6053 /** 6054 * Create a function that reports watch status by writing to the system and handles the formating of the diagnostic 6055 */ 6056 function createBuilderStatusReporter(system: System, pretty?: boolean): DiagnosticReporter; 6057 function createSolutionBuilderHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportErrorSummary?: ReportEmitErrorSummary): SolutionBuilderHost<T>; 6058 function createSolutionBuilderWithWatchHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter): SolutionBuilderWithWatchHost<T>; 6059 function createSolutionBuilder<T extends BuilderProgram>(host: SolutionBuilderHost<T>, rootNames: readonly string[], defaultOptions: BuildOptions): SolutionBuilder<T>; 6060 function createSolutionBuilderWithWatch<T extends BuilderProgram>(host: SolutionBuilderWithWatchHost<T>, rootNames: readonly string[], defaultOptions: BuildOptions, baseWatchOptions?: WatchOptions): SolutionBuilder<T>; 6061 enum InvalidatedProjectKind { 6062 Build = 0, 6063 UpdateBundle = 1, 6064 UpdateOutputFileStamps = 2 6065 } 6066 interface InvalidatedProjectBase { 6067 readonly kind: InvalidatedProjectKind; 6068 readonly project: ResolvedConfigFileName; 6069 /** 6070 * To dispose this project and ensure that all the necessary actions are taken and state is updated accordingly 6071 */ 6072 done(cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): ExitStatus; 6073 getCompilerOptions(): CompilerOptions; 6074 getCurrentDirectory(): string; 6075 } 6076 interface UpdateOutputFileStampsProject extends InvalidatedProjectBase { 6077 readonly kind: InvalidatedProjectKind.UpdateOutputFileStamps; 6078 updateOutputFileStatmps(): void; 6079 } 6080 interface BuildInvalidedProject<T extends BuilderProgram> extends InvalidatedProjectBase { 6081 readonly kind: InvalidatedProjectKind.Build; 6082 getBuilderProgram(): T | undefined; 6083 getProgram(): Program | undefined; 6084 getSourceFile(fileName: string): SourceFile | undefined; 6085 getSourceFiles(): readonly SourceFile[]; 6086 getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; 6087 getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; 6088 getConfigFileParsingDiagnostics(): readonly Diagnostic[]; 6089 getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 6090 getAllDependencies(sourceFile: SourceFile): readonly string[]; 6091 getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 6092 getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>; 6093 emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult | undefined; 6094 } 6095 interface UpdateBundleProject<T extends BuilderProgram> extends InvalidatedProjectBase { 6096 readonly kind: InvalidatedProjectKind.UpdateBundle; 6097 emit(writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): EmitResult | BuildInvalidedProject<T> | undefined; 6098 } 6099 type InvalidatedProject<T extends BuilderProgram> = UpdateOutputFileStampsProject | BuildInvalidedProject<T> | UpdateBundleProject<T>; 6100} 6101declare namespace ts.server { 6102 type ActionSet = "action::set"; 6103 type ActionInvalidate = "action::invalidate"; 6104 type ActionPackageInstalled = "action::packageInstalled"; 6105 type EventTypesRegistry = "event::typesRegistry"; 6106 type EventBeginInstallTypes = "event::beginInstallTypes"; 6107 type EventEndInstallTypes = "event::endInstallTypes"; 6108 type EventInitializationFailed = "event::initializationFailed"; 6109} 6110declare namespace ts.server { 6111 interface TypingInstallerResponse { 6112 readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed; 6113 } 6114 interface TypingInstallerRequestWithProjectName { 6115 readonly projectName: string; 6116 } 6117 interface DiscoverTypings extends TypingInstallerRequestWithProjectName { 6118 readonly fileNames: string[]; 6119 readonly projectRootPath: Path; 6120 readonly compilerOptions: CompilerOptions; 6121 readonly watchOptions?: WatchOptions; 6122 readonly typeAcquisition: TypeAcquisition; 6123 readonly unresolvedImports: SortedReadonlyArray<string>; 6124 readonly cachePath?: string; 6125 readonly kind: "discover"; 6126 } 6127 interface CloseProject extends TypingInstallerRequestWithProjectName { 6128 readonly kind: "closeProject"; 6129 } 6130 interface TypesRegistryRequest { 6131 readonly kind: "typesRegistry"; 6132 } 6133 interface InstallPackageRequest extends TypingInstallerRequestWithProjectName { 6134 readonly kind: "installPackage"; 6135 readonly fileName: Path; 6136 readonly packageName: string; 6137 readonly projectRootPath: Path; 6138 } 6139 interface PackageInstalledResponse extends ProjectResponse { 6140 readonly kind: ActionPackageInstalled; 6141 readonly success: boolean; 6142 readonly message: string; 6143 } 6144 interface InitializationFailedResponse extends TypingInstallerResponse { 6145 readonly kind: EventInitializationFailed; 6146 readonly message: string; 6147 readonly stack?: string; 6148 } 6149 interface ProjectResponse extends TypingInstallerResponse { 6150 readonly projectName: string; 6151 } 6152 interface InvalidateCachedTypings extends ProjectResponse { 6153 readonly kind: ActionInvalidate; 6154 } 6155 interface InstallTypes extends ProjectResponse { 6156 readonly kind: EventBeginInstallTypes | EventEndInstallTypes; 6157 readonly eventId: number; 6158 readonly typingsInstallerVersion: string; 6159 readonly packagesToInstall: readonly string[]; 6160 } 6161 interface BeginInstallTypes extends InstallTypes { 6162 readonly kind: EventBeginInstallTypes; 6163 } 6164 interface EndInstallTypes extends InstallTypes { 6165 readonly kind: EventEndInstallTypes; 6166 readonly installSuccess: boolean; 6167 } 6168 interface SetTypings extends ProjectResponse { 6169 readonly typeAcquisition: TypeAcquisition; 6170 readonly compilerOptions: CompilerOptions; 6171 readonly typings: string[]; 6172 readonly unresolvedImports: SortedReadonlyArray<string>; 6173 readonly kind: ActionSet; 6174 } 6175} 6176declare namespace ts { 6177 interface Node { 6178 getSourceFile(): SourceFile; 6179 getChildCount(sourceFile?: SourceFile): number; 6180 getChildAt(index: number, sourceFile?: SourceFile): Node; 6181 getChildren(sourceFile?: SourceFile): Node[]; 6182 getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number; 6183 getFullStart(): number; 6184 getEnd(): number; 6185 getWidth(sourceFile?: SourceFileLike): number; 6186 getFullWidth(): number; 6187 getLeadingTriviaWidth(sourceFile?: SourceFile): number; 6188 getFullText(sourceFile?: SourceFile): string; 6189 getText(sourceFile?: SourceFile): string; 6190 getFirstToken(sourceFile?: SourceFile): Node | undefined; 6191 getLastToken(sourceFile?: SourceFile): Node | undefined; 6192 forEachChild<T>(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined; 6193 } 6194 interface Identifier { 6195 readonly text: string; 6196 } 6197 interface PrivateIdentifier { 6198 readonly text: string; 6199 } 6200 interface Symbol { 6201 readonly name: string; 6202 getFlags(): SymbolFlags; 6203 getEscapedName(): __String; 6204 getName(): string; 6205 getDeclarations(): Declaration[] | undefined; 6206 getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[]; 6207 getJsDocTags(checker?: TypeChecker): JSDocTagInfo[]; 6208 } 6209 interface Type { 6210 getFlags(): TypeFlags; 6211 getSymbol(): Symbol | undefined; 6212 getProperties(): Symbol[]; 6213 getProperty(propertyName: string): Symbol | undefined; 6214 getApparentProperties(): Symbol[]; 6215 getCallSignatures(): readonly Signature[]; 6216 getConstructSignatures(): readonly Signature[]; 6217 getStringIndexType(): Type | undefined; 6218 getNumberIndexType(): Type | undefined; 6219 getBaseTypes(): BaseType[] | undefined; 6220 getNonNullableType(): Type; 6221 getConstraint(): Type | undefined; 6222 getDefault(): Type | undefined; 6223 isUnion(): this is UnionType; 6224 isIntersection(): this is IntersectionType; 6225 isUnionOrIntersection(): this is UnionOrIntersectionType; 6226 isLiteral(): this is LiteralType; 6227 isStringLiteral(): this is StringLiteralType; 6228 isNumberLiteral(): this is NumberLiteralType; 6229 isTypeParameter(): this is TypeParameter; 6230 isClassOrInterface(): this is InterfaceType; 6231 isClass(): this is InterfaceType; 6232 isIndexType(): this is IndexType; 6233 } 6234 interface TypeReference { 6235 typeArguments?: readonly Type[]; 6236 } 6237 interface Signature { 6238 getDeclaration(): SignatureDeclaration; 6239 getTypeParameters(): TypeParameter[] | undefined; 6240 getParameters(): Symbol[]; 6241 getTypeParameterAtPosition(pos: number): Type; 6242 getReturnType(): Type; 6243 getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[]; 6244 getJsDocTags(): JSDocTagInfo[]; 6245 } 6246 interface SourceFile { 6247 getLineAndCharacterOfPosition(pos: number): LineAndCharacter; 6248 getLineEndOfPosition(pos: number): number; 6249 getLineStarts(): readonly number[]; 6250 getPositionOfLineAndCharacter(line: number, character: number): number; 6251 update(newText: string, textChangeRange: TextChangeRange): SourceFile; 6252 } 6253 interface SourceFileLike { 6254 getLineAndCharacterOfPosition(pos: number): LineAndCharacter; 6255 } 6256 interface SourceMapSource { 6257 getLineAndCharacterOfPosition(pos: number): LineAndCharacter; 6258 } 6259 /** 6260 * Represents an immutable snapshot of a script at a specified time.Once acquired, the 6261 * snapshot is observably immutable. i.e. the same calls with the same parameters will return 6262 * the same values. 6263 */ 6264 interface IScriptSnapshot { 6265 /** Gets a portion of the script snapshot specified by [start, end). */ 6266 getText(start: number, end: number): string; 6267 /** Gets the length of this script snapshot. */ 6268 getLength(): number; 6269 /** 6270 * Gets the TextChangeRange that describe how the text changed between this text and 6271 * an older version. This information is used by the incremental parser to determine 6272 * what sections of the script need to be re-parsed. 'undefined' can be returned if the 6273 * change range cannot be determined. However, in that case, incremental parsing will 6274 * not happen and the entire document will be re - parsed. 6275 */ 6276 getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange | undefined; 6277 /** Releases all resources held by this script snapshot */ 6278 dispose?(): void; 6279 } 6280 namespace ScriptSnapshot { 6281 function fromString(text: string): IScriptSnapshot; 6282 } 6283 interface PreProcessedFileInfo { 6284 referencedFiles: FileReference[]; 6285 typeReferenceDirectives: FileReference[]; 6286 libReferenceDirectives: FileReference[]; 6287 importedFiles: FileReference[]; 6288 ambientExternalModules?: string[]; 6289 isLibFile: boolean; 6290 } 6291 interface HostCancellationToken { 6292 isCancellationRequested(): boolean; 6293 } 6294 interface InstallPackageOptions { 6295 fileName: Path; 6296 packageName: string; 6297 } 6298 interface PerformanceEvent { 6299 kind: "UpdateGraph" | "CreatePackageJsonAutoImportProvider"; 6300 durationMs: number; 6301 } 6302 enum LanguageServiceMode { 6303 Semantic = 0, 6304 PartialSemantic = 1, 6305 Syntactic = 2 6306 } 6307 interface IncompleteCompletionsCache { 6308 get(): CompletionInfo | undefined; 6309 set(response: CompletionInfo): void; 6310 clear(): void; 6311 } 6312 interface LanguageServiceHost extends GetEffectiveTypeRootsHost, MinimalResolutionCacheHost { 6313 getCompilationSettings(): CompilerOptions; 6314 getNewLine?(): string; 6315 getProjectVersion?(): string; 6316 getScriptFileNames(): string[]; 6317 getScriptKind?(fileName: string): ScriptKind; 6318 getScriptVersion(fileName: string): string; 6319 getScriptSnapshot(fileName: string): IScriptSnapshot | undefined; 6320 getProjectReferences?(): readonly ProjectReference[] | undefined; 6321 getLocalizedDiagnosticMessages?(): any; 6322 getCancellationToken?(): HostCancellationToken; 6323 getCurrentDirectory(): string; 6324 getDefaultLibFileName(options: CompilerOptions): string; 6325 log?(s: string): void; 6326 trace?(s: string): void; 6327 error?(s: string): void; 6328 useCaseSensitiveFileNames?(): boolean; 6329 readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; 6330 realpath?(path: string): string; 6331 readFile(path: string, encoding?: string): string | undefined; 6332 fileExists(path: string): boolean; 6333 getTypeRootsVersion?(): number; 6334 resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[]; 6335 getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations | undefined; 6336 resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[]; 6337 getDirectories?(directoryName: string): string[]; 6338 /** 6339 * Gets a set of custom transformers to use during emit. 6340 */ 6341 getCustomTransformers?(): CustomTransformers | undefined; 6342 isKnownTypesPackageName?(name: string): boolean; 6343 installPackage?(options: InstallPackageOptions): Promise<ApplyCodeActionCommandResult>; 6344 writeFile?(fileName: string, content: string): void; 6345 getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; 6346 getJsDocNodeCheckedConfig?(jsDocFileCheckInfo: FileCheckModuleInfo, symbolSourceFilePath: string): JsDocNodeCheckConfig; 6347 getJsDocNodeConditionCheckedResult?(jsDocFileCheckedInfo: FileCheckModuleInfo, jsDocs: JsDocTagInfo[]): ConditionCheckResult; 6348 getFileCheckedModuleInfo?(containFilePath: string): FileCheckModuleInfo; 6349 shouldCompletionSortCustom?: boolean; 6350 uiProps?: string[]; 6351 clearProps?(): void; 6352 } 6353 type WithMetadata<T> = T & { 6354 metadata?: unknown; 6355 }; 6356 enum SemanticClassificationFormat { 6357 Original = "original", 6358 TwentyTwenty = "2020" 6359 } 6360 interface LanguageService { 6361 /** This is used as a part of restarting the language service. */ 6362 cleanupSemanticCache(): void; 6363 /** 6364 * Gets errors indicating invalid syntax in a file. 6365 * 6366 * In English, "this cdeo have, erorrs" is syntactically invalid because it has typos, 6367 * grammatical errors, and misplaced punctuation. Likewise, examples of syntax 6368 * errors in TypeScript are missing parentheses in an `if` statement, mismatched 6369 * curly braces, and using a reserved keyword as a variable name. 6370 * 6371 * These diagnostics are inexpensive to compute and don't require knowledge of 6372 * other files. Note that a non-empty result increases the likelihood of false positives 6373 * from `getSemanticDiagnostics`. 6374 * 6375 * While these represent the majority of syntax-related diagnostics, there are some 6376 * that require the type system, which will be present in `getSemanticDiagnostics`. 6377 * 6378 * @param fileName A path to the file you want syntactic diagnostics for 6379 */ 6380 getSyntacticDiagnostics(fileName: string): DiagnosticWithLocation[]; 6381 /** 6382 * Gets warnings or errors indicating type system issues in a given file. 6383 * Requesting semantic diagnostics may start up the type system and 6384 * run deferred work, so the first call may take longer than subsequent calls. 6385 * 6386 * Unlike the other get*Diagnostics functions, these diagnostics can potentially not 6387 * include a reference to a source file. Specifically, the first time this is called, 6388 * it will return global diagnostics with no associated location. 6389 * 6390 * To contrast the differences between semantic and syntactic diagnostics, consider the 6391 * sentence: "The sun is green." is syntactically correct; those are real English words with 6392 * correct sentence structure. However, it is semantically invalid, because it is not true. 6393 * 6394 * @param fileName A path to the file you want semantic diagnostics for 6395 */ 6396 getSemanticDiagnostics(fileName: string): Diagnostic[]; 6397 /** 6398 * Gets suggestion diagnostics for a specific file. These diagnostics tend to 6399 * proactively suggest refactors, as opposed to diagnostics that indicate 6400 * potentially incorrect runtime behavior. 6401 * 6402 * @param fileName A path to the file you want semantic diagnostics for 6403 */ 6404 getSuggestionDiagnostics(fileName: string): DiagnosticWithLocation[]; 6405 /** 6406 * Gets global diagnostics related to the program configuration and compiler options. 6407 */ 6408 getCompilerOptionsDiagnostics(): Diagnostic[]; 6409 /** @deprecated Use getEncodedSyntacticClassifications instead. */ 6410 getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; 6411 getSyntacticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; 6412 /** @deprecated Use getEncodedSemanticClassifications instead. */ 6413 getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; 6414 getSemanticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; 6415 /** Encoded as triples of [start, length, ClassificationType]. */ 6416 getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications; 6417 /** 6418 * Gets semantic highlights information for a particular file. Has two formats, an older 6419 * version used by VS and a format used by VS Code. 6420 * 6421 * @param fileName The path to the file 6422 * @param position A text span to return results within 6423 * @param format Which format to use, defaults to "original" 6424 * @returns a number array encoded as triples of [start, length, ClassificationType, ...]. 6425 */ 6426 getEncodedSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): Classifications; 6427 /** 6428 * Gets completion entries at a particular position in a file. 6429 * 6430 * @param fileName The path to the file 6431 * @param position A zero-based index of the character where you want the entries 6432 * @param options An object describing how the request was triggered and what kinds 6433 * of code actions can be returned with the completions. 6434 * @param formattingSettings settings needed for calling formatting functions. 6435 */ 6436 getCompletionsAtPosition(fileName: string, position: number, options: GetCompletionsAtPositionOptions | undefined, formattingSettings?: FormatCodeSettings): WithMetadata<CompletionInfo> | undefined; 6437 /** 6438 * Gets the extended details for a completion entry retrieved from `getCompletionsAtPosition`. 6439 * 6440 * @param fileName The path to the file 6441 * @param position A zero based index of the character where you want the entries 6442 * @param entryName The `name` from an existing completion which came from `getCompletionsAtPosition` 6443 * @param formatOptions How should code samples in the completions be formatted, can be undefined for backwards compatibility 6444 * @param source `source` property from the completion entry 6445 * @param preferences User settings, can be undefined for backwards compatibility 6446 * @param data `data` property from the completion entry 6447 */ 6448 getCompletionEntryDetails(fileName: string, position: number, entryName: string, formatOptions: FormatCodeOptions | FormatCodeSettings | undefined, source: string | undefined, preferences: UserPreferences | undefined, data: CompletionEntryData | undefined): CompletionEntryDetails | undefined; 6449 getCompletionEntrySymbol(fileName: string, position: number, name: string, source: string | undefined): Symbol | undefined; 6450 /** 6451 * Gets semantic information about the identifier at a particular position in a 6452 * file. Quick info is what you typically see when you hover in an editor. 6453 * 6454 * @param fileName The path to the file 6455 * @param position A zero-based index of the character where you want the quick info 6456 */ 6457 getQuickInfoAtPosition(fileName: string, position: number): QuickInfo | undefined; 6458 getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan | undefined; 6459 getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan | undefined; 6460 getSignatureHelpItems(fileName: string, position: number, options: SignatureHelpItemsOptions | undefined): SignatureHelpItems | undefined; 6461 getRenameInfo(fileName: string, position: number, preferences: UserPreferences): RenameInfo; 6462 /** @deprecated Use the signature with `UserPreferences` instead. */ 6463 getRenameInfo(fileName: string, position: number, options?: RenameInfoOptions): RenameInfo; 6464 findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename?: boolean): readonly RenameLocation[] | undefined; 6465 getSmartSelectionRange(fileName: string, position: number): SelectionRange; 6466 getDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined; 6467 getDefinitionAndBoundSpan(fileName: string, position: number): DefinitionInfoAndBoundSpan | undefined; 6468 getTypeDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined; 6469 getImplementationAtPosition(fileName: string, position: number): readonly ImplementationLocation[] | undefined; 6470 getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[] | undefined; 6471 findReferences(fileName: string, position: number): ReferencedSymbol[] | undefined; 6472 getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[] | undefined; 6473 getFileReferences(fileName: string): ReferenceEntry[]; 6474 /** @deprecated */ 6475 getOccurrencesAtPosition(fileName: string, position: number): readonly ReferenceEntry[] | undefined; 6476 getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[]; 6477 getNavigationBarItems(fileName: string): NavigationBarItem[]; 6478 getNavigationTree(fileName: string): NavigationTree; 6479 prepareCallHierarchy(fileName: string, position: number): CallHierarchyItem | CallHierarchyItem[] | undefined; 6480 provideCallHierarchyIncomingCalls(fileName: string, position: number): CallHierarchyIncomingCall[]; 6481 provideCallHierarchyOutgoingCalls(fileName: string, position: number): CallHierarchyOutgoingCall[]; 6482 provideInlayHints(fileName: string, span: TextSpan, preferences: UserPreferences | undefined): InlayHint[]; 6483 getOutliningSpans(fileName: string): OutliningSpan[]; 6484 getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; 6485 getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; 6486 getIndentationAtPosition(fileName: string, position: number, options: EditorOptions | EditorSettings): number; 6487 getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions | FormatCodeSettings): TextChange[]; 6488 getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[]; 6489 getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[]; 6490 getDocCommentTemplateAtPosition(fileName: string, position: number, options?: DocCommentTemplateOptions): TextInsertion | undefined; 6491 isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean; 6492 /** 6493 * 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. 6494 * Editors should call this after `>` is typed. 6495 */ 6496 getJsxClosingTagAtPosition(fileName: string, position: number): JsxClosingTagInfo | undefined; 6497 getSpanOfEnclosingComment(fileName: string, position: number, onlyMultiLine: boolean): TextSpan | undefined; 6498 toLineColumnOffset?(fileName: string, position: number): LineAndCharacter; 6499 getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences): readonly CodeFixAction[]; 6500 getCombinedCodeFix(scope: CombinedCodeFixScope, fixId: {}, formatOptions: FormatCodeSettings, preferences: UserPreferences): CombinedCodeActions; 6501 applyCodeActionCommand(action: CodeActionCommand, formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult>; 6502 applyCodeActionCommand(action: CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult[]>; 6503 applyCodeActionCommand(action: CodeActionCommand | CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>; 6504 /** @deprecated `fileName` will be ignored */ 6505 applyCodeActionCommand(fileName: string, action: CodeActionCommand): Promise<ApplyCodeActionCommandResult>; 6506 /** @deprecated `fileName` will be ignored */ 6507 applyCodeActionCommand(fileName: string, action: CodeActionCommand[]): Promise<ApplyCodeActionCommandResult[]>; 6508 /** @deprecated `fileName` will be ignored */ 6509 applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>; 6510 getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string): ApplicableRefactorInfo[]; 6511 getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined; 6512 organizeImports(args: OrganizeImportsArgs, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; 6513 getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; 6514 getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean, forceDtsEmit?: boolean): EmitOutput; 6515 getProgram(): Program | undefined; 6516 getBuilderProgram(): BuilderProgram | undefined; 6517 toggleLineComment(fileName: string, textRange: TextRange): TextChange[]; 6518 toggleMultilineComment(fileName: string, textRange: TextRange): TextChange[]; 6519 commentSelection(fileName: string, textRange: TextRange): TextChange[]; 6520 uncommentSelection(fileName: string, textRange: TextRange): TextChange[]; 6521 dispose(): void; 6522 updateRootFiles?(rootFiles: string[]): void; 6523 getProps?(): string[]; 6524 } 6525 interface JsxClosingTagInfo { 6526 readonly newText: string; 6527 } 6528 interface CombinedCodeFixScope { 6529 type: "file"; 6530 fileName: string; 6531 } 6532 enum OrganizeImportsMode { 6533 All = "All", 6534 SortAndCombine = "SortAndCombine", 6535 RemoveUnused = "RemoveUnused" 6536 } 6537 interface OrganizeImportsArgs extends CombinedCodeFixScope { 6538 /** @deprecated Use `mode` instead */ 6539 skipDestructiveCodeActions?: boolean; 6540 mode?: OrganizeImportsMode; 6541 } 6542 type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " "; 6543 enum CompletionTriggerKind { 6544 /** Completion was triggered by typing an identifier, manual invocation (e.g Ctrl+Space) or via API. */ 6545 Invoked = 1, 6546 /** Completion was triggered by a trigger character. */ 6547 TriggerCharacter = 2, 6548 /** Completion was re-triggered as the current completion list is incomplete. */ 6549 TriggerForIncompleteCompletions = 3 6550 } 6551 interface GetCompletionsAtPositionOptions extends UserPreferences { 6552 /** 6553 * If the editor is asking for completions because a certain character was typed 6554 * (as opposed to when the user explicitly requested them) this should be set. 6555 */ 6556 triggerCharacter?: CompletionsTriggerCharacter; 6557 triggerKind?: CompletionTriggerKind; 6558 /** @deprecated Use includeCompletionsForModuleExports */ 6559 includeExternalModuleExports?: boolean; 6560 /** @deprecated Use includeCompletionsWithInsertText */ 6561 includeInsertTextCompletions?: boolean; 6562 } 6563 type SignatureHelpTriggerCharacter = "," | "(" | "<"; 6564 type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")"; 6565 interface SignatureHelpItemsOptions { 6566 triggerReason?: SignatureHelpTriggerReason; 6567 } 6568 type SignatureHelpTriggerReason = SignatureHelpInvokedReason | SignatureHelpCharacterTypedReason | SignatureHelpRetriggeredReason; 6569 /** 6570 * Signals that the user manually requested signature help. 6571 * The language service will unconditionally attempt to provide a result. 6572 */ 6573 interface SignatureHelpInvokedReason { 6574 kind: "invoked"; 6575 triggerCharacter?: undefined; 6576 } 6577 /** 6578 * Signals that the signature help request came from a user typing a character. 6579 * Depending on the character and the syntactic context, the request may or may not be served a result. 6580 */ 6581 interface SignatureHelpCharacterTypedReason { 6582 kind: "characterTyped"; 6583 /** 6584 * Character that was responsible for triggering signature help. 6585 */ 6586 triggerCharacter: SignatureHelpTriggerCharacter; 6587 } 6588 /** 6589 * Signals that this signature help request came from typing a character or moving the cursor. 6590 * This should only occur if a signature help session was already active and the editor needs to see if it should adjust. 6591 * The language service will unconditionally attempt to provide a result. 6592 * `triggerCharacter` can be `undefined` for a retrigger caused by a cursor move. 6593 */ 6594 interface SignatureHelpRetriggeredReason { 6595 kind: "retrigger"; 6596 /** 6597 * Character that was responsible for triggering signature help. 6598 */ 6599 triggerCharacter?: SignatureHelpRetriggerCharacter; 6600 } 6601 interface ApplyCodeActionCommandResult { 6602 successMessage: string; 6603 } 6604 interface Classifications { 6605 spans: number[]; 6606 endOfLineState: EndOfLineState; 6607 } 6608 interface ClassifiedSpan { 6609 textSpan: TextSpan; 6610 classificationType: ClassificationTypeNames; 6611 } 6612 interface ClassifiedSpan2020 { 6613 textSpan: TextSpan; 6614 classificationType: number; 6615 } 6616 /** 6617 * Navigation bar interface designed for visual studio's dual-column layout. 6618 * This does not form a proper tree. 6619 * The navbar is returned as a list of top-level items, each of which has a list of child items. 6620 * Child items always have an empty array for their `childItems`. 6621 */ 6622 interface NavigationBarItem { 6623 text: string; 6624 kind: ScriptElementKind; 6625 kindModifiers: string; 6626 spans: TextSpan[]; 6627 childItems: NavigationBarItem[]; 6628 indent: number; 6629 bolded: boolean; 6630 grayed: boolean; 6631 } 6632 /** 6633 * Node in a tree of nested declarations in a file. 6634 * The top node is always a script or module node. 6635 */ 6636 interface NavigationTree { 6637 /** Name of the declaration, or a short description, e.g. "<class>". */ 6638 text: string; 6639 kind: ScriptElementKind; 6640 /** ScriptElementKindModifier separated by commas, e.g. "public,abstract" */ 6641 kindModifiers: string; 6642 /** 6643 * Spans of the nodes that generated this declaration. 6644 * There will be more than one if this is the result of merging. 6645 */ 6646 spans: TextSpan[]; 6647 nameSpan: TextSpan | undefined; 6648 /** Present if non-empty */ 6649 childItems?: NavigationTree[]; 6650 } 6651 interface CallHierarchyItem { 6652 name: string; 6653 kind: ScriptElementKind; 6654 kindModifiers?: string; 6655 file: string; 6656 span: TextSpan; 6657 selectionSpan: TextSpan; 6658 containerName?: string; 6659 } 6660 interface CallHierarchyIncomingCall { 6661 from: CallHierarchyItem; 6662 fromSpans: TextSpan[]; 6663 } 6664 interface CallHierarchyOutgoingCall { 6665 to: CallHierarchyItem; 6666 fromSpans: TextSpan[]; 6667 } 6668 enum InlayHintKind { 6669 Type = "Type", 6670 Parameter = "Parameter", 6671 Enum = "Enum" 6672 } 6673 interface InlayHint { 6674 text: string; 6675 position: number; 6676 kind: InlayHintKind; 6677 whitespaceBefore?: boolean; 6678 whitespaceAfter?: boolean; 6679 } 6680 interface TodoCommentDescriptor { 6681 text: string; 6682 priority: number; 6683 } 6684 interface TodoComment { 6685 descriptor: TodoCommentDescriptor; 6686 message: string; 6687 position: number; 6688 } 6689 interface TextChange { 6690 span: TextSpan; 6691 newText: string; 6692 } 6693 interface FileTextChanges { 6694 fileName: string; 6695 textChanges: readonly TextChange[]; 6696 isNewFile?: boolean; 6697 } 6698 interface CodeAction { 6699 /** Description of the code action to display in the UI of the editor */ 6700 description: string; 6701 /** Text changes to apply to each file as part of the code action */ 6702 changes: FileTextChanges[]; 6703 /** 6704 * If the user accepts the code fix, the editor should send the action back in a `applyAction` request. 6705 * This allows the language service to have side effects (e.g. installing dependencies) upon a code fix. 6706 */ 6707 commands?: CodeActionCommand[]; 6708 } 6709 interface CodeFixAction extends CodeAction { 6710 /** Short name to identify the fix, for use by telemetry. */ 6711 fixName: string; 6712 /** 6713 * If present, one may call 'getCombinedCodeFix' with this fixId. 6714 * This may be omitted to indicate that the code fix can't be applied in a group. 6715 */ 6716 fixId?: {}; 6717 fixAllDescription?: string; 6718 } 6719 interface CombinedCodeActions { 6720 changes: readonly FileTextChanges[]; 6721 commands?: readonly CodeActionCommand[]; 6722 } 6723 type CodeActionCommand = InstallPackageAction; 6724 interface InstallPackageAction { 6725 } 6726 /** 6727 * A set of one or more available refactoring actions, grouped under a parent refactoring. 6728 */ 6729 interface ApplicableRefactorInfo { 6730 /** 6731 * The programmatic name of the refactoring 6732 */ 6733 name: string; 6734 /** 6735 * A description of this refactoring category to show to the user. 6736 * If the refactoring gets inlined (see below), this text will not be visible. 6737 */ 6738 description: string; 6739 /** 6740 * Inlineable refactorings can have their actions hoisted out to the top level 6741 * of a context menu. Non-inlineanable refactorings should always be shown inside 6742 * their parent grouping. 6743 * 6744 * If not specified, this value is assumed to be 'true' 6745 */ 6746 inlineable?: boolean; 6747 actions: RefactorActionInfo[]; 6748 } 6749 /** 6750 * Represents a single refactoring action - for example, the "Extract Method..." refactor might 6751 * offer several actions, each corresponding to a surround class or closure to extract into. 6752 */ 6753 interface RefactorActionInfo { 6754 /** 6755 * The programmatic name of the refactoring action 6756 */ 6757 name: string; 6758 /** 6759 * A description of this refactoring action to show to the user. 6760 * If the parent refactoring is inlined away, this will be the only text shown, 6761 * so this description should make sense by itself if the parent is inlineable=true 6762 */ 6763 description: string; 6764 /** 6765 * A message to show to the user if the refactoring cannot be applied in 6766 * the current context. 6767 */ 6768 notApplicableReason?: string; 6769 /** 6770 * The hierarchical dotted name of the refactor action. 6771 */ 6772 kind?: string; 6773 } 6774 /** 6775 * A set of edits to make in response to a refactor action, plus an optional 6776 * location where renaming should be invoked from 6777 */ 6778 interface RefactorEditInfo { 6779 edits: FileTextChanges[]; 6780 renameFilename?: string; 6781 renameLocation?: number; 6782 commands?: CodeActionCommand[]; 6783 } 6784 type RefactorTriggerReason = "implicit" | "invoked"; 6785 interface TextInsertion { 6786 newText: string; 6787 /** The position in newText the caret should point to after the insertion. */ 6788 caretOffset: number; 6789 } 6790 interface DocumentSpan { 6791 textSpan: TextSpan; 6792 fileName: string; 6793 /** 6794 * If the span represents a location that was remapped (e.g. via a .d.ts.map file), 6795 * then the original filename and span will be specified here 6796 */ 6797 originalTextSpan?: TextSpan; 6798 originalFileName?: string; 6799 /** 6800 * If DocumentSpan.textSpan is the span for name of the declaration, 6801 * then this is the span for relevant declaration 6802 */ 6803 contextSpan?: TextSpan; 6804 originalContextSpan?: TextSpan; 6805 } 6806 interface RenameLocation extends DocumentSpan { 6807 readonly prefixText?: string; 6808 readonly suffixText?: string; 6809 } 6810 interface ReferenceEntry extends DocumentSpan { 6811 isWriteAccess: boolean; 6812 isInString?: true; 6813 } 6814 interface ImplementationLocation extends DocumentSpan { 6815 kind: ScriptElementKind; 6816 displayParts: SymbolDisplayPart[]; 6817 } 6818 enum HighlightSpanKind { 6819 none = "none", 6820 definition = "definition", 6821 reference = "reference", 6822 writtenReference = "writtenReference" 6823 } 6824 interface HighlightSpan { 6825 fileName?: string; 6826 isInString?: true; 6827 textSpan: TextSpan; 6828 contextSpan?: TextSpan; 6829 kind: HighlightSpanKind; 6830 } 6831 interface NavigateToItem { 6832 name: string; 6833 kind: ScriptElementKind; 6834 kindModifiers: string; 6835 matchKind: "exact" | "prefix" | "substring" | "camelCase"; 6836 isCaseSensitive: boolean; 6837 fileName: string; 6838 textSpan: TextSpan; 6839 containerName: string; 6840 containerKind: ScriptElementKind; 6841 } 6842 enum IndentStyle { 6843 None = 0, 6844 Block = 1, 6845 Smart = 2 6846 } 6847 enum SemicolonPreference { 6848 Ignore = "ignore", 6849 Insert = "insert", 6850 Remove = "remove" 6851 } 6852 /** @deprecated - consider using EditorSettings instead */ 6853 interface EditorOptions { 6854 BaseIndentSize?: number; 6855 IndentSize: number; 6856 TabSize: number; 6857 NewLineCharacter: string; 6858 ConvertTabsToSpaces: boolean; 6859 IndentStyle: IndentStyle; 6860 } 6861 interface EditorSettings { 6862 baseIndentSize?: number; 6863 indentSize?: number; 6864 tabSize?: number; 6865 newLineCharacter?: string; 6866 convertTabsToSpaces?: boolean; 6867 indentStyle?: IndentStyle; 6868 trimTrailingWhitespace?: boolean; 6869 } 6870 /** @deprecated - consider using FormatCodeSettings instead */ 6871 interface FormatCodeOptions extends EditorOptions { 6872 InsertSpaceAfterCommaDelimiter: boolean; 6873 InsertSpaceAfterSemicolonInForStatements: boolean; 6874 InsertSpaceBeforeAndAfterBinaryOperators: boolean; 6875 InsertSpaceAfterConstructor?: boolean; 6876 InsertSpaceAfterKeywordsInControlFlowStatements: boolean; 6877 InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; 6878 InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; 6879 InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean; 6880 InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean; 6881 InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean; 6882 InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean; 6883 InsertSpaceAfterTypeAssertion?: boolean; 6884 InsertSpaceBeforeFunctionParenthesis?: boolean; 6885 PlaceOpenBraceOnNewLineForFunctions: boolean; 6886 PlaceOpenBraceOnNewLineForControlBlocks: boolean; 6887 insertSpaceBeforeTypeAnnotation?: boolean; 6888 } 6889 interface FormatCodeSettings extends EditorSettings { 6890 readonly insertSpaceAfterCommaDelimiter?: boolean; 6891 readonly insertSpaceAfterSemicolonInForStatements?: boolean; 6892 readonly insertSpaceBeforeAndAfterBinaryOperators?: boolean; 6893 readonly insertSpaceAfterConstructor?: boolean; 6894 readonly insertSpaceAfterKeywordsInControlFlowStatements?: boolean; 6895 readonly insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean; 6896 readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean; 6897 readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean; 6898 readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean; 6899 readonly insertSpaceAfterOpeningAndBeforeClosingEmptyBraces?: boolean; 6900 readonly insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean; 6901 readonly insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean; 6902 readonly insertSpaceAfterTypeAssertion?: boolean; 6903 readonly insertSpaceBeforeFunctionParenthesis?: boolean; 6904 readonly placeOpenBraceOnNewLineForFunctions?: boolean; 6905 readonly placeOpenBraceOnNewLineForControlBlocks?: boolean; 6906 readonly insertSpaceBeforeTypeAnnotation?: boolean; 6907 readonly indentMultiLineObjectLiteralBeginningOnBlankLine?: boolean; 6908 readonly semicolons?: SemicolonPreference; 6909 } 6910 function getDefaultFormatCodeSettings(newLineCharacter?: string): FormatCodeSettings; 6911 interface DefinitionInfo extends DocumentSpan { 6912 kind: ScriptElementKind; 6913 name: string; 6914 containerKind: ScriptElementKind; 6915 containerName: string; 6916 unverified?: boolean; 6917 } 6918 interface DefinitionInfoAndBoundSpan { 6919 definitions?: readonly DefinitionInfo[]; 6920 textSpan: TextSpan; 6921 } 6922 interface ReferencedSymbolDefinitionInfo extends DefinitionInfo { 6923 displayParts: SymbolDisplayPart[]; 6924 } 6925 interface ReferencedSymbol { 6926 definition: ReferencedSymbolDefinitionInfo; 6927 references: ReferencedSymbolEntry[]; 6928 } 6929 interface ReferencedSymbolEntry extends ReferenceEntry { 6930 isDefinition?: boolean; 6931 } 6932 enum SymbolDisplayPartKind { 6933 aliasName = 0, 6934 className = 1, 6935 enumName = 2, 6936 fieldName = 3, 6937 interfaceName = 4, 6938 keyword = 5, 6939 lineBreak = 6, 6940 numericLiteral = 7, 6941 stringLiteral = 8, 6942 localName = 9, 6943 methodName = 10, 6944 moduleName = 11, 6945 operator = 12, 6946 parameterName = 13, 6947 propertyName = 14, 6948 punctuation = 15, 6949 space = 16, 6950 text = 17, 6951 typeParameterName = 18, 6952 enumMemberName = 19, 6953 functionName = 20, 6954 regularExpressionLiteral = 21, 6955 link = 22, 6956 linkName = 23, 6957 linkText = 24 6958 } 6959 interface SymbolDisplayPart { 6960 text: string; 6961 kind: string; 6962 } 6963 interface JSDocLinkDisplayPart extends SymbolDisplayPart { 6964 target: DocumentSpan; 6965 } 6966 interface JSDocTagInfo { 6967 name: string; 6968 text?: SymbolDisplayPart[] | string; 6969 index?: number; 6970 } 6971 interface QuickInfo { 6972 kind: ScriptElementKind; 6973 kindModifiers: string; 6974 textSpan: TextSpan; 6975 displayParts?: SymbolDisplayPart[]; 6976 documentation?: SymbolDisplayPart[]; 6977 tags?: JSDocTagInfo[]; 6978 } 6979 type RenameInfo = RenameInfoSuccess | RenameInfoFailure; 6980 interface RenameInfoSuccess { 6981 canRename: true; 6982 /** 6983 * File or directory to rename. 6984 * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`. 6985 */ 6986 fileToRename?: string; 6987 displayName: string; 6988 fullDisplayName: string; 6989 kind: ScriptElementKind; 6990 kindModifiers: string; 6991 triggerSpan: TextSpan; 6992 } 6993 interface RenameInfoFailure { 6994 canRename: false; 6995 localizedErrorMessage: string; 6996 } 6997 /** 6998 * @deprecated Use `UserPreferences` instead. 6999 */ 7000 interface RenameInfoOptions { 7001 readonly allowRenameOfImportPath?: boolean; 7002 } 7003 interface DocCommentTemplateOptions { 7004 readonly generateReturnInDocTemplate?: boolean; 7005 } 7006 interface SignatureHelpParameter { 7007 name: string; 7008 documentation: SymbolDisplayPart[]; 7009 displayParts: SymbolDisplayPart[]; 7010 isOptional: boolean; 7011 isRest?: boolean; 7012 } 7013 interface SelectionRange { 7014 textSpan: TextSpan; 7015 parent?: SelectionRange; 7016 } 7017 /** 7018 * Represents a single signature to show in signature help. 7019 * The id is used for subsequent calls into the language service to ask questions about the 7020 * signature help item in the context of any documents that have been updated. i.e. after 7021 * an edit has happened, while signature help is still active, the host can ask important 7022 * questions like 'what parameter is the user currently contained within?'. 7023 */ 7024 interface SignatureHelpItem { 7025 isVariadic: boolean; 7026 prefixDisplayParts: SymbolDisplayPart[]; 7027 suffixDisplayParts: SymbolDisplayPart[]; 7028 separatorDisplayParts: SymbolDisplayPart[]; 7029 parameters: SignatureHelpParameter[]; 7030 documentation: SymbolDisplayPart[]; 7031 tags: JSDocTagInfo[]; 7032 } 7033 /** 7034 * Represents a set of signature help items, and the preferred item that should be selected. 7035 */ 7036 interface SignatureHelpItems { 7037 items: SignatureHelpItem[]; 7038 applicableSpan: TextSpan; 7039 selectedItemIndex: number; 7040 argumentIndex: number; 7041 argumentCount: number; 7042 } 7043 enum CompletionInfoFlags { 7044 None = 0, 7045 MayIncludeAutoImports = 1, 7046 IsImportStatementCompletion = 2, 7047 IsContinuation = 4, 7048 ResolvedModuleSpecifiers = 8, 7049 ResolvedModuleSpecifiersBeyondLimit = 16, 7050 MayIncludeMethodSnippets = 32 7051 } 7052 interface CompletionInfo { 7053 /** For performance telemetry. */ 7054 flags?: CompletionInfoFlags; 7055 /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */ 7056 isGlobalCompletion: boolean; 7057 isMemberCompletion: boolean; 7058 /** 7059 * In the absence of `CompletionEntry["replacementSpan"]`, the editor may choose whether to use 7060 * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span 7061 * must be used to commit that completion entry. 7062 */ 7063 optionalReplacementSpan?: TextSpan; 7064 /** 7065 * true when the current location also allows for a new identifier 7066 */ 7067 isNewIdentifierLocation: boolean; 7068 /** 7069 * Indicates to client to continue requesting completions on subsequent keystrokes. 7070 */ 7071 isIncomplete?: true; 7072 entries: CompletionEntry[]; 7073 } 7074 interface CompletionEntryDataAutoImport { 7075 /** 7076 * The name of the property or export in the module's symbol table. Differs from the completion name 7077 * in the case of InternalSymbolName.ExportEquals and InternalSymbolName.Default. 7078 */ 7079 exportName: string; 7080 moduleSpecifier?: string; 7081 /** The file name declaring the export's module symbol, if it was an external module */ 7082 fileName?: string; 7083 /** The module name (with quotes stripped) of the export's module symbol, if it was an ambient module */ 7084 ambientModuleName?: string; 7085 /** True if the export was found in the package.json AutoImportProvider */ 7086 isPackageJsonImport?: true; 7087 } 7088 interface CompletionEntryDataUnresolved extends CompletionEntryDataAutoImport { 7089 /** The key in the `ExportMapCache` where the completion entry's `SymbolExportInfo[]` is found */ 7090 exportMapKey: string; 7091 } 7092 interface CompletionEntryDataResolved extends CompletionEntryDataAutoImport { 7093 moduleSpecifier: string; 7094 } 7095 type CompletionEntryData = CompletionEntryDataUnresolved | CompletionEntryDataResolved; 7096 interface CompletionEntry { 7097 name: string; 7098 kind: ScriptElementKind; 7099 kindModifiers?: string; 7100 sortText: string; 7101 insertText?: string; 7102 isSnippet?: true; 7103 /** 7104 * An optional span that indicates the text to be replaced by this completion item. 7105 * If present, this span should be used instead of the default one. 7106 * It will be set if the required span differs from the one generated by the default replacement behavior. 7107 */ 7108 replacementSpan?: TextSpan; 7109 hasAction?: true; 7110 source?: string; 7111 sourceDisplay?: SymbolDisplayPart[]; 7112 labelDetails?: CompletionEntryLabelDetails; 7113 isRecommended?: true; 7114 isFromUncheckedFile?: true; 7115 isPackageJsonImport?: true; 7116 isImportStatementCompletion?: true; 7117 /** 7118 * A property to be sent back to TS Server in the CompletionDetailsRequest, along with `name`, 7119 * that allows TS Server to look up the symbol represented by the completion item, disambiguating 7120 * items with the same name. Currently only defined for auto-import completions, but the type is 7121 * `unknown` in the protocol, so it can be changed as needed to support other kinds of completions. 7122 * The presence of this property should generally not be used to assume that this completion entry 7123 * is an auto-import. 7124 */ 7125 data?: CompletionEntryData; 7126 jsDoc?: JSDocTagInfo[]; 7127 displayParts?: SymbolDisplayPart[]; 7128 } 7129 interface CompletionEntryLabelDetails { 7130 detail?: string; 7131 description?: string; 7132 } 7133 interface CompletionEntryDetails { 7134 name: string; 7135 kind: ScriptElementKind; 7136 kindModifiers: string; 7137 displayParts: SymbolDisplayPart[]; 7138 documentation?: SymbolDisplayPart[]; 7139 tags?: JSDocTagInfo[]; 7140 codeActions?: CodeAction[]; 7141 /** @deprecated Use `sourceDisplay` instead. */ 7142 source?: SymbolDisplayPart[]; 7143 sourceDisplay?: SymbolDisplayPart[]; 7144 } 7145 interface OutliningSpan { 7146 /** The span of the document to actually collapse. */ 7147 textSpan: TextSpan; 7148 /** The span of the document to display when the user hovers over the collapsed span. */ 7149 hintSpan: TextSpan; 7150 /** The text to display in the editor for the collapsed region. */ 7151 bannerText: string; 7152 /** 7153 * Whether or not this region should be automatically collapsed when 7154 * the 'Collapse to Definitions' command is invoked. 7155 */ 7156 autoCollapse: boolean; 7157 /** 7158 * Classification of the contents of the span 7159 */ 7160 kind: OutliningSpanKind; 7161 } 7162 enum OutliningSpanKind { 7163 /** Single or multi-line comments */ 7164 Comment = "comment", 7165 /** Sections marked by '// #region' and '// #endregion' comments */ 7166 Region = "region", 7167 /** Declarations and expressions */ 7168 Code = "code", 7169 /** Contiguous blocks of import declarations */ 7170 Imports = "imports" 7171 } 7172 enum OutputFileType { 7173 JavaScript = 0, 7174 SourceMap = 1, 7175 Declaration = 2 7176 } 7177 enum EndOfLineState { 7178 None = 0, 7179 InMultiLineCommentTrivia = 1, 7180 InSingleQuoteStringLiteral = 2, 7181 InDoubleQuoteStringLiteral = 3, 7182 InTemplateHeadOrNoSubstitutionTemplate = 4, 7183 InTemplateMiddleOrTail = 5, 7184 InTemplateSubstitutionPosition = 6 7185 } 7186 enum TokenClass { 7187 Punctuation = 0, 7188 Keyword = 1, 7189 Operator = 2, 7190 Comment = 3, 7191 Whitespace = 4, 7192 Identifier = 5, 7193 NumberLiteral = 6, 7194 BigIntLiteral = 7, 7195 StringLiteral = 8, 7196 RegExpLiteral = 9 7197 } 7198 interface ClassificationResult { 7199 finalLexState: EndOfLineState; 7200 entries: ClassificationInfo[]; 7201 } 7202 interface ClassificationInfo { 7203 length: number; 7204 classification: TokenClass; 7205 } 7206 interface Classifier { 7207 /** 7208 * Gives lexical classifications of tokens on a line without any syntactic context. 7209 * For instance, a token consisting of the text 'string' can be either an identifier 7210 * named 'string' or the keyword 'string', however, because this classifier is not aware, 7211 * it relies on certain heuristics to give acceptable results. For classifications where 7212 * speed trumps accuracy, this function is preferable; however, for true accuracy, the 7213 * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the 7214 * lexical, syntactic, and semantic classifiers may issue the best user experience. 7215 * 7216 * @param text The text of a line to classify. 7217 * @param lexState The state of the lexical classifier at the end of the previous line. 7218 * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier. 7219 * If there is no syntactic classifier (syntacticClassifierAbsent=true), 7220 * certain heuristics may be used in its place; however, if there is a 7221 * syntactic classifier (syntacticClassifierAbsent=false), certain 7222 * classifications which may be incorrectly categorized will be given 7223 * back as Identifiers in order to allow the syntactic classifier to 7224 * subsume the classification. 7225 * @deprecated Use getLexicalClassifications instead. 7226 */ 7227 getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult; 7228 getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications; 7229 } 7230 enum ScriptElementKind { 7231 unknown = "", 7232 warning = "warning", 7233 /** predefined type (void) or keyword (class) */ 7234 keyword = "keyword", 7235 /** top level script node */ 7236 scriptElement = "script", 7237 /** module foo {} */ 7238 moduleElement = "module", 7239 /** class X {} */ 7240 classElement = "class", 7241 /** var x = class X {} */ 7242 localClassElement = "local class", 7243 /** struct X {} */ 7244 structElement = "struct", 7245 /** interface Y {} */ 7246 interfaceElement = "interface", 7247 /** type T = ... */ 7248 typeElement = "type", 7249 /** enum E */ 7250 enumElement = "enum", 7251 enumMemberElement = "enum member", 7252 /** 7253 * Inside module and script only 7254 * const v = .. 7255 */ 7256 variableElement = "var", 7257 /** Inside function */ 7258 localVariableElement = "local var", 7259 /** 7260 * Inside module and script only 7261 * function f() { } 7262 */ 7263 functionElement = "function", 7264 /** Inside function */ 7265 localFunctionElement = "local function", 7266 /** class X { [public|private]* foo() {} } */ 7267 memberFunctionElement = "method", 7268 /** class X { [public|private]* [get|set] foo:number; } */ 7269 memberGetAccessorElement = "getter", 7270 memberSetAccessorElement = "setter", 7271 /** 7272 * class X { [public|private]* foo:number; } 7273 * interface Y { foo:number; } 7274 */ 7275 memberVariableElement = "property", 7276 /** class X { [public|private]* accessor foo: number; } */ 7277 memberAccessorVariableElement = "accessor", 7278 /** 7279 * class X { constructor() { } } 7280 * class X { static { } } 7281 */ 7282 constructorImplementationElement = "constructor", 7283 /** interface Y { ():number; } */ 7284 callSignatureElement = "call", 7285 /** interface Y { []:number; } */ 7286 indexSignatureElement = "index", 7287 /** interface Y { new():Y; } */ 7288 constructSignatureElement = "construct", 7289 /** function foo(*Y*: string) */ 7290 parameterElement = "parameter", 7291 typeParameterElement = "type parameter", 7292 primitiveType = "primitive type", 7293 label = "label", 7294 alias = "alias", 7295 constElement = "const", 7296 letElement = "let", 7297 directory = "directory", 7298 externalModuleName = "external module name", 7299 /** 7300 * <JsxTagName attribute1 attribute2={0} /> 7301 * @deprecated 7302 */ 7303 jsxAttribute = "JSX attribute", 7304 /** String literal */ 7305 string = "string", 7306 /** Jsdoc @link: in `{@link C link text}`, the before and after text "{@link " and "}" */ 7307 link = "link", 7308 /** Jsdoc @link: in `{@link C link text}`, the entity name "C" */ 7309 linkName = "link name", 7310 /** Jsdoc @link: in `{@link C link text}`, the link text "link text" */ 7311 linkText = "link text" 7312 } 7313 enum ScriptElementKindModifier { 7314 none = "", 7315 publicMemberModifier = "public", 7316 privateMemberModifier = "private", 7317 protectedMemberModifier = "protected", 7318 exportedModifier = "export", 7319 ambientModifier = "declare", 7320 staticModifier = "static", 7321 abstractModifier = "abstract", 7322 optionalModifier = "optional", 7323 deprecatedModifier = "deprecated", 7324 dtsModifier = ".d.ts", 7325 tsModifier = ".ts", 7326 tsxModifier = ".tsx", 7327 jsModifier = ".js", 7328 jsxModifier = ".jsx", 7329 jsonModifier = ".json", 7330 dmtsModifier = ".d.mts", 7331 mtsModifier = ".mts", 7332 mjsModifier = ".mjs", 7333 dctsModifier = ".d.cts", 7334 ctsModifier = ".cts", 7335 cjsModifier = ".cjs", 7336 etsModifier = ".ets", 7337 detsModifier = ".d.ets" 7338 } 7339 enum ClassificationTypeNames { 7340 comment = "comment", 7341 identifier = "identifier", 7342 keyword = "keyword", 7343 numericLiteral = "number", 7344 bigintLiteral = "bigint", 7345 operator = "operator", 7346 stringLiteral = "string", 7347 whiteSpace = "whitespace", 7348 text = "text", 7349 punctuation = "punctuation", 7350 className = "class name", 7351 enumName = "enum name", 7352 interfaceName = "interface name", 7353 moduleName = "module name", 7354 typeParameterName = "type parameter name", 7355 typeAliasName = "type alias name", 7356 parameterName = "parameter name", 7357 docCommentTagName = "doc comment tag name", 7358 jsxOpenTagName = "jsx open tag name", 7359 jsxCloseTagName = "jsx close tag name", 7360 jsxSelfClosingTagName = "jsx self closing tag name", 7361 jsxAttribute = "jsx attribute", 7362 jsxText = "jsx text", 7363 jsxAttributeStringLiteralValue = "jsx attribute string literal value" 7364 } 7365 enum ClassificationType { 7366 comment = 1, 7367 identifier = 2, 7368 keyword = 3, 7369 numericLiteral = 4, 7370 operator = 5, 7371 stringLiteral = 6, 7372 regularExpressionLiteral = 7, 7373 whiteSpace = 8, 7374 text = 9, 7375 punctuation = 10, 7376 className = 11, 7377 enumName = 12, 7378 interfaceName = 13, 7379 moduleName = 14, 7380 typeParameterName = 15, 7381 typeAliasName = 16, 7382 parameterName = 17, 7383 docCommentTagName = 18, 7384 jsxOpenTagName = 19, 7385 jsxCloseTagName = 20, 7386 jsxSelfClosingTagName = 21, 7387 jsxAttribute = 22, 7388 jsxText = 23, 7389 jsxAttributeStringLiteralValue = 24, 7390 bigintLiteral = 25 7391 } 7392 interface InlayHintsContext { 7393 file: SourceFile; 7394 program: Program; 7395 cancellationToken: CancellationToken; 7396 host: LanguageServiceHost; 7397 span: TextSpan; 7398 preferences: UserPreferences; 7399 } 7400} 7401declare namespace ts { 7402 /** The classifier is used for syntactic highlighting in editors via the TSServer */ 7403 function createClassifier(): Classifier; 7404} 7405declare namespace ts { 7406 interface DocumentHighlights { 7407 fileName: string; 7408 highlightSpans: HighlightSpan[]; 7409 } 7410} 7411declare namespace ts { 7412 /** 7413 * The document registry represents a store of SourceFile objects that can be shared between 7414 * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST) 7415 * of files in the context. 7416 * SourceFile objects account for most of the memory usage by the language service. Sharing 7417 * the same DocumentRegistry instance between different instances of LanguageService allow 7418 * for more efficient memory utilization since all projects will share at least the library 7419 * file (lib.d.ts). 7420 * 7421 * A more advanced use of the document registry is to serialize sourceFile objects to disk 7422 * and re-hydrate them when needed. 7423 * 7424 * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it 7425 * to all subsequent createLanguageService calls. 7426 */ 7427 interface DocumentRegistry { 7428 /** 7429 * Request a stored SourceFile with a given fileName and compilationSettings. 7430 * The first call to acquire will call createLanguageServiceSourceFile to generate 7431 * the SourceFile if was not found in the registry. 7432 * 7433 * @param fileName The name of the file requested 7434 * @param compilationSettingsOrHost Some compilation settings like target affects the 7435 * shape of a the resulting SourceFile. This allows the DocumentRegistry to store 7436 * multiple copies of the same file for different compilation settings. A minimal 7437 * resolution cache is needed to fully define a source file's shape when 7438 * the compilation settings include `module: node16`+, so providing a cache host 7439 * object should be preferred. A common host is a language service `ConfiguredProject`. 7440 * @param scriptSnapshot Text of the file. Only used if the file was not found 7441 * in the registry and a new one was created. 7442 * @param version Current version of the file. Only used if the file was not found 7443 * in the registry and a new one was created. 7444 */ 7445 acquireDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; 7446 acquireDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; 7447 /** 7448 * Request an updated version of an already existing SourceFile with a given fileName 7449 * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile 7450 * to get an updated SourceFile. 7451 * 7452 * @param fileName The name of the file requested 7453 * @param compilationSettingsOrHost Some compilation settings like target affects the 7454 * shape of a the resulting SourceFile. This allows the DocumentRegistry to store 7455 * multiple copies of the same file for different compilation settings. A minimal 7456 * resolution cache is needed to fully define a source file's shape when 7457 * the compilation settings include `module: node16`+, so providing a cache host 7458 * object should be preferred. A common host is a language service `ConfiguredProject`. 7459 * @param scriptSnapshot Text of the file. 7460 * @param version Current version of the file. 7461 */ 7462 updateDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; 7463 updateDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; 7464 getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey; 7465 /** 7466 * Informs the DocumentRegistry that a file is not needed any longer. 7467 * 7468 * Note: It is not allowed to call release on a SourceFile that was not acquired from 7469 * this registry originally. 7470 * 7471 * @param fileName The name of the file to be released 7472 * @param compilationSettings The compilation settings used to acquire the file 7473 * @param scriptKind The script kind of the file to be released 7474 */ 7475 /**@deprecated pass scriptKind and impliedNodeFormat for correctness */ 7476 releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind?: ScriptKind): void; 7477 /** 7478 * Informs the DocumentRegistry that a file is not needed any longer. 7479 * 7480 * Note: It is not allowed to call release on a SourceFile that was not acquired from 7481 * this registry originally. 7482 * 7483 * @param fileName The name of the file to be released 7484 * @param compilationSettings The compilation settings used to acquire the file 7485 * @param scriptKind The script kind of the file to be released 7486 * @param impliedNodeFormat The implied source file format of the file to be released 7487 */ 7488 releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind, impliedNodeFormat: SourceFile["impliedNodeFormat"]): void; 7489 /** 7490 * @deprecated pass scriptKind for and impliedNodeFormat correctness */ 7491 releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind?: ScriptKind): void; 7492 releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind: ScriptKind, impliedNodeFormat: SourceFile["impliedNodeFormat"]): void; 7493 reportStats(): string; 7494 } 7495 type DocumentRegistryBucketKey = string & { 7496 __bucketKey: any; 7497 }; 7498 function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry; 7499} 7500declare namespace ts { 7501 function preProcessFile(sourceText: string, readImportFiles?: boolean, detectJavaScriptImports?: boolean): PreProcessedFileInfo; 7502} 7503declare namespace ts { 7504 interface TranspileOptions { 7505 compilerOptions?: CompilerOptions; 7506 fileName?: string; 7507 reportDiagnostics?: boolean; 7508 moduleName?: string; 7509 renamedDependencies?: MapLike<string>; 7510 transformers?: CustomTransformers; 7511 } 7512 interface TranspileOutput { 7513 outputText: string; 7514 diagnostics?: Diagnostic[]; 7515 sourceMapText?: string; 7516 } 7517 function transpileModule(input: string, transpileOptions: TranspileOptions): TranspileOutput; 7518 function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string; 7519} 7520declare namespace ts { 7521 /** The version of the language service API */ 7522 const servicesVersion = "0.8"; 7523 function toEditorSettings(options: EditorOptions | EditorSettings): EditorSettings; 7524 function displayPartsToString(displayParts: SymbolDisplayPart[] | undefined): string; 7525 function getDefaultCompilerOptions(): CompilerOptions; 7526 function getSupportedCodeFixes(): string[]; 7527 function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTargetOrOptions: ScriptTarget | CreateSourceFileOptions, version: string, setNodeParents: boolean, scriptKind?: ScriptKind, option?: CompilerOptions): SourceFile; 7528 function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange | undefined, aggressiveChecks?: boolean, option?: CompilerOptions): SourceFile; 7529 function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnlyOrLanguageServiceMode?: boolean | LanguageServiceMode): LanguageService; 7530 /** 7531 * Get the path of the default library files (lib.d.ts) as distributed with the typescript 7532 * node package. 7533 * The functionality is not supported if the ts module is consumed outside of a node module. 7534 */ 7535 function getDefaultLibFilePath(options: CompilerOptions): string; 7536} 7537declare namespace ts { 7538 /** 7539 * Transform one or more nodes using the supplied transformers. 7540 * @param source A single `Node` or an array of `Node` objects. 7541 * @param transformers An array of `TransformerFactory` callbacks used to process the transformation. 7542 * @param compilerOptions Optional compiler options. 7543 */ 7544 function transform<T extends Node>(source: T | T[], transformers: TransformerFactory<T>[], compilerOptions?: CompilerOptions): TransformationResult<T>; 7545} 7546declare namespace ts { 7547 /** @deprecated Use `factory.createNodeArray` or the factory supplied by your transformation context instead. */ 7548 const createNodeArray: <T extends Node>(elements?: readonly T[] | undefined, hasTrailingComma?: boolean | undefined) => NodeArray<T>; 7549 /** @deprecated Use `factory.createNumericLiteral` or the factory supplied by your transformation context instead. */ 7550 const createNumericLiteral: (value: string | number, numericLiteralFlags?: TokenFlags | undefined) => NumericLiteral; 7551 /** @deprecated Use `factory.createBigIntLiteral` or the factory supplied by your transformation context instead. */ 7552 const createBigIntLiteral: (value: string | PseudoBigInt) => BigIntLiteral; 7553 /** @deprecated Use `factory.createStringLiteral` or the factory supplied by your transformation context instead. */ 7554 const createStringLiteral: { 7555 (text: string, isSingleQuote?: boolean | undefined): StringLiteral; 7556 (text: string, isSingleQuote?: boolean | undefined, hasExtendedUnicodeEscape?: boolean | undefined): StringLiteral; 7557 }; 7558 /** @deprecated Use `factory.createStringLiteralFromNode` or the factory supplied by your transformation context instead. */ 7559 const createStringLiteralFromNode: (sourceNode: PrivateIdentifier | PropertyNameLiteral, isSingleQuote?: boolean | undefined) => StringLiteral; 7560 /** @deprecated Use `factory.createRegularExpressionLiteral` or the factory supplied by your transformation context instead. */ 7561 const createRegularExpressionLiteral: (text: string) => RegularExpressionLiteral; 7562 /** @deprecated Use `factory.createLoopVariable` or the factory supplied by your transformation context instead. */ 7563 const createLoopVariable: (reservedInNestedScopes?: boolean | undefined) => Identifier; 7564 /** @deprecated Use `factory.createUniqueName` or the factory supplied by your transformation context instead. */ 7565 const createUniqueName: (text: string, flags?: GeneratedIdentifierFlags | undefined) => Identifier; 7566 /** @deprecated Use `factory.createPrivateIdentifier` or the factory supplied by your transformation context instead. */ 7567 const createPrivateIdentifier: (text: string) => PrivateIdentifier; 7568 /** @deprecated Use `factory.createSuper` or the factory supplied by your transformation context instead. */ 7569 const createSuper: () => SuperExpression; 7570 /** @deprecated Use `factory.createThis` or the factory supplied by your transformation context instead. */ 7571 const createThis: () => ThisExpression; 7572 /** @deprecated Use `factory.createNull` or the factory supplied by your transformation context instead. */ 7573 const createNull: () => NullLiteral; 7574 /** @deprecated Use `factory.createTrue` or the factory supplied by your transformation context instead. */ 7575 const createTrue: () => TrueLiteral; 7576 /** @deprecated Use `factory.createFalse` or the factory supplied by your transformation context instead. */ 7577 const createFalse: () => FalseLiteral; 7578 /** @deprecated Use `factory.createModifier` or the factory supplied by your transformation context instead. */ 7579 const createModifier: <T extends ModifierSyntaxKind>(kind: T) => ModifierToken<T>; 7580 /** @deprecated Use `factory.createModifiersFromModifierFlags` or the factory supplied by your transformation context instead. */ 7581 const createModifiersFromModifierFlags: (flags: ModifierFlags) => Modifier[] | undefined; 7582 /** @deprecated Use `factory.createQualifiedName` or the factory supplied by your transformation context instead. */ 7583 const createQualifiedName: (left: EntityName, right: string | Identifier) => QualifiedName; 7584 /** @deprecated Use `factory.updateQualifiedName` or the factory supplied by your transformation context instead. */ 7585 const updateQualifiedName: (node: QualifiedName, left: EntityName, right: Identifier) => QualifiedName; 7586 /** @deprecated Use `factory.createComputedPropertyName` or the factory supplied by your transformation context instead. */ 7587 const createComputedPropertyName: (expression: Expression) => ComputedPropertyName; 7588 /** @deprecated Use `factory.updateComputedPropertyName` or the factory supplied by your transformation context instead. */ 7589 const updateComputedPropertyName: (node: ComputedPropertyName, expression: Expression) => ComputedPropertyName; 7590 /** @deprecated Use `factory.createTypeParameterDeclaration` or the factory supplied by your transformation context instead. */ 7591 const createTypeParameterDeclaration: { 7592 (modifiers: readonly Modifier[] | undefined, name: string | Identifier, constraint?: TypeNode | undefined, defaultType?: TypeNode | undefined): TypeParameterDeclaration; 7593 (name: string | Identifier, constraint?: TypeNode | undefined, defaultType?: TypeNode | undefined): TypeParameterDeclaration; 7594 }; 7595 /** @deprecated Use `factory.updateTypeParameterDeclaration` or the factory supplied by your transformation context instead. */ 7596 const updateTypeParameterDeclaration: { 7597 (node: TypeParameterDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; 7598 (node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; 7599 }; 7600 /** @deprecated Use `factory.createParameterDeclaration` or the factory supplied by your transformation context instead. */ 7601 const createParameter: { 7602 (modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken | undefined, type?: TypeNode | undefined, initializer?: Expression | undefined): ParameterDeclaration; 7603 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken | undefined, type?: TypeNode | undefined, initializer?: Expression | undefined): ParameterDeclaration; 7604 }; 7605 /** @deprecated Use `factory.updateParameterDeclaration` or the factory supplied by your transformation context instead. */ 7606 const updateParameter: { 7607 (node: ParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration; 7608 (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; 7609 }; 7610 /** @deprecated Use `factory.createDecorator` or the factory supplied by your transformation context instead. */ 7611 const createDecorator: (expression: Expression, annotationDeclaration?: AnnotationDeclaration | undefined) => Decorator; 7612 /** @deprecated Use `factory.updateDecorator` or the factory supplied by your transformation context instead. */ 7613 const updateDecorator: (node: Decorator, expression: Expression, annotationDeclaration?: AnnotationDeclaration | undefined) => Decorator; 7614 /** @deprecated Use `factory.createPropertyDeclaration` or the factory supplied by your transformation context instead. */ 7615 const createProperty: { 7616 (modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 7617 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 7618 }; 7619 /** @deprecated Use `factory.updatePropertyDeclaration` or the factory supplied by your transformation context instead. */ 7620 const updateProperty: { 7621 (node: PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 7622 (node: PropertyDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 7623 }; 7624 /** @deprecated Use `factory.createMethodDeclaration` or the factory supplied by your transformation context instead. */ 7625 const createMethod: { 7626 (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; 7627 (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; 7628 }; 7629 /** @deprecated Use `factory.updateMethodDeclaration` or the factory supplied by your transformation context instead. */ 7630 const updateMethod: { 7631 (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; 7632 (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; 7633 }; 7634 /** @deprecated Use `factory.createConstructorDeclaration` or the factory supplied by your transformation context instead. */ 7635 const createConstructor: { 7636 (modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 7637 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 7638 }; 7639 /** @deprecated Use `factory.updateConstructorDeclaration` or the factory supplied by your transformation context instead. */ 7640 const updateConstructor: { 7641 (node: ConstructorDeclaration, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 7642 (node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 7643 }; 7644 /** @deprecated Use `factory.createGetAccessorDeclaration` or the factory supplied by your transformation context instead. */ 7645 const createGetAccessor: { 7646 (modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 7647 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 7648 }; 7649 /** @deprecated Use `factory.updateGetAccessorDeclaration` or the factory supplied by your transformation context instead. */ 7650 const updateGetAccessor: { 7651 (node: GetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 7652 (node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 7653 }; 7654 /** @deprecated Use `factory.createSetAccessorDeclaration` or the factory supplied by your transformation context instead. */ 7655 const createSetAccessor: { 7656 (modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 7657 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 7658 }; 7659 /** @deprecated Use `factory.updateSetAccessorDeclaration` or the factory supplied by your transformation context instead. */ 7660 const updateSetAccessor: { 7661 (node: SetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 7662 (node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 7663 }; 7664 /** @deprecated Use `factory.createCallSignature` or the factory supplied by your transformation context instead. */ 7665 const createCallSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined) => CallSignatureDeclaration; 7666 /** @deprecated Use `factory.updateCallSignature` or the factory supplied by your transformation context instead. */ 7667 const updateCallSignature: (node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined) => CallSignatureDeclaration; 7668 /** @deprecated Use `factory.createConstructSignature` or the factory supplied by your transformation context instead. */ 7669 const createConstructSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined) => ConstructSignatureDeclaration; 7670 /** @deprecated Use `factory.updateConstructSignature` or the factory supplied by your transformation context instead. */ 7671 const updateConstructSignature: (node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined) => ConstructSignatureDeclaration; 7672 /** @deprecated Use `factory.updateIndexSignature` or the factory supplied by your transformation context instead. */ 7673 const updateIndexSignature: { 7674 (node: IndexSignatureDeclaration, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; 7675 (node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; 7676 }; 7677 /** @deprecated Use `factory.createKeywordTypeNode` or the factory supplied by your transformation context instead. */ 7678 const createKeywordTypeNode: <TKind extends KeywordTypeSyntaxKind>(kind: TKind) => KeywordTypeNode<TKind>; 7679 /** @deprecated Use `factory.createTypePredicateNode` or the factory supplied by your transformation context instead. */ 7680 const createTypePredicateNodeWithModifier: (assertsModifier: AssertsKeyword | undefined, parameterName: string | Identifier | ThisTypeNode, type: TypeNode | undefined) => TypePredicateNode; 7681 /** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */ 7682 const updateTypePredicateNodeWithModifier: (node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined) => TypePredicateNode; 7683 /** @deprecated Use `factory.createTypeReferenceNode` or the factory supplied by your transformation context instead. */ 7684 const createTypeReferenceNode: (typeName: string | EntityName, typeArguments?: readonly TypeNode[] | undefined) => TypeReferenceNode; 7685 /** @deprecated Use `factory.updateTypeReferenceNode` or the factory supplied by your transformation context instead. */ 7686 const updateTypeReferenceNode: (node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined) => TypeReferenceNode; 7687 /** @deprecated Use `factory.createFunctionTypeNode` or the factory supplied by your transformation context instead. */ 7688 const createFunctionTypeNode: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => FunctionTypeNode; 7689 /** @deprecated Use `factory.updateFunctionTypeNode` or the factory supplied by your transformation context instead. */ 7690 const updateFunctionTypeNode: (node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode) => FunctionTypeNode; 7691 /** @deprecated Use `factory.createConstructorTypeNode` or the factory supplied by your transformation context instead. */ 7692 const createConstructorTypeNode: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => ConstructorTypeNode; 7693 /** @deprecated Use `factory.updateConstructorTypeNode` or the factory supplied by your transformation context instead. */ 7694 const updateConstructorTypeNode: (node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode) => ConstructorTypeNode; 7695 /** @deprecated Use `factory.createTypeQueryNode` or the factory supplied by your transformation context instead. */ 7696 const createTypeQueryNode: (exprName: EntityName, typeArguments?: readonly TypeNode[] | undefined) => TypeQueryNode; 7697 /** @deprecated Use `factory.updateTypeQueryNode` or the factory supplied by your transformation context instead. */ 7698 const updateTypeQueryNode: (node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[] | undefined) => TypeQueryNode; 7699 /** @deprecated Use `factory.createTypeLiteralNode` or the factory supplied by your transformation context instead. */ 7700 const createTypeLiteralNode: (members: readonly TypeElement[] | undefined) => TypeLiteralNode; 7701 /** @deprecated Use `factory.updateTypeLiteralNode` or the factory supplied by your transformation context instead. */ 7702 const updateTypeLiteralNode: (node: TypeLiteralNode, members: NodeArray<TypeElement>) => TypeLiteralNode; 7703 /** @deprecated Use `factory.createArrayTypeNode` or the factory supplied by your transformation context instead. */ 7704 const createArrayTypeNode: (elementType: TypeNode) => ArrayTypeNode; 7705 /** @deprecated Use `factory.updateArrayTypeNode` or the factory supplied by your transformation context instead. */ 7706 const updateArrayTypeNode: (node: ArrayTypeNode, elementType: TypeNode) => ArrayTypeNode; 7707 /** @deprecated Use `factory.createTupleTypeNode` or the factory supplied by your transformation context instead. */ 7708 const createTupleTypeNode: (elements: readonly (TypeNode | NamedTupleMember)[]) => TupleTypeNode; 7709 /** @deprecated Use `factory.updateTupleTypeNode` or the factory supplied by your transformation context instead. */ 7710 const updateTupleTypeNode: (node: TupleTypeNode, elements: readonly (TypeNode | NamedTupleMember)[]) => TupleTypeNode; 7711 /** @deprecated Use `factory.createOptionalTypeNode` or the factory supplied by your transformation context instead. */ 7712 const createOptionalTypeNode: (type: TypeNode) => OptionalTypeNode; 7713 /** @deprecated Use `factory.updateOptionalTypeNode` or the factory supplied by your transformation context instead. */ 7714 const updateOptionalTypeNode: (node: OptionalTypeNode, type: TypeNode) => OptionalTypeNode; 7715 /** @deprecated Use `factory.createRestTypeNode` or the factory supplied by your transformation context instead. */ 7716 const createRestTypeNode: (type: TypeNode) => RestTypeNode; 7717 /** @deprecated Use `factory.updateRestTypeNode` or the factory supplied by your transformation context instead. */ 7718 const updateRestTypeNode: (node: RestTypeNode, type: TypeNode) => RestTypeNode; 7719 /** @deprecated Use `factory.createUnionTypeNode` or the factory supplied by your transformation context instead. */ 7720 const createUnionTypeNode: (types: readonly TypeNode[]) => UnionTypeNode; 7721 /** @deprecated Use `factory.updateUnionTypeNode` or the factory supplied by your transformation context instead. */ 7722 const updateUnionTypeNode: (node: UnionTypeNode, types: NodeArray<TypeNode>) => UnionTypeNode; 7723 /** @deprecated Use `factory.createIntersectionTypeNode` or the factory supplied by your transformation context instead. */ 7724 const createIntersectionTypeNode: (types: readonly TypeNode[]) => IntersectionTypeNode; 7725 /** @deprecated Use `factory.updateIntersectionTypeNode` or the factory supplied by your transformation context instead. */ 7726 const updateIntersectionTypeNode: (node: IntersectionTypeNode, types: NodeArray<TypeNode>) => IntersectionTypeNode; 7727 /** @deprecated Use `factory.createConditionalTypeNode` or the factory supplied by your transformation context instead. */ 7728 const createConditionalTypeNode: (checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode) => ConditionalTypeNode; 7729 /** @deprecated Use `factory.updateConditionalTypeNode` or the factory supplied by your transformation context instead. */ 7730 const updateConditionalTypeNode: (node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode) => ConditionalTypeNode; 7731 /** @deprecated Use `factory.createInferTypeNode` or the factory supplied by your transformation context instead. */ 7732 const createInferTypeNode: (typeParameter: TypeParameterDeclaration) => InferTypeNode; 7733 /** @deprecated Use `factory.updateInferTypeNode` or the factory supplied by your transformation context instead. */ 7734 const updateInferTypeNode: (node: InferTypeNode, typeParameter: TypeParameterDeclaration) => InferTypeNode; 7735 /** @deprecated Use `factory.createImportTypeNode` or the factory supplied by your transformation context instead. */ 7736 const createImportTypeNode: { 7737 (argument: TypeNode, assertions?: ImportTypeAssertionContainer | undefined, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode; 7738 (argument: TypeNode, assertions?: ImportTypeAssertionContainer | undefined, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode; 7739 (argument: TypeNode, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode; 7740 }; 7741 /** @deprecated Use `factory.updateImportTypeNode` or the factory supplied by your transformation context instead. */ 7742 const updateImportTypeNode: { 7743 (node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode; 7744 (node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode; 7745 }; 7746 /** @deprecated Use `factory.createParenthesizedType` or the factory supplied by your transformation context instead. */ 7747 const createParenthesizedType: (type: TypeNode) => ParenthesizedTypeNode; 7748 /** @deprecated Use `factory.updateParenthesizedType` or the factory supplied by your transformation context instead. */ 7749 const updateParenthesizedType: (node: ParenthesizedTypeNode, type: TypeNode) => ParenthesizedTypeNode; 7750 /** @deprecated Use `factory.createThisTypeNode` or the factory supplied by your transformation context instead. */ 7751 const createThisTypeNode: () => ThisTypeNode; 7752 /** @deprecated Use `factory.updateTypeOperatorNode` or the factory supplied by your transformation context instead. */ 7753 const updateTypeOperatorNode: (node: TypeOperatorNode, type: TypeNode) => TypeOperatorNode; 7754 /** @deprecated Use `factory.createIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */ 7755 const createIndexedAccessTypeNode: (objectType: TypeNode, indexType: TypeNode) => IndexedAccessTypeNode; 7756 /** @deprecated Use `factory.updateIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */ 7757 const updateIndexedAccessTypeNode: (node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode) => IndexedAccessTypeNode; 7758 /** @deprecated Use `factory.createMappedTypeNode` or the factory supplied by your transformation context instead. */ 7759 const createMappedTypeNode: (readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined, members: NodeArray<TypeElement> | undefined) => MappedTypeNode; 7760 /** @deprecated Use `factory.updateMappedTypeNode` or the factory supplied by your transformation context instead. */ 7761 const 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; 7762 /** @deprecated Use `factory.createLiteralTypeNode` or the factory supplied by your transformation context instead. */ 7763 const createLiteralTypeNode: (literal: LiteralExpression | BooleanLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode; 7764 /** @deprecated Use `factory.updateLiteralTypeNode` or the factory supplied by your transformation context instead. */ 7765 const updateLiteralTypeNode: (node: LiteralTypeNode, literal: LiteralExpression | BooleanLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode; 7766 /** @deprecated Use `factory.createObjectBindingPattern` or the factory supplied by your transformation context instead. */ 7767 const createObjectBindingPattern: (elements: readonly BindingElement[]) => ObjectBindingPattern; 7768 /** @deprecated Use `factory.updateObjectBindingPattern` or the factory supplied by your transformation context instead. */ 7769 const updateObjectBindingPattern: (node: ObjectBindingPattern, elements: readonly BindingElement[]) => ObjectBindingPattern; 7770 /** @deprecated Use `factory.createArrayBindingPattern` or the factory supplied by your transformation context instead. */ 7771 const createArrayBindingPattern: (elements: readonly ArrayBindingElement[]) => ArrayBindingPattern; 7772 /** @deprecated Use `factory.updateArrayBindingPattern` or the factory supplied by your transformation context instead. */ 7773 const updateArrayBindingPattern: (node: ArrayBindingPattern, elements: readonly ArrayBindingElement[]) => ArrayBindingPattern; 7774 /** @deprecated Use `factory.createBindingElement` or the factory supplied by your transformation context instead. */ 7775 const createBindingElement: (dotDotDotToken: DotDotDotToken | undefined, propertyName: string | PropertyName | undefined, name: string | BindingName, initializer?: Expression | undefined) => BindingElement; 7776 /** @deprecated Use `factory.updateBindingElement` or the factory supplied by your transformation context instead. */ 7777 const updateBindingElement: (node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, initializer: Expression | undefined) => BindingElement; 7778 /** @deprecated Use `factory.createArrayLiteralExpression` or the factory supplied by your transformation context instead. */ 7779 const createArrayLiteral: (elements?: readonly Expression[] | undefined, multiLine?: boolean | undefined) => ArrayLiteralExpression; 7780 /** @deprecated Use `factory.updateArrayLiteralExpression` or the factory supplied by your transformation context instead. */ 7781 const updateArrayLiteral: (node: ArrayLiteralExpression, elements: readonly Expression[]) => ArrayLiteralExpression; 7782 /** @deprecated Use `factory.createObjectLiteralExpression` or the factory supplied by your transformation context instead. */ 7783 const createObjectLiteral: (properties?: readonly ObjectLiteralElementLike[] | undefined, multiLine?: boolean | undefined) => ObjectLiteralExpression; 7784 /** @deprecated Use `factory.updateObjectLiteralExpression` or the factory supplied by your transformation context instead. */ 7785 const updateObjectLiteral: (node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]) => ObjectLiteralExpression; 7786 /** @deprecated Use `factory.createPropertyAccessExpression` or the factory supplied by your transformation context instead. */ 7787 const createPropertyAccess: (expression: Expression, name: string | MemberName) => PropertyAccessExpression; 7788 /** @deprecated Use `factory.updatePropertyAccessExpression` or the factory supplied by your transformation context instead. */ 7789 const updatePropertyAccess: (node: PropertyAccessExpression, expression: Expression, name: MemberName) => PropertyAccessExpression; 7790 /** @deprecated Use `factory.createPropertyAccessChain` or the factory supplied by your transformation context instead. */ 7791 const createPropertyAccessChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, name: string | MemberName) => PropertyAccessChain; 7792 /** @deprecated Use `factory.updatePropertyAccessChain` or the factory supplied by your transformation context instead. */ 7793 const updatePropertyAccessChain: (node: PropertyAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: MemberName) => PropertyAccessChain; 7794 /** @deprecated Use `factory.createElementAccessExpression` or the factory supplied by your transformation context instead. */ 7795 const createElementAccess: (expression: Expression, index: number | Expression) => ElementAccessExpression; 7796 /** @deprecated Use `factory.updateElementAccessExpression` or the factory supplied by your transformation context instead. */ 7797 const updateElementAccess: (node: ElementAccessExpression, expression: Expression, argumentExpression: Expression) => ElementAccessExpression; 7798 /** @deprecated Use `factory.createElementAccessChain` or the factory supplied by your transformation context instead. */ 7799 const createElementAccessChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, index: number | Expression) => ElementAccessChain; 7800 /** @deprecated Use `factory.updateElementAccessChain` or the factory supplied by your transformation context instead. */ 7801 const updateElementAccessChain: (node: ElementAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression) => ElementAccessChain; 7802 /** @deprecated Use `factory.createCallExpression` or the factory supplied by your transformation context instead. */ 7803 const createCall: (expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => CallExpression; 7804 /** @deprecated Use `factory.updateCallExpression` or the factory supplied by your transformation context instead. */ 7805 const updateCall: (node: CallExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]) => CallExpression; 7806 /** @deprecated Use `factory.createCallChain` or the factory supplied by your transformation context instead. */ 7807 const createCallChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => CallChain; 7808 /** @deprecated Use `factory.updateCallChain` or the factory supplied by your transformation context instead. */ 7809 const updateCallChain: (node: CallChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]) => CallChain; 7810 /** @deprecated Use `factory.createNewExpression` or the factory supplied by your transformation context instead. */ 7811 const createNew: (expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => NewExpression; 7812 /** @deprecated Use `factory.updateNewExpression` or the factory supplied by your transformation context instead. */ 7813 const updateNew: (node: NewExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => NewExpression; 7814 /** @deprecated Use `factory.createTypeAssertion` or the factory supplied by your transformation context instead. */ 7815 const createTypeAssertion: (type: TypeNode, expression: Expression) => TypeAssertion; 7816 /** @deprecated Use `factory.updateTypeAssertion` or the factory supplied by your transformation context instead. */ 7817 const updateTypeAssertion: (node: TypeAssertion, type: TypeNode, expression: Expression) => TypeAssertion; 7818 /** @deprecated Use `factory.createParenthesizedExpression` or the factory supplied by your transformation context instead. */ 7819 const createParen: (expression: Expression) => ParenthesizedExpression; 7820 /** @deprecated Use `factory.updateParenthesizedExpression` or the factory supplied by your transformation context instead. */ 7821 const updateParen: (node: ParenthesizedExpression, expression: Expression) => ParenthesizedExpression; 7822 /** @deprecated Use `factory.createFunctionExpression` or the factory supplied by your transformation context instead. */ 7823 const 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; 7824 /** @deprecated Use `factory.updateFunctionExpression` or the factory supplied by your transformation context instead. */ 7825 const 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; 7826 /** @deprecated Use `factory.createDeleteExpression` or the factory supplied by your transformation context instead. */ 7827 const createDelete: (expression: Expression) => DeleteExpression; 7828 /** @deprecated Use `factory.updateDeleteExpression` or the factory supplied by your transformation context instead. */ 7829 const updateDelete: (node: DeleteExpression, expression: Expression) => DeleteExpression; 7830 /** @deprecated Use `factory.createTypeOfExpression` or the factory supplied by your transformation context instead. */ 7831 const createTypeOf: (expression: Expression) => TypeOfExpression; 7832 /** @deprecated Use `factory.updateTypeOfExpression` or the factory supplied by your transformation context instead. */ 7833 const updateTypeOf: (node: TypeOfExpression, expression: Expression) => TypeOfExpression; 7834 /** @deprecated Use `factory.createVoidExpression` or the factory supplied by your transformation context instead. */ 7835 const createVoid: (expression: Expression) => VoidExpression; 7836 /** @deprecated Use `factory.updateVoidExpression` or the factory supplied by your transformation context instead. */ 7837 const updateVoid: (node: VoidExpression, expression: Expression) => VoidExpression; 7838 /** @deprecated Use `factory.createAwaitExpression` or the factory supplied by your transformation context instead. */ 7839 const createAwait: (expression: Expression) => AwaitExpression; 7840 /** @deprecated Use `factory.updateAwaitExpression` or the factory supplied by your transformation context instead. */ 7841 const updateAwait: (node: AwaitExpression, expression: Expression) => AwaitExpression; 7842 /** @deprecated Use `factory.createPrefixExpression` or the factory supplied by your transformation context instead. */ 7843 const createPrefix: (operator: PrefixUnaryOperator, operand: Expression) => PrefixUnaryExpression; 7844 /** @deprecated Use `factory.updatePrefixExpression` or the factory supplied by your transformation context instead. */ 7845 const updatePrefix: (node: PrefixUnaryExpression, operand: Expression) => PrefixUnaryExpression; 7846 /** @deprecated Use `factory.createPostfixUnaryExpression` or the factory supplied by your transformation context instead. */ 7847 const createPostfix: (operand: Expression, operator: PostfixUnaryOperator) => PostfixUnaryExpression; 7848 /** @deprecated Use `factory.updatePostfixUnaryExpression` or the factory supplied by your transformation context instead. */ 7849 const updatePostfix: (node: PostfixUnaryExpression, operand: Expression) => PostfixUnaryExpression; 7850 /** @deprecated Use `factory.createBinaryExpression` or the factory supplied by your transformation context instead. */ 7851 const createBinary: (left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression) => BinaryExpression; 7852 /** @deprecated Use `factory.updateConditionalExpression` or the factory supplied by your transformation context instead. */ 7853 const updateConditional: (node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression) => ConditionalExpression; 7854 /** @deprecated Use `factory.createTemplateExpression` or the factory supplied by your transformation context instead. */ 7855 const createTemplateExpression: (head: TemplateHead, templateSpans: readonly TemplateSpan[]) => TemplateExpression; 7856 /** @deprecated Use `factory.updateTemplateExpression` or the factory supplied by your transformation context instead. */ 7857 const updateTemplateExpression: (node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]) => TemplateExpression; 7858 /** @deprecated Use `factory.createTemplateHead` or the factory supplied by your transformation context instead. */ 7859 const createTemplateHead: { 7860 (text: string, rawText?: string | undefined, templateFlags?: TokenFlags | undefined): TemplateHead; 7861 (text: string | undefined, rawText: string, templateFlags?: TokenFlags | undefined): TemplateHead; 7862 }; 7863 /** @deprecated Use `factory.createTemplateMiddle` or the factory supplied by your transformation context instead. */ 7864 const createTemplateMiddle: { 7865 (text: string, rawText?: string | undefined, templateFlags?: TokenFlags | undefined): TemplateMiddle; 7866 (text: string | undefined, rawText: string, templateFlags?: TokenFlags | undefined): TemplateMiddle; 7867 }; 7868 /** @deprecated Use `factory.createTemplateTail` or the factory supplied by your transformation context instead. */ 7869 const createTemplateTail: { 7870 (text: string, rawText?: string | undefined, templateFlags?: TokenFlags | undefined): TemplateTail; 7871 (text: string | undefined, rawText: string, templateFlags?: TokenFlags | undefined): TemplateTail; 7872 }; 7873 /** @deprecated Use `factory.createNoSubstitutionTemplateLiteral` or the factory supplied by your transformation context instead. */ 7874 const createNoSubstitutionTemplateLiteral: { 7875 (text: string, rawText?: string | undefined): NoSubstitutionTemplateLiteral; 7876 (text: string | undefined, rawText: string): NoSubstitutionTemplateLiteral; 7877 }; 7878 /** @deprecated Use `factory.updateYieldExpression` or the factory supplied by your transformation context instead. */ 7879 const updateYield: (node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression | undefined) => YieldExpression; 7880 /** @deprecated Use `factory.createSpreadExpression` or the factory supplied by your transformation context instead. */ 7881 const createSpread: (expression: Expression) => SpreadElement; 7882 /** @deprecated Use `factory.updateSpreadExpression` or the factory supplied by your transformation context instead. */ 7883 const updateSpread: (node: SpreadElement, expression: Expression) => SpreadElement; 7884 /** @deprecated Use `factory.createOmittedExpression` or the factory supplied by your transformation context instead. */ 7885 const createOmittedExpression: () => OmittedExpression; 7886 /** @deprecated Use `factory.createAsExpression` or the factory supplied by your transformation context instead. */ 7887 const createAsExpression: (expression: Expression, type: TypeNode) => AsExpression; 7888 /** @deprecated Use `factory.updateAsExpression` or the factory supplied by your transformation context instead. */ 7889 const updateAsExpression: (node: AsExpression, expression: Expression, type: TypeNode) => AsExpression; 7890 /** @deprecated Use `factory.createNonNullExpression` or the factory supplied by your transformation context instead. */ 7891 const createNonNullExpression: (expression: Expression) => NonNullExpression; 7892 /** @deprecated Use `factory.updateNonNullExpression` or the factory supplied by your transformation context instead. */ 7893 const updateNonNullExpression: (node: NonNullExpression, expression: Expression) => NonNullExpression; 7894 /** @deprecated Use `factory.createNonNullChain` or the factory supplied by your transformation context instead. */ 7895 const createNonNullChain: (expression: Expression) => NonNullChain; 7896 /** @deprecated Use `factory.updateNonNullChain` or the factory supplied by your transformation context instead. */ 7897 const updateNonNullChain: (node: NonNullChain, expression: Expression) => NonNullChain; 7898 /** @deprecated Use `factory.createMetaProperty` or the factory supplied by your transformation context instead. */ 7899 const createMetaProperty: (keywordToken: SyntaxKind.ImportKeyword | SyntaxKind.NewKeyword, name: Identifier) => MetaProperty; 7900 /** @deprecated Use `factory.updateMetaProperty` or the factory supplied by your transformation context instead. */ 7901 const updateMetaProperty: (node: MetaProperty, name: Identifier) => MetaProperty; 7902 /** @deprecated Use `factory.createTemplateSpan` or the factory supplied by your transformation context instead. */ 7903 const createTemplateSpan: (expression: Expression, literal: TemplateMiddle | TemplateTail) => TemplateSpan; 7904 /** @deprecated Use `factory.updateTemplateSpan` or the factory supplied by your transformation context instead. */ 7905 const updateTemplateSpan: (node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail) => TemplateSpan; 7906 /** @deprecated Use `factory.createSemicolonClassElement` or the factory supplied by your transformation context instead. */ 7907 const createSemicolonClassElement: () => SemicolonClassElement; 7908 /** @deprecated Use `factory.createBlock` or the factory supplied by your transformation context instead. */ 7909 const createBlock: (statements: readonly Statement[], multiLine?: boolean | undefined) => Block; 7910 /** @deprecated Use `factory.updateBlock` or the factory supplied by your transformation context instead. */ 7911 const updateBlock: (node: Block, statements: readonly Statement[]) => Block; 7912 /** @deprecated Use `factory.createVariableStatement` or the factory supplied by your transformation context instead. */ 7913 const createVariableStatement: (modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList | readonly VariableDeclaration[]) => VariableStatement; 7914 /** @deprecated Use `factory.updateVariableStatement` or the factory supplied by your transformation context instead. */ 7915 const updateVariableStatement: (node: VariableStatement, modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList) => VariableStatement; 7916 /** @deprecated Use `factory.createEmptyStatement` or the factory supplied by your transformation context instead. */ 7917 const createEmptyStatement: () => EmptyStatement; 7918 /** @deprecated Use `factory.createExpressionStatement` or the factory supplied by your transformation context instead. */ 7919 const createExpressionStatement: (expression: Expression) => ExpressionStatement; 7920 /** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */ 7921 const updateExpressionStatement: (node: ExpressionStatement, expression: Expression) => ExpressionStatement; 7922 /** @deprecated Use `factory.createExpressionStatement` or the factory supplied by your transformation context instead. */ 7923 const createStatement: (expression: Expression) => ExpressionStatement; 7924 /** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */ 7925 const updateStatement: (node: ExpressionStatement, expression: Expression) => ExpressionStatement; 7926 /** @deprecated Use `factory.createIfStatement` or the factory supplied by your transformation context instead. */ 7927 const createIf: (expression: Expression, thenStatement: Statement, elseStatement?: Statement | undefined) => IfStatement; 7928 /** @deprecated Use `factory.updateIfStatement` or the factory supplied by your transformation context instead. */ 7929 const updateIf: (node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined) => IfStatement; 7930 /** @deprecated Use `factory.createDoStatement` or the factory supplied by your transformation context instead. */ 7931 const createDo: (statement: Statement, expression: Expression) => DoStatement; 7932 /** @deprecated Use `factory.updateDoStatement` or the factory supplied by your transformation context instead. */ 7933 const updateDo: (node: DoStatement, statement: Statement, expression: Expression) => DoStatement; 7934 /** @deprecated Use `factory.createWhileStatement` or the factory supplied by your transformation context instead. */ 7935 const createWhile: (expression: Expression, statement: Statement) => WhileStatement; 7936 /** @deprecated Use `factory.updateWhileStatement` or the factory supplied by your transformation context instead. */ 7937 const updateWhile: (node: WhileStatement, expression: Expression, statement: Statement) => WhileStatement; 7938 /** @deprecated Use `factory.createForStatement` or the factory supplied by your transformation context instead. */ 7939 const createFor: (initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement) => ForStatement; 7940 /** @deprecated Use `factory.updateForStatement` or the factory supplied by your transformation context instead. */ 7941 const updateFor: (node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement) => ForStatement; 7942 /** @deprecated Use `factory.createForInStatement` or the factory supplied by your transformation context instead. */ 7943 const createForIn: (initializer: ForInitializer, expression: Expression, statement: Statement) => ForInStatement; 7944 /** @deprecated Use `factory.updateForInStatement` or the factory supplied by your transformation context instead. */ 7945 const updateForIn: (node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement) => ForInStatement; 7946 /** @deprecated Use `factory.createForOfStatement` or the factory supplied by your transformation context instead. */ 7947 const createForOf: (awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement) => ForOfStatement; 7948 /** @deprecated Use `factory.updateForOfStatement` or the factory supplied by your transformation context instead. */ 7949 const updateForOf: (node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement) => ForOfStatement; 7950 /** @deprecated Use `factory.createContinueStatement` or the factory supplied by your transformation context instead. */ 7951 const createContinue: (label?: string | Identifier | undefined) => ContinueStatement; 7952 /** @deprecated Use `factory.updateContinueStatement` or the factory supplied by your transformation context instead. */ 7953 const updateContinue: (node: ContinueStatement, label: Identifier | undefined) => ContinueStatement; 7954 /** @deprecated Use `factory.createBreakStatement` or the factory supplied by your transformation context instead. */ 7955 const createBreak: (label?: string | Identifier | undefined) => BreakStatement; 7956 /** @deprecated Use `factory.updateBreakStatement` or the factory supplied by your transformation context instead. */ 7957 const updateBreak: (node: BreakStatement, label: Identifier | undefined) => BreakStatement; 7958 /** @deprecated Use `factory.createReturnStatement` or the factory supplied by your transformation context instead. */ 7959 const createReturn: (expression?: Expression | undefined) => ReturnStatement; 7960 /** @deprecated Use `factory.updateReturnStatement` or the factory supplied by your transformation context instead. */ 7961 const updateReturn: (node: ReturnStatement, expression: Expression | undefined) => ReturnStatement; 7962 /** @deprecated Use `factory.createWithStatement` or the factory supplied by your transformation context instead. */ 7963 const createWith: (expression: Expression, statement: Statement) => WithStatement; 7964 /** @deprecated Use `factory.updateWithStatement` or the factory supplied by your transformation context instead. */ 7965 const updateWith: (node: WithStatement, expression: Expression, statement: Statement) => WithStatement; 7966 /** @deprecated Use `factory.createSwitchStatement` or the factory supplied by your transformation context instead. */ 7967 const createSwitch: (expression: Expression, caseBlock: CaseBlock) => SwitchStatement; 7968 /** @deprecated Use `factory.updateSwitchStatement` or the factory supplied by your transformation context instead. */ 7969 const updateSwitch: (node: SwitchStatement, expression: Expression, caseBlock: CaseBlock) => SwitchStatement; 7970 /** @deprecated Use `factory.createLabelStatement` or the factory supplied by your transformation context instead. */ 7971 const createLabel: (label: string | Identifier, statement: Statement) => LabeledStatement; 7972 /** @deprecated Use `factory.updateLabelStatement` or the factory supplied by your transformation context instead. */ 7973 const updateLabel: (node: LabeledStatement, label: Identifier, statement: Statement) => LabeledStatement; 7974 /** @deprecated Use `factory.createThrowStatement` or the factory supplied by your transformation context instead. */ 7975 const createThrow: (expression: Expression) => ThrowStatement; 7976 /** @deprecated Use `factory.updateThrowStatement` or the factory supplied by your transformation context instead. */ 7977 const updateThrow: (node: ThrowStatement, expression: Expression) => ThrowStatement; 7978 /** @deprecated Use `factory.createTryStatement` or the factory supplied by your transformation context instead. */ 7979 const createTry: (tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined) => TryStatement; 7980 /** @deprecated Use `factory.updateTryStatement` or the factory supplied by your transformation context instead. */ 7981 const updateTry: (node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined) => TryStatement; 7982 /** @deprecated Use `factory.createDebuggerStatement` or the factory supplied by your transformation context instead. */ 7983 const createDebuggerStatement: () => DebuggerStatement; 7984 /** @deprecated Use `factory.createVariableDeclarationList` or the factory supplied by your transformation context instead. */ 7985 const createVariableDeclarationList: (declarations: readonly VariableDeclaration[], flags?: NodeFlags | undefined) => VariableDeclarationList; 7986 /** @deprecated Use `factory.updateVariableDeclarationList` or the factory supplied by your transformation context instead. */ 7987 const updateVariableDeclarationList: (node: VariableDeclarationList, declarations: readonly VariableDeclaration[]) => VariableDeclarationList; 7988 /** @deprecated Use `factory.createFunctionDeclaration` or the factory supplied by your transformation context instead. */ 7989 const createFunctionDeclaration: { 7990 (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; 7991 (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; 7992 }; 7993 /** @deprecated Use `factory.updateFunctionDeclaration` or the factory supplied by your transformation context instead. */ 7994 const updateFunctionDeclaration: { 7995 (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; 7996 (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; 7997 }; 7998 /** @deprecated Use `factory.createClassDeclaration` or the factory supplied by your transformation context instead. */ 7999 const createClassDeclaration: { 8000 (modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; 8001 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; 8002 }; 8003 /** @deprecated Use `factory.updateClassDeclaration` or the factory supplied by your transformation context instead. */ 8004 const updateClassDeclaration: { 8005 (node: ClassDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; 8006 (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; 8007 }; 8008 /** @deprecated Use `factory.createInterfaceDeclaration` or the factory supplied by your transformation context instead. */ 8009 const createInterfaceDeclaration: { 8010 (modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 8011 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 8012 }; 8013 /** @deprecated Use `factory.updateInterfaceDeclaration` or the factory supplied by your transformation context instead. */ 8014 const updateInterfaceDeclaration: { 8015 (node: InterfaceDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 8016 (node: InterfaceDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 8017 }; 8018 /** @deprecated Use `factory.createTypeAliasDeclaration` or the factory supplied by your transformation context instead. */ 8019 const createTypeAliasDeclaration: { 8020 (modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 8021 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 8022 }; 8023 /** @deprecated Use `factory.updateTypeAliasDeclaration` or the factory supplied by your transformation context instead. */ 8024 const updateTypeAliasDeclaration: { 8025 (node: TypeAliasDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 8026 (node: TypeAliasDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 8027 }; 8028 /** @deprecated Use `factory.createEnumDeclaration` or the factory supplied by your transformation context instead. */ 8029 const createEnumDeclaration: { 8030 (modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration; 8031 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration; 8032 }; 8033 /** @deprecated Use `factory.updateEnumDeclaration` or the factory supplied by your transformation context instead. */ 8034 const updateEnumDeclaration: { 8035 (node: EnumDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; 8036 (node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; 8037 }; 8038 /** @deprecated Use `factory.createModuleDeclaration` or the factory supplied by your transformation context instead. */ 8039 const createModuleDeclaration: { 8040 (modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags | undefined): ModuleDeclaration; 8041 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags | undefined): ModuleDeclaration; 8042 }; 8043 /** @deprecated Use `factory.updateModuleDeclaration` or the factory supplied by your transformation context instead. */ 8044 const updateModuleDeclaration: { 8045 (node: ModuleDeclaration, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration; 8046 (node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration; 8047 }; 8048 /** @deprecated Use `factory.createModuleBlock` or the factory supplied by your transformation context instead. */ 8049 const createModuleBlock: (statements: readonly Statement[]) => ModuleBlock; 8050 /** @deprecated Use `factory.updateModuleBlock` or the factory supplied by your transformation context instead. */ 8051 const updateModuleBlock: (node: ModuleBlock, statements: readonly Statement[]) => ModuleBlock; 8052 /** @deprecated Use `factory.createCaseBlock` or the factory supplied by your transformation context instead. */ 8053 const createCaseBlock: (clauses: readonly CaseOrDefaultClause[]) => CaseBlock; 8054 /** @deprecated Use `factory.updateCaseBlock` or the factory supplied by your transformation context instead. */ 8055 const updateCaseBlock: (node: CaseBlock, clauses: readonly CaseOrDefaultClause[]) => CaseBlock; 8056 /** @deprecated Use `factory.createNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */ 8057 const createNamespaceExportDeclaration: (name: string | Identifier) => NamespaceExportDeclaration; 8058 /** @deprecated Use `factory.updateNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */ 8059 const updateNamespaceExportDeclaration: (node: NamespaceExportDeclaration, name: Identifier) => NamespaceExportDeclaration; 8060 /** @deprecated Use `factory.createImportEqualsDeclaration` or the factory supplied by your transformation context instead. */ 8061 const createImportEqualsDeclaration: { 8062 (modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 8063 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 8064 }; 8065 /** @deprecated Use `factory.updateImportEqualsDeclaration` or the factory supplied by your transformation context instead. */ 8066 const updateImportEqualsDeclaration: { 8067 (node: ImportEqualsDeclaration, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 8068 (node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 8069 }; 8070 /** @deprecated Use `factory.createImportDeclaration` or the factory supplied by your transformation context instead. */ 8071 const createImportDeclaration: { 8072 (modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause | undefined): ImportDeclaration; 8073 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause | undefined): ImportDeclaration; 8074 }; 8075 /** @deprecated Use `factory.updateImportDeclaration` or the factory supplied by your transformation context instead. */ 8076 const updateImportDeclaration: { 8077 (node: ImportDeclaration, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration; 8078 (node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration; 8079 }; 8080 /** @deprecated Use `factory.createNamespaceImport` or the factory supplied by your transformation context instead. */ 8081 const createNamespaceImport: (name: Identifier) => NamespaceImport; 8082 /** @deprecated Use `factory.updateNamespaceImport` or the factory supplied by your transformation context instead. */ 8083 const updateNamespaceImport: (node: NamespaceImport, name: Identifier) => NamespaceImport; 8084 /** @deprecated Use `factory.createNamedImports` or the factory supplied by your transformation context instead. */ 8085 const createNamedImports: (elements: readonly ImportSpecifier[]) => NamedImports; 8086 /** @deprecated Use `factory.updateNamedImports` or the factory supplied by your transformation context instead. */ 8087 const updateNamedImports: (node: NamedImports, elements: readonly ImportSpecifier[]) => NamedImports; 8088 /** @deprecated Use `factory.createImportSpecifier` or the factory supplied by your transformation context instead. */ 8089 const createImportSpecifier: (isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier) => ImportSpecifier; 8090 /** @deprecated Use `factory.updateImportSpecifier` or the factory supplied by your transformation context instead. */ 8091 const updateImportSpecifier: (node: ImportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier) => ImportSpecifier; 8092 /** @deprecated Use `factory.createExportAssignment` or the factory supplied by your transformation context instead. */ 8093 const createExportAssignment: { 8094 (modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment; 8095 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment; 8096 }; 8097 /** @deprecated Use `factory.updateExportAssignment` or the factory supplied by your transformation context instead. */ 8098 const updateExportAssignment: { 8099 (node: ExportAssignment, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment; 8100 (node: ExportAssignment, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment; 8101 }; 8102 /** @deprecated Use `factory.createNamedExports` or the factory supplied by your transformation context instead. */ 8103 const createNamedExports: (elements: readonly ExportSpecifier[]) => NamedExports; 8104 /** @deprecated Use `factory.updateNamedExports` or the factory supplied by your transformation context instead. */ 8105 const updateNamedExports: (node: NamedExports, elements: readonly ExportSpecifier[]) => NamedExports; 8106 /** @deprecated Use `factory.createExportSpecifier` or the factory supplied by your transformation context instead. */ 8107 const createExportSpecifier: (isTypeOnly: boolean, propertyName: string | Identifier | undefined, name: string | Identifier) => ExportSpecifier; 8108 /** @deprecated Use `factory.updateExportSpecifier` or the factory supplied by your transformation context instead. */ 8109 const updateExportSpecifier: (node: ExportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier) => ExportSpecifier; 8110 /** @deprecated Use `factory.createExternalModuleReference` or the factory supplied by your transformation context instead. */ 8111 const createExternalModuleReference: (expression: Expression) => ExternalModuleReference; 8112 /** @deprecated Use `factory.updateExternalModuleReference` or the factory supplied by your transformation context instead. */ 8113 const updateExternalModuleReference: (node: ExternalModuleReference, expression: Expression) => ExternalModuleReference; 8114 /** @deprecated Use `factory.createJSDocTypeExpression` or the factory supplied by your transformation context instead. */ 8115 const createJSDocTypeExpression: (type: TypeNode) => JSDocTypeExpression; 8116 /** @deprecated Use `factory.createJSDocTypeTag` or the factory supplied by your transformation context instead. */ 8117 const createJSDocTypeTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocTypeTag; 8118 /** @deprecated Use `factory.createJSDocReturnTag` or the factory supplied by your transformation context instead. */ 8119 const createJSDocReturnTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocReturnTag; 8120 /** @deprecated Use `factory.createJSDocThisTag` or the factory supplied by your transformation context instead. */ 8121 const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocThisTag; 8122 /** @deprecated Use `factory.createJSDocComment` or the factory supplied by your transformation context instead. */ 8123 const createJSDocComment: (comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined) => JSDoc; 8124 /** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */ 8125 const createJSDocParameterTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocParameterTag; 8126 /** @deprecated Use `factory.createJSDocClassTag` or the factory supplied by your transformation context instead. */ 8127 const createJSDocClassTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocClassTag; 8128 /** @deprecated Use `factory.createJSDocAugmentsTag` or the factory supplied by your transformation context instead. */ 8129 const createJSDocAugmentsTag: (tagName: Identifier | undefined, className: ExpressionWithTypeArguments & { 8130 readonly expression: Identifier | PropertyAccessEntityNameExpression; 8131 }, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocAugmentsTag; 8132 /** @deprecated Use `factory.createJSDocEnumTag` or the factory supplied by your transformation context instead. */ 8133 const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocEnumTag; 8134 /** @deprecated Use `factory.createJSDocTemplateTag` or the factory supplied by your transformation context instead. */ 8135 const createJSDocTemplateTag: (tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocComment> | undefined) => JSDocTemplateTag; 8136 /** @deprecated Use `factory.createJSDocTypedefTag` or the factory supplied by your transformation context instead. */ 8137 const createJSDocTypedefTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeLiteral | JSDocTypeExpression | undefined, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocTypedefTag; 8138 /** @deprecated Use `factory.createJSDocCallbackTag` or the factory supplied by your transformation context instead. */ 8139 const createJSDocCallbackTag: (tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocCallbackTag; 8140 /** @deprecated Use `factory.createJSDocSignature` or the factory supplied by your transformation context instead. */ 8141 const createJSDocSignature: (typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag | undefined) => JSDocSignature; 8142 /** @deprecated Use `factory.createJSDocPropertyTag` or the factory supplied by your transformation context instead. */ 8143 const createJSDocPropertyTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocPropertyTag; 8144 /** @deprecated Use `factory.createJSDocTypeLiteral` or the factory supplied by your transformation context instead. */ 8145 const createJSDocTypeLiteral: (jsDocPropertyTags?: readonly JSDocPropertyLikeTag[] | undefined, isArrayType?: boolean | undefined) => JSDocTypeLiteral; 8146 /** @deprecated Use `factory.createJSDocImplementsTag` or the factory supplied by your transformation context instead. */ 8147 const createJSDocImplementsTag: (tagName: Identifier | undefined, className: ExpressionWithTypeArguments & { 8148 readonly expression: Identifier | PropertyAccessEntityNameExpression; 8149 }, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocImplementsTag; 8150 /** @deprecated Use `factory.createJSDocAuthorTag` or the factory supplied by your transformation context instead. */ 8151 const createJSDocAuthorTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocAuthorTag; 8152 /** @deprecated Use `factory.createJSDocPublicTag` or the factory supplied by your transformation context instead. */ 8153 const createJSDocPublicTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocPublicTag; 8154 /** @deprecated Use `factory.createJSDocPrivateTag` or the factory supplied by your transformation context instead. */ 8155 const createJSDocPrivateTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocPrivateTag; 8156 /** @deprecated Use `factory.createJSDocProtectedTag` or the factory supplied by your transformation context instead. */ 8157 const createJSDocProtectedTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocProtectedTag; 8158 /** @deprecated Use `factory.createJSDocReadonlyTag` or the factory supplied by your transformation context instead. */ 8159 const createJSDocReadonlyTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocReadonlyTag; 8160 /** @deprecated Use `factory.createJSDocUnknownTag` or the factory supplied by your transformation context instead. */ 8161 const createJSDocTag: (tagName: Identifier, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocUnknownTag; 8162 /** @deprecated Use `factory.createJsxElement` or the factory supplied by your transformation context instead. */ 8163 const createJsxElement: (openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement) => JsxElement; 8164 /** @deprecated Use `factory.updateJsxElement` or the factory supplied by your transformation context instead. */ 8165 const updateJsxElement: (node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement) => JsxElement; 8166 /** @deprecated Use `factory.createJsxSelfClosingElement` or the factory supplied by your transformation context instead. */ 8167 const createJsxSelfClosingElement: (tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxSelfClosingElement; 8168 /** @deprecated Use `factory.updateJsxSelfClosingElement` or the factory supplied by your transformation context instead. */ 8169 const updateJsxSelfClosingElement: (node: JsxSelfClosingElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxSelfClosingElement; 8170 /** @deprecated Use `factory.createJsxOpeningElement` or the factory supplied by your transformation context instead. */ 8171 const createJsxOpeningElement: (tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxOpeningElement; 8172 /** @deprecated Use `factory.updateJsxOpeningElement` or the factory supplied by your transformation context instead. */ 8173 const updateJsxOpeningElement: (node: JsxOpeningElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxOpeningElement; 8174 /** @deprecated Use `factory.createJsxClosingElement` or the factory supplied by your transformation context instead. */ 8175 const createJsxClosingElement: (tagName: JsxTagNameExpression) => JsxClosingElement; 8176 /** @deprecated Use `factory.updateJsxClosingElement` or the factory supplied by your transformation context instead. */ 8177 const updateJsxClosingElement: (node: JsxClosingElement, tagName: JsxTagNameExpression) => JsxClosingElement; 8178 /** @deprecated Use `factory.createJsxFragment` or the factory supplied by your transformation context instead. */ 8179 const createJsxFragment: (openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) => JsxFragment; 8180 /** @deprecated Use `factory.createJsxText` or the factory supplied by your transformation context instead. */ 8181 const createJsxText: (text: string, containsOnlyTriviaWhiteSpaces?: boolean | undefined) => JsxText; 8182 /** @deprecated Use `factory.updateJsxText` or the factory supplied by your transformation context instead. */ 8183 const updateJsxText: (node: JsxText, text: string, containsOnlyTriviaWhiteSpaces?: boolean | undefined) => JsxText; 8184 /** @deprecated Use `factory.createJsxOpeningFragment` or the factory supplied by your transformation context instead. */ 8185 const createJsxOpeningFragment: () => JsxOpeningFragment; 8186 /** @deprecated Use `factory.createJsxJsxClosingFragment` or the factory supplied by your transformation context instead. */ 8187 const createJsxJsxClosingFragment: () => JsxClosingFragment; 8188 /** @deprecated Use `factory.updateJsxFragment` or the factory supplied by your transformation context instead. */ 8189 const updateJsxFragment: (node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) => JsxFragment; 8190 /** @deprecated Use `factory.createJsxAttribute` or the factory supplied by your transformation context instead. */ 8191 const createJsxAttribute: (name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute; 8192 /** @deprecated Use `factory.updateJsxAttribute` or the factory supplied by your transformation context instead. */ 8193 const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute; 8194 /** @deprecated Use `factory.createJsxAttributes` or the factory supplied by your transformation context instead. */ 8195 const createJsxAttributes: (properties: readonly JsxAttributeLike[]) => JsxAttributes; 8196 /** @deprecated Use `factory.updateJsxAttributes` or the factory supplied by your transformation context instead. */ 8197 const updateJsxAttributes: (node: JsxAttributes, properties: readonly JsxAttributeLike[]) => JsxAttributes; 8198 /** @deprecated Use `factory.createJsxSpreadAttribute` or the factory supplied by your transformation context instead. */ 8199 const createJsxSpreadAttribute: (expression: Expression) => JsxSpreadAttribute; 8200 /** @deprecated Use `factory.updateJsxSpreadAttribute` or the factory supplied by your transformation context instead. */ 8201 const updateJsxSpreadAttribute: (node: JsxSpreadAttribute, expression: Expression) => JsxSpreadAttribute; 8202 /** @deprecated Use `factory.createJsxExpression` or the factory supplied by your transformation context instead. */ 8203 const createJsxExpression: (dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined) => JsxExpression; 8204 /** @deprecated Use `factory.updateJsxExpression` or the factory supplied by your transformation context instead. */ 8205 const updateJsxExpression: (node: JsxExpression, expression: Expression | undefined) => JsxExpression; 8206 /** @deprecated Use `factory.createCaseClause` or the factory supplied by your transformation context instead. */ 8207 const createCaseClause: (expression: Expression, statements: readonly Statement[]) => CaseClause; 8208 /** @deprecated Use `factory.updateCaseClause` or the factory supplied by your transformation context instead. */ 8209 const updateCaseClause: (node: CaseClause, expression: Expression, statements: readonly Statement[]) => CaseClause; 8210 /** @deprecated Use `factory.createDefaultClause` or the factory supplied by your transformation context instead. */ 8211 const createDefaultClause: (statements: readonly Statement[]) => DefaultClause; 8212 /** @deprecated Use `factory.updateDefaultClause` or the factory supplied by your transformation context instead. */ 8213 const updateDefaultClause: (node: DefaultClause, statements: readonly Statement[]) => DefaultClause; 8214 /** @deprecated Use `factory.createHeritageClause` or the factory supplied by your transformation context instead. */ 8215 const createHeritageClause: (token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword, types: readonly ExpressionWithTypeArguments[]) => HeritageClause; 8216 /** @deprecated Use `factory.updateHeritageClause` or the factory supplied by your transformation context instead. */ 8217 const updateHeritageClause: (node: HeritageClause, types: readonly ExpressionWithTypeArguments[]) => HeritageClause; 8218 /** @deprecated Use `factory.createCatchClause` or the factory supplied by your transformation context instead. */ 8219 const createCatchClause: (variableDeclaration: string | VariableDeclaration | BindingName | undefined, block: Block) => CatchClause; 8220 /** @deprecated Use `factory.updateCatchClause` or the factory supplied by your transformation context instead. */ 8221 const updateCatchClause: (node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block) => CatchClause; 8222 /** @deprecated Use `factory.createPropertyAssignment` or the factory supplied by your transformation context instead. */ 8223 const createPropertyAssignment: (name: string | PropertyName, initializer: Expression) => PropertyAssignment; 8224 /** @deprecated Use `factory.updatePropertyAssignment` or the factory supplied by your transformation context instead. */ 8225 const updatePropertyAssignment: (node: PropertyAssignment, name: PropertyName, initializer: Expression) => PropertyAssignment; 8226 /** @deprecated Use `factory.createShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */ 8227 const createShorthandPropertyAssignment: (name: string | Identifier, objectAssignmentInitializer?: Expression | undefined) => ShorthandPropertyAssignment; 8228 /** @deprecated Use `factory.updateShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */ 8229 const updateShorthandPropertyAssignment: (node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression | undefined) => ShorthandPropertyAssignment; 8230 /** @deprecated Use `factory.createSpreadAssignment` or the factory supplied by your transformation context instead. */ 8231 const createSpreadAssignment: (expression: Expression) => SpreadAssignment; 8232 /** @deprecated Use `factory.updateSpreadAssignment` or the factory supplied by your transformation context instead. */ 8233 const updateSpreadAssignment: (node: SpreadAssignment, expression: Expression) => SpreadAssignment; 8234 /** @deprecated Use `factory.createEnumMember` or the factory supplied by your transformation context instead. */ 8235 const createEnumMember: (name: string | PropertyName, initializer?: Expression | undefined) => EnumMember; 8236 /** @deprecated Use `factory.updateEnumMember` or the factory supplied by your transformation context instead. */ 8237 const updateEnumMember: (node: EnumMember, name: PropertyName, initializer: Expression | undefined) => EnumMember; 8238 /** @deprecated Use `factory.updateSourceFile` or the factory supplied by your transformation context instead. */ 8239 const updateSourceFileNode: (node: SourceFile, statements: readonly Statement[], isDeclarationFile?: boolean | undefined, referencedFiles?: readonly FileReference[] | undefined, typeReferences?: readonly FileReference[] | undefined, hasNoDefaultLib?: boolean | undefined, libReferences?: readonly FileReference[] | undefined) => SourceFile; 8240 /** @deprecated Use `factory.createNotEmittedStatement` or the factory supplied by your transformation context instead. */ 8241 const createNotEmittedStatement: (original: Node) => NotEmittedStatement; 8242 /** @deprecated Use `factory.createPartiallyEmittedExpression` or the factory supplied by your transformation context instead. */ 8243 const createPartiallyEmittedExpression: (expression: Expression, original?: Node | undefined) => PartiallyEmittedExpression; 8244 /** @deprecated Use `factory.updatePartiallyEmittedExpression` or the factory supplied by your transformation context instead. */ 8245 const updatePartiallyEmittedExpression: (node: PartiallyEmittedExpression, expression: Expression) => PartiallyEmittedExpression; 8246 /** @deprecated Use `factory.createCommaListExpression` or the factory supplied by your transformation context instead. */ 8247 const createCommaList: (elements: readonly Expression[]) => CommaListExpression; 8248 /** @deprecated Use `factory.updateCommaListExpression` or the factory supplied by your transformation context instead. */ 8249 const updateCommaList: (node: CommaListExpression, elements: readonly Expression[]) => CommaListExpression; 8250 /** @deprecated Use `factory.createBundle` or the factory supplied by your transformation context instead. */ 8251 const createBundle: (sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[] | undefined) => Bundle; 8252 /** @deprecated Use `factory.updateBundle` or the factory supplied by your transformation context instead. */ 8253 const updateBundle: (node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[] | undefined) => Bundle; 8254 /** @deprecated Use `factory.createImmediatelyInvokedFunctionExpression` or the factory supplied by your transformation context instead. */ 8255 const createImmediatelyInvokedFunctionExpression: { 8256 (statements: readonly Statement[]): CallExpression; 8257 (statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; 8258 }; 8259 /** @deprecated Use `factory.createImmediatelyInvokedArrowFunction` or the factory supplied by your transformation context instead. */ 8260 const createImmediatelyInvokedArrowFunction: { 8261 (statements: readonly Statement[]): CallExpression; 8262 (statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; 8263 }; 8264 /** @deprecated Use `factory.createVoidZero` or the factory supplied by your transformation context instead. */ 8265 const createVoidZero: () => VoidExpression; 8266 /** @deprecated Use `factory.createExportDefault` or the factory supplied by your transformation context instead. */ 8267 const createExportDefault: (expression: Expression) => ExportAssignment; 8268 /** @deprecated Use `factory.createExternalModuleExport` or the factory supplied by your transformation context instead. */ 8269 const createExternalModuleExport: (exportName: Identifier) => ExportDeclaration; 8270 /** @deprecated Use `factory.createNamespaceExport` or the factory supplied by your transformation context instead. */ 8271 const createNamespaceExport: (name: Identifier) => NamespaceExport; 8272 /** @deprecated Use `factory.updateNamespaceExport` or the factory supplied by your transformation context instead. */ 8273 const updateNamespaceExport: (node: NamespaceExport, name: Identifier) => NamespaceExport; 8274 /** @deprecated Use `factory.createToken` or the factory supplied by your transformation context instead. */ 8275 const createToken: <TKind extends SyntaxKind>(kind: TKind) => Token<TKind>; 8276 /** @deprecated Use `factory.createIdentifier` or the factory supplied by your transformation context instead. */ 8277 const createIdentifier: (text: string) => Identifier; 8278 /** @deprecated Use `factory.createTempVariable` or the factory supplied by your transformation context instead. */ 8279 const createTempVariable: (recordTempVariable: ((node: Identifier) => void) | undefined) => Identifier; 8280 /** @deprecated Use `factory.getGeneratedNameForNode` or the factory supplied by your transformation context instead. */ 8281 const getGeneratedNameForNode: (node: Node | undefined) => Identifier; 8282 /** @deprecated Use `factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic)` or the factory supplied by your transformation context instead. */ 8283 const createOptimisticUniqueName: (text: string) => Identifier; 8284 /** @deprecated Use `factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel)` or the factory supplied by your transformation context instead. */ 8285 const createFileLevelUniqueName: (text: string) => Identifier; 8286 /** @deprecated Use `factory.createIndexSignature` or the factory supplied by your transformation context instead. */ 8287 const createIndexSignature: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => IndexSignatureDeclaration; 8288 /** @deprecated Use `factory.createTypePredicateNode` or the factory supplied by your transformation context instead. */ 8289 const createTypePredicateNode: (parameterName: Identifier | ThisTypeNode | string, type: TypeNode) => TypePredicateNode; 8290 /** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */ 8291 const updateTypePredicateNode: (node: TypePredicateNode, parameterName: Identifier | ThisTypeNode, type: TypeNode) => TypePredicateNode; 8292 /** @deprecated Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead. */ 8293 const createLiteral: { 8294 (value: string | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): StringLiteral; 8295 (value: number | PseudoBigInt): NumericLiteral; 8296 (value: boolean): BooleanLiteral; 8297 (value: string | number | PseudoBigInt | boolean): PrimaryExpression; 8298 }; 8299 /** @deprecated Use `factory.createMethodSignature` or the factory supplied by your transformation context instead. */ 8300 const createMethodSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined) => MethodSignature; 8301 /** @deprecated Use `factory.updateMethodSignature` or the factory supplied by your transformation context instead. */ 8302 const updateMethodSignature: (node: MethodSignature, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined, name: PropertyName, questionToken: QuestionToken | undefined) => MethodSignature; 8303 /** @deprecated Use `factory.createTypeOperatorNode` or the factory supplied by your transformation context instead. */ 8304 const createTypeOperatorNode: { 8305 (type: TypeNode): TypeOperatorNode; 8306 (operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode; 8307 }; 8308 /** @deprecated Use `factory.createTaggedTemplate` or the factory supplied by your transformation context instead. */ 8309 const createTaggedTemplate: { 8310 (tag: Expression, template: TemplateLiteral): TaggedTemplateExpression; 8311 (tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; 8312 }; 8313 /** @deprecated Use `factory.updateTaggedTemplate` or the factory supplied by your transformation context instead. */ 8314 const updateTaggedTemplate: { 8315 (node: TaggedTemplateExpression, tag: Expression, template: TemplateLiteral): TaggedTemplateExpression; 8316 (node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; 8317 }; 8318 /** @deprecated Use `factory.updateBinary` or the factory supplied by your transformation context instead. */ 8319 const updateBinary: (node: BinaryExpression, left: Expression, right: Expression, operator?: BinaryOperator | BinaryOperatorToken) => BinaryExpression; 8320 /** @deprecated Use `factory.createConditional` or the factory supplied by your transformation context instead. */ 8321 const createConditional: { 8322 (condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression; 8323 (condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression; 8324 }; 8325 /** @deprecated Use `factory.createYield` or the factory supplied by your transformation context instead. */ 8326 const createYield: { 8327 (expression?: Expression | undefined): YieldExpression; 8328 (asteriskToken: AsteriskToken | undefined, expression: Expression): YieldExpression; 8329 }; 8330 /** @deprecated Use `factory.createClassExpression` or the factory supplied by your transformation context instead. */ 8331 const createClassExpression: (modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassExpression; 8332 /** @deprecated Use `factory.updateClassExpression` or the factory supplied by your transformation context instead. */ 8333 const updateClassExpression: (node: ClassExpression, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassExpression; 8334 /** @deprecated Use `factory.createPropertySignature` or the factory supplied by your transformation context instead. */ 8335 const createPropertySignature: (modifiers: readonly Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer?: Expression | undefined) => PropertySignature; 8336 /** @deprecated Use `factory.updatePropertySignature` or the factory supplied by your transformation context instead. */ 8337 const updatePropertySignature: (node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => PropertySignature; 8338 /** @deprecated Use `factory.createExpressionWithTypeArguments` or the factory supplied by your transformation context instead. */ 8339 const createExpressionWithTypeArguments: (typeArguments: readonly TypeNode[] | undefined, expression: Expression) => ExpressionWithTypeArguments; 8340 /** @deprecated Use `factory.updateExpressionWithTypeArguments` or the factory supplied by your transformation context instead. */ 8341 const updateExpressionWithTypeArguments: (node: ExpressionWithTypeArguments, typeArguments: readonly TypeNode[] | undefined, expression: Expression) => ExpressionWithTypeArguments; 8342 /** @deprecated Use `factory.createArrowFunction` or the factory supplied by your transformation context instead. */ 8343 const createArrowFunction: { 8344 (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction; 8345 (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction; 8346 }; 8347 /** @deprecated Use `factory.updateArrowFunction` or the factory supplied by your transformation context instead. */ 8348 const updateArrowFunction: { 8349 (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction; 8350 (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction; 8351 }; 8352 /** @deprecated Use `factory.createVariableDeclaration` or the factory supplied by your transformation context instead. */ 8353 const createVariableDeclaration: { 8354 (name: string | BindingName, type?: TypeNode | undefined, initializer?: Expression | undefined): VariableDeclaration; 8355 (name: string | BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; 8356 }; 8357 /** @deprecated Use `factory.updateVariableDeclaration` or the factory supplied by your transformation context instead. */ 8358 const updateVariableDeclaration: { 8359 (node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; 8360 (node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; 8361 }; 8362 /** @deprecated Use `factory.createImportClause` or the factory supplied by your transformation context instead. */ 8363 const createImportClause: (name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly?: any) => ImportClause; 8364 /** @deprecated Use `factory.updateImportClause` or the factory supplied by your transformation context instead. */ 8365 const updateImportClause: (node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly: boolean) => ImportClause; 8366 /** @deprecated Use `factory.createExportDeclaration` or the factory supplied by your transformation context instead. */ 8367 const createExportDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression | undefined, isTypeOnly?: any) => ExportDeclaration; 8368 /** @deprecated Use `factory.updateExportDeclaration` or the factory supplied by your transformation context instead. */ 8369 const updateExportDeclaration: (node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, isTypeOnly: boolean) => ExportDeclaration; 8370 /** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */ 8371 const createJSDocParamTag: (name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocParameterTag; 8372 /** @deprecated Use `factory.createComma` or the factory supplied by your transformation context instead. */ 8373 const createComma: (left: Expression, right: Expression) => Expression; 8374 /** @deprecated Use `factory.createLessThan` or the factory supplied by your transformation context instead. */ 8375 const createLessThan: (left: Expression, right: Expression) => Expression; 8376 /** @deprecated Use `factory.createAssignment` or the factory supplied by your transformation context instead. */ 8377 const createAssignment: (left: Expression, right: Expression) => BinaryExpression; 8378 /** @deprecated Use `factory.createStrictEquality` or the factory supplied by your transformation context instead. */ 8379 const createStrictEquality: (left: Expression, right: Expression) => BinaryExpression; 8380 /** @deprecated Use `factory.createStrictInequality` or the factory supplied by your transformation context instead. */ 8381 const createStrictInequality: (left: Expression, right: Expression) => BinaryExpression; 8382 /** @deprecated Use `factory.createAdd` or the factory supplied by your transformation context instead. */ 8383 const createAdd: (left: Expression, right: Expression) => BinaryExpression; 8384 /** @deprecated Use `factory.createSubtract` or the factory supplied by your transformation context instead. */ 8385 const createSubtract: (left: Expression, right: Expression) => BinaryExpression; 8386 /** @deprecated Use `factory.createLogicalAnd` or the factory supplied by your transformation context instead. */ 8387 const createLogicalAnd: (left: Expression, right: Expression) => BinaryExpression; 8388 /** @deprecated Use `factory.createLogicalOr` or the factory supplied by your transformation context instead. */ 8389 const createLogicalOr: (left: Expression, right: Expression) => BinaryExpression; 8390 /** @deprecated Use `factory.createPostfixIncrement` or the factory supplied by your transformation context instead. */ 8391 const createPostfixIncrement: (operand: Expression) => PostfixUnaryExpression; 8392 /** @deprecated Use `factory.createLogicalNot` or the factory supplied by your transformation context instead. */ 8393 const createLogicalNot: (operand: Expression) => PrefixUnaryExpression; 8394 /** @deprecated Use an appropriate `factory` method instead. */ 8395 const createNode: (kind: SyntaxKind, pos?: any, end?: any) => Node; 8396 /** 8397 * Creates a shallow, memberwise clone of a node ~for mutation~ with its `pos`, `end`, and `parent` set. 8398 * 8399 * NOTE: It is unsafe to change any properties of a `Node` that relate to its AST children, as those changes won't be 8400 * captured with respect to transformations. 8401 * 8402 * @deprecated Use an appropriate `factory.update...` method instead, use `setCommentRange` or `setSourceMapRange`, and avoid setting `parent`. 8403 */ 8404 const getMutableClone: <T extends Node>(node: T) => T; 8405} 8406declare namespace ts { 8407 /** @deprecated Use `isTypeAssertionExpression` instead. */ 8408 const isTypeAssertion: (node: Node) => node is TypeAssertion; 8409} 8410declare namespace ts { 8411 /** 8412 * @deprecated Use `ts.ReadonlyESMap<K, V>` instead. 8413 */ 8414 interface ReadonlyMap<T> extends ReadonlyESMap<string, T> { 8415 } 8416 /** 8417 * @deprecated Use `ts.ESMap<K, V>` instead. 8418 */ 8419 interface Map<T> extends ESMap<string, T> { 8420 } 8421} 8422declare namespace ts { 8423 /** 8424 * @deprecated Use `isMemberName` instead. 8425 */ 8426 const isIdentifierOrPrivateIdentifier: (node: Node) => node is MemberName; 8427} 8428declare namespace ts { 8429 interface NodeFactory { 8430 /** @deprecated Use the overload that accepts 'modifiers' */ 8431 createConstructorTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode; 8432 /** @deprecated Use the overload that accepts 'modifiers' */ 8433 updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode; 8434 } 8435} 8436declare namespace ts { 8437 interface NodeFactory { 8438 createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; 8439 /** @deprecated Use the overload that accepts 'assertions' */ 8440 createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; 8441 /** @deprecated Use the overload that accepts 'assertions' */ 8442 updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode; 8443 } 8444} 8445declare namespace ts { 8446 interface NodeFactory { 8447 /** @deprecated Use the overload that accepts 'modifiers' */ 8448 createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; 8449 /** @deprecated Use the overload that accepts 'modifiers' */ 8450 updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; 8451 } 8452} 8453declare namespace ts { 8454 interface Node { 8455 /** 8456 * @deprecated `decorators` has been removed from `Node` and merged with `modifiers` on the `Node` subtypes that support them. 8457 * Use `ts.canHaveDecorators()` to test whether a `Node` can have decorators. 8458 * Use `ts.getDecorators()` to get the decorators of a `Node`. 8459 * 8460 * For example: 8461 * ```ts 8462 * const decorators = ts.canHaveDecorators(node) ? ts.getDecorators(node) : undefined; 8463 * ``` 8464 */ 8465 readonly decorators?: undefined; 8466 /** 8467 * @deprecated `modifiers` has been removed from `Node` and moved to the `Node` subtypes that support them. 8468 * Use `ts.canHaveModifiers()` to test whether a `Node` can have modifiers. 8469 * Use `ts.getModifiers()` to get the modifiers of a `Node`. 8470 * 8471 * For example: 8472 * ```ts 8473 * const modifiers = ts.canHaveModifiers(node) ? ts.getModifiers(node) : undefined; 8474 * ``` 8475 */ 8476 readonly modifiers?: NodeArray<ModifierLike> | undefined; 8477 } 8478 interface PropertySignature { 8479 /** @deprecated A property signature cannot have an initializer */ 8480 readonly initializer?: Expression | undefined; 8481 } 8482 interface PropertyAssignment { 8483 /** @deprecated A property assignment cannot have a question token */ 8484 readonly questionToken?: QuestionToken | undefined; 8485 /** @deprecated A property assignment cannot have an exclamation token */ 8486 readonly exclamationToken?: ExclamationToken | undefined; 8487 } 8488 interface ShorthandPropertyAssignment { 8489 /** @deprecated A shorthand property assignment cannot have modifiers */ 8490 readonly modifiers?: NodeArray<Modifier> | undefined; 8491 /** @deprecated A shorthand property assignment cannot have a question token */ 8492 readonly questionToken?: QuestionToken | undefined; 8493 /** @deprecated A shorthand property assignment cannot have an exclamation token */ 8494 readonly exclamationToken?: ExclamationToken | undefined; 8495 } 8496 interface FunctionTypeNode { 8497 /** @deprecated A function type cannot have modifiers */ 8498 readonly modifiers?: NodeArray<Modifier> | undefined; 8499 } 8500 interface NodeFactory { 8501 /** 8502 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 8503 */ 8504 createParameterDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration; 8505 /** 8506 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 8507 */ 8508 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; 8509 /** 8510 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 8511 */ 8512 createPropertyDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 8513 /** 8514 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 8515 */ 8516 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; 8517 /** 8518 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 8519 */ 8520 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; 8521 /** 8522 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 8523 */ 8524 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; 8525 /** 8526 * @deprecated This node does not support Decorators. Callers should use an overload that does not accept a `decorators` parameter. 8527 */ 8528 createConstructorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 8529 /** 8530 * @deprecated This node does not support Decorators. Callers should use an overload that does not accept a `decorators` parameter. 8531 */ 8532 updateConstructorDeclaration(node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 8533 /** 8534 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 8535 */ 8536 createGetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 8537 /** 8538 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 8539 */ 8540 updateGetAccessorDeclaration(node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 8541 /** 8542 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 8543 */ 8544 createSetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 8545 /** 8546 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 8547 */ 8548 updateSetAccessorDeclaration(node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 8549 /** 8550 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8551 */ 8552 createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; 8553 /** 8554 * @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. 8555 */ 8556 updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; 8557 /** 8558 * @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. 8559 */ 8560 createClassStaticBlockDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration; 8561 /** 8562 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8563 */ 8564 updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration; 8565 /** 8566 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 8567 */ 8568 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; 8569 /** 8570 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 8571 */ 8572 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; 8573 /** 8574 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8575 */ 8576 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; 8577 /** 8578 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8579 */ 8580 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; 8581 /** 8582 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 8583 */ 8584 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; 8585 /** 8586 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 8587 */ 8588 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; 8589 /** 8590 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8591 */ 8592 createInterfaceDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 8593 /** 8594 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8595 */ 8596 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; 8597 /** 8598 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8599 */ 8600 createTypeAliasDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 8601 /** 8602 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8603 */ 8604 updateTypeAliasDeclaration(node: TypeAliasDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 8605 /** 8606 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8607 */ 8608 createEnumDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration; 8609 /** 8610 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8611 */ 8612 updateEnumDeclaration(node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; 8613 /** 8614 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8615 */ 8616 createModuleDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration; 8617 /** 8618 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8619 */ 8620 updateModuleDeclaration(node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration; 8621 /** 8622 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8623 */ 8624 createImportEqualsDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 8625 /** 8626 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8627 */ 8628 updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 8629 /** 8630 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8631 */ 8632 createImportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause): ImportDeclaration; 8633 /** 8634 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8635 */ 8636 updateImportDeclaration(node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration; 8637 /** 8638 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8639 */ 8640 createExportAssignment(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment; 8641 /** 8642 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8643 */ 8644 updateExportAssignment(node: ExportAssignment, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment; 8645 /** 8646 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8647 */ 8648 createExportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, assertClause?: AssertClause): ExportDeclaration; 8649 /** 8650 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 8651 */ 8652 updateExportDeclaration(node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration; 8653 } 8654} 8655declare namespace ts { 8656 namespace ArkTSLinter_1_0 { 8657 namespace Common { 8658 interface AutofixInfo { 8659 problemID: string; 8660 start: number; 8661 end: number; 8662 } 8663 interface CommandLineOptions { 8664 strictMode?: boolean; 8665 ideMode?: boolean; 8666 logTscErrors?: boolean; 8667 warningsAsErrors: boolean; 8668 parsedConfigFile?: ParsedCommandLine; 8669 inputFiles: string[]; 8670 autofixInfo?: AutofixInfo[]; 8671 } 8672 interface LintOptions { 8673 cmdOptions: CommandLineOptions; 8674 tsProgram?: Program; 8675 [key: string]: any; 8676 } 8677 } 8678 } 8679} 8680declare namespace ts { 8681 namespace ArkTSLinter_1_0 { 8682 const cookBookMsg: string[]; 8683 const cookBookTag: string[]; 8684 } 8685} 8686declare namespace ts { 8687 namespace ArkTSLinter_1_0 { 8688 namespace DiagnosticCheckerNamespace { 8689 interface DiagnosticChecker { 8690 checkDiagnosticMessage(msgText: string | ts.DiagnosticMessageChain): boolean; 8691 } 8692 } 8693 } 8694} 8695declare namespace ts { 8696 namespace ArkTSLinter_1_0 { 8697 import DiagnosticChecker = DiagnosticCheckerNamespace.DiagnosticChecker; 8698 namespace LibraryTypeCallDiagnosticCheckerNamespace { 8699 const TYPE_0_IS_NOT_ASSIGNABLE_TO_TYPE_1_ERROR_CODE = 2322; 8700 const TYPE_UNKNOWN_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 8701 const TYPE_NULL_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 8702 const TYPE_UNDEFINED_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 8703 const ARGUMENT_OF_TYPE_0_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_ERROR_CODE = 2345; 8704 const ARGUMENT_OF_TYPE_NULL_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_RE: RegExp; 8705 const ARGUMENT_OF_TYPE_UNDEFINED_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_RE: RegExp; 8706 const NO_OVERLOAD_MATCHES_THIS_CALL_ERROR_CODE = 2769; 8707 class LibraryTypeCallDiagnosticChecker implements DiagnosticChecker { 8708 inLibCall: boolean; 8709 diagnosticMessages: Array<ts.DiagnosticMessageChain> | undefined; 8710 filteredDiagnosticMessages: DiagnosticMessageChain[]; 8711 constructor(filteredDiagnosticMessages: DiagnosticMessageChain[]); 8712 configure(inLibCall: boolean, diagnosticMessages: Array<ts.DiagnosticMessageChain>): void; 8713 checkMessageText(msg: string): boolean; 8714 checkMessageChain(chain: ts.DiagnosticMessageChain): boolean; 8715 checkFilteredDiagnosticMessages(msgText: ts.DiagnosticMessageChain | string): boolean; 8716 checkDiagnosticMessage(msgText: string | ts.DiagnosticMessageChain): boolean; 8717 } 8718 } 8719 } 8720} 8721declare namespace ts { 8722 namespace ArkTSLinter_1_0 { 8723 namespace Utils { 8724 import AutofixInfo = Common.AutofixInfo; 8725 const PROPERTY_HAS_NO_INITIALIZER_ERROR_CODE = 2564; 8726 const NON_INITIALIZABLE_PROPERTY_DECORATORS: string[]; 8727 const NON_INITIALIZABLE_PROPERTY_ClASS_DECORATORS: string[]; 8728 const LIMITED_STANDARD_UTILITY_TYPES: string[]; 8729 const ALLOWED_STD_SYMBOL_API: string[]; 8730 enum ProblemSeverity { 8731 WARNING = 1, 8732 ERROR = 2 8733 } 8734 const ARKTS_IGNORE_DIRS: string[]; 8735 const ARKTS_IGNORE_FILES: string[]; 8736 function setTypeChecker(tsTypeChecker: TypeChecker): void; 8737 function clearTypeChecker(): void; 8738 function setTestMode(tsTestMode: boolean): void; 8739 function getStartPos(nodeOrComment: Node | CommentRange): number; 8740 function getEndPos(nodeOrComment: Node | CommentRange): number; 8741 function isAssignmentOperator(tsBinOp: BinaryOperatorToken): boolean; 8742 function isTypedArray(tsType: TypeNode | undefined): boolean; 8743 function isType(tsType: TypeNode | undefined, checkType: string): boolean; 8744 function entityNameToString(name: EntityName): string; 8745 function isNumberType(tsType: Type): boolean; 8746 function isBooleanType(tsType: Type): boolean; 8747 function isStringLikeType(tsType: Type): boolean; 8748 function isStringType(type: Type): boolean; 8749 function isPrimitiveEnumType(type: Type, primitiveType: TypeFlags): boolean; 8750 function isPrimitiveEnumMemberType(type: Type, primitiveType: TypeFlags): boolean; 8751 function unwrapParenthesizedType(tsType: TypeNode): TypeNode; 8752 function findParentIf(asExpr: AsExpression): IfStatement | null; 8753 function isDestructuringAssignmentLHS(tsExpr: ArrayLiteralExpression | ObjectLiteralExpression): boolean; 8754 function isEnumType(tsType: Type): boolean; 8755 function isEnumMemberType(tsType: Type): boolean; 8756 function isObjectLiteralType(tsType: Type): boolean; 8757 function isNumberLikeType(tsType: Type): boolean; 8758 function hasModifier(tsModifiers: readonly Modifier[] | undefined, tsModifierKind: number): boolean; 8759 function unwrapParenthesized(tsExpr: Expression): Expression; 8760 function followIfAliased(sym: Symbol): Symbol; 8761 function trueSymbolAtLocation(node: Node): Symbol | undefined; 8762 function clearTrueSymbolAtLocationCache(): void; 8763 function isTypeDeclSyntaxKind(kind: SyntaxKind): boolean; 8764 function symbolHasDuplicateName(symbol: Symbol, tsDeclKind: SyntaxKind): boolean; 8765 function isReferenceType(tsType: Type): boolean; 8766 function isPrimitiveType(type: Type): boolean; 8767 function isTypeSymbol(symbol: Symbol | undefined): boolean; 8768 function isGenericArrayType(tsType: Type): tsType is TypeReference; 8769 function isDerivedFrom(tsType: Type, checkType: CheckType): tsType is TypeReference; 8770 function isTypeReference(tsType: Type): tsType is TypeReference; 8771 function isNullType(tsTypeNode: TypeNode): boolean; 8772 function isThisOrSuperExpr(tsExpr: Expression): boolean; 8773 function isPrototypeSymbol(symbol: Symbol | undefined): boolean; 8774 function isFunctionSymbol(symbol: Symbol | undefined): boolean; 8775 function isInterfaceType(tsType: Type | undefined): boolean; 8776 function isAnyType(tsType: Type): tsType is TypeReference; 8777 function isUnknownType(tsType: Type): boolean; 8778 function isUnsupportedType(tsType: Type): boolean; 8779 function isUnsupportedUnionType(tsType: Type): boolean; 8780 function isFunctionOrMethod(tsSymbol: Symbol | undefined): boolean; 8781 function isMethodAssignment(tsSymbol: Symbol | undefined): boolean; 8782 function getDeclaration(tsSymbol: ts.Symbol | undefined): ts.Declaration | undefined; 8783 function isValidEnumMemberInit(tsExpr: Expression): boolean; 8784 function isCompileTimeExpression(tsExpr: Expression): boolean; 8785 function isConst(tsNode: Node): boolean; 8786 function isNumberConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression | NumericLiteral): boolean; 8787 function isIntegerConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression | NumericLiteral): boolean; 8788 function isStringConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression): boolean; 8789 function relatedByInheritanceOrIdentical(typeA: Type, typeB: Type): boolean; 8790 function needToDeduceStructuralIdentity(typeFrom: Type, typeTo: Type, allowPromotion?: boolean): boolean; 8791 function hasPredecessor(node: Node, predicate: (node: Node) => boolean): boolean; 8792 function processParentTypes(parentTypes: NodeArray<ExpressionWithTypeArguments>, typeB: Type, processInterfaces: boolean): boolean; 8793 function processParentTypesCheck(parentTypes: NodeArray<ExpressionWithTypeArguments>, checkType: CheckType): boolean; 8794 function isObjectType(tsType: Type): boolean; 8795 function logTscDiagnostic(diagnostics: readonly Diagnostic[], log: (message: any, ...args: any[]) => void): void; 8796 function encodeProblemInfo(problem: ProblemInfo): string; 8797 function decodeAutofixInfo(info: string): AutofixInfo; 8798 function isCallToFunctionWithOmittedReturnType(tsExpr: Expression): boolean; 8799 function validateObjectLiteralType(type: Type | undefined): boolean; 8800 function isStructDeclarationKind(kind: SyntaxKind): boolean; 8801 function isStructDeclaration(node: Node): boolean; 8802 function isStructObjectInitializer(objectLiteral: ObjectLiteralExpression): boolean; 8803 function hasMethods(type: Type): boolean; 8804 function isExpressionAssignableToType(lhsType: ts.Type | undefined, rhsExpr: ts.Expression): boolean; 8805 function isLiteralType(type: Type): boolean; 8806 function validateFields(type: Type, objectLiteral: ObjectLiteralExpression): boolean; 8807 function isSupportedType(typeNode: TypeNode): boolean; 8808 function isStruct(symbol: Symbol): boolean; 8809 enum CheckType { 8810 Array = 0, 8811 String = "String", 8812 Set = "Set", 8813 Map = "Map", 8814 Error = "Error" 8815 } 8816 const ES_OBJECT = "ESObject"; 8817 const LIMITED_STD_GLOBAL_FUNC: string[]; 8818 const LIMITED_STD_OBJECT_API: string[]; 8819 const LIMITED_STD_REFLECT_API: string[]; 8820 const LIMITED_STD_PROXYHANDLER_API: string[]; 8821 const ARKUI_DECORATORS: string[]; 8822 const FUNCTION_HAS_NO_RETURN_ERROR_CODE = 2366; 8823 const NON_RETURN_FUNCTION_DECORATORS: string[]; 8824 const STANDARD_LIBRARIES: string[]; 8825 const TYPED_ARRAYS: string[]; 8826 function getParentSymbolName(symbol: Symbol): string | undefined; 8827 function isGlobalSymbol(symbol: Symbol): boolean; 8828 function isSymbolAPI(symbol: Symbol): boolean; 8829 function isStdSymbol(symbol: ts.Symbol): boolean; 8830 function isSymbolIterator(symbol: ts.Symbol): boolean; 8831 function isDefaultImport(importSpec: ImportSpecifier): boolean; 8832 function hasAccessModifier(decl: Declaration): boolean; 8833 function getModifier(modifiers: readonly Modifier[] | undefined, modifierKind: SyntaxKind): Modifier | undefined; 8834 function getAccessModifier(modifiers: readonly Modifier[] | undefined): Modifier | undefined; 8835 function isStdRecordType(type: Type): boolean; 8836 function isStdPartialType(type: Type): boolean; 8837 function isStdRequiredType(type: Type): boolean; 8838 function isStdReadonlyType(type: Type): boolean; 8839 function isLibraryType(type: Type): boolean; 8840 function hasLibraryType(node: Node): boolean; 8841 function isLibrarySymbol(sym: Symbol | undefined): boolean; 8842 function pathContainsDirectory(targetPath: string, dir: string): boolean; 8843 function getScriptKind(srcFile: SourceFile): ScriptKind; 8844 function isStdLibraryType(type: Type): boolean; 8845 function isStdLibrarySymbol(sym: Symbol | undefined): boolean; 8846 function isIntrinsicObjectType(type: Type): boolean; 8847 function isDynamicType(type: Type | undefined): boolean | undefined; 8848 function isDynamicLiteralInitializer(expr: Expression): boolean; 8849 function isEsObjectType(typeNode: TypeNode): boolean; 8850 function isInsideBlock(node: ts.Node): boolean; 8851 function isEsObjectPossiblyAllowed(typeRef: ts.TypeReferenceNode): boolean; 8852 function isValueAssignableToESObject(node: ts.Node): boolean; 8853 function getVariableDeclarationTypeNode(node: Node): TypeNode | undefined; 8854 function getSymbolDeclarationTypeNode(sym: ts.Symbol): ts.TypeNode | undefined; 8855 function hasEsObjectType(node: Node): boolean; 8856 function symbolHasEsObjectType(sym: ts.Symbol): boolean; 8857 function isEsObjectSymbol(sym: Symbol): boolean; 8858 function isAnonymousType(type: Type): boolean; 8859 function getSymbolOfCallExpression(callExpr: CallExpression): Symbol | undefined; 8860 function typeIsRecursive(topType: Type, type?: Type | undefined): boolean; 8861 } 8862 } 8863} 8864declare namespace ts { 8865 namespace ArkTSLinter_1_0 { 8866 namespace Problems { 8867 enum FaultID { 8868 AnyType = 0, 8869 SymbolType = 1, 8870 ObjectLiteralNoContextType = 2, 8871 ArrayLiteralNoContextType = 3, 8872 ComputedPropertyName = 4, 8873 LiteralAsPropertyName = 5, 8874 TypeQuery = 6, 8875 RegexLiteral = 7, 8876 IsOperator = 8, 8877 DestructuringParameter = 9, 8878 YieldExpression = 10, 8879 InterfaceMerging = 11, 8880 EnumMerging = 12, 8881 InterfaceExtendsClass = 13, 8882 IndexMember = 14, 8883 WithStatement = 15, 8884 ThrowStatement = 16, 8885 IndexedAccessType = 17, 8886 UnknownType = 18, 8887 ForInStatement = 19, 8888 InOperator = 20, 8889 ImportFromPath = 21, 8890 FunctionExpression = 22, 8891 IntersectionType = 23, 8892 ObjectTypeLiteral = 24, 8893 CommaOperator = 25, 8894 LimitedReturnTypeInference = 26, 8895 LambdaWithTypeParameters = 27, 8896 ClassExpression = 28, 8897 DestructuringAssignment = 29, 8898 DestructuringDeclaration = 30, 8899 VarDeclaration = 31, 8900 CatchWithUnsupportedType = 32, 8901 DeleteOperator = 33, 8902 DeclWithDuplicateName = 34, 8903 UnaryArithmNotNumber = 35, 8904 ConstructorType = 36, 8905 ConstructorIface = 37, 8906 ConstructorFuncs = 38, 8907 CallSignature = 39, 8908 TypeAssertion = 40, 8909 PrivateIdentifier = 41, 8910 LocalFunction = 42, 8911 ConditionalType = 43, 8912 MappedType = 44, 8913 NamespaceAsObject = 45, 8914 ClassAsObject = 46, 8915 NonDeclarationInNamespace = 47, 8916 GeneratorFunction = 48, 8917 FunctionContainsThis = 49, 8918 PropertyAccessByIndex = 50, 8919 JsxElement = 51, 8920 EnumMemberNonConstInit = 52, 8921 ImplementsClass = 53, 8922 NoUndefinedPropAccess = 54, 8923 MultipleStaticBlocks = 55, 8924 ThisType = 56, 8925 IntefaceExtendDifProps = 57, 8926 StructuralIdentity = 58, 8927 DefaultImport = 59, 8928 ExportAssignment = 60, 8929 ImportAssignment = 61, 8930 GenericCallNoTypeArgs = 62, 8931 ParameterProperties = 63, 8932 InstanceofUnsupported = 64, 8933 ShorthandAmbientModuleDecl = 65, 8934 WildcardsInModuleName = 66, 8935 UMDModuleDefinition = 67, 8936 NewTarget = 68, 8937 DefiniteAssignment = 69, 8938 Prototype = 70, 8939 GlobalThis = 71, 8940 UtilityType = 72, 8941 PropertyDeclOnFunction = 73, 8942 FunctionApplyBindCall = 74, 8943 ConstAssertion = 75, 8944 ImportAssertion = 76, 8945 SpreadOperator = 77, 8946 LimitedStdLibApi = 78, 8947 ErrorSuppression = 79, 8948 StrictDiagnostic = 80, 8949 UnsupportedDecorators = 81, 8950 ImportAfterStatement = 82, 8951 EsObjectType = 83, 8952 LAST_ID = 84 8953 } 8954 class FaultAttributs { 8955 migratable?: boolean; 8956 warning?: boolean; 8957 cookBookRef: string; 8958 } 8959 const faultsAttrs: FaultAttributs[]; 8960 } 8961 } 8962} 8963declare namespace ts { 8964 namespace ArkTSLinter_1_0 { 8965 namespace Autofixer { 8966 import AutofixInfo = Common.AutofixInfo; 8967 import FaultID = Problems.FaultID; 8968 const AUTOFIX_ALL: AutofixInfo; 8969 const autofixInfo: AutofixInfo[]; 8970 function shouldAutofix(node: Node, faultID: FaultID): boolean; 8971 interface Autofix { 8972 replacementText: string; 8973 start: number; 8974 end: number; 8975 } 8976 function fixLiteralAsPropertyName(node: Node): Autofix[] | undefined; 8977 function fixPropertyAccessByIndex(node: Node): Autofix[] | undefined; 8978 function fixFunctionExpression(funcExpr: FunctionExpression, params?: NodeArray<ParameterDeclaration>, retType?: TypeNode | undefined): Autofix; 8979 function fixReturnType(funcLikeDecl: FunctionLikeDeclaration, typeNode: TypeNode): Autofix; 8980 function fixCtorParameterProperties(ctorDecl: ConstructorDeclaration, paramTypes: TypeNode[]): Autofix[] | undefined; 8981 } 8982 } 8983} 8984declare namespace ts { 8985 namespace ArkTSLinter_1_0 { 8986 import FaultID = Problems.FaultID; 8987 class LinterConfig { 8988 static nodeDesc: string[]; 8989 static tsSyntaxKindNames: string[]; 8990 static initStatic(): void; 8991 static terminalTokens: Set<SyntaxKind>; 8992 static incrementOnlyTokens: ESMap<SyntaxKind, FaultID>; 8993 } 8994 } 8995} 8996declare namespace ts { 8997 namespace ArkTSLinter_1_0 { 8998 import Autofix = Autofixer.Autofix; 8999 import LibraryTypeCallDiagnosticChecker = LibraryTypeCallDiagnosticCheckerNamespace.LibraryTypeCallDiagnosticChecker; 9000 interface ProblemInfo { 9001 line: number; 9002 column: number; 9003 start: number; 9004 end: number; 9005 type: string; 9006 severity: number; 9007 problem: string; 9008 suggest: string; 9009 rule: string; 9010 ruleTag: number; 9011 autofixable: boolean; 9012 autofix?: Autofix[]; 9013 } 9014 class TypeScriptLinter { 9015 private sourceFile; 9016 private tscStrictDiagnostics?; 9017 static ideMode: boolean; 9018 static strictMode: boolean; 9019 static logTscErrors: boolean; 9020 static warningsAsErrors: boolean; 9021 static lintEtsOnly: boolean; 9022 static totalVisitedNodes: number; 9023 static nodeCounters: number[]; 9024 static lineCounters: number[]; 9025 static totalErrorLines: number; 9026 static errorLineNumbersString: string; 9027 static totalWarningLines: number; 9028 static warningLineNumbersString: string; 9029 static reportDiagnostics: boolean; 9030 static problemsInfos: ProblemInfo[]; 9031 static filteredDiagnosticMessages: DiagnosticMessageChain[]; 9032 static initGlobals(): void; 9033 static initStatic(): void; 9034 static tsTypeChecker: TypeChecker; 9035 currentErrorLine: number; 9036 currentWarningLine: number; 9037 staticBlocks: Set<string>; 9038 libraryTypeCallDiagnosticChecker: LibraryTypeCallDiagnosticChecker; 9039 skipArkTSStaticBlocksCheck: boolean; 9040 constructor(sourceFile: SourceFile, tsProgram: Program, tscStrictDiagnostics?: Map<Diagnostic[]> | undefined); 9041 static clearTsTypeChecker(): void; 9042 readonly handlersMap: ESMap<SyntaxKind, (node: Node) => void>; 9043 incrementCounters(node: Node | CommentRange, faultId: number, autofixable?: boolean, autofix?: Autofix[]): void; 9044 visitTSNode(node: Node): void; 9045 private countInterfaceExtendsDifferentPropertyTypes; 9046 private countDeclarationsWithDuplicateName; 9047 private countClassMembersWithDuplicateName; 9048 private functionContainsThis; 9049 private isPrototypePropertyAccess; 9050 private interfaceInheritanceLint; 9051 private lintForInterfaceExtendsDifferentPorpertyTypes; 9052 private handleObjectLiteralExpression; 9053 private handleArrayLiteralExpression; 9054 private handleParameter; 9055 private handleEnumDeclaration; 9056 private handleInterfaceDeclaration; 9057 private handleThrowStatement; 9058 private handleForStatement; 9059 private handleForInStatement; 9060 private handleForOfStatement; 9061 private handleImportDeclaration; 9062 private handlePropertyAccessExpression; 9063 private handlePropertyAssignmentOrDeclaration; 9064 private filterOutDecoratorsDiagnostics; 9065 private checkInRange; 9066 private filterStrictDiagnostics; 9067 private handleFunctionExpression; 9068 private handleArrowFunction; 9069 private handleClassExpression; 9070 private handleFunctionDeclaration; 9071 private handleMissingReturnType; 9072 private hasLimitedTypeInferenceFromReturnExpr; 9073 private handlePrefixUnaryExpression; 9074 private handleBinaryExpression; 9075 private handleVariableDeclarationList; 9076 private handleVariableDeclaration; 9077 private handleEsObjectDelaration; 9078 private handleEsObjectAssignment; 9079 private handleCatchClause; 9080 private handleClassDeclaration; 9081 private handleModuleDeclaration; 9082 private handleTypeAliasDeclaration; 9083 private handleImportClause; 9084 private handleImportSpecifier; 9085 private handleNamespaceImport; 9086 private handleTypeAssertionExpression; 9087 private handleMethodDeclaration; 9088 private handleIdentifier; 9089 private isAllowedClassValueContext; 9090 private handleRestrictedValues; 9091 private identiferUseInValueContext; 9092 private isEnumPropAccess; 9093 private handleElementAccessExpression; 9094 private handleEnumMember; 9095 private handleExportAssignment; 9096 private handleCallExpression; 9097 private handleImportCall; 9098 private handleRequireCall; 9099 private handleGenericCallWithNoTypeArgs; 9100 private static listApplyBindCallApis; 9101 private handleFunctionApplyBindPropCall; 9102 private handleStructIdentAndUndefinedInArgs; 9103 private static LimitedApis; 9104 private handleStdlibAPICall; 9105 private findNonFilteringRangesFunctionCalls; 9106 private handleLibraryTypeCall; 9107 private handleNewExpression; 9108 private handleAsExpression; 9109 private handleTypeReference; 9110 private handleMetaProperty; 9111 private handleStructDeclaration; 9112 private handleSpreadOp; 9113 private handleConstructSignature; 9114 private handleComments; 9115 private handleExpressionWithTypeArguments; 9116 private handleComputedPropertyName; 9117 private checkErrorSuppressingAnnotation; 9118 private handleDecorators; 9119 private handleGetAccessor; 9120 private handleSetAccessor; 9121 private handleDeclarationInferredType; 9122 private handleDefiniteAssignmentAssertion; 9123 private validatedTypesSet; 9124 private checkAnyOrUnknownChildNode; 9125 private handleInferredObjectreference; 9126 private validateDeclInferredType; 9127 private handleClassStaticBlockDeclaration; 9128 lint(): void; 9129 } 9130 } 9131} 9132declare namespace ts { 9133 namespace ArkTSLinter_1_0 { 9134 class TSCCompiledProgram { 9135 private diagnosticsExtractor; 9136 constructor(program: BuilderProgram); 9137 getProgram(): Program; 9138 getBuilderProgram(): BuilderProgram; 9139 getStrictDiagnostics(fileName: string): Diagnostic[]; 9140 doAllGetDiagnostics(): void; 9141 } 9142 } 9143} 9144declare namespace ts { 9145 namespace ArkTSLinter_1_0 { 9146 function translateDiag(srcFile: SourceFile, problemInfo: ProblemInfo): Diagnostic; 9147 function runArkTSLinter(tsBuilderProgram: BuilderProgram, srcFile?: SourceFile, buildInfoWriteFile?: WriteFileCallback, arkTSVersion?: string): Diagnostic[]; 9148 } 9149} 9150declare namespace ts { 9151 namespace ArkTSLinter_1_1 { 9152 namespace Common { 9153 interface AutofixInfo { 9154 problemID: string; 9155 start: number; 9156 end: number; 9157 } 9158 interface CommandLineOptions { 9159 strictMode?: boolean; 9160 ideMode?: boolean; 9161 logTscErrors?: boolean; 9162 warningsAsErrors: boolean; 9163 parsedConfigFile?: ParsedCommandLine; 9164 inputFiles: string[]; 9165 autofixInfo?: AutofixInfo[]; 9166 } 9167 interface LintOptions { 9168 cmdOptions: CommandLineOptions; 9169 tsProgram?: Program; 9170 [key: string]: any; 9171 } 9172 enum ProblemSeverity { 9173 WARNING = 1, 9174 ERROR = 2 9175 } 9176 } 9177 } 9178} 9179declare namespace ts { 9180 namespace ArkTSLinter_1_1 { 9181 const cookBookMsg: string[]; 9182 const cookBookTag: string[]; 9183 } 9184} 9185declare namespace ts { 9186 namespace ArkTSLinter_1_1 { 9187 namespace DiagnosticCheckerNamespace { 9188 interface DiagnosticChecker { 9189 checkDiagnosticMessage(msgText: string | ts.DiagnosticMessageChain): boolean; 9190 } 9191 } 9192 } 9193} 9194declare namespace ts { 9195 namespace ArkTSLinter_1_1 { 9196 namespace LibraryTypeCallDiagnosticCheckerNamespace { 9197 const TYPE_0_IS_NOT_ASSIGNABLE_TO_TYPE_1_ERROR_CODE = 2322; 9198 const TYPE_UNKNOWN_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 9199 const TYPE_NULL_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 9200 const TYPE_UNDEFINED_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 9201 const ARGUMENT_OF_TYPE_0_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_ERROR_CODE = 2345; 9202 const OBJECT_IS_POSSIBLY_UNDEFINED_ERROR_CODE = 2532; 9203 const ARGUMENT_OF_TYPE_NULL_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_RE: RegExp; 9204 const ARGUMENT_OF_TYPE_UNDEFINED_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_RE: RegExp; 9205 const NO_OVERLOAD_MATCHES_THIS_CALL_ERROR_CODE = 2769; 9206 const TYPE = "Type"; 9207 const IS_NOT_ASSIGNABLE_TO_TYPE = "is not assignable to type"; 9208 const ARGUMENT_OF_TYPE = "Argument of type"; 9209 const IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE = "is not assignable to parameter of type"; 9210 enum ErrorType { 9211 NO_ERROR = 0, 9212 UNKNOW = 1, 9213 NULL = 2, 9214 POSSIBLY_UNDEFINED = 3 9215 } 9216 class LibraryTypeCallDiagnosticChecker { 9217 private static _instance; 9218 static get instance(): LibraryTypeCallDiagnosticChecker; 9219 private _diagnosticErrorTypeMap; 9220 private constructor(); 9221 clear(): void; 9222 rebuildTscDiagnostics(tscStrictDiagnostics: ESMap<string, ts.Diagnostic[]>): void; 9223 filterDiagnostics(tscDiagnostics: readonly ts.Diagnostic[], expr: ts.CallExpression | ts.NewExpression, isLibCall: boolean, filterHandle: (diagnositc: ts.Diagnostic, errorType: ErrorType) => void): void; 9224 private getErrorType; 9225 private static isValidErrorType; 9226 private static isValidDiagnosticRange; 9227 } 9228 } 9229 } 9230} 9231declare namespace ts { 9232 namespace ArkTSLinter_1_1 { 9233 namespace Problems { 9234 import ProblemSeverity = Common.ProblemSeverity; 9235 enum FaultID { 9236 AnyType = 0, 9237 SymbolType = 1, 9238 ObjectLiteralNoContextType = 2, 9239 ArrayLiteralNoContextType = 3, 9240 ComputedPropertyName = 4, 9241 LiteralAsPropertyName = 5, 9242 TypeQuery = 6, 9243 IsOperator = 7, 9244 DestructuringParameter = 8, 9245 YieldExpression = 9, 9246 InterfaceMerging = 10, 9247 EnumMerging = 11, 9248 InterfaceExtendsClass = 12, 9249 IndexMember = 13, 9250 WithStatement = 14, 9251 ThrowStatement = 15, 9252 IndexedAccessType = 16, 9253 UnknownType = 17, 9254 ForInStatement = 18, 9255 InOperator = 19, 9256 FunctionExpression = 20, 9257 IntersectionType = 21, 9258 ObjectTypeLiteral = 22, 9259 CommaOperator = 23, 9260 LimitedReturnTypeInference = 24, 9261 ClassExpression = 25, 9262 DestructuringAssignment = 26, 9263 DestructuringDeclaration = 27, 9264 VarDeclaration = 28, 9265 CatchWithUnsupportedType = 29, 9266 DeleteOperator = 30, 9267 DeclWithDuplicateName = 31, 9268 UnaryArithmNotNumber = 32, 9269 ConstructorType = 33, 9270 ConstructorIface = 34, 9271 ConstructorFuncs = 35, 9272 CallSignature = 36, 9273 TypeAssertion = 37, 9274 PrivateIdentifier = 38, 9275 LocalFunction = 39, 9276 ConditionalType = 40, 9277 MappedType = 41, 9278 NamespaceAsObject = 42, 9279 ClassAsObject = 43, 9280 NonDeclarationInNamespace = 44, 9281 GeneratorFunction = 45, 9282 FunctionContainsThis = 46, 9283 PropertyAccessByIndex = 47, 9284 JsxElement = 48, 9285 EnumMemberNonConstInit = 49, 9286 ImplementsClass = 50, 9287 MethodReassignment = 51, 9288 MultipleStaticBlocks = 52, 9289 ThisType = 53, 9290 IntefaceExtendDifProps = 54, 9291 StructuralIdentity = 55, 9292 ExportAssignment = 56, 9293 ImportAssignment = 57, 9294 GenericCallNoTypeArgs = 58, 9295 ParameterProperties = 59, 9296 InstanceofUnsupported = 60, 9297 ShorthandAmbientModuleDecl = 61, 9298 WildcardsInModuleName = 62, 9299 UMDModuleDefinition = 63, 9300 NewTarget = 64, 9301 DefiniteAssignment = 65, 9302 Prototype = 66, 9303 GlobalThis = 67, 9304 UtilityType = 68, 9305 PropertyDeclOnFunction = 69, 9306 FunctionApplyCall = 70, 9307 FunctionBind = 71, 9308 ConstAssertion = 72, 9309 ImportAssertion = 73, 9310 SpreadOperator = 74, 9311 LimitedStdLibApi = 75, 9312 ErrorSuppression = 76, 9313 StrictDiagnostic = 77, 9314 ImportAfterStatement = 78, 9315 EsObjectType = 79, 9316 SendableClassInheritance = 80, 9317 SendablePropType = 81, 9318 SendableDefiniteAssignment = 82, 9319 SendableGenericTypes = 83, 9320 SendableCapturedVars = 84, 9321 SendableClassDecorator = 85, 9322 SendableObjectInitialization = 86, 9323 SendableComputedPropName = 87, 9324 SendableAsExpr = 88, 9325 SharedNoSideEffectImport = 89, 9326 SharedModuleExports = 90, 9327 SharedModuleNoWildcardExport = 91, 9328 NoTsImportEts = 92, 9329 SendableTypeInheritance = 93, 9330 SendableTypeExported = 94, 9331 NoTsReExportEts = 95, 9332 NoNamespaceImportEtsToTs = 96, 9333 NoSideEffectImportEtsToTs = 97, 9334 SendableExplicitFieldType = 98, 9335 SendableFunctionImportedVariables = 99, 9336 SendableFunctionDecorator = 100, 9337 SendableTypeAliasDecorator = 101, 9338 SendableTypeAliasDeclaration = 102, 9339 SendableFunctionAssignment = 103, 9340 SendableFunctionOverloadDecorator = 104, 9341 SendableFunctionProperty = 105, 9342 SendableFunctionAsExpr = 106, 9343 SendableDecoratorLimited = 107, 9344 SharedModuleExportsWarning = 108, 9345 SendableBetaCompatible = 109, 9346 SendablePropTypeWarning = 110, 9347 LAST_ID = 111 9348 } 9349 class FaultAttributes { 9350 cookBookRef: number; 9351 migratable: boolean; 9352 severity: ProblemSeverity; 9353 constructor(cookBookRef: number, migratable?: boolean, severity?: ProblemSeverity); 9354 } 9355 const faultsAttrs: FaultAttributes[]; 9356 } 9357 } 9358} 9359declare namespace ts { 9360 namespace ArkTSLinter_1_1 { 9361 import AutofixInfo = Common.AutofixInfo; 9362 namespace Utils { 9363 const PROPERTY_HAS_NO_INITIALIZER_ERROR_CODE = 2564; 9364 const NON_INITIALIZABLE_PROPERTY_DECORATORS: string[]; 9365 const NON_INITIALIZABLE_PROPERTY_CLASS_DECORATORS: string[]; 9366 const LIMITED_STANDARD_UTILITY_TYPES: string[]; 9367 const ALLOWED_STD_SYMBOL_API: string[]; 9368 const ARKTS_IGNORE_DIRS: string[]; 9369 const ARKTS_IGNORE_FILES: string[]; 9370 const ARKTS_IGNORE_DIRS_OH_MODULES = "oh_modules"; 9371 const SENDABLE_DECORATOR = "Sendable"; 9372 const SENDABLE_INTERFACE = "ISendable"; 9373 const SENDABLE_DECORATOR_NODES: SyntaxKind[]; 9374 const SENDABLE_CLOSURE_DECLS: SyntaxKind[]; 9375 const ARKTS_COLLECTIONS_D_ETS = "@arkts.collections.d.ets"; 9376 const COLLECTIONS_NAMESPACE = "collections"; 9377 const ARKTS_LANG_D_ETS = "@arkts.lang.d.ets"; 9378 const LANG_NAMESPACE = "lang"; 9379 const ISENDABLE_TYPE = "ISendable"; 9380 const USE_SHARED = "use shared"; 9381 const D_TS = ".d.ts"; 9382 function setTypeChecker(tsTypeChecker: TypeChecker): void; 9383 function clearTypeChecker(): void; 9384 function setTestMode(tsTestMode: boolean): void; 9385 function getStartPos(nodeOrComment: Node | CommentRange): number; 9386 function getEndPos(nodeOrComment: Node | CommentRange): number; 9387 function getHighlightRange(nodeOrComment: Node | CommentRange, faultId: number): [number, number]; 9388 function getVarDeclarationHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 9389 function getCatchWithUnsupportedTypeHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 9390 function getForInStatementHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 9391 function getWithStatementHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 9392 function getDeleteOperatorHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 9393 function getTypeQueryHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 9394 function getInstanceofUnsupportedHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 9395 function getConstAssertionHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 9396 function getLimitedReturnTypeInferenceHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 9397 function getLocalFunctionHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 9398 function getFunctionApplyCallHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 9399 function getDeclWithDuplicateNameHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 9400 function getObjectLiteralNoContextTypeHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 9401 function getClassExpressionHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 9402 function getMultipleStaticBlocksHighlightRange(nodeOrComment: ts.Node | ts.CommentRange): [number, number] | undefined; 9403 function getSendableDefiniteAssignmentHighlightRange(nodeOrComment: ts.Node | ts.CommentRange): [number, number] | undefined; 9404 function getKeywordHighlightRange(nodeOrComment: Node | CommentRange, keyword: string): [number, number]; 9405 function isAssignmentOperator(tsBinOp: BinaryOperatorToken): boolean; 9406 function isType(tsType: TypeNode | undefined, checkType: string): boolean; 9407 function entityNameToString(name: EntityName): string; 9408 function isNumberLikeType(tsType: Type): boolean; 9409 function isBooleanLikeType(tsType: Type): boolean; 9410 function isStringLikeType(tsType: Type): boolean; 9411 function isStringType(tsType: ts.Type): boolean; 9412 function isPrimitiveEnumMemberType(type: Type, primitiveType: TypeFlags): boolean; 9413 function unwrapParenthesizedType(tsType: TypeNode): TypeNode; 9414 function findParentIf(asExpr: AsExpression): IfStatement | null; 9415 function isDestructuringAssignmentLHS(tsExpr: ArrayLiteralExpression | ObjectLiteralExpression): boolean; 9416 function isEnumType(tsType: ts.Type): boolean; 9417 function isEnum(tsSymbol: ts.Symbol): boolean; 9418 function isEnumMemberType(tsType: Type): boolean; 9419 function isObjectLiteralType(tsType: Type): boolean; 9420 function hasModifier(tsModifiers: readonly Modifier[] | undefined, tsModifierKind: number): boolean; 9421 function unwrapParenthesized(tsExpr: Expression): Expression; 9422 function followIfAliased(sym: Symbol): Symbol; 9423 function trueSymbolAtLocation(node: Node): Symbol | undefined; 9424 function clearTrueSymbolAtLocationCache(): void; 9425 function isTypeDeclSyntaxKind(kind: SyntaxKind): boolean; 9426 function symbolHasDuplicateName(symbol: Symbol, tsDeclKind: SyntaxKind): boolean; 9427 function isReferenceType(tsType: Type): boolean; 9428 function isPrimitiveType(type: Type): boolean; 9429 function isPrimitiveLiteralType(type: ts.Type): boolean; 9430 function isPurePrimitiveLiteralType(type: ts.Type): boolean; 9431 function isTypeSymbol(symbol: Symbol | undefined): boolean; 9432 function isGenericArrayType(tsType: Type): tsType is TypeReference; 9433 function isReadonlyArrayType(tsType: Type): boolean; 9434 function isConcatArrayType(tsType: Type): boolean; 9435 function isArrayLikeType(tsType: Type): boolean; 9436 function isTypedArray(tsType: ts.Type, allowTypeArrays: string[]): boolean; 9437 function isArray(tsType: ts.Type): boolean; 9438 function isCollectionArrayType(tsType: ts.Type): boolean; 9439 function isIndexableArray(tsType: ts.Type): boolean; 9440 function isTuple(tsType: ts.Type): boolean; 9441 function isOrDerivedFrom(tsType: ts.Type, checkType: CheckType, checkedBaseTypes?: Set<ts.Type>): boolean; 9442 function isTypeReference(tsType: Type): tsType is TypeReference; 9443 function isNullType(tsTypeNode: TypeNode): boolean; 9444 function isThisOrSuperExpr(tsExpr: Expression): boolean; 9445 function isPrototypeSymbol(symbol: Symbol | undefined): boolean; 9446 function isFunctionSymbol(symbol: Symbol | undefined): boolean; 9447 function isInterfaceType(tsType: Type | undefined): boolean; 9448 function isAnyType(tsType: Type): tsType is TypeReference; 9449 function isUnknownType(tsType: Type): boolean; 9450 function isUnsupportedType(tsType: Type): boolean; 9451 function isUnsupportedUnionType(tsType: Type): boolean; 9452 function isFunctionOrMethod(tsSymbol: Symbol | undefined): boolean; 9453 function isMethodAssignment(tsSymbol: Symbol | undefined): boolean; 9454 function getDeclaration(tsSymbol: ts.Symbol | undefined): ts.Declaration | undefined; 9455 function isValidEnumMemberInit(tsExpr: Expression): boolean; 9456 function isCompileTimeExpression(tsExpr: Expression): boolean; 9457 function isConst(tsNode: Node): boolean; 9458 function isNumberConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression | NumericLiteral): boolean; 9459 function isIntegerConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression | NumericLiteral): boolean; 9460 function isStringConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression): boolean; 9461 function relatedByInheritanceOrIdentical(typeA: Type, typeB: Type): boolean; 9462 function reduceReference(t: ts.Type): ts.Type; 9463 function needToDeduceStructuralIdentity(lhsType: Type, rhsType: Type, rhsExpr: Expression, isStrict?: boolean): boolean; 9464 function needStrictMatchType(lhsType: ts.Type, rhsType: ts.Type): boolean; 9465 function hasPredecessor(node: Node, predicate: (node: Node) => boolean): boolean; 9466 function processParentTypes(parentTypes: NodeArray<ExpressionWithTypeArguments>, typeB: Type, processInterfaces: boolean): boolean; 9467 function isObject(tsType: Type): boolean; 9468 function logTscDiagnostic(diagnostics: readonly Diagnostic[], log: (message: any, ...args: any[]) => void): void; 9469 function encodeProblemInfo(problem: ProblemInfo): string; 9470 function decodeAutofixInfo(info: string): AutofixInfo; 9471 function isCallToFunctionWithOmittedReturnType(tsExpr: Expression): boolean; 9472 function validateObjectLiteralType(type: Type | undefined): boolean; 9473 function isStructDeclarationKind(kind: SyntaxKind): boolean; 9474 function isStructDeclaration(node: Node): boolean; 9475 function isStructObjectInitializer(objectLiteral: ObjectLiteralExpression): boolean; 9476 function hasMethods(type: Type): boolean; 9477 function checkTypeSet(typeSet: ts.Type, predicate: CheckType): boolean; 9478 function getNonNullableType(t: ts.Type): ts.Type; 9479 function isObjectLiteralAssignable(lhsType: ts.Type | undefined, rhsExpr: ts.ObjectLiteralExpression): boolean; 9480 function isLiteralType(type: Type): boolean; 9481 function validateFields(objectType: Type, objectLiteral: ObjectLiteralExpression): boolean; 9482 function isSupportedType(typeNode: TypeNode): boolean; 9483 function isStruct(symbol: Symbol): boolean; 9484 type CheckType = ((t: Type) => boolean); 9485 const ES_OBJECT = "ESObject"; 9486 const LIMITED_STD_GLOBAL_FUNC: string[]; 9487 const LIMITED_STD_OBJECT_API: string[]; 9488 const LIMITED_STD_REFLECT_API: string[]; 9489 const LIMITED_STD_PROXYHANDLER_API: string[]; 9490 const FUNCTION_HAS_NO_RETURN_ERROR_CODE = 2366; 9491 const NON_RETURN_FUNCTION_DECORATORS: string[]; 9492 const STANDARD_LIBRARIES: string[]; 9493 const TYPED_ARRAYS: string[]; 9494 const TYPED_COLLECTIONS: string[]; 9495 function getParentSymbolName(symbol: Symbol): string | undefined; 9496 function isGlobalSymbol(symbol: Symbol): boolean; 9497 function isSymbolAPI(symbol: Symbol): boolean; 9498 function isStdSymbol(symbol: ts.Symbol): boolean; 9499 function isSymbolIterator(symbol: ts.Symbol): boolean; 9500 function isSymbolIteratorExpression(expr: ts.Expression): boolean; 9501 function isDefaultImport(importSpec: ImportSpecifier): boolean; 9502 function hasAccessModifier(decl: Declaration): boolean; 9503 function getModifier(modifiers: readonly Modifier[] | undefined, modifierKind: SyntaxKind): Modifier | undefined; 9504 function getAccessModifier(modifiers: readonly Modifier[] | undefined): Modifier | undefined; 9505 function isStdRecordType(type: Type): boolean; 9506 function isStdMapType(type: Type): boolean; 9507 function isStdErrorType(type: ts.Type): boolean; 9508 function isStdPartialType(type: Type): boolean; 9509 function isStdRequiredType(type: Type): boolean; 9510 function isStdReadonlyType(type: Type): boolean; 9511 function isLibraryType(type: Type): boolean; 9512 function hasLibraryType(node: Node): boolean; 9513 function isLibrarySymbol(sym: Symbol | undefined): boolean; 9514 function srcFilePathContainsDirectory(srcFile: SourceFile, dir: string): boolean; 9515 function pathContainsDirectory(targetPath: string, dir: string): boolean; 9516 function getScriptKind(srcFile: SourceFile): ScriptKind; 9517 function isStdLibraryType(type: Type): boolean; 9518 function isStdLibrarySymbol(sym: Symbol | undefined): boolean; 9519 function isIntrinsicObjectType(type: Type): boolean; 9520 function isOhModulesEtsSymbol(sym: ts.Symbol | undefined): boolean; 9521 function isDynamicType(type: Type | undefined): boolean | undefined; 9522 function isObjectType(type: ts.Type): type is ts.ObjectType; 9523 function isAnonymous(type: ts.Type): boolean; 9524 function isDynamicLiteralInitializer(expr: Expression): boolean; 9525 function isEsObjectType(typeNode: ts.TypeNode | undefined): boolean; 9526 function isInsideBlock(node: ts.Node): boolean; 9527 function isEsObjectPossiblyAllowed(typeRef: ts.TypeReferenceNode): boolean; 9528 function isValueAssignableToESObject(node: ts.Node): boolean; 9529 function getVariableDeclarationTypeNode(node: Node): TypeNode | undefined; 9530 function getSymbolDeclarationTypeNode(sym: ts.Symbol): ts.TypeNode | undefined; 9531 function hasEsObjectType(node: Node): boolean; 9532 function symbolHasEsObjectType(sym: ts.Symbol): boolean; 9533 function isEsObjectSymbol(sym: Symbol): boolean; 9534 function isAnonymousType(type: Type): boolean; 9535 function getSymbolOfCallExpression(callExpr: CallExpression): Symbol | undefined; 9536 function typeIsRecursive(topType: Type, type?: Type | undefined): boolean; 9537 function getTypeOrTypeConstraintAtLocation(expr: ts.Expression): ts.Type; 9538 function isStdBigIntType(type: ts.Type): boolean; 9539 function isStdNumberType(type: ts.Type): boolean; 9540 function isStdBooleanType(type: ts.Type): boolean; 9541 function isEnumStringLiteral(expr: ts.Expression): boolean; 9542 function isValidComputedPropertyName(computedProperty: ComputedPropertyName, isRecordObjectInitializer?: boolean): boolean; 9543 function isAllowedIndexSignature(node: ts.IndexSignatureDeclaration): boolean; 9544 function isArkTSCollectionsArrayLikeType(type: ts.Type): boolean; 9545 function isArkTSCollectionsClassOrInterfaceDeclaration(decl: ts.Node): boolean; 9546 function getDecoratorName(decorator: ts.Decorator): string; 9547 function unwrapParenthesizedTypeNode(typeNode: ts.TypeNode): ts.TypeNode; 9548 function isSendableTypeNode(typeNode: ts.TypeNode, isShared?: boolean): boolean; 9549 function isSendableType(type: ts.Type): boolean; 9550 function isShareableType(tsType: ts.Type): boolean; 9551 function isSendableClassOrInterface(type: ts.Type): boolean; 9552 function typeContainsSendableClassOrInterface(type: ts.Type): boolean; 9553 function typeContainsNonSendableClassOrInterface(type: ts.Type): boolean; 9554 function isConstEnum(sym: ts.Symbol | undefined): boolean; 9555 function isSendableUnionType(type: ts.UnionType): boolean; 9556 function hasSendableDecorator(decl: ts.ClassDeclaration | ts.FunctionDeclaration | ts.TypeAliasDeclaration): boolean; 9557 function getNonSendableDecorators(decl: ts.ClassDeclaration | ts.FunctionDeclaration | ts.TypeAliasDeclaration): ts.Decorator[] | undefined; 9558 function getSendableDecorator(decl: ts.ClassDeclaration | ts.FunctionDeclaration | ts.TypeAliasDeclaration): ts.Decorator | undefined; 9559 function getDecoratorsIfInSendableClass(declaration: ts.HasDecorators): readonly ts.Decorator[] | undefined; 9560 function isISendableInterface(type: ts.Type): boolean; 9561 function isSharedModule(sourceFile: ts.SourceFile): boolean; 9562 function getDeclarationNode(node: ts.Node): ts.Declaration | undefined; 9563 function isShareableEntity(node: ts.Node): boolean; 9564 function isSendableClassOrInterfaceEntity(node: ts.Node): boolean; 9565 function isInImportWhiteList(resolvedModule: ResolvedModuleFull): boolean; 9566 function hasSendableDecoratorFunctionOverload(decl: ts.FunctionDeclaration): boolean; 9567 function isSendableFunction(type: ts.Type): boolean; 9568 function isSendableTypeAlias(type: ts.Type): boolean; 9569 function hasSendableTypeAlias(type: ts.Type): boolean; 9570 function isNonSendableFunctionTypeAlias(type: ts.Type): boolean; 9571 function isWrongSendableFunctionAssignment(lhsType: ts.Type, rhsType: ts.Type): boolean; 9572 function searchFileExportDecl(sourceFile: ts.SourceFile, targetDecls?: ts.SyntaxKind[]): Set<ts.Node>; 9573 function clearUtilsGlobalvariables(): void; 9574 } 9575 } 9576} 9577declare namespace ts { 9578 namespace ArkTSLinter_1_1 { 9579 namespace Autofixer { 9580 import AutofixInfo = Common.AutofixInfo; 9581 import FaultID = Problems.FaultID; 9582 const AUTOFIX_ALL: AutofixInfo; 9583 const autofixInfo: AutofixInfo[]; 9584 function shouldAutofix(node: Node, faultID: FaultID): boolean; 9585 interface Autofix { 9586 replacementText: string; 9587 start: number; 9588 end: number; 9589 } 9590 function fixLiteralAsPropertyName(node: Node): Autofix[] | undefined; 9591 function fixPropertyAccessByIndex(node: Node): Autofix[] | undefined; 9592 function fixFunctionExpression(funcExpr: FunctionExpression, params?: NodeArray<ParameterDeclaration>, retType?: TypeNode | undefined): Autofix; 9593 function fixReturnType(funcLikeDecl: FunctionLikeDeclaration, typeNode: TypeNode): Autofix; 9594 function fixCtorParameterProperties(ctorDecl: ConstructorDeclaration, paramTypes: TypeNode[]): Autofix[] | undefined; 9595 } 9596 } 9597} 9598declare namespace ts { 9599 namespace ArkTSLinter_1_1 { 9600 import FaultID = Problems.FaultID; 9601 class LinterConfig { 9602 static nodeDesc: string[]; 9603 static tsSyntaxKindNames: string[]; 9604 static initStatic(): void; 9605 static terminalTokens: Set<SyntaxKind>; 9606 static incrementOnlyTokens: ESMap<SyntaxKind, FaultID>; 9607 } 9608 } 9609} 9610declare namespace ts { 9611 namespace ArkTSLinter_1_1 { 9612 import Autofix = Autofixer.Autofix; 9613 interface ProblemInfo { 9614 line: number; 9615 column: number; 9616 start: number; 9617 end: number; 9618 type: string; 9619 severity: number; 9620 problem: string; 9621 suggest: string; 9622 rule: string; 9623 ruleTag: number; 9624 autofixable: boolean; 9625 autofix?: Autofix[]; 9626 } 9627 class TypeScriptLinter { 9628 private sourceFile; 9629 private tscStrictDiagnostics?; 9630 static ideMode: boolean; 9631 static strictMode: boolean; 9632 static logTscErrors: boolean; 9633 static warningsAsErrors: boolean; 9634 static lintEtsOnly: boolean; 9635 static totalVisitedNodes: number; 9636 static nodeCounters: number[]; 9637 static lineCounters: number[]; 9638 static totalErrorLines: number; 9639 static errorLineNumbersString: string; 9640 static totalWarningLines: number; 9641 static warningLineNumbersString: string; 9642 static reportDiagnostics: boolean; 9643 static problemsInfos: ProblemInfo[]; 9644 static filteredDiagnosticMessages: DiagnosticMessageChain[]; 9645 static sharedModulesCache: ESMap<string, boolean>; 9646 static strictDiagnosticCache: Set<Diagnostic>; 9647 static unknowDiagnosticCache: Set<Diagnostic>; 9648 static initGlobals(): void; 9649 static initStatic(): void; 9650 static tsTypeChecker: TypeChecker; 9651 currentErrorLine: number; 9652 currentWarningLine: number; 9653 staticBlocks: Set<string>; 9654 skipArkTSStaticBlocksCheck: boolean; 9655 private fileExportDeclCaches?; 9656 private compatibleSdkVersionStage; 9657 private compatibleSdkVersion; 9658 constructor(sourceFile: SourceFile, tsProgram: Program, tscStrictDiagnostics?: Map<Diagnostic[]> | undefined); 9659 static clearTsTypeChecker(): void; 9660 readonly handlersMap: ESMap<SyntaxKind, (node: Node) => void>; 9661 incrementCounters(node: Node | CommentRange, faultId: number, autofixable?: boolean, autofix?: Autofix[]): void; 9662 private forEachNodeInSubtree; 9663 private visitSourceFile; 9664 private countInterfaceExtendsDifferentPropertyTypes; 9665 private countDeclarationsWithDuplicateName; 9666 private countClassMembersWithDuplicateName; 9667 private static scopeContainsThis; 9668 private isPrototypePropertyAccess; 9669 private interfaceInheritanceLint; 9670 private lintForInterfaceExtendsDifferentPorpertyTypes; 9671 private handleObjectLiteralExpression; 9672 private handleArrayLiteralExpression; 9673 private handleParameter; 9674 private handleEnumDeclaration; 9675 private handleInterfaceDeclaration; 9676 private handleThrowStatement; 9677 private handleForStatement; 9678 private handleForInStatement; 9679 private handleForOfStatement; 9680 private handleImportDeclaration; 9681 private handleSharedModuleNoSideEffectImport; 9682 private static inSharedModule; 9683 private handlePropertyAccessExpression; 9684 private handlePropertyDeclaration; 9685 private handleSendableClassProperty; 9686 private checkTypeAliasInSendableScope; 9687 private isNoneSendableTypeAlias; 9688 private handlePropertyAssignment; 9689 private handlePropertySignature; 9690 private handleSendableInterfaceProperty; 9691 private filterOutDecoratorsDiagnostics; 9692 private static isClassLikeOrIface; 9693 private handleFunctionExpression; 9694 private handleArrowFunction; 9695 private handleFunctionDeclaration; 9696 private handleMissingReturnType; 9697 private hasLimitedTypeInferenceFromReturnExpr; 9698 private isValidTypeForUnaryArithmeticOperator; 9699 private handlePrefixUnaryExpression; 9700 private handleBinaryExpression; 9701 private handleVariableDeclarationList; 9702 private handleVariableDeclaration; 9703 private handleEsObjectDelaration; 9704 private handleEsObjectAssignment; 9705 private handleCatchClause; 9706 private handleClassDeclaration; 9707 private scanCapturedVarsInSendableScope; 9708 private checkLocalDecl; 9709 private checkLocalDeclWithSendableClosure; 9710 private checkIsTopClosure; 9711 private checkNamespaceImportVar; 9712 isFileExportDecl(decl: ts.Declaration): boolean; 9713 private checkClassDeclarationHeritageClause; 9714 private isValidSendableClassExtends; 9715 private checkSendableTypeParameter; 9716 private processClassStaticBlocks; 9717 private handleModuleDeclaration; 9718 private handleTypeAliasDeclaration; 9719 private handleImportClause; 9720 private handleImportSpecifier; 9721 private handleNamespaceImport; 9722 private handleTypeAssertionExpression; 9723 private handleMethodDeclaration; 9724 private handleMethodSignature; 9725 private handleIdentifier; 9726 private isAllowedClassValueContext; 9727 private handleRestrictedValues; 9728 private identiferUseInValueContext; 9729 private isEnumPropAccess; 9730 private isElementAcessAllowed; 9731 private handleElementAccessExpression; 9732 private handleEnumMember; 9733 private handleExportAssignment; 9734 private handleCallExpression; 9735 private handleEtsComponentExpression; 9736 private handleImportCall; 9737 private handleRequireCall; 9738 private handleGenericCallWithNoTypeArgs; 9739 private static readonly listFunctionApplyCallApis; 9740 private static readonly listFunctionBindApis; 9741 private handleFunctionApplyBindPropCall; 9742 private handleStructIdentAndUndefinedInArgs; 9743 private static LimitedApis; 9744 private handleStdlibAPICall; 9745 private handleLibraryTypeCall; 9746 private handleNewExpression; 9747 private handleSendableGenericTypes; 9748 private handleAsExpression; 9749 private handleTypeReference; 9750 private checkSendableTypeArguments; 9751 private handleMetaProperty; 9752 private handleSpreadOp; 9753 private handleConstructSignature; 9754 private handleExpressionWithTypeArguments; 9755 private handleComputedPropertyName; 9756 private isSendableCompPropName; 9757 private handleGetAccessor; 9758 private handleSetAccessor; 9759 private handleDeclarationInferredType; 9760 private handleDefiniteAssignmentAssertion; 9761 private validatedTypesSet; 9762 private checkAnyOrUnknownChildNode; 9763 private handleInferredObjectreference; 9764 private validateDeclInferredType; 9765 private processNoCheckEntry; 9766 private reportThisKeywordsInScope; 9767 private handleCommentDirectives; 9768 private handleClassStaticBlockDeclaration; 9769 private handleIndexSignature; 9770 lint(): void; 9771 private handleExportKeyword; 9772 private handleExportDeclaration; 9773 private handleReturnStatement; 9774 /** 9775 * 'arkts-no-structural-typing' check was missing in some scenarios, 9776 * in order not to cause incompatibility, 9777 * only need to strictly match the type of filling the check again 9778 */ 9779 private checkAssignmentMatching; 9780 private handleDecorator; 9781 private isSendableDecoratorValid; 9782 } 9783 } 9784} 9785declare namespace ts { 9786 namespace ArkTSLinter_1_1 { 9787 import Autofix = Autofixer.Autofix; 9788 interface KitSymbol { 9789 source: string; 9790 bindings: string; 9791 } 9792 type KitSymbols = Record<string, KitSymbol>; 9793 interface KitInfo { 9794 symbols?: KitSymbols; 9795 } 9796 class InteropTypescriptLinter { 9797 private sourceFile; 9798 private isInSdk; 9799 static strictMode: boolean; 9800 static totalVisitedNodes: number; 9801 static nodeCounters: number[]; 9802 static lineCounters: number[]; 9803 static totalErrorLines: number; 9804 static errorLineNumbersString: string; 9805 static totalWarningLines: number; 9806 static warningLineNumbersString: string; 9807 static reportDiagnostics: boolean; 9808 static problemsInfos: ProblemInfo[]; 9809 static initGlobals(): void; 9810 static initStatic(): void; 9811 static tsTypeChecker: TypeChecker; 9812 static etsLoaderPath?: string; 9813 static kitInfos: Map<KitInfo>; 9814 private KIT; 9815 private D_TS; 9816 private D_ETS; 9817 private ETS; 9818 private SDK_PATH; 9819 currentErrorLine: number; 9820 currentWarningLine: number; 9821 constructor(sourceFile: SourceFile, tsProgram: Program, isInSdk: boolean); 9822 static clearTsTypeChecker(): void; 9823 readonly handlersMap: ESMap<SyntaxKind, (node: Node) => void>; 9824 incrementCounters(node: Node | CommentRange, faultId: number, autofixable?: boolean, autofix?: Autofix[]): void; 9825 private forEachNodeInSubtree; 9826 private visitSourceFile; 9827 private handleImportDeclaration; 9828 private checkSendableClassorISendable; 9829 private checkKitImportClause; 9830 private checkImportClause; 9831 private allowInSdkImportSendable; 9832 private handleClassDeclaration; 9833 private checkClassOrInterfaceDeclarationHeritageClause; 9834 private handleInterfaceDeclaration; 9835 private handleNewExpression; 9836 private handleSendableGenericTypes; 9837 private handleObjectLiteralExpression; 9838 private handleArrayLiteralExpression; 9839 private handleAsExpression; 9840 private handleExportDeclaration; 9841 private handleExportAssignment; 9842 private initKitInfos; 9843 private getKitModuleFileNames; 9844 lint(): void; 9845 } 9846 } 9847} 9848declare namespace ts { 9849 namespace ArkTSLinter_1_1 { 9850 class TSCCompiledProgram { 9851 private diagnosticsExtractor; 9852 constructor(program: BuilderProgram); 9853 getProgram(): Program; 9854 getBuilderProgram(): BuilderProgram; 9855 getStrictDiagnostics(sourceFile: SourceFile): Diagnostic[]; 9856 doAllGetDiagnostics(): void; 9857 } 9858 } 9859} 9860declare namespace ts { 9861 namespace ArkTSLinter_1_1 { 9862 function translateDiag(srcFile: SourceFile, problemInfo: ProblemInfo): Diagnostic; 9863 function runArkTSLinter(tsBuilderProgram: BuilderProgram, srcFile?: SourceFile, buildInfoWriteFile?: WriteFileCallback, arkTSVersion?: string): Diagnostic[]; 9864 } 9865} 9866declare namespace ts { 9867 enum TimePhase { 9868 START = "start", 9869 GET_PROGRAM = "getProgram(not ArkTSLinter)", 9870 UPDATE_ERROR_FILE = "updateErrorFile", 9871 INIT = "init", 9872 STRICT_PROGRAM_GET_SEMANTIC_DIAGNOSTICS = "strictProgramGetSemanticDiagnostics", 9873 NON_STRICT_PROGRAM_GET_SEMANTIC_DIAGNOSTICS = "nonStrictProgramGetSemanticDiagnostics", 9874 NON_STRICT_PROGRAM_GET_SYNTACTIC_DIAGNOSTICS = "nonStrictProgramGetSyntacticDiagnostics", 9875 GET_TSC_DIAGNOSTICS = "getTscDiagnostics", 9876 EMIT_BUILD_INFO = "emitBuildInfo", 9877 LINT = "lint" 9878 } 9879 class ArkTSLinterTimePrinter { 9880 private static instance?; 9881 private arkTSTimePrintSwitch; 9882 private timeMap; 9883 private constructor(); 9884 static getInstance(): ArkTSLinterTimePrinter; 9885 static destroyInstance(): void; 9886 setArkTSTimePrintSwitch(arkTSTimePrintSwitch: boolean): void; 9887 appendTime(key: string): void; 9888 private formatMapAsTable; 9889 printTimes(): void; 9890 } 9891} 9892