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 } 2358 export type RedirectTargetsMap = ReadonlyESMap<Path, readonly string[]>; 2359 export interface ResolvedProjectReference { 2360 commandLine: ParsedCommandLine; 2361 sourceFile: SourceFile; 2362 references?: readonly (ResolvedProjectReference | undefined)[]; 2363 } 2364 export type CustomTransformerFactory = (context: TransformationContext) => CustomTransformer; 2365 export interface CustomTransformer { 2366 transformSourceFile(node: SourceFile): SourceFile; 2367 transformBundle(node: Bundle): Bundle; 2368 } 2369 export interface CustomTransformers { 2370 /** Custom transformers to evaluate before built-in .js transformations. */ 2371 before?: (TransformerFactory<SourceFile> | CustomTransformerFactory)[]; 2372 /** Custom transformers to evaluate after built-in .js transformations. */ 2373 after?: (TransformerFactory<SourceFile> | CustomTransformerFactory)[]; 2374 /** Custom transformers to evaluate after built-in .d.ts transformations. */ 2375 afterDeclarations?: (TransformerFactory<Bundle | SourceFile> | CustomTransformerFactory)[]; 2376 } 2377 export interface SourceMapSpan { 2378 /** Line number in the .js file. */ 2379 emittedLine: number; 2380 /** Column number in the .js file. */ 2381 emittedColumn: number; 2382 /** Line number in the .ts file. */ 2383 sourceLine: number; 2384 /** Column number in the .ts file. */ 2385 sourceColumn: number; 2386 /** Optional name (index into names array) associated with this span. */ 2387 nameIndex?: number; 2388 /** .ts file (index into sources array) associated with this span */ 2389 sourceIndex: number; 2390 } 2391 /** Return code used by getEmitOutput function to indicate status of the function */ 2392 export enum ExitStatus { 2393 Success = 0, 2394 DiagnosticsPresent_OutputsSkipped = 1, 2395 DiagnosticsPresent_OutputsGenerated = 2, 2396 InvalidProject_OutputsSkipped = 3, 2397 ProjectReferenceCycle_OutputsSkipped = 4, 2398 /** @deprecated Use ProjectReferenceCycle_OutputsSkipped instead. */ 2399 ProjectReferenceCycle_OutputsSkupped = 4 2400 } 2401 export interface EmitResult { 2402 emitSkipped: boolean; 2403 /** Contains declaration emit diagnostics */ 2404 diagnostics: readonly Diagnostic[]; 2405 emittedFiles?: string[]; 2406 } 2407 export interface TypeChecker { 2408 getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; 2409 getDeclaredTypeOfSymbol(symbol: Symbol): Type; 2410 getPropertiesOfType(type: Type): Symbol[]; 2411 getPropertyOfType(type: Type, propertyName: string): Symbol | undefined; 2412 getPrivateIdentifierPropertyOfType(leftType: Type, name: string, location: Node): Symbol | undefined; 2413 getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined; 2414 getIndexInfosOfType(type: Type): readonly IndexInfo[]; 2415 getIndexInfosOfIndexSymbol: (indexSymbol: Symbol) => IndexInfo[]; 2416 getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[]; 2417 getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined; 2418 getBaseTypes(type: InterfaceType): BaseType[]; 2419 getBaseTypeOfLiteralType(type: Type): Type; 2420 getWidenedType(type: Type): Type; 2421 getReturnTypeOfSignature(signature: Signature): Type; 2422 getNullableType(type: Type, flags: TypeFlags): Type; 2423 getNonNullableType(type: Type): Type; 2424 getTypeArguments(type: TypeReference): readonly Type[]; 2425 /** Note that the resulting nodes cannot be checked. */ 2426 typeToTypeNode(type: Type, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeNode | undefined; 2427 /** Note that the resulting nodes cannot be checked. */ 2428 signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): SignatureDeclaration & { 2429 typeArguments?: NodeArray<TypeNode>; 2430 } | undefined; 2431 /** Note that the resulting nodes cannot be checked. */ 2432 indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): IndexSignatureDeclaration | undefined; 2433 /** Note that the resulting nodes cannot be checked. */ 2434 symbolToEntityName(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): EntityName | undefined; 2435 /** Note that the resulting nodes cannot be checked. */ 2436 symbolToExpression(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): Expression | undefined; 2437 /** Note that the resulting nodes cannot be checked. */ 2438 symbolToTypeParameterDeclarations(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): NodeArray<TypeParameterDeclaration> | undefined; 2439 /** Note that the resulting nodes cannot be checked. */ 2440 symbolToParameterDeclaration(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): ParameterDeclaration | undefined; 2441 /** Note that the resulting nodes cannot be checked. */ 2442 typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeParameterDeclaration | undefined; 2443 getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; 2444 getSymbolAtLocation(node: Node): Symbol | undefined; 2445 getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[]; 2446 /** 2447 * The function returns the value (local variable) symbol of an identifier in the short-hand property assignment. 2448 * This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value. 2449 */ 2450 getShorthandAssignmentValueSymbol(location: Node | undefined): Symbol | undefined; 2451 getExportSpecifierLocalTargetSymbol(location: ExportSpecifier | Identifier): Symbol | undefined; 2452 /** 2453 * If a symbol is a local symbol with an associated exported symbol, returns the exported symbol. 2454 * Otherwise returns its input. 2455 * For example, at `export type T = number;`: 2456 * - `getSymbolAtLocation` at the location `T` will return the exported symbol for `T`. 2457 * - But the result of `getSymbolsInScope` will contain the *local* symbol for `T`, not the exported symbol. 2458 * - Calling `getExportSymbolOfSymbol` on that local symbol will return the exported symbol. 2459 */ 2460 getExportSymbolOfSymbol(symbol: Symbol): Symbol; 2461 getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol | undefined; 2462 getTypeOfAssignmentPattern(pattern: AssignmentPattern): Type; 2463 getTypeAtLocation(node: Node): Type; 2464 tryGetTypeAtLocationWithoutCheck(node: Node): Type; 2465 getTypeFromTypeNode(node: TypeNode): Type; 2466 signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string; 2467 typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; 2468 symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): string; 2469 typePredicateToString(predicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; 2470 getFullyQualifiedName(symbol: Symbol): string; 2471 getAugmentedPropertiesOfType(type: Type): Symbol[]; 2472 getRootSymbols(symbol: Symbol): readonly Symbol[]; 2473 getSymbolOfExpando(node: Node, allowDeclaration: boolean): Symbol | undefined; 2474 getContextualType(node: Expression): Type | undefined; 2475 /** 2476 * returns unknownSignature in the case of an error. 2477 * returns undefined if the node is not valid. 2478 * @param argumentCount Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`. 2479 */ 2480 getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined; 2481 tryGetResolvedSignatureWithoutCheck(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined; 2482 getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined; 2483 isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined; 2484 isUndefinedSymbol(symbol: Symbol): boolean; 2485 isArgumentsSymbol(symbol: Symbol): boolean; 2486 isUnknownSymbol(symbol: Symbol): boolean; 2487 getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined; 2488 isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName | ImportTypeNode, propertyName: string): boolean; 2489 /** Follow all aliases to get the original symbol. */ 2490 getAliasedSymbol(symbol: Symbol): Symbol; 2491 /** Follow a *single* alias to get the immediately aliased symbol. */ 2492 getImmediateAliasedSymbol(symbol: Symbol): Symbol | undefined; 2493 getExportsOfModule(moduleSymbol: Symbol): Symbol[]; 2494 getJsxIntrinsicTagNamesAt(location: Node): Symbol[]; 2495 isOptionalParameter(node: ParameterDeclaration): boolean; 2496 getAmbientModules(): Symbol[]; 2497 tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined; 2498 getApparentType(type: Type): Type; 2499 getBaseConstraintOfType(type: Type): Type | undefined; 2500 getDefaultFromTypeParameter(type: Type): Type | undefined; 2501 getTypePredicateOfSignature(signature: Signature): TypePredicate | undefined; 2502 /** 2503 * Depending on the operation performed, it may be appropriate to throw away the checker 2504 * if the cancellation token is triggered. Typically, if it is used for error checking 2505 * and the operation is cancelled, then it should be discarded, otherwise it is safe to keep. 2506 */ 2507 runWithCancellationToken<T>(token: CancellationToken, cb: (checker: TypeChecker) => T): T; 2508 getConstEnumRelate?(): ESMap<string, ESMap<string, string>>; 2509 clearConstEnumRelate?(): void; 2510 deleteConstEnumRelate?(path: string): void; 2511 } 2512 export enum NodeBuilderFlags { 2513 None = 0, 2514 NoTruncation = 1, 2515 WriteArrayAsGenericType = 2, 2516 GenerateNamesForShadowedTypeParams = 4, 2517 UseStructuralFallback = 8, 2518 ForbidIndexedAccessSymbolReferences = 16, 2519 WriteTypeArgumentsOfSignature = 32, 2520 UseFullyQualifiedType = 64, 2521 UseOnlyExternalAliasing = 128, 2522 SuppressAnyReturnType = 256, 2523 WriteTypeParametersInQualifiedName = 512, 2524 MultilineObjectLiterals = 1024, 2525 WriteClassExpressionAsTypeLiteral = 2048, 2526 UseTypeOfFunction = 4096, 2527 OmitParameterModifiers = 8192, 2528 UseAliasDefinedOutsideCurrentScope = 16384, 2529 UseSingleQuotesForStringLiteralType = 268435456, 2530 NoTypeReduction = 536870912, 2531 OmitThisParameter = 33554432, 2532 AllowThisInObjectLiteral = 32768, 2533 AllowQualifiedNameInPlaceOfIdentifier = 65536, 2534 /** @deprecated AllowQualifedNameInPlaceOfIdentifier. Use AllowQualifiedNameInPlaceOfIdentifier instead. */ 2535 AllowQualifedNameInPlaceOfIdentifier = 65536, 2536 AllowAnonymousIdentifier = 131072, 2537 AllowEmptyUnionOrIntersection = 262144, 2538 AllowEmptyTuple = 524288, 2539 AllowUniqueESSymbolType = 1048576, 2540 AllowEmptyIndexInfoType = 2097152, 2541 AllowNodeModulesRelativePaths = 67108864, 2542 IgnoreErrors = 70221824, 2543 InObjectTypeLiteral = 4194304, 2544 InTypeAlias = 8388608, 2545 InInitialEntityName = 16777216 2546 } 2547 export enum TypeFormatFlags { 2548 None = 0, 2549 NoTruncation = 1, 2550 WriteArrayAsGenericType = 2, 2551 UseStructuralFallback = 8, 2552 WriteTypeArgumentsOfSignature = 32, 2553 UseFullyQualifiedType = 64, 2554 SuppressAnyReturnType = 256, 2555 MultilineObjectLiterals = 1024, 2556 WriteClassExpressionAsTypeLiteral = 2048, 2557 UseTypeOfFunction = 4096, 2558 OmitParameterModifiers = 8192, 2559 UseAliasDefinedOutsideCurrentScope = 16384, 2560 UseSingleQuotesForStringLiteralType = 268435456, 2561 NoTypeReduction = 536870912, 2562 OmitThisParameter = 33554432, 2563 AllowUniqueESSymbolType = 1048576, 2564 AddUndefined = 131072, 2565 WriteArrowStyleSignature = 262144, 2566 InArrayType = 524288, 2567 InElementType = 2097152, 2568 InFirstTypeArgument = 4194304, 2569 InTypeAlias = 8388608, 2570 /** @deprecated */ WriteOwnNameForAnyLike = 0, 2571 NodeBuilderFlagsMask = 848330091 2572 } 2573 export enum SymbolFormatFlags { 2574 None = 0, 2575 WriteTypeParametersOrArguments = 1, 2576 UseOnlyExternalAliasing = 2, 2577 AllowAnyNodeKind = 4, 2578 UseAliasDefinedOutsideCurrentScope = 8, 2579 } 2580 interface SymbolWriter extends SymbolTracker { 2581 writeKeyword(text: string): void; 2582 writeOperator(text: string): void; 2583 writePunctuation(text: string): void; 2584 writeSpace(text: string): void; 2585 writeStringLiteral(text: string): void; 2586 writeParameter(text: string): void; 2587 writeProperty(text: string): void; 2588 writeSymbol(text: string, symbol: Symbol): void; 2589 writeLine(force?: boolean): void; 2590 increaseIndent(): void; 2591 decreaseIndent(): void; 2592 clear(): void; 2593 } 2594 export enum TypePredicateKind { 2595 This = 0, 2596 Identifier = 1, 2597 AssertsThis = 2, 2598 AssertsIdentifier = 3 2599 } 2600 export interface TypePredicateBase { 2601 kind: TypePredicateKind; 2602 type: Type | undefined; 2603 } 2604 export interface ThisTypePredicate extends TypePredicateBase { 2605 kind: TypePredicateKind.This; 2606 parameterName: undefined; 2607 parameterIndex: undefined; 2608 type: Type; 2609 } 2610 export interface IdentifierTypePredicate extends TypePredicateBase { 2611 kind: TypePredicateKind.Identifier; 2612 parameterName: string; 2613 parameterIndex: number; 2614 type: Type; 2615 } 2616 export interface AssertsThisTypePredicate extends TypePredicateBase { 2617 kind: TypePredicateKind.AssertsThis; 2618 parameterName: undefined; 2619 parameterIndex: undefined; 2620 type: Type | undefined; 2621 } 2622 export interface AssertsIdentifierTypePredicate extends TypePredicateBase { 2623 kind: TypePredicateKind.AssertsIdentifier; 2624 parameterName: string; 2625 parameterIndex: number; 2626 type: Type | undefined; 2627 } 2628 export type TypePredicate = ThisTypePredicate | IdentifierTypePredicate | AssertsThisTypePredicate | AssertsIdentifierTypePredicate; 2629 export enum SymbolFlags { 2630 None = 0, 2631 FunctionScopedVariable = 1, 2632 BlockScopedVariable = 2, 2633 Property = 4, 2634 EnumMember = 8, 2635 Function = 16, 2636 Class = 32, 2637 Interface = 64, 2638 ConstEnum = 128, 2639 RegularEnum = 256, 2640 ValueModule = 512, 2641 NamespaceModule = 1024, 2642 TypeLiteral = 2048, 2643 ObjectLiteral = 4096, 2644 Method = 8192, 2645 Constructor = 16384, 2646 GetAccessor = 32768, 2647 SetAccessor = 65536, 2648 Signature = 131072, 2649 TypeParameter = 262144, 2650 TypeAlias = 524288, 2651 ExportValue = 1048576, 2652 Alias = 2097152, 2653 Prototype = 4194304, 2654 ExportStar = 8388608, 2655 Optional = 16777216, 2656 Transient = 33554432, 2657 Assignment = 67108864, 2658 ModuleExports = 134217728, 2659 Annotation = 268435456, 2660 Enum = 384, 2661 Variable = 3, 2662 Value = 111551, 2663 Type = 788968, 2664 Namespace = 1920, 2665 Module = 1536, 2666 Accessor = 98304, 2667 FunctionScopedVariableExcludes = 111550, 2668 BlockScopedVariableExcludes = 111551, 2669 ParameterExcludes = 111551, 2670 PropertyExcludes = 0, 2671 EnumMemberExcludes = 900095, 2672 FunctionExcludes = 110991, 2673 ClassExcludes = 899503, 2674 InterfaceExcludes = 788872, 2675 RegularEnumExcludes = 899327, 2676 ConstEnumExcludes = 899967, 2677 ValueModuleExcludes = 110735, 2678 NamespaceModuleExcludes = 0, 2679 MethodExcludes = 103359, 2680 GetAccessorExcludes = 46015, 2681 SetAccessorExcludes = 78783, 2682 AccessorExcludes = 13247, 2683 TypeParameterExcludes = 526824, 2684 TypeAliasExcludes = 788968, 2685 AliasExcludes = 2097152, 2686 ModuleMember = 2623475, 2687 ExportHasLocal = 944, 2688 BlockScoped = 418, 2689 PropertyOrAccessor = 98308, 2690 ClassMember = 106500, 2691 } 2692 export interface Symbol { 2693 flags: SymbolFlags; 2694 escapedName: __String; 2695 declarations?: Declaration[]; 2696 valueDeclaration?: Declaration; 2697 members?: SymbolTable; 2698 exports?: SymbolTable; 2699 globalExports?: SymbolTable; 2700 exportSymbol?: Symbol; 2701 } 2702 export enum InternalSymbolName { 2703 Call = "__call", 2704 Constructor = "__constructor", 2705 New = "__new", 2706 Index = "__index", 2707 ExportStar = "__export", 2708 Global = "__global", 2709 Missing = "__missing", 2710 Type = "__type", 2711 Object = "__object", 2712 JSXAttributes = "__jsxAttributes", 2713 Class = "__class", 2714 Function = "__function", 2715 Computed = "__computed", 2716 Resolving = "__resolving__", 2717 ExportEquals = "export=", 2718 Default = "default", 2719 This = "this" 2720 } 2721 /** 2722 * This represents a string whose leading underscore have been escaped by adding extra leading underscores. 2723 * The shape of this brand is rather unique compared to others we've used. 2724 * Instead of just an intersection of a string and an object, it is that union-ed 2725 * with an intersection of void and an object. This makes it wholly incompatible 2726 * with a normal string (which is good, it cannot be misused on assignment or on usage), 2727 * while still being comparable with a normal string via === (also good) and castable from a string. 2728 */ 2729 export type __String = (string & { 2730 __escapedIdentifier: void; 2731 }) | (void & { 2732 __escapedIdentifier: void; 2733 }) | InternalSymbolName; 2734 /** ReadonlyMap where keys are `__String`s. */ 2735 export interface ReadonlyUnderscoreEscapedMap<T> extends ReadonlyESMap<__String, T> { 2736 } 2737 /** Map where keys are `__String`s. */ 2738 export interface UnderscoreEscapedMap<T> extends ESMap<__String, T>, ReadonlyUnderscoreEscapedMap<T> { 2739 } 2740 /** SymbolTable based on ES6 Map interface. */ 2741 export type SymbolTable = UnderscoreEscapedMap<Symbol>; 2742 export enum TypeFlags { 2743 Any = 1, 2744 Unknown = 2, 2745 String = 4, 2746 Number = 8, 2747 Boolean = 16, 2748 Enum = 32, 2749 BigInt = 64, 2750 StringLiteral = 128, 2751 NumberLiteral = 256, 2752 BooleanLiteral = 512, 2753 EnumLiteral = 1024, 2754 BigIntLiteral = 2048, 2755 ESSymbol = 4096, 2756 UniqueESSymbol = 8192, 2757 Void = 16384, 2758 Undefined = 32768, 2759 Null = 65536, 2760 Never = 131072, 2761 TypeParameter = 262144, 2762 Object = 524288, 2763 Union = 1048576, 2764 Intersection = 2097152, 2765 Index = 4194304, 2766 IndexedAccess = 8388608, 2767 Conditional = 16777216, 2768 Substitution = 33554432, 2769 NonPrimitive = 67108864, 2770 TemplateLiteral = 134217728, 2771 StringMapping = 268435456, 2772 Literal = 2944, 2773 Unit = 109440, 2774 StringOrNumberLiteral = 384, 2775 PossiblyFalsy = 117724, 2776 StringLike = 402653316, 2777 NumberLike = 296, 2778 BigIntLike = 2112, 2779 BooleanLike = 528, 2780 EnumLike = 1056, 2781 ESSymbolLike = 12288, 2782 VoidLike = 49152, 2783 UnionOrIntersection = 3145728, 2784 StructuredType = 3670016, 2785 TypeVariable = 8650752, 2786 InstantiableNonPrimitive = 58982400, 2787 InstantiablePrimitive = 406847488, 2788 Instantiable = 465829888, 2789 StructuredOrInstantiable = 469499904, 2790 Narrowable = 536624127, 2791 } 2792 export type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression; 2793 export interface Type { 2794 flags: TypeFlags; 2795 symbol: Symbol; 2796 pattern?: DestructuringPattern; 2797 aliasSymbol?: Symbol; 2798 aliasTypeArguments?: readonly Type[]; 2799 } 2800 export interface LiteralType extends Type { 2801 value: string | number | PseudoBigInt; 2802 freshType: LiteralType; 2803 regularType: LiteralType; 2804 } 2805 export interface UniqueESSymbolType extends Type { 2806 symbol: Symbol; 2807 escapedName: __String; 2808 } 2809 export interface StringLiteralType extends LiteralType { 2810 value: string; 2811 } 2812 export interface NumberLiteralType extends LiteralType { 2813 value: number; 2814 } 2815 export interface BigIntLiteralType extends LiteralType { 2816 value: PseudoBigInt; 2817 } 2818 export interface EnumType extends Type { 2819 } 2820 export enum ObjectFlags { 2821 Class = 1, 2822 Interface = 2, 2823 Reference = 4, 2824 Tuple = 8, 2825 Anonymous = 16, 2826 Mapped = 32, 2827 Instantiated = 64, 2828 ObjectLiteral = 128, 2829 EvolvingArray = 256, 2830 ObjectLiteralPatternWithComputedProperties = 512, 2831 ReverseMapped = 1024, 2832 JsxAttributes = 2048, 2833 JSLiteral = 4096, 2834 FreshLiteral = 8192, 2835 ArrayLiteral = 16384, 2836 Annotation = 134217728, 2837 ClassOrInterface = 3, 2838 ContainsSpread = 2097152, 2839 ObjectRestType = 4194304, 2840 InstantiationExpressionType = 8388608, 2841 } 2842 export interface ObjectType extends Type { 2843 objectFlags: ObjectFlags; 2844 } 2845 /** Class and interface types (ObjectFlags.Class and ObjectFlags.Interface). */ 2846 export interface InterfaceType extends ObjectType { 2847 typeParameters: TypeParameter[] | undefined; 2848 outerTypeParameters: TypeParameter[] | undefined; 2849 localTypeParameters: TypeParameter[] | undefined; 2850 thisType: TypeParameter | undefined; 2851 } 2852 export type BaseType = ObjectType | IntersectionType | TypeVariable; 2853 export interface InterfaceTypeWithDeclaredMembers extends InterfaceType { 2854 declaredProperties: Symbol[]; 2855 declaredCallSignatures: Signature[]; 2856 declaredConstructSignatures: Signature[]; 2857 declaredIndexInfos: IndexInfo[]; 2858 } 2859 /** 2860 * Type references (ObjectFlags.Reference). When a class or interface has type parameters or 2861 * a "this" type, references to the class or interface are made using type references. The 2862 * typeArguments property specifies the types to substitute for the type parameters of the 2863 * class or interface and optionally includes an extra element that specifies the type to 2864 * substitute for "this" in the resulting instantiation. When no extra argument is present, 2865 * the type reference itself is substituted for "this". The typeArguments property is undefined 2866 * if the class or interface has no type parameters and the reference isn't specifying an 2867 * explicit "this" argument. 2868 */ 2869 export interface TypeReference extends ObjectType { 2870 target: GenericType; 2871 node?: TypeReferenceNode | ArrayTypeNode | TupleTypeNode; 2872 } 2873 export interface DeferredTypeReference extends TypeReference { 2874 } 2875 export interface GenericType extends InterfaceType, TypeReference { 2876 } 2877 export enum ElementFlags { 2878 Required = 1, 2879 Optional = 2, 2880 Rest = 4, 2881 Variadic = 8, 2882 Fixed = 3, 2883 Variable = 12, 2884 NonRequired = 14, 2885 NonRest = 11 2886 } 2887 export interface TupleType extends GenericType { 2888 elementFlags: readonly ElementFlags[]; 2889 minLength: number; 2890 fixedLength: number; 2891 hasRestElement: boolean; 2892 combinedFlags: ElementFlags; 2893 readonly: boolean; 2894 labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration)[]; 2895 } 2896 export interface TupleTypeReference extends TypeReference { 2897 target: TupleType; 2898 } 2899 export interface UnionOrIntersectionType extends Type { 2900 types: Type[]; 2901 } 2902 export interface UnionType extends UnionOrIntersectionType { 2903 } 2904 export interface IntersectionType extends UnionOrIntersectionType { 2905 } 2906 export type StructuredType = ObjectType | UnionType | IntersectionType; 2907 export interface EvolvingArrayType extends ObjectType { 2908 elementType: Type; 2909 finalArrayType?: Type; 2910 } 2911 export interface InstantiableType extends Type { 2912 } 2913 export interface TypeParameter extends InstantiableType { 2914 } 2915 export interface IndexedAccessType extends InstantiableType { 2916 objectType: Type; 2917 indexType: Type; 2918 constraint?: Type; 2919 simplifiedForReading?: Type; 2920 simplifiedForWriting?: Type; 2921 } 2922 export type TypeVariable = TypeParameter | IndexedAccessType; 2923 export interface IndexType extends InstantiableType { 2924 type: InstantiableType | UnionOrIntersectionType; 2925 } 2926 export interface ConditionalRoot { 2927 node: ConditionalTypeNode; 2928 checkType: Type; 2929 extendsType: Type; 2930 isDistributive: boolean; 2931 inferTypeParameters?: TypeParameter[]; 2932 outerTypeParameters?: TypeParameter[]; 2933 instantiations?: Map<Type>; 2934 aliasSymbol?: Symbol; 2935 aliasTypeArguments?: Type[]; 2936 } 2937 export interface ConditionalType extends InstantiableType { 2938 root: ConditionalRoot; 2939 checkType: Type; 2940 extendsType: Type; 2941 resolvedTrueType?: Type; 2942 resolvedFalseType?: Type; 2943 } 2944 export interface TemplateLiteralType extends InstantiableType { 2945 texts: readonly string[]; 2946 types: readonly Type[]; 2947 } 2948 export interface StringMappingType extends InstantiableType { 2949 symbol: Symbol; 2950 type: Type; 2951 } 2952 export interface SubstitutionType extends InstantiableType { 2953 objectFlags: ObjectFlags; 2954 baseType: Type; 2955 constraint: Type; 2956 } 2957 export enum SignatureKind { 2958 Call = 0, 2959 Construct = 1 2960 } 2961 export interface Signature { 2962 declaration?: SignatureDeclaration | JSDocSignature; 2963 typeParameters?: readonly TypeParameter[]; 2964 parameters: readonly Symbol[]; 2965 } 2966 export enum IndexKind { 2967 String = 0, 2968 Number = 1 2969 } 2970 export interface IndexInfo { 2971 keyType: Type; 2972 type: Type; 2973 isReadonly: boolean; 2974 declaration?: IndexSignatureDeclaration; 2975 } 2976 export enum InferencePriority { 2977 NakedTypeVariable = 1, 2978 SpeculativeTuple = 2, 2979 SubstituteSource = 4, 2980 HomomorphicMappedType = 8, 2981 PartialHomomorphicMappedType = 16, 2982 MappedTypeConstraint = 32, 2983 ContravariantConditional = 64, 2984 ReturnType = 128, 2985 LiteralKeyof = 256, 2986 NoConstraints = 512, 2987 AlwaysStrict = 1024, 2988 MaxValue = 2048, 2989 PriorityImpliesCombination = 416, 2990 Circularity = -1 2991 } 2992 /** @deprecated Use FileExtensionInfo instead. */ 2993 export type JsFileExtensionInfo = FileExtensionInfo; 2994 export interface FileExtensionInfo { 2995 extension: string; 2996 isMixedContent: boolean; 2997 scriptKind?: ScriptKind; 2998 } 2999 export interface DiagnosticMessage { 3000 key: string; 3001 category: DiagnosticCategory; 3002 code: number; 3003 message: string; 3004 reportsUnnecessary?: {}; 3005 reportsDeprecated?: {}; 3006 } 3007 /** 3008 * A linked list of formatted diagnostic messages to be used as part of a multiline message. 3009 * It is built from the bottom up, leaving the head to be the "main" diagnostic. 3010 * While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage, 3011 * the difference is that messages are all preformatted in DMC. 3012 */ 3013 export interface DiagnosticMessageChain { 3014 messageText: string; 3015 category: DiagnosticCategory; 3016 code: number; 3017 next?: DiagnosticMessageChain[]; 3018 } 3019 export interface Diagnostic extends DiagnosticRelatedInformation { 3020 /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */ 3021 reportsUnnecessary?: {}; 3022 reportsDeprecated?: {}; 3023 source?: string; 3024 relatedInformation?: DiagnosticRelatedInformation[]; 3025 } 3026 export interface DiagnosticRelatedInformation { 3027 category: DiagnosticCategory; 3028 code: number; 3029 file: SourceFile | undefined; 3030 start: number | undefined; 3031 length: number | undefined; 3032 messageText: string | DiagnosticMessageChain; 3033 } 3034 export interface DiagnosticWithLocation extends Diagnostic { 3035 file: SourceFile; 3036 start: number; 3037 length: number; 3038 } 3039 export enum DiagnosticCategory { 3040 Warning = 0, 3041 Error = 1, 3042 Suggestion = 2, 3043 Message = 3 3044 } 3045 export enum ModuleResolutionKind { 3046 Classic = 1, 3047 NodeJs = 2, 3048 Node16 = 3, 3049 NodeNext = 99 3050 } 3051 export enum ModuleDetectionKind { 3052 /** 3053 * Files with imports, exports and/or import.meta are considered modules 3054 */ 3055 Legacy = 1, 3056 /** 3057 * Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node16+ 3058 */ 3059 Auto = 2, 3060 /** 3061 * Consider all non-declaration files modules, regardless of present syntax 3062 */ 3063 Force = 3 3064 } 3065 export interface PluginImport { 3066 name: string; 3067 } 3068 export interface ProjectReference { 3069 /** A normalized path on disk */ 3070 path: string; 3071 /** The path as the user originally wrote it */ 3072 originalPath?: string; 3073 /** True if the output of this reference should be prepended to the output of this project. Only valid for --outFile compilations */ 3074 prepend?: boolean; 3075 /** True if it is intended that this reference form a circularity */ 3076 circular?: boolean; 3077 } 3078 export enum WatchFileKind { 3079 FixedPollingInterval = 0, 3080 PriorityPollingInterval = 1, 3081 DynamicPriorityPolling = 2, 3082 FixedChunkSizePolling = 3, 3083 UseFsEvents = 4, 3084 UseFsEventsOnParentDirectory = 5 3085 } 3086 export enum WatchDirectoryKind { 3087 UseFsEvents = 0, 3088 FixedPollingInterval = 1, 3089 DynamicPriorityPolling = 2, 3090 FixedChunkSizePolling = 3 3091 } 3092 export enum PollingWatchKind { 3093 FixedInterval = 0, 3094 PriorityInterval = 1, 3095 DynamicPriority = 2, 3096 FixedChunkSize = 3 3097 } 3098 export type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined | EtsOptions; 3099 export interface CompilerOptions { 3100 allowJs?: boolean; 3101 allowSyntheticDefaultImports?: boolean; 3102 allowUmdGlobalAccess?: boolean; 3103 allowUnreachableCode?: boolean; 3104 allowUnusedLabels?: boolean; 3105 alwaysStrict?: boolean; 3106 baseUrl?: string; 3107 charset?: string; 3108 checkJs?: boolean; 3109 declaration?: boolean; 3110 declarationMap?: boolean; 3111 emitDeclarationOnly?: boolean; 3112 declarationDir?: string; 3113 disableSizeLimit?: boolean; 3114 disableSourceOfProjectReferenceRedirect?: boolean; 3115 disableSolutionSearching?: boolean; 3116 disableReferencedProjectLoad?: boolean; 3117 downlevelIteration?: boolean; 3118 emitBOM?: boolean; 3119 emitDecoratorMetadata?: boolean; 3120 exactOptionalPropertyTypes?: boolean; 3121 experimentalDecorators?: boolean; 3122 forceConsistentCasingInFileNames?: boolean; 3123 importHelpers?: boolean; 3124 importsNotUsedAsValues?: ImportsNotUsedAsValues; 3125 inlineSourceMap?: boolean; 3126 inlineSources?: boolean; 3127 isolatedModules?: boolean; 3128 jsx?: JsxEmit; 3129 keyofStringsOnly?: boolean; 3130 lib?: string[]; 3131 locale?: string; 3132 mapRoot?: string; 3133 maxNodeModuleJsDepth?: number; 3134 module?: ModuleKind; 3135 moduleResolution?: ModuleResolutionKind; 3136 moduleSuffixes?: string[]; 3137 moduleDetection?: ModuleDetectionKind; 3138 newLine?: NewLineKind; 3139 noEmit?: boolean; 3140 noEmitHelpers?: boolean; 3141 noEmitOnError?: boolean; 3142 noErrorTruncation?: boolean; 3143 noFallthroughCasesInSwitch?: boolean; 3144 noImplicitAny?: boolean; 3145 noImplicitReturns?: boolean; 3146 noImplicitThis?: boolean; 3147 noStrictGenericChecks?: boolean; 3148 noUnusedLocals?: boolean; 3149 noUnusedParameters?: boolean; 3150 noImplicitUseStrict?: boolean; 3151 noPropertyAccessFromIndexSignature?: boolean; 3152 assumeChangesOnlyAffectDirectDependencies?: boolean; 3153 noLib?: boolean; 3154 noResolve?: boolean; 3155 noUncheckedIndexedAccess?: boolean; 3156 out?: string; 3157 outDir?: string; 3158 outFile?: string; 3159 paths?: MapLike<string[]>; 3160 preserveConstEnums?: boolean; 3161 noImplicitOverride?: boolean; 3162 preserveSymlinks?: boolean; 3163 preserveValueImports?: boolean; 3164 project?: string; 3165 reactNamespace?: string; 3166 jsxFactory?: string; 3167 jsxFragmentFactory?: string; 3168 jsxImportSource?: string; 3169 composite?: boolean; 3170 incremental?: boolean; 3171 tsBuildInfoFile?: string; 3172 removeComments?: boolean; 3173 rootDir?: string; 3174 rootDirs?: string[]; 3175 skipLibCheck?: boolean; 3176 skipDefaultLibCheck?: boolean; 3177 sourceMap?: boolean; 3178 sourceRoot?: string; 3179 strict?: boolean; 3180 strictFunctionTypes?: boolean; 3181 strictBindCallApply?: boolean; 3182 strictNullChecks?: boolean; 3183 strictPropertyInitialization?: boolean; 3184 stripInternal?: boolean; 3185 suppressExcessPropertyErrors?: boolean; 3186 suppressImplicitAnyIndexErrors?: boolean; 3187 target?: ScriptTarget; 3188 traceResolution?: boolean; 3189 useUnknownInCatchVariables?: boolean; 3190 resolveJsonModule?: boolean; 3191 types?: string[]; 3192 /** Paths used to compute primary types search locations */ 3193 typeRoots?: string[]; 3194 esModuleInterop?: boolean; 3195 useDefineForClassFields?: boolean; 3196 ets?: EtsOptions; 3197 packageManagerType?: string; 3198 emitNodeModulesFiles?: boolean; 3199 etsLoaderPath?: string; 3200 tsImportSendableEnable?: boolean; 3201 skipPathsInKeyForCompilationSettings?: boolean; 3202 compatibleSdkVersion?: number; 3203 compatibleSdkVersionStage?: string; 3204 noTransformedKitInParser?: boolean; 3205 [option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined; 3206 etsAnnotationsEnable?: boolean; 3207 } 3208 export interface EtsOptions { 3209 render: { 3210 method: string[]; 3211 decorator: string[]; 3212 }; 3213 components: string[]; 3214 libs: string[]; 3215 extend: { 3216 decorator: string[]; 3217 components: { 3218 name: string; 3219 type: string; 3220 instance: string; 3221 }[]; 3222 }; 3223 styles: { 3224 decorator: string; 3225 component: { 3226 name: string; 3227 type: string; 3228 instance: string; 3229 }; 3230 property: string; 3231 }; 3232 concurrent: { 3233 decorator: string; 3234 }; 3235 customComponent?: string; 3236 propertyDecorators: { 3237 name: string; 3238 needInitialization: boolean; 3239 }[]; 3240 emitDecorators: { 3241 name: string; 3242 emitParameters: boolean; 3243 }[]; 3244 syntaxComponents: { 3245 paramsUICallback: string[]; 3246 attrUICallback: { 3247 name: string; 3248 attributes: string[]; 3249 }[]; 3250 }; 3251 } 3252 export interface WatchOptions { 3253 watchFile?: WatchFileKind; 3254 watchDirectory?: WatchDirectoryKind; 3255 fallbackPolling?: PollingWatchKind; 3256 synchronousWatchDirectory?: boolean; 3257 excludeDirectories?: string[]; 3258 excludeFiles?: string[]; 3259 [option: string]: CompilerOptionsValue | undefined; 3260 } 3261 export interface TypeAcquisition { 3262 /** 3263 * @deprecated typingOptions.enableAutoDiscovery 3264 * Use typeAcquisition.enable instead. 3265 */ 3266 enableAutoDiscovery?: boolean; 3267 enable?: boolean; 3268 include?: string[]; 3269 exclude?: string[]; 3270 disableFilenameBasedTypeAcquisition?: boolean; 3271 [option: string]: CompilerOptionsValue | undefined; 3272 } 3273 export enum ModuleKind { 3274 None = 0, 3275 CommonJS = 1, 3276 AMD = 2, 3277 UMD = 3, 3278 System = 4, 3279 ES2015 = 5, 3280 ES2020 = 6, 3281 ES2022 = 7, 3282 ESNext = 99, 3283 Node16 = 100, 3284 NodeNext = 199 3285 } 3286 export enum JsxEmit { 3287 None = 0, 3288 Preserve = 1, 3289 React = 2, 3290 ReactNative = 3, 3291 ReactJSX = 4, 3292 ReactJSXDev = 5 3293 } 3294 export enum ImportsNotUsedAsValues { 3295 Remove = 0, 3296 Preserve = 1, 3297 Error = 2 3298 } 3299 export enum NewLineKind { 3300 CarriageReturnLineFeed = 0, 3301 LineFeed = 1 3302 } 3303 export interface LineAndCharacter { 3304 /** 0-based. */ 3305 line: number; 3306 character: number; 3307 } 3308 export enum ScriptKind { 3309 Unknown = 0, 3310 JS = 1, 3311 JSX = 2, 3312 TS = 3, 3313 TSX = 4, 3314 External = 5, 3315 JSON = 6, 3316 /** 3317 * Used on extensions that doesn't define the ScriptKind but the content defines it. 3318 * Deferred extensions are going to be included in all project contexts. 3319 */ 3320 Deferred = 7, 3321 ETS = 8 3322 } 3323 export enum ScriptTarget { 3324 ES3 = 0, 3325 ES5 = 1, 3326 ES2015 = 2, 3327 ES2016 = 3, 3328 ES2017 = 4, 3329 ES2018 = 5, 3330 ES2019 = 6, 3331 ES2020 = 7, 3332 ES2021 = 8, 3333 ES2022 = 9, 3334 ESNext = 99, 3335 JSON = 100, 3336 Latest = 99 3337 } 3338 export enum LanguageVariant { 3339 Standard = 0, 3340 JSX = 1 3341 } 3342 /** Either a parsed command line or a parsed tsconfig.json */ 3343 export interface ParsedCommandLine { 3344 options: CompilerOptions; 3345 typeAcquisition?: TypeAcquisition; 3346 fileNames: string[]; 3347 projectReferences?: readonly ProjectReference[]; 3348 watchOptions?: WatchOptions; 3349 raw?: any; 3350 errors: Diagnostic[]; 3351 wildcardDirectories?: MapLike<WatchDirectoryFlags>; 3352 compileOnSave?: boolean; 3353 } 3354 export enum WatchDirectoryFlags { 3355 None = 0, 3356 Recursive = 1 3357 } 3358 export interface CreateProgramOptions { 3359 rootNames: readonly string[]; 3360 options: CompilerOptions; 3361 projectReferences?: readonly ProjectReference[]; 3362 host?: CompilerHost; 3363 oldProgram?: Program; 3364 configFileParsingDiagnostics?: readonly Diagnostic[]; 3365 } 3366 export interface ModuleResolutionHost { 3367 fileExists(fileName: string): boolean; 3368 readFile(fileName: string): string | undefined; 3369 trace?(s: string): void; 3370 directoryExists?(directoryName: string): boolean; 3371 /** 3372 * Resolve a symbolic link. 3373 * @see https://nodejs.org/api/fs.html#fs_fs_realpathsync_path_options 3374 */ 3375 realpath?(path: string): string; 3376 getCurrentDirectory?(): string; 3377 getDirectories?(path: string): string[]; 3378 useCaseSensitiveFileNames?: boolean | (() => boolean) | undefined; 3379 getJsDocNodeCheckedConfig?(jsDocFileCheckInfo: FileCheckModuleInfo, symbolSourceFilePath: string): JsDocNodeCheckConfig; 3380 getJsDocNodeConditionCheckedResult?(jsDocFileCheckedInfo: FileCheckModuleInfo, jsDocs: JsDocTagInfo[]): ConditionCheckResult; 3381 getFileCheckedModuleInfo?(containFilePath: string): FileCheckModuleInfo; 3382 } 3383 /** 3384 * Used by services to specify the minimum host area required to set up source files under any compilation settings 3385 */ 3386 export interface MinimalResolutionCacheHost extends ModuleResolutionHost { 3387 getCompilationSettings(): CompilerOptions; 3388 getCompilerHost?(): CompilerHost | undefined; 3389 } 3390 /** 3391 * Represents the result of module resolution. 3392 * Module resolution will pick up tsx/jsx/js files even if '--jsx' and '--allowJs' are turned off. 3393 * The Program will then filter results based on these flags. 3394 * 3395 * Prefer to return a `ResolvedModuleFull` so that the file type does not have to be inferred. 3396 */ 3397 export interface ResolvedModule { 3398 /** Path of the file the module was resolved to. */ 3399 resolvedFileName: string; 3400 /** True if `resolvedFileName` comes from `node_modules`. */ 3401 isExternalLibraryImport?: boolean; 3402 } 3403 /** 3404 * ResolvedModule with an explicitly provided `extension` property. 3405 * Prefer this over `ResolvedModule`. 3406 * If changing this, remember to change `moduleResolutionIsEqualTo`. 3407 */ 3408 export interface ResolvedModuleFull extends ResolvedModule { 3409 /** 3410 * Extension of resolvedFileName. This must match what's at the end of resolvedFileName. 3411 * This is optional for backwards-compatibility, but will be added if not provided. 3412 */ 3413 extension: Extension; 3414 packageId?: PackageId; 3415 } 3416 /** 3417 * Unique identifier with a package name and version. 3418 * If changing this, remember to change `packageIdIsEqual`. 3419 */ 3420 export interface PackageId { 3421 /** 3422 * Name of the package. 3423 * Should not include `@types`. 3424 * If accessing a non-index file, this should include its name e.g. "foo/bar". 3425 */ 3426 name: string; 3427 /** 3428 * Name of a submodule within this package. 3429 * May be "". 3430 */ 3431 subModuleName: string; 3432 /** Version of the package, e.g. "1.2.3" */ 3433 version: string; 3434 } 3435 export enum Extension { 3436 Ts = ".ts", 3437 Tsx = ".tsx", 3438 Dts = ".d.ts", 3439 Js = ".js", 3440 Jsx = ".jsx", 3441 Json = ".json", 3442 TsBuildInfo = ".tsbuildinfo", 3443 Mjs = ".mjs", 3444 Mts = ".mts", 3445 Dmts = ".d.mts", 3446 Cjs = ".cjs", 3447 Cts = ".cts", 3448 Dcts = ".d.cts", 3449 Ets = ".ets", 3450 Dets = ".d.ets" 3451 } 3452 export interface ResolvedModuleWithFailedLookupLocations { 3453 readonly resolvedModule: ResolvedModuleFull | undefined; 3454 } 3455 export interface ResolvedTypeReferenceDirective { 3456 primary: boolean; 3457 resolvedFileName: string | undefined; 3458 packageId?: PackageId; 3459 /** True if `resolvedFileName` comes from `node_modules` or `oh_modules`. */ 3460 isExternalLibraryImport?: boolean; 3461 } 3462 export interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations { 3463 readonly resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective | undefined; 3464 readonly failedLookupLocations: string[]; 3465 } 3466 export interface FileCheckModuleInfo { 3467 fileNeedCheck: boolean; 3468 checkPayload: any; 3469 currentFileName: string; 3470 } 3471 export interface JsDocNodeCheckConfig { 3472 nodeNeedCheck: boolean; 3473 checkConfig: JsDocNodeCheckConfigItem[]; 3474 } 3475 export interface JsDocNodeCheckConfigItem { 3476 tagName: string[]; 3477 message: string; 3478 needConditionCheck: boolean; 3479 type: DiagnosticCategory; 3480 specifyCheckConditionFuncName: string; 3481 tagNameShouldExisted: boolean; 3482 checkValidCallback?: (jsDocTag: JSDocTag, config: JsDocNodeCheckConfigItem) => boolean; 3483 checkJsDocSpecialValidCallback?: (jsDocTags: readonly JSDocTag[], config: JsDocNodeCheckConfigItem) => boolean; 3484 } 3485 export interface TagCheckParam { 3486 needCheck: boolean; 3487 checkConfig: TagCheckConfig[]; 3488 } 3489 export interface TagCheckConfig { 3490 tagName: string; 3491 message: string; 3492 needConditionCheck: boolean; 3493 specifyCheckConditionFuncName: string; 3494 } 3495 export interface ConditionCheckResult { 3496 valid: boolean; 3497 type?: DiagnosticCategory; 3498 message?: string; 3499 } 3500 export interface CompilerHost extends ModuleResolutionHost { 3501 getSourceFile(fileName: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean, options?: CompilerOptions): SourceFile | undefined; 3502 getSourceFileByPath?(fileName: string, path: Path, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined; 3503 getCancellationToken?(): CancellationToken; 3504 getDefaultLibFileName(options: CompilerOptions): string; 3505 getDefaultLibLocation?(): string; 3506 writeFile: WriteFileCallback; 3507 getCurrentDirectory(): string; 3508 getCanonicalFileName(fileName: string): string; 3509 useCaseSensitiveFileNames(): boolean; 3510 getNewLine(): string; 3511 readDirectory?(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): string[]; 3512 resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[]; 3513 /** 3514 * 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 3515 */ 3516 getModuleResolutionCache?(): ModuleResolutionCache | undefined; 3517 /** 3518 * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files 3519 */ 3520 resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[]; 3521 getEnvironmentVariable?(name: string): string | undefined; 3522 /** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */ 3523 hasInvalidatedResolutions?(filePath: Path): boolean; 3524 createHash?(data: string): string; 3525 getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; 3526 /** 3527 * get tagName where need to be determined based on the file path 3528 * @param jsDocFileCheckInfo filePath 3529 * @param symbolSourceFilePath filePath 3530 */ 3531 getJsDocNodeCheckedConfig?(jsDocFileCheckInfo: FileCheckModuleInfo, symbolSourceFilePath: string): JsDocNodeCheckConfig; 3532 /** 3533 * get checked results based on the file path and jsDocs 3534 * @param jsDocFileCheckedInfo 3535 * @param jsDocs 3536 */ 3537 getJsDocNodeConditionCheckedResult?(jsDocFileCheckedInfo: FileCheckModuleInfo, jsDocs: JsDocTagInfo[]): ConditionCheckResult; 3538 getFileCheckedModuleInfo?(containFilePath: string): FileCheckModuleInfo; 3539 getLastCompiledProgram?(): Program; 3540 } 3541 export interface SourceMapRange extends TextRange { 3542 source?: SourceMapSource; 3543 } 3544 export interface SourceMapSource { 3545 fileName: string; 3546 text: string; 3547 skipTrivia?: (pos: number) => number; 3548 } 3549 export enum EmitFlags { 3550 None = 0, 3551 SingleLine = 1, 3552 AdviseOnEmitNode = 2, 3553 NoSubstitution = 4, 3554 CapturesThis = 8, 3555 NoLeadingSourceMap = 16, 3556 NoTrailingSourceMap = 32, 3557 NoSourceMap = 48, 3558 NoNestedSourceMaps = 64, 3559 NoTokenLeadingSourceMaps = 128, 3560 NoTokenTrailingSourceMaps = 256, 3561 NoTokenSourceMaps = 384, 3562 NoLeadingComments = 512, 3563 NoTrailingComments = 1024, 3564 NoComments = 1536, 3565 NoNestedComments = 2048, 3566 HelperName = 4096, 3567 ExportName = 8192, 3568 LocalName = 16384, 3569 InternalName = 32768, 3570 Indented = 65536, 3571 NoIndentation = 131072, 3572 AsyncFunctionBody = 262144, 3573 ReuseTempVariableScope = 524288, 3574 CustomPrologue = 1048576, 3575 NoHoisting = 2097152, 3576 HasEndOfDeclarationMarker = 4194304, 3577 Iterator = 8388608, 3578 NoAsciiEscaping = 16777216, 3579 } 3580 export interface EmitHelperBase { 3581 readonly name: string; 3582 readonly scoped: boolean; 3583 readonly text: string | ((node: EmitHelperUniqueNameCallback) => string); 3584 readonly priority?: number; 3585 readonly dependencies?: EmitHelper[]; 3586 } 3587 export interface ScopedEmitHelper extends EmitHelperBase { 3588 readonly scoped: true; 3589 } 3590 export interface UnscopedEmitHelper extends EmitHelperBase { 3591 readonly scoped: false; 3592 readonly text: string; 3593 } 3594 export type EmitHelper = ScopedEmitHelper | UnscopedEmitHelper; 3595 export type EmitHelperUniqueNameCallback = (name: string) => string; 3596 export enum EmitHint { 3597 SourceFile = 0, 3598 Expression = 1, 3599 IdentifierName = 2, 3600 MappedTypeParameter = 3, 3601 Unspecified = 4, 3602 EmbeddedStatement = 5, 3603 JsxAttributeValue = 6 3604 } 3605 export interface SourceFileMayBeEmittedHost { 3606 getCompilerOptions(): CompilerOptions; 3607 isSourceFileFromExternalLibrary(file: SourceFile): boolean; 3608 getResolvedProjectReferenceToRedirect(fileName: string): ResolvedProjectReference | undefined; 3609 isSourceOfProjectReferenceRedirect(fileName: string): boolean; 3610 } 3611 export interface EmitHost extends ScriptReferenceHost, ModuleSpecifierResolutionHost, SourceFileMayBeEmittedHost { 3612 getSourceFiles(): readonly SourceFile[]; 3613 useCaseSensitiveFileNames(): boolean; 3614 getCurrentDirectory(): string; 3615 getLibFileFromReference(ref: FileReference): SourceFile | undefined; 3616 getCommonSourceDirectory(): string; 3617 getCanonicalFileName(fileName: string): string; 3618 getNewLine(): string; 3619 isEmitBlocked(emitFileName: string): boolean; 3620 getPrependNodes(): readonly (InputFiles | UnparsedSource)[]; 3621 writeFile: WriteFileCallback; 3622 getSourceFileFromReference: Program["getSourceFileFromReference"]; 3623 readonly redirectTargetsMap: RedirectTargetsMap; 3624 createHash?(data: string): string; 3625 } 3626 export enum OuterExpressionKinds { 3627 Parentheses = 1, 3628 TypeAssertions = 2, 3629 NonNullAssertions = 4, 3630 PartiallyEmittedExpressions = 8, 3631 Assertions = 6, 3632 All = 15, 3633 ExcludeJSDocTypeAssertion = 16 3634 } 3635 export type TypeOfTag = "undefined" | "number" | "bigint" | "boolean" | "string" | "symbol" | "object" | "function"; 3636 export interface NodeFactory { 3637 createNodeArray<T extends Node>(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray<T>; 3638 createNumericLiteral(value: string | number, numericLiteralFlags?: TokenFlags): NumericLiteral; 3639 createBigIntLiteral(value: string | PseudoBigInt): BigIntLiteral; 3640 createStringLiteral(text: string, isSingleQuote?: boolean): StringLiteral; 3641 createStringLiteralFromNode(sourceNode: PropertyNameLiteral | PrivateIdentifier, isSingleQuote?: boolean): StringLiteral; 3642 createRegularExpressionLiteral(text: string): RegularExpressionLiteral; 3643 createIdentifier(text: string): Identifier; 3644 /** 3645 * Create a unique temporary variable. 3646 * @param recordTempVariable An optional callback used to record the temporary variable name. This 3647 * should usually be a reference to `hoistVariableDeclaration` from a `TransformationContext`, but 3648 * can be `undefined` if you plan to record the temporary variable manually. 3649 * @param reservedInNestedScopes When `true`, reserves the temporary variable name in all nested scopes 3650 * during emit so that the variable can be referenced in a nested function body. This is an alternative to 3651 * setting `EmitFlags.ReuseTempVariableScope` on the nested function itself. 3652 */ 3653 createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined, reservedInNestedScopes?: boolean): Identifier; 3654 /** 3655 * Create a unique temporary variable for use in a loop. 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 createLoopVariable(reservedInNestedScopes?: boolean): Identifier; 3661 /** Create a unique name based on the supplied text. */ 3662 createUniqueName(text: string, flags?: GeneratedIdentifierFlags): Identifier; 3663 /** Create a unique name generated for a node. */ 3664 getGeneratedNameForNode(node: Node | undefined, flags?: GeneratedIdentifierFlags): Identifier; 3665 createPrivateIdentifier(text: string): PrivateIdentifier; 3666 createUniquePrivateName(text?: string): PrivateIdentifier; 3667 getGeneratedPrivateNameForNode(node: Node): PrivateIdentifier; 3668 createToken(token: SyntaxKind.SuperKeyword): SuperExpression; 3669 createToken(token: SyntaxKind.ThisKeyword): ThisExpression; 3670 createToken(token: SyntaxKind.NullKeyword): NullLiteral; 3671 createToken(token: SyntaxKind.TrueKeyword): TrueLiteral; 3672 createToken(token: SyntaxKind.FalseKeyword): FalseLiteral; 3673 createToken<TKind extends PunctuationSyntaxKind>(token: TKind): PunctuationToken<TKind>; 3674 createToken<TKind extends KeywordTypeSyntaxKind>(token: TKind): KeywordTypeNode<TKind>; 3675 createToken<TKind extends ModifierSyntaxKind>(token: TKind): ModifierToken<TKind>; 3676 createToken<TKind extends KeywordSyntaxKind>(token: TKind): KeywordToken<TKind>; 3677 createToken<TKind extends SyntaxKind.Unknown | SyntaxKind.EndOfFileToken>(token: TKind): Token<TKind>; 3678 createSuper(): SuperExpression; 3679 createThis(): ThisExpression; 3680 createNull(): NullLiteral; 3681 createTrue(): TrueLiteral; 3682 createFalse(): FalseLiteral; 3683 createModifier<T extends ModifierSyntaxKind>(kind: T): ModifierToken<T>; 3684 createModifiersFromModifierFlags(flags: ModifierFlags): Modifier[] | undefined; 3685 createQualifiedName(left: EntityName, right: string | Identifier): QualifiedName; 3686 updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName; 3687 createComputedPropertyName(expression: Expression): ComputedPropertyName; 3688 updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName; 3689 createTypeParameterDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; 3690 updateTypeParameterDeclaration(node: TypeParameterDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; 3691 createParameterDeclaration(modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration; 3692 updateParameterDeclaration(node: ParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration; 3693 createDecorator(expression: Expression, annotationDeclaration?: AnnotationDeclaration): Decorator; 3694 updateDecorator(node: Decorator, expression: Expression, annotationDeclaration?: AnnotationDeclaration): Decorator; 3695 createPropertySignature(modifiers: readonly Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined): PropertySignature; 3696 updatePropertySignature(node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined): PropertySignature; 3697 createPropertyDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 3698 updatePropertyDeclaration(node: PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 3699 createAnnotationPropertyDeclaration(name: string | PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): AnnotationPropertyDeclaration; 3700 updateAnnotationPropertyDeclaration(node: AnnotationPropertyDeclaration, name: string | PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): AnnotationPropertyDeclaration; 3701 createMethodSignature(modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): MethodSignature; 3702 updateMethodSignature(node: MethodSignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): MethodSignature; 3703 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; 3704 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; 3705 createConstructorDeclaration(modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 3706 updateConstructorDeclaration(node: ConstructorDeclaration, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 3707 createGetAccessorDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 3708 updateGetAccessorDeclaration(node: GetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 3709 createSetAccessorDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 3710 updateSetAccessorDeclaration(node: SetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 3711 createCallSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): CallSignatureDeclaration; 3712 updateCallSignature(node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): CallSignatureDeclaration; 3713 createConstructSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): ConstructSignatureDeclaration; 3714 updateConstructSignature(node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructSignatureDeclaration; 3715 createIndexSignature(modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; 3716 updateIndexSignature(node: IndexSignatureDeclaration, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; 3717 createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan; 3718 updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan; 3719 createClassStaticBlockDeclaration(body: Block): ClassStaticBlockDeclaration; 3720 updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, body: Block): ClassStaticBlockDeclaration; 3721 createKeywordTypeNode<TKind extends KeywordTypeSyntaxKind>(kind: TKind): KeywordTypeNode<TKind>; 3722 createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode; 3723 updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode; 3724 createTypeReferenceNode(typeName: string | EntityName, typeArguments?: readonly TypeNode[]): TypeReferenceNode; 3725 updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined): TypeReferenceNode; 3726 createFunctionTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): FunctionTypeNode; 3727 updateFunctionTypeNode(node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): FunctionTypeNode; 3728 createConstructorTypeNode(modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode; 3729 updateConstructorTypeNode(node: ConstructorTypeNode, modifiers: readonly Modifier[] | undefined, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode; 3730 createTypeQueryNode(exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode; 3731 updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode; 3732 createTypeLiteralNode(members: readonly TypeElement[] | undefined): TypeLiteralNode; 3733 updateTypeLiteralNode(node: TypeLiteralNode, members: NodeArray<TypeElement>): TypeLiteralNode; 3734 createArrayTypeNode(elementType: TypeNode): ArrayTypeNode; 3735 updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode; 3736 createTupleTypeNode(elements: readonly (TypeNode | NamedTupleMember)[]): TupleTypeNode; 3737 updateTupleTypeNode(node: TupleTypeNode, elements: readonly (TypeNode | NamedTupleMember)[]): TupleTypeNode; 3738 createNamedTupleMember(dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember; 3739 updateNamedTupleMember(node: NamedTupleMember, dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember; 3740 createOptionalTypeNode(type: TypeNode): OptionalTypeNode; 3741 updateOptionalTypeNode(node: OptionalTypeNode, type: TypeNode): OptionalTypeNode; 3742 createRestTypeNode(type: TypeNode): RestTypeNode; 3743 updateRestTypeNode(node: RestTypeNode, type: TypeNode): RestTypeNode; 3744 createUnionTypeNode(types: readonly TypeNode[]): UnionTypeNode; 3745 updateUnionTypeNode(node: UnionTypeNode, types: NodeArray<TypeNode>): UnionTypeNode; 3746 createIntersectionTypeNode(types: readonly TypeNode[]): IntersectionTypeNode; 3747 updateIntersectionTypeNode(node: IntersectionTypeNode, types: NodeArray<TypeNode>): IntersectionTypeNode; 3748 createConditionalTypeNode(checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode; 3749 updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode; 3750 createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode; 3751 updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode; 3752 createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; 3753 updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode; 3754 createParenthesizedType(type: TypeNode): ParenthesizedTypeNode; 3755 updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode; 3756 createThisTypeNode(): ThisTypeNode; 3757 createTypeOperatorNode(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode; 3758 updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode; 3759 createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; 3760 updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; 3761 createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined, members: NodeArray<TypeElement> | undefined): MappedTypeNode; 3762 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; 3763 createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode; 3764 updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]): LiteralTypeNode; 3765 createTemplateLiteralType(head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; 3766 updateTemplateLiteralType(node: TemplateLiteralTypeNode, head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; 3767 createObjectBindingPattern(elements: readonly BindingElement[]): ObjectBindingPattern; 3768 updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]): ObjectBindingPattern; 3769 createArrayBindingPattern(elements: readonly ArrayBindingElement[]): ArrayBindingPattern; 3770 updateArrayBindingPattern(node: ArrayBindingPattern, elements: readonly ArrayBindingElement[]): ArrayBindingPattern; 3771 createBindingElement(dotDotDotToken: DotDotDotToken | undefined, propertyName: string | PropertyName | undefined, name: string | BindingName, initializer?: Expression): BindingElement; 3772 updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, initializer: Expression | undefined): BindingElement; 3773 createArrayLiteralExpression(elements?: readonly Expression[], multiLine?: boolean): ArrayLiteralExpression; 3774 updateArrayLiteralExpression(node: ArrayLiteralExpression, elements: readonly Expression[]): ArrayLiteralExpression; 3775 createObjectLiteralExpression(properties?: readonly ObjectLiteralElementLike[], multiLine?: boolean): ObjectLiteralExpression; 3776 updateObjectLiteralExpression(node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]): ObjectLiteralExpression; 3777 createPropertyAccessExpression(expression: Expression, name: string | MemberName): PropertyAccessExpression; 3778 updatePropertyAccessExpression(node: PropertyAccessExpression, expression: Expression, name: MemberName): PropertyAccessExpression; 3779 createPropertyAccessChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, name: string | MemberName): PropertyAccessChain; 3780 updatePropertyAccessChain(node: PropertyAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: MemberName): PropertyAccessChain; 3781 createElementAccessExpression(expression: Expression, index: number | Expression): ElementAccessExpression; 3782 updateElementAccessExpression(node: ElementAccessExpression, expression: Expression, argumentExpression: Expression): ElementAccessExpression; 3783 createElementAccessChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, index: number | Expression): ElementAccessChain; 3784 updateElementAccessChain(node: ElementAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression): ElementAccessChain; 3785 createCallExpression(expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): CallExpression; 3786 updateCallExpression(node: CallExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]): CallExpression; 3787 createCallChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): CallChain; 3788 updateCallChain(node: CallChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]): CallChain; 3789 createNewExpression(expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): NewExpression; 3790 updateNewExpression(node: NewExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): NewExpression; 3791 createTaggedTemplateExpression(tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; 3792 updateTaggedTemplateExpression(node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; 3793 createTypeAssertion(type: TypeNode, expression: Expression): TypeAssertion; 3794 updateTypeAssertion(node: TypeAssertion, type: TypeNode, expression: Expression): TypeAssertion; 3795 createParenthesizedExpression(expression: Expression): ParenthesizedExpression; 3796 updateParenthesizedExpression(node: ParenthesizedExpression, expression: Expression): ParenthesizedExpression; 3797 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; 3798 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; 3799 createArrowFunction(modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction; 3800 updateArrowFunction(node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction; 3801 createEtsComponentExpression(name: Expression, argumentExpression: Expression[] | NodeArray<Expression> | undefined, body: Block | undefined): EtsComponentExpression; 3802 updateEtsComponentExpression(node: EtsComponentExpression, name: Expression | undefined, argumentExpression: Expression[] | NodeArray<Expression> | undefined, body: Block | undefined): EtsComponentExpression; 3803 createDeleteExpression(expression: Expression): DeleteExpression; 3804 updateDeleteExpression(node: DeleteExpression, expression: Expression): DeleteExpression; 3805 createTypeOfExpression(expression: Expression): TypeOfExpression; 3806 updateTypeOfExpression(node: TypeOfExpression, expression: Expression): TypeOfExpression; 3807 createVoidExpression(expression: Expression): VoidExpression; 3808 updateVoidExpression(node: VoidExpression, expression: Expression): VoidExpression; 3809 createAwaitExpression(expression: Expression): AwaitExpression; 3810 updateAwaitExpression(node: AwaitExpression, expression: Expression): AwaitExpression; 3811 createPrefixUnaryExpression(operator: PrefixUnaryOperator, operand: Expression): PrefixUnaryExpression; 3812 updatePrefixUnaryExpression(node: PrefixUnaryExpression, operand: Expression): PrefixUnaryExpression; 3813 createPostfixUnaryExpression(operand: Expression, operator: PostfixUnaryOperator): PostfixUnaryExpression; 3814 updatePostfixUnaryExpression(node: PostfixUnaryExpression, operand: Expression): PostfixUnaryExpression; 3815 createBinaryExpression(left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression; 3816 updateBinaryExpression(node: BinaryExpression, left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression; 3817 createConditionalExpression(condition: Expression, questionToken: QuestionToken | undefined, whenTrue: Expression, colonToken: ColonToken | undefined, whenFalse: Expression): ConditionalExpression; 3818 updateConditionalExpression(node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression; 3819 createTemplateExpression(head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression; 3820 updateTemplateExpression(node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression; 3821 createTemplateHead(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateHead; 3822 createTemplateHead(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateHead; 3823 createTemplateMiddle(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateMiddle; 3824 createTemplateMiddle(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateMiddle; 3825 createTemplateTail(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateTail; 3826 createTemplateTail(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateTail; 3827 createNoSubstitutionTemplateLiteral(text: string, rawText?: string): NoSubstitutionTemplateLiteral; 3828 createNoSubstitutionTemplateLiteral(text: string | undefined, rawText: string): NoSubstitutionTemplateLiteral; 3829 createYieldExpression(asteriskToken: AsteriskToken, expression: Expression): YieldExpression; 3830 createYieldExpression(asteriskToken: undefined, expression: Expression | undefined): YieldExpression; 3831 updateYieldExpression(node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression | undefined): YieldExpression; 3832 createSpreadElement(expression: Expression): SpreadElement; 3833 updateSpreadElement(node: SpreadElement, expression: Expression): SpreadElement; 3834 createClassExpression(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; 3835 updateClassExpression(node: ClassExpression, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; 3836 createOmittedExpression(): OmittedExpression; 3837 createExpressionWithTypeArguments(expression: Expression, typeArguments: readonly TypeNode[] | undefined): ExpressionWithTypeArguments; 3838 updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, expression: Expression, typeArguments: readonly TypeNode[] | undefined): ExpressionWithTypeArguments; 3839 createAsExpression(expression: Expression, type: TypeNode): AsExpression; 3840 updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression; 3841 createNonNullExpression(expression: Expression): NonNullExpression; 3842 updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression; 3843 createNonNullChain(expression: Expression): NonNullChain; 3844 updateNonNullChain(node: NonNullChain, expression: Expression): NonNullChain; 3845 createMetaProperty(keywordToken: MetaProperty["keywordToken"], name: Identifier): MetaProperty; 3846 updateMetaProperty(node: MetaProperty, name: Identifier): MetaProperty; 3847 createSatisfiesExpression(expression: Expression, type: TypeNode): SatisfiesExpression; 3848 updateSatisfiesExpression(node: SatisfiesExpression, expression: Expression, type: TypeNode): SatisfiesExpression; 3849 createTemplateSpan(expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan; 3850 updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan; 3851 createSemicolonClassElement(): SemicolonClassElement; 3852 createBlock(statements: readonly Statement[], multiLine?: boolean): Block; 3853 updateBlock(node: Block, statements: readonly Statement[]): Block; 3854 createVariableStatement(modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList | readonly VariableDeclaration[]): VariableStatement; 3855 updateVariableStatement(node: VariableStatement, modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList): VariableStatement; 3856 createEmptyStatement(): EmptyStatement; 3857 createExpressionStatement(expression: Expression): ExpressionStatement; 3858 updateExpressionStatement(node: ExpressionStatement, expression: Expression): ExpressionStatement; 3859 createIfStatement(expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement; 3860 updateIfStatement(node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined): IfStatement; 3861 createDoStatement(statement: Statement, expression: Expression): DoStatement; 3862 updateDoStatement(node: DoStatement, statement: Statement, expression: Expression): DoStatement; 3863 createWhileStatement(expression: Expression, statement: Statement): WhileStatement; 3864 updateWhileStatement(node: WhileStatement, expression: Expression, statement: Statement): WhileStatement; 3865 createForStatement(initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement; 3866 updateForStatement(node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement; 3867 createForInStatement(initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement; 3868 updateForInStatement(node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement; 3869 createForOfStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement; 3870 updateForOfStatement(node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement; 3871 createContinueStatement(label?: string | Identifier): ContinueStatement; 3872 updateContinueStatement(node: ContinueStatement, label: Identifier | undefined): ContinueStatement; 3873 createBreakStatement(label?: string | Identifier): BreakStatement; 3874 updateBreakStatement(node: BreakStatement, label: Identifier | undefined): BreakStatement; 3875 createReturnStatement(expression?: Expression): ReturnStatement; 3876 updateReturnStatement(node: ReturnStatement, expression: Expression | undefined): ReturnStatement; 3877 createWithStatement(expression: Expression, statement: Statement): WithStatement; 3878 updateWithStatement(node: WithStatement, expression: Expression, statement: Statement): WithStatement; 3879 createSwitchStatement(expression: Expression, caseBlock: CaseBlock): SwitchStatement; 3880 updateSwitchStatement(node: SwitchStatement, expression: Expression, caseBlock: CaseBlock): SwitchStatement; 3881 createLabeledStatement(label: string | Identifier, statement: Statement): LabeledStatement; 3882 updateLabeledStatement(node: LabeledStatement, label: Identifier, statement: Statement): LabeledStatement; 3883 createThrowStatement(expression: Expression): ThrowStatement; 3884 updateThrowStatement(node: ThrowStatement, expression: Expression): ThrowStatement; 3885 createTryStatement(tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement; 3886 updateTryStatement(node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement; 3887 createDebuggerStatement(): DebuggerStatement; 3888 createVariableDeclaration(name: string | BindingName, exclamationToken?: ExclamationToken, type?: TypeNode, initializer?: Expression): VariableDeclaration; 3889 updateVariableDeclaration(node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; 3890 createVariableDeclarationList(declarations: readonly VariableDeclaration[], flags?: NodeFlags): VariableDeclarationList; 3891 updateVariableDeclarationList(node: VariableDeclarationList, declarations: readonly VariableDeclaration[]): VariableDeclarationList; 3892 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; 3893 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; 3894 createClassDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; 3895 updateClassDeclaration(node: ClassDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; 3896 createStructDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): StructDeclaration; 3897 updateStructDeclaration(node: StructDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): StructDeclaration; 3898 createAnnotationDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, members: readonly AnnotationElement[]): AnnotationDeclaration; 3899 updateAnnotationDeclaration(node: AnnotationDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, members: readonly AnnotationElement[]): AnnotationDeclaration; 3900 createInterfaceDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 3901 updateInterfaceDeclaration(node: InterfaceDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 3902 createTypeAliasDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 3903 updateTypeAliasDeclaration(node: TypeAliasDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 3904 createEnumDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration; 3905 updateEnumDeclaration(node: EnumDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; 3906 createModuleDeclaration(modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration; 3907 updateModuleDeclaration(node: ModuleDeclaration, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration; 3908 createModuleBlock(statements: readonly Statement[]): ModuleBlock; 3909 updateModuleBlock(node: ModuleBlock, statements: readonly Statement[]): ModuleBlock; 3910 createCaseBlock(clauses: readonly CaseOrDefaultClause[]): CaseBlock; 3911 updateCaseBlock(node: CaseBlock, clauses: readonly CaseOrDefaultClause[]): CaseBlock; 3912 createNamespaceExportDeclaration(name: string | Identifier): NamespaceExportDeclaration; 3913 updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, name: Identifier): NamespaceExportDeclaration; 3914 createImportEqualsDeclaration(modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 3915 updateImportEqualsDeclaration(node: ImportEqualsDeclaration, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 3916 createImportDeclaration(modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause): ImportDeclaration; 3917 updateImportDeclaration(node: ImportDeclaration, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration; 3918 createImportClause(isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; 3919 updateImportClause(node: ImportClause, isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; 3920 createAssertClause(elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause; 3921 updateAssertClause(node: AssertClause, elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause; 3922 createAssertEntry(name: AssertionKey, value: Expression): AssertEntry; 3923 updateAssertEntry(node: AssertEntry, name: AssertionKey, value: Expression): AssertEntry; 3924 createImportTypeAssertionContainer(clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer; 3925 updateImportTypeAssertionContainer(node: ImportTypeAssertionContainer, clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer; 3926 createNamespaceImport(name: Identifier): NamespaceImport; 3927 updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport; 3928 createNamespaceExport(name: Identifier): NamespaceExport; 3929 updateNamespaceExport(node: NamespaceExport, name: Identifier): NamespaceExport; 3930 createNamedImports(elements: readonly ImportSpecifier[]): NamedImports; 3931 updateNamedImports(node: NamedImports, elements: readonly ImportSpecifier[]): NamedImports; 3932 createImportSpecifier(isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier; 3933 updateImportSpecifier(node: ImportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier; 3934 createExportAssignment(modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment; 3935 updateExportAssignment(node: ExportAssignment, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment; 3936 createExportDeclaration(modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, assertClause?: AssertClause): ExportDeclaration; 3937 updateExportDeclaration(node: ExportDeclaration, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration; 3938 createNamedExports(elements: readonly ExportSpecifier[]): NamedExports; 3939 updateNamedExports(node: NamedExports, elements: readonly ExportSpecifier[]): NamedExports; 3940 createExportSpecifier(isTypeOnly: boolean, propertyName: string | Identifier | undefined, name: string | Identifier): ExportSpecifier; 3941 updateExportSpecifier(node: ExportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ExportSpecifier; 3942 createExternalModuleReference(expression: Expression): ExternalModuleReference; 3943 updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference; 3944 createJSDocAllType(): JSDocAllType; 3945 createJSDocUnknownType(): JSDocUnknownType; 3946 createJSDocNonNullableType(type: TypeNode, postfix?: boolean): JSDocNonNullableType; 3947 updateJSDocNonNullableType(node: JSDocNonNullableType, type: TypeNode): JSDocNonNullableType; 3948 createJSDocNullableType(type: TypeNode, postfix?: boolean): JSDocNullableType; 3949 updateJSDocNullableType(node: JSDocNullableType, type: TypeNode): JSDocNullableType; 3950 createJSDocOptionalType(type: TypeNode): JSDocOptionalType; 3951 updateJSDocOptionalType(node: JSDocOptionalType, type: TypeNode): JSDocOptionalType; 3952 createJSDocFunctionType(parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): JSDocFunctionType; 3953 updateJSDocFunctionType(node: JSDocFunctionType, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): JSDocFunctionType; 3954 createJSDocVariadicType(type: TypeNode): JSDocVariadicType; 3955 updateJSDocVariadicType(node: JSDocVariadicType, type: TypeNode): JSDocVariadicType; 3956 createJSDocNamepathType(type: TypeNode): JSDocNamepathType; 3957 updateJSDocNamepathType(node: JSDocNamepathType, type: TypeNode): JSDocNamepathType; 3958 createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression; 3959 updateJSDocTypeExpression(node: JSDocTypeExpression, type: TypeNode): JSDocTypeExpression; 3960 createJSDocNameReference(name: EntityName | JSDocMemberName): JSDocNameReference; 3961 updateJSDocNameReference(node: JSDocNameReference, name: EntityName | JSDocMemberName): JSDocNameReference; 3962 createJSDocMemberName(left: EntityName | JSDocMemberName, right: Identifier): JSDocMemberName; 3963 updateJSDocMemberName(node: JSDocMemberName, left: EntityName | JSDocMemberName, right: Identifier): JSDocMemberName; 3964 createJSDocLink(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink; 3965 updateJSDocLink(node: JSDocLink, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink; 3966 createJSDocLinkCode(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode; 3967 updateJSDocLinkCode(node: JSDocLinkCode, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode; 3968 createJSDocLinkPlain(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain; 3969 updateJSDocLinkPlain(node: JSDocLinkPlain, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain; 3970 createJSDocTypeLiteral(jsDocPropertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral; 3971 updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsDocPropertyTags: readonly JSDocPropertyLikeTag[] | undefined, isArrayType: boolean | undefined): JSDocTypeLiteral; 3972 createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature; 3973 updateJSDocSignature(node: JSDocSignature, typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type: JSDocReturnTag | undefined): JSDocSignature; 3974 createJSDocTemplateTag(tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocComment>): JSDocTemplateTag; 3975 updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment: string | NodeArray<JSDocComment> | undefined): JSDocTemplateTag; 3976 createJSDocTypedefTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | JSDocTypeLiteral, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocTypedefTag; 3977 updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | JSDocTypeLiteral | undefined, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocTypedefTag; 3978 createJSDocParameterTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocParameterTag; 3979 updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocComment> | undefined): JSDocParameterTag; 3980 createJSDocPropertyTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray<JSDocComment>): JSDocPropertyTag; 3981 updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray<JSDocComment> | undefined): JSDocPropertyTag; 3982 createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocTypeTag; 3983 updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocTypeTag; 3984 createJSDocSeeTag(tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag; 3985 updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray<JSDocComment>): JSDocSeeTag; 3986 createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocReturnTag; 3987 updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocReturnTag; 3988 createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocThisTag; 3989 updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocThisTag; 3990 createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocEnumTag; 3991 updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocEnumTag; 3992 createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocCallbackTag; 3993 updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocCallbackTag; 3994 createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocAugmentsTag; 3995 updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocAugmentsTag; 3996 createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocImplementsTag; 3997 updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocImplementsTag; 3998 createJSDocAuthorTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocAuthorTag; 3999 updateJSDocAuthorTag(node: JSDocAuthorTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocAuthorTag; 4000 createJSDocClassTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocClassTag; 4001 updateJSDocClassTag(node: JSDocClassTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocClassTag; 4002 createJSDocPublicTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocPublicTag; 4003 updateJSDocPublicTag(node: JSDocPublicTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocPublicTag; 4004 createJSDocPrivateTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocPrivateTag; 4005 updateJSDocPrivateTag(node: JSDocPrivateTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocPrivateTag; 4006 createJSDocProtectedTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocProtectedTag; 4007 updateJSDocProtectedTag(node: JSDocProtectedTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocProtectedTag; 4008 createJSDocReadonlyTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocReadonlyTag; 4009 updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocReadonlyTag; 4010 createJSDocUnknownTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocUnknownTag; 4011 updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | NodeArray<JSDocComment> | undefined): JSDocUnknownTag; 4012 createJSDocDeprecatedTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag; 4013 updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag; 4014 createJSDocOverrideTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag; 4015 updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag; 4016 createJSDocText(text: string): JSDocText; 4017 updateJSDocText(node: JSDocText, text: string): JSDocText; 4018 createJSDocComment(comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc; 4019 updateJSDocComment(node: JSDoc, comment: string | NodeArray<JSDocComment> | undefined, tags: readonly JSDocTag[] | undefined): JSDoc; 4020 createJsxElement(openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement; 4021 updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement; 4022 createJsxSelfClosingElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement; 4023 updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement; 4024 createJsxOpeningElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement; 4025 updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement; 4026 createJsxClosingElement(tagName: JsxTagNameExpression): JsxClosingElement; 4027 updateJsxClosingElement(node: JsxClosingElement, tagName: JsxTagNameExpression): JsxClosingElement; 4028 createJsxFragment(openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment; 4029 createJsxText(text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText; 4030 updateJsxText(node: JsxText, text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText; 4031 createJsxOpeningFragment(): JsxOpeningFragment; 4032 createJsxJsxClosingFragment(): JsxClosingFragment; 4033 updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment; 4034 createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute; 4035 updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute; 4036 createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes; 4037 updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes; 4038 createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute; 4039 updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute; 4040 createJsxExpression(dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined): JsxExpression; 4041 updateJsxExpression(node: JsxExpression, expression: Expression | undefined): JsxExpression; 4042 createCaseClause(expression: Expression, statements: readonly Statement[]): CaseClause; 4043 updateCaseClause(node: CaseClause, expression: Expression, statements: readonly Statement[]): CaseClause; 4044 createDefaultClause(statements: readonly Statement[]): DefaultClause; 4045 updateDefaultClause(node: DefaultClause, statements: readonly Statement[]): DefaultClause; 4046 createHeritageClause(token: HeritageClause["token"], types: readonly ExpressionWithTypeArguments[]): HeritageClause; 4047 updateHeritageClause(node: HeritageClause, types: readonly ExpressionWithTypeArguments[]): HeritageClause; 4048 createCatchClause(variableDeclaration: string | BindingName | VariableDeclaration | undefined, block: Block): CatchClause; 4049 updateCatchClause(node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block): CatchClause; 4050 createPropertyAssignment(name: string | PropertyName, initializer: Expression): PropertyAssignment; 4051 updatePropertyAssignment(node: PropertyAssignment, name: PropertyName, initializer: Expression): PropertyAssignment; 4052 createShorthandPropertyAssignment(name: string | Identifier, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment; 4053 updateShorthandPropertyAssignment(node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression | undefined): ShorthandPropertyAssignment; 4054 createSpreadAssignment(expression: Expression): SpreadAssignment; 4055 updateSpreadAssignment(node: SpreadAssignment, expression: Expression): SpreadAssignment; 4056 createEnumMember(name: string | PropertyName, initializer?: Expression): EnumMember; 4057 updateEnumMember(node: EnumMember, name: PropertyName, initializer: Expression | undefined): EnumMember; 4058 createSourceFile(statements: readonly Statement[], endOfFileToken: EndOfFileToken, flags: NodeFlags): SourceFile; 4059 updateSourceFile(node: SourceFile, statements: readonly Statement[], isDeclarationFile?: boolean, referencedFiles?: readonly FileReference[], typeReferences?: readonly FileReference[], hasNoDefaultLib?: boolean, libReferences?: readonly FileReference[]): SourceFile; 4060 createNotEmittedStatement(original: Node): NotEmittedStatement; 4061 createPartiallyEmittedExpression(expression: Expression, original?: Node): PartiallyEmittedExpression; 4062 updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression; 4063 createCommaListExpression(elements: readonly Expression[]): CommaListExpression; 4064 updateCommaListExpression(node: CommaListExpression, elements: readonly Expression[]): CommaListExpression; 4065 createBundle(sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle; 4066 updateBundle(node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle; 4067 createComma(left: Expression, right: Expression): BinaryExpression; 4068 createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment; 4069 createAssignment(left: Expression, right: Expression): AssignmentExpression<EqualsToken>; 4070 createLogicalOr(left: Expression, right: Expression): BinaryExpression; 4071 createLogicalAnd(left: Expression, right: Expression): BinaryExpression; 4072 createBitwiseOr(left: Expression, right: Expression): BinaryExpression; 4073 createBitwiseXor(left: Expression, right: Expression): BinaryExpression; 4074 createBitwiseAnd(left: Expression, right: Expression): BinaryExpression; 4075 createStrictEquality(left: Expression, right: Expression): BinaryExpression; 4076 createStrictInequality(left: Expression, right: Expression): BinaryExpression; 4077 createEquality(left: Expression, right: Expression): BinaryExpression; 4078 createInequality(left: Expression, right: Expression): BinaryExpression; 4079 createLessThan(left: Expression, right: Expression): BinaryExpression; 4080 createLessThanEquals(left: Expression, right: Expression): BinaryExpression; 4081 createGreaterThan(left: Expression, right: Expression): BinaryExpression; 4082 createGreaterThanEquals(left: Expression, right: Expression): BinaryExpression; 4083 createLeftShift(left: Expression, right: Expression): BinaryExpression; 4084 createRightShift(left: Expression, right: Expression): BinaryExpression; 4085 createUnsignedRightShift(left: Expression, right: Expression): BinaryExpression; 4086 createAdd(left: Expression, right: Expression): BinaryExpression; 4087 createSubtract(left: Expression, right: Expression): BinaryExpression; 4088 createMultiply(left: Expression, right: Expression): BinaryExpression; 4089 createDivide(left: Expression, right: Expression): BinaryExpression; 4090 createModulo(left: Expression, right: Expression): BinaryExpression; 4091 createExponent(left: Expression, right: Expression): BinaryExpression; 4092 createPrefixPlus(operand: Expression): PrefixUnaryExpression; 4093 createPrefixMinus(operand: Expression): PrefixUnaryExpression; 4094 createPrefixIncrement(operand: Expression): PrefixUnaryExpression; 4095 createPrefixDecrement(operand: Expression): PrefixUnaryExpression; 4096 createBitwiseNot(operand: Expression): PrefixUnaryExpression; 4097 createLogicalNot(operand: Expression): PrefixUnaryExpression; 4098 createPostfixIncrement(operand: Expression): PostfixUnaryExpression; 4099 createPostfixDecrement(operand: Expression): PostfixUnaryExpression; 4100 createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): CallExpression; 4101 createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; 4102 createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): CallExpression; 4103 createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; 4104 createVoidZero(): VoidExpression; 4105 createExportDefault(expression: Expression): ExportAssignment; 4106 createExternalModuleExport(exportName: Identifier): ExportDeclaration; 4107 restoreOuterExpressions(outerExpression: Expression | undefined, innerExpression: Expression, kinds?: OuterExpressionKinds): Expression; 4108 } 4109 export interface CoreTransformationContext { 4110 readonly factory: NodeFactory; 4111 /** Gets the compiler options supplied to the transformer. */ 4112 getCompilerOptions(): CompilerOptions; 4113 /** Starts a new lexical environment. */ 4114 startLexicalEnvironment(): void; 4115 /** Suspends the current lexical environment, usually after visiting a parameter list. */ 4116 suspendLexicalEnvironment(): void; 4117 /** Resumes a suspended lexical environment, usually before visiting a function body. */ 4118 resumeLexicalEnvironment(): void; 4119 /** Ends a lexical environment, returning any declarations. */ 4120 endLexicalEnvironment(): Statement[] | undefined; 4121 /** Hoists a function declaration to the containing scope. */ 4122 hoistFunctionDeclaration(node: FunctionDeclaration): void; 4123 /** Hoists a variable declaration to the containing scope. */ 4124 hoistVariableDeclaration(node: Identifier): void; 4125 } 4126 export interface TransformationContext extends CoreTransformationContext { 4127 /** Records a request for a non-scoped emit helper in the current context. */ 4128 requestEmitHelper(helper: EmitHelper): void; 4129 /** Gets and resets the requested non-scoped emit helpers. */ 4130 readEmitHelpers(): EmitHelper[] | undefined; 4131 /** Enables expression substitutions in the pretty printer for the provided SyntaxKind. */ 4132 enableSubstitution(kind: SyntaxKind): void; 4133 /** Determines whether expression substitutions are enabled for the provided node. */ 4134 isSubstitutionEnabled(node: Node): boolean; 4135 /** 4136 * Hook used by transformers to substitute expressions just before they 4137 * are emitted by the pretty printer. 4138 * 4139 * NOTE: Transformation hooks should only be modified during `Transformer` initialization, 4140 * before returning the `NodeTransformer` callback. 4141 */ 4142 onSubstituteNode: (hint: EmitHint, node: Node) => Node; 4143 /** 4144 * Enables before/after emit notifications in the pretty printer for the provided 4145 * SyntaxKind. 4146 */ 4147 enableEmitNotification(kind: SyntaxKind): void; 4148 /** 4149 * Determines whether before/after emit notifications should be raised in the pretty 4150 * printer when it emits a node. 4151 */ 4152 isEmitNotificationEnabled(node: Node): boolean; 4153 /** 4154 * Hook used to allow transformers to capture state before or after 4155 * the printer emits a node. 4156 * 4157 * NOTE: Transformation hooks should only be modified during `Transformer` initialization, 4158 * before returning the `NodeTransformer` callback. 4159 */ 4160 onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void; 4161 /** Determines whether the lexical environment is suspended */ 4162 isLexicalEnvironmentSuspended?(): boolean; 4163 } 4164 export interface TransformationResult<T extends Node> { 4165 /** Gets the transformed source files. */ 4166 transformed: T[]; 4167 /** Gets diagnostics for the transformation. */ 4168 diagnostics?: DiagnosticWithLocation[]; 4169 /** 4170 * Gets a substitute for a node, if one is available; otherwise, returns the original node. 4171 * 4172 * @param hint A hint as to the intended usage of the node. 4173 * @param node The node to substitute. 4174 */ 4175 substituteNode(hint: EmitHint, node: Node): Node; 4176 /** 4177 * Emits a node with possible notification. 4178 * 4179 * @param hint A hint as to the intended usage of the node. 4180 * @param node The node to emit. 4181 * @param emitCallback A callback used to emit the node. 4182 */ 4183 emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void; 4184 /** 4185 * Indicates if a given node needs an emit notification 4186 * 4187 * @param node The node to emit. 4188 */ 4189 isEmitNotificationEnabled?(node: Node): boolean; 4190 /** 4191 * Clean up EmitNode entries on any parse-tree nodes. 4192 */ 4193 dispose(): void; 4194 } 4195 /** 4196 * A function that is used to initialize and return a `Transformer` callback, which in turn 4197 * will be used to transform one or more nodes. 4198 */ 4199 export type TransformerFactory<T extends Node> = (context: TransformationContext) => Transformer<T>; 4200 /** 4201 * A function that transforms a node. 4202 */ 4203 export type Transformer<T extends Node> = (node: T) => T; 4204 /** 4205 * A function that accepts and possibly transforms a node. 4206 */ 4207 export type Visitor = (node: Node) => VisitResult<Node>; 4208 export interface NodeVisitor { 4209 <T extends Node>(nodes: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T; 4210 <T extends Node>(nodes: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T | undefined; 4211 } 4212 export interface NodesVisitor { 4213 <T extends Node>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>; 4214 <T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined; 4215 } 4216 export type VisitResult<T extends Node> = T | readonly T[] | undefined; 4217 export interface Printer { 4218 /** 4219 * Print a node and its subtree as-is, without any emit transformations. 4220 * @param hint A value indicating the purpose of a node. This is primarily used to 4221 * distinguish between an `Identifier` used in an expression position, versus an 4222 * `Identifier` used as an `IdentifierName` as part of a declaration. For most nodes you 4223 * should just pass `Unspecified`. 4224 * @param node The node to print. The node and its subtree are printed as-is, without any 4225 * emit transformations. 4226 * @param sourceFile A source file that provides context for the node. The source text of 4227 * the file is used to emit the original source content for literals and identifiers, while 4228 * the identifiers of the source file are used when generating unique names to avoid 4229 * collisions. 4230 */ 4231 printNode(hint: EmitHint, node: Node, sourceFile: SourceFile): string; 4232 /** 4233 * Prints a list of nodes using the given format flags 4234 */ 4235 printList<T extends Node>(format: ListFormat, list: NodeArray<T>, sourceFile: SourceFile): string; 4236 /** 4237 * Prints a source file as-is, without any emit transformations. 4238 */ 4239 printFile(sourceFile: SourceFile): string; 4240 /** 4241 * Prints a bundle of source files as-is, without any emit transformations. 4242 */ 4243 printBundle(bundle: Bundle): string; 4244 writeFile(sourceFile: SourceFile, writer: EmitTextWriter, sourceMapGenerator: SourceMapGenerator | undefined): void; 4245 } 4246 export interface PrintHandlers { 4247 /** 4248 * A hook used by the Printer when generating unique names to avoid collisions with 4249 * globally defined names that exist outside of the current source file. 4250 */ 4251 hasGlobalName?(name: string): boolean; 4252 /** 4253 * A hook used by the Printer to provide notifications prior to emitting a node. A 4254 * compatible implementation **must** invoke `emitCallback` with the provided `hint` and 4255 * `node` values. 4256 * @param hint A hint indicating the intended purpose of the node. 4257 * @param node The node to emit. 4258 * @param emitCallback A callback that, when invoked, will emit the node. 4259 * @example 4260 * ```ts 4261 * var printer = createPrinter(printerOptions, { 4262 * onEmitNode(hint, node, emitCallback) { 4263 * // set up or track state prior to emitting the node... 4264 * emitCallback(hint, node); 4265 * // restore state after emitting the node... 4266 * } 4267 * }); 4268 * ``` 4269 */ 4270 onEmitNode?(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void; 4271 /** 4272 * A hook used to check if an emit notification is required for a node. 4273 * @param node The node to emit. 4274 */ 4275 isEmitNotificationEnabled?(node: Node): boolean; 4276 /** 4277 * A hook used by the Printer to perform just-in-time substitution of a node. This is 4278 * primarily used by node transformations that need to substitute one node for another, 4279 * such as replacing `myExportedVar` with `exports.myExportedVar`. 4280 * @param hint A hint indicating the intended purpose of the node. 4281 * @param node The node to emit. 4282 * @example 4283 * ```ts 4284 * var printer = createPrinter(printerOptions, { 4285 * substituteNode(hint, node) { 4286 * // perform substitution if necessary... 4287 * return node; 4288 * } 4289 * }); 4290 * ``` 4291 */ 4292 substituteNode?(hint: EmitHint, node: Node): Node; 4293 } 4294 export interface PrinterOptions { 4295 removeComments?: boolean; 4296 newLine?: NewLineKind; 4297 omitTrailingSemicolon?: boolean; 4298 noEmitHelpers?: boolean; 4299 sourceMap?: boolean; 4300 inlineSourceMap?: boolean; 4301 inlineSources?: boolean; 4302 } 4303 export interface RawSourceMap { 4304 version: 3; 4305 file: string; 4306 sourceRoot?: string | null; 4307 sources: string[]; 4308 sourcesContent?: (string | null)[] | null; 4309 mappings: string; 4310 names?: string[] | null; 4311 } 4312 /** 4313 * Generates a source map. 4314 */ 4315 export interface SourceMapGenerator { 4316 getSources(): readonly string[]; 4317 /** 4318 * Adds a source to the source map. 4319 */ 4320 addSource(fileName: string): number; 4321 /** 4322 * Set the content for a source. 4323 */ 4324 setSourceContent(sourceIndex: number, content: string | null): void; 4325 /** 4326 * Adds a name. 4327 */ 4328 addName(name: string): number; 4329 /** 4330 * Adds a mapping without source information. 4331 */ 4332 addMapping(generatedLine: number, generatedCharacter: number): void; 4333 /** 4334 * Adds a mapping with source information. 4335 */ 4336 addMapping(generatedLine: number, generatedCharacter: number, sourceIndex: number, sourceLine: number, sourceCharacter: number, nameIndex?: number): void; 4337 /** 4338 * Appends a source map. 4339 */ 4340 appendSourceMap(generatedLine: number, generatedCharacter: number, sourceMap: RawSourceMap, sourceMapPath: string, start?: LineAndCharacter, end?: LineAndCharacter): void; 4341 /** 4342 * Gets the source map as a `RawSourceMap` object. 4343 */ 4344 toJSON(): RawSourceMap; 4345 /** 4346 * Gets the string representation of the source map. 4347 */ 4348 toString(): string; 4349 } 4350 export interface EmitTextWriter extends SymbolWriter { 4351 write(s: string): void; 4352 writeTrailingSemicolon(text: string): void; 4353 writeComment(text: string): void; 4354 getText(): string; 4355 rawWrite(s: string): void; 4356 writeLiteral(s: string): void; 4357 getTextPos(): number; 4358 getLine(): number; 4359 getColumn(): number; 4360 getIndent(): number; 4361 isAtStartOfLine(): boolean; 4362 hasTrailingComment(): boolean; 4363 hasTrailingWhitespace(): boolean; 4364 getTextPosWithWriteLine?(): number; 4365 nonEscapingWrite?(text: string): void; 4366 } 4367 export interface GetEffectiveTypeRootsHost { 4368 directoryExists?(directoryName: string): boolean; 4369 getCurrentDirectory?(): string; 4370 } 4371 export interface ModuleSpecifierResolutionHost { 4372 useCaseSensitiveFileNames?(): boolean; 4373 fileExists(path: string): boolean; 4374 getCurrentDirectory(): string; 4375 directoryExists?(path: string): boolean; 4376 readFile?(path: string): string | undefined; 4377 realpath?(path: string): string; 4378 getModuleSpecifierCache?(): ModuleSpecifierCache; 4379 getPackageJsonInfoCache?(): PackageJsonInfoCache | undefined; 4380 getGlobalTypingsCacheLocation?(): string | undefined; 4381 getNearestAncestorDirectoryWithPackageJson?(fileName: string, rootDir?: string): string | undefined; 4382 readonly redirectTargetsMap: RedirectTargetsMap; 4383 getProjectReferenceRedirect(fileName: string): string | undefined; 4384 isSourceOfProjectReferenceRedirect(fileName: string): boolean; 4385 } 4386 export interface ModulePath { 4387 path: string; 4388 isInNodeModules: boolean; 4389 isRedirect: boolean; 4390 } 4391 export interface ResolvedModuleSpecifierInfo { 4392 modulePaths: readonly ModulePath[] | undefined; 4393 moduleSpecifiers: readonly string[] | undefined; 4394 isBlockedByPackageJsonDependencies: boolean | undefined; 4395 } 4396 export interface ModuleSpecifierOptions { 4397 overrideImportMode?: SourceFile["impliedNodeFormat"]; 4398 } 4399 export interface ModuleSpecifierCache { 4400 get(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions): Readonly<ResolvedModuleSpecifierInfo> | undefined; 4401 set(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, modulePaths: readonly ModulePath[], moduleSpecifiers: readonly string[]): void; 4402 setBlockedByPackageJsonDependencies(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, isBlockedByPackageJsonDependencies: boolean): void; 4403 setModulePaths(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, modulePaths: readonly ModulePath[]): void; 4404 clear(): void; 4405 count(): number; 4406 } 4407 export interface SymbolTracker { 4408 trackSymbol?(symbol: Symbol, enclosingDeclaration: Node | undefined, meaning: SymbolFlags): boolean; 4409 reportInaccessibleThisError?(): void; 4410 reportPrivateInBaseOfClassExpression?(propertyName: string): void; 4411 reportInaccessibleUniqueSymbolError?(): void; 4412 reportCyclicStructureError?(): void; 4413 reportLikelyUnsafeImportRequiredError?(specifier: string): void; 4414 reportTruncationError?(): void; 4415 moduleResolverHost?: ModuleSpecifierResolutionHost & { 4416 getCommonSourceDirectory(): string; 4417 }; 4418 trackReferencedAmbientModule?(decl: ModuleDeclaration, symbol: Symbol): void; 4419 trackExternalModuleSymbolOfImportTypeNode?(symbol: Symbol): void; 4420 reportNonlocalAugmentation?(containingFile: SourceFile, parentSymbol: Symbol, augmentingSymbol: Symbol): void; 4421 reportNonSerializableProperty?(propertyName: string): void; 4422 reportImportTypeNodeResolutionModeOverride?(): void; 4423 } 4424 export interface TextSpan { 4425 start: number; 4426 length: number; 4427 } 4428 export interface TextChangeRange { 4429 span: TextSpan; 4430 newLength: number; 4431 } 4432 export interface SyntaxList extends Node { 4433 kind: SyntaxKind.SyntaxList; 4434 _children: Node[]; 4435 } 4436 export enum ListFormat { 4437 None = 0, 4438 SingleLine = 0, 4439 MultiLine = 1, 4440 PreserveLines = 2, 4441 LinesMask = 3, 4442 NotDelimited = 0, 4443 BarDelimited = 4, 4444 AmpersandDelimited = 8, 4445 CommaDelimited = 16, 4446 AsteriskDelimited = 32, 4447 DelimitersMask = 60, 4448 AllowTrailingComma = 64, 4449 Indented = 128, 4450 SpaceBetweenBraces = 256, 4451 SpaceBetweenSiblings = 512, 4452 Braces = 1024, 4453 Parenthesis = 2048, 4454 AngleBrackets = 4096, 4455 SquareBrackets = 8192, 4456 BracketsMask = 15360, 4457 OptionalIfUndefined = 16384, 4458 OptionalIfEmpty = 32768, 4459 Optional = 49152, 4460 PreferNewLine = 65536, 4461 NoTrailingNewLine = 131072, 4462 NoInterveningComments = 262144, 4463 NoSpaceIfEmpty = 524288, 4464 SingleElement = 1048576, 4465 SpaceAfterList = 2097152, 4466 Modifiers = 2359808, 4467 HeritageClauses = 512, 4468 SingleLineTypeLiteralMembers = 768, 4469 MultiLineTypeLiteralMembers = 32897, 4470 SingleLineTupleTypeElements = 528, 4471 MultiLineTupleTypeElements = 657, 4472 UnionTypeConstituents = 516, 4473 IntersectionTypeConstituents = 520, 4474 ObjectBindingPatternElements = 525136, 4475 ArrayBindingPatternElements = 524880, 4476 ObjectLiteralExpressionProperties = 526226, 4477 ImportClauseEntries = 526226, 4478 ArrayLiteralExpressionElements = 8914, 4479 CommaListElements = 528, 4480 CallExpressionArguments = 2576, 4481 NewExpressionArguments = 18960, 4482 TemplateExpressionSpans = 262144, 4483 SingleLineBlockStatements = 768, 4484 MultiLineBlockStatements = 129, 4485 VariableDeclarationList = 528, 4486 SingleLineFunctionBodyStatements = 768, 4487 MultiLineFunctionBodyStatements = 1, 4488 ClassHeritageClauses = 0, 4489 ClassMembers = 129, 4490 InterfaceMembers = 129, 4491 EnumMembers = 145, 4492 CaseBlockClauses = 129, 4493 NamedImportsOrExportsElements = 525136, 4494 JsxElementOrFragmentChildren = 262144, 4495 JsxElementAttributes = 262656, 4496 CaseOrDefaultClauseStatements = 163969, 4497 HeritageClauseTypes = 528, 4498 SourceFileStatements = 131073, 4499 Decorators = 2146305, 4500 TypeArguments = 53776, 4501 TypeParameters = 53776, 4502 Parameters = 2576, 4503 IndexSignatureParameters = 8848, 4504 JSDocComment = 33 4505 } 4506 export interface UserPreferences { 4507 readonly disableSuggestions?: boolean; 4508 readonly quotePreference?: "auto" | "double" | "single"; 4509 readonly includeCompletionsForModuleExports?: boolean; 4510 readonly includeCompletionsForImportStatements?: boolean; 4511 readonly includeCompletionsWithSnippetText?: boolean; 4512 readonly includeAutomaticOptionalChainCompletions?: boolean; 4513 readonly includeCompletionsWithInsertText?: boolean; 4514 readonly includeCompletionsWithClassMemberSnippets?: boolean; 4515 readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean; 4516 readonly useLabelDetailsInCompletionEntries?: boolean; 4517 readonly allowIncompleteCompletions?: boolean; 4518 readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative"; 4519 /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ 4520 readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; 4521 readonly allowTextChangesInNewFiles?: boolean; 4522 readonly providePrefixAndSuffixTextForRename?: boolean; 4523 readonly includePackageJsonAutoImports?: "auto" | "on" | "off"; 4524 readonly provideRefactorNotApplicableReason?: boolean; 4525 readonly jsxAttributeCompletionStyle?: "auto" | "braces" | "none"; 4526 readonly includeInlayParameterNameHints?: "none" | "literals" | "all"; 4527 readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean; 4528 readonly includeInlayFunctionParameterTypeHints?: boolean; 4529 readonly includeInlayVariableTypeHints?: boolean; 4530 readonly includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean; 4531 readonly includeInlayPropertyDeclarationTypeHints?: boolean; 4532 readonly includeInlayFunctionLikeReturnTypeHints?: boolean; 4533 readonly includeInlayEnumMemberValueHints?: boolean; 4534 readonly allowRenameOfImportPath?: boolean; 4535 readonly autoImportFileExcludePatterns?: string[]; 4536 } 4537 /** Represents a bigint literal value without requiring bigint support */ 4538 export interface PseudoBigInt { 4539 negative: boolean; 4540 base10Value: string; 4541 } 4542 export {}; 4543} 4544declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any; 4545declare function clearTimeout(handle: any): void; 4546declare namespace ts { 4547 export enum FileWatcherEventKind { 4548 Created = 0, 4549 Changed = 1, 4550 Deleted = 2 4551 } 4552 export type FileWatcherCallback = (fileName: string, eventKind: FileWatcherEventKind, modifiedTime?: Date) => void; 4553 export type DirectoryWatcherCallback = (fileName: string) => void; 4554 export interface System { 4555 args: string[]; 4556 newLine: string; 4557 useCaseSensitiveFileNames: boolean; 4558 write(s: string): void; 4559 writeOutputIsTTY?(): boolean; 4560 getWidthOfTerminal?(): number; 4561 readFile(path: string, encoding?: string): string | undefined; 4562 getFileSize?(path: string): number; 4563 writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; 4564 /** 4565 * @pollingInterval - this parameter is used in polling-based watchers and ignored in watchers that 4566 * use native OS file watching 4567 */ 4568 watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher; 4569 watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher; 4570 resolvePath(path: string): string; 4571 fileExists(path: string): boolean; 4572 directoryExists(path: string): boolean; 4573 createDirectory(path: string): void; 4574 getExecutingFilePath(): string; 4575 getCurrentDirectory(): string; 4576 getDirectories(path: string): string[]; 4577 readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; 4578 getModifiedTime?(path: string): Date | undefined; 4579 setModifiedTime?(path: string, time: Date): void; 4580 deleteFile?(path: string): void; 4581 /** 4582 * A good implementation is node.js' `crypto.createHash`. (https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm) 4583 */ 4584 createHash?(data: string): string; 4585 /** This must be cryptographically secure. Only implement this method using `crypto.createHash("sha256")`. */ 4586 createSHA256Hash?(data: string): string; 4587 getMemoryUsage?(): number; 4588 exit(exitCode?: number): void; 4589 realpath?(path: string): string; 4590 setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any; 4591 clearTimeout?(timeoutId: any): void; 4592 clearScreen?(): void; 4593 base64decode?(input: string): string; 4594 base64encode?(input: string): string; 4595 } 4596 export interface FileWatcher { 4597 close(): void; 4598 } 4599 export function getNodeMajorVersion(): number | undefined; 4600 export let sys: System; 4601 export {}; 4602} 4603declare namespace ts { 4604 type ErrorCallback = (message: DiagnosticMessage, length: number) => void; 4605 interface Scanner { 4606 getStartPos(): number; 4607 getToken(): SyntaxKind; 4608 getTextPos(): number; 4609 getTokenPos(): number; 4610 getTokenText(): string; 4611 getTokenValue(): string; 4612 hasUnicodeEscape(): boolean; 4613 hasExtendedUnicodeEscape(): boolean; 4614 hasPrecedingLineBreak(): boolean; 4615 isIdentifier(): boolean; 4616 isReservedWord(): boolean; 4617 isUnterminated(): boolean; 4618 reScanGreaterToken(): SyntaxKind; 4619 reScanSlashToken(): SyntaxKind; 4620 reScanAsteriskEqualsToken(): SyntaxKind; 4621 reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind; 4622 reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind; 4623 scanJsxIdentifier(): SyntaxKind; 4624 scanJsxAttributeValue(): SyntaxKind; 4625 reScanJsxAttributeValue(): SyntaxKind; 4626 reScanJsxToken(allowMultilineJsxText?: boolean): JsxTokenSyntaxKind; 4627 reScanLessThanToken(): SyntaxKind; 4628 reScanHashToken(): SyntaxKind; 4629 reScanQuestionToken(): SyntaxKind; 4630 reScanInvalidIdentifier(): SyntaxKind; 4631 scanJsxToken(): JsxTokenSyntaxKind; 4632 scanJsDocToken(): JSDocSyntaxKind; 4633 scan(): SyntaxKind; 4634 getText(): string; 4635 setText(text: string | undefined, start?: number, length?: number): void; 4636 setOnError(onError: ErrorCallback | undefined): void; 4637 setScriptTarget(scriptTarget: ScriptTarget): void; 4638 setLanguageVariant(variant: LanguageVariant): void; 4639 setTextPos(textPos: number): void; 4640 lookAhead<T>(callback: () => T): T; 4641 scanRange<T>(start: number, length: number, callback: () => T): T; 4642 tryScan<T>(callback: () => T): T; 4643 setEtsContext(isEtsContext: boolean): void; 4644 } 4645 function tokenToString(t: SyntaxKind): string | undefined; 4646 function getPositionOfLineAndCharacter(sourceFile: SourceFileLike, line: number, character: number): number; 4647 function getLineAndCharacterOfPosition(sourceFile: SourceFileLike, position: number): LineAndCharacter; 4648 function isWhiteSpaceLike(ch: number): boolean; 4649 /** Does not include line breaks. For that, see isWhiteSpaceLike. */ 4650 function isWhiteSpaceSingleLine(ch: number): boolean; 4651 function isLineBreak(ch: number): boolean; 4652 function couldStartTrivia(text: string, pos: number): boolean; 4653 function forEachLeadingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined; 4654 function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined; 4655 function forEachTrailingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined; 4656 function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined; 4657 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; 4658 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; 4659 function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined; 4660 function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined; 4661 /** Optionally, get the shebang */ 4662 function getShebang(text: string): string | undefined; 4663 function isIdentifierStart(ch: number, languageVersion: ScriptTarget | undefined): boolean; 4664 function isIdentifierPart(ch: number, languageVersion: ScriptTarget | undefined, identifierVariant?: LanguageVariant): boolean; 4665 function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, textInitial?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner; 4666} 4667declare namespace ts { 4668 function isExternalModuleNameRelative(moduleName: string): boolean; 4669 function sortAndDeduplicateDiagnostics<T extends Diagnostic>(diagnostics: readonly T[]): SortedReadonlyArray<T>; 4670 function getDefaultLibFileName(options: CompilerOptions): string; 4671 function textSpanEnd(span: TextSpan): number; 4672 function textSpanIsEmpty(span: TextSpan): boolean; 4673 function textSpanContainsPosition(span: TextSpan, position: number): boolean; 4674 function textSpanContainsTextSpan(span: TextSpan, other: TextSpan): boolean; 4675 function textSpanOverlapsWith(span: TextSpan, other: TextSpan): boolean; 4676 function textSpanOverlap(span1: TextSpan, span2: TextSpan): TextSpan | undefined; 4677 function textSpanIntersectsWithTextSpan(span: TextSpan, other: TextSpan): boolean; 4678 function textSpanIntersectsWith(span: TextSpan, start: number, length: number): boolean; 4679 function decodedTextSpanIntersectsWith(start1: number, length1: number, start2: number, length2: number): boolean; 4680 function textSpanIntersectsWithPosition(span: TextSpan, position: number): boolean; 4681 function textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan | undefined; 4682 function createTextSpan(start: number, length: number): TextSpan; 4683 function createTextSpanFromBounds(start: number, end: number): TextSpan; 4684 function textChangeRangeNewSpan(range: TextChangeRange): TextSpan; 4685 function textChangeRangeIsUnchanged(range: TextChangeRange): boolean; 4686 function createTextChangeRange(span: TextSpan, newLength: number): TextChangeRange; 4687 let unchangedTextChangeRange: TextChangeRange; 4688 /** 4689 * Called to merge all the changes that occurred across several versions of a script snapshot 4690 * into a single change. i.e. if a user keeps making successive edits to a script we will 4691 * have a text change from V1 to V2, V2 to V3, ..., Vn. 4692 * 4693 * This function will then merge those changes into a single change range valid between V1 and 4694 * Vn. 4695 */ 4696 function collapseTextChangeRangesAcrossMultipleVersions(changes: readonly TextChangeRange[]): TextChangeRange; 4697 function getTypeParameterOwner(d: Declaration): Declaration | undefined; 4698 type ParameterPropertyDeclaration = ParameterDeclaration & { 4699 parent: ConstructorDeclaration; 4700 name: Identifier; 4701 }; 4702 function isParameterPropertyDeclaration(node: Node, parent: Node): node is ParameterPropertyDeclaration; 4703 function isEmptyBindingPattern(node: BindingName): node is BindingPattern; 4704 function isEmptyBindingElement(node: BindingElement): boolean; 4705 function walkUpBindingElementsAndPatterns(binding: BindingElement): VariableDeclaration | ParameterDeclaration; 4706 function getCombinedModifierFlags(node: Declaration): ModifierFlags; 4707 function getCombinedNodeFlags(node: Node): NodeFlags; 4708 /** 4709 * Checks to see if the locale is in the appropriate format, 4710 * and if it is, attempts to set the appropriate language. 4711 */ 4712 function validateLocaleAndSetLanguage(locale: string, sys: { 4713 getExecutingFilePath(): string; 4714 resolvePath(path: string): string; 4715 fileExists(fileName: string): boolean; 4716 readFile(fileName: string): string | undefined; 4717 }, errors?: Push<Diagnostic>): void; 4718 function getOriginalNode(node: Node): Node; 4719 function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T; 4720 function getOriginalNode(node: Node | undefined): Node | undefined; 4721 function getOriginalNode<T extends Node>(node: Node | undefined, nodeTest: (node: Node | undefined) => node is T): T | undefined; 4722 /** 4723 * Iterates through the parent chain of a node and performs the callback on each parent until the callback 4724 * returns a truthy value, then returns that value. 4725 * If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit" 4726 * At that point findAncestor returns undefined. 4727 */ 4728 function findAncestor<T extends Node>(node: Node | undefined, callback: (element: Node) => element is T): T | undefined; 4729 function findAncestor(node: Node | undefined, callback: (element: Node) => boolean | "quit"): Node | undefined; 4730 /** 4731 * Gets a value indicating whether a node originated in the parse tree. 4732 * 4733 * @param node The node to test. 4734 */ 4735 function isParseTreeNode(node: Node): boolean; 4736 /** 4737 * Gets the original parse tree node for a node. 4738 * 4739 * @param node The original node. 4740 * @returns The original parse tree node if found; otherwise, undefined. 4741 */ 4742 function getParseTreeNode(node: Node | undefined): Node | undefined; 4743 /** 4744 * Gets the original parse tree node for a node. 4745 * 4746 * @param node The original node. 4747 * @param nodeTest A callback used to ensure the correct type of parse tree node is returned. 4748 * @returns The original parse tree node if found; otherwise, undefined. 4749 */ 4750 function getParseTreeNode<T extends Node>(node: T | undefined, nodeTest?: (node: Node) => node is T): T | undefined; 4751 /** Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' */ 4752 function escapeLeadingUnderscores(identifier: string): __String; 4753 /** 4754 * Remove extra underscore from escaped identifier text content. 4755 * 4756 * @param identifier The escaped identifier text. 4757 * @returns The unescaped identifier text. 4758 */ 4759 function unescapeLeadingUnderscores(identifier: __String): string; 4760 function idText(identifierOrPrivateName: Identifier | PrivateIdentifier): string; 4761 function symbolName(symbol: Symbol): string; 4762 function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined; 4763 function getNameOfDeclaration(declaration: Declaration | Expression | undefined): DeclarationName | undefined; 4764 function getDecorators(node: HasDecorators): readonly Decorator[] | undefined; 4765 function getModifiers(node: HasModifiers): readonly Modifier[] | undefined; 4766 function getAllDecorators(node: Node | undefined): readonly Decorator[]; 4767 function getIllegalDecorators(node: HasIllegalDecorators): readonly Decorator[] | undefined; 4768 /** 4769 * Gets the JSDoc parameter tags for the node if present. 4770 * 4771 * @remarks Returns any JSDoc param tag whose name matches the provided 4772 * parameter, whether a param tag on a containing function 4773 * expression, or a param tag on a variable declaration whose 4774 * initializer is the containing function. The tags closest to the 4775 * node are returned first, so in the previous example, the param 4776 * tag on the containing function expression would be first. 4777 * 4778 * For binding patterns, parameter tags are matched by position. 4779 */ 4780 function getJSDocParameterTags(param: ParameterDeclaration): readonly JSDocParameterTag[]; 4781 /** 4782 * Gets the JSDoc type parameter tags for the node if present. 4783 * 4784 * @remarks Returns any JSDoc template tag whose names match the provided 4785 * parameter, whether a template tag on a containing function 4786 * expression, or a template tag on a variable declaration whose 4787 * initializer is the containing function. The tags closest to the 4788 * node are returned first, so in the previous example, the template 4789 * tag on the containing function expression would be first. 4790 */ 4791 function getJSDocTypeParameterTags(param: TypeParameterDeclaration): readonly JSDocTemplateTag[]; 4792 /** 4793 * Return true if the node has JSDoc parameter tags. 4794 * 4795 * @remarks Includes parameter tags that are not directly on the node, 4796 * for example on a variable declaration whose initializer is a function expression. 4797 */ 4798 function hasJSDocParameterTags(node: FunctionLikeDeclaration | SignatureDeclaration): boolean; 4799 /** Gets the JSDoc augments tag for the node if present */ 4800 function getJSDocAugmentsTag(node: Node): JSDocAugmentsTag | undefined; 4801 /** Gets the JSDoc implements tags for the node if present */ 4802 function getJSDocImplementsTags(node: Node): readonly JSDocImplementsTag[]; 4803 /** Gets the JSDoc class tag for the node if present */ 4804 function getJSDocClassTag(node: Node): JSDocClassTag | undefined; 4805 /** Gets the JSDoc public tag for the node if present */ 4806 function getJSDocPublicTag(node: Node): JSDocPublicTag | undefined; 4807 /** Gets the JSDoc private tag for the node if present */ 4808 function getJSDocPrivateTag(node: Node): JSDocPrivateTag | undefined; 4809 /** Gets the JSDoc protected tag for the node if present */ 4810 function getJSDocProtectedTag(node: Node): JSDocProtectedTag | undefined; 4811 /** Gets the JSDoc protected tag for the node if present */ 4812 function getJSDocReadonlyTag(node: Node): JSDocReadonlyTag | undefined; 4813 function getJSDocOverrideTagNoCache(node: Node): JSDocOverrideTag | undefined; 4814 /** Gets the JSDoc deprecated tag for the node if present */ 4815 function getJSDocDeprecatedTag(node: Node): JSDocDeprecatedTag | undefined; 4816 /** Gets the JSDoc enum tag for the node if present */ 4817 function getJSDocEnumTag(node: Node): JSDocEnumTag | undefined; 4818 /** Gets the JSDoc this tag for the node if present */ 4819 function getJSDocThisTag(node: Node): JSDocThisTag | undefined; 4820 /** Gets the JSDoc return tag for the node if present */ 4821 function getJSDocReturnTag(node: Node): JSDocReturnTag | undefined; 4822 /** Gets the JSDoc template tag for the node if present */ 4823 function getJSDocTemplateTag(node: Node): JSDocTemplateTag | undefined; 4824 /** Gets the JSDoc type tag for the node if present and valid */ 4825 function getJSDocTypeTag(node: Node): JSDocTypeTag | undefined; 4826 /** 4827 * Gets the type node for the node if provided via JSDoc. 4828 * 4829 * @remarks The search includes any JSDoc param tag that relates 4830 * to the provided parameter, for example a type tag on the 4831 * parameter itself, or a param tag on a containing function 4832 * expression, or a param tag on a variable declaration whose 4833 * initializer is the containing function. The tags closest to the 4834 * node are examined first, so in the previous example, the type 4835 * tag directly on the node would be returned. 4836 */ 4837 function getJSDocType(node: Node): TypeNode | undefined; 4838 /** 4839 * Gets the return type node for the node if provided via JSDoc return tag or type tag. 4840 * 4841 * @remarks `getJSDocReturnTag` just gets the whole JSDoc tag. This function 4842 * gets the type from inside the braces, after the fat arrow, etc. 4843 */ 4844 function getJSDocReturnType(node: Node): TypeNode | undefined; 4845 /** Get all JSDoc tags related to a node, including those on parent nodes. */ 4846 function getJSDocTags(node: Node): readonly JSDocTag[]; 4847 /** Gets all JSDoc tags that match a specified predicate */ 4848 function getAllJSDocTags<T extends JSDocTag>(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[]; 4849 /** Gets all JSDoc tags of a specified kind */ 4850 function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[]; 4851 /** Gets the text of a jsdoc comment, flattening links to their text. */ 4852 function getTextOfJSDocComment(comment?: string | NodeArray<JSDocComment>): string | undefined; 4853 /** 4854 * Gets the effective type parameters. If the node was parsed in a 4855 * JavaScript file, gets the type parameters from the `@template` tag from JSDoc. 4856 * 4857 * This does *not* return type parameters from a jsdoc reference to a generic type, eg 4858 * 4859 * type Id = <T>(x: T) => T 4860 * /** @type {Id} / 4861 * function id(x) { return x } 4862 */ 4863 function getEffectiveTypeParameterDeclarations(node: DeclarationWithTypeParameters): readonly TypeParameterDeclaration[]; 4864 function getEffectiveConstraintOfTypeParameter(node: TypeParameterDeclaration): TypeNode | undefined; 4865 function isMemberName(node: Node): node is MemberName; 4866 function isPropertyAccessChain(node: Node): node is PropertyAccessChain; 4867 function isElementAccessChain(node: Node): node is ElementAccessChain; 4868 function isCallChain(node: Node): node is CallChain; 4869 function isOptionalChain(node: Node): node is PropertyAccessChain | ElementAccessChain | CallChain | NonNullChain; 4870 function isNullishCoalesce(node: Node): boolean; 4871 function isConstTypeReference(node: Node): boolean; 4872 function skipPartiallyEmittedExpressions(node: Expression): Expression; 4873 function skipPartiallyEmittedExpressions(node: Node): Node; 4874 function isNonNullChain(node: Node): node is NonNullChain; 4875 function isBreakOrContinueStatement(node: Node): node is BreakOrContinueStatement; 4876 function isNamedExportBindings(node: Node): node is NamedExportBindings; 4877 function isUnparsedTextLike(node: Node): node is UnparsedTextLike; 4878 function isUnparsedNode(node: Node): node is UnparsedNode; 4879 function isJSDocPropertyLikeTag(node: Node): node is JSDocPropertyLikeTag; 4880 /** 4881 * True if kind is of some token syntax kind. 4882 * For example, this is true for an IfKeyword but not for an IfStatement. 4883 * Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail. 4884 */ 4885 function isTokenKind(kind: SyntaxKind): boolean; 4886 /** 4887 * True if node is of some token syntax kind. 4888 * For example, this is true for an IfKeyword but not for an IfStatement. 4889 * Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail. 4890 */ 4891 function isToken(n: Node): boolean; 4892 function isLiteralExpression(node: Node): node is LiteralExpression; 4893 function isTemplateLiteralToken(node: Node): node is TemplateLiteralToken; 4894 function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail; 4895 function isImportOrExportSpecifier(node: Node): node is ImportSpecifier | ExportSpecifier; 4896 function isTypeOnlyImportOrExportDeclaration(node: Node): node is TypeOnlyAliasDeclaration; 4897 function isAssertionKey(node: Node): node is AssertionKey; 4898 function isStringTextContainingNode(node: Node): node is StringLiteral | TemplateLiteralToken; 4899 function isModifier(node: Node): node is Modifier; 4900 function isEntityName(node: Node): node is EntityName; 4901 function isPropertyName(node: Node): node is PropertyName; 4902 function isBindingName(node: Node): node is BindingName; 4903 function isFunctionLike(node: Node | undefined): node is SignatureDeclaration; 4904 function isAnnotationElement(node: Node): node is AnnotationElement; 4905 function isClassElement(node: Node): node is ClassElement; 4906 function isClassLike(node: Node): node is ClassLikeDeclaration; 4907 function isStruct(node: Node): node is StructDeclaration; 4908 function isAccessor(node: Node): node is AccessorDeclaration; 4909 function isAutoAccessorPropertyDeclaration(node: Node): node is AutoAccessorPropertyDeclaration; 4910 function isModifierLike(node: Node): node is ModifierLike; 4911 function isTypeElement(node: Node): node is TypeElement; 4912 function isClassOrTypeElement(node: Node): node is ClassElement | TypeElement; 4913 function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike; 4914 /** 4915 * Node test that determines whether a node is a valid type node. 4916 * This differs from the `isPartOfTypeNode` function which determines whether a node is *part* 4917 * of a TypeNode. 4918 */ 4919 function isTypeNode(node: Node): node is TypeNode; 4920 function isFunctionOrConstructorTypeNode(node: Node): node is FunctionTypeNode | ConstructorTypeNode; 4921 function isPropertyAccessOrQualifiedName(node: Node): node is PropertyAccessExpression | QualifiedName; 4922 function isCallLikeExpression(node: Node): node is CallLikeExpression; 4923 function isCallOrNewExpression(node: Node): node is CallExpression | NewExpression; 4924 function isTemplateLiteral(node: Node): node is TemplateLiteral; 4925 function isAssertionExpression(node: Node): node is AssertionExpression; 4926 function isIterationStatement(node: Node, lookInLabeledStatements: false): node is IterationStatement; 4927 function isIterationStatement(node: Node, lookInLabeledStatements: boolean): node is IterationStatement | LabeledStatement; 4928 function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement; 4929 function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause; 4930 /** True if node is of a kind that may contain comment text. */ 4931 function isJSDocCommentContainingNode(node: Node): boolean; 4932 function isSetAccessor(node: Node): node is SetAccessorDeclaration; 4933 function isGetAccessor(node: Node): node is GetAccessorDeclaration; 4934 /** True if has initializer node attached to it. */ 4935 function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer; 4936 function isObjectLiteralElement(node: Node): node is ObjectLiteralElement; 4937 function isStringLiteralLike(node: Node): node is StringLiteralLike; 4938 function isJSDocLinkLike(node: Node): node is JSDocLink | JSDocLinkCode | JSDocLinkPlain; 4939 function hasRestParameter(s: SignatureDeclaration | JSDocSignature): boolean; 4940 function isRestParameter(node: ParameterDeclaration | JSDocParameterTag): boolean; 4941} 4942declare namespace ts { 4943 function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode: SourceFile): CommentRange[] | undefined; 4944 function createTextWriter(newLine: string): EmitTextWriter; 4945 /** 4946 * Bypasses immutability and directly sets the `parent` property of each `Node` recursively. 4947 * @param rootNode The root node from which to start the recursion. 4948 * @param incremental When `true`, only recursively descends through nodes whose `parent` pointers are incorrect. 4949 * This allows us to quickly bail out of setting `parent` for subtrees during incremental parsing. 4950 */ 4951 function setParentRecursive<T extends Node>(rootNode: T, incremental: boolean): T; 4952 function setParentRecursive<T extends Node>(rootNode: T | undefined, incremental: boolean): T | undefined; 4953} 4954declare namespace ts { 4955 const factory: NodeFactory; 4956 function createUnparsedSourceFile(text: string): UnparsedSource; 4957 function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource; 4958 function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource; 4959 function createInputFiles(javascriptText: string, declarationText: string): InputFiles; 4960 function createInputFiles(readFileText: (path: string) => string | undefined, javascriptPath: string, javascriptMapPath: string | undefined, declarationPath: string, declarationMapPath: string | undefined, buildInfoPath: string | undefined): InputFiles; 4961 function createInputFiles(javascriptText: string, declarationText: string, javascriptMapPath: string | undefined, javascriptMapText: string | undefined, declarationMapPath: string | undefined, declarationMapText: string | undefined): InputFiles; 4962 /** 4963 * Create an external source map source file reference 4964 */ 4965 function createSourceMapSource(fileName: string, text: string, skipTrivia?: (pos: number) => number): SourceMapSource; 4966 function setOriginalNode<T extends Node>(node: T, original: Node | undefined): T; 4967} 4968declare namespace ts { 4969 /** 4970 * Clears any `EmitNode` entries from parse-tree nodes. 4971 * @param sourceFile A source file. 4972 */ 4973 function disposeEmitNodes(sourceFile: SourceFile | undefined): void; 4974 /** 4975 * Sets flags that control emit behavior of a node. 4976 */ 4977 function setEmitFlags<T extends Node>(node: T, emitFlags: EmitFlags): T; 4978 /** 4979 * Gets a custom text range to use when emitting source maps. 4980 */ 4981 function getSourceMapRange(node: Node): SourceMapRange; 4982 /** 4983 * Sets a custom text range to use when emitting source maps. 4984 */ 4985 function setSourceMapRange<T extends Node>(node: T, range: SourceMapRange | undefined): T; 4986 /** 4987 * Gets the TextRange to use for source maps for a token of a node. 4988 */ 4989 function getTokenSourceMapRange(node: Node, token: SyntaxKind): SourceMapRange | undefined; 4990 /** 4991 * Sets the TextRange to use for source maps for a token of a node. 4992 */ 4993 function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: SourceMapRange | undefined): T; 4994 /** 4995 * Gets a custom text range to use when emitting comments. 4996 */ 4997 function getCommentRange(node: Node): TextRange; 4998 /** 4999 * Sets a custom text range to use when emitting comments. 5000 */ 5001 function setCommentRange<T extends Node>(node: T, range: TextRange): T; 5002 function getSyntheticLeadingComments(node: Node): SynthesizedComment[] | undefined; 5003 function setSyntheticLeadingComments<T extends Node>(node: T, comments: SynthesizedComment[] | undefined): T; 5004 function addSyntheticLeadingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T; 5005 function getSyntheticTrailingComments(node: Node): SynthesizedComment[] | undefined; 5006 function setSyntheticTrailingComments<T extends Node>(node: T, comments: SynthesizedComment[] | undefined): T; 5007 function addSyntheticTrailingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T; 5008 function moveSyntheticComments<T extends Node>(node: T, original: Node): T; 5009 /** 5010 * Gets the constant value to emit for an expression representing an enum. 5011 */ 5012 function getConstantValue(node: AccessExpression): string | number | undefined; 5013 /** 5014 * Sets the constant value to emit for an expression. 5015 */ 5016 function setConstantValue(node: AccessExpression, value: string | number): AccessExpression; 5017 /** 5018 * Adds an EmitHelper to a node. 5019 */ 5020 function addEmitHelper<T extends Node>(node: T, helper: EmitHelper): T; 5021 /** 5022 * Add EmitHelpers to a node. 5023 */ 5024 function addEmitHelpers<T extends Node>(node: T, helpers: EmitHelper[] | undefined): T; 5025 /** 5026 * Removes an EmitHelper from a node. 5027 */ 5028 function removeEmitHelper(node: Node, helper: EmitHelper): boolean; 5029 /** 5030 * Gets the EmitHelpers of a node. 5031 */ 5032 function getEmitHelpers(node: Node): EmitHelper[] | undefined; 5033 /** 5034 * Moves matching emit helpers from a source node to a target node. 5035 */ 5036 function moveEmitHelpers(source: Node, target: Node, predicate: (helper: EmitHelper) => boolean): void; 5037} 5038declare namespace ts { 5039 function isNumericLiteral(node: Node): node is NumericLiteral; 5040 function isBigIntLiteral(node: Node): node is BigIntLiteral; 5041 function isStringLiteral(node: Node): node is StringLiteral; 5042 function isJsxText(node: Node): node is JsxText; 5043 function isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral; 5044 function isNoSubstitutionTemplateLiteral(node: Node): node is NoSubstitutionTemplateLiteral; 5045 function isTemplateHead(node: Node): node is TemplateHead; 5046 function isTemplateMiddle(node: Node): node is TemplateMiddle; 5047 function isTemplateTail(node: Node): node is TemplateTail; 5048 function isDotDotDotToken(node: Node): node is DotDotDotToken; 5049 function isPlusToken(node: Node): node is PlusToken; 5050 function isMinusToken(node: Node): node is MinusToken; 5051 function isAsteriskToken(node: Node): node is AsteriskToken; 5052 function isIdentifier(node: Node): node is Identifier; 5053 function isPrivateIdentifier(node: Node): node is PrivateIdentifier; 5054 function isQualifiedName(node: Node): node is QualifiedName; 5055 function isComputedPropertyName(node: Node): node is ComputedPropertyName; 5056 function isTypeParameterDeclaration(node: Node): node is TypeParameterDeclaration; 5057 function isParameter(node: Node): node is ParameterDeclaration; 5058 function isDecorator(node: Node): node is Decorator; 5059 function isAnnotation(node: Node): node is Annotation; 5060 function isPropertySignature(node: Node): node is PropertySignature; 5061 function isPropertyDeclaration(node: Node): node is PropertyDeclaration; 5062 function isAnnotationPropertyDeclaration(node: Node): node is AnnotationPropertyDeclaration; 5063 function isMethodSignature(node: Node): node is MethodSignature; 5064 function isMethodDeclaration(node: Node): node is MethodDeclaration; 5065 function isClassStaticBlockDeclaration(node: Node): node is ClassStaticBlockDeclaration; 5066 function isConstructorDeclaration(node: Node): node is ConstructorDeclaration; 5067 function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration; 5068 function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration; 5069 function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration; 5070 function isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration; 5071 function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration; 5072 function isTypePredicateNode(node: Node): node is TypePredicateNode; 5073 function isTypeReferenceNode(node: Node): node is TypeReferenceNode; 5074 function isFunctionTypeNode(node: Node): node is FunctionTypeNode; 5075 function isConstructorTypeNode(node: Node): node is ConstructorTypeNode; 5076 function isTypeQueryNode(node: Node): node is TypeQueryNode; 5077 function isTypeLiteralNode(node: Node): node is TypeLiteralNode; 5078 function isArrayTypeNode(node: Node): node is ArrayTypeNode; 5079 function isTupleTypeNode(node: Node): node is TupleTypeNode; 5080 function isNamedTupleMember(node: Node): node is NamedTupleMember; 5081 function isOptionalTypeNode(node: Node): node is OptionalTypeNode; 5082 function isRestTypeNode(node: Node): node is RestTypeNode; 5083 function isUnionTypeNode(node: Node): node is UnionTypeNode; 5084 function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode; 5085 function isConditionalTypeNode(node: Node): node is ConditionalTypeNode; 5086 function isInferTypeNode(node: Node): node is InferTypeNode; 5087 function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode; 5088 function isThisTypeNode(node: Node): node is ThisTypeNode; 5089 function isTypeOperatorNode(node: Node): node is TypeOperatorNode; 5090 function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode; 5091 function isMappedTypeNode(node: Node): node is MappedTypeNode; 5092 function isLiteralTypeNode(node: Node): node is LiteralTypeNode; 5093 function isImportTypeNode(node: Node): node is ImportTypeNode; 5094 function isTemplateLiteralTypeSpan(node: Node): node is TemplateLiteralTypeSpan; 5095 function isTemplateLiteralTypeNode(node: Node): node is TemplateLiteralTypeNode; 5096 function isObjectBindingPattern(node: Node): node is ObjectBindingPattern; 5097 function isArrayBindingPattern(node: Node): node is ArrayBindingPattern; 5098 function isBindingElement(node: Node): node is BindingElement; 5099 function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression; 5100 function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression; 5101 function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression; 5102 function isElementAccessExpression(node: Node): node is ElementAccessExpression; 5103 function isCallExpression(node: Node): node is CallExpression; 5104 function isNewExpression(node: Node): node is NewExpression; 5105 function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression; 5106 function isTypeAssertionExpression(node: Node): node is TypeAssertion; 5107 function isParenthesizedExpression(node: Node): node is ParenthesizedExpression; 5108 function isFunctionExpression(node: Node): node is FunctionExpression; 5109 function isEtsComponentExpression(node: Node): node is EtsComponentExpression; 5110 function isArrowFunction(node: Node): node is ArrowFunction; 5111 function isDeleteExpression(node: Node): node is DeleteExpression; 5112 function isTypeOfExpression(node: Node): node is TypeOfExpression; 5113 function isVoidExpression(node: Node): node is VoidExpression; 5114 function isAwaitExpression(node: Node): node is AwaitExpression; 5115 function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression; 5116 function isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression; 5117 function isBinaryExpression(node: Node): node is BinaryExpression; 5118 function isConditionalExpression(node: Node): node is ConditionalExpression; 5119 function isTemplateExpression(node: Node): node is TemplateExpression; 5120 function isYieldExpression(node: Node): node is YieldExpression; 5121 function isSpreadElement(node: Node): node is SpreadElement; 5122 function isClassExpression(node: Node): node is ClassExpression; 5123 function isOmittedExpression(node: Node): node is OmittedExpression; 5124 function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments; 5125 function isAsExpression(node: Node): node is AsExpression; 5126 function isSatisfiesExpression(node: Node): node is SatisfiesExpression; 5127 function isNonNullExpression(node: Node): node is NonNullExpression; 5128 function isMetaProperty(node: Node): node is MetaProperty; 5129 function isSyntheticExpression(node: Node): node is SyntheticExpression; 5130 function isPartiallyEmittedExpression(node: Node): node is PartiallyEmittedExpression; 5131 function isCommaListExpression(node: Node): node is CommaListExpression; 5132 function isTemplateSpan(node: Node): node is TemplateSpan; 5133 function isSemicolonClassElement(node: Node): node is SemicolonClassElement; 5134 function isBlock(node: Node): node is Block; 5135 function isVariableStatement(node: Node): node is VariableStatement; 5136 function isEmptyStatement(node: Node): node is EmptyStatement; 5137 function isExpressionStatement(node: Node): node is ExpressionStatement; 5138 function isIfStatement(node: Node): node is IfStatement; 5139 function isDoStatement(node: Node): node is DoStatement; 5140 function isWhileStatement(node: Node): node is WhileStatement; 5141 function isForStatement(node: Node): node is ForStatement; 5142 function isForInStatement(node: Node): node is ForInStatement; 5143 function isForOfStatement(node: Node): node is ForOfStatement; 5144 function isContinueStatement(node: Node): node is ContinueStatement; 5145 function isBreakStatement(node: Node): node is BreakStatement; 5146 function isReturnStatement(node: Node): node is ReturnStatement; 5147 function isWithStatement(node: Node): node is WithStatement; 5148 function isSwitchStatement(node: Node): node is SwitchStatement; 5149 function isLabeledStatement(node: Node): node is LabeledStatement; 5150 function isThrowStatement(node: Node): node is ThrowStatement; 5151 function isTryStatement(node: Node): node is TryStatement; 5152 function isDebuggerStatement(node: Node): node is DebuggerStatement; 5153 function isVariableDeclaration(node: Node): node is VariableDeclaration; 5154 function isVariableDeclarationList(node: Node): node is VariableDeclarationList; 5155 function isFunctionDeclaration(node: Node): node is FunctionDeclaration; 5156 function isClassDeclaration(node: Node): node is ClassDeclaration; 5157 function isStructDeclaration(node: Node): node is StructDeclaration; 5158 function isAnnotationDeclaration(node: Node): node is AnnotationDeclaration; 5159 function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration; 5160 function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration; 5161 function isEnumDeclaration(node: Node): node is EnumDeclaration; 5162 function isModuleDeclaration(node: Node): node is ModuleDeclaration; 5163 function isModuleBlock(node: Node): node is ModuleBlock; 5164 function isCaseBlock(node: Node): node is CaseBlock; 5165 function isNamespaceExportDeclaration(node: Node): node is NamespaceExportDeclaration; 5166 function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration; 5167 function isImportDeclaration(node: Node): node is ImportDeclaration; 5168 function isImportClause(node: Node): node is ImportClause; 5169 function isImportTypeAssertionContainer(node: Node): node is ImportTypeAssertionContainer; 5170 function isAssertClause(node: Node): node is AssertClause; 5171 function isAssertEntry(node: Node): node is AssertEntry; 5172 function isNamespaceImport(node: Node): node is NamespaceImport; 5173 function isNamespaceExport(node: Node): node is NamespaceExport; 5174 function isNamedImports(node: Node): node is NamedImports; 5175 function isImportSpecifier(node: Node): node is ImportSpecifier; 5176 function isExportAssignment(node: Node): node is ExportAssignment; 5177 function isExportDeclaration(node: Node): node is ExportDeclaration; 5178 function isNamedExports(node: Node): node is NamedExports; 5179 function isExportSpecifier(node: Node): node is ExportSpecifier; 5180 function isMissingDeclaration(node: Node): node is MissingDeclaration; 5181 function isNotEmittedStatement(node: Node): node is NotEmittedStatement; 5182 function isExternalModuleReference(node: Node): node is ExternalModuleReference; 5183 function isJsxElement(node: Node): node is JsxElement; 5184 function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement; 5185 function isJsxOpeningElement(node: Node): node is JsxOpeningElement; 5186 function isJsxClosingElement(node: Node): node is JsxClosingElement; 5187 function isJsxFragment(node: Node): node is JsxFragment; 5188 function isJsxOpeningFragment(node: Node): node is JsxOpeningFragment; 5189 function isJsxClosingFragment(node: Node): node is JsxClosingFragment; 5190 function isJsxAttribute(node: Node): node is JsxAttribute; 5191 function isJsxAttributes(node: Node): node is JsxAttributes; 5192 function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute; 5193 function isJsxExpression(node: Node): node is JsxExpression; 5194 function isCaseClause(node: Node): node is CaseClause; 5195 function isDefaultClause(node: Node): node is DefaultClause; 5196 function isHeritageClause(node: Node): node is HeritageClause; 5197 function isCatchClause(node: Node): node is CatchClause; 5198 function isPropertyAssignment(node: Node): node is PropertyAssignment; 5199 function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment; 5200 function isSpreadAssignment(node: Node): node is SpreadAssignment; 5201 function isEnumMember(node: Node): node is EnumMember; 5202 function isUnparsedPrepend(node: Node): node is UnparsedPrepend; 5203 function isSourceFile(node: Node): node is SourceFile; 5204 function isBundle(node: Node): node is Bundle; 5205 function isUnparsedSource(node: Node): node is UnparsedSource; 5206 function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression; 5207 function isJSDocNameReference(node: Node): node is JSDocNameReference; 5208 function isJSDocMemberName(node: Node): node is JSDocMemberName; 5209 function isJSDocLink(node: Node): node is JSDocLink; 5210 function isJSDocLinkCode(node: Node): node is JSDocLinkCode; 5211 function isJSDocLinkPlain(node: Node): node is JSDocLinkPlain; 5212 function isJSDocAllType(node: Node): node is JSDocAllType; 5213 function isJSDocUnknownType(node: Node): node is JSDocUnknownType; 5214 function isJSDocNullableType(node: Node): node is JSDocNullableType; 5215 function isJSDocNonNullableType(node: Node): node is JSDocNonNullableType; 5216 function isJSDocOptionalType(node: Node): node is JSDocOptionalType; 5217 function isJSDocFunctionType(node: Node): node is JSDocFunctionType; 5218 function isJSDocVariadicType(node: Node): node is JSDocVariadicType; 5219 function isJSDocNamepathType(node: Node): node is JSDocNamepathType; 5220 function isJSDoc(node: Node): node is JSDoc; 5221 function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral; 5222 function isJSDocSignature(node: Node): node is JSDocSignature; 5223 function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag; 5224 function isJSDocAuthorTag(node: Node): node is JSDocAuthorTag; 5225 function isJSDocClassTag(node: Node): node is JSDocClassTag; 5226 function isJSDocCallbackTag(node: Node): node is JSDocCallbackTag; 5227 function isJSDocPublicTag(node: Node): node is JSDocPublicTag; 5228 function isJSDocPrivateTag(node: Node): node is JSDocPrivateTag; 5229 function isJSDocProtectedTag(node: Node): node is JSDocProtectedTag; 5230 function isJSDocReadonlyTag(node: Node): node is JSDocReadonlyTag; 5231 function isJSDocOverrideTag(node: Node): node is JSDocOverrideTag; 5232 function isJSDocDeprecatedTag(node: Node): node is JSDocDeprecatedTag; 5233 function isJSDocSeeTag(node: Node): node is JSDocSeeTag; 5234 function isJSDocEnumTag(node: Node): node is JSDocEnumTag; 5235 function isJSDocParameterTag(node: Node): node is JSDocParameterTag; 5236 function isJSDocReturnTag(node: Node): node is JSDocReturnTag; 5237 function isJSDocThisTag(node: Node): node is JSDocThisTag; 5238 function isJSDocTypeTag(node: Node): node is JSDocTypeTag; 5239 function isJSDocTemplateTag(node: Node): node is JSDocTemplateTag; 5240 function isJSDocTypedefTag(node: Node): node is JSDocTypedefTag; 5241 function isJSDocUnknownTag(node: Node): node is JSDocUnknownTag; 5242 function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag; 5243 function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag; 5244} 5245declare namespace ts { 5246 function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T; 5247 function canHaveModifiers(node: Node): node is HasModifiers; 5248 function canHaveDecorators(node: Node): node is HasDecorators; 5249} 5250declare namespace ts { 5251 /** 5252 * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes 5253 * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, 5254 * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns 5255 * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. 5256 * 5257 * @param node a given node to visit its children 5258 * @param cbNode a callback to be invoked for all child nodes 5259 * @param cbNodes a callback to be invoked for embedded array 5260 * 5261 * @remarks `forEachChild` must visit the children of a node in the order 5262 * that they appear in the source code. The language service depends on this property to locate nodes by position. 5263 */ 5264 export function forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray<Node>) => T | undefined): T | undefined; 5265 export interface CreateSourceFileOptions { 5266 languageVersion: ScriptTarget; 5267 /** 5268 * Controls the format the file is detected as - this can be derived from only the path 5269 * and files on disk, but needs to be done with a module resolution cache in scope to be performant. 5270 * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`. 5271 */ 5272 impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS; 5273 /** 5274 * Controls how module-y-ness is set for the given file. Usually the result of calling 5275 * `getSetExternalModuleIndicator` on a valid `CompilerOptions` object. If not present, the default 5276 * check specified by `isFileProbablyExternalModule` will be used to set the field. 5277 */ 5278 setExternalModuleIndicator?: (file: SourceFile) => void; 5279 } 5280 export function createSourceFile(fileName: string, sourceText: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, setParentNodes?: boolean, scriptKind?: ScriptKind, options?: CompilerOptions): SourceFile; 5281 export function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName | undefined; 5282 /** 5283 * Parse json text into SyntaxTree and return node and parse errors if any 5284 * @param fileName 5285 * @param sourceText 5286 */ 5287 export function parseJsonText(fileName: string, sourceText: string): JsonSourceFile; 5288 export function isExternalModule(file: SourceFile): boolean; 5289 export function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean, option?: CompilerOptions): SourceFile; 5290 export {}; 5291} 5292declare namespace ts { 5293 export function parseCommandLine(commandLine: readonly string[], readFile?: (path: string) => string | undefined): ParsedCommandLine; 5294 export type DiagnosticReporter = (diagnostic: Diagnostic) => void; 5295 /** 5296 * Reports config file diagnostics 5297 */ 5298 export interface ConfigFileDiagnosticsReporter { 5299 /** 5300 * Reports unrecoverable error when parsing config file 5301 */ 5302 onUnRecoverableConfigFileDiagnostic: DiagnosticReporter; 5303 } 5304 /** 5305 * Interface extending ParseConfigHost to support ParseConfigFile that reads config file and reports errors 5306 */ 5307 export interface ParseConfigFileHost extends ParseConfigHost, ConfigFileDiagnosticsReporter { 5308 getCurrentDirectory(): string; 5309 } 5310 /** 5311 * Reads the config file, reports errors if any and exits if the config file cannot be found 5312 */ 5313 export function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions | undefined, host: ParseConfigFileHost, extendedConfigCache?: Map<ExtendedConfigCacheEntry>, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): ParsedCommandLine | undefined; 5314 /** 5315 * Read tsconfig.json file 5316 * @param fileName The path to the config file 5317 */ 5318 export function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): { 5319 config?: any; 5320 error?: Diagnostic; 5321 }; 5322 /** 5323 * Parse the text of the tsconfig.json file 5324 * @param fileName The path to the config file 5325 * @param jsonText The text of the config file 5326 */ 5327 export function parseConfigFileTextToJson(fileName: string, jsonText: string): { 5328 config?: any; 5329 error?: Diagnostic; 5330 }; 5331 /** 5332 * Read tsconfig.json file 5333 * @param fileName The path to the config file 5334 */ 5335 export function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile; 5336 /** 5337 * Convert the json syntax tree into the json value 5338 */ 5339 export function convertToObject(sourceFile: JsonSourceFile, errors: Push<Diagnostic>): any; 5340 /** 5341 * Parse the contents of a config file (tsconfig.json). 5342 * @param json The contents of the config file to parse 5343 * @param host Instance of ParseConfigHost used to enumerate files in folder. 5344 * @param basePath A root directory to resolve relative path entries in the config 5345 * file to. e.g. outDir 5346 */ 5347 export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map<ExtendedConfigCacheEntry>, existingWatchOptions?: WatchOptions): ParsedCommandLine; 5348 /** 5349 * Parse the contents of a config file (tsconfig.json). 5350 * @param jsonNode The contents of the config file to parse 5351 * @param host Instance of ParseConfigHost used to enumerate files in folder. 5352 * @param basePath A root directory to resolve relative path entries in the config 5353 * file to. e.g. outDir 5354 */ 5355 export function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map<ExtendedConfigCacheEntry>, existingWatchOptions?: WatchOptions): ParsedCommandLine; 5356 export interface ParsedTsconfig { 5357 raw: any; 5358 options?: CompilerOptions; 5359 watchOptions?: WatchOptions; 5360 typeAcquisition?: TypeAcquisition; 5361 /** 5362 * Note that the case of the config path has not yet been normalized, as no files have been imported into the project yet 5363 */ 5364 extendedConfigPath?: string; 5365 } 5366 export interface ExtendedConfigCacheEntry { 5367 extendedResult: TsConfigSourceFile; 5368 extendedConfig: ParsedTsconfig | undefined; 5369 } 5370 export function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): { 5371 options: CompilerOptions; 5372 errors: Diagnostic[]; 5373 }; 5374 export function convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): { 5375 options: TypeAcquisition; 5376 errors: Diagnostic[]; 5377 }; 5378 export {}; 5379} 5380declare namespace ts { 5381 export function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined; 5382 /** 5383 * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. 5384 * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups 5385 * is assumed to be the same as root directory of the project. 5386 */ 5387 export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache, resolutionMode?: SourceFile["impliedNodeFormat"]): ResolvedTypeReferenceDirectiveWithFailedLookupLocations; 5388 /** 5389 * Given a set of options, returns the set of type directive names 5390 * that should be included for this program automatically. 5391 * This list could either come from the config file, 5392 * or from enumerating the types root + initial secondary types lookup location. 5393 * More type directives might appear in the program later as a result of loading actual source files; 5394 * this list is only the set of defaults that are implicitly included. 5395 */ 5396 export function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[]; 5397 export interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache { 5398 } 5399 export interface ModeAwareCache<T> { 5400 get(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined): T | undefined; 5401 set(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined, value: T): this; 5402 delete(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined): this; 5403 has(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined): boolean; 5404 forEach(cb: (elem: T, key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined) => void): void; 5405 size(): number; 5406 } 5407 /** 5408 * Cached resolutions per containing directory. 5409 * This assumes that any module id will have the same resolution for sibling files located in the same folder. 5410 */ 5411 export interface PerDirectoryResolutionCache<T> { 5412 getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): ModeAwareCache<T>; 5413 clear(): void; 5414 /** 5415 * Updates with the current compilerOptions the cache will operate with. 5416 * This updates the redirects map as well if needed so module resolutions are cached if they can across the projects 5417 */ 5418 update(options: CompilerOptions): void; 5419 } 5420 export interface ModuleResolutionCache extends PerDirectoryResolutionCache<ResolvedModuleWithFailedLookupLocations>, NonRelativeModuleNameResolutionCache, PackageJsonInfoCache { 5421 getPackageJsonInfoCache(): PackageJsonInfoCache; 5422 } 5423 /** 5424 * Stored map from non-relative module name to a table: directory -> result of module lookup in this directory 5425 * We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive. 5426 */ 5427 export interface NonRelativeModuleNameResolutionCache extends PackageJsonInfoCache { 5428 getOrCreateCacheForModuleName(nonRelativeModuleName: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined, redirectedReference?: ResolvedProjectReference): PerModuleNameCache; 5429 } 5430 export interface PackageJsonInfoCache { 5431 clear(): void; 5432 } 5433 export interface PerModuleNameCache { 5434 get(directory: string): ResolvedModuleWithFailedLookupLocations | undefined; 5435 set(directory: string, result: ResolvedModuleWithFailedLookupLocations): void; 5436 } 5437 export function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache; 5438 export function createTypeReferenceDirectiveResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): TypeReferenceDirectiveResolutionCache; 5439 export function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache, mode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations | undefined; 5440 export function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations; 5441 export function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations; 5442 /** 5443 * This will be called on the successfully resolved path from `loadModuleFromFile`. 5444 * (Not needed for `loadModuleFromNodeModules` as that looks up the `package.json` or `oh-package.json5` as part of resolution.) 5445 * 5446 * packageDirectory is the directory of the package itself. 5447 * For `blah/node_modules/foo/index.d.ts` this is packageDirectory: "foo" 5448 * For `/node_modules/foo/bar.d.ts` this is packageDirectory: "foo" 5449 * For `/node_modules/@types/foo/bar/index.d.ts` this is packageDirectory: "@types/foo" 5450 * For `/node_modules/foo/bar/index.d.ts` this is packageDirectory: "foo" 5451 */ 5452 export function parseModuleFromPath(resolved: string, packageManagerType?: string): string | undefined; 5453 export function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations; 5454 export {}; 5455} 5456declare namespace ts { 5457 function concatenateDecoratorsAndModifiers(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined): readonly ModifierLike[] | undefined; 5458 function isEtsFunctionDecorators(name: string | undefined, options: CompilerOptions): boolean; 5459 function isOhpm(packageManagerType: string | undefined): boolean; 5460 const ohModulesPathPart: string; 5461 function isOHModules(modulePath: string): boolean; 5462 function isOhpmAndOhModules(packageManagerType: string | undefined, modulePath: string): boolean; 5463 function getModulePathPartByPMType(packageManagerType: string | undefined): string; 5464 function getModuleByPMType(packageManagerType: string | undefined): string; 5465 function getPackageJsonByPMType(packageManagerType: string | undefined): string; 5466 function isOHModulesDirectory(dirPath: Path): boolean; 5467 function isTargetModulesDerectory(dirPath: Path): boolean; 5468 function pathContainsOHModules(path: string): boolean; 5469 function choosePathContainsModules(packageManagerType: string | undefined, fileName: string): boolean; 5470 function getTypeExportImportAndConstEnumTransformer(context: TransformationContext): (node: SourceFile) => SourceFile; 5471 function getAnnotationTransformer(relativeFilePath: string): TransformerFactory<SourceFile>; 5472 function transformAnnotation(context: TransformationContext, relativeFilePath: string): (node: SourceFile) => SourceFile; 5473 /** 5474 * Add 'type' flag to import/export when import/export an type member. 5475 * Replace const enum with number and string literal. 5476 */ 5477 function transformTypeExportImportAndConstEnumInTypeScript(context: TransformationContext): (node: SourceFile) => SourceFile; 5478 function hasTsNoCheckOrTsIgnoreFlag(node: SourceFile): boolean; 5479 function createObfTextSingleLineWriter(): EmitTextWriter; 5480 function cleanKitJsonCache(): void; 5481} 5482declare namespace ts { 5483 /** 5484 * Visits a Node using the supplied visitor, possibly returning a new Node in its place. 5485 * 5486 * @param node The Node to visit. 5487 * @param visitor The callback used to visit the Node. 5488 * @param test A callback to execute to verify the Node is valid. 5489 * @param lift An optional callback to execute to lift a NodeArray into a valid Node. 5490 */ 5491 function visitNode<T extends Node>(node: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T; 5492 /** 5493 * Visits a Node using the supplied visitor, possibly returning a new Node in its place. 5494 * 5495 * @param node The Node to visit. 5496 * @param visitor The callback used to visit the Node. 5497 * @param test A callback to execute to verify the Node is valid. 5498 * @param lift An optional callback to execute to lift a NodeArray into a valid Node. 5499 */ 5500 function visitNode<T extends Node>(node: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T | undefined; 5501 /** 5502 * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. 5503 * 5504 * @param nodes The NodeArray to visit. 5505 * @param visitor The callback used to visit a Node. 5506 * @param test A node test to execute for each node. 5507 * @param start An optional value indicating the starting offset at which to start visiting. 5508 * @param count An optional value indicating the maximum number of nodes to visit. 5509 */ 5510 function visitNodes<T extends Node>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>; 5511 /** 5512 * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. 5513 * 5514 * @param nodes The NodeArray to visit. 5515 * @param visitor The callback used to visit a Node. 5516 * @param test A node test to execute for each node. 5517 * @param start An optional value indicating the starting offset at which to start visiting. 5518 * @param count An optional value indicating the maximum number of nodes to visit. 5519 */ 5520 function visitNodes<T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined; 5521 /** 5522 * Starts a new lexical environment and visits a statement list, ending the lexical environment 5523 * and merging hoisted declarations upon completion. 5524 */ 5525 function visitLexicalEnvironment(statements: NodeArray<Statement>, visitor: Visitor, context: TransformationContext, start?: number, ensureUseStrict?: boolean, nodesVisitor?: NodesVisitor): NodeArray<Statement>; 5526 /** 5527 * Starts a new lexical environment and visits a parameter list, suspending the lexical 5528 * environment upon completion. 5529 */ 5530 function visitParameterList(nodes: NodeArray<ParameterDeclaration>, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray<ParameterDeclaration>; 5531 function visitParameterList(nodes: NodeArray<ParameterDeclaration> | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray<ParameterDeclaration> | undefined; 5532 /** 5533 * Resumes a suspended lexical environment and visits a function body, ending the lexical 5534 * environment and merging hoisted declarations upon completion. 5535 */ 5536 function visitFunctionBody(node: FunctionBody, visitor: Visitor, context: TransformationContext): FunctionBody; 5537 /** 5538 * Resumes a suspended lexical environment and visits a function body, ending the lexical 5539 * environment and merging hoisted declarations upon completion. 5540 */ 5541 function visitFunctionBody(node: FunctionBody | undefined, visitor: Visitor, context: TransformationContext): FunctionBody | undefined; 5542 /** 5543 * Resumes a suspended lexical environment and visits a concise body, ending the lexical 5544 * environment and merging hoisted declarations upon completion. 5545 */ 5546 function visitFunctionBody(node: ConciseBody, visitor: Visitor, context: TransformationContext): ConciseBody; 5547 /** 5548 * Visits an iteration body, adding any block-scoped variables required by the transformation. 5549 */ 5550 function visitIterationBody(body: Statement, visitor: Visitor, context: TransformationContext): Statement; 5551 /** 5552 * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. 5553 * 5554 * @param node The Node whose children will be visited. 5555 * @param visitor The callback used to visit each child. 5556 * @param context A lexical environment context for the visitor. 5557 */ 5558 function visitEachChild<T extends Node>(node: T, visitor: Visitor, context: TransformationContext): T; 5559 /** 5560 * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. 5561 * 5562 * @param node The Node whose children will be visited. 5563 * @param visitor The callback used to visit each child. 5564 * @param context A lexical environment context for the visitor. 5565 */ 5566 function visitEachChild<T extends Node>(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; 5567} 5568declare namespace ts { 5569 interface SourceMapGeneratorOptions { 5570 extendedDiagnostics?: boolean; 5571 } 5572 function createSourceMapGenerator(host: EmitHost, file: string, sourceRoot: string, sourcesDirectoryPath: string, generatorOptions: SourceMapGeneratorOptions): SourceMapGenerator; 5573} 5574declare namespace ts { 5575 function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): string | undefined; 5576 function getTsBuildInfoEmitOutputFilePathForLinter(tsBuildInfoPath: string): string; 5577 function getOutputFileNames(commandLine: ParsedCommandLine, inputFileName: string, ignoreCase: boolean): readonly string[]; 5578 function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer; 5579} 5580declare namespace ts { 5581 export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string | undefined; 5582 export function resolveTripleslashReference(moduleName: string, containingFile: string): string; 5583 export function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost; 5584 export function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 5585 export interface FormatDiagnosticsHost { 5586 getCurrentDirectory(): string; 5587 getCanonicalFileName(fileName: string): string; 5588 getNewLine(): string; 5589 } 5590 export function formatDiagnostics(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string; 5591 export function formatDiagnostic(diagnostic: Diagnostic, host: FormatDiagnosticsHost): string; 5592 export function formatDiagnosticsWithColorAndContext(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string; 5593 export function flattenDiagnosticMessageText(diag: string | DiagnosticMessageChain | undefined, newLine: string, indent?: number): string; 5594 /** 5595 * Calculates the resulting resolution mode for some reference in some file - this is generally the explicitly 5596 * provided resolution mode in the reference, unless one is not present, in which case it is the mode of the containing file. 5597 */ 5598 export function getModeForFileReference(ref: FileReference | string, containingFileMode: SourceFile["impliedNodeFormat"]): ModuleKind.CommonJS | ModuleKind.ESNext | undefined; 5599 /** 5600 * Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly 5601 * 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). 5602 * If you have an actual import node, prefer using getModeForUsageLocation on the reference string node. 5603 * @param file File to fetch the resolution mode within 5604 * @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 5605 */ 5606 export function getModeForResolutionAtIndex(file: SourceFile, index: number): ModuleKind.CommonJS | ModuleKind.ESNext | undefined; 5607 /** 5608 * Calculates the final resolution mode for a given module reference node. This is generally the explicitly provided resolution mode, if 5609 * one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm). 5610 * Notably, this function always returns `undefined` if the containing file has an `undefined` `impliedNodeFormat` - this field is only set when 5611 * `moduleResolution` is `node16`+. 5612 * @param file The file the import or import-like reference is contained within 5613 * @param usage The module reference string 5614 * @returns The final resolution mode of the import 5615 */ 5616 export function getModeForUsageLocation(file: { 5617 impliedNodeFormat?: SourceFile["impliedNodeFormat"]; 5618 }, usage: StringLiteralLike): ModuleKind.CommonJS | ModuleKind.ESNext | undefined; 5619 export function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): readonly Diagnostic[]; 5620 /** 5621 * A function for determining if a given file is esm or cjs format, assuming modern node module resolution rules, as configured by the 5622 * `options` parameter. 5623 * 5624 * @param fileName The normalized absolute path to check the format of (it need not exist on disk) 5625 * @param [packageJsonInfoCache] A cache for package file lookups - it's best to have a cache when this function is called often 5626 * @param host The ModuleResolutionHost which can perform the filesystem lookups for package json data 5627 * @param options The compiler options to perform the analysis under - relevant options are `moduleResolution` and `traceResolution` 5628 * @returns `undefined` if the path has no relevant implied format, `ModuleKind.ESNext` for esm format, and `ModuleKind.CommonJS` for cjs format 5629 */ 5630 export function getImpliedNodeFormatForFile(fileName: Path, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions): ModuleKind.ESNext | ModuleKind.CommonJS | undefined; 5631 /** 5632 * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions' 5633 * that represent a compilation unit. 5634 * 5635 * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and 5636 * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in. 5637 * 5638 * @param createProgramOptions - The options for creating a program. 5639 * @returns A 'Program' object. 5640 */ 5641 export function createProgram(createProgramOptions: CreateProgramOptions): Program; 5642 /** 5643 * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions' 5644 * that represent a compilation unit. 5645 * 5646 * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and 5647 * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in. 5648 * 5649 * @param rootNames - A set of root files. 5650 * @param options - The compiler options which should be used. 5651 * @param host - The host interacts with the underlying file system. 5652 * @param oldProgram - Reuses an old program structure. 5653 * @param configFileParsingDiagnostics - error during config file parsing 5654 * @returns A 'Program' object. 5655 */ 5656 export function createProgram(rootNames: readonly string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: readonly Diagnostic[]): Program; 5657 /** @deprecated */ export interface ResolveProjectReferencePathHost { 5658 fileExists(fileName: string): boolean; 5659 } 5660 /** 5661 * Returns the target config filename of a project reference. 5662 * Note: The file might not exist. 5663 */ 5664 export function resolveProjectReferencePath(ref: ProjectReference): ResolvedConfigFileName; 5665 /** @deprecated */ export function resolveProjectReferencePath(host: ResolveProjectReferencePathHost, ref: ProjectReference): ResolvedConfigFileName; 5666 export {}; 5667} 5668declare namespace ts { 5669 interface EmitOutput { 5670 outputFiles: OutputFile[]; 5671 emitSkipped: boolean; 5672 } 5673 interface OutputFile { 5674 name: string; 5675 writeByteOrderMark: boolean; 5676 text: string; 5677 } 5678} 5679declare namespace ts { 5680 type AffectedFileResult<T> = { 5681 result: T; 5682 affected: SourceFile | Program; 5683 } | undefined; 5684 interface BuilderProgramHost { 5685 /** 5686 * return true if file names are treated with case sensitivity 5687 */ 5688 useCaseSensitiveFileNames(): boolean; 5689 /** 5690 * If provided this would be used this hash instead of actual file shape text for detecting changes 5691 */ 5692 createHash?: (data: string) => string; 5693 /** 5694 * When emit or emitNextAffectedFile are called without writeFile, 5695 * this callback if present would be used to write files 5696 */ 5697 writeFile?: WriteFileCallback; 5698 } 5699 /** 5700 * Builder to manage the program state changes 5701 */ 5702 interface BuilderProgram { 5703 /** 5704 * Returns current program 5705 */ 5706 getProgram(): Program; 5707 /** 5708 * Get compiler options of the program 5709 */ 5710 getCompilerOptions(): CompilerOptions; 5711 /** 5712 * Get the source file in the program with file name 5713 */ 5714 getSourceFile(fileName: string): SourceFile | undefined; 5715 /** 5716 * Get a list of files in the program 5717 */ 5718 getSourceFiles(): readonly SourceFile[]; 5719 /** 5720 * Get the diagnostics for compiler options 5721 */ 5722 getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; 5723 /** 5724 * Get the diagnostics that dont belong to any file 5725 */ 5726 getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; 5727 /** 5728 * Get the diagnostics from config file parsing 5729 */ 5730 getConfigFileParsingDiagnostics(): readonly Diagnostic[]; 5731 /** 5732 * Get the syntax diagnostics, for all source files if source file is not supplied 5733 */ 5734 getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 5735 /** 5736 * Get the declaration diagnostics, for all source files if source file is not supplied 5737 */ 5738 getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[]; 5739 /** 5740 * Get all the dependencies of the file 5741 */ 5742 getAllDependencies(sourceFile: SourceFile): readonly string[]; 5743 /** 5744 * Gets the semantic diagnostics from the program corresponding to this state of file (if provided) or whole program 5745 * The semantic diagnostics are cached and managed here 5746 * Note that it is assumed that when asked about semantic diagnostics through this API, 5747 * the file has been taken out of affected files so it is safe to use cache or get from program and cache the diagnostics 5748 * In case of SemanticDiagnosticsBuilderProgram if the source file is not provided, 5749 * it will iterate through all the affected files, to ensure that cache stays valid and yet provide a way to get all semantic diagnostics 5750 */ 5751 getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 5752 /** 5753 * Emits the JavaScript and declaration files. 5754 * When targetSource file is specified, emits the files corresponding to that source file, 5755 * otherwise for the whole program. 5756 * In case of EmitAndSemanticDiagnosticsBuilderProgram, when targetSourceFile is specified, 5757 * it is assumed that that file is handled from affected file list. If targetSourceFile is not specified, 5758 * it will only emit all the affected files instead of whole program 5759 * 5760 * The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host 5761 * in that order would be used to write the files 5762 */ 5763 emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult; 5764 /** 5765 * Get the current directory of the program 5766 */ 5767 getCurrentDirectory(): string; 5768 isFileUpdateInConstEnumCache?(sourceFile: SourceFile): boolean; 5769 builderProgramForLinter?: EmitAndSemanticDiagnosticsBuilderProgram; 5770 } 5771 /** 5772 * The builder that caches the semantic diagnostics for the program and handles the changed files and affected files 5773 */ 5774 interface SemanticDiagnosticsBuilderProgram extends BuilderProgram { 5775 /** 5776 * Gets the semantic diagnostics from the program for the next affected file and caches it 5777 * Returns undefined if the iteration is complete 5778 */ 5779 getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>; 5780 } 5781 /** 5782 * The builder that can handle the changes in program and iterate through changed file to emit the files 5783 * The semantic diagnostics are cached per file and managed by clearing for the changed/affected files 5784 */ 5785 interface EmitAndSemanticDiagnosticsBuilderProgram extends SemanticDiagnosticsBuilderProgram { 5786 /** 5787 * Emits the next affected file's emit result (EmitResult and sourceFiles emitted) or returns undefined if iteration is complete 5788 * The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host 5789 * in that order would be used to write the files 5790 */ 5791 emitNextAffectedFile(writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): AffectedFileResult<EmitResult>; 5792 } 5793 /** 5794 * Create the builder to manage semantic diagnostics and cache them 5795 */ 5796 function createSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram?: SemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): SemanticDiagnosticsBuilderProgram; 5797 function createSemanticDiagnosticsBuilderProgram(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: SemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): SemanticDiagnosticsBuilderProgram; 5798 /** 5799 * Create the builder that can handle the changes in program and iterate through changed files 5800 * to emit the those files and manage semantic diagnostics cache as well 5801 */ 5802 function createEmitAndSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): EmitAndSemanticDiagnosticsBuilderProgram; 5803 function createEmitAndSemanticDiagnosticsBuilderProgram(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): EmitAndSemanticDiagnosticsBuilderProgram; 5804 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; 5805 /** 5806 * Creates a builder thats just abstraction over program and can be used with watch 5807 */ 5808 function createAbstractBuilder(newProgram: Program, host: BuilderProgramHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): BuilderProgram; 5809 function createAbstractBuilder(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): BuilderProgram; 5810} 5811declare namespace ts { 5812 interface ReadBuildProgramHost { 5813 useCaseSensitiveFileNames(): boolean; 5814 getCurrentDirectory(): string; 5815 readFile(fileName: string): string | undefined; 5816 getLastCompiledProgram?(): Program; 5817 } 5818 function readBuilderProgram(compilerOptions: CompilerOptions, host: ReadBuildProgramHost, isForLinter?: boolean): EmitAndSemanticDiagnosticsBuilderProgram | undefined; 5819 function createIncrementalCompilerHost(options: CompilerOptions, system?: System): CompilerHost; 5820 interface IncrementalProgramOptions<T extends BuilderProgram> { 5821 rootNames: readonly string[]; 5822 options: CompilerOptions; 5823 configFileParsingDiagnostics?: readonly Diagnostic[]; 5824 projectReferences?: readonly ProjectReference[]; 5825 host?: CompilerHost; 5826 createProgram?: CreateProgram<T>; 5827 } 5828 function createIncrementalProgram<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>({ rootNames, options, configFileParsingDiagnostics, projectReferences, host, createProgram }: IncrementalProgramOptions<T>): T; 5829 function createIncrementalProgramForArkTs({ rootNames, options, configFileParsingDiagnostics, projectReferences, host }: IncrementalProgramOptions<EmitAndSemanticDiagnosticsBuilderProgram>): EmitAndSemanticDiagnosticsBuilderProgram; 5830 type WatchStatusReporter = (diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number) => void; 5831 /** Create the program with rootNames and options, if they are undefined, oldProgram and new configFile diagnostics create new program */ 5832 type CreateProgram<T extends BuilderProgram> = (rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: T, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[] | undefined) => T; 5833 /** Host that has watch functionality used in --watch mode */ 5834 interface WatchHost { 5835 /** If provided, called with Diagnostic message that informs about change in watch status */ 5836 onWatchStatusChange?(diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number): void; 5837 /** Used to watch changes in source files, missing files needed to update the program or config file */ 5838 watchFile(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher; 5839 /** Used to watch resolved module's failed lookup locations, config file specs, type roots where auto type reference directives are added */ 5840 watchDirectory(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher; 5841 /** If provided, will be used to set delayed compilation, so that multiple changes in short span are compiled together */ 5842 setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any; 5843 /** If provided, will be used to reset existing delayed compilation */ 5844 clearTimeout?(timeoutId: any): void; 5845 } 5846 interface ProgramHost<T extends BuilderProgram> { 5847 /** 5848 * Used to create the program when need for program creation or recreation detected 5849 */ 5850 createProgram: CreateProgram<T>; 5851 useCaseSensitiveFileNames(): boolean; 5852 getNewLine(): string; 5853 getCurrentDirectory(): string; 5854 getDefaultLibFileName(options: CompilerOptions): string; 5855 getDefaultLibLocation?(): string; 5856 createHash?(data: string): string; 5857 /** 5858 * Use to check file presence for source files and 5859 * if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well 5860 */ 5861 fileExists(path: string): boolean; 5862 /** 5863 * Use to read file text for source files and 5864 * if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well 5865 */ 5866 readFile(path: string, encoding?: string): string | undefined; 5867 /** If provided, used for module resolution as well as to handle directory structure */ 5868 directoryExists?(path: string): boolean; 5869 /** If provided, used in resolutions as well as handling directory structure */ 5870 getDirectories?(path: string): string[]; 5871 /** If provided, used to cache and handle directory structure modifications */ 5872 readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; 5873 /** Symbol links resolution */ 5874 realpath?(path: string): string; 5875 /** If provided would be used to write log about compilation */ 5876 trace?(s: string): void; 5877 /** If provided is used to get the environment variable */ 5878 getEnvironmentVariable?(name: string): string | undefined; 5879 /** If provided, used to resolve the module names, otherwise typescript's default module resolution */ 5880 resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[]; 5881 /** If provided, used to resolve type reference directives, otherwise typescript's default resolution */ 5882 resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[]; 5883 /** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */ 5884 hasInvalidatedResolutions?(filePath: Path): boolean; 5885 /** 5886 * 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 5887 */ 5888 getModuleResolutionCache?(): ModuleResolutionCache | undefined; 5889 } 5890 interface WatchCompilerHost<T extends BuilderProgram> extends ProgramHost<T>, WatchHost { 5891 /** Instead of using output d.ts file from project reference, use its source file */ 5892 useSourceOfProjectReferenceRedirect?(): boolean; 5893 /** If provided, use this method to get parsed command lines for referenced projects */ 5894 getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; 5895 /** If provided, callback to invoke after every new program creation */ 5896 afterProgramCreate?(program: T): void; 5897 } 5898 /** 5899 * Host to create watch with root files and options 5900 */ 5901 interface WatchCompilerHostOfFilesAndCompilerOptions<T extends BuilderProgram> extends WatchCompilerHost<T> { 5902 /** root files to use to generate program */ 5903 rootFiles: string[]; 5904 /** Compiler options */ 5905 options: CompilerOptions; 5906 watchOptions?: WatchOptions; 5907 /** Project References */ 5908 projectReferences?: readonly ProjectReference[]; 5909 } 5910 /** 5911 * Host to create watch with config file 5912 */ 5913 interface WatchCompilerHostOfConfigFile<T extends BuilderProgram> extends WatchCompilerHost<T>, ConfigFileDiagnosticsReporter { 5914 /** Name of the config file to compile */ 5915 configFileName: string; 5916 /** Options to extend */ 5917 optionsToExtend?: CompilerOptions; 5918 watchOptionsToExtend?: WatchOptions; 5919 extraFileExtensions?: readonly FileExtensionInfo[]; 5920 /** 5921 * Used to generate source file names from the config file and its include, exclude, files rules 5922 * and also to cache the directory stucture 5923 */ 5924 readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; 5925 } 5926 interface Watch<T> { 5927 /** Synchronize with host and get updated program */ 5928 getProgram(): T; 5929 /** Closes the watch */ 5930 close(): void; 5931 } 5932 /** 5933 * Creates the watch what generates program using the config file 5934 */ 5935 interface WatchOfConfigFile<T> extends Watch<T> { 5936 } 5937 /** 5938 * Creates the watch that generates program using the root files and compiler options 5939 */ 5940 interface WatchOfFilesAndCompilerOptions<T> extends Watch<T> { 5941 /** Updates the root files in the program, only if this is not config file compilation */ 5942 updateRootFileNames(fileNames: string[]): void; 5943 } 5944 /** 5945 * Create the watch compiler host for either configFile or fileNames and its options 5946 */ 5947 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>; 5948 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>; 5949 /** 5950 * Creates the watch from the host for root files and compiler options 5951 */ 5952 function createWatchProgram<T extends BuilderProgram>(host: WatchCompilerHostOfFilesAndCompilerOptions<T>): WatchOfFilesAndCompilerOptions<T>; 5953 /** 5954 * Creates the watch from the host for config file 5955 */ 5956 function createWatchProgram<T extends BuilderProgram>(host: WatchCompilerHostOfConfigFile<T>): WatchOfConfigFile<T>; 5957} 5958declare namespace ts { 5959 interface BuildOptions { 5960 dry?: boolean; 5961 force?: boolean; 5962 verbose?: boolean; 5963 incremental?: boolean; 5964 assumeChangesOnlyAffectDirectDependencies?: boolean; 5965 traceResolution?: boolean; 5966 [option: string]: CompilerOptionsValue | undefined; 5967 } 5968 type ReportEmitErrorSummary = (errorCount: number, filesInError: (ReportFileInError | undefined)[]) => void; 5969 interface ReportFileInError { 5970 fileName: string; 5971 line: number; 5972 } 5973 interface SolutionBuilderHostBase<T extends BuilderProgram> extends ProgramHost<T> { 5974 createDirectory?(path: string): void; 5975 /** 5976 * Should provide create directory and writeFile if done of invalidatedProjects is not invoked with 5977 * writeFileCallback 5978 */ 5979 writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void; 5980 getCustomTransformers?: (project: string) => CustomTransformers | undefined; 5981 getModifiedTime(fileName: string): Date | undefined; 5982 setModifiedTime(fileName: string, date: Date): void; 5983 deleteFile(fileName: string): void; 5984 getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; 5985 reportDiagnostic: DiagnosticReporter; 5986 reportSolutionBuilderStatus: DiagnosticReporter; 5987 afterProgramEmitAndDiagnostics?(program: T): void; 5988 } 5989 interface SolutionBuilderHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T> { 5990 reportErrorSummary?: ReportEmitErrorSummary; 5991 } 5992 interface SolutionBuilderWithWatchHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T>, WatchHost { 5993 } 5994 interface SolutionBuilder<T extends BuilderProgram> { 5995 build(project?: string, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, getCustomTransformers?: (project: string) => CustomTransformers): ExitStatus; 5996 clean(project?: string): ExitStatus; 5997 buildReferences(project: string, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, getCustomTransformers?: (project: string) => CustomTransformers): ExitStatus; 5998 cleanReferences(project?: string): ExitStatus; 5999 getNextInvalidatedProject(cancellationToken?: CancellationToken): InvalidatedProject<T> | undefined; 6000 } 6001 /** 6002 * Create a function that reports watch status by writing to the system and handles the formating of the diagnostic 6003 */ 6004 function createBuilderStatusReporter(system: System, pretty?: boolean): DiagnosticReporter; 6005 function createSolutionBuilderHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportErrorSummary?: ReportEmitErrorSummary): SolutionBuilderHost<T>; 6006 function createSolutionBuilderWithWatchHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter): SolutionBuilderWithWatchHost<T>; 6007 function createSolutionBuilder<T extends BuilderProgram>(host: SolutionBuilderHost<T>, rootNames: readonly string[], defaultOptions: BuildOptions): SolutionBuilder<T>; 6008 function createSolutionBuilderWithWatch<T extends BuilderProgram>(host: SolutionBuilderWithWatchHost<T>, rootNames: readonly string[], defaultOptions: BuildOptions, baseWatchOptions?: WatchOptions): SolutionBuilder<T>; 6009 enum InvalidatedProjectKind { 6010 Build = 0, 6011 UpdateBundle = 1, 6012 UpdateOutputFileStamps = 2 6013 } 6014 interface InvalidatedProjectBase { 6015 readonly kind: InvalidatedProjectKind; 6016 readonly project: ResolvedConfigFileName; 6017 /** 6018 * To dispose this project and ensure that all the necessary actions are taken and state is updated accordingly 6019 */ 6020 done(cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): ExitStatus; 6021 getCompilerOptions(): CompilerOptions; 6022 getCurrentDirectory(): string; 6023 } 6024 interface UpdateOutputFileStampsProject extends InvalidatedProjectBase { 6025 readonly kind: InvalidatedProjectKind.UpdateOutputFileStamps; 6026 updateOutputFileStatmps(): void; 6027 } 6028 interface BuildInvalidedProject<T extends BuilderProgram> extends InvalidatedProjectBase { 6029 readonly kind: InvalidatedProjectKind.Build; 6030 getBuilderProgram(): T | undefined; 6031 getProgram(): Program | undefined; 6032 getSourceFile(fileName: string): SourceFile | undefined; 6033 getSourceFiles(): readonly SourceFile[]; 6034 getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; 6035 getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; 6036 getConfigFileParsingDiagnostics(): readonly Diagnostic[]; 6037 getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 6038 getAllDependencies(sourceFile: SourceFile): readonly string[]; 6039 getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; 6040 getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>; 6041 emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult | undefined; 6042 } 6043 interface UpdateBundleProject<T extends BuilderProgram> extends InvalidatedProjectBase { 6044 readonly kind: InvalidatedProjectKind.UpdateBundle; 6045 emit(writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): EmitResult | BuildInvalidedProject<T> | undefined; 6046 } 6047 type InvalidatedProject<T extends BuilderProgram> = UpdateOutputFileStampsProject | BuildInvalidedProject<T> | UpdateBundleProject<T>; 6048} 6049declare namespace ts.server { 6050 type ActionSet = "action::set"; 6051 type ActionInvalidate = "action::invalidate"; 6052 type ActionPackageInstalled = "action::packageInstalled"; 6053 type EventTypesRegistry = "event::typesRegistry"; 6054 type EventBeginInstallTypes = "event::beginInstallTypes"; 6055 type EventEndInstallTypes = "event::endInstallTypes"; 6056 type EventInitializationFailed = "event::initializationFailed"; 6057} 6058declare namespace ts.server { 6059 interface TypingInstallerResponse { 6060 readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed; 6061 } 6062 interface TypingInstallerRequestWithProjectName { 6063 readonly projectName: string; 6064 } 6065 interface DiscoverTypings extends TypingInstallerRequestWithProjectName { 6066 readonly fileNames: string[]; 6067 readonly projectRootPath: Path; 6068 readonly compilerOptions: CompilerOptions; 6069 readonly watchOptions?: WatchOptions; 6070 readonly typeAcquisition: TypeAcquisition; 6071 readonly unresolvedImports: SortedReadonlyArray<string>; 6072 readonly cachePath?: string; 6073 readonly kind: "discover"; 6074 } 6075 interface CloseProject extends TypingInstallerRequestWithProjectName { 6076 readonly kind: "closeProject"; 6077 } 6078 interface TypesRegistryRequest { 6079 readonly kind: "typesRegistry"; 6080 } 6081 interface InstallPackageRequest extends TypingInstallerRequestWithProjectName { 6082 readonly kind: "installPackage"; 6083 readonly fileName: Path; 6084 readonly packageName: string; 6085 readonly projectRootPath: Path; 6086 } 6087 interface PackageInstalledResponse extends ProjectResponse { 6088 readonly kind: ActionPackageInstalled; 6089 readonly success: boolean; 6090 readonly message: string; 6091 } 6092 interface InitializationFailedResponse extends TypingInstallerResponse { 6093 readonly kind: EventInitializationFailed; 6094 readonly message: string; 6095 readonly stack?: string; 6096 } 6097 interface ProjectResponse extends TypingInstallerResponse { 6098 readonly projectName: string; 6099 } 6100 interface InvalidateCachedTypings extends ProjectResponse { 6101 readonly kind: ActionInvalidate; 6102 } 6103 interface InstallTypes extends ProjectResponse { 6104 readonly kind: EventBeginInstallTypes | EventEndInstallTypes; 6105 readonly eventId: number; 6106 readonly typingsInstallerVersion: string; 6107 readonly packagesToInstall: readonly string[]; 6108 } 6109 interface BeginInstallTypes extends InstallTypes { 6110 readonly kind: EventBeginInstallTypes; 6111 } 6112 interface EndInstallTypes extends InstallTypes { 6113 readonly kind: EventEndInstallTypes; 6114 readonly installSuccess: boolean; 6115 } 6116 interface SetTypings extends ProjectResponse { 6117 readonly typeAcquisition: TypeAcquisition; 6118 readonly compilerOptions: CompilerOptions; 6119 readonly typings: string[]; 6120 readonly unresolvedImports: SortedReadonlyArray<string>; 6121 readonly kind: ActionSet; 6122 } 6123} 6124declare namespace ts { 6125 interface Node { 6126 getSourceFile(): SourceFile; 6127 getChildCount(sourceFile?: SourceFile): number; 6128 getChildAt(index: number, sourceFile?: SourceFile): Node; 6129 getChildren(sourceFile?: SourceFile): Node[]; 6130 getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number; 6131 getFullStart(): number; 6132 getEnd(): number; 6133 getWidth(sourceFile?: SourceFileLike): number; 6134 getFullWidth(): number; 6135 getLeadingTriviaWidth(sourceFile?: SourceFile): number; 6136 getFullText(sourceFile?: SourceFile): string; 6137 getText(sourceFile?: SourceFile): string; 6138 getFirstToken(sourceFile?: SourceFile): Node | undefined; 6139 getLastToken(sourceFile?: SourceFile): Node | undefined; 6140 forEachChild<T>(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined; 6141 } 6142 interface Identifier { 6143 readonly text: string; 6144 } 6145 interface PrivateIdentifier { 6146 readonly text: string; 6147 } 6148 interface Symbol { 6149 readonly name: string; 6150 getFlags(): SymbolFlags; 6151 getEscapedName(): __String; 6152 getName(): string; 6153 getDeclarations(): Declaration[] | undefined; 6154 getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[]; 6155 getJsDocTags(checker?: TypeChecker): JSDocTagInfo[]; 6156 } 6157 interface Type { 6158 getFlags(): TypeFlags; 6159 getSymbol(): Symbol | undefined; 6160 getProperties(): Symbol[]; 6161 getProperty(propertyName: string): Symbol | undefined; 6162 getApparentProperties(): Symbol[]; 6163 getCallSignatures(): readonly Signature[]; 6164 getConstructSignatures(): readonly Signature[]; 6165 getStringIndexType(): Type | undefined; 6166 getNumberIndexType(): Type | undefined; 6167 getBaseTypes(): BaseType[] | undefined; 6168 getNonNullableType(): Type; 6169 getConstraint(): Type | undefined; 6170 getDefault(): Type | undefined; 6171 isUnion(): this is UnionType; 6172 isIntersection(): this is IntersectionType; 6173 isUnionOrIntersection(): this is UnionOrIntersectionType; 6174 isLiteral(): this is LiteralType; 6175 isStringLiteral(): this is StringLiteralType; 6176 isNumberLiteral(): this is NumberLiteralType; 6177 isTypeParameter(): this is TypeParameter; 6178 isClassOrInterface(): this is InterfaceType; 6179 isClass(): this is InterfaceType; 6180 isIndexType(): this is IndexType; 6181 } 6182 interface TypeReference { 6183 typeArguments?: readonly Type[]; 6184 } 6185 interface Signature { 6186 getDeclaration(): SignatureDeclaration; 6187 getTypeParameters(): TypeParameter[] | undefined; 6188 getParameters(): Symbol[]; 6189 getTypeParameterAtPosition(pos: number): Type; 6190 getReturnType(): Type; 6191 getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[]; 6192 getJsDocTags(): JSDocTagInfo[]; 6193 } 6194 interface SourceFile { 6195 getLineAndCharacterOfPosition(pos: number): LineAndCharacter; 6196 getLineEndOfPosition(pos: number): number; 6197 getLineStarts(): readonly number[]; 6198 getPositionOfLineAndCharacter(line: number, character: number): number; 6199 update(newText: string, textChangeRange: TextChangeRange): SourceFile; 6200 } 6201 interface SourceFileLike { 6202 getLineAndCharacterOfPosition(pos: number): LineAndCharacter; 6203 } 6204 interface SourceMapSource { 6205 getLineAndCharacterOfPosition(pos: number): LineAndCharacter; 6206 } 6207 /** 6208 * Represents an immutable snapshot of a script at a specified time.Once acquired, the 6209 * snapshot is observably immutable. i.e. the same calls with the same parameters will return 6210 * the same values. 6211 */ 6212 interface IScriptSnapshot { 6213 /** Gets a portion of the script snapshot specified by [start, end). */ 6214 getText(start: number, end: number): string; 6215 /** Gets the length of this script snapshot. */ 6216 getLength(): number; 6217 /** 6218 * Gets the TextChangeRange that describe how the text changed between this text and 6219 * an older version. This information is used by the incremental parser to determine 6220 * what sections of the script need to be re-parsed. 'undefined' can be returned if the 6221 * change range cannot be determined. However, in that case, incremental parsing will 6222 * not happen and the entire document will be re - parsed. 6223 */ 6224 getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange | undefined; 6225 /** Releases all resources held by this script snapshot */ 6226 dispose?(): void; 6227 } 6228 namespace ScriptSnapshot { 6229 function fromString(text: string): IScriptSnapshot; 6230 } 6231 interface PreProcessedFileInfo { 6232 referencedFiles: FileReference[]; 6233 typeReferenceDirectives: FileReference[]; 6234 libReferenceDirectives: FileReference[]; 6235 importedFiles: FileReference[]; 6236 ambientExternalModules?: string[]; 6237 isLibFile: boolean; 6238 } 6239 interface HostCancellationToken { 6240 isCancellationRequested(): boolean; 6241 } 6242 interface InstallPackageOptions { 6243 fileName: Path; 6244 packageName: string; 6245 } 6246 interface PerformanceEvent { 6247 kind: "UpdateGraph" | "CreatePackageJsonAutoImportProvider"; 6248 durationMs: number; 6249 } 6250 enum LanguageServiceMode { 6251 Semantic = 0, 6252 PartialSemantic = 1, 6253 Syntactic = 2 6254 } 6255 interface IncompleteCompletionsCache { 6256 get(): CompletionInfo | undefined; 6257 set(response: CompletionInfo): void; 6258 clear(): void; 6259 } 6260 interface LanguageServiceHost extends GetEffectiveTypeRootsHost, MinimalResolutionCacheHost { 6261 getCompilationSettings(): CompilerOptions; 6262 getNewLine?(): string; 6263 getProjectVersion?(): string; 6264 getScriptFileNames(): string[]; 6265 getScriptKind?(fileName: string): ScriptKind; 6266 getScriptVersion(fileName: string): string; 6267 getScriptSnapshot(fileName: string): IScriptSnapshot | undefined; 6268 getProjectReferences?(): readonly ProjectReference[] | undefined; 6269 getLocalizedDiagnosticMessages?(): any; 6270 getCancellationToken?(): HostCancellationToken; 6271 getCurrentDirectory(): string; 6272 getDefaultLibFileName(options: CompilerOptions): string; 6273 log?(s: string): void; 6274 trace?(s: string): void; 6275 error?(s: string): void; 6276 useCaseSensitiveFileNames?(): boolean; 6277 readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; 6278 realpath?(path: string): string; 6279 readFile(path: string, encoding?: string): string | undefined; 6280 fileExists(path: string): boolean; 6281 getTypeRootsVersion?(): number; 6282 resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[]; 6283 getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations | undefined; 6284 resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[]; 6285 getDirectories?(directoryName: string): string[]; 6286 /** 6287 * Gets a set of custom transformers to use during emit. 6288 */ 6289 getCustomTransformers?(): CustomTransformers | undefined; 6290 isKnownTypesPackageName?(name: string): boolean; 6291 installPackage?(options: InstallPackageOptions): Promise<ApplyCodeActionCommandResult>; 6292 writeFile?(fileName: string, content: string): void; 6293 getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; 6294 getJsDocNodeCheckedConfig?(jsDocFileCheckInfo: FileCheckModuleInfo, symbolSourceFilePath: string): JsDocNodeCheckConfig; 6295 getJsDocNodeConditionCheckedResult?(jsDocFileCheckedInfo: FileCheckModuleInfo, jsDocs: JsDocTagInfo[]): ConditionCheckResult; 6296 getFileCheckedModuleInfo?(containFilePath: string): FileCheckModuleInfo; 6297 shouldCompletionSortCustom?: boolean; 6298 uiProps?: string[]; 6299 clearProps?(): void; 6300 } 6301 type WithMetadata<T> = T & { 6302 metadata?: unknown; 6303 }; 6304 enum SemanticClassificationFormat { 6305 Original = "original", 6306 TwentyTwenty = "2020" 6307 } 6308 interface LanguageService { 6309 /** This is used as a part of restarting the language service. */ 6310 cleanupSemanticCache(): void; 6311 /** 6312 * Gets errors indicating invalid syntax in a file. 6313 * 6314 * In English, "this cdeo have, erorrs" is syntactically invalid because it has typos, 6315 * grammatical errors, and misplaced punctuation. Likewise, examples of syntax 6316 * errors in TypeScript are missing parentheses in an `if` statement, mismatched 6317 * curly braces, and using a reserved keyword as a variable name. 6318 * 6319 * These diagnostics are inexpensive to compute and don't require knowledge of 6320 * other files. Note that a non-empty result increases the likelihood of false positives 6321 * from `getSemanticDiagnostics`. 6322 * 6323 * While these represent the majority of syntax-related diagnostics, there are some 6324 * that require the type system, which will be present in `getSemanticDiagnostics`. 6325 * 6326 * @param fileName A path to the file you want syntactic diagnostics for 6327 */ 6328 getSyntacticDiagnostics(fileName: string): DiagnosticWithLocation[]; 6329 /** 6330 * Gets warnings or errors indicating type system issues in a given file. 6331 * Requesting semantic diagnostics may start up the type system and 6332 * run deferred work, so the first call may take longer than subsequent calls. 6333 * 6334 * Unlike the other get*Diagnostics functions, these diagnostics can potentially not 6335 * include a reference to a source file. Specifically, the first time this is called, 6336 * it will return global diagnostics with no associated location. 6337 * 6338 * To contrast the differences between semantic and syntactic diagnostics, consider the 6339 * sentence: "The sun is green." is syntactically correct; those are real English words with 6340 * correct sentence structure. However, it is semantically invalid, because it is not true. 6341 * 6342 * @param fileName A path to the file you want semantic diagnostics for 6343 */ 6344 getSemanticDiagnostics(fileName: string): Diagnostic[]; 6345 /** 6346 * Gets suggestion diagnostics for a specific file. These diagnostics tend to 6347 * proactively suggest refactors, as opposed to diagnostics that indicate 6348 * potentially incorrect runtime behavior. 6349 * 6350 * @param fileName A path to the file you want semantic diagnostics for 6351 */ 6352 getSuggestionDiagnostics(fileName: string): DiagnosticWithLocation[]; 6353 /** 6354 * Gets global diagnostics related to the program configuration and compiler options. 6355 */ 6356 getCompilerOptionsDiagnostics(): Diagnostic[]; 6357 /** @deprecated Use getEncodedSyntacticClassifications instead. */ 6358 getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; 6359 getSyntacticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; 6360 /** @deprecated Use getEncodedSemanticClassifications instead. */ 6361 getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; 6362 getSemanticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; 6363 /** Encoded as triples of [start, length, ClassificationType]. */ 6364 getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications; 6365 /** 6366 * Gets semantic highlights information for a particular file. Has two formats, an older 6367 * version used by VS and a format used by VS Code. 6368 * 6369 * @param fileName The path to the file 6370 * @param position A text span to return results within 6371 * @param format Which format to use, defaults to "original" 6372 * @returns a number array encoded as triples of [start, length, ClassificationType, ...]. 6373 */ 6374 getEncodedSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): Classifications; 6375 /** 6376 * Gets completion entries at a particular position in a file. 6377 * 6378 * @param fileName The path to the file 6379 * @param position A zero-based index of the character where you want the entries 6380 * @param options An object describing how the request was triggered and what kinds 6381 * of code actions can be returned with the completions. 6382 * @param formattingSettings settings needed for calling formatting functions. 6383 */ 6384 getCompletionsAtPosition(fileName: string, position: number, options: GetCompletionsAtPositionOptions | undefined, formattingSettings?: FormatCodeSettings): WithMetadata<CompletionInfo> | undefined; 6385 /** 6386 * Gets the extended details for a completion entry retrieved from `getCompletionsAtPosition`. 6387 * 6388 * @param fileName The path to the file 6389 * @param position A zero based index of the character where you want the entries 6390 * @param entryName The `name` from an existing completion which came from `getCompletionsAtPosition` 6391 * @param formatOptions How should code samples in the completions be formatted, can be undefined for backwards compatibility 6392 * @param source `source` property from the completion entry 6393 * @param preferences User settings, can be undefined for backwards compatibility 6394 * @param data `data` property from the completion entry 6395 */ 6396 getCompletionEntryDetails(fileName: string, position: number, entryName: string, formatOptions: FormatCodeOptions | FormatCodeSettings | undefined, source: string | undefined, preferences: UserPreferences | undefined, data: CompletionEntryData | undefined): CompletionEntryDetails | undefined; 6397 getCompletionEntrySymbol(fileName: string, position: number, name: string, source: string | undefined): Symbol | undefined; 6398 /** 6399 * Gets semantic information about the identifier at a particular position in a 6400 * file. Quick info is what you typically see when you hover in an editor. 6401 * 6402 * @param fileName The path to the file 6403 * @param position A zero-based index of the character where you want the quick info 6404 */ 6405 getQuickInfoAtPosition(fileName: string, position: number): QuickInfo | undefined; 6406 getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan | undefined; 6407 getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan | undefined; 6408 getSignatureHelpItems(fileName: string, position: number, options: SignatureHelpItemsOptions | undefined): SignatureHelpItems | undefined; 6409 getRenameInfo(fileName: string, position: number, preferences: UserPreferences): RenameInfo; 6410 /** @deprecated Use the signature with `UserPreferences` instead. */ 6411 getRenameInfo(fileName: string, position: number, options?: RenameInfoOptions): RenameInfo; 6412 findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename?: boolean): readonly RenameLocation[] | undefined; 6413 getSmartSelectionRange(fileName: string, position: number): SelectionRange; 6414 getDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined; 6415 getDefinitionAndBoundSpan(fileName: string, position: number): DefinitionInfoAndBoundSpan | undefined; 6416 getTypeDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined; 6417 getImplementationAtPosition(fileName: string, position: number): readonly ImplementationLocation[] | undefined; 6418 getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[] | undefined; 6419 findReferences(fileName: string, position: number): ReferencedSymbol[] | undefined; 6420 getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[] | undefined; 6421 getFileReferences(fileName: string): ReferenceEntry[]; 6422 /** @deprecated */ 6423 getOccurrencesAtPosition(fileName: string, position: number): readonly ReferenceEntry[] | undefined; 6424 getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[]; 6425 getNavigationBarItems(fileName: string): NavigationBarItem[]; 6426 getNavigationTree(fileName: string): NavigationTree; 6427 prepareCallHierarchy(fileName: string, position: number): CallHierarchyItem | CallHierarchyItem[] | undefined; 6428 provideCallHierarchyIncomingCalls(fileName: string, position: number): CallHierarchyIncomingCall[]; 6429 provideCallHierarchyOutgoingCalls(fileName: string, position: number): CallHierarchyOutgoingCall[]; 6430 provideInlayHints(fileName: string, span: TextSpan, preferences: UserPreferences | undefined): InlayHint[]; 6431 getOutliningSpans(fileName: string): OutliningSpan[]; 6432 getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; 6433 getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; 6434 getIndentationAtPosition(fileName: string, position: number, options: EditorOptions | EditorSettings): number; 6435 getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions | FormatCodeSettings): TextChange[]; 6436 getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[]; 6437 getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[]; 6438 getDocCommentTemplateAtPosition(fileName: string, position: number, options?: DocCommentTemplateOptions): TextInsertion | undefined; 6439 isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean; 6440 /** 6441 * 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. 6442 * Editors should call this after `>` is typed. 6443 */ 6444 getJsxClosingTagAtPosition(fileName: string, position: number): JsxClosingTagInfo | undefined; 6445 getSpanOfEnclosingComment(fileName: string, position: number, onlyMultiLine: boolean): TextSpan | undefined; 6446 toLineColumnOffset?(fileName: string, position: number): LineAndCharacter; 6447 getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences): readonly CodeFixAction[]; 6448 getCombinedCodeFix(scope: CombinedCodeFixScope, fixId: {}, formatOptions: FormatCodeSettings, preferences: UserPreferences): CombinedCodeActions; 6449 applyCodeActionCommand(action: CodeActionCommand, formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult>; 6450 applyCodeActionCommand(action: CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult[]>; 6451 applyCodeActionCommand(action: CodeActionCommand | CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>; 6452 /** @deprecated `fileName` will be ignored */ 6453 applyCodeActionCommand(fileName: string, action: CodeActionCommand): Promise<ApplyCodeActionCommandResult>; 6454 /** @deprecated `fileName` will be ignored */ 6455 applyCodeActionCommand(fileName: string, action: CodeActionCommand[]): Promise<ApplyCodeActionCommandResult[]>; 6456 /** @deprecated `fileName` will be ignored */ 6457 applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>; 6458 getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string): ApplicableRefactorInfo[]; 6459 getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined; 6460 organizeImports(args: OrganizeImportsArgs, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; 6461 getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; 6462 getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean, forceDtsEmit?: boolean): EmitOutput; 6463 getProgram(): Program | undefined; 6464 getBuilderProgram(): BuilderProgram | undefined; 6465 toggleLineComment(fileName: string, textRange: TextRange): TextChange[]; 6466 toggleMultilineComment(fileName: string, textRange: TextRange): TextChange[]; 6467 commentSelection(fileName: string, textRange: TextRange): TextChange[]; 6468 uncommentSelection(fileName: string, textRange: TextRange): TextChange[]; 6469 dispose(): void; 6470 updateRootFiles?(rootFiles: string[]): void; 6471 getProps?(): string[]; 6472 } 6473 interface JsxClosingTagInfo { 6474 readonly newText: string; 6475 } 6476 interface CombinedCodeFixScope { 6477 type: "file"; 6478 fileName: string; 6479 } 6480 enum OrganizeImportsMode { 6481 All = "All", 6482 SortAndCombine = "SortAndCombine", 6483 RemoveUnused = "RemoveUnused" 6484 } 6485 interface OrganizeImportsArgs extends CombinedCodeFixScope { 6486 /** @deprecated Use `mode` instead */ 6487 skipDestructiveCodeActions?: boolean; 6488 mode?: OrganizeImportsMode; 6489 } 6490 type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " "; 6491 enum CompletionTriggerKind { 6492 /** Completion was triggered by typing an identifier, manual invocation (e.g Ctrl+Space) or via API. */ 6493 Invoked = 1, 6494 /** Completion was triggered by a trigger character. */ 6495 TriggerCharacter = 2, 6496 /** Completion was re-triggered as the current completion list is incomplete. */ 6497 TriggerForIncompleteCompletions = 3 6498 } 6499 interface GetCompletionsAtPositionOptions extends UserPreferences { 6500 /** 6501 * If the editor is asking for completions because a certain character was typed 6502 * (as opposed to when the user explicitly requested them) this should be set. 6503 */ 6504 triggerCharacter?: CompletionsTriggerCharacter; 6505 triggerKind?: CompletionTriggerKind; 6506 /** @deprecated Use includeCompletionsForModuleExports */ 6507 includeExternalModuleExports?: boolean; 6508 /** @deprecated Use includeCompletionsWithInsertText */ 6509 includeInsertTextCompletions?: boolean; 6510 } 6511 type SignatureHelpTriggerCharacter = "," | "(" | "<"; 6512 type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")"; 6513 interface SignatureHelpItemsOptions { 6514 triggerReason?: SignatureHelpTriggerReason; 6515 } 6516 type SignatureHelpTriggerReason = SignatureHelpInvokedReason | SignatureHelpCharacterTypedReason | SignatureHelpRetriggeredReason; 6517 /** 6518 * Signals that the user manually requested signature help. 6519 * The language service will unconditionally attempt to provide a result. 6520 */ 6521 interface SignatureHelpInvokedReason { 6522 kind: "invoked"; 6523 triggerCharacter?: undefined; 6524 } 6525 /** 6526 * Signals that the signature help request came from a user typing a character. 6527 * Depending on the character and the syntactic context, the request may or may not be served a result. 6528 */ 6529 interface SignatureHelpCharacterTypedReason { 6530 kind: "characterTyped"; 6531 /** 6532 * Character that was responsible for triggering signature help. 6533 */ 6534 triggerCharacter: SignatureHelpTriggerCharacter; 6535 } 6536 /** 6537 * Signals that this signature help request came from typing a character or moving the cursor. 6538 * This should only occur if a signature help session was already active and the editor needs to see if it should adjust. 6539 * The language service will unconditionally attempt to provide a result. 6540 * `triggerCharacter` can be `undefined` for a retrigger caused by a cursor move. 6541 */ 6542 interface SignatureHelpRetriggeredReason { 6543 kind: "retrigger"; 6544 /** 6545 * Character that was responsible for triggering signature help. 6546 */ 6547 triggerCharacter?: SignatureHelpRetriggerCharacter; 6548 } 6549 interface ApplyCodeActionCommandResult { 6550 successMessage: string; 6551 } 6552 interface Classifications { 6553 spans: number[]; 6554 endOfLineState: EndOfLineState; 6555 } 6556 interface ClassifiedSpan { 6557 textSpan: TextSpan; 6558 classificationType: ClassificationTypeNames; 6559 } 6560 interface ClassifiedSpan2020 { 6561 textSpan: TextSpan; 6562 classificationType: number; 6563 } 6564 /** 6565 * Navigation bar interface designed for visual studio's dual-column layout. 6566 * This does not form a proper tree. 6567 * The navbar is returned as a list of top-level items, each of which has a list of child items. 6568 * Child items always have an empty array for their `childItems`. 6569 */ 6570 interface NavigationBarItem { 6571 text: string; 6572 kind: ScriptElementKind; 6573 kindModifiers: string; 6574 spans: TextSpan[]; 6575 childItems: NavigationBarItem[]; 6576 indent: number; 6577 bolded: boolean; 6578 grayed: boolean; 6579 } 6580 /** 6581 * Node in a tree of nested declarations in a file. 6582 * The top node is always a script or module node. 6583 */ 6584 interface NavigationTree { 6585 /** Name of the declaration, or a short description, e.g. "<class>". */ 6586 text: string; 6587 kind: ScriptElementKind; 6588 /** ScriptElementKindModifier separated by commas, e.g. "public,abstract" */ 6589 kindModifiers: string; 6590 /** 6591 * Spans of the nodes that generated this declaration. 6592 * There will be more than one if this is the result of merging. 6593 */ 6594 spans: TextSpan[]; 6595 nameSpan: TextSpan | undefined; 6596 /** Present if non-empty */ 6597 childItems?: NavigationTree[]; 6598 } 6599 interface CallHierarchyItem { 6600 name: string; 6601 kind: ScriptElementKind; 6602 kindModifiers?: string; 6603 file: string; 6604 span: TextSpan; 6605 selectionSpan: TextSpan; 6606 containerName?: string; 6607 } 6608 interface CallHierarchyIncomingCall { 6609 from: CallHierarchyItem; 6610 fromSpans: TextSpan[]; 6611 } 6612 interface CallHierarchyOutgoingCall { 6613 to: CallHierarchyItem; 6614 fromSpans: TextSpan[]; 6615 } 6616 enum InlayHintKind { 6617 Type = "Type", 6618 Parameter = "Parameter", 6619 Enum = "Enum" 6620 } 6621 interface InlayHint { 6622 text: string; 6623 position: number; 6624 kind: InlayHintKind; 6625 whitespaceBefore?: boolean; 6626 whitespaceAfter?: boolean; 6627 } 6628 interface TodoCommentDescriptor { 6629 text: string; 6630 priority: number; 6631 } 6632 interface TodoComment { 6633 descriptor: TodoCommentDescriptor; 6634 message: string; 6635 position: number; 6636 } 6637 interface TextChange { 6638 span: TextSpan; 6639 newText: string; 6640 } 6641 interface FileTextChanges { 6642 fileName: string; 6643 textChanges: readonly TextChange[]; 6644 isNewFile?: boolean; 6645 } 6646 interface CodeAction { 6647 /** Description of the code action to display in the UI of the editor */ 6648 description: string; 6649 /** Text changes to apply to each file as part of the code action */ 6650 changes: FileTextChanges[]; 6651 /** 6652 * If the user accepts the code fix, the editor should send the action back in a `applyAction` request. 6653 * This allows the language service to have side effects (e.g. installing dependencies) upon a code fix. 6654 */ 6655 commands?: CodeActionCommand[]; 6656 } 6657 interface CodeFixAction extends CodeAction { 6658 /** Short name to identify the fix, for use by telemetry. */ 6659 fixName: string; 6660 /** 6661 * If present, one may call 'getCombinedCodeFix' with this fixId. 6662 * This may be omitted to indicate that the code fix can't be applied in a group. 6663 */ 6664 fixId?: {}; 6665 fixAllDescription?: string; 6666 } 6667 interface CombinedCodeActions { 6668 changes: readonly FileTextChanges[]; 6669 commands?: readonly CodeActionCommand[]; 6670 } 6671 type CodeActionCommand = InstallPackageAction; 6672 interface InstallPackageAction { 6673 } 6674 /** 6675 * A set of one or more available refactoring actions, grouped under a parent refactoring. 6676 */ 6677 interface ApplicableRefactorInfo { 6678 /** 6679 * The programmatic name of the refactoring 6680 */ 6681 name: string; 6682 /** 6683 * A description of this refactoring category to show to the user. 6684 * If the refactoring gets inlined (see below), this text will not be visible. 6685 */ 6686 description: string; 6687 /** 6688 * Inlineable refactorings can have their actions hoisted out to the top level 6689 * of a context menu. Non-inlineanable refactorings should always be shown inside 6690 * their parent grouping. 6691 * 6692 * If not specified, this value is assumed to be 'true' 6693 */ 6694 inlineable?: boolean; 6695 actions: RefactorActionInfo[]; 6696 } 6697 /** 6698 * Represents a single refactoring action - for example, the "Extract Method..." refactor might 6699 * offer several actions, each corresponding to a surround class or closure to extract into. 6700 */ 6701 interface RefactorActionInfo { 6702 /** 6703 * The programmatic name of the refactoring action 6704 */ 6705 name: string; 6706 /** 6707 * A description of this refactoring action to show to the user. 6708 * If the parent refactoring is inlined away, this will be the only text shown, 6709 * so this description should make sense by itself if the parent is inlineable=true 6710 */ 6711 description: string; 6712 /** 6713 * A message to show to the user if the refactoring cannot be applied in 6714 * the current context. 6715 */ 6716 notApplicableReason?: string; 6717 /** 6718 * The hierarchical dotted name of the refactor action. 6719 */ 6720 kind?: string; 6721 } 6722 /** 6723 * A set of edits to make in response to a refactor action, plus an optional 6724 * location where renaming should be invoked from 6725 */ 6726 interface RefactorEditInfo { 6727 edits: FileTextChanges[]; 6728 renameFilename?: string; 6729 renameLocation?: number; 6730 commands?: CodeActionCommand[]; 6731 } 6732 type RefactorTriggerReason = "implicit" | "invoked"; 6733 interface TextInsertion { 6734 newText: string; 6735 /** The position in newText the caret should point to after the insertion. */ 6736 caretOffset: number; 6737 } 6738 interface DocumentSpan { 6739 textSpan: TextSpan; 6740 fileName: string; 6741 /** 6742 * If the span represents a location that was remapped (e.g. via a .d.ts.map file), 6743 * then the original filename and span will be specified here 6744 */ 6745 originalTextSpan?: TextSpan; 6746 originalFileName?: string; 6747 /** 6748 * If DocumentSpan.textSpan is the span for name of the declaration, 6749 * then this is the span for relevant declaration 6750 */ 6751 contextSpan?: TextSpan; 6752 originalContextSpan?: TextSpan; 6753 } 6754 interface RenameLocation extends DocumentSpan { 6755 readonly prefixText?: string; 6756 readonly suffixText?: string; 6757 } 6758 interface ReferenceEntry extends DocumentSpan { 6759 isWriteAccess: boolean; 6760 isInString?: true; 6761 } 6762 interface ImplementationLocation extends DocumentSpan { 6763 kind: ScriptElementKind; 6764 displayParts: SymbolDisplayPart[]; 6765 } 6766 enum HighlightSpanKind { 6767 none = "none", 6768 definition = "definition", 6769 reference = "reference", 6770 writtenReference = "writtenReference" 6771 } 6772 interface HighlightSpan { 6773 fileName?: string; 6774 isInString?: true; 6775 textSpan: TextSpan; 6776 contextSpan?: TextSpan; 6777 kind: HighlightSpanKind; 6778 } 6779 interface NavigateToItem { 6780 name: string; 6781 kind: ScriptElementKind; 6782 kindModifiers: string; 6783 matchKind: "exact" | "prefix" | "substring" | "camelCase"; 6784 isCaseSensitive: boolean; 6785 fileName: string; 6786 textSpan: TextSpan; 6787 containerName: string; 6788 containerKind: ScriptElementKind; 6789 } 6790 enum IndentStyle { 6791 None = 0, 6792 Block = 1, 6793 Smart = 2 6794 } 6795 enum SemicolonPreference { 6796 Ignore = "ignore", 6797 Insert = "insert", 6798 Remove = "remove" 6799 } 6800 /** @deprecated - consider using EditorSettings instead */ 6801 interface EditorOptions { 6802 BaseIndentSize?: number; 6803 IndentSize: number; 6804 TabSize: number; 6805 NewLineCharacter: string; 6806 ConvertTabsToSpaces: boolean; 6807 IndentStyle: IndentStyle; 6808 } 6809 interface EditorSettings { 6810 baseIndentSize?: number; 6811 indentSize?: number; 6812 tabSize?: number; 6813 newLineCharacter?: string; 6814 convertTabsToSpaces?: boolean; 6815 indentStyle?: IndentStyle; 6816 trimTrailingWhitespace?: boolean; 6817 } 6818 /** @deprecated - consider using FormatCodeSettings instead */ 6819 interface FormatCodeOptions extends EditorOptions { 6820 InsertSpaceAfterCommaDelimiter: boolean; 6821 InsertSpaceAfterSemicolonInForStatements: boolean; 6822 InsertSpaceBeforeAndAfterBinaryOperators: boolean; 6823 InsertSpaceAfterConstructor?: boolean; 6824 InsertSpaceAfterKeywordsInControlFlowStatements: boolean; 6825 InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; 6826 InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; 6827 InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean; 6828 InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean; 6829 InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean; 6830 InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean; 6831 InsertSpaceAfterTypeAssertion?: boolean; 6832 InsertSpaceBeforeFunctionParenthesis?: boolean; 6833 PlaceOpenBraceOnNewLineForFunctions: boolean; 6834 PlaceOpenBraceOnNewLineForControlBlocks: boolean; 6835 insertSpaceBeforeTypeAnnotation?: boolean; 6836 } 6837 interface FormatCodeSettings extends EditorSettings { 6838 readonly insertSpaceAfterCommaDelimiter?: boolean; 6839 readonly insertSpaceAfterSemicolonInForStatements?: boolean; 6840 readonly insertSpaceBeforeAndAfterBinaryOperators?: boolean; 6841 readonly insertSpaceAfterConstructor?: boolean; 6842 readonly insertSpaceAfterKeywordsInControlFlowStatements?: boolean; 6843 readonly insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean; 6844 readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean; 6845 readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean; 6846 readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean; 6847 readonly insertSpaceAfterOpeningAndBeforeClosingEmptyBraces?: boolean; 6848 readonly insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean; 6849 readonly insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean; 6850 readonly insertSpaceAfterTypeAssertion?: boolean; 6851 readonly insertSpaceBeforeFunctionParenthesis?: boolean; 6852 readonly placeOpenBraceOnNewLineForFunctions?: boolean; 6853 readonly placeOpenBraceOnNewLineForControlBlocks?: boolean; 6854 readonly insertSpaceBeforeTypeAnnotation?: boolean; 6855 readonly indentMultiLineObjectLiteralBeginningOnBlankLine?: boolean; 6856 readonly semicolons?: SemicolonPreference; 6857 } 6858 function getDefaultFormatCodeSettings(newLineCharacter?: string): FormatCodeSettings; 6859 interface DefinitionInfo extends DocumentSpan { 6860 kind: ScriptElementKind; 6861 name: string; 6862 containerKind: ScriptElementKind; 6863 containerName: string; 6864 unverified?: boolean; 6865 } 6866 interface DefinitionInfoAndBoundSpan { 6867 definitions?: readonly DefinitionInfo[]; 6868 textSpan: TextSpan; 6869 } 6870 interface ReferencedSymbolDefinitionInfo extends DefinitionInfo { 6871 displayParts: SymbolDisplayPart[]; 6872 } 6873 interface ReferencedSymbol { 6874 definition: ReferencedSymbolDefinitionInfo; 6875 references: ReferencedSymbolEntry[]; 6876 } 6877 interface ReferencedSymbolEntry extends ReferenceEntry { 6878 isDefinition?: boolean; 6879 } 6880 enum SymbolDisplayPartKind { 6881 aliasName = 0, 6882 className = 1, 6883 enumName = 2, 6884 fieldName = 3, 6885 interfaceName = 4, 6886 keyword = 5, 6887 lineBreak = 6, 6888 numericLiteral = 7, 6889 stringLiteral = 8, 6890 localName = 9, 6891 methodName = 10, 6892 moduleName = 11, 6893 operator = 12, 6894 parameterName = 13, 6895 propertyName = 14, 6896 punctuation = 15, 6897 space = 16, 6898 text = 17, 6899 typeParameterName = 18, 6900 enumMemberName = 19, 6901 functionName = 20, 6902 regularExpressionLiteral = 21, 6903 link = 22, 6904 linkName = 23, 6905 linkText = 24 6906 } 6907 interface SymbolDisplayPart { 6908 text: string; 6909 kind: string; 6910 } 6911 interface JSDocLinkDisplayPart extends SymbolDisplayPart { 6912 target: DocumentSpan; 6913 } 6914 interface JSDocTagInfo { 6915 name: string; 6916 text?: SymbolDisplayPart[] | string; 6917 index?: number; 6918 } 6919 interface QuickInfo { 6920 kind: ScriptElementKind; 6921 kindModifiers: string; 6922 textSpan: TextSpan; 6923 displayParts?: SymbolDisplayPart[]; 6924 documentation?: SymbolDisplayPart[]; 6925 tags?: JSDocTagInfo[]; 6926 } 6927 type RenameInfo = RenameInfoSuccess | RenameInfoFailure; 6928 interface RenameInfoSuccess { 6929 canRename: true; 6930 /** 6931 * File or directory to rename. 6932 * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`. 6933 */ 6934 fileToRename?: string; 6935 displayName: string; 6936 fullDisplayName: string; 6937 kind: ScriptElementKind; 6938 kindModifiers: string; 6939 triggerSpan: TextSpan; 6940 } 6941 interface RenameInfoFailure { 6942 canRename: false; 6943 localizedErrorMessage: string; 6944 } 6945 /** 6946 * @deprecated Use `UserPreferences` instead. 6947 */ 6948 interface RenameInfoOptions { 6949 readonly allowRenameOfImportPath?: boolean; 6950 } 6951 interface DocCommentTemplateOptions { 6952 readonly generateReturnInDocTemplate?: boolean; 6953 } 6954 interface SignatureHelpParameter { 6955 name: string; 6956 documentation: SymbolDisplayPart[]; 6957 displayParts: SymbolDisplayPart[]; 6958 isOptional: boolean; 6959 isRest?: boolean; 6960 } 6961 interface SelectionRange { 6962 textSpan: TextSpan; 6963 parent?: SelectionRange; 6964 } 6965 /** 6966 * Represents a single signature to show in signature help. 6967 * The id is used for subsequent calls into the language service to ask questions about the 6968 * signature help item in the context of any documents that have been updated. i.e. after 6969 * an edit has happened, while signature help is still active, the host can ask important 6970 * questions like 'what parameter is the user currently contained within?'. 6971 */ 6972 interface SignatureHelpItem { 6973 isVariadic: boolean; 6974 prefixDisplayParts: SymbolDisplayPart[]; 6975 suffixDisplayParts: SymbolDisplayPart[]; 6976 separatorDisplayParts: SymbolDisplayPart[]; 6977 parameters: SignatureHelpParameter[]; 6978 documentation: SymbolDisplayPart[]; 6979 tags: JSDocTagInfo[]; 6980 } 6981 /** 6982 * Represents a set of signature help items, and the preferred item that should be selected. 6983 */ 6984 interface SignatureHelpItems { 6985 items: SignatureHelpItem[]; 6986 applicableSpan: TextSpan; 6987 selectedItemIndex: number; 6988 argumentIndex: number; 6989 argumentCount: number; 6990 } 6991 enum CompletionInfoFlags { 6992 None = 0, 6993 MayIncludeAutoImports = 1, 6994 IsImportStatementCompletion = 2, 6995 IsContinuation = 4, 6996 ResolvedModuleSpecifiers = 8, 6997 ResolvedModuleSpecifiersBeyondLimit = 16, 6998 MayIncludeMethodSnippets = 32 6999 } 7000 interface CompletionInfo { 7001 /** For performance telemetry. */ 7002 flags?: CompletionInfoFlags; 7003 /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */ 7004 isGlobalCompletion: boolean; 7005 isMemberCompletion: boolean; 7006 /** 7007 * In the absence of `CompletionEntry["replacementSpan"]`, the editor may choose whether to use 7008 * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span 7009 * must be used to commit that completion entry. 7010 */ 7011 optionalReplacementSpan?: TextSpan; 7012 /** 7013 * true when the current location also allows for a new identifier 7014 */ 7015 isNewIdentifierLocation: boolean; 7016 /** 7017 * Indicates to client to continue requesting completions on subsequent keystrokes. 7018 */ 7019 isIncomplete?: true; 7020 entries: CompletionEntry[]; 7021 } 7022 interface CompletionEntryDataAutoImport { 7023 /** 7024 * The name of the property or export in the module's symbol table. Differs from the completion name 7025 * in the case of InternalSymbolName.ExportEquals and InternalSymbolName.Default. 7026 */ 7027 exportName: string; 7028 moduleSpecifier?: string; 7029 /** The file name declaring the export's module symbol, if it was an external module */ 7030 fileName?: string; 7031 /** The module name (with quotes stripped) of the export's module symbol, if it was an ambient module */ 7032 ambientModuleName?: string; 7033 /** True if the export was found in the package.json AutoImportProvider */ 7034 isPackageJsonImport?: true; 7035 } 7036 interface CompletionEntryDataUnresolved extends CompletionEntryDataAutoImport { 7037 /** The key in the `ExportMapCache` where the completion entry's `SymbolExportInfo[]` is found */ 7038 exportMapKey: string; 7039 } 7040 interface CompletionEntryDataResolved extends CompletionEntryDataAutoImport { 7041 moduleSpecifier: string; 7042 } 7043 type CompletionEntryData = CompletionEntryDataUnresolved | CompletionEntryDataResolved; 7044 interface CompletionEntry { 7045 name: string; 7046 kind: ScriptElementKind; 7047 kindModifiers?: string; 7048 sortText: string; 7049 insertText?: string; 7050 isSnippet?: true; 7051 /** 7052 * An optional span that indicates the text to be replaced by this completion item. 7053 * If present, this span should be used instead of the default one. 7054 * It will be set if the required span differs from the one generated by the default replacement behavior. 7055 */ 7056 replacementSpan?: TextSpan; 7057 hasAction?: true; 7058 source?: string; 7059 sourceDisplay?: SymbolDisplayPart[]; 7060 labelDetails?: CompletionEntryLabelDetails; 7061 isRecommended?: true; 7062 isFromUncheckedFile?: true; 7063 isPackageJsonImport?: true; 7064 isImportStatementCompletion?: true; 7065 /** 7066 * A property to be sent back to TS Server in the CompletionDetailsRequest, along with `name`, 7067 * that allows TS Server to look up the symbol represented by the completion item, disambiguating 7068 * items with the same name. Currently only defined for auto-import completions, but the type is 7069 * `unknown` in the protocol, so it can be changed as needed to support other kinds of completions. 7070 * The presence of this property should generally not be used to assume that this completion entry 7071 * is an auto-import. 7072 */ 7073 data?: CompletionEntryData; 7074 jsDoc?: JSDocTagInfo[]; 7075 displayParts?: SymbolDisplayPart[]; 7076 } 7077 interface CompletionEntryLabelDetails { 7078 detail?: string; 7079 description?: string; 7080 } 7081 interface CompletionEntryDetails { 7082 name: string; 7083 kind: ScriptElementKind; 7084 kindModifiers: string; 7085 displayParts: SymbolDisplayPart[]; 7086 documentation?: SymbolDisplayPart[]; 7087 tags?: JSDocTagInfo[]; 7088 codeActions?: CodeAction[]; 7089 /** @deprecated Use `sourceDisplay` instead. */ 7090 source?: SymbolDisplayPart[]; 7091 sourceDisplay?: SymbolDisplayPart[]; 7092 } 7093 interface OutliningSpan { 7094 /** The span of the document to actually collapse. */ 7095 textSpan: TextSpan; 7096 /** The span of the document to display when the user hovers over the collapsed span. */ 7097 hintSpan: TextSpan; 7098 /** The text to display in the editor for the collapsed region. */ 7099 bannerText: string; 7100 /** 7101 * Whether or not this region should be automatically collapsed when 7102 * the 'Collapse to Definitions' command is invoked. 7103 */ 7104 autoCollapse: boolean; 7105 /** 7106 * Classification of the contents of the span 7107 */ 7108 kind: OutliningSpanKind; 7109 } 7110 enum OutliningSpanKind { 7111 /** Single or multi-line comments */ 7112 Comment = "comment", 7113 /** Sections marked by '// #region' and '// #endregion' comments */ 7114 Region = "region", 7115 /** Declarations and expressions */ 7116 Code = "code", 7117 /** Contiguous blocks of import declarations */ 7118 Imports = "imports" 7119 } 7120 enum OutputFileType { 7121 JavaScript = 0, 7122 SourceMap = 1, 7123 Declaration = 2 7124 } 7125 enum EndOfLineState { 7126 None = 0, 7127 InMultiLineCommentTrivia = 1, 7128 InSingleQuoteStringLiteral = 2, 7129 InDoubleQuoteStringLiteral = 3, 7130 InTemplateHeadOrNoSubstitutionTemplate = 4, 7131 InTemplateMiddleOrTail = 5, 7132 InTemplateSubstitutionPosition = 6 7133 } 7134 enum TokenClass { 7135 Punctuation = 0, 7136 Keyword = 1, 7137 Operator = 2, 7138 Comment = 3, 7139 Whitespace = 4, 7140 Identifier = 5, 7141 NumberLiteral = 6, 7142 BigIntLiteral = 7, 7143 StringLiteral = 8, 7144 RegExpLiteral = 9 7145 } 7146 interface ClassificationResult { 7147 finalLexState: EndOfLineState; 7148 entries: ClassificationInfo[]; 7149 } 7150 interface ClassificationInfo { 7151 length: number; 7152 classification: TokenClass; 7153 } 7154 interface Classifier { 7155 /** 7156 * Gives lexical classifications of tokens on a line without any syntactic context. 7157 * For instance, a token consisting of the text 'string' can be either an identifier 7158 * named 'string' or the keyword 'string', however, because this classifier is not aware, 7159 * it relies on certain heuristics to give acceptable results. For classifications where 7160 * speed trumps accuracy, this function is preferable; however, for true accuracy, the 7161 * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the 7162 * lexical, syntactic, and semantic classifiers may issue the best user experience. 7163 * 7164 * @param text The text of a line to classify. 7165 * @param lexState The state of the lexical classifier at the end of the previous line. 7166 * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier. 7167 * If there is no syntactic classifier (syntacticClassifierAbsent=true), 7168 * certain heuristics may be used in its place; however, if there is a 7169 * syntactic classifier (syntacticClassifierAbsent=false), certain 7170 * classifications which may be incorrectly categorized will be given 7171 * back as Identifiers in order to allow the syntactic classifier to 7172 * subsume the classification. 7173 * @deprecated Use getLexicalClassifications instead. 7174 */ 7175 getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult; 7176 getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications; 7177 } 7178 enum ScriptElementKind { 7179 unknown = "", 7180 warning = "warning", 7181 /** predefined type (void) or keyword (class) */ 7182 keyword = "keyword", 7183 /** top level script node */ 7184 scriptElement = "script", 7185 /** module foo {} */ 7186 moduleElement = "module", 7187 /** class X {} */ 7188 classElement = "class", 7189 /** var x = class X {} */ 7190 localClassElement = "local class", 7191 /** struct X {} */ 7192 structElement = "struct", 7193 /** interface Y {} */ 7194 interfaceElement = "interface", 7195 /** type T = ... */ 7196 typeElement = "type", 7197 /** enum E */ 7198 enumElement = "enum", 7199 enumMemberElement = "enum member", 7200 /** 7201 * Inside module and script only 7202 * const v = .. 7203 */ 7204 variableElement = "var", 7205 /** Inside function */ 7206 localVariableElement = "local var", 7207 /** 7208 * Inside module and script only 7209 * function f() { } 7210 */ 7211 functionElement = "function", 7212 /** Inside function */ 7213 localFunctionElement = "local function", 7214 /** class X { [public|private]* foo() {} } */ 7215 memberFunctionElement = "method", 7216 /** class X { [public|private]* [get|set] foo:number; } */ 7217 memberGetAccessorElement = "getter", 7218 memberSetAccessorElement = "setter", 7219 /** 7220 * class X { [public|private]* foo:number; } 7221 * interface Y { foo:number; } 7222 */ 7223 memberVariableElement = "property", 7224 /** class X { [public|private]* accessor foo: number; } */ 7225 memberAccessorVariableElement = "accessor", 7226 /** 7227 * class X { constructor() { } } 7228 * class X { static { } } 7229 */ 7230 constructorImplementationElement = "constructor", 7231 /** interface Y { ():number; } */ 7232 callSignatureElement = "call", 7233 /** interface Y { []:number; } */ 7234 indexSignatureElement = "index", 7235 /** interface Y { new():Y; } */ 7236 constructSignatureElement = "construct", 7237 /** function foo(*Y*: string) */ 7238 parameterElement = "parameter", 7239 typeParameterElement = "type parameter", 7240 primitiveType = "primitive type", 7241 label = "label", 7242 alias = "alias", 7243 constElement = "const", 7244 letElement = "let", 7245 directory = "directory", 7246 externalModuleName = "external module name", 7247 /** 7248 * <JsxTagName attribute1 attribute2={0} /> 7249 * @deprecated 7250 */ 7251 jsxAttribute = "JSX attribute", 7252 /** String literal */ 7253 string = "string", 7254 /** Jsdoc @link: in `{@link C link text}`, the before and after text "{@link " and "}" */ 7255 link = "link", 7256 /** Jsdoc @link: in `{@link C link text}`, the entity name "C" */ 7257 linkName = "link name", 7258 /** Jsdoc @link: in `{@link C link text}`, the link text "link text" */ 7259 linkText = "link text" 7260 } 7261 enum ScriptElementKindModifier { 7262 none = "", 7263 publicMemberModifier = "public", 7264 privateMemberModifier = "private", 7265 protectedMemberModifier = "protected", 7266 exportedModifier = "export", 7267 ambientModifier = "declare", 7268 staticModifier = "static", 7269 abstractModifier = "abstract", 7270 optionalModifier = "optional", 7271 deprecatedModifier = "deprecated", 7272 dtsModifier = ".d.ts", 7273 tsModifier = ".ts", 7274 tsxModifier = ".tsx", 7275 jsModifier = ".js", 7276 jsxModifier = ".jsx", 7277 jsonModifier = ".json", 7278 dmtsModifier = ".d.mts", 7279 mtsModifier = ".mts", 7280 mjsModifier = ".mjs", 7281 dctsModifier = ".d.cts", 7282 ctsModifier = ".cts", 7283 cjsModifier = ".cjs", 7284 etsModifier = ".ets", 7285 detsModifier = ".d.ets" 7286 } 7287 enum ClassificationTypeNames { 7288 comment = "comment", 7289 identifier = "identifier", 7290 keyword = "keyword", 7291 numericLiteral = "number", 7292 bigintLiteral = "bigint", 7293 operator = "operator", 7294 stringLiteral = "string", 7295 whiteSpace = "whitespace", 7296 text = "text", 7297 punctuation = "punctuation", 7298 className = "class name", 7299 enumName = "enum name", 7300 interfaceName = "interface name", 7301 moduleName = "module name", 7302 typeParameterName = "type parameter name", 7303 typeAliasName = "type alias name", 7304 parameterName = "parameter name", 7305 docCommentTagName = "doc comment tag name", 7306 jsxOpenTagName = "jsx open tag name", 7307 jsxCloseTagName = "jsx close tag name", 7308 jsxSelfClosingTagName = "jsx self closing tag name", 7309 jsxAttribute = "jsx attribute", 7310 jsxText = "jsx text", 7311 jsxAttributeStringLiteralValue = "jsx attribute string literal value" 7312 } 7313 enum ClassificationType { 7314 comment = 1, 7315 identifier = 2, 7316 keyword = 3, 7317 numericLiteral = 4, 7318 operator = 5, 7319 stringLiteral = 6, 7320 regularExpressionLiteral = 7, 7321 whiteSpace = 8, 7322 text = 9, 7323 punctuation = 10, 7324 className = 11, 7325 enumName = 12, 7326 interfaceName = 13, 7327 moduleName = 14, 7328 typeParameterName = 15, 7329 typeAliasName = 16, 7330 parameterName = 17, 7331 docCommentTagName = 18, 7332 jsxOpenTagName = 19, 7333 jsxCloseTagName = 20, 7334 jsxSelfClosingTagName = 21, 7335 jsxAttribute = 22, 7336 jsxText = 23, 7337 jsxAttributeStringLiteralValue = 24, 7338 bigintLiteral = 25 7339 } 7340 interface InlayHintsContext { 7341 file: SourceFile; 7342 program: Program; 7343 cancellationToken: CancellationToken; 7344 host: LanguageServiceHost; 7345 span: TextSpan; 7346 preferences: UserPreferences; 7347 } 7348} 7349declare namespace ts { 7350 /** The classifier is used for syntactic highlighting in editors via the TSServer */ 7351 function createClassifier(): Classifier; 7352} 7353declare namespace ts { 7354 interface DocumentHighlights { 7355 fileName: string; 7356 highlightSpans: HighlightSpan[]; 7357 } 7358} 7359declare namespace ts { 7360 /** 7361 * The document registry represents a store of SourceFile objects that can be shared between 7362 * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST) 7363 * of files in the context. 7364 * SourceFile objects account for most of the memory usage by the language service. Sharing 7365 * the same DocumentRegistry instance between different instances of LanguageService allow 7366 * for more efficient memory utilization since all projects will share at least the library 7367 * file (lib.d.ts). 7368 * 7369 * A more advanced use of the document registry is to serialize sourceFile objects to disk 7370 * and re-hydrate them when needed. 7371 * 7372 * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it 7373 * to all subsequent createLanguageService calls. 7374 */ 7375 interface DocumentRegistry { 7376 /** 7377 * Request a stored SourceFile with a given fileName and compilationSettings. 7378 * The first call to acquire will call createLanguageServiceSourceFile to generate 7379 * the SourceFile if was not found in the registry. 7380 * 7381 * @param fileName The name of the file requested 7382 * @param compilationSettingsOrHost Some compilation settings like target affects the 7383 * shape of a the resulting SourceFile. This allows the DocumentRegistry to store 7384 * multiple copies of the same file for different compilation settings. A minimal 7385 * resolution cache is needed to fully define a source file's shape when 7386 * the compilation settings include `module: node16`+, so providing a cache host 7387 * object should be preferred. A common host is a language service `ConfiguredProject`. 7388 * @param scriptSnapshot Text of the file. Only used if the file was not found 7389 * in the registry and a new one was created. 7390 * @param version Current version of the file. Only used if the file was not found 7391 * in the registry and a new one was created. 7392 */ 7393 acquireDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; 7394 acquireDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; 7395 /** 7396 * Request an updated version of an already existing SourceFile with a given fileName 7397 * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile 7398 * to get an updated SourceFile. 7399 * 7400 * @param fileName The name of the file requested 7401 * @param compilationSettingsOrHost Some compilation settings like target affects the 7402 * shape of a the resulting SourceFile. This allows the DocumentRegistry to store 7403 * multiple copies of the same file for different compilation settings. A minimal 7404 * resolution cache is needed to fully define a source file's shape when 7405 * the compilation settings include `module: node16`+, so providing a cache host 7406 * object should be preferred. A common host is a language service `ConfiguredProject`. 7407 * @param scriptSnapshot Text of the file. 7408 * @param version Current version of the file. 7409 */ 7410 updateDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; 7411 updateDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; 7412 getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey; 7413 /** 7414 * Informs the DocumentRegistry that a file is not needed any longer. 7415 * 7416 * Note: It is not allowed to call release on a SourceFile that was not acquired from 7417 * this registry originally. 7418 * 7419 * @param fileName The name of the file to be released 7420 * @param compilationSettings The compilation settings used to acquire the file 7421 * @param scriptKind The script kind of the file to be released 7422 */ 7423 /**@deprecated pass scriptKind and impliedNodeFormat for correctness */ 7424 releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind?: ScriptKind): void; 7425 /** 7426 * Informs the DocumentRegistry that a file is not needed any longer. 7427 * 7428 * Note: It is not allowed to call release on a SourceFile that was not acquired from 7429 * this registry originally. 7430 * 7431 * @param fileName The name of the file to be released 7432 * @param compilationSettings The compilation settings used to acquire the file 7433 * @param scriptKind The script kind of the file to be released 7434 * @param impliedNodeFormat The implied source file format of the file to be released 7435 */ 7436 releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind, impliedNodeFormat: SourceFile["impliedNodeFormat"]): void; 7437 /** 7438 * @deprecated pass scriptKind for and impliedNodeFormat correctness */ 7439 releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind?: ScriptKind): void; 7440 releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind: ScriptKind, impliedNodeFormat: SourceFile["impliedNodeFormat"]): void; 7441 reportStats(): string; 7442 } 7443 type DocumentRegistryBucketKey = string & { 7444 __bucketKey: any; 7445 }; 7446 function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry; 7447} 7448declare namespace ts { 7449 function preProcessFile(sourceText: string, readImportFiles?: boolean, detectJavaScriptImports?: boolean): PreProcessedFileInfo; 7450} 7451declare namespace ts { 7452 interface TranspileOptions { 7453 compilerOptions?: CompilerOptions; 7454 fileName?: string; 7455 reportDiagnostics?: boolean; 7456 moduleName?: string; 7457 renamedDependencies?: MapLike<string>; 7458 transformers?: CustomTransformers; 7459 } 7460 interface TranspileOutput { 7461 outputText: string; 7462 diagnostics?: Diagnostic[]; 7463 sourceMapText?: string; 7464 } 7465 function transpileModule(input: string, transpileOptions: TranspileOptions): TranspileOutput; 7466 function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string; 7467} 7468declare namespace ts { 7469 /** The version of the language service API */ 7470 const servicesVersion = "0.8"; 7471 function toEditorSettings(options: EditorOptions | EditorSettings): EditorSettings; 7472 function displayPartsToString(displayParts: SymbolDisplayPart[] | undefined): string; 7473 function getDefaultCompilerOptions(): CompilerOptions; 7474 function getSupportedCodeFixes(): string[]; 7475 function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTargetOrOptions: ScriptTarget | CreateSourceFileOptions, version: string, setNodeParents: boolean, scriptKind?: ScriptKind, option?: CompilerOptions): SourceFile; 7476 function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange | undefined, aggressiveChecks?: boolean, option?: CompilerOptions): SourceFile; 7477 function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnlyOrLanguageServiceMode?: boolean | LanguageServiceMode): LanguageService; 7478 /** 7479 * Get the path of the default library files (lib.d.ts) as distributed with the typescript 7480 * node package. 7481 * The functionality is not supported if the ts module is consumed outside of a node module. 7482 */ 7483 function getDefaultLibFilePath(options: CompilerOptions): string; 7484} 7485declare namespace ts { 7486 /** 7487 * Transform one or more nodes using the supplied transformers. 7488 * @param source A single `Node` or an array of `Node` objects. 7489 * @param transformers An array of `TransformerFactory` callbacks used to process the transformation. 7490 * @param compilerOptions Optional compiler options. 7491 */ 7492 function transform<T extends Node>(source: T | T[], transformers: TransformerFactory<T>[], compilerOptions?: CompilerOptions): TransformationResult<T>; 7493} 7494declare namespace ts.server { 7495 interface CompressedData { 7496 length: number; 7497 compressionKind: string; 7498 data: any; 7499 } 7500 type ModuleImportResult = { 7501 module: {}; 7502 error: undefined; 7503 } | { 7504 module: undefined; 7505 error: { 7506 stack?: string; 7507 message?: string; 7508 }; 7509 }; 7510 /** @deprecated Use {@link ModuleImportResult} instead. */ 7511 type RequireResult = ModuleImportResult; 7512 interface ServerHost extends System { 7513 watchFile(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher; 7514 watchDirectory(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher; 7515 setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): any; 7516 clearTimeout(timeoutId: any): void; 7517 setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; 7518 clearImmediate(timeoutId: any): void; 7519 gc?(): void; 7520 trace?(s: string): void; 7521 require?(initialPath: string, moduleName: string): ModuleImportResult; 7522 getJsDocNodeCheckedConfig?(fileCheckedInfo: FileCheckModuleInfo, symbolSourceFilePath: string): JsDocNodeCheckConfig; 7523 getJsDocNodeConditionCheckedResult?(fileCheckedInfo: FileCheckModuleInfo, jsDocs: JsDocTagInfo[]): ConditionCheckResult; 7524 getFileCheckedModuleInfo?(containFilePath: string): FileCheckModuleInfo; 7525 } 7526} 7527declare namespace ts.server { 7528 enum LogLevel { 7529 terse = 0, 7530 normal = 1, 7531 requestTime = 2, 7532 verbose = 3 7533 } 7534 const emptyArray: SortedReadonlyArray<never>; 7535 interface Logger { 7536 close(): void; 7537 hasLevel(level: LogLevel): boolean; 7538 loggingEnabled(): boolean; 7539 perftrc(s: string): void; 7540 info(s: string): void; 7541 startGroup(): void; 7542 endGroup(): void; 7543 msg(s: string, type?: Msg): void; 7544 getLogFileName(): string | undefined; 7545 } 7546 enum Msg { 7547 Err = "Err", 7548 Info = "Info", 7549 Perf = "Perf" 7550 } 7551 namespace Msg { 7552 /** @deprecated Only here for backwards-compatibility. Prefer just `Msg`. */ 7553 type Types = Msg; 7554 } 7555 function createInstallTypingsRequest(project: Project, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray<string>, cachePath?: string): DiscoverTypings; 7556 namespace Errors { 7557 function ThrowNoProject(): never; 7558 function ThrowProjectLanguageServiceDisabled(): never; 7559 function ThrowProjectDoesNotContainDocument(fileName: string, project: Project): never; 7560 } 7561 type NormalizedPath = string & { 7562 __normalizedPathTag: any; 7563 }; 7564 function toNormalizedPath(fileName: string): NormalizedPath; 7565 function normalizedPathToPath(normalizedPath: NormalizedPath, currentDirectory: string, getCanonicalFileName: (f: string) => string): Path; 7566 function asNormalizedPath(fileName: string): NormalizedPath; 7567 interface NormalizedPathMap<T> { 7568 get(path: NormalizedPath): T | undefined; 7569 set(path: NormalizedPath, value: T): void; 7570 contains(path: NormalizedPath): boolean; 7571 remove(path: NormalizedPath): void; 7572 } 7573 function createNormalizedPathMap<T>(): NormalizedPathMap<T>; 7574 function isInferredProjectName(name: string): boolean; 7575 function makeInferredProjectName(counter: number): string; 7576 function createSortedArray<T>(): SortedArray<T>; 7577} 7578/** 7579 * Declaration module describing the TypeScript Server protocol 7580 */ 7581declare namespace ts.server.protocol { 7582 enum CommandTypes { 7583 JsxClosingTag = "jsxClosingTag", 7584 Brace = "brace", 7585 BraceCompletion = "braceCompletion", 7586 GetSpanOfEnclosingComment = "getSpanOfEnclosingComment", 7587 Change = "change", 7588 Close = "close", 7589 /** @deprecated Prefer CompletionInfo -- see comment on CompletionsResponse */ 7590 Completions = "completions", 7591 CompletionInfo = "completionInfo", 7592 CompletionDetails = "completionEntryDetails", 7593 CompileOnSaveAffectedFileList = "compileOnSaveAffectedFileList", 7594 CompileOnSaveEmitFile = "compileOnSaveEmitFile", 7595 Configure = "configure", 7596 Definition = "definition", 7597 DefinitionAndBoundSpan = "definitionAndBoundSpan", 7598 Implementation = "implementation", 7599 Exit = "exit", 7600 FileReferences = "fileReferences", 7601 Format = "format", 7602 Formatonkey = "formatonkey", 7603 Geterr = "geterr", 7604 GeterrForProject = "geterrForProject", 7605 SemanticDiagnosticsSync = "semanticDiagnosticsSync", 7606 SyntacticDiagnosticsSync = "syntacticDiagnosticsSync", 7607 SuggestionDiagnosticsSync = "suggestionDiagnosticsSync", 7608 NavBar = "navbar", 7609 Navto = "navto", 7610 NavTree = "navtree", 7611 NavTreeFull = "navtree-full", 7612 /** @deprecated */ 7613 Occurrences = "occurrences", 7614 DocumentHighlights = "documentHighlights", 7615 Open = "open", 7616 Quickinfo = "quickinfo", 7617 References = "references", 7618 Reload = "reload", 7619 Rename = "rename", 7620 Saveto = "saveto", 7621 SignatureHelp = "signatureHelp", 7622 FindSourceDefinition = "findSourceDefinition", 7623 Status = "status", 7624 TypeDefinition = "typeDefinition", 7625 ProjectInfo = "projectInfo", 7626 ReloadProjects = "reloadProjects", 7627 Unknown = "unknown", 7628 OpenExternalProject = "openExternalProject", 7629 OpenExternalProjects = "openExternalProjects", 7630 CloseExternalProject = "closeExternalProject", 7631 UpdateOpen = "updateOpen", 7632 GetOutliningSpans = "getOutliningSpans", 7633 TodoComments = "todoComments", 7634 Indentation = "indentation", 7635 DocCommentTemplate = "docCommentTemplate", 7636 CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects", 7637 GetCodeFixes = "getCodeFixes", 7638 GetCombinedCodeFix = "getCombinedCodeFix", 7639 ApplyCodeActionCommand = "applyCodeActionCommand", 7640 GetSupportedCodeFixes = "getSupportedCodeFixes", 7641 GetApplicableRefactors = "getApplicableRefactors", 7642 GetEditsForRefactor = "getEditsForRefactor", 7643 OrganizeImports = "organizeImports", 7644 GetEditsForFileRename = "getEditsForFileRename", 7645 ConfigurePlugin = "configurePlugin", 7646 SelectionRange = "selectionRange", 7647 ToggleLineComment = "toggleLineComment", 7648 ToggleMultilineComment = "toggleMultilineComment", 7649 CommentSelection = "commentSelection", 7650 UncommentSelection = "uncommentSelection", 7651 PrepareCallHierarchy = "prepareCallHierarchy", 7652 ProvideCallHierarchyIncomingCalls = "provideCallHierarchyIncomingCalls", 7653 ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls", 7654 ProvideInlayHints = "provideInlayHints" 7655 } 7656 /** 7657 * A TypeScript Server message 7658 */ 7659 interface Message { 7660 /** 7661 * Sequence number of the message 7662 */ 7663 seq: number; 7664 /** 7665 * One of "request", "response", or "event" 7666 */ 7667 type: "request" | "response" | "event"; 7668 } 7669 /** 7670 * Client-initiated request message 7671 */ 7672 interface Request extends Message { 7673 type: "request"; 7674 /** 7675 * The command to execute 7676 */ 7677 command: string; 7678 /** 7679 * Object containing arguments for the command 7680 */ 7681 arguments?: any; 7682 } 7683 /** 7684 * Request to reload the project structure for all the opened files 7685 */ 7686 interface ReloadProjectsRequest extends Message { 7687 command: CommandTypes.ReloadProjects; 7688 } 7689 /** 7690 * Server-initiated event message 7691 */ 7692 interface Event extends Message { 7693 type: "event"; 7694 /** 7695 * Name of event 7696 */ 7697 event: string; 7698 /** 7699 * Event-specific information 7700 */ 7701 body?: any; 7702 } 7703 /** 7704 * Response by server to client request message. 7705 */ 7706 interface Response extends Message { 7707 type: "response"; 7708 /** 7709 * Sequence number of the request message. 7710 */ 7711 request_seq: number; 7712 /** 7713 * Outcome of the request. 7714 */ 7715 success: boolean; 7716 /** 7717 * The command requested. 7718 */ 7719 command: string; 7720 /** 7721 * If success === false, this should always be provided. 7722 * Otherwise, may (or may not) contain a success message. 7723 */ 7724 message?: string; 7725 /** 7726 * Contains message body if success === true. 7727 */ 7728 body?: any; 7729 /** 7730 * Contains extra information that plugin can include to be passed on 7731 */ 7732 metadata?: unknown; 7733 /** 7734 * Exposes information about the performance of this request-response pair. 7735 */ 7736 performanceData?: PerformanceData; 7737 } 7738 interface PerformanceData { 7739 /** 7740 * Time spent updating the program graph, in milliseconds. 7741 */ 7742 updateGraphDurationMs?: number; 7743 /** 7744 * The time spent creating or updating the auto-import program, in milliseconds. 7745 */ 7746 createAutoImportProviderProgramDurationMs?: number; 7747 } 7748 /** 7749 * Arguments for FileRequest messages. 7750 */ 7751 interface FileRequestArgs { 7752 /** 7753 * The file for the request (absolute pathname required). 7754 */ 7755 file: string; 7756 projectFileName?: string; 7757 } 7758 interface StatusRequest extends Request { 7759 command: CommandTypes.Status; 7760 } 7761 interface StatusResponseBody { 7762 /** 7763 * The TypeScript version (`ts.version`). 7764 */ 7765 version: string; 7766 } 7767 /** 7768 * Response to StatusRequest 7769 */ 7770 interface StatusResponse extends Response { 7771 body: StatusResponseBody; 7772 } 7773 /** 7774 * Requests a JS Doc comment template for a given position 7775 */ 7776 interface DocCommentTemplateRequest extends FileLocationRequest { 7777 command: CommandTypes.DocCommentTemplate; 7778 } 7779 /** 7780 * Response to DocCommentTemplateRequest 7781 */ 7782 interface DocCommandTemplateResponse extends Response { 7783 body?: TextInsertion; 7784 } 7785 /** 7786 * A request to get TODO comments from the file 7787 */ 7788 interface TodoCommentRequest extends FileRequest { 7789 command: CommandTypes.TodoComments; 7790 arguments: TodoCommentRequestArgs; 7791 } 7792 /** 7793 * Arguments for TodoCommentRequest request. 7794 */ 7795 interface TodoCommentRequestArgs extends FileRequestArgs { 7796 /** 7797 * Array of target TodoCommentDescriptors that describes TODO comments to be found 7798 */ 7799 descriptors: TodoCommentDescriptor[]; 7800 } 7801 /** 7802 * Response for TodoCommentRequest request. 7803 */ 7804 interface TodoCommentsResponse extends Response { 7805 body?: TodoComment[]; 7806 } 7807 /** 7808 * A request to determine if the caret is inside a comment. 7809 */ 7810 interface SpanOfEnclosingCommentRequest extends FileLocationRequest { 7811 command: CommandTypes.GetSpanOfEnclosingComment; 7812 arguments: SpanOfEnclosingCommentRequestArgs; 7813 } 7814 interface SpanOfEnclosingCommentRequestArgs extends FileLocationRequestArgs { 7815 /** 7816 * Requires that the enclosing span be a multi-line comment, or else the request returns undefined. 7817 */ 7818 onlyMultiLine: boolean; 7819 } 7820 /** 7821 * Request to obtain outlining spans in file. 7822 */ 7823 interface OutliningSpansRequest extends FileRequest { 7824 command: CommandTypes.GetOutliningSpans; 7825 } 7826 interface OutliningSpan { 7827 /** The span of the document to actually collapse. */ 7828 textSpan: TextSpan; 7829 /** The span of the document to display when the user hovers over the collapsed span. */ 7830 hintSpan: TextSpan; 7831 /** The text to display in the editor for the collapsed region. */ 7832 bannerText: string; 7833 /** 7834 * Whether or not this region should be automatically collapsed when 7835 * the 'Collapse to Definitions' command is invoked. 7836 */ 7837 autoCollapse: boolean; 7838 /** 7839 * Classification of the contents of the span 7840 */ 7841 kind: OutliningSpanKind; 7842 } 7843 /** 7844 * Response to OutliningSpansRequest request. 7845 */ 7846 interface OutliningSpansResponse extends Response { 7847 body?: OutliningSpan[]; 7848 } 7849 /** 7850 * A request to get indentation for a location in file 7851 */ 7852 interface IndentationRequest extends FileLocationRequest { 7853 command: CommandTypes.Indentation; 7854 arguments: IndentationRequestArgs; 7855 } 7856 /** 7857 * Response for IndentationRequest request. 7858 */ 7859 interface IndentationResponse extends Response { 7860 body?: IndentationResult; 7861 } 7862 /** 7863 * Indentation result representing where indentation should be placed 7864 */ 7865 interface IndentationResult { 7866 /** 7867 * The base position in the document that the indent should be relative to 7868 */ 7869 position: number; 7870 /** 7871 * The number of columns the indent should be at relative to the position's column. 7872 */ 7873 indentation: number; 7874 } 7875 /** 7876 * Arguments for IndentationRequest request. 7877 */ 7878 interface IndentationRequestArgs extends FileLocationRequestArgs { 7879 /** 7880 * An optional set of settings to be used when computing indentation. 7881 * If argument is omitted - then it will use settings for file that were previously set via 'configure' request or global settings. 7882 */ 7883 options?: EditorSettings; 7884 } 7885 /** 7886 * Arguments for ProjectInfoRequest request. 7887 */ 7888 interface ProjectInfoRequestArgs extends FileRequestArgs { 7889 /** 7890 * Indicate if the file name list of the project is needed 7891 */ 7892 needFileNameList: boolean; 7893 } 7894 /** 7895 * A request to get the project information of the current file. 7896 */ 7897 interface ProjectInfoRequest extends Request { 7898 command: CommandTypes.ProjectInfo; 7899 arguments: ProjectInfoRequestArgs; 7900 } 7901 /** 7902 * A request to retrieve compiler options diagnostics for a project 7903 */ 7904 interface CompilerOptionsDiagnosticsRequest extends Request { 7905 arguments: CompilerOptionsDiagnosticsRequestArgs; 7906 } 7907 /** 7908 * Arguments for CompilerOptionsDiagnosticsRequest request. 7909 */ 7910 interface CompilerOptionsDiagnosticsRequestArgs { 7911 /** 7912 * Name of the project to retrieve compiler options diagnostics. 7913 */ 7914 projectFileName: string; 7915 } 7916 /** 7917 * Response message body for "projectInfo" request 7918 */ 7919 interface ProjectInfo { 7920 /** 7921 * For configured project, this is the normalized path of the 'tsconfig.json' file 7922 * For inferred project, this is undefined 7923 */ 7924 configFileName: string; 7925 /** 7926 * The list of normalized file name in the project, including 'lib.d.ts' 7927 */ 7928 fileNames?: string[]; 7929 /** 7930 * Indicates if the project has a active language service instance 7931 */ 7932 languageServiceDisabled?: boolean; 7933 } 7934 /** 7935 * Represents diagnostic info that includes location of diagnostic in two forms 7936 * - start position and length of the error span 7937 * - startLocation and endLocation - a pair of Location objects that store start/end line and offset of the error span. 7938 */ 7939 interface DiagnosticWithLinePosition { 7940 message: string; 7941 start: number; 7942 length: number; 7943 startLocation: Location; 7944 endLocation: Location; 7945 category: string; 7946 code: number; 7947 /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */ 7948 reportsUnnecessary?: {}; 7949 reportsDeprecated?: {}; 7950 relatedInformation?: DiagnosticRelatedInformation[]; 7951 } 7952 /** 7953 * Response message for "projectInfo" request 7954 */ 7955 interface ProjectInfoResponse extends Response { 7956 body?: ProjectInfo; 7957 } 7958 /** 7959 * Request whose sole parameter is a file name. 7960 */ 7961 interface FileRequest extends Request { 7962 arguments: FileRequestArgs; 7963 } 7964 /** 7965 * Instances of this interface specify a location in a source file: 7966 * (file, line, character offset), where line and character offset are 1-based. 7967 */ 7968 interface FileLocationRequestArgs extends FileRequestArgs { 7969 /** 7970 * The line number for the request (1-based). 7971 */ 7972 line: number; 7973 /** 7974 * The character offset (on the line) for the request (1-based). 7975 */ 7976 offset: number; 7977 } 7978 type FileLocationOrRangeRequestArgs = FileLocationRequestArgs | FileRangeRequestArgs; 7979 /** 7980 * Request refactorings at a given position or selection area. 7981 */ 7982 interface GetApplicableRefactorsRequest extends Request { 7983 command: CommandTypes.GetApplicableRefactors; 7984 arguments: GetApplicableRefactorsRequestArgs; 7985 } 7986 type GetApplicableRefactorsRequestArgs = FileLocationOrRangeRequestArgs & { 7987 triggerReason?: RefactorTriggerReason; 7988 kind?: string; 7989 }; 7990 type RefactorTriggerReason = "implicit" | "invoked"; 7991 /** 7992 * Response is a list of available refactorings. 7993 * Each refactoring exposes one or more "Actions"; a user selects one action to invoke a refactoring 7994 */ 7995 interface GetApplicableRefactorsResponse extends Response { 7996 body?: ApplicableRefactorInfo[]; 7997 } 7998 /** 7999 * A set of one or more available refactoring actions, grouped under a parent refactoring. 8000 */ 8001 interface ApplicableRefactorInfo { 8002 /** 8003 * The programmatic name of the refactoring 8004 */ 8005 name: string; 8006 /** 8007 * A description of this refactoring category to show to the user. 8008 * If the refactoring gets inlined (see below), this text will not be visible. 8009 */ 8010 description: string; 8011 /** 8012 * Inlineable refactorings can have their actions hoisted out to the top level 8013 * of a context menu. Non-inlineanable refactorings should always be shown inside 8014 * their parent grouping. 8015 * 8016 * If not specified, this value is assumed to be 'true' 8017 */ 8018 inlineable?: boolean; 8019 actions: RefactorActionInfo[]; 8020 } 8021 /** 8022 * Represents a single refactoring action - for example, the "Extract Method..." refactor might 8023 * offer several actions, each corresponding to a surround class or closure to extract into. 8024 */ 8025 interface RefactorActionInfo { 8026 /** 8027 * The programmatic name of the refactoring action 8028 */ 8029 name: string; 8030 /** 8031 * A description of this refactoring action to show to the user. 8032 * If the parent refactoring is inlined away, this will be the only text shown, 8033 * so this description should make sense by itself if the parent is inlineable=true 8034 */ 8035 description: string; 8036 /** 8037 * A message to show to the user if the refactoring cannot be applied in 8038 * the current context. 8039 */ 8040 notApplicableReason?: string; 8041 /** 8042 * The hierarchical dotted name of the refactor action. 8043 */ 8044 kind?: string; 8045 } 8046 interface GetEditsForRefactorRequest extends Request { 8047 command: CommandTypes.GetEditsForRefactor; 8048 arguments: GetEditsForRefactorRequestArgs; 8049 } 8050 /** 8051 * Request the edits that a particular refactoring action produces. 8052 * Callers must specify the name of the refactor and the name of the action. 8053 */ 8054 type GetEditsForRefactorRequestArgs = FileLocationOrRangeRequestArgs & { 8055 refactor: string; 8056 action: string; 8057 }; 8058 interface GetEditsForRefactorResponse extends Response { 8059 body?: RefactorEditInfo; 8060 } 8061 interface RefactorEditInfo { 8062 edits: FileCodeEdits[]; 8063 /** 8064 * An optional location where the editor should start a rename operation once 8065 * the refactoring edits have been applied 8066 */ 8067 renameLocation?: Location; 8068 renameFilename?: string; 8069 } 8070 /** 8071 * Organize imports by: 8072 * 1) Removing unused imports 8073 * 2) Coalescing imports from the same module 8074 * 3) Sorting imports 8075 */ 8076 interface OrganizeImportsRequest extends Request { 8077 command: CommandTypes.OrganizeImports; 8078 arguments: OrganizeImportsRequestArgs; 8079 } 8080 type OrganizeImportsScope = GetCombinedCodeFixScope; 8081 enum OrganizeImportsMode { 8082 All = "All", 8083 SortAndCombine = "SortAndCombine", 8084 RemoveUnused = "RemoveUnused" 8085 } 8086 interface OrganizeImportsRequestArgs { 8087 scope: OrganizeImportsScope; 8088 /** @deprecated Use `mode` instead */ 8089 skipDestructiveCodeActions?: boolean; 8090 mode?: OrganizeImportsMode; 8091 } 8092 interface OrganizeImportsResponse extends Response { 8093 body: readonly FileCodeEdits[]; 8094 } 8095 interface GetEditsForFileRenameRequest extends Request { 8096 command: CommandTypes.GetEditsForFileRename; 8097 arguments: GetEditsForFileRenameRequestArgs; 8098 } 8099 /** Note: Paths may also be directories. */ 8100 interface GetEditsForFileRenameRequestArgs { 8101 readonly oldFilePath: string; 8102 readonly newFilePath: string; 8103 } 8104 interface GetEditsForFileRenameResponse extends Response { 8105 body: readonly FileCodeEdits[]; 8106 } 8107 /** 8108 * Request for the available codefixes at a specific position. 8109 */ 8110 interface CodeFixRequest extends Request { 8111 command: CommandTypes.GetCodeFixes; 8112 arguments: CodeFixRequestArgs; 8113 } 8114 interface GetCombinedCodeFixRequest extends Request { 8115 command: CommandTypes.GetCombinedCodeFix; 8116 arguments: GetCombinedCodeFixRequestArgs; 8117 } 8118 interface GetCombinedCodeFixResponse extends Response { 8119 body: CombinedCodeActions; 8120 } 8121 interface ApplyCodeActionCommandRequest extends Request { 8122 command: CommandTypes.ApplyCodeActionCommand; 8123 arguments: ApplyCodeActionCommandRequestArgs; 8124 } 8125 interface ApplyCodeActionCommandResponse extends Response { 8126 } 8127 interface FileRangeRequestArgs extends FileRequestArgs { 8128 /** 8129 * The line number for the request (1-based). 8130 */ 8131 startLine: number; 8132 /** 8133 * The character offset (on the line) for the request (1-based). 8134 */ 8135 startOffset: number; 8136 /** 8137 * The line number for the request (1-based). 8138 */ 8139 endLine: number; 8140 /** 8141 * The character offset (on the line) for the request (1-based). 8142 */ 8143 endOffset: number; 8144 } 8145 /** 8146 * Instances of this interface specify errorcodes on a specific location in a sourcefile. 8147 */ 8148 interface CodeFixRequestArgs extends FileRangeRequestArgs { 8149 /** 8150 * Errorcodes we want to get the fixes for. 8151 */ 8152 errorCodes: readonly number[]; 8153 } 8154 interface GetCombinedCodeFixRequestArgs { 8155 scope: GetCombinedCodeFixScope; 8156 fixId: {}; 8157 } 8158 interface GetCombinedCodeFixScope { 8159 type: "file"; 8160 args: FileRequestArgs; 8161 } 8162 interface ApplyCodeActionCommandRequestArgs { 8163 /** May also be an array of commands. */ 8164 command: {}; 8165 } 8166 /** 8167 * Response for GetCodeFixes request. 8168 */ 8169 interface GetCodeFixesResponse extends Response { 8170 body?: CodeAction[]; 8171 } 8172 /** 8173 * A request whose arguments specify a file location (file, line, col). 8174 */ 8175 interface FileLocationRequest extends FileRequest { 8176 arguments: FileLocationRequestArgs; 8177 } 8178 /** 8179 * A request to get codes of supported code fixes. 8180 */ 8181 interface GetSupportedCodeFixesRequest extends Request { 8182 command: CommandTypes.GetSupportedCodeFixes; 8183 } 8184 /** 8185 * A response for GetSupportedCodeFixesRequest request. 8186 */ 8187 interface GetSupportedCodeFixesResponse extends Response { 8188 /** 8189 * List of error codes supported by the server. 8190 */ 8191 body?: string[]; 8192 } 8193 /** 8194 * A request to get encoded semantic classifications for a span in the file 8195 */ 8196 interface EncodedSemanticClassificationsRequest extends FileRequest { 8197 arguments: EncodedSemanticClassificationsRequestArgs; 8198 } 8199 /** 8200 * Arguments for EncodedSemanticClassificationsRequest request. 8201 */ 8202 interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs { 8203 /** 8204 * Start position of the span. 8205 */ 8206 start: number; 8207 /** 8208 * Length of the span. 8209 */ 8210 length: number; 8211 /** 8212 * Optional parameter for the semantic highlighting response, if absent it 8213 * defaults to "original". 8214 */ 8215 format?: "original" | "2020"; 8216 } 8217 /** The response for a EncodedSemanticClassificationsRequest */ 8218 interface EncodedSemanticClassificationsResponse extends Response { 8219 body?: EncodedSemanticClassificationsResponseBody; 8220 } 8221 /** 8222 * Implementation response message. Gives series of text spans depending on the format ar. 8223 */ 8224 interface EncodedSemanticClassificationsResponseBody { 8225 endOfLineState: EndOfLineState; 8226 spans: number[]; 8227 } 8228 /** 8229 * Arguments in document highlight request; include: filesToSearch, file, 8230 * line, offset. 8231 */ 8232 interface DocumentHighlightsRequestArgs extends FileLocationRequestArgs { 8233 /** 8234 * List of files to search for document highlights. 8235 */ 8236 filesToSearch: string[]; 8237 } 8238 /** 8239 * Go to definition request; value of command field is 8240 * "definition". Return response giving the file locations that 8241 * define the symbol found in file at location line, col. 8242 */ 8243 interface DefinitionRequest extends FileLocationRequest { 8244 command: CommandTypes.Definition; 8245 } 8246 interface DefinitionAndBoundSpanRequest extends FileLocationRequest { 8247 readonly command: CommandTypes.DefinitionAndBoundSpan; 8248 } 8249 interface FindSourceDefinitionRequest extends FileLocationRequest { 8250 readonly command: CommandTypes.FindSourceDefinition; 8251 } 8252 interface DefinitionAndBoundSpanResponse extends Response { 8253 readonly body: DefinitionInfoAndBoundSpan; 8254 } 8255 /** 8256 * Go to type request; value of command field is 8257 * "typeDefinition". Return response giving the file locations that 8258 * define the type for the symbol found in file at location line, col. 8259 */ 8260 interface TypeDefinitionRequest extends FileLocationRequest { 8261 command: CommandTypes.TypeDefinition; 8262 } 8263 /** 8264 * Go to implementation request; value of command field is 8265 * "implementation". Return response giving the file locations that 8266 * implement the symbol found in file at location line, col. 8267 */ 8268 interface ImplementationRequest extends FileLocationRequest { 8269 command: CommandTypes.Implementation; 8270 } 8271 /** 8272 * Location in source code expressed as (one-based) line and (one-based) column offset. 8273 */ 8274 interface Location { 8275 line: number; 8276 offset: number; 8277 } 8278 /** 8279 * Object found in response messages defining a span of text in source code. 8280 */ 8281 interface TextSpan { 8282 /** 8283 * First character of the definition. 8284 */ 8285 start: Location; 8286 /** 8287 * One character past last character of the definition. 8288 */ 8289 end: Location; 8290 } 8291 /** 8292 * Object found in response messages defining a span of text in a specific source file. 8293 */ 8294 interface FileSpan extends TextSpan { 8295 /** 8296 * File containing text span. 8297 */ 8298 file: string; 8299 } 8300 interface JSDocTagInfo { 8301 /** Name of the JSDoc tag */ 8302 name: string; 8303 /** 8304 * Comment text after the JSDoc tag -- the text after the tag name until the next tag or end of comment 8305 * Display parts when UserPreferences.displayPartsForJSDoc is true, flattened to string otherwise. 8306 */ 8307 text?: string | SymbolDisplayPart[]; 8308 } 8309 interface TextSpanWithContext extends TextSpan { 8310 contextStart?: Location; 8311 contextEnd?: Location; 8312 } 8313 interface FileSpanWithContext extends FileSpan, TextSpanWithContext { 8314 } 8315 interface DefinitionInfo extends FileSpanWithContext { 8316 /** 8317 * When true, the file may or may not exist. 8318 */ 8319 unverified?: boolean; 8320 } 8321 interface DefinitionInfoAndBoundSpan { 8322 definitions: readonly DefinitionInfo[]; 8323 textSpan: TextSpan; 8324 } 8325 /** 8326 * Definition response message. Gives text range for definition. 8327 */ 8328 interface DefinitionResponse extends Response { 8329 body?: DefinitionInfo[]; 8330 } 8331 interface DefinitionInfoAndBoundSpanResponse extends Response { 8332 body?: DefinitionInfoAndBoundSpan; 8333 } 8334 /** @deprecated Use `DefinitionInfoAndBoundSpanResponse` instead. */ 8335 type DefinitionInfoAndBoundSpanReponse = DefinitionInfoAndBoundSpanResponse; 8336 /** 8337 * Definition response message. Gives text range for definition. 8338 */ 8339 interface TypeDefinitionResponse extends Response { 8340 body?: FileSpanWithContext[]; 8341 } 8342 /** 8343 * Implementation response message. Gives text range for implementations. 8344 */ 8345 interface ImplementationResponse extends Response { 8346 body?: FileSpanWithContext[]; 8347 } 8348 /** 8349 * Request to get brace completion for a location in the file. 8350 */ 8351 interface BraceCompletionRequest extends FileLocationRequest { 8352 command: CommandTypes.BraceCompletion; 8353 arguments: BraceCompletionRequestArgs; 8354 } 8355 /** 8356 * Argument for BraceCompletionRequest request. 8357 */ 8358 interface BraceCompletionRequestArgs extends FileLocationRequestArgs { 8359 /** 8360 * Kind of opening brace 8361 */ 8362 openingBrace: string; 8363 } 8364 interface JsxClosingTagRequest extends FileLocationRequest { 8365 readonly command: CommandTypes.JsxClosingTag; 8366 readonly arguments: JsxClosingTagRequestArgs; 8367 } 8368 interface JsxClosingTagRequestArgs extends FileLocationRequestArgs { 8369 } 8370 interface JsxClosingTagResponse extends Response { 8371 readonly body: TextInsertion; 8372 } 8373 /** 8374 * @deprecated 8375 * Get occurrences request; value of command field is 8376 * "occurrences". Return response giving spans that are relevant 8377 * in the file at a given line and column. 8378 */ 8379 interface OccurrencesRequest extends FileLocationRequest { 8380 command: CommandTypes.Occurrences; 8381 } 8382 /** @deprecated */ 8383 interface OccurrencesResponseItem extends FileSpanWithContext { 8384 /** 8385 * True if the occurrence is a write location, false otherwise. 8386 */ 8387 isWriteAccess: boolean; 8388 /** 8389 * True if the occurrence is in a string, undefined otherwise; 8390 */ 8391 isInString?: true; 8392 } 8393 /** @deprecated */ 8394 interface OccurrencesResponse extends Response { 8395 body?: OccurrencesResponseItem[]; 8396 } 8397 /** 8398 * Get document highlights request; value of command field is 8399 * "documentHighlights". Return response giving spans that are relevant 8400 * in the file at a given line and column. 8401 */ 8402 interface DocumentHighlightsRequest extends FileLocationRequest { 8403 command: CommandTypes.DocumentHighlights; 8404 arguments: DocumentHighlightsRequestArgs; 8405 } 8406 /** 8407 * Span augmented with extra information that denotes the kind of the highlighting to be used for span. 8408 */ 8409 interface HighlightSpan extends TextSpanWithContext { 8410 kind: HighlightSpanKind; 8411 } 8412 /** 8413 * Represents a set of highligh spans for a give name 8414 */ 8415 interface DocumentHighlightsItem { 8416 /** 8417 * File containing highlight spans. 8418 */ 8419 file: string; 8420 /** 8421 * Spans to highlight in file. 8422 */ 8423 highlightSpans: HighlightSpan[]; 8424 } 8425 /** 8426 * Response for a DocumentHighlightsRequest request. 8427 */ 8428 interface DocumentHighlightsResponse extends Response { 8429 body?: DocumentHighlightsItem[]; 8430 } 8431 /** 8432 * Find references request; value of command field is 8433 * "references". Return response giving the file locations that 8434 * reference the symbol found in file at location line, col. 8435 */ 8436 interface ReferencesRequest extends FileLocationRequest { 8437 command: CommandTypes.References; 8438 } 8439 interface ReferencesResponseItem extends FileSpanWithContext { 8440 /** 8441 * Text of line containing the reference. Including this 8442 * with the response avoids latency of editor loading files 8443 * to show text of reference line (the server already has loaded the referencing files). 8444 * 8445 * If {@link UserPreferences.disableLineTextInReferences} is enabled, the property won't be filled 8446 */ 8447 lineText?: string; 8448 /** 8449 * True if reference is a write location, false otherwise. 8450 */ 8451 isWriteAccess: boolean; 8452 /** 8453 * Present only if the search was triggered from a declaration. 8454 * True indicates that the references refers to the same symbol 8455 * (i.e. has the same meaning) as the declaration that began the 8456 * search. 8457 */ 8458 isDefinition?: boolean; 8459 } 8460 /** 8461 * The body of a "references" response message. 8462 */ 8463 interface ReferencesResponseBody { 8464 /** 8465 * The file locations referencing the symbol. 8466 */ 8467 refs: readonly ReferencesResponseItem[]; 8468 /** 8469 * The name of the symbol. 8470 */ 8471 symbolName: string; 8472 /** 8473 * The start character offset of the symbol (on the line provided by the references request). 8474 */ 8475 symbolStartOffset: number; 8476 /** 8477 * The full display name of the symbol. 8478 */ 8479 symbolDisplayString: string; 8480 } 8481 /** 8482 * Response to "references" request. 8483 */ 8484 interface ReferencesResponse extends Response { 8485 body?: ReferencesResponseBody; 8486 } 8487 interface FileReferencesRequest extends FileRequest { 8488 command: CommandTypes.FileReferences; 8489 } 8490 interface FileReferencesResponseBody { 8491 /** 8492 * The file locations referencing the symbol. 8493 */ 8494 refs: readonly ReferencesResponseItem[]; 8495 /** 8496 * The name of the symbol. 8497 */ 8498 symbolName: string; 8499 } 8500 interface FileReferencesResponse extends Response { 8501 body?: FileReferencesResponseBody; 8502 } 8503 /** 8504 * Argument for RenameRequest request. 8505 */ 8506 interface RenameRequestArgs extends FileLocationRequestArgs { 8507 /** 8508 * Should text at specified location be found/changed in comments? 8509 */ 8510 findInComments?: boolean; 8511 /** 8512 * Should text at specified location be found/changed in strings? 8513 */ 8514 findInStrings?: boolean; 8515 } 8516 /** 8517 * Rename request; value of command field is "rename". Return 8518 * response giving the file locations that reference the symbol 8519 * found in file at location line, col. Also return full display 8520 * name of the symbol so that client can print it unambiguously. 8521 */ 8522 interface RenameRequest extends FileLocationRequest { 8523 command: CommandTypes.Rename; 8524 arguments: RenameRequestArgs; 8525 } 8526 /** 8527 * Information about the item to be renamed. 8528 */ 8529 type RenameInfo = RenameInfoSuccess | RenameInfoFailure; 8530 interface RenameInfoSuccess { 8531 /** 8532 * True if item can be renamed. 8533 */ 8534 canRename: true; 8535 /** 8536 * File or directory to rename. 8537 * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`. 8538 */ 8539 fileToRename?: string; 8540 /** 8541 * Display name of the item to be renamed. 8542 */ 8543 displayName: string; 8544 /** 8545 * Full display name of item to be renamed. 8546 */ 8547 fullDisplayName: string; 8548 /** 8549 * The items's kind (such as 'className' or 'parameterName' or plain 'text'). 8550 */ 8551 kind: ScriptElementKind; 8552 /** 8553 * Optional modifiers for the kind (such as 'public'). 8554 */ 8555 kindModifiers: string; 8556 /** Span of text to rename. */ 8557 triggerSpan: TextSpan; 8558 } 8559 interface RenameInfoFailure { 8560 canRename: false; 8561 /** 8562 * Error message if item can not be renamed. 8563 */ 8564 localizedErrorMessage: string; 8565 } 8566 /** 8567 * A group of text spans, all in 'file'. 8568 */ 8569 interface SpanGroup { 8570 /** The file to which the spans apply */ 8571 file: string; 8572 /** The text spans in this group */ 8573 locs: RenameTextSpan[]; 8574 } 8575 interface RenameTextSpan extends TextSpanWithContext { 8576 readonly prefixText?: string; 8577 readonly suffixText?: string; 8578 } 8579 interface RenameResponseBody { 8580 /** 8581 * Information about the item to be renamed. 8582 */ 8583 info: RenameInfo; 8584 /** 8585 * An array of span groups (one per file) that refer to the item to be renamed. 8586 */ 8587 locs: readonly SpanGroup[]; 8588 } 8589 /** 8590 * Rename response message. 8591 */ 8592 interface RenameResponse extends Response { 8593 body?: RenameResponseBody; 8594 } 8595 /** 8596 * Represents a file in external project. 8597 * External project is project whose set of files, compilation options and open\close state 8598 * is maintained by the client (i.e. if all this data come from .csproj file in Visual Studio). 8599 * External project will exist even if all files in it are closed and should be closed explicitly. 8600 * If external project includes one or more tsconfig.json/jsconfig.json files then tsserver will 8601 * create configured project for every config file but will maintain a link that these projects were created 8602 * as a result of opening external project so they should be removed once external project is closed. 8603 */ 8604 interface ExternalFile { 8605 /** 8606 * Name of file file 8607 */ 8608 fileName: string; 8609 /** 8610 * Script kind of the file 8611 */ 8612 scriptKind?: ScriptKindName | ts.ScriptKind; 8613 /** 8614 * Whether file has mixed content (i.e. .cshtml file that combines html markup with C#/JavaScript) 8615 */ 8616 hasMixedContent?: boolean; 8617 /** 8618 * Content of the file 8619 */ 8620 content?: string; 8621 } 8622 /** 8623 * Represent an external project 8624 */ 8625 interface ExternalProject { 8626 /** 8627 * Project name 8628 */ 8629 projectFileName: string; 8630 /** 8631 * List of root files in project 8632 */ 8633 rootFiles: ExternalFile[]; 8634 /** 8635 * Compiler options for the project 8636 */ 8637 options: ExternalProjectCompilerOptions; 8638 /** 8639 * @deprecated typingOptions. Use typeAcquisition instead 8640 */ 8641 typingOptions?: TypeAcquisition; 8642 /** 8643 * Explicitly specified type acquisition for the project 8644 */ 8645 typeAcquisition?: TypeAcquisition; 8646 } 8647 interface CompileOnSaveMixin { 8648 /** 8649 * If compile on save is enabled for the project 8650 */ 8651 compileOnSave?: boolean; 8652 } 8653 /** 8654 * For external projects, some of the project settings are sent together with 8655 * compiler settings. 8656 */ 8657 type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin & WatchOptions; 8658 interface FileWithProjectReferenceRedirectInfo { 8659 /** 8660 * Name of file 8661 */ 8662 fileName: string; 8663 /** 8664 * True if the file is primarily included in a referenced project 8665 */ 8666 isSourceOfProjectReferenceRedirect: boolean; 8667 } 8668 /** 8669 * Represents a set of changes that happen in project 8670 */ 8671 interface ProjectChanges { 8672 /** 8673 * List of added files 8674 */ 8675 added: string[] | FileWithProjectReferenceRedirectInfo[]; 8676 /** 8677 * List of removed files 8678 */ 8679 removed: string[] | FileWithProjectReferenceRedirectInfo[]; 8680 /** 8681 * List of updated files 8682 */ 8683 updated: string[] | FileWithProjectReferenceRedirectInfo[]; 8684 /** 8685 * List of files that have had their project reference redirect status updated 8686 * Only provided when the synchronizeProjectList request has includeProjectReferenceRedirectInfo set to true 8687 */ 8688 updatedRedirects?: FileWithProjectReferenceRedirectInfo[]; 8689 } 8690 /** 8691 * Information found in a configure request. 8692 */ 8693 interface ConfigureRequestArguments { 8694 /** 8695 * Information about the host, for example 'Emacs 24.4' or 8696 * 'Sublime Text version 3075' 8697 */ 8698 hostInfo?: string; 8699 /** 8700 * If present, tab settings apply only to this file. 8701 */ 8702 file?: string; 8703 /** 8704 * The format options to use during formatting and other code editing features. 8705 */ 8706 formatOptions?: FormatCodeSettings; 8707 preferences?: UserPreferences; 8708 /** 8709 * The host's additional supported .js file extensions 8710 */ 8711 extraFileExtensions?: FileExtensionInfo[]; 8712 watchOptions?: WatchOptions; 8713 } 8714 enum WatchFileKind { 8715 FixedPollingInterval = "FixedPollingInterval", 8716 PriorityPollingInterval = "PriorityPollingInterval", 8717 DynamicPriorityPolling = "DynamicPriorityPolling", 8718 FixedChunkSizePolling = "FixedChunkSizePolling", 8719 UseFsEvents = "UseFsEvents", 8720 UseFsEventsOnParentDirectory = "UseFsEventsOnParentDirectory" 8721 } 8722 enum WatchDirectoryKind { 8723 UseFsEvents = "UseFsEvents", 8724 FixedPollingInterval = "FixedPollingInterval", 8725 DynamicPriorityPolling = "DynamicPriorityPolling", 8726 FixedChunkSizePolling = "FixedChunkSizePolling" 8727 } 8728 enum PollingWatchKind { 8729 FixedInterval = "FixedInterval", 8730 PriorityInterval = "PriorityInterval", 8731 DynamicPriority = "DynamicPriority", 8732 FixedChunkSize = "FixedChunkSize" 8733 } 8734 interface WatchOptions { 8735 watchFile?: WatchFileKind | ts.WatchFileKind; 8736 watchDirectory?: WatchDirectoryKind | ts.WatchDirectoryKind; 8737 fallbackPolling?: PollingWatchKind | ts.PollingWatchKind; 8738 synchronousWatchDirectory?: boolean; 8739 excludeDirectories?: string[]; 8740 excludeFiles?: string[]; 8741 [option: string]: CompilerOptionsValue | undefined; 8742 } 8743 /** 8744 * Configure request; value of command field is "configure". Specifies 8745 * host information, such as host type, tab size, and indent size. 8746 */ 8747 interface ConfigureRequest extends Request { 8748 command: CommandTypes.Configure; 8749 arguments: ConfigureRequestArguments; 8750 } 8751 /** 8752 * Response to "configure" request. This is just an acknowledgement, so 8753 * no body field is required. 8754 */ 8755 interface ConfigureResponse extends Response { 8756 } 8757 interface ConfigurePluginRequestArguments { 8758 pluginName: string; 8759 configuration: any; 8760 } 8761 interface ConfigurePluginRequest extends Request { 8762 command: CommandTypes.ConfigurePlugin; 8763 arguments: ConfigurePluginRequestArguments; 8764 } 8765 interface ConfigurePluginResponse extends Response { 8766 } 8767 interface SelectionRangeRequest extends FileRequest { 8768 command: CommandTypes.SelectionRange; 8769 arguments: SelectionRangeRequestArgs; 8770 } 8771 interface SelectionRangeRequestArgs extends FileRequestArgs { 8772 locations: Location[]; 8773 } 8774 interface SelectionRangeResponse extends Response { 8775 body?: SelectionRange[]; 8776 } 8777 interface SelectionRange { 8778 textSpan: TextSpan; 8779 parent?: SelectionRange; 8780 } 8781 interface ToggleLineCommentRequest extends FileRequest { 8782 command: CommandTypes.ToggleLineComment; 8783 arguments: FileRangeRequestArgs; 8784 } 8785 interface ToggleMultilineCommentRequest extends FileRequest { 8786 command: CommandTypes.ToggleMultilineComment; 8787 arguments: FileRangeRequestArgs; 8788 } 8789 interface CommentSelectionRequest extends FileRequest { 8790 command: CommandTypes.CommentSelection; 8791 arguments: FileRangeRequestArgs; 8792 } 8793 interface UncommentSelectionRequest extends FileRequest { 8794 command: CommandTypes.UncommentSelection; 8795 arguments: FileRangeRequestArgs; 8796 } 8797 /** 8798 * Information found in an "open" request. 8799 */ 8800 interface OpenRequestArgs extends FileRequestArgs { 8801 /** 8802 * Used when a version of the file content is known to be more up to date than the one on disk. 8803 * Then the known content will be used upon opening instead of the disk copy 8804 */ 8805 fileContent?: string; 8806 /** 8807 * Used to specify the script kind of the file explicitly. It could be one of the following: 8808 * "TS", "JS", "TSX", "JSX" 8809 */ 8810 scriptKindName?: ScriptKindName; 8811 /** 8812 * Used to limit the searching for project config file. If given the searching will stop at this 8813 * root path; otherwise it will go all the way up to the dist root path. 8814 */ 8815 projectRootPath?: string; 8816 } 8817 type ScriptKindName = "TS" | "JS" | "TSX" | "JSX" | "ETS"; 8818 /** 8819 * Open request; value of command field is "open". Notify the 8820 * server that the client has file open. The server will not 8821 * monitor the filesystem for changes in this file and will assume 8822 * that the client is updating the server (using the change and/or 8823 * reload messages) when the file changes. Server does not currently 8824 * send a response to an open request. 8825 */ 8826 interface OpenRequest extends Request { 8827 command: CommandTypes.Open; 8828 arguments: OpenRequestArgs; 8829 } 8830 /** 8831 * Request to open or update external project 8832 */ 8833 interface OpenExternalProjectRequest extends Request { 8834 command: CommandTypes.OpenExternalProject; 8835 arguments: OpenExternalProjectArgs; 8836 } 8837 /** 8838 * Arguments to OpenExternalProjectRequest request 8839 */ 8840 type OpenExternalProjectArgs = ExternalProject; 8841 /** 8842 * Request to open multiple external projects 8843 */ 8844 interface OpenExternalProjectsRequest extends Request { 8845 command: CommandTypes.OpenExternalProjects; 8846 arguments: OpenExternalProjectsArgs; 8847 } 8848 /** 8849 * Arguments to OpenExternalProjectsRequest 8850 */ 8851 interface OpenExternalProjectsArgs { 8852 /** 8853 * List of external projects to open or update 8854 */ 8855 projects: ExternalProject[]; 8856 } 8857 /** 8858 * Response to OpenExternalProjectRequest request. This is just an acknowledgement, so 8859 * no body field is required. 8860 */ 8861 interface OpenExternalProjectResponse extends Response { 8862 } 8863 /** 8864 * Response to OpenExternalProjectsRequest request. This is just an acknowledgement, so 8865 * no body field is required. 8866 */ 8867 interface OpenExternalProjectsResponse extends Response { 8868 } 8869 /** 8870 * Request to close external project. 8871 */ 8872 interface CloseExternalProjectRequest extends Request { 8873 command: CommandTypes.CloseExternalProject; 8874 arguments: CloseExternalProjectRequestArgs; 8875 } 8876 /** 8877 * Arguments to CloseExternalProjectRequest request 8878 */ 8879 interface CloseExternalProjectRequestArgs { 8880 /** 8881 * Name of the project to close 8882 */ 8883 projectFileName: string; 8884 } 8885 /** 8886 * Response to CloseExternalProjectRequest request. This is just an acknowledgement, so 8887 * no body field is required. 8888 */ 8889 interface CloseExternalProjectResponse extends Response { 8890 } 8891 /** 8892 * Request to synchronize list of open files with the client 8893 */ 8894 interface UpdateOpenRequest extends Request { 8895 command: CommandTypes.UpdateOpen; 8896 arguments: UpdateOpenRequestArgs; 8897 } 8898 /** 8899 * Arguments to UpdateOpenRequest 8900 */ 8901 interface UpdateOpenRequestArgs { 8902 /** 8903 * List of newly open files 8904 */ 8905 openFiles?: OpenRequestArgs[]; 8906 /** 8907 * List of open files files that were changes 8908 */ 8909 changedFiles?: FileCodeEdits[]; 8910 /** 8911 * List of files that were closed 8912 */ 8913 closedFiles?: string[]; 8914 } 8915 /** 8916 * External projects have a typeAcquisition option so they need to be added separately to compiler options for inferred projects. 8917 */ 8918 type InferredProjectCompilerOptions = ExternalProjectCompilerOptions & TypeAcquisition; 8919 /** 8920 * Request to set compiler options for inferred projects. 8921 * External projects are opened / closed explicitly. 8922 * Configured projects are opened when user opens loose file that has 'tsconfig.json' or 'jsconfig.json' anywhere in one of containing folders. 8923 * This configuration file will be used to obtain a list of files and configuration settings for the project. 8924 * Inferred projects are created when user opens a loose file that is not the part of external project 8925 * or configured project and will contain only open file and transitive closure of referenced files if 'useOneInferredProject' is false, 8926 * or all open loose files and its transitive closure of referenced files if 'useOneInferredProject' is true. 8927 */ 8928 interface SetCompilerOptionsForInferredProjectsRequest extends Request { 8929 command: CommandTypes.CompilerOptionsForInferredProjects; 8930 arguments: SetCompilerOptionsForInferredProjectsArgs; 8931 } 8932 /** 8933 * Argument for SetCompilerOptionsForInferredProjectsRequest request. 8934 */ 8935 interface SetCompilerOptionsForInferredProjectsArgs { 8936 /** 8937 * Compiler options to be used with inferred projects. 8938 */ 8939 options: InferredProjectCompilerOptions; 8940 /** 8941 * Specifies the project root path used to scope compiler options. 8942 * It is an error to provide this property if the server has not been started with 8943 * `useInferredProjectPerProjectRoot` enabled. 8944 */ 8945 projectRootPath?: string; 8946 } 8947 /** 8948 * Response to SetCompilerOptionsForInferredProjectsResponse request. This is just an acknowledgement, so 8949 * no body field is required. 8950 */ 8951 interface SetCompilerOptionsForInferredProjectsResponse extends Response { 8952 } 8953 /** 8954 * Exit request; value of command field is "exit". Ask the server process 8955 * to exit. 8956 */ 8957 interface ExitRequest extends Request { 8958 command: CommandTypes.Exit; 8959 } 8960 /** 8961 * Close request; value of command field is "close". Notify the 8962 * server that the client has closed a previously open file. If 8963 * file is still referenced by open files, the server will resume 8964 * monitoring the filesystem for changes to file. Server does not 8965 * currently send a response to a close request. 8966 */ 8967 interface CloseRequest extends FileRequest { 8968 command: CommandTypes.Close; 8969 } 8970 /** 8971 * Request to obtain the list of files that should be regenerated if target file is recompiled. 8972 * NOTE: this us query-only operation and does not generate any output on disk. 8973 */ 8974 interface CompileOnSaveAffectedFileListRequest extends FileRequest { 8975 command: CommandTypes.CompileOnSaveAffectedFileList; 8976 } 8977 /** 8978 * Contains a list of files that should be regenerated in a project 8979 */ 8980 interface CompileOnSaveAffectedFileListSingleProject { 8981 /** 8982 * Project name 8983 */ 8984 projectFileName: string; 8985 /** 8986 * List of files names that should be recompiled 8987 */ 8988 fileNames: string[]; 8989 /** 8990 * true if project uses outFile or out compiler option 8991 */ 8992 projectUsesOutFile: boolean; 8993 } 8994 /** 8995 * Response for CompileOnSaveAffectedFileListRequest request; 8996 */ 8997 interface CompileOnSaveAffectedFileListResponse extends Response { 8998 body: CompileOnSaveAffectedFileListSingleProject[]; 8999 } 9000 /** 9001 * Request to recompile the file. All generated outputs (.js, .d.ts or .js.map files) is written on disk. 9002 */ 9003 interface CompileOnSaveEmitFileRequest extends FileRequest { 9004 command: CommandTypes.CompileOnSaveEmitFile; 9005 arguments: CompileOnSaveEmitFileRequestArgs; 9006 } 9007 /** 9008 * Arguments for CompileOnSaveEmitFileRequest 9009 */ 9010 interface CompileOnSaveEmitFileRequestArgs extends FileRequestArgs { 9011 /** 9012 * if true - then file should be recompiled even if it does not have any changes. 9013 */ 9014 forced?: boolean; 9015 includeLinePosition?: boolean; 9016 /** if true - return response as object with emitSkipped and diagnostics */ 9017 richResponse?: boolean; 9018 } 9019 interface CompileOnSaveEmitFileResponse extends Response { 9020 body: boolean | EmitResult; 9021 } 9022 interface EmitResult { 9023 emitSkipped: boolean; 9024 diagnostics: Diagnostic[] | DiagnosticWithLinePosition[]; 9025 } 9026 /** 9027 * Quickinfo request; value of command field is 9028 * "quickinfo". Return response giving a quick type and 9029 * documentation string for the symbol found in file at location 9030 * line, col. 9031 */ 9032 interface QuickInfoRequest extends FileLocationRequest { 9033 command: CommandTypes.Quickinfo; 9034 arguments: FileLocationRequestArgs; 9035 } 9036 /** 9037 * Body of QuickInfoResponse. 9038 */ 9039 interface QuickInfoResponseBody { 9040 /** 9041 * The symbol's kind (such as 'className' or 'parameterName' or plain 'text'). 9042 */ 9043 kind: ScriptElementKind; 9044 /** 9045 * Optional modifiers for the kind (such as 'public'). 9046 */ 9047 kindModifiers: string; 9048 /** 9049 * Starting file location of symbol. 9050 */ 9051 start: Location; 9052 /** 9053 * One past last character of symbol. 9054 */ 9055 end: Location; 9056 /** 9057 * Type and kind of symbol. 9058 */ 9059 displayString: string; 9060 /** 9061 * Documentation associated with symbol. 9062 * Display parts when UserPreferences.displayPartsForJSDoc is true, flattened to string otherwise. 9063 */ 9064 documentation: string | SymbolDisplayPart[]; 9065 /** 9066 * JSDoc tags associated with symbol. 9067 */ 9068 tags: JSDocTagInfo[]; 9069 } 9070 /** 9071 * Quickinfo response message. 9072 */ 9073 interface QuickInfoResponse extends Response { 9074 body?: QuickInfoResponseBody; 9075 } 9076 /** 9077 * Arguments for format messages. 9078 */ 9079 interface FormatRequestArgs extends FileLocationRequestArgs { 9080 /** 9081 * Last line of range for which to format text in file. 9082 */ 9083 endLine: number; 9084 /** 9085 * Character offset on last line of range for which to format text in file. 9086 */ 9087 endOffset: number; 9088 /** 9089 * Format options to be used. 9090 */ 9091 options?: FormatCodeSettings; 9092 } 9093 /** 9094 * Format request; value of command field is "format". Return 9095 * response giving zero or more edit instructions. The edit 9096 * instructions will be sorted in file order. Applying the edit 9097 * instructions in reverse to file will result in correctly 9098 * reformatted text. 9099 */ 9100 interface FormatRequest extends FileLocationRequest { 9101 command: CommandTypes.Format; 9102 arguments: FormatRequestArgs; 9103 } 9104 /** 9105 * Object found in response messages defining an editing 9106 * instruction for a span of text in source code. The effect of 9107 * this instruction is to replace the text starting at start and 9108 * ending one character before end with newText. For an insertion, 9109 * the text span is empty. For a deletion, newText is empty. 9110 */ 9111 interface CodeEdit { 9112 /** 9113 * First character of the text span to edit. 9114 */ 9115 start: Location; 9116 /** 9117 * One character past last character of the text span to edit. 9118 */ 9119 end: Location; 9120 /** 9121 * Replace the span defined above with this string (may be 9122 * the empty string). 9123 */ 9124 newText: string; 9125 } 9126 interface FileCodeEdits { 9127 fileName: string; 9128 textChanges: CodeEdit[]; 9129 } 9130 interface CodeFixResponse extends Response { 9131 /** The code actions that are available */ 9132 body?: CodeFixAction[]; 9133 } 9134 interface CodeAction { 9135 /** Description of the code action to display in the UI of the editor */ 9136 description: string; 9137 /** Text changes to apply to each file as part of the code action */ 9138 changes: FileCodeEdits[]; 9139 /** A command is an opaque object that should be passed to `ApplyCodeActionCommandRequestArgs` without modification. */ 9140 commands?: {}[]; 9141 } 9142 interface CombinedCodeActions { 9143 changes: readonly FileCodeEdits[]; 9144 commands?: readonly {}[]; 9145 } 9146 interface CodeFixAction extends CodeAction { 9147 /** Short name to identify the fix, for use by telemetry. */ 9148 fixName: string; 9149 /** 9150 * If present, one may call 'getCombinedCodeFix' with this fixId. 9151 * This may be omitted to indicate that the code fix can't be applied in a group. 9152 */ 9153 fixId?: {}; 9154 /** Should be present if and only if 'fixId' is. */ 9155 fixAllDescription?: string; 9156 } 9157 /** 9158 * Format and format on key response message. 9159 */ 9160 interface FormatResponse extends Response { 9161 body?: CodeEdit[]; 9162 } 9163 /** 9164 * Arguments for format on key messages. 9165 */ 9166 interface FormatOnKeyRequestArgs extends FileLocationRequestArgs { 9167 /** 9168 * Key pressed (';', '\n', or '}'). 9169 */ 9170 key: string; 9171 options?: FormatCodeSettings; 9172 } 9173 /** 9174 * Format on key request; value of command field is 9175 * "formatonkey". Given file location and key typed (as string), 9176 * return response giving zero or more edit instructions. The 9177 * edit instructions will be sorted in file order. Applying the 9178 * edit instructions in reverse to file will result in correctly 9179 * reformatted text. 9180 */ 9181 interface FormatOnKeyRequest extends FileLocationRequest { 9182 command: CommandTypes.Formatonkey; 9183 arguments: FormatOnKeyRequestArgs; 9184 } 9185 type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " "; 9186 enum CompletionTriggerKind { 9187 /** Completion was triggered by typing an identifier, manual invocation (e.g Ctrl+Space) or via API. */ 9188 Invoked = 1, 9189 /** Completion was triggered by a trigger character. */ 9190 TriggerCharacter = 2, 9191 /** Completion was re-triggered as the current completion list is incomplete. */ 9192 TriggerForIncompleteCompletions = 3 9193 } 9194 /** 9195 * Arguments for completions messages. 9196 */ 9197 interface CompletionsRequestArgs extends FileLocationRequestArgs { 9198 /** 9199 * Optional prefix to apply to possible completions. 9200 */ 9201 prefix?: string; 9202 /** 9203 * Character that was responsible for triggering completion. 9204 * Should be `undefined` if a user manually requested completion. 9205 */ 9206 triggerCharacter?: CompletionsTriggerCharacter; 9207 triggerKind?: CompletionTriggerKind; 9208 /** 9209 * @deprecated Use UserPreferences.includeCompletionsForModuleExports 9210 */ 9211 includeExternalModuleExports?: boolean; 9212 /** 9213 * @deprecated Use UserPreferences.includeCompletionsWithInsertText 9214 */ 9215 includeInsertTextCompletions?: boolean; 9216 } 9217 interface EtsOptions { 9218 render: { 9219 method: string[]; 9220 decorator: string[]; 9221 }; 9222 components: string[]; 9223 libs: string[]; 9224 extend: { 9225 decorator: string[]; 9226 components: { 9227 name: string; 9228 type: string; 9229 instance: string; 9230 }[]; 9231 }; 9232 styles: { 9233 decorator: string; 9234 component: { 9235 name: string; 9236 type: string; 9237 instance: string; 9238 }; 9239 property: string; 9240 }; 9241 concurrent: { 9242 decorator: string; 9243 }; 9244 customComponent?: string; 9245 propertyDecorators: { 9246 name: string; 9247 needInitialization: boolean; 9248 }[]; 9249 emitDecorators: { 9250 name: string; 9251 emitParameters: boolean; 9252 }[]; 9253 syntaxComponents: { 9254 paramsUICallback: string[]; 9255 attrUICallback: { 9256 name: string; 9257 attributes: string[]; 9258 }[]; 9259 }; 9260 } 9261 /** 9262 * Completions request; value of command field is "completions". 9263 * Given a file location (file, line, col) and a prefix (which may 9264 * be the empty string), return the possible completions that 9265 * begin with prefix. 9266 */ 9267 interface CompletionsRequest extends FileLocationRequest { 9268 command: CommandTypes.Completions | CommandTypes.CompletionInfo; 9269 arguments: CompletionsRequestArgs; 9270 } 9271 /** 9272 * Arguments for completion details request. 9273 */ 9274 interface CompletionDetailsRequestArgs extends FileLocationRequestArgs { 9275 /** 9276 * Names of one or more entries for which to obtain details. 9277 */ 9278 entryNames: (string | CompletionEntryIdentifier)[]; 9279 } 9280 interface CompletionEntryIdentifier { 9281 name: string; 9282 source?: string; 9283 data?: unknown; 9284 } 9285 /** 9286 * Completion entry details request; value of command field is 9287 * "completionEntryDetails". Given a file location (file, line, 9288 * col) and an array of completion entry names return more 9289 * detailed information for each completion entry. 9290 */ 9291 interface CompletionDetailsRequest extends FileLocationRequest { 9292 command: CommandTypes.CompletionDetails; 9293 arguments: CompletionDetailsRequestArgs; 9294 } 9295 /** 9296 * Part of a symbol description. 9297 */ 9298 interface SymbolDisplayPart { 9299 /** 9300 * Text of an item describing the symbol. 9301 */ 9302 text: string; 9303 /** 9304 * The symbol's kind (such as 'className' or 'parameterName' or plain 'text'). 9305 */ 9306 kind: string; 9307 } 9308 /** A part of a symbol description that links from a jsdoc @link tag to a declaration */ 9309 interface JSDocLinkDisplayPart extends SymbolDisplayPart { 9310 /** The location of the declaration that the @link tag links to. */ 9311 target: FileSpan; 9312 } 9313 /** 9314 * An item found in a completion response. 9315 */ 9316 interface CompletionEntry { 9317 /** 9318 * The symbol's name. 9319 */ 9320 name: string; 9321 /** 9322 * The symbol's kind (such as 'className' or 'parameterName'). 9323 */ 9324 kind: ScriptElementKind; 9325 /** 9326 * Optional modifiers for the kind (such as 'public'). 9327 */ 9328 kindModifiers?: string; 9329 /** 9330 * A string that is used for comparing completion items so that they can be ordered. This 9331 * is often the same as the name but may be different in certain circumstances. 9332 */ 9333 sortText: string; 9334 /** 9335 * Text to insert instead of `name`. 9336 * This is used to support bracketed completions; If `name` might be "a-b" but `insertText` would be `["a-b"]`, 9337 * coupled with `replacementSpan` to replace a dotted access with a bracket access. 9338 */ 9339 insertText?: string; 9340 /** 9341 * `insertText` should be interpreted as a snippet if true. 9342 */ 9343 isSnippet?: true; 9344 /** 9345 * An optional span that indicates the text to be replaced by this completion item. 9346 * If present, this span should be used instead of the default one. 9347 * It will be set if the required span differs from the one generated by the default replacement behavior. 9348 */ 9349 replacementSpan?: TextSpan; 9350 /** 9351 * Indicates whether commiting this completion entry will require additional code actions to be 9352 * made to avoid errors. The CompletionEntryDetails will have these actions. 9353 */ 9354 hasAction?: true; 9355 /** 9356 * Identifier (not necessarily human-readable) identifying where this completion came from. 9357 */ 9358 source?: string; 9359 /** 9360 * Human-readable description of the `source`. 9361 */ 9362 sourceDisplay?: SymbolDisplayPart[]; 9363 /** 9364 * Additional details for the label. 9365 */ 9366 labelDetails?: CompletionEntryLabelDetails; 9367 /** 9368 * If true, this completion should be highlighted as recommended. There will only be one of these. 9369 * This will be set when we know the user should write an expression with a certain type and that type is an enum or constructable class. 9370 * Then either that enum/class or a namespace containing it will be the recommended symbol. 9371 */ 9372 isRecommended?: true; 9373 /** 9374 * If true, this completion was generated from traversing the name table of an unchecked JS file, 9375 * and therefore may not be accurate. 9376 */ 9377 isFromUncheckedFile?: true; 9378 /** 9379 * If true, this completion was for an auto-import of a module not yet in the program, but listed 9380 * in the project package.json. Used for telemetry reporting. 9381 */ 9382 isPackageJsonImport?: true; 9383 /** 9384 * If true, this completion was an auto-import-style completion of an import statement (i.e., the 9385 * module specifier was inserted along with the imported identifier). Used for telemetry reporting. 9386 */ 9387 isImportStatementCompletion?: true; 9388 /** 9389 * A property to be sent back to TS Server in the CompletionDetailsRequest, along with `name`, 9390 * that allows TS Server to look up the symbol represented by the completion item, disambiguating 9391 * items with the same name. 9392 */ 9393 data?: unknown; 9394 /** 9395 * Js Doc info with symbol. 9396 */ 9397 jsDoc?: JsDocTagInfo[]; 9398 /** 9399 * Displayparts info with symbol. 9400 */ 9401 displayParts?: SymbolDisplayPart[]; 9402 } 9403 interface CompletionEntryLabelDetails { 9404 /** 9405 * An optional string which is rendered less prominently directly after 9406 * {@link CompletionEntry.name name}, without any spacing. Should be 9407 * used for function signatures or type annotations. 9408 */ 9409 detail?: string; 9410 /** 9411 * An optional string which is rendered less prominently after 9412 * {@link CompletionEntryLabelDetails.detail}. Should be used for fully qualified 9413 * names or file path. 9414 */ 9415 description?: string; 9416 } 9417 /** 9418 * Additional completion entry details, available on demand 9419 */ 9420 interface CompletionEntryDetails { 9421 /** 9422 * The symbol's name. 9423 */ 9424 name: string; 9425 /** 9426 * The symbol's kind (such as 'className' or 'parameterName'). 9427 */ 9428 kind: ScriptElementKind; 9429 /** 9430 * Optional modifiers for the kind (such as 'public'). 9431 */ 9432 kindModifiers: string; 9433 /** 9434 * Display parts of the symbol (similar to quick info). 9435 */ 9436 displayParts: SymbolDisplayPart[]; 9437 /** 9438 * Documentation strings for the symbol. 9439 */ 9440 documentation?: SymbolDisplayPart[]; 9441 /** 9442 * JSDoc tags for the symbol. 9443 */ 9444 tags?: JSDocTagInfo[]; 9445 /** 9446 * The associated code actions for this entry 9447 */ 9448 codeActions?: CodeAction[]; 9449 /** 9450 * @deprecated Use `sourceDisplay` instead. 9451 */ 9452 source?: SymbolDisplayPart[]; 9453 /** 9454 * Human-readable description of the `source` from the CompletionEntry. 9455 */ 9456 sourceDisplay?: SymbolDisplayPart[]; 9457 } 9458 /** @deprecated Prefer CompletionInfoResponse, which supports several top-level fields in addition to the array of entries. */ 9459 interface CompletionsResponse extends Response { 9460 body?: CompletionEntry[]; 9461 } 9462 interface CompletionInfoResponse extends Response { 9463 body?: CompletionInfo; 9464 } 9465 interface CompletionInfo { 9466 readonly flags?: number; 9467 readonly isGlobalCompletion: boolean; 9468 readonly isMemberCompletion: boolean; 9469 readonly isNewIdentifierLocation: boolean; 9470 /** 9471 * In the absence of `CompletionEntry["replacementSpan"]`, the editor may choose whether to use 9472 * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span 9473 * must be used to commit that completion entry. 9474 */ 9475 readonly optionalReplacementSpan?: TextSpan; 9476 readonly isIncomplete?: boolean; 9477 readonly entries: readonly CompletionEntry[]; 9478 } 9479 interface CompletionDetailsResponse extends Response { 9480 body?: CompletionEntryDetails[]; 9481 } 9482 /** 9483 * Signature help information for a single parameter 9484 */ 9485 interface SignatureHelpParameter { 9486 /** 9487 * The parameter's name 9488 */ 9489 name: string; 9490 /** 9491 * Documentation of the parameter. 9492 */ 9493 documentation: SymbolDisplayPart[]; 9494 /** 9495 * Display parts of the parameter. 9496 */ 9497 displayParts: SymbolDisplayPart[]; 9498 /** 9499 * Whether the parameter is optional or not. 9500 */ 9501 isOptional: boolean; 9502 } 9503 /** 9504 * Represents a single signature to show in signature help. 9505 */ 9506 interface SignatureHelpItem { 9507 /** 9508 * Whether the signature accepts a variable number of arguments. 9509 */ 9510 isVariadic: boolean; 9511 /** 9512 * The prefix display parts. 9513 */ 9514 prefixDisplayParts: SymbolDisplayPart[]; 9515 /** 9516 * The suffix display parts. 9517 */ 9518 suffixDisplayParts: SymbolDisplayPart[]; 9519 /** 9520 * The separator display parts. 9521 */ 9522 separatorDisplayParts: SymbolDisplayPart[]; 9523 /** 9524 * The signature helps items for the parameters. 9525 */ 9526 parameters: SignatureHelpParameter[]; 9527 /** 9528 * The signature's documentation 9529 */ 9530 documentation: SymbolDisplayPart[]; 9531 /** 9532 * The signature's JSDoc tags 9533 */ 9534 tags: JSDocTagInfo[]; 9535 } 9536 /** 9537 * Signature help items found in the response of a signature help request. 9538 */ 9539 interface SignatureHelpItems { 9540 /** 9541 * The signature help items. 9542 */ 9543 items: SignatureHelpItem[]; 9544 /** 9545 * The span for which signature help should appear on a signature 9546 */ 9547 applicableSpan: TextSpan; 9548 /** 9549 * The item selected in the set of available help items. 9550 */ 9551 selectedItemIndex: number; 9552 /** 9553 * The argument selected in the set of parameters. 9554 */ 9555 argumentIndex: number; 9556 /** 9557 * The argument count 9558 */ 9559 argumentCount: number; 9560 } 9561 type SignatureHelpTriggerCharacter = "," | "(" | "<"; 9562 type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")"; 9563 /** 9564 * Arguments of a signature help request. 9565 */ 9566 interface SignatureHelpRequestArgs extends FileLocationRequestArgs { 9567 /** 9568 * Reason why signature help was invoked. 9569 * See each individual possible 9570 */ 9571 triggerReason?: SignatureHelpTriggerReason; 9572 } 9573 type SignatureHelpTriggerReason = SignatureHelpInvokedReason | SignatureHelpCharacterTypedReason | SignatureHelpRetriggeredReason; 9574 /** 9575 * Signals that the user manually requested signature help. 9576 * The language service will unconditionally attempt to provide a result. 9577 */ 9578 interface SignatureHelpInvokedReason { 9579 kind: "invoked"; 9580 triggerCharacter?: undefined; 9581 } 9582 /** 9583 * Signals that the signature help request came from a user typing a character. 9584 * Depending on the character and the syntactic context, the request may or may not be served a result. 9585 */ 9586 interface SignatureHelpCharacterTypedReason { 9587 kind: "characterTyped"; 9588 /** 9589 * Character that was responsible for triggering signature help. 9590 */ 9591 triggerCharacter: SignatureHelpTriggerCharacter; 9592 } 9593 /** 9594 * Signals that this signature help request came from typing a character or moving the cursor. 9595 * This should only occur if a signature help session was already active and the editor needs to see if it should adjust. 9596 * The language service will unconditionally attempt to provide a result. 9597 * `triggerCharacter` can be `undefined` for a retrigger caused by a cursor move. 9598 */ 9599 interface SignatureHelpRetriggeredReason { 9600 kind: "retrigger"; 9601 /** 9602 * Character that was responsible for triggering signature help. 9603 */ 9604 triggerCharacter?: SignatureHelpRetriggerCharacter; 9605 } 9606 /** 9607 * Signature help request; value of command field is "signatureHelp". 9608 * Given a file location (file, line, col), return the signature 9609 * help. 9610 */ 9611 interface SignatureHelpRequest extends FileLocationRequest { 9612 command: CommandTypes.SignatureHelp; 9613 arguments: SignatureHelpRequestArgs; 9614 } 9615 /** 9616 * Response object for a SignatureHelpRequest. 9617 */ 9618 interface SignatureHelpResponse extends Response { 9619 body?: SignatureHelpItems; 9620 } 9621 type InlayHintKind = "Type" | "Parameter" | "Enum"; 9622 interface InlayHintsRequestArgs extends FileRequestArgs { 9623 /** 9624 * Start position of the span. 9625 */ 9626 start: number; 9627 /** 9628 * Length of the span. 9629 */ 9630 length: number; 9631 } 9632 interface InlayHintsRequest extends Request { 9633 command: CommandTypes.ProvideInlayHints; 9634 arguments: InlayHintsRequestArgs; 9635 } 9636 interface InlayHintItem { 9637 text: string; 9638 position: Location; 9639 kind: InlayHintKind; 9640 whitespaceBefore?: boolean; 9641 whitespaceAfter?: boolean; 9642 } 9643 interface InlayHintsResponse extends Response { 9644 body?: InlayHintItem[]; 9645 } 9646 /** 9647 * Synchronous request for semantic diagnostics of one file. 9648 */ 9649 interface SemanticDiagnosticsSyncRequest extends FileRequest { 9650 command: CommandTypes.SemanticDiagnosticsSync; 9651 arguments: SemanticDiagnosticsSyncRequestArgs; 9652 } 9653 interface SemanticDiagnosticsSyncRequestArgs extends FileRequestArgs { 9654 includeLinePosition?: boolean; 9655 } 9656 /** 9657 * Response object for synchronous sematic diagnostics request. 9658 */ 9659 interface SemanticDiagnosticsSyncResponse extends Response { 9660 body?: Diagnostic[] | DiagnosticWithLinePosition[]; 9661 } 9662 interface SuggestionDiagnosticsSyncRequest extends FileRequest { 9663 command: CommandTypes.SuggestionDiagnosticsSync; 9664 arguments: SuggestionDiagnosticsSyncRequestArgs; 9665 } 9666 type SuggestionDiagnosticsSyncRequestArgs = SemanticDiagnosticsSyncRequestArgs; 9667 type SuggestionDiagnosticsSyncResponse = SemanticDiagnosticsSyncResponse; 9668 /** 9669 * Synchronous request for syntactic diagnostics of one file. 9670 */ 9671 interface SyntacticDiagnosticsSyncRequest extends FileRequest { 9672 command: CommandTypes.SyntacticDiagnosticsSync; 9673 arguments: SyntacticDiagnosticsSyncRequestArgs; 9674 } 9675 interface SyntacticDiagnosticsSyncRequestArgs extends FileRequestArgs { 9676 includeLinePosition?: boolean; 9677 } 9678 /** 9679 * Response object for synchronous syntactic diagnostics request. 9680 */ 9681 interface SyntacticDiagnosticsSyncResponse extends Response { 9682 body?: Diagnostic[] | DiagnosticWithLinePosition[]; 9683 } 9684 /** 9685 * Arguments for GeterrForProject request. 9686 */ 9687 interface GeterrForProjectRequestArgs { 9688 /** 9689 * the file requesting project error list 9690 */ 9691 file: string; 9692 /** 9693 * Delay in milliseconds to wait before starting to compute 9694 * errors for the files in the file list 9695 */ 9696 delay: number; 9697 } 9698 /** 9699 * GeterrForProjectRequest request; value of command field is 9700 * "geterrForProject". It works similarly with 'Geterr', only 9701 * it request for every file in this project. 9702 */ 9703 interface GeterrForProjectRequest extends Request { 9704 command: CommandTypes.GeterrForProject; 9705 arguments: GeterrForProjectRequestArgs; 9706 } 9707 /** 9708 * Arguments for geterr messages. 9709 */ 9710 interface GeterrRequestArgs { 9711 /** 9712 * List of file names for which to compute compiler errors. 9713 * The files will be checked in list order. 9714 */ 9715 files: string[]; 9716 /** 9717 * Delay in milliseconds to wait before starting to compute 9718 * errors for the files in the file list 9719 */ 9720 delay: number; 9721 } 9722 /** 9723 * Geterr request; value of command field is "geterr". Wait for 9724 * delay milliseconds and then, if during the wait no change or 9725 * reload messages have arrived for the first file in the files 9726 * list, get the syntactic errors for the file, field requests, 9727 * and then get the semantic errors for the file. Repeat with a 9728 * smaller delay for each subsequent file on the files list. Best 9729 * practice for an editor is to send a file list containing each 9730 * file that is currently visible, in most-recently-used order. 9731 */ 9732 interface GeterrRequest extends Request { 9733 command: CommandTypes.Geterr; 9734 arguments: GeterrRequestArgs; 9735 } 9736 type RequestCompletedEventName = "requestCompleted"; 9737 /** 9738 * Event that is sent when server have finished processing request with specified id. 9739 */ 9740 interface RequestCompletedEvent extends Event { 9741 event: RequestCompletedEventName; 9742 body: RequestCompletedEventBody; 9743 } 9744 interface RequestCompletedEventBody { 9745 request_seq: number; 9746 } 9747 /** 9748 * Item of diagnostic information found in a DiagnosticEvent message. 9749 */ 9750 interface Diagnostic { 9751 /** 9752 * Starting file location at which text applies. 9753 */ 9754 start: Location; 9755 /** 9756 * The last file location at which the text applies. 9757 */ 9758 end: Location; 9759 /** 9760 * Text of diagnostic message. 9761 */ 9762 text: string; 9763 /** 9764 * The category of the diagnostic message, e.g. "error", "warning", or "suggestion". 9765 */ 9766 category: string; 9767 reportsUnnecessary?: {}; 9768 reportsDeprecated?: {}; 9769 /** 9770 * Any related spans the diagnostic may have, such as other locations relevant to an error, such as declarartion sites 9771 */ 9772 relatedInformation?: DiagnosticRelatedInformation[]; 9773 /** 9774 * The error code of the diagnostic message. 9775 */ 9776 code?: number; 9777 /** 9778 * The name of the plugin reporting the message. 9779 */ 9780 source?: string; 9781 } 9782 interface DiagnosticWithFileName extends Diagnostic { 9783 /** 9784 * Name of the file the diagnostic is in 9785 */ 9786 fileName: string; 9787 } 9788 /** 9789 * Represents additional spans returned with a diagnostic which are relevant to it 9790 */ 9791 interface DiagnosticRelatedInformation { 9792 /** 9793 * The category of the related information message, e.g. "error", "warning", or "suggestion". 9794 */ 9795 category: string; 9796 /** 9797 * The code used ot identify the related information 9798 */ 9799 code: number; 9800 /** 9801 * Text of related or additional information. 9802 */ 9803 message: string; 9804 /** 9805 * Associated location 9806 */ 9807 span?: FileSpan; 9808 } 9809 interface DiagnosticEventBody { 9810 /** 9811 * The file for which diagnostic information is reported. 9812 */ 9813 file: string; 9814 /** 9815 * An array of diagnostic information items. 9816 */ 9817 diagnostics: Diagnostic[]; 9818 } 9819 type DiagnosticEventKind = "semanticDiag" | "syntaxDiag" | "suggestionDiag"; 9820 /** 9821 * Event message for DiagnosticEventKind event types. 9822 * These events provide syntactic and semantic errors for a file. 9823 */ 9824 interface DiagnosticEvent extends Event { 9825 body?: DiagnosticEventBody; 9826 event: DiagnosticEventKind; 9827 } 9828 interface ConfigFileDiagnosticEventBody { 9829 /** 9830 * The file which trigged the searching and error-checking of the config file 9831 */ 9832 triggerFile: string; 9833 /** 9834 * The name of the found config file. 9835 */ 9836 configFile: string; 9837 /** 9838 * An arry of diagnostic information items for the found config file. 9839 */ 9840 diagnostics: DiagnosticWithFileName[]; 9841 } 9842 /** 9843 * Event message for "configFileDiag" event type. 9844 * This event provides errors for a found config file. 9845 */ 9846 interface ConfigFileDiagnosticEvent extends Event { 9847 body?: ConfigFileDiagnosticEventBody; 9848 event: "configFileDiag"; 9849 } 9850 type ProjectLanguageServiceStateEventName = "projectLanguageServiceState"; 9851 interface ProjectLanguageServiceStateEvent extends Event { 9852 event: ProjectLanguageServiceStateEventName; 9853 body?: ProjectLanguageServiceStateEventBody; 9854 } 9855 interface ProjectLanguageServiceStateEventBody { 9856 /** 9857 * Project name that has changes in the state of language service. 9858 * For configured projects this will be the config file path. 9859 * For external projects this will be the name of the projects specified when project was open. 9860 * For inferred projects this event is not raised. 9861 */ 9862 projectName: string; 9863 /** 9864 * True if language service state switched from disabled to enabled 9865 * and false otherwise. 9866 */ 9867 languageServiceEnabled: boolean; 9868 } 9869 type ProjectsUpdatedInBackgroundEventName = "projectsUpdatedInBackground"; 9870 interface ProjectsUpdatedInBackgroundEvent extends Event { 9871 event: ProjectsUpdatedInBackgroundEventName; 9872 body: ProjectsUpdatedInBackgroundEventBody; 9873 } 9874 interface ProjectsUpdatedInBackgroundEventBody { 9875 /** 9876 * Current set of open files 9877 */ 9878 openFiles: string[]; 9879 } 9880 type ProjectLoadingStartEventName = "projectLoadingStart"; 9881 interface ProjectLoadingStartEvent extends Event { 9882 event: ProjectLoadingStartEventName; 9883 body: ProjectLoadingStartEventBody; 9884 } 9885 interface ProjectLoadingStartEventBody { 9886 /** name of the project */ 9887 projectName: string; 9888 /** reason for loading */ 9889 reason: string; 9890 } 9891 type ProjectLoadingFinishEventName = "projectLoadingFinish"; 9892 interface ProjectLoadingFinishEvent extends Event { 9893 event: ProjectLoadingFinishEventName; 9894 body: ProjectLoadingFinishEventBody; 9895 } 9896 interface ProjectLoadingFinishEventBody { 9897 /** name of the project */ 9898 projectName: string; 9899 } 9900 type SurveyReadyEventName = "surveyReady"; 9901 interface SurveyReadyEvent extends Event { 9902 event: SurveyReadyEventName; 9903 body: SurveyReadyEventBody; 9904 } 9905 interface SurveyReadyEventBody { 9906 /** Name of the survey. This is an internal machine- and programmer-friendly name */ 9907 surveyId: string; 9908 } 9909 type LargeFileReferencedEventName = "largeFileReferenced"; 9910 interface LargeFileReferencedEvent extends Event { 9911 event: LargeFileReferencedEventName; 9912 body: LargeFileReferencedEventBody; 9913 } 9914 interface LargeFileReferencedEventBody { 9915 /** 9916 * name of the large file being loaded 9917 */ 9918 file: string; 9919 /** 9920 * size of the file 9921 */ 9922 fileSize: number; 9923 /** 9924 * max file size allowed on the server 9925 */ 9926 maxFileSize: number; 9927 } 9928 /** 9929 * Arguments for reload request. 9930 */ 9931 interface ReloadRequestArgs extends FileRequestArgs { 9932 /** 9933 * Name of temporary file from which to reload file 9934 * contents. May be same as file. 9935 */ 9936 tmpfile: string; 9937 } 9938 /** 9939 * Reload request message; value of command field is "reload". 9940 * Reload contents of file with name given by the 'file' argument 9941 * from temporary file with name given by the 'tmpfile' argument. 9942 * The two names can be identical. 9943 */ 9944 interface ReloadRequest extends FileRequest { 9945 command: CommandTypes.Reload; 9946 arguments: ReloadRequestArgs; 9947 } 9948 /** 9949 * Response to "reload" request. This is just an acknowledgement, so 9950 * no body field is required. 9951 */ 9952 interface ReloadResponse extends Response { 9953 } 9954 /** 9955 * Arguments for saveto request. 9956 */ 9957 interface SavetoRequestArgs extends FileRequestArgs { 9958 /** 9959 * Name of temporary file into which to save server's view of 9960 * file contents. 9961 */ 9962 tmpfile: string; 9963 } 9964 /** 9965 * Saveto request message; value of command field is "saveto". 9966 * For debugging purposes, save to a temporaryfile (named by 9967 * argument 'tmpfile') the contents of file named by argument 9968 * 'file'. The server does not currently send a response to a 9969 * "saveto" request. 9970 */ 9971 interface SavetoRequest extends FileRequest { 9972 command: CommandTypes.Saveto; 9973 arguments: SavetoRequestArgs; 9974 } 9975 /** 9976 * Arguments for navto request message. 9977 */ 9978 interface NavtoRequestArgs { 9979 /** 9980 * Search term to navigate to from current location; term can 9981 * be '.*' or an identifier prefix. 9982 */ 9983 searchValue: string; 9984 /** 9985 * Optional limit on the number of items to return. 9986 */ 9987 maxResultCount?: number; 9988 /** 9989 * The file for the request (absolute pathname required). 9990 */ 9991 file?: string; 9992 /** 9993 * Optional flag to indicate we want results for just the current file 9994 * or the entire project. 9995 */ 9996 currentFileOnly?: boolean; 9997 projectFileName?: string; 9998 } 9999 /** 10000 * Navto request message; value of command field is "navto". 10001 * Return list of objects giving file locations and symbols that 10002 * match the search term given in argument 'searchTerm'. The 10003 * context for the search is given by the named file. 10004 */ 10005 interface NavtoRequest extends Request { 10006 command: CommandTypes.Navto; 10007 arguments: NavtoRequestArgs; 10008 } 10009 /** 10010 * An item found in a navto response. 10011 */ 10012 interface NavtoItem extends FileSpan { 10013 /** 10014 * The symbol's name. 10015 */ 10016 name: string; 10017 /** 10018 * The symbol's kind (such as 'className' or 'parameterName'). 10019 */ 10020 kind: ScriptElementKind; 10021 /** 10022 * exact, substring, or prefix. 10023 */ 10024 matchKind: string; 10025 /** 10026 * If this was a case sensitive or insensitive match. 10027 */ 10028 isCaseSensitive: boolean; 10029 /** 10030 * Optional modifiers for the kind (such as 'public'). 10031 */ 10032 kindModifiers?: string; 10033 /** 10034 * Name of symbol's container symbol (if any); for example, 10035 * the class name if symbol is a class member. 10036 */ 10037 containerName?: string; 10038 /** 10039 * Kind of symbol's container symbol (if any). 10040 */ 10041 containerKind?: ScriptElementKind; 10042 } 10043 /** 10044 * Navto response message. Body is an array of navto items. Each 10045 * item gives a symbol that matched the search term. 10046 */ 10047 interface NavtoResponse extends Response { 10048 body?: NavtoItem[]; 10049 } 10050 /** 10051 * Arguments for change request message. 10052 */ 10053 interface ChangeRequestArgs extends FormatRequestArgs { 10054 /** 10055 * Optional string to insert at location (file, line, offset). 10056 */ 10057 insertString?: string; 10058 } 10059 /** 10060 * Change request message; value of command field is "change". 10061 * Update the server's view of the file named by argument 'file'. 10062 * Server does not currently send a response to a change request. 10063 */ 10064 interface ChangeRequest extends FileLocationRequest { 10065 command: CommandTypes.Change; 10066 arguments: ChangeRequestArgs; 10067 } 10068 /** 10069 * Response to "brace" request. 10070 */ 10071 interface BraceResponse extends Response { 10072 body?: TextSpan[]; 10073 } 10074 /** 10075 * Brace matching request; value of command field is "brace". 10076 * Return response giving the file locations of matching braces 10077 * found in file at location line, offset. 10078 */ 10079 interface BraceRequest extends FileLocationRequest { 10080 command: CommandTypes.Brace; 10081 } 10082 /** 10083 * NavBar items request; value of command field is "navbar". 10084 * Return response giving the list of navigation bar entries 10085 * extracted from the requested file. 10086 */ 10087 interface NavBarRequest extends FileRequest { 10088 command: CommandTypes.NavBar; 10089 } 10090 /** 10091 * NavTree request; value of command field is "navtree". 10092 * Return response giving the navigation tree of the requested file. 10093 */ 10094 interface NavTreeRequest extends FileRequest { 10095 command: CommandTypes.NavTree; 10096 } 10097 interface NavigationBarItem { 10098 /** 10099 * The item's display text. 10100 */ 10101 text: string; 10102 /** 10103 * The symbol's kind (such as 'className' or 'parameterName'). 10104 */ 10105 kind: ScriptElementKind; 10106 /** 10107 * Optional modifiers for the kind (such as 'public'). 10108 */ 10109 kindModifiers?: string; 10110 /** 10111 * The definition locations of the item. 10112 */ 10113 spans: TextSpan[]; 10114 /** 10115 * Optional children. 10116 */ 10117 childItems?: NavigationBarItem[]; 10118 /** 10119 * Number of levels deep this item should appear. 10120 */ 10121 indent: number; 10122 } 10123 /** protocol.NavigationTree is identical to ts.NavigationTree, except using protocol.TextSpan instead of ts.TextSpan */ 10124 interface NavigationTree { 10125 text: string; 10126 kind: ScriptElementKind; 10127 kindModifiers: string; 10128 spans: TextSpan[]; 10129 nameSpan: TextSpan | undefined; 10130 childItems?: NavigationTree[]; 10131 } 10132 type TelemetryEventName = "telemetry"; 10133 interface TelemetryEvent extends Event { 10134 event: TelemetryEventName; 10135 body: TelemetryEventBody; 10136 } 10137 interface TelemetryEventBody { 10138 telemetryEventName: string; 10139 payload: any; 10140 } 10141 type TypesInstallerInitializationFailedEventName = "typesInstallerInitializationFailed"; 10142 interface TypesInstallerInitializationFailedEvent extends Event { 10143 event: TypesInstallerInitializationFailedEventName; 10144 body: TypesInstallerInitializationFailedEventBody; 10145 } 10146 interface TypesInstallerInitializationFailedEventBody { 10147 message: string; 10148 } 10149 type TypingsInstalledTelemetryEventName = "typingsInstalled"; 10150 interface TypingsInstalledTelemetryEventBody extends TelemetryEventBody { 10151 telemetryEventName: TypingsInstalledTelemetryEventName; 10152 payload: TypingsInstalledTelemetryEventPayload; 10153 } 10154 interface TypingsInstalledTelemetryEventPayload { 10155 /** 10156 * Comma separated list of installed typing packages 10157 */ 10158 installedPackages: string; 10159 /** 10160 * true if install request succeeded, otherwise - false 10161 */ 10162 installSuccess: boolean; 10163 /** 10164 * version of typings installer 10165 */ 10166 typingsInstallerVersion: string; 10167 } 10168 type BeginInstallTypesEventName = "beginInstallTypes"; 10169 type EndInstallTypesEventName = "endInstallTypes"; 10170 interface BeginInstallTypesEvent extends Event { 10171 event: BeginInstallTypesEventName; 10172 body: BeginInstallTypesEventBody; 10173 } 10174 interface EndInstallTypesEvent extends Event { 10175 event: EndInstallTypesEventName; 10176 body: EndInstallTypesEventBody; 10177 } 10178 interface InstallTypesEventBody { 10179 /** 10180 * correlation id to match begin and end events 10181 */ 10182 eventId: number; 10183 /** 10184 * list of packages to install 10185 */ 10186 packages: readonly string[]; 10187 } 10188 interface BeginInstallTypesEventBody extends InstallTypesEventBody { 10189 } 10190 interface EndInstallTypesEventBody extends InstallTypesEventBody { 10191 /** 10192 * true if installation succeeded, otherwise false 10193 */ 10194 success: boolean; 10195 } 10196 interface NavBarResponse extends Response { 10197 body?: NavigationBarItem[]; 10198 } 10199 interface NavTreeResponse extends Response { 10200 body?: NavigationTree; 10201 } 10202 interface CallHierarchyItem { 10203 name: string; 10204 kind: ScriptElementKind; 10205 kindModifiers?: string; 10206 file: string; 10207 span: TextSpan; 10208 selectionSpan: TextSpan; 10209 containerName?: string; 10210 } 10211 interface CallHierarchyIncomingCall { 10212 from: CallHierarchyItem; 10213 fromSpans: TextSpan[]; 10214 } 10215 interface CallHierarchyOutgoingCall { 10216 to: CallHierarchyItem; 10217 fromSpans: TextSpan[]; 10218 } 10219 interface PrepareCallHierarchyRequest extends FileLocationRequest { 10220 command: CommandTypes.PrepareCallHierarchy; 10221 } 10222 interface PrepareCallHierarchyResponse extends Response { 10223 readonly body: CallHierarchyItem | CallHierarchyItem[]; 10224 } 10225 interface ProvideCallHierarchyIncomingCallsRequest extends FileLocationRequest { 10226 command: CommandTypes.ProvideCallHierarchyIncomingCalls; 10227 } 10228 interface ProvideCallHierarchyIncomingCallsResponse extends Response { 10229 readonly body: CallHierarchyIncomingCall[]; 10230 } 10231 interface ProvideCallHierarchyOutgoingCallsRequest extends FileLocationRequest { 10232 command: CommandTypes.ProvideCallHierarchyOutgoingCalls; 10233 } 10234 interface ProvideCallHierarchyOutgoingCallsResponse extends Response { 10235 readonly body: CallHierarchyOutgoingCall[]; 10236 } 10237 enum IndentStyle { 10238 None = "None", 10239 Block = "Block", 10240 Smart = "Smart" 10241 } 10242 enum SemicolonPreference { 10243 Ignore = "ignore", 10244 Insert = "insert", 10245 Remove = "remove" 10246 } 10247 interface EditorSettings { 10248 baseIndentSize?: number; 10249 indentSize?: number; 10250 tabSize?: number; 10251 newLineCharacter?: string; 10252 convertTabsToSpaces?: boolean; 10253 indentStyle?: IndentStyle | ts.IndentStyle; 10254 trimTrailingWhitespace?: boolean; 10255 } 10256 interface FormatCodeSettings extends EditorSettings { 10257 insertSpaceAfterCommaDelimiter?: boolean; 10258 insertSpaceAfterSemicolonInForStatements?: boolean; 10259 insertSpaceBeforeAndAfterBinaryOperators?: boolean; 10260 insertSpaceAfterConstructor?: boolean; 10261 insertSpaceAfterKeywordsInControlFlowStatements?: boolean; 10262 insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean; 10263 insertSpaceAfterOpeningAndBeforeClosingEmptyBraces?: boolean; 10264 insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean; 10265 insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean; 10266 insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean; 10267 insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean; 10268 insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean; 10269 insertSpaceAfterTypeAssertion?: boolean; 10270 insertSpaceBeforeFunctionParenthesis?: boolean; 10271 placeOpenBraceOnNewLineForFunctions?: boolean; 10272 placeOpenBraceOnNewLineForControlBlocks?: boolean; 10273 insertSpaceBeforeTypeAnnotation?: boolean; 10274 semicolons?: SemicolonPreference; 10275 } 10276 interface UserPreferences { 10277 readonly disableSuggestions?: boolean; 10278 readonly quotePreference?: "auto" | "double" | "single"; 10279 /** 10280 * If enabled, TypeScript will search through all external modules' exports and add them to the completions list. 10281 * This affects lone identifier completions but not completions on the right hand side of `obj.`. 10282 */ 10283 readonly includeCompletionsForModuleExports?: boolean; 10284 /** 10285 * Enables auto-import-style completions on partially-typed import statements. E.g., allows 10286 * `import write|` to be completed to `import { writeFile } from "fs"`. 10287 */ 10288 readonly includeCompletionsForImportStatements?: boolean; 10289 /** 10290 * Allows completions to be formatted with snippet text, indicated by `CompletionItem["isSnippet"]`. 10291 */ 10292 readonly includeCompletionsWithSnippetText?: boolean; 10293 /** 10294 * If enabled, the completion list will include completions with invalid identifier names. 10295 * For those entries, The `insertText` and `replacementSpan` properties will be set to change from `.x` property access to `["x"]`. 10296 */ 10297 readonly includeCompletionsWithInsertText?: boolean; 10298 /** 10299 * Unless this option is `false`, or `includeCompletionsWithInsertText` is not enabled, 10300 * member completion lists triggered with `.` will include entries on potentially-null and potentially-undefined 10301 * values, with insertion text to replace preceding `.` tokens with `?.`. 10302 */ 10303 readonly includeAutomaticOptionalChainCompletions?: boolean; 10304 /** 10305 * If enabled, completions for class members (e.g. methods and properties) will include 10306 * a whole declaration for the member. 10307 * E.g., `class A { f| }` could be completed to `class A { foo(): number {} }`, instead of 10308 * `class A { foo }`. 10309 */ 10310 readonly includeCompletionsWithClassMemberSnippets?: boolean; 10311 /** 10312 * If enabled, object literal methods will have a method declaration completion entry in addition 10313 * to the regular completion entry containing just the method name. 10314 * E.g., `const objectLiteral: T = { f| }` could be completed to `const objectLiteral: T = { foo(): void {} }`, 10315 * in addition to `const objectLiteral: T = { foo }`. 10316 */ 10317 readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean; 10318 /** 10319 * Indicates whether {@link CompletionEntry.labelDetails completion entry label details} are supported. 10320 * If not, contents of `labelDetails` may be included in the {@link CompletionEntry.name} property. 10321 */ 10322 readonly useLabelDetailsInCompletionEntries?: boolean; 10323 readonly allowIncompleteCompletions?: boolean; 10324 readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative"; 10325 /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ 10326 readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; 10327 readonly allowTextChangesInNewFiles?: boolean; 10328 readonly lazyConfiguredProjectsFromExternalProject?: boolean; 10329 readonly providePrefixAndSuffixTextForRename?: boolean; 10330 readonly provideRefactorNotApplicableReason?: boolean; 10331 readonly allowRenameOfImportPath?: boolean; 10332 readonly includePackageJsonAutoImports?: "auto" | "on" | "off"; 10333 readonly jsxAttributeCompletionStyle?: "auto" | "braces" | "none"; 10334 readonly displayPartsForJSDoc?: boolean; 10335 readonly generateReturnInDocTemplate?: boolean; 10336 readonly includeInlayParameterNameHints?: "none" | "literals" | "all"; 10337 readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean; 10338 readonly includeInlayFunctionParameterTypeHints?: boolean; 10339 readonly includeInlayVariableTypeHints?: boolean; 10340 readonly includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean; 10341 readonly includeInlayPropertyDeclarationTypeHints?: boolean; 10342 readonly includeInlayFunctionLikeReturnTypeHints?: boolean; 10343 readonly includeInlayEnumMemberValueHints?: boolean; 10344 readonly autoImportFileExcludePatterns?: string[]; 10345 /** 10346 * Indicates whether {@link ReferencesResponseItem.lineText} is supported. 10347 */ 10348 readonly disableLineTextInReferences?: boolean; 10349 } 10350 interface CompilerOptions { 10351 allowJs?: boolean; 10352 allowSyntheticDefaultImports?: boolean; 10353 allowUnreachableCode?: boolean; 10354 allowUnusedLabels?: boolean; 10355 alwaysStrict?: boolean; 10356 baseUrl?: string; 10357 charset?: string; 10358 checkJs?: boolean; 10359 declaration?: boolean; 10360 declarationDir?: string; 10361 disableSizeLimit?: boolean; 10362 downlevelIteration?: boolean; 10363 emitBOM?: boolean; 10364 emitDecoratorMetadata?: boolean; 10365 experimentalDecorators?: boolean; 10366 forceConsistentCasingInFileNames?: boolean; 10367 importHelpers?: boolean; 10368 inlineSourceMap?: boolean; 10369 inlineSources?: boolean; 10370 isolatedModules?: boolean; 10371 jsx?: JsxEmit | ts.JsxEmit; 10372 lib?: string[]; 10373 locale?: string; 10374 mapRoot?: string; 10375 maxNodeModuleJsDepth?: number; 10376 module?: ModuleKind | ts.ModuleKind; 10377 moduleResolution?: ModuleResolutionKind | ts.ModuleResolutionKind; 10378 newLine?: NewLineKind | ts.NewLineKind; 10379 noEmit?: boolean; 10380 noEmitHelpers?: boolean; 10381 noEmitOnError?: boolean; 10382 noErrorTruncation?: boolean; 10383 noFallthroughCasesInSwitch?: boolean; 10384 noImplicitAny?: boolean; 10385 noImplicitReturns?: boolean; 10386 noImplicitThis?: boolean; 10387 noUnusedLocals?: boolean; 10388 noUnusedParameters?: boolean; 10389 noImplicitUseStrict?: boolean; 10390 noLib?: boolean; 10391 noResolve?: boolean; 10392 out?: string; 10393 outDir?: string; 10394 outFile?: string; 10395 paths?: MapLike<string[]>; 10396 plugins?: PluginImport[]; 10397 preserveConstEnums?: boolean; 10398 preserveSymlinks?: boolean; 10399 project?: string; 10400 reactNamespace?: string; 10401 removeComments?: boolean; 10402 references?: ProjectReference[]; 10403 rootDir?: string; 10404 rootDirs?: string[]; 10405 skipLibCheck?: boolean; 10406 skipDefaultLibCheck?: boolean; 10407 sourceMap?: boolean; 10408 sourceRoot?: string; 10409 strict?: boolean; 10410 strictNullChecks?: boolean; 10411 suppressExcessPropertyErrors?: boolean; 10412 suppressImplicitAnyIndexErrors?: boolean; 10413 useDefineForClassFields?: boolean; 10414 target?: ScriptTarget | ts.ScriptTarget; 10415 traceResolution?: boolean; 10416 resolveJsonModule?: boolean; 10417 types?: string[]; 10418 /** Paths used to used to compute primary types search locations */ 10419 typeRoots?: string[]; 10420 ets?: EtsOptions; 10421 packageManagerType?: string; 10422 emitNodeModulesFiles?: boolean; 10423 [option: string]: CompilerOptionsValue | undefined; 10424 } 10425 enum JsxEmit { 10426 None = "None", 10427 Preserve = "Preserve", 10428 ReactNative = "ReactNative", 10429 React = "React" 10430 } 10431 enum ModuleKind { 10432 None = "None", 10433 CommonJS = "CommonJS", 10434 AMD = "AMD", 10435 UMD = "UMD", 10436 System = "System", 10437 ES6 = "ES6", 10438 ES2015 = "ES2015", 10439 ESNext = "ESNext" 10440 } 10441 enum ModuleResolutionKind { 10442 Classic = "Classic", 10443 Node = "Node" 10444 } 10445 enum NewLineKind { 10446 Crlf = "Crlf", 10447 Lf = "Lf" 10448 } 10449 enum ScriptTarget { 10450 ES3 = "ES3", 10451 ES5 = "ES5", 10452 ES6 = "ES6", 10453 ES2015 = "ES2015", 10454 ES2016 = "ES2016", 10455 ES2017 = "ES2017", 10456 ES2018 = "ES2018", 10457 ES2019 = "ES2019", 10458 ES2020 = "ES2020", 10459 ES2021 = "ES2021", 10460 ES2022 = "ES2022", 10461 ESNext = "ESNext" 10462 } 10463 enum ClassificationType { 10464 comment = 1, 10465 identifier = 2, 10466 keyword = 3, 10467 numericLiteral = 4, 10468 operator = 5, 10469 stringLiteral = 6, 10470 regularExpressionLiteral = 7, 10471 whiteSpace = 8, 10472 text = 9, 10473 punctuation = 10, 10474 className = 11, 10475 enumName = 12, 10476 interfaceName = 13, 10477 moduleName = 14, 10478 typeParameterName = 15, 10479 typeAliasName = 16, 10480 parameterName = 17, 10481 docCommentTagName = 18, 10482 jsxOpenTagName = 19, 10483 jsxCloseTagName = 20, 10484 jsxSelfClosingTagName = 21, 10485 jsxAttribute = 22, 10486 jsxText = 23, 10487 jsxAttributeStringLiteralValue = 24, 10488 bigintLiteral = 25 10489 } 10490} 10491declare namespace ts.server { 10492 interface ScriptInfoVersion { 10493 svc: number; 10494 text: number; 10495 } 10496 function isDynamicFileName(fileName: NormalizedPath): boolean; 10497 class ScriptInfo { 10498 private readonly host; 10499 readonly fileName: NormalizedPath; 10500 readonly scriptKind: ScriptKind; 10501 readonly hasMixedContent: boolean; 10502 readonly path: Path; 10503 /** 10504 * All projects that include this file 10505 */ 10506 readonly containingProjects: Project[]; 10507 private formatSettings; 10508 private preferences; 10509 private textStorage; 10510 constructor(host: ServerHost, fileName: NormalizedPath, scriptKind: ScriptKind, hasMixedContent: boolean, path: Path, initialVersion?: ScriptInfoVersion); 10511 isScriptOpen(): boolean; 10512 open(newText: string): void; 10513 close(fileExists?: boolean): void; 10514 getSnapshot(): IScriptSnapshot; 10515 private ensureRealPath; 10516 getFormatCodeSettings(): FormatCodeSettings | undefined; 10517 getPreferences(): protocol.UserPreferences | undefined; 10518 attachToProject(project: Project): boolean; 10519 isAttached(project: Project): boolean; 10520 detachFromProject(project: Project): void; 10521 detachAllProjects(): void; 10522 getDefaultProject(): Project; 10523 registerFileUpdate(): void; 10524 setOptions(formatSettings: FormatCodeSettings, preferences: protocol.UserPreferences | undefined): void; 10525 getLatestVersion(): string; 10526 saveTo(fileName: string): void; 10527 reloadFromFile(tempFileName?: NormalizedPath): boolean; 10528 editContent(start: number, end: number, newText: string): void; 10529 markContainingProjectsAsDirty(): void; 10530 isOrphan(): boolean; 10531 /** 10532 * @param line 1 based index 10533 */ 10534 lineToTextSpan(line: number): TextSpan; 10535 /** 10536 * @param line 1 based index 10537 * @param offset 1 based index 10538 */ 10539 lineOffsetToPosition(line: number, offset: number): number; 10540 positionToLineOffset(position: number): protocol.Location; 10541 isJavaScript(): boolean; 10542 } 10543} 10544declare namespace ts.server { 10545 interface InstallPackageOptionsWithProject extends InstallPackageOptions { 10546 projectName: string; 10547 projectRootPath: Path; 10548 } 10549 interface ITypingsInstaller { 10550 isKnownTypesPackageName(name: string): boolean; 10551 installPackage(options: InstallPackageOptionsWithProject): Promise<ApplyCodeActionCommandResult>; 10552 enqueueInstallTypingsRequest(p: Project, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray<string> | undefined): void; 10553 attach(projectService: ProjectService): void; 10554 onProjectClosed(p: Project): void; 10555 readonly globalTypingsCacheLocation: string | undefined; 10556 } 10557 const nullTypingsInstaller: ITypingsInstaller; 10558} 10559declare namespace ts.server { 10560 enum ProjectKind { 10561 Inferred = 0, 10562 Configured = 1, 10563 External = 2, 10564 AutoImportProvider = 3, 10565 Auxiliary = 4 10566 } 10567 function allRootFilesAreJsOrDts(project: Project): boolean; 10568 function allFilesAreJsOrDts(project: Project): boolean; 10569 interface PluginCreateInfo { 10570 project: Project; 10571 languageService: LanguageService; 10572 languageServiceHost: LanguageServiceHost; 10573 serverHost: ServerHost; 10574 session?: Session<unknown>; 10575 config: any; 10576 } 10577 interface PluginModule { 10578 create(createInfo: PluginCreateInfo): LanguageService; 10579 getExternalFiles?(proj: Project): string[]; 10580 onConfigurationChanged?(config: any): void; 10581 } 10582 interface PluginModuleWithName { 10583 name: string; 10584 module: PluginModule; 10585 } 10586 type PluginModuleFactory = (mod: { 10587 typescript: typeof ts; 10588 }) => PluginModule; 10589 abstract class Project implements LanguageServiceHost, ModuleResolutionHost { 10590 readonly projectName: string; 10591 readonly projectKind: ProjectKind; 10592 readonly projectService: ProjectService; 10593 private documentRegistry; 10594 private compilerOptions; 10595 compileOnSaveEnabled: boolean; 10596 protected watchOptions: WatchOptions | undefined; 10597 private rootFiles; 10598 private rootFilesMap; 10599 private program; 10600 private externalFiles; 10601 private missingFilesMap; 10602 private generatedFilesMap; 10603 protected languageService: LanguageService; 10604 languageServiceEnabled: boolean; 10605 readonly trace?: (s: string) => void; 10606 readonly realpath?: (path: string) => string; 10607 private builderState; 10608 /** 10609 * Set of files names that were updated since the last call to getChangesSinceVersion. 10610 */ 10611 private updatedFileNames; 10612 /** 10613 * Set of files that was returned from the last call to getChangesSinceVersion. 10614 */ 10615 private lastReportedFileNames; 10616 /** 10617 * Last version that was reported. 10618 */ 10619 private lastReportedVersion; 10620 /** 10621 * Current project's program version. (incremented everytime new program is created that is not complete reuse from the old one) 10622 * This property is changed in 'updateGraph' based on the set of files in program 10623 */ 10624 private projectProgramVersion; 10625 /** 10626 * Current version of the project state. It is changed when: 10627 * - new root file was added/removed 10628 * - edit happen in some file that is currently included in the project. 10629 * This property is different from projectStructureVersion since in most cases edits don't affect set of files in the project 10630 */ 10631 private projectStateVersion; 10632 protected projectErrors: Diagnostic[] | undefined; 10633 protected isInitialLoadPending: () => boolean; 10634 private readonly cancellationToken; 10635 isNonTsProject(): boolean; 10636 isJsOnlyProject(): boolean; 10637 static resolveModule(moduleName: string, initialDir: string, host: ServerHost, log: (message: string) => void, logErrors?: (message: string) => void): {} | undefined; 10638 getFileCheckedModuleInfo?(containFilePath: string): FileCheckModuleInfo; 10639 getJsDocNodeCheckedConfig(jsDocFileCheckedInfo: FileCheckModuleInfo, sourceFilePath: string): JsDocNodeCheckConfig; 10640 getJsDocNodeConditionCheckedResult(jsDocFileCheckedInfo: FileCheckModuleInfo, jsDocs: JsDocTagInfo[]): ConditionCheckResult; 10641 getTagNameNeededCheckByFile(filePath: string): TagCheckParam; 10642 getExpressionCheckedResultsByFile?(filePath: string, jsDocs: JSDoc[]): ConditionCheckResult; 10643 isKnownTypesPackageName(name: string): boolean; 10644 installPackage(options: InstallPackageOptions): Promise<ApplyCodeActionCommandResult>; 10645 private get typingsCache(); 10646 getCompilationSettings(): CompilerOptions; 10647 getCompilerOptions(): CompilerOptions; 10648 getNewLine(): string; 10649 getProjectVersion(): string; 10650 getProjectReferences(): readonly ProjectReference[] | undefined; 10651 getScriptFileNames(): string[]; 10652 private getOrCreateScriptInfoAndAttachToProject; 10653 getScriptKind(fileName: string): ScriptKind; 10654 getScriptVersion(filename: string): string; 10655 getScriptSnapshot(filename: string): IScriptSnapshot | undefined; 10656 getCancellationToken(): HostCancellationToken; 10657 getCurrentDirectory(): string; 10658 getDefaultLibFileName(): string; 10659 useCaseSensitiveFileNames(): boolean; 10660 readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; 10661 readFile(fileName: string): string | undefined; 10662 writeFile(fileName: string, content: string): void; 10663 fileExists(file: string): boolean; 10664 resolveModuleNames(moduleNames: string[], containingFile: string, reusedNames?: string[], redirectedReference?: ResolvedProjectReference, _options?: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModuleFull | undefined)[]; 10665 getModuleResolutionCache(): ModuleResolutionCache | undefined; 10666 getResolvedModuleWithFailedLookupLocationsFromCache(moduleName: string, containingFile: string, resolutionMode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations | undefined; 10667 resolveTypeReferenceDirectives(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference?: ResolvedProjectReference, _options?: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined): (ResolvedTypeReferenceDirective | undefined)[]; 10668 directoryExists(path: string): boolean; 10669 getDirectories(path: string): string[]; 10670 log(s: string): void; 10671 error(s: string): void; 10672 private setInternalCompilerOptionsForEmittingJsFiles; 10673 /** 10674 * Get the errors that dont have any file name associated 10675 */ 10676 getGlobalProjectErrors(): readonly Diagnostic[]; 10677 /** 10678 * Get all the project errors 10679 */ 10680 getAllProjectErrors(): readonly Diagnostic[]; 10681 setProjectErrors(projectErrors: Diagnostic[] | undefined): void; 10682 getLanguageService(ensureSynchronized?: boolean): LanguageService; 10683 getCompileOnSaveAffectedFileList(scriptInfo: ScriptInfo): string[]; 10684 /** 10685 * Returns true if emit was conducted 10686 */ 10687 emitFile(scriptInfo: ScriptInfo, writeFile: (path: string, data: string, writeByteOrderMark?: boolean) => void): EmitResult; 10688 enableLanguageService(): void; 10689 disableLanguageService(lastFileExceededProgramSize?: string): void; 10690 getProjectName(): string; 10691 protected removeLocalTypingsFromTypeAcquisition(newTypeAcquisition: TypeAcquisition): TypeAcquisition; 10692 getExternalFiles(): SortedReadonlyArray<string>; 10693 getSourceFile(path: Path): SourceFile | undefined; 10694 close(): void; 10695 private detachScriptInfoIfNotRoot; 10696 isClosed(): boolean; 10697 hasRoots(): boolean; 10698 getRootFiles(): NormalizedPath[]; 10699 getRootScriptInfos(): ScriptInfo[]; 10700 getScriptInfos(): ScriptInfo[]; 10701 getExcludedFiles(): readonly NormalizedPath[]; 10702 getFileNames(excludeFilesFromExternalLibraries?: boolean, excludeConfigFiles?: boolean): NormalizedPath[]; 10703 hasConfigFile(configFilePath: NormalizedPath): boolean; 10704 containsScriptInfo(info: ScriptInfo): boolean; 10705 containsFile(filename: NormalizedPath, requireOpen?: boolean): boolean; 10706 isRoot(info: ScriptInfo): boolean; 10707 addRoot(info: ScriptInfo, fileName?: NormalizedPath): void; 10708 addMissingFileRoot(fileName: NormalizedPath): void; 10709 removeFile(info: ScriptInfo, fileExists: boolean, detachFromProject: boolean): void; 10710 registerFileUpdate(fileName: string): void; 10711 markAsDirty(): void; 10712 /** 10713 * Updates set of files that contribute to this project 10714 * @returns: true if set of files in the project stays the same and false - otherwise. 10715 */ 10716 updateGraph(): boolean; 10717 protected removeExistingTypings(include: string[]): string[]; 10718 private updateGraphWorker; 10719 private detachScriptInfoFromProject; 10720 private addMissingFileWatcher; 10721 private isWatchedMissingFile; 10722 private createGeneratedFileWatcher; 10723 private isValidGeneratedFileWatcher; 10724 private clearGeneratedFileWatch; 10725 getScriptInfoForNormalizedPath(fileName: NormalizedPath): ScriptInfo | undefined; 10726 getScriptInfo(uncheckedFileName: string): ScriptInfo | undefined; 10727 filesToString(writeProjectFileNames: boolean): string; 10728 setCompilerOptions(compilerOptions: CompilerOptions): void; 10729 setTypeAcquisition(newTypeAcquisition: TypeAcquisition | undefined): void; 10730 getTypeAcquisition(): TypeAcquisition; 10731 protected removeRoot(info: ScriptInfo): void; 10732 protected enableGlobalPlugins(options: CompilerOptions, pluginConfigOverrides: Map<any> | undefined): void; 10733 protected enablePlugin(pluginConfigEntry: PluginImport, searchPaths: string[], pluginConfigOverrides: Map<any> | undefined): void; 10734 private enableProxy; 10735 /** Starts a new check for diagnostics. Call this if some file has updated that would cause diagnostics to be changed. */ 10736 refreshDiagnostics(): void; 10737 } 10738 /** 10739 * If a file is opened and no tsconfig (or jsconfig) is found, 10740 * the file and its imports/references are put into an InferredProject. 10741 */ 10742 class InferredProject extends Project { 10743 private _isJsInferredProject; 10744 toggleJsInferredProject(isJsInferredProject: boolean): void; 10745 setCompilerOptions(options?: CompilerOptions): void; 10746 /** this is canonical project root path */ 10747 readonly projectRootPath: string | undefined; 10748 addRoot(info: ScriptInfo): void; 10749 removeRoot(info: ScriptInfo): void; 10750 isProjectWithSingleRoot(): boolean; 10751 close(): void; 10752 getTypeAcquisition(): TypeAcquisition; 10753 } 10754 class AutoImportProviderProject extends Project { 10755 private hostProject; 10756 private rootFileNames; 10757 isOrphan(): boolean; 10758 updateGraph(): boolean; 10759 hasRoots(): boolean; 10760 markAsDirty(): void; 10761 getScriptFileNames(): string[]; 10762 getLanguageService(): never; 10763 getModuleResolutionHostForAutoImportProvider(): never; 10764 getProjectReferences(): readonly ProjectReference[] | undefined; 10765 getTypeAcquisition(): TypeAcquisition; 10766 } 10767 /** 10768 * If a file is opened, the server will look for a tsconfig (or jsconfig) 10769 * and if successful create a ConfiguredProject for it. 10770 * Otherwise it will create an InferredProject. 10771 */ 10772 class ConfiguredProject extends Project { 10773 readonly canonicalConfigFilePath: NormalizedPath; 10774 /** Ref count to the project when opened from external project */ 10775 private externalProjectRefCount; 10776 private projectReferences; 10777 /** 10778 * If the project has reload from disk pending, it reloads (and then updates graph as part of that) instead of just updating the graph 10779 * @returns: true if set of files in the project stays the same and false - otherwise. 10780 */ 10781 updateGraph(): boolean; 10782 getConfigFilePath(): NormalizedPath; 10783 getProjectReferences(): readonly ProjectReference[] | undefined; 10784 updateReferences(refs: readonly ProjectReference[] | undefined): void; 10785 /** 10786 * Get the errors that dont have any file name associated 10787 */ 10788 getGlobalProjectErrors(): readonly Diagnostic[]; 10789 /** 10790 * Get all the project errors 10791 */ 10792 getAllProjectErrors(): readonly Diagnostic[]; 10793 setProjectErrors(projectErrors: Diagnostic[]): void; 10794 close(): void; 10795 getEffectiveTypeRoots(): string[]; 10796 } 10797 /** 10798 * Project whose configuration is handled externally, such as in a '.csproj'. 10799 * These are created only if a host explicitly calls `openExternalProject`. 10800 */ 10801 class ExternalProject extends Project { 10802 externalProjectName: string; 10803 compileOnSaveEnabled: boolean; 10804 excludedFiles: readonly NormalizedPath[]; 10805 updateGraph(): boolean; 10806 getExcludedFiles(): readonly NormalizedPath[]; 10807 } 10808} 10809declare namespace ts.server { 10810 export const maxProgramSizeForNonTsFiles: number; 10811 export const ProjectsUpdatedInBackgroundEvent = "projectsUpdatedInBackground"; 10812 export const ProjectLoadingStartEvent = "projectLoadingStart"; 10813 export const ProjectLoadingFinishEvent = "projectLoadingFinish"; 10814 export const LargeFileReferencedEvent = "largeFileReferenced"; 10815 export const ConfigFileDiagEvent = "configFileDiag"; 10816 export const ProjectLanguageServiceStateEvent = "projectLanguageServiceState"; 10817 export const ProjectInfoTelemetryEvent = "projectInfo"; 10818 export const OpenFileInfoTelemetryEvent = "openFileInfo"; 10819 export interface ProjectsUpdatedInBackgroundEvent { 10820 eventName: typeof ProjectsUpdatedInBackgroundEvent; 10821 data: { 10822 openFiles: string[]; 10823 }; 10824 } 10825 export interface ProjectLoadingStartEvent { 10826 eventName: typeof ProjectLoadingStartEvent; 10827 data: { 10828 project: Project; 10829 reason: string; 10830 }; 10831 } 10832 export interface ProjectLoadingFinishEvent { 10833 eventName: typeof ProjectLoadingFinishEvent; 10834 data: { 10835 project: Project; 10836 }; 10837 } 10838 export interface LargeFileReferencedEvent { 10839 eventName: typeof LargeFileReferencedEvent; 10840 data: { 10841 file: string; 10842 fileSize: number; 10843 maxFileSize: number; 10844 }; 10845 } 10846 export interface ConfigFileDiagEvent { 10847 eventName: typeof ConfigFileDiagEvent; 10848 data: { 10849 triggerFile: string; 10850 configFileName: string; 10851 diagnostics: readonly Diagnostic[]; 10852 }; 10853 } 10854 export interface ProjectLanguageServiceStateEvent { 10855 eventName: typeof ProjectLanguageServiceStateEvent; 10856 data: { 10857 project: Project; 10858 languageServiceEnabled: boolean; 10859 }; 10860 } 10861 /** This will be converted to the payload of a protocol.TelemetryEvent in session.defaultEventHandler. */ 10862 export interface ProjectInfoTelemetryEvent { 10863 readonly eventName: typeof ProjectInfoTelemetryEvent; 10864 readonly data: ProjectInfoTelemetryEventData; 10865 } 10866 export interface ProjectInfoTelemetryEventData { 10867 /** Cryptographically secure hash of project file location. */ 10868 readonly projectId: string; 10869 /** Count of file extensions seen in the project. */ 10870 readonly fileStats: FileStats; 10871 /** 10872 * Any compiler options that might contain paths will be taken out. 10873 * Enum compiler options will be converted to strings. 10874 */ 10875 readonly compilerOptions: CompilerOptions; 10876 readonly extends: boolean | undefined; 10877 readonly files: boolean | undefined; 10878 readonly include: boolean | undefined; 10879 readonly exclude: boolean | undefined; 10880 readonly compileOnSave: boolean; 10881 readonly typeAcquisition: ProjectInfoTypeAcquisitionData; 10882 readonly configFileName: "tsconfig.json" | "jsconfig.json" | "other"; 10883 readonly projectType: "external" | "configured"; 10884 readonly languageServiceEnabled: boolean; 10885 /** TypeScript version used by the server. */ 10886 readonly version: string; 10887 } 10888 /** 10889 * Info that we may send about a file that was just opened. 10890 * Info about a file will only be sent once per session, even if the file changes in ways that might affect the info. 10891 * Currently this is only sent for '.js' files. 10892 */ 10893 export interface OpenFileInfoTelemetryEvent { 10894 readonly eventName: typeof OpenFileInfoTelemetryEvent; 10895 readonly data: OpenFileInfoTelemetryEventData; 10896 } 10897 export interface OpenFileInfoTelemetryEventData { 10898 readonly info: OpenFileInfo; 10899 } 10900 export interface ProjectInfoTypeAcquisitionData { 10901 readonly enable: boolean | undefined; 10902 readonly include: boolean; 10903 readonly exclude: boolean; 10904 } 10905 export interface FileStats { 10906 readonly js: number; 10907 readonly jsSize?: number; 10908 readonly jsx: number; 10909 readonly jsxSize?: number; 10910 readonly ts: number; 10911 readonly tsSize?: number; 10912 readonly tsx: number; 10913 readonly tsxSize?: number; 10914 readonly dts: number; 10915 readonly dtsSize?: number; 10916 readonly deferred: number; 10917 readonly deferredSize?: number; 10918 readonly ets: number; 10919 readonly etsSize?: number; 10920 readonly dets: number; 10921 readonly detsSize?: number; 10922 } 10923 export interface OpenFileInfo { 10924 readonly checkJs: boolean; 10925 } 10926 export type ProjectServiceEvent = LargeFileReferencedEvent | ProjectsUpdatedInBackgroundEvent | ProjectLoadingStartEvent | ProjectLoadingFinishEvent | ConfigFileDiagEvent | ProjectLanguageServiceStateEvent | ProjectInfoTelemetryEvent | OpenFileInfoTelemetryEvent; 10927 export type ProjectServiceEventHandler = (event: ProjectServiceEvent) => void; 10928 export interface SafeList { 10929 [name: string]: { 10930 match: RegExp; 10931 exclude?: (string | number)[][]; 10932 types?: string[]; 10933 }; 10934 } 10935 export interface TypesMapFile { 10936 typesMap: SafeList; 10937 simpleMap: { 10938 [libName: string]: string; 10939 }; 10940 } 10941 export function convertFormatOptions(protocolOptions: protocol.FormatCodeSettings): FormatCodeSettings; 10942 export function convertCompilerOptions(protocolOptions: protocol.ExternalProjectCompilerOptions): CompilerOptions & protocol.CompileOnSaveMixin; 10943 export function convertWatchOptions(protocolOptions: protocol.ExternalProjectCompilerOptions, currentDirectory?: string): WatchOptionsAndErrors | undefined; 10944 export function convertTypeAcquisition(protocolOptions: protocol.InferredProjectCompilerOptions): TypeAcquisition | undefined; 10945 export function tryConvertScriptKindName(scriptKindName: protocol.ScriptKindName | ScriptKind): ScriptKind; 10946 export function convertScriptKindName(scriptKindName: protocol.ScriptKindName): ScriptKind.Unknown | ScriptKind.JS | ScriptKind.JSX | ScriptKind.TS | ScriptKind.TSX | ScriptKind.ETS; 10947 export interface HostConfiguration { 10948 formatCodeOptions: FormatCodeSettings; 10949 preferences: protocol.UserPreferences; 10950 hostInfo: string; 10951 extraFileExtensions?: FileExtensionInfo[]; 10952 watchOptions?: WatchOptions; 10953 } 10954 export interface OpenConfiguredProjectResult { 10955 configFileName?: NormalizedPath; 10956 configFileErrors?: readonly Diagnostic[]; 10957 } 10958 export interface ProjectServiceOptions { 10959 host: ServerHost; 10960 logger: Logger; 10961 cancellationToken: HostCancellationToken; 10962 useSingleInferredProject: boolean; 10963 useInferredProjectPerProjectRoot: boolean; 10964 typingsInstaller: ITypingsInstaller; 10965 eventHandler?: ProjectServiceEventHandler; 10966 suppressDiagnosticEvents?: boolean; 10967 throttleWaitMilliseconds?: number; 10968 globalPlugins?: readonly string[]; 10969 pluginProbeLocations?: readonly string[]; 10970 allowLocalPluginLoads?: boolean; 10971 typesMapLocation?: string; 10972 /** @deprecated use serverMode instead */ 10973 syntaxOnly?: boolean; 10974 serverMode?: LanguageServiceMode; 10975 session: Session<unknown> | undefined; 10976 } 10977 export interface WatchOptionsAndErrors { 10978 watchOptions: WatchOptions; 10979 errors: Diagnostic[] | undefined; 10980 } 10981 export class ProjectService { 10982 private readonly nodeModulesWatchers; 10983 /** 10984 * Contains all the deleted script info's version information so that 10985 * it does not reset when creating script info again 10986 * (and could have potentially collided with version where contents mismatch) 10987 */ 10988 private readonly filenameToScriptInfoVersion; 10989 private readonly allJsFilesForOpenFileTelemetry; 10990 /** 10991 * maps external project file name to list of config files that were the part of this project 10992 */ 10993 private readonly externalProjectToConfiguredProjectMap; 10994 /** 10995 * external projects (configuration and list of root files is not controlled by tsserver) 10996 */ 10997 readonly externalProjects: ExternalProject[]; 10998 /** 10999 * projects built from openFileRoots 11000 */ 11001 readonly inferredProjects: InferredProject[]; 11002 /** 11003 * projects specified by a tsconfig.json file 11004 */ 11005 readonly configuredProjects: Map<ConfiguredProject>; 11006 /** 11007 * Open files: with value being project root path, and key being Path of the file that is open 11008 */ 11009 readonly openFiles: Map<NormalizedPath | undefined>; 11010 /** 11011 * Map of open files that are opened without complete path but have projectRoot as current directory 11012 */ 11013 private readonly openFilesWithNonRootedDiskPath; 11014 private compilerOptionsForInferredProjects; 11015 private compilerOptionsForInferredProjectsPerProjectRoot; 11016 private watchOptionsForInferredProjects; 11017 private watchOptionsForInferredProjectsPerProjectRoot; 11018 private typeAcquisitionForInferredProjects; 11019 private typeAcquisitionForInferredProjectsPerProjectRoot; 11020 /** 11021 * Project size for configured or external projects 11022 */ 11023 private readonly projectToSizeMap; 11024 private readonly hostConfiguration; 11025 private safelist; 11026 private readonly legacySafelist; 11027 private pendingProjectUpdates; 11028 readonly currentDirectory: NormalizedPath; 11029 readonly toCanonicalFileName: (f: string) => string; 11030 readonly host: ServerHost; 11031 readonly logger: Logger; 11032 readonly cancellationToken: HostCancellationToken; 11033 readonly useSingleInferredProject: boolean; 11034 readonly useInferredProjectPerProjectRoot: boolean; 11035 readonly typingsInstaller: ITypingsInstaller; 11036 private readonly globalCacheLocationDirectoryPath; 11037 readonly throttleWaitMilliseconds?: number; 11038 private readonly eventHandler?; 11039 private readonly suppressDiagnosticEvents?; 11040 readonly globalPlugins: readonly string[]; 11041 readonly pluginProbeLocations: readonly string[]; 11042 readonly allowLocalPluginLoads: boolean; 11043 private currentPluginConfigOverrides; 11044 readonly typesMapLocation: string | undefined; 11045 /** @deprecated use serverMode instead */ 11046 readonly syntaxOnly: boolean; 11047 readonly serverMode: LanguageServiceMode; 11048 /** Tracks projects that we have already sent telemetry for. */ 11049 private readonly seenProjects; 11050 private performanceEventHandler?; 11051 private pendingPluginEnablements?; 11052 private currentPluginEnablementPromise?; 11053 constructor(opts: ProjectServiceOptions); 11054 toPath(fileName: string): Path; 11055 private loadTypesMap; 11056 updateTypingsForProject(response: SetTypings | InvalidateCachedTypings | PackageInstalledResponse): void; 11057 private delayUpdateProjectGraph; 11058 private delayUpdateProjectGraphs; 11059 setCompilerOptionsForInferredProjects(projectCompilerOptions: protocol.InferredProjectCompilerOptions, projectRootPath?: string): void; 11060 findProject(projectName: string): Project | undefined; 11061 getDefaultProjectForFile(fileName: NormalizedPath, ensureProject: boolean): Project | undefined; 11062 private doEnsureDefaultProjectForFile; 11063 getScriptInfoEnsuringProjectsUptoDate(uncheckedFileName: string): ScriptInfo | undefined; 11064 /** 11065 * Ensures the project structures are upto date 11066 * This means, 11067 * - we go through all the projects and update them if they are dirty 11068 * - if updates reflect some change in structure or there was pending request to ensure projects for open files 11069 * ensure that each open script info has project 11070 */ 11071 private ensureProjectStructuresUptoDate; 11072 getFormatCodeOptions(file: NormalizedPath): FormatCodeSettings; 11073 getPreferences(file: NormalizedPath): protocol.UserPreferences; 11074 getHostFormatCodeOptions(): FormatCodeSettings; 11075 getHostPreferences(): protocol.UserPreferences; 11076 private onSourceFileChanged; 11077 private handleSourceMapProjects; 11078 private delayUpdateSourceInfoProjects; 11079 private delayUpdateProjectsOfScriptInfoPath; 11080 private handleDeletedFile; 11081 private removeProject; 11082 private assignOrphanScriptInfosToInferredProject; 11083 /** 11084 * Remove this file from the set of open, non-configured files. 11085 * @param info The file that has been closed or newly configured 11086 */ 11087 private closeOpenFile; 11088 private deleteScriptInfo; 11089 private configFileExists; 11090 /** 11091 * Returns true if the configFileExistenceInfo is needed/impacted by open files that are root of inferred project 11092 */ 11093 private configFileExistenceImpactsRootOfInferredProject; 11094 /** 11095 * This is called on file close, so that we stop watching the config file for this script info 11096 */ 11097 private stopWatchingConfigFilesForClosedScriptInfo; 11098 /** 11099 * This function tries to search for a tsconfig.json for the given file. 11100 * This is different from the method the compiler uses because 11101 * the compiler can assume it will always start searching in the 11102 * current directory (the directory in which tsc was invoked). 11103 * The server must start searching from the directory containing 11104 * the newly opened file. 11105 */ 11106 private forEachConfigFileLocation; 11107 /** 11108 * This function tries to search for a tsconfig.json for the given file. 11109 * This is different from the method the compiler uses because 11110 * the compiler can assume it will always start searching in the 11111 * current directory (the directory in which tsc was invoked). 11112 * The server must start searching from the directory containing 11113 * the newly opened file. 11114 * If script info is passed in, it is asserted to be open script info 11115 * otherwise just file name 11116 */ 11117 private getConfigFileNameForFile; 11118 private printProjects; 11119 private getConfiguredProjectByCanonicalConfigFilePath; 11120 private findExternalProjectByProjectName; 11121 /** Get a filename if the language service exceeds the maximum allowed program size; otherwise returns undefined. */ 11122 private getFilenameForExceededTotalSizeLimitForNonTsFiles; 11123 private createExternalProject; 11124 private addFilesToNonInferredProject; 11125 private updateNonInferredProjectFiles; 11126 private updateRootAndOptionsOfNonInferredProject; 11127 private sendConfigFileDiagEvent; 11128 private getOrCreateInferredProjectForProjectRootPathIfEnabled; 11129 private getOrCreateSingleInferredProjectIfEnabled; 11130 private getOrCreateSingleInferredWithoutProjectRoot; 11131 private createInferredProject; 11132 getScriptInfo(uncheckedFileName: string): ScriptInfo | undefined; 11133 private watchClosedScriptInfo; 11134 private createNodeModulesWatcher; 11135 private watchClosedScriptInfoInNodeModules; 11136 private getModifiedTime; 11137 private refreshScriptInfo; 11138 private refreshScriptInfosInDirectory; 11139 private stopWatchingScriptInfo; 11140 private getOrCreateScriptInfoNotOpenedByClientForNormalizedPath; 11141 private getOrCreateScriptInfoOpenedByClientForNormalizedPath; 11142 getOrCreateScriptInfoForNormalizedPath(fileName: NormalizedPath, openedByClient: boolean, fileContent?: string, scriptKind?: ScriptKind, hasMixedContent?: boolean, hostToQueryFileExistsOn?: { 11143 fileExists(path: string): boolean; 11144 }): ScriptInfo | undefined; 11145 private getOrCreateScriptInfoWorker; 11146 /** 11147 * This gets the script info for the normalized path. If the path is not rooted disk path then the open script info with project root context is preferred 11148 */ 11149 getScriptInfoForNormalizedPath(fileName: NormalizedPath): ScriptInfo | undefined; 11150 getScriptInfoForPath(fileName: Path): ScriptInfo | undefined; 11151 private addSourceInfoToSourceMap; 11152 private addMissingSourceMapFile; 11153 setHostConfiguration(args: protocol.ConfigureRequestArguments): void; 11154 closeLog(): void; 11155 /** 11156 * This function rebuilds the project for every file opened by the client 11157 * This does not reload contents of open files from disk. But we could do that if needed 11158 */ 11159 reloadProjects(): void; 11160 /** 11161 * This function goes through all the openFiles and tries to file the config file for them. 11162 * If the config file is found and it refers to existing project, it reloads it either immediately 11163 * or schedules it for reload depending on delayReload option 11164 * If there is no existing project it just opens the configured project for the config file 11165 * reloadForInfo provides a way to filter out files to reload configured project for 11166 */ 11167 private reloadConfiguredProjectForFiles; 11168 /** 11169 * Remove the root of inferred project if script info is part of another project 11170 */ 11171 private removeRootOfInferredProjectIfNowPartOfOtherProject; 11172 /** 11173 * This function is to update the project structure for every inferred project. 11174 * It is called on the premise that all the configured projects are 11175 * up to date. 11176 * This will go through open files and assign them to inferred project if open file is not part of any other project 11177 * After that all the inferred project graphs are updated 11178 */ 11179 private ensureProjectForOpenFiles; 11180 /** 11181 * Open file whose contents is managed by the client 11182 * @param filename is absolute pathname 11183 * @param fileContent is a known version of the file content that is more up to date than the one on disk 11184 */ 11185 openClientFile(fileName: string, fileContent?: string, scriptKind?: ScriptKind, projectRootPath?: string): OpenConfiguredProjectResult; 11186 private findExternalProjectContainingOpenScriptInfo; 11187 private getOrCreateOpenScriptInfo; 11188 private assignProjectToOpenedScriptInfo; 11189 private createAncestorProjects; 11190 private ensureProjectChildren; 11191 private cleanupAfterOpeningFile; 11192 openClientFileWithNormalizedPath(fileName: NormalizedPath, fileContent?: string, scriptKind?: ScriptKind, hasMixedContent?: boolean, projectRootPath?: NormalizedPath): OpenConfiguredProjectResult; 11193 private removeOrphanConfiguredProjects; 11194 private removeOrphanScriptInfos; 11195 private telemetryOnOpenFile; 11196 /** 11197 * Close file whose contents is managed by the client 11198 * @param filename is absolute pathname 11199 */ 11200 closeClientFile(uncheckedFileName: string): void; 11201 private collectChanges; 11202 private closeConfiguredProjectReferencedFromExternalProject; 11203 closeExternalProject(uncheckedFileName: string): void; 11204 openExternalProjects(projects: protocol.ExternalProject[]): void; 11205 /** Makes a filename safe to insert in a RegExp */ 11206 private static readonly filenameEscapeRegexp; 11207 private static escapeFilenameForRegex; 11208 resetSafeList(): void; 11209 applySafeList(proj: protocol.ExternalProject): NormalizedPath[]; 11210 openExternalProject(proj: protocol.ExternalProject): void; 11211 hasDeferredExtension(): boolean; 11212 private enableRequestedPluginsAsync; 11213 private enableRequestedPluginsWorker; 11214 private enableRequestedPluginsForProjectAsync; 11215 configurePlugin(args: protocol.ConfigurePluginRequestArguments): void; 11216 } 11217 export {}; 11218} 11219declare namespace ts.server { 11220 interface ServerCancellationToken extends HostCancellationToken { 11221 setRequest(requestId: number): void; 11222 resetRequest(requestId: number): void; 11223 } 11224 const nullCancellationToken: ServerCancellationToken; 11225 interface PendingErrorCheck { 11226 fileName: NormalizedPath; 11227 project: Project; 11228 } 11229 type CommandNames = protocol.CommandTypes; 11230 const CommandNames: any; 11231 function formatMessage<T extends protocol.Message>(msg: T, logger: Logger, byteLength: (s: string, encoding: string) => number, newLine: string): string; 11232 type Event = <T extends object>(body: T, eventName: string) => void; 11233 interface EventSender { 11234 event: Event; 11235 } 11236 interface SessionOptions { 11237 host: ServerHost; 11238 cancellationToken: ServerCancellationToken; 11239 useSingleInferredProject: boolean; 11240 useInferredProjectPerProjectRoot: boolean; 11241 typingsInstaller: ITypingsInstaller; 11242 byteLength: (buf: string, encoding?: string) => number; 11243 hrtime: (start?: number[]) => number[]; 11244 logger: Logger; 11245 /** 11246 * If falsy, all events are suppressed. 11247 */ 11248 canUseEvents: boolean; 11249 eventHandler?: ProjectServiceEventHandler; 11250 /** Has no effect if eventHandler is also specified. */ 11251 suppressDiagnosticEvents?: boolean; 11252 /** @deprecated use serverMode instead */ 11253 syntaxOnly?: boolean; 11254 serverMode?: LanguageServiceMode; 11255 throttleWaitMilliseconds?: number; 11256 noGetErrOnBackgroundUpdate?: boolean; 11257 globalPlugins?: readonly string[]; 11258 pluginProbeLocations?: readonly string[]; 11259 allowLocalPluginLoads?: boolean; 11260 typesMapLocation?: string; 11261 } 11262 class Session<TMessage = string> implements EventSender { 11263 private readonly gcTimer; 11264 protected projectService: ProjectService; 11265 private changeSeq; 11266 private performanceData; 11267 private currentRequestId; 11268 private errorCheck; 11269 protected host: ServerHost; 11270 private readonly cancellationToken; 11271 protected readonly typingsInstaller: ITypingsInstaller; 11272 protected byteLength: (buf: string, encoding?: string) => number; 11273 private hrtime; 11274 protected logger: Logger; 11275 protected canUseEvents: boolean; 11276 private suppressDiagnosticEvents?; 11277 private eventHandler; 11278 private readonly noGetErrOnBackgroundUpdate?; 11279 constructor(opts: SessionOptions); 11280 private sendRequestCompletedEvent; 11281 private addPerformanceData; 11282 private performanceEventHandler; 11283 private defaultEventHandler; 11284 private projectsUpdatedInBackgroundEvent; 11285 logError(err: Error, cmd: string): void; 11286 private logErrorWorker; 11287 send(msg: protocol.Message): void; 11288 protected writeMessage(msg: protocol.Message): void; 11289 event<T extends object>(body: T, eventName: string): void; 11290 /** @deprecated */ 11291 output(info: any, cmdName: string, reqSeq?: number, errorMsg?: string): void; 11292 private doOutput; 11293 private semanticCheck; 11294 private syntacticCheck; 11295 private suggestionCheck; 11296 private sendDiagnosticsEvent; 11297 /** It is the caller's responsibility to verify that `!this.suppressDiagnosticEvents`. */ 11298 private updateErrorCheck; 11299 private cleanProjects; 11300 private cleanup; 11301 private getEncodedSyntacticClassifications; 11302 private getEncodedSemanticClassifications; 11303 private getProject; 11304 private getConfigFileAndProject; 11305 private getConfigFileDiagnostics; 11306 private convertToDiagnosticsWithLinePositionFromDiagnosticFile; 11307 private getCompilerOptionsDiagnostics; 11308 private convertToDiagnosticsWithLinePosition; 11309 private getDiagnosticsWorker; 11310 private getDefinition; 11311 private mapDefinitionInfoLocations; 11312 private getDefinitionAndBoundSpan; 11313 private findSourceDefinition; 11314 private getEmitOutput; 11315 private mapJSDocTagInfo; 11316 private mapDisplayParts; 11317 private mapSignatureHelpItems; 11318 private mapDefinitionInfo; 11319 private static mapToOriginalLocation; 11320 private toFileSpan; 11321 private toFileSpanWithContext; 11322 private getTypeDefinition; 11323 private mapImplementationLocations; 11324 private getImplementation; 11325 private getOccurrences; 11326 private getSyntacticDiagnosticsSync; 11327 private getSemanticDiagnosticsSync; 11328 private getSuggestionDiagnosticsSync; 11329 private getJsxClosingTag; 11330 private getDocumentHighlights; 11331 private provideInlayHints; 11332 private setCompilerOptionsForInferredProjects; 11333 private getProjectInfo; 11334 private getProjectInfoWorker; 11335 private getRenameInfo; 11336 private getProjects; 11337 private getDefaultProject; 11338 private getRenameLocations; 11339 private mapRenameInfo; 11340 private toSpanGroups; 11341 private getReferences; 11342 private getFileReferences; 11343 /** 11344 * @param fileName is the name of the file to be opened 11345 * @param fileContent is a version of the file content that is known to be more up to date than the one on disk 11346 */ 11347 private openClientFile; 11348 private getPosition; 11349 private getPositionInFile; 11350 private getFileAndProject; 11351 private getFileAndLanguageServiceForSyntacticOperation; 11352 private getFileAndProjectWorker; 11353 private getOutliningSpans; 11354 private getTodoComments; 11355 private getDocCommentTemplate; 11356 private getSpanOfEnclosingComment; 11357 private getIndentation; 11358 private getBreakpointStatement; 11359 private getNameOrDottedNameSpan; 11360 private isValidBraceCompletion; 11361 private getQuickInfoWorker; 11362 private getFormattingEditsForRange; 11363 private getFormattingEditsForRangeFull; 11364 private getFormattingEditsForDocumentFull; 11365 private getFormattingEditsAfterKeystrokeFull; 11366 private getFormattingEditsAfterKeystroke; 11367 private getCompletions; 11368 private getCompletionEntryDetails; 11369 private getCompileOnSaveAffectedFileList; 11370 private emitFile; 11371 private getSignatureHelpItems; 11372 private toPendingErrorCheck; 11373 private getDiagnostics; 11374 private change; 11375 private reload; 11376 private saveToTmp; 11377 private closeClientFile; 11378 private mapLocationNavigationBarItems; 11379 private getNavigationBarItems; 11380 private toLocationNavigationTree; 11381 private getNavigationTree; 11382 private getNavigateToItems; 11383 private getFullNavigateToItems; 11384 private getSupportedCodeFixes; 11385 private isLocation; 11386 private extractPositionOrRange; 11387 private getRange; 11388 private getApplicableRefactors; 11389 private getEditsForRefactor; 11390 private organizeImports; 11391 private getEditsForFileRename; 11392 private getCodeFixes; 11393 private getCombinedCodeFix; 11394 private applyCodeActionCommand; 11395 private getStartAndEndPosition; 11396 private mapCodeAction; 11397 private mapCodeFixAction; 11398 private mapTextChangesToCodeEdits; 11399 private mapTextChangeToCodeEdit; 11400 private convertTextChangeToCodeEdit; 11401 private getBraceMatching; 11402 private getDiagnosticsForProject; 11403 private configurePlugin; 11404 private getSmartSelectionRange; 11405 private toggleLineComment; 11406 private toggleMultilineComment; 11407 private commentSelection; 11408 private uncommentSelection; 11409 private mapSelectionRange; 11410 private getScriptInfoFromProjectService; 11411 private toProtocolCallHierarchyItem; 11412 private toProtocolCallHierarchyIncomingCall; 11413 private toProtocolCallHierarchyOutgoingCall; 11414 private prepareCallHierarchy; 11415 private provideCallHierarchyIncomingCalls; 11416 private provideCallHierarchyOutgoingCalls; 11417 getCanonicalFileName(fileName: string): string; 11418 exit(): void; 11419 private notRequired; 11420 private requiredResponse; 11421 private handlers; 11422 addProtocolHandler(command: string, handler: (request: protocol.Request) => HandlerResponse): void; 11423 private setCurrentRequest; 11424 private resetCurrentRequest; 11425 executeWithRequestId<T>(requestId: number, f: () => T): T; 11426 executeCommand(request: protocol.Request): HandlerResponse; 11427 onMessage(message: TMessage): void; 11428 protected parseMessage(message: TMessage): protocol.Request; 11429 protected toStringMessage(message: TMessage): string; 11430 private getFormatOptions; 11431 private getPreferences; 11432 private getHostFormatOptions; 11433 private getHostPreferences; 11434 } 11435 interface HandlerResponse { 11436 response?: {}; 11437 responseRequired?: boolean; 11438 } 11439} 11440declare namespace ts { 11441 /** @deprecated Use `factory.createNodeArray` or the factory supplied by your transformation context instead. */ 11442 const createNodeArray: <T extends Node>(elements?: readonly T[] | undefined, hasTrailingComma?: boolean | undefined) => NodeArray<T>; 11443 /** @deprecated Use `factory.createNumericLiteral` or the factory supplied by your transformation context instead. */ 11444 const createNumericLiteral: (value: string | number, numericLiteralFlags?: TokenFlags | undefined) => NumericLiteral; 11445 /** @deprecated Use `factory.createBigIntLiteral` or the factory supplied by your transformation context instead. */ 11446 const createBigIntLiteral: (value: string | PseudoBigInt) => BigIntLiteral; 11447 /** @deprecated Use `factory.createStringLiteral` or the factory supplied by your transformation context instead. */ 11448 const createStringLiteral: { 11449 (text: string, isSingleQuote?: boolean | undefined): StringLiteral; 11450 (text: string, isSingleQuote?: boolean | undefined, hasExtendedUnicodeEscape?: boolean | undefined): StringLiteral; 11451 }; 11452 /** @deprecated Use `factory.createStringLiteralFromNode` or the factory supplied by your transformation context instead. */ 11453 const createStringLiteralFromNode: (sourceNode: PrivateIdentifier | PropertyNameLiteral, isSingleQuote?: boolean | undefined) => StringLiteral; 11454 /** @deprecated Use `factory.createRegularExpressionLiteral` or the factory supplied by your transformation context instead. */ 11455 const createRegularExpressionLiteral: (text: string) => RegularExpressionLiteral; 11456 /** @deprecated Use `factory.createLoopVariable` or the factory supplied by your transformation context instead. */ 11457 const createLoopVariable: (reservedInNestedScopes?: boolean | undefined) => Identifier; 11458 /** @deprecated Use `factory.createUniqueName` or the factory supplied by your transformation context instead. */ 11459 const createUniqueName: (text: string, flags?: GeneratedIdentifierFlags | undefined) => Identifier; 11460 /** @deprecated Use `factory.createPrivateIdentifier` or the factory supplied by your transformation context instead. */ 11461 const createPrivateIdentifier: (text: string) => PrivateIdentifier; 11462 /** @deprecated Use `factory.createSuper` or the factory supplied by your transformation context instead. */ 11463 const createSuper: () => SuperExpression; 11464 /** @deprecated Use `factory.createThis` or the factory supplied by your transformation context instead. */ 11465 const createThis: () => ThisExpression; 11466 /** @deprecated Use `factory.createNull` or the factory supplied by your transformation context instead. */ 11467 const createNull: () => NullLiteral; 11468 /** @deprecated Use `factory.createTrue` or the factory supplied by your transformation context instead. */ 11469 const createTrue: () => TrueLiteral; 11470 /** @deprecated Use `factory.createFalse` or the factory supplied by your transformation context instead. */ 11471 const createFalse: () => FalseLiteral; 11472 /** @deprecated Use `factory.createModifier` or the factory supplied by your transformation context instead. */ 11473 const createModifier: <T extends ModifierSyntaxKind>(kind: T) => ModifierToken<T>; 11474 /** @deprecated Use `factory.createModifiersFromModifierFlags` or the factory supplied by your transformation context instead. */ 11475 const createModifiersFromModifierFlags: (flags: ModifierFlags) => Modifier[] | undefined; 11476 /** @deprecated Use `factory.createQualifiedName` or the factory supplied by your transformation context instead. */ 11477 const createQualifiedName: (left: EntityName, right: string | Identifier) => QualifiedName; 11478 /** @deprecated Use `factory.updateQualifiedName` or the factory supplied by your transformation context instead. */ 11479 const updateQualifiedName: (node: QualifiedName, left: EntityName, right: Identifier) => QualifiedName; 11480 /** @deprecated Use `factory.createComputedPropertyName` or the factory supplied by your transformation context instead. */ 11481 const createComputedPropertyName: (expression: Expression) => ComputedPropertyName; 11482 /** @deprecated Use `factory.updateComputedPropertyName` or the factory supplied by your transformation context instead. */ 11483 const updateComputedPropertyName: (node: ComputedPropertyName, expression: Expression) => ComputedPropertyName; 11484 /** @deprecated Use `factory.createTypeParameterDeclaration` or the factory supplied by your transformation context instead. */ 11485 const createTypeParameterDeclaration: { 11486 (modifiers: readonly Modifier[] | undefined, name: string | Identifier, constraint?: TypeNode | undefined, defaultType?: TypeNode | undefined): TypeParameterDeclaration; 11487 (name: string | Identifier, constraint?: TypeNode | undefined, defaultType?: TypeNode | undefined): TypeParameterDeclaration; 11488 }; 11489 /** @deprecated Use `factory.updateTypeParameterDeclaration` or the factory supplied by your transformation context instead. */ 11490 const updateTypeParameterDeclaration: { 11491 (node: TypeParameterDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; 11492 (node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; 11493 }; 11494 /** @deprecated Use `factory.createParameterDeclaration` or the factory supplied by your transformation context instead. */ 11495 const createParameter: { 11496 (modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken | undefined, type?: TypeNode | undefined, initializer?: Expression | undefined): ParameterDeclaration; 11497 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken | undefined, type?: TypeNode | undefined, initializer?: Expression | undefined): ParameterDeclaration; 11498 }; 11499 /** @deprecated Use `factory.updateParameterDeclaration` or the factory supplied by your transformation context instead. */ 11500 const updateParameter: { 11501 (node: ParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration; 11502 (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; 11503 }; 11504 /** @deprecated Use `factory.createDecorator` or the factory supplied by your transformation context instead. */ 11505 const createDecorator: (expression: Expression, annotationDeclaration?: AnnotationDeclaration | undefined) => Decorator; 11506 /** @deprecated Use `factory.updateDecorator` or the factory supplied by your transformation context instead. */ 11507 const updateDecorator: (node: Decorator, expression: Expression, annotationDeclaration?: AnnotationDeclaration | undefined) => Decorator; 11508 /** @deprecated Use `factory.createPropertyDeclaration` or the factory supplied by your transformation context instead. */ 11509 const createProperty: { 11510 (modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 11511 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 11512 }; 11513 /** @deprecated Use `factory.updatePropertyDeclaration` or the factory supplied by your transformation context instead. */ 11514 const updateProperty: { 11515 (node: PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 11516 (node: PropertyDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 11517 }; 11518 /** @deprecated Use `factory.createMethodDeclaration` or the factory supplied by your transformation context instead. */ 11519 const createMethod: { 11520 (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; 11521 (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; 11522 }; 11523 /** @deprecated Use `factory.updateMethodDeclaration` or the factory supplied by your transformation context instead. */ 11524 const updateMethod: { 11525 (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; 11526 (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; 11527 }; 11528 /** @deprecated Use `factory.createConstructorDeclaration` or the factory supplied by your transformation context instead. */ 11529 const createConstructor: { 11530 (modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 11531 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 11532 }; 11533 /** @deprecated Use `factory.updateConstructorDeclaration` or the factory supplied by your transformation context instead. */ 11534 const updateConstructor: { 11535 (node: ConstructorDeclaration, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 11536 (node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 11537 }; 11538 /** @deprecated Use `factory.createGetAccessorDeclaration` or the factory supplied by your transformation context instead. */ 11539 const createGetAccessor: { 11540 (modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 11541 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 11542 }; 11543 /** @deprecated Use `factory.updateGetAccessorDeclaration` or the factory supplied by your transformation context instead. */ 11544 const updateGetAccessor: { 11545 (node: GetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 11546 (node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 11547 }; 11548 /** @deprecated Use `factory.createSetAccessorDeclaration` or the factory supplied by your transformation context instead. */ 11549 const createSetAccessor: { 11550 (modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 11551 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 11552 }; 11553 /** @deprecated Use `factory.updateSetAccessorDeclaration` or the factory supplied by your transformation context instead. */ 11554 const updateSetAccessor: { 11555 (node: SetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 11556 (node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 11557 }; 11558 /** @deprecated Use `factory.createCallSignature` or the factory supplied by your transformation context instead. */ 11559 const createCallSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined) => CallSignatureDeclaration; 11560 /** @deprecated Use `factory.updateCallSignature` or the factory supplied by your transformation context instead. */ 11561 const updateCallSignature: (node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined) => CallSignatureDeclaration; 11562 /** @deprecated Use `factory.createConstructSignature` or the factory supplied by your transformation context instead. */ 11563 const createConstructSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined) => ConstructSignatureDeclaration; 11564 /** @deprecated Use `factory.updateConstructSignature` or the factory supplied by your transformation context instead. */ 11565 const updateConstructSignature: (node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined) => ConstructSignatureDeclaration; 11566 /** @deprecated Use `factory.updateIndexSignature` or the factory supplied by your transformation context instead. */ 11567 const updateIndexSignature: { 11568 (node: IndexSignatureDeclaration, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; 11569 (node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; 11570 }; 11571 /** @deprecated Use `factory.createKeywordTypeNode` or the factory supplied by your transformation context instead. */ 11572 const createKeywordTypeNode: <TKind extends KeywordTypeSyntaxKind>(kind: TKind) => KeywordTypeNode<TKind>; 11573 /** @deprecated Use `factory.createTypePredicateNode` or the factory supplied by your transformation context instead. */ 11574 const createTypePredicateNodeWithModifier: (assertsModifier: AssertsKeyword | undefined, parameterName: string | Identifier | ThisTypeNode, type: TypeNode | undefined) => TypePredicateNode; 11575 /** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */ 11576 const updateTypePredicateNodeWithModifier: (node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined) => TypePredicateNode; 11577 /** @deprecated Use `factory.createTypeReferenceNode` or the factory supplied by your transformation context instead. */ 11578 const createTypeReferenceNode: (typeName: string | EntityName, typeArguments?: readonly TypeNode[] | undefined) => TypeReferenceNode; 11579 /** @deprecated Use `factory.updateTypeReferenceNode` or the factory supplied by your transformation context instead. */ 11580 const updateTypeReferenceNode: (node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined) => TypeReferenceNode; 11581 /** @deprecated Use `factory.createFunctionTypeNode` or the factory supplied by your transformation context instead. */ 11582 const createFunctionTypeNode: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => FunctionTypeNode; 11583 /** @deprecated Use `factory.updateFunctionTypeNode` or the factory supplied by your transformation context instead. */ 11584 const updateFunctionTypeNode: (node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode) => FunctionTypeNode; 11585 /** @deprecated Use `factory.createConstructorTypeNode` or the factory supplied by your transformation context instead. */ 11586 const createConstructorTypeNode: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => ConstructorTypeNode; 11587 /** @deprecated Use `factory.updateConstructorTypeNode` or the factory supplied by your transformation context instead. */ 11588 const updateConstructorTypeNode: (node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode) => ConstructorTypeNode; 11589 /** @deprecated Use `factory.createTypeQueryNode` or the factory supplied by your transformation context instead. */ 11590 const createTypeQueryNode: (exprName: EntityName, typeArguments?: readonly TypeNode[] | undefined) => TypeQueryNode; 11591 /** @deprecated Use `factory.updateTypeQueryNode` or the factory supplied by your transformation context instead. */ 11592 const updateTypeQueryNode: (node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[] | undefined) => TypeQueryNode; 11593 /** @deprecated Use `factory.createTypeLiteralNode` or the factory supplied by your transformation context instead. */ 11594 const createTypeLiteralNode: (members: readonly TypeElement[] | undefined) => TypeLiteralNode; 11595 /** @deprecated Use `factory.updateTypeLiteralNode` or the factory supplied by your transformation context instead. */ 11596 const updateTypeLiteralNode: (node: TypeLiteralNode, members: NodeArray<TypeElement>) => TypeLiteralNode; 11597 /** @deprecated Use `factory.createArrayTypeNode` or the factory supplied by your transformation context instead. */ 11598 const createArrayTypeNode: (elementType: TypeNode) => ArrayTypeNode; 11599 /** @deprecated Use `factory.updateArrayTypeNode` or the factory supplied by your transformation context instead. */ 11600 const updateArrayTypeNode: (node: ArrayTypeNode, elementType: TypeNode) => ArrayTypeNode; 11601 /** @deprecated Use `factory.createTupleTypeNode` or the factory supplied by your transformation context instead. */ 11602 const createTupleTypeNode: (elements: readonly (TypeNode | NamedTupleMember)[]) => TupleTypeNode; 11603 /** @deprecated Use `factory.updateTupleTypeNode` or the factory supplied by your transformation context instead. */ 11604 const updateTupleTypeNode: (node: TupleTypeNode, elements: readonly (TypeNode | NamedTupleMember)[]) => TupleTypeNode; 11605 /** @deprecated Use `factory.createOptionalTypeNode` or the factory supplied by your transformation context instead. */ 11606 const createOptionalTypeNode: (type: TypeNode) => OptionalTypeNode; 11607 /** @deprecated Use `factory.updateOptionalTypeNode` or the factory supplied by your transformation context instead. */ 11608 const updateOptionalTypeNode: (node: OptionalTypeNode, type: TypeNode) => OptionalTypeNode; 11609 /** @deprecated Use `factory.createRestTypeNode` or the factory supplied by your transformation context instead. */ 11610 const createRestTypeNode: (type: TypeNode) => RestTypeNode; 11611 /** @deprecated Use `factory.updateRestTypeNode` or the factory supplied by your transformation context instead. */ 11612 const updateRestTypeNode: (node: RestTypeNode, type: TypeNode) => RestTypeNode; 11613 /** @deprecated Use `factory.createUnionTypeNode` or the factory supplied by your transformation context instead. */ 11614 const createUnionTypeNode: (types: readonly TypeNode[]) => UnionTypeNode; 11615 /** @deprecated Use `factory.updateUnionTypeNode` or the factory supplied by your transformation context instead. */ 11616 const updateUnionTypeNode: (node: UnionTypeNode, types: NodeArray<TypeNode>) => UnionTypeNode; 11617 /** @deprecated Use `factory.createIntersectionTypeNode` or the factory supplied by your transformation context instead. */ 11618 const createIntersectionTypeNode: (types: readonly TypeNode[]) => IntersectionTypeNode; 11619 /** @deprecated Use `factory.updateIntersectionTypeNode` or the factory supplied by your transformation context instead. */ 11620 const updateIntersectionTypeNode: (node: IntersectionTypeNode, types: NodeArray<TypeNode>) => IntersectionTypeNode; 11621 /** @deprecated Use `factory.createConditionalTypeNode` or the factory supplied by your transformation context instead. */ 11622 const createConditionalTypeNode: (checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode) => ConditionalTypeNode; 11623 /** @deprecated Use `factory.updateConditionalTypeNode` or the factory supplied by your transformation context instead. */ 11624 const updateConditionalTypeNode: (node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode) => ConditionalTypeNode; 11625 /** @deprecated Use `factory.createInferTypeNode` or the factory supplied by your transformation context instead. */ 11626 const createInferTypeNode: (typeParameter: TypeParameterDeclaration) => InferTypeNode; 11627 /** @deprecated Use `factory.updateInferTypeNode` or the factory supplied by your transformation context instead. */ 11628 const updateInferTypeNode: (node: InferTypeNode, typeParameter: TypeParameterDeclaration) => InferTypeNode; 11629 /** @deprecated Use `factory.createImportTypeNode` or the factory supplied by your transformation context instead. */ 11630 const createImportTypeNode: { 11631 (argument: TypeNode, assertions?: ImportTypeAssertionContainer | undefined, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode; 11632 (argument: TypeNode, assertions?: ImportTypeAssertionContainer | undefined, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode; 11633 (argument: TypeNode, qualifier?: EntityName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode; 11634 }; 11635 /** @deprecated Use `factory.updateImportTypeNode` or the factory supplied by your transformation context instead. */ 11636 const updateImportTypeNode: { 11637 (node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode; 11638 (node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined): ImportTypeNode; 11639 }; 11640 /** @deprecated Use `factory.createParenthesizedType` or the factory supplied by your transformation context instead. */ 11641 const createParenthesizedType: (type: TypeNode) => ParenthesizedTypeNode; 11642 /** @deprecated Use `factory.updateParenthesizedType` or the factory supplied by your transformation context instead. */ 11643 const updateParenthesizedType: (node: ParenthesizedTypeNode, type: TypeNode) => ParenthesizedTypeNode; 11644 /** @deprecated Use `factory.createThisTypeNode` or the factory supplied by your transformation context instead. */ 11645 const createThisTypeNode: () => ThisTypeNode; 11646 /** @deprecated Use `factory.updateTypeOperatorNode` or the factory supplied by your transformation context instead. */ 11647 const updateTypeOperatorNode: (node: TypeOperatorNode, type: TypeNode) => TypeOperatorNode; 11648 /** @deprecated Use `factory.createIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */ 11649 const createIndexedAccessTypeNode: (objectType: TypeNode, indexType: TypeNode) => IndexedAccessTypeNode; 11650 /** @deprecated Use `factory.updateIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */ 11651 const updateIndexedAccessTypeNode: (node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode) => IndexedAccessTypeNode; 11652 /** @deprecated Use `factory.createMappedTypeNode` or the factory supplied by your transformation context instead. */ 11653 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; 11654 /** @deprecated Use `factory.updateMappedTypeNode` or the factory supplied by your transformation context instead. */ 11655 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; 11656 /** @deprecated Use `factory.createLiteralTypeNode` or the factory supplied by your transformation context instead. */ 11657 const createLiteralTypeNode: (literal: LiteralExpression | BooleanLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode; 11658 /** @deprecated Use `factory.updateLiteralTypeNode` or the factory supplied by your transformation context instead. */ 11659 const updateLiteralTypeNode: (node: LiteralTypeNode, literal: LiteralExpression | BooleanLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode; 11660 /** @deprecated Use `factory.createObjectBindingPattern` or the factory supplied by your transformation context instead. */ 11661 const createObjectBindingPattern: (elements: readonly BindingElement[]) => ObjectBindingPattern; 11662 /** @deprecated Use `factory.updateObjectBindingPattern` or the factory supplied by your transformation context instead. */ 11663 const updateObjectBindingPattern: (node: ObjectBindingPattern, elements: readonly BindingElement[]) => ObjectBindingPattern; 11664 /** @deprecated Use `factory.createArrayBindingPattern` or the factory supplied by your transformation context instead. */ 11665 const createArrayBindingPattern: (elements: readonly ArrayBindingElement[]) => ArrayBindingPattern; 11666 /** @deprecated Use `factory.updateArrayBindingPattern` or the factory supplied by your transformation context instead. */ 11667 const updateArrayBindingPattern: (node: ArrayBindingPattern, elements: readonly ArrayBindingElement[]) => ArrayBindingPattern; 11668 /** @deprecated Use `factory.createBindingElement` or the factory supplied by your transformation context instead. */ 11669 const createBindingElement: (dotDotDotToken: DotDotDotToken | undefined, propertyName: string | PropertyName | undefined, name: string | BindingName, initializer?: Expression | undefined) => BindingElement; 11670 /** @deprecated Use `factory.updateBindingElement` or the factory supplied by your transformation context instead. */ 11671 const updateBindingElement: (node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, initializer: Expression | undefined) => BindingElement; 11672 /** @deprecated Use `factory.createArrayLiteralExpression` or the factory supplied by your transformation context instead. */ 11673 const createArrayLiteral: (elements?: readonly Expression[] | undefined, multiLine?: boolean | undefined) => ArrayLiteralExpression; 11674 /** @deprecated Use `factory.updateArrayLiteralExpression` or the factory supplied by your transformation context instead. */ 11675 const updateArrayLiteral: (node: ArrayLiteralExpression, elements: readonly Expression[]) => ArrayLiteralExpression; 11676 /** @deprecated Use `factory.createObjectLiteralExpression` or the factory supplied by your transformation context instead. */ 11677 const createObjectLiteral: (properties?: readonly ObjectLiteralElementLike[] | undefined, multiLine?: boolean | undefined) => ObjectLiteralExpression; 11678 /** @deprecated Use `factory.updateObjectLiteralExpression` or the factory supplied by your transformation context instead. */ 11679 const updateObjectLiteral: (node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]) => ObjectLiteralExpression; 11680 /** @deprecated Use `factory.createPropertyAccessExpression` or the factory supplied by your transformation context instead. */ 11681 const createPropertyAccess: (expression: Expression, name: string | MemberName) => PropertyAccessExpression; 11682 /** @deprecated Use `factory.updatePropertyAccessExpression` or the factory supplied by your transformation context instead. */ 11683 const updatePropertyAccess: (node: PropertyAccessExpression, expression: Expression, name: MemberName) => PropertyAccessExpression; 11684 /** @deprecated Use `factory.createPropertyAccessChain` or the factory supplied by your transformation context instead. */ 11685 const createPropertyAccessChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, name: string | MemberName) => PropertyAccessChain; 11686 /** @deprecated Use `factory.updatePropertyAccessChain` or the factory supplied by your transformation context instead. */ 11687 const updatePropertyAccessChain: (node: PropertyAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: MemberName) => PropertyAccessChain; 11688 /** @deprecated Use `factory.createElementAccessExpression` or the factory supplied by your transformation context instead. */ 11689 const createElementAccess: (expression: Expression, index: number | Expression) => ElementAccessExpression; 11690 /** @deprecated Use `factory.updateElementAccessExpression` or the factory supplied by your transformation context instead. */ 11691 const updateElementAccess: (node: ElementAccessExpression, expression: Expression, argumentExpression: Expression) => ElementAccessExpression; 11692 /** @deprecated Use `factory.createElementAccessChain` or the factory supplied by your transformation context instead. */ 11693 const createElementAccessChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, index: number | Expression) => ElementAccessChain; 11694 /** @deprecated Use `factory.updateElementAccessChain` or the factory supplied by your transformation context instead. */ 11695 const updateElementAccessChain: (node: ElementAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression) => ElementAccessChain; 11696 /** @deprecated Use `factory.createCallExpression` or the factory supplied by your transformation context instead. */ 11697 const createCall: (expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => CallExpression; 11698 /** @deprecated Use `factory.updateCallExpression` or the factory supplied by your transformation context instead. */ 11699 const updateCall: (node: CallExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]) => CallExpression; 11700 /** @deprecated Use `factory.createCallChain` or the factory supplied by your transformation context instead. */ 11701 const createCallChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => CallChain; 11702 /** @deprecated Use `factory.updateCallChain` or the factory supplied by your transformation context instead. */ 11703 const updateCallChain: (node: CallChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]) => CallChain; 11704 /** @deprecated Use `factory.createNewExpression` or the factory supplied by your transformation context instead. */ 11705 const createNew: (expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => NewExpression; 11706 /** @deprecated Use `factory.updateNewExpression` or the factory supplied by your transformation context instead. */ 11707 const updateNew: (node: NewExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => NewExpression; 11708 /** @deprecated Use `factory.createTypeAssertion` or the factory supplied by your transformation context instead. */ 11709 const createTypeAssertion: (type: TypeNode, expression: Expression) => TypeAssertion; 11710 /** @deprecated Use `factory.updateTypeAssertion` or the factory supplied by your transformation context instead. */ 11711 const updateTypeAssertion: (node: TypeAssertion, type: TypeNode, expression: Expression) => TypeAssertion; 11712 /** @deprecated Use `factory.createParenthesizedExpression` or the factory supplied by your transformation context instead. */ 11713 const createParen: (expression: Expression) => ParenthesizedExpression; 11714 /** @deprecated Use `factory.updateParenthesizedExpression` or the factory supplied by your transformation context instead. */ 11715 const updateParen: (node: ParenthesizedExpression, expression: Expression) => ParenthesizedExpression; 11716 /** @deprecated Use `factory.createFunctionExpression` or the factory supplied by your transformation context instead. */ 11717 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; 11718 /** @deprecated Use `factory.updateFunctionExpression` or the factory supplied by your transformation context instead. */ 11719 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; 11720 /** @deprecated Use `factory.createDeleteExpression` or the factory supplied by your transformation context instead. */ 11721 const createDelete: (expression: Expression) => DeleteExpression; 11722 /** @deprecated Use `factory.updateDeleteExpression` or the factory supplied by your transformation context instead. */ 11723 const updateDelete: (node: DeleteExpression, expression: Expression) => DeleteExpression; 11724 /** @deprecated Use `factory.createTypeOfExpression` or the factory supplied by your transformation context instead. */ 11725 const createTypeOf: (expression: Expression) => TypeOfExpression; 11726 /** @deprecated Use `factory.updateTypeOfExpression` or the factory supplied by your transformation context instead. */ 11727 const updateTypeOf: (node: TypeOfExpression, expression: Expression) => TypeOfExpression; 11728 /** @deprecated Use `factory.createVoidExpression` or the factory supplied by your transformation context instead. */ 11729 const createVoid: (expression: Expression) => VoidExpression; 11730 /** @deprecated Use `factory.updateVoidExpression` or the factory supplied by your transformation context instead. */ 11731 const updateVoid: (node: VoidExpression, expression: Expression) => VoidExpression; 11732 /** @deprecated Use `factory.createAwaitExpression` or the factory supplied by your transformation context instead. */ 11733 const createAwait: (expression: Expression) => AwaitExpression; 11734 /** @deprecated Use `factory.updateAwaitExpression` or the factory supplied by your transformation context instead. */ 11735 const updateAwait: (node: AwaitExpression, expression: Expression) => AwaitExpression; 11736 /** @deprecated Use `factory.createPrefixExpression` or the factory supplied by your transformation context instead. */ 11737 const createPrefix: (operator: PrefixUnaryOperator, operand: Expression) => PrefixUnaryExpression; 11738 /** @deprecated Use `factory.updatePrefixExpression` or the factory supplied by your transformation context instead. */ 11739 const updatePrefix: (node: PrefixUnaryExpression, operand: Expression) => PrefixUnaryExpression; 11740 /** @deprecated Use `factory.createPostfixUnaryExpression` or the factory supplied by your transformation context instead. */ 11741 const createPostfix: (operand: Expression, operator: PostfixUnaryOperator) => PostfixUnaryExpression; 11742 /** @deprecated Use `factory.updatePostfixUnaryExpression` or the factory supplied by your transformation context instead. */ 11743 const updatePostfix: (node: PostfixUnaryExpression, operand: Expression) => PostfixUnaryExpression; 11744 /** @deprecated Use `factory.createBinaryExpression` or the factory supplied by your transformation context instead. */ 11745 const createBinary: (left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression) => BinaryExpression; 11746 /** @deprecated Use `factory.updateConditionalExpression` or the factory supplied by your transformation context instead. */ 11747 const updateConditional: (node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression) => ConditionalExpression; 11748 /** @deprecated Use `factory.createTemplateExpression` or the factory supplied by your transformation context instead. */ 11749 const createTemplateExpression: (head: TemplateHead, templateSpans: readonly TemplateSpan[]) => TemplateExpression; 11750 /** @deprecated Use `factory.updateTemplateExpression` or the factory supplied by your transformation context instead. */ 11751 const updateTemplateExpression: (node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]) => TemplateExpression; 11752 /** @deprecated Use `factory.createTemplateHead` or the factory supplied by your transformation context instead. */ 11753 const createTemplateHead: { 11754 (text: string, rawText?: string | undefined, templateFlags?: TokenFlags | undefined): TemplateHead; 11755 (text: string | undefined, rawText: string, templateFlags?: TokenFlags | undefined): TemplateHead; 11756 }; 11757 /** @deprecated Use `factory.createTemplateMiddle` or the factory supplied by your transformation context instead. */ 11758 const createTemplateMiddle: { 11759 (text: string, rawText?: string | undefined, templateFlags?: TokenFlags | undefined): TemplateMiddle; 11760 (text: string | undefined, rawText: string, templateFlags?: TokenFlags | undefined): TemplateMiddle; 11761 }; 11762 /** @deprecated Use `factory.createTemplateTail` or the factory supplied by your transformation context instead. */ 11763 const createTemplateTail: { 11764 (text: string, rawText?: string | undefined, templateFlags?: TokenFlags | undefined): TemplateTail; 11765 (text: string | undefined, rawText: string, templateFlags?: TokenFlags | undefined): TemplateTail; 11766 }; 11767 /** @deprecated Use `factory.createNoSubstitutionTemplateLiteral` or the factory supplied by your transformation context instead. */ 11768 const createNoSubstitutionTemplateLiteral: { 11769 (text: string, rawText?: string | undefined): NoSubstitutionTemplateLiteral; 11770 (text: string | undefined, rawText: string): NoSubstitutionTemplateLiteral; 11771 }; 11772 /** @deprecated Use `factory.updateYieldExpression` or the factory supplied by your transformation context instead. */ 11773 const updateYield: (node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression | undefined) => YieldExpression; 11774 /** @deprecated Use `factory.createSpreadExpression` or the factory supplied by your transformation context instead. */ 11775 const createSpread: (expression: Expression) => SpreadElement; 11776 /** @deprecated Use `factory.updateSpreadExpression` or the factory supplied by your transformation context instead. */ 11777 const updateSpread: (node: SpreadElement, expression: Expression) => SpreadElement; 11778 /** @deprecated Use `factory.createOmittedExpression` or the factory supplied by your transformation context instead. */ 11779 const createOmittedExpression: () => OmittedExpression; 11780 /** @deprecated Use `factory.createAsExpression` or the factory supplied by your transformation context instead. */ 11781 const createAsExpression: (expression: Expression, type: TypeNode) => AsExpression; 11782 /** @deprecated Use `factory.updateAsExpression` or the factory supplied by your transformation context instead. */ 11783 const updateAsExpression: (node: AsExpression, expression: Expression, type: TypeNode) => AsExpression; 11784 /** @deprecated Use `factory.createNonNullExpression` or the factory supplied by your transformation context instead. */ 11785 const createNonNullExpression: (expression: Expression) => NonNullExpression; 11786 /** @deprecated Use `factory.updateNonNullExpression` or the factory supplied by your transformation context instead. */ 11787 const updateNonNullExpression: (node: NonNullExpression, expression: Expression) => NonNullExpression; 11788 /** @deprecated Use `factory.createNonNullChain` or the factory supplied by your transformation context instead. */ 11789 const createNonNullChain: (expression: Expression) => NonNullChain; 11790 /** @deprecated Use `factory.updateNonNullChain` or the factory supplied by your transformation context instead. */ 11791 const updateNonNullChain: (node: NonNullChain, expression: Expression) => NonNullChain; 11792 /** @deprecated Use `factory.createMetaProperty` or the factory supplied by your transformation context instead. */ 11793 const createMetaProperty: (keywordToken: SyntaxKind.ImportKeyword | SyntaxKind.NewKeyword, name: Identifier) => MetaProperty; 11794 /** @deprecated Use `factory.updateMetaProperty` or the factory supplied by your transformation context instead. */ 11795 const updateMetaProperty: (node: MetaProperty, name: Identifier) => MetaProperty; 11796 /** @deprecated Use `factory.createTemplateSpan` or the factory supplied by your transformation context instead. */ 11797 const createTemplateSpan: (expression: Expression, literal: TemplateMiddle | TemplateTail) => TemplateSpan; 11798 /** @deprecated Use `factory.updateTemplateSpan` or the factory supplied by your transformation context instead. */ 11799 const updateTemplateSpan: (node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail) => TemplateSpan; 11800 /** @deprecated Use `factory.createSemicolonClassElement` or the factory supplied by your transformation context instead. */ 11801 const createSemicolonClassElement: () => SemicolonClassElement; 11802 /** @deprecated Use `factory.createBlock` or the factory supplied by your transformation context instead. */ 11803 const createBlock: (statements: readonly Statement[], multiLine?: boolean | undefined) => Block; 11804 /** @deprecated Use `factory.updateBlock` or the factory supplied by your transformation context instead. */ 11805 const updateBlock: (node: Block, statements: readonly Statement[]) => Block; 11806 /** @deprecated Use `factory.createVariableStatement` or the factory supplied by your transformation context instead. */ 11807 const createVariableStatement: (modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList | readonly VariableDeclaration[]) => VariableStatement; 11808 /** @deprecated Use `factory.updateVariableStatement` or the factory supplied by your transformation context instead. */ 11809 const updateVariableStatement: (node: VariableStatement, modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList) => VariableStatement; 11810 /** @deprecated Use `factory.createEmptyStatement` or the factory supplied by your transformation context instead. */ 11811 const createEmptyStatement: () => EmptyStatement; 11812 /** @deprecated Use `factory.createExpressionStatement` or the factory supplied by your transformation context instead. */ 11813 const createExpressionStatement: (expression: Expression) => ExpressionStatement; 11814 /** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */ 11815 const updateExpressionStatement: (node: ExpressionStatement, expression: Expression) => ExpressionStatement; 11816 /** @deprecated Use `factory.createExpressionStatement` or the factory supplied by your transformation context instead. */ 11817 const createStatement: (expression: Expression) => ExpressionStatement; 11818 /** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */ 11819 const updateStatement: (node: ExpressionStatement, expression: Expression) => ExpressionStatement; 11820 /** @deprecated Use `factory.createIfStatement` or the factory supplied by your transformation context instead. */ 11821 const createIf: (expression: Expression, thenStatement: Statement, elseStatement?: Statement | undefined) => IfStatement; 11822 /** @deprecated Use `factory.updateIfStatement` or the factory supplied by your transformation context instead. */ 11823 const updateIf: (node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined) => IfStatement; 11824 /** @deprecated Use `factory.createDoStatement` or the factory supplied by your transformation context instead. */ 11825 const createDo: (statement: Statement, expression: Expression) => DoStatement; 11826 /** @deprecated Use `factory.updateDoStatement` or the factory supplied by your transformation context instead. */ 11827 const updateDo: (node: DoStatement, statement: Statement, expression: Expression) => DoStatement; 11828 /** @deprecated Use `factory.createWhileStatement` or the factory supplied by your transformation context instead. */ 11829 const createWhile: (expression: Expression, statement: Statement) => WhileStatement; 11830 /** @deprecated Use `factory.updateWhileStatement` or the factory supplied by your transformation context instead. */ 11831 const updateWhile: (node: WhileStatement, expression: Expression, statement: Statement) => WhileStatement; 11832 /** @deprecated Use `factory.createForStatement` or the factory supplied by your transformation context instead. */ 11833 const createFor: (initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement) => ForStatement; 11834 /** @deprecated Use `factory.updateForStatement` or the factory supplied by your transformation context instead. */ 11835 const updateFor: (node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement) => ForStatement; 11836 /** @deprecated Use `factory.createForInStatement` or the factory supplied by your transformation context instead. */ 11837 const createForIn: (initializer: ForInitializer, expression: Expression, statement: Statement) => ForInStatement; 11838 /** @deprecated Use `factory.updateForInStatement` or the factory supplied by your transformation context instead. */ 11839 const updateForIn: (node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement) => ForInStatement; 11840 /** @deprecated Use `factory.createForOfStatement` or the factory supplied by your transformation context instead. */ 11841 const createForOf: (awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement) => ForOfStatement; 11842 /** @deprecated Use `factory.updateForOfStatement` or the factory supplied by your transformation context instead. */ 11843 const updateForOf: (node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement) => ForOfStatement; 11844 /** @deprecated Use `factory.createContinueStatement` or the factory supplied by your transformation context instead. */ 11845 const createContinue: (label?: string | Identifier | undefined) => ContinueStatement; 11846 /** @deprecated Use `factory.updateContinueStatement` or the factory supplied by your transformation context instead. */ 11847 const updateContinue: (node: ContinueStatement, label: Identifier | undefined) => ContinueStatement; 11848 /** @deprecated Use `factory.createBreakStatement` or the factory supplied by your transformation context instead. */ 11849 const createBreak: (label?: string | Identifier | undefined) => BreakStatement; 11850 /** @deprecated Use `factory.updateBreakStatement` or the factory supplied by your transformation context instead. */ 11851 const updateBreak: (node: BreakStatement, label: Identifier | undefined) => BreakStatement; 11852 /** @deprecated Use `factory.createReturnStatement` or the factory supplied by your transformation context instead. */ 11853 const createReturn: (expression?: Expression | undefined) => ReturnStatement; 11854 /** @deprecated Use `factory.updateReturnStatement` or the factory supplied by your transformation context instead. */ 11855 const updateReturn: (node: ReturnStatement, expression: Expression | undefined) => ReturnStatement; 11856 /** @deprecated Use `factory.createWithStatement` or the factory supplied by your transformation context instead. */ 11857 const createWith: (expression: Expression, statement: Statement) => WithStatement; 11858 /** @deprecated Use `factory.updateWithStatement` or the factory supplied by your transformation context instead. */ 11859 const updateWith: (node: WithStatement, expression: Expression, statement: Statement) => WithStatement; 11860 /** @deprecated Use `factory.createSwitchStatement` or the factory supplied by your transformation context instead. */ 11861 const createSwitch: (expression: Expression, caseBlock: CaseBlock) => SwitchStatement; 11862 /** @deprecated Use `factory.updateSwitchStatement` or the factory supplied by your transformation context instead. */ 11863 const updateSwitch: (node: SwitchStatement, expression: Expression, caseBlock: CaseBlock) => SwitchStatement; 11864 /** @deprecated Use `factory.createLabelStatement` or the factory supplied by your transformation context instead. */ 11865 const createLabel: (label: string | Identifier, statement: Statement) => LabeledStatement; 11866 /** @deprecated Use `factory.updateLabelStatement` or the factory supplied by your transformation context instead. */ 11867 const updateLabel: (node: LabeledStatement, label: Identifier, statement: Statement) => LabeledStatement; 11868 /** @deprecated Use `factory.createThrowStatement` or the factory supplied by your transformation context instead. */ 11869 const createThrow: (expression: Expression) => ThrowStatement; 11870 /** @deprecated Use `factory.updateThrowStatement` or the factory supplied by your transformation context instead. */ 11871 const updateThrow: (node: ThrowStatement, expression: Expression) => ThrowStatement; 11872 /** @deprecated Use `factory.createTryStatement` or the factory supplied by your transformation context instead. */ 11873 const createTry: (tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined) => TryStatement; 11874 /** @deprecated Use `factory.updateTryStatement` or the factory supplied by your transformation context instead. */ 11875 const updateTry: (node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined) => TryStatement; 11876 /** @deprecated Use `factory.createDebuggerStatement` or the factory supplied by your transformation context instead. */ 11877 const createDebuggerStatement: () => DebuggerStatement; 11878 /** @deprecated Use `factory.createVariableDeclarationList` or the factory supplied by your transformation context instead. */ 11879 const createVariableDeclarationList: (declarations: readonly VariableDeclaration[], flags?: NodeFlags | undefined) => VariableDeclarationList; 11880 /** @deprecated Use `factory.updateVariableDeclarationList` or the factory supplied by your transformation context instead. */ 11881 const updateVariableDeclarationList: (node: VariableDeclarationList, declarations: readonly VariableDeclaration[]) => VariableDeclarationList; 11882 /** @deprecated Use `factory.createFunctionDeclaration` or the factory supplied by your transformation context instead. */ 11883 const createFunctionDeclaration: { 11884 (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; 11885 (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; 11886 }; 11887 /** @deprecated Use `factory.updateFunctionDeclaration` or the factory supplied by your transformation context instead. */ 11888 const updateFunctionDeclaration: { 11889 (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; 11890 (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; 11891 }; 11892 /** @deprecated Use `factory.createClassDeclaration` or the factory supplied by your transformation context instead. */ 11893 const createClassDeclaration: { 11894 (modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; 11895 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; 11896 }; 11897 /** @deprecated Use `factory.updateClassDeclaration` or the factory supplied by your transformation context instead. */ 11898 const updateClassDeclaration: { 11899 (node: ClassDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; 11900 (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; 11901 }; 11902 /** @deprecated Use `factory.createInterfaceDeclaration` or the factory supplied by your transformation context instead. */ 11903 const createInterfaceDeclaration: { 11904 (modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 11905 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 11906 }; 11907 /** @deprecated Use `factory.updateInterfaceDeclaration` or the factory supplied by your transformation context instead. */ 11908 const updateInterfaceDeclaration: { 11909 (node: InterfaceDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 11910 (node: InterfaceDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 11911 }; 11912 /** @deprecated Use `factory.createTypeAliasDeclaration` or the factory supplied by your transformation context instead. */ 11913 const createTypeAliasDeclaration: { 11914 (modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 11915 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 11916 }; 11917 /** @deprecated Use `factory.updateTypeAliasDeclaration` or the factory supplied by your transformation context instead. */ 11918 const updateTypeAliasDeclaration: { 11919 (node: TypeAliasDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 11920 (node: TypeAliasDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 11921 }; 11922 /** @deprecated Use `factory.createEnumDeclaration` or the factory supplied by your transformation context instead. */ 11923 const createEnumDeclaration: { 11924 (modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration; 11925 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration; 11926 }; 11927 /** @deprecated Use `factory.updateEnumDeclaration` or the factory supplied by your transformation context instead. */ 11928 const updateEnumDeclaration: { 11929 (node: EnumDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; 11930 (node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; 11931 }; 11932 /** @deprecated Use `factory.createModuleDeclaration` or the factory supplied by your transformation context instead. */ 11933 const createModuleDeclaration: { 11934 (modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags | undefined): ModuleDeclaration; 11935 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags | undefined): ModuleDeclaration; 11936 }; 11937 /** @deprecated Use `factory.updateModuleDeclaration` or the factory supplied by your transformation context instead. */ 11938 const updateModuleDeclaration: { 11939 (node: ModuleDeclaration, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration; 11940 (node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration; 11941 }; 11942 /** @deprecated Use `factory.createModuleBlock` or the factory supplied by your transformation context instead. */ 11943 const createModuleBlock: (statements: readonly Statement[]) => ModuleBlock; 11944 /** @deprecated Use `factory.updateModuleBlock` or the factory supplied by your transformation context instead. */ 11945 const updateModuleBlock: (node: ModuleBlock, statements: readonly Statement[]) => ModuleBlock; 11946 /** @deprecated Use `factory.createCaseBlock` or the factory supplied by your transformation context instead. */ 11947 const createCaseBlock: (clauses: readonly CaseOrDefaultClause[]) => CaseBlock; 11948 /** @deprecated Use `factory.updateCaseBlock` or the factory supplied by your transformation context instead. */ 11949 const updateCaseBlock: (node: CaseBlock, clauses: readonly CaseOrDefaultClause[]) => CaseBlock; 11950 /** @deprecated Use `factory.createNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */ 11951 const createNamespaceExportDeclaration: (name: string | Identifier) => NamespaceExportDeclaration; 11952 /** @deprecated Use `factory.updateNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */ 11953 const updateNamespaceExportDeclaration: (node: NamespaceExportDeclaration, name: Identifier) => NamespaceExportDeclaration; 11954 /** @deprecated Use `factory.createImportEqualsDeclaration` or the factory supplied by your transformation context instead. */ 11955 const createImportEqualsDeclaration: { 11956 (modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 11957 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 11958 }; 11959 /** @deprecated Use `factory.updateImportEqualsDeclaration` or the factory supplied by your transformation context instead. */ 11960 const updateImportEqualsDeclaration: { 11961 (node: ImportEqualsDeclaration, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 11962 (node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 11963 }; 11964 /** @deprecated Use `factory.createImportDeclaration` or the factory supplied by your transformation context instead. */ 11965 const createImportDeclaration: { 11966 (modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause | undefined): ImportDeclaration; 11967 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause | undefined): ImportDeclaration; 11968 }; 11969 /** @deprecated Use `factory.updateImportDeclaration` or the factory supplied by your transformation context instead. */ 11970 const updateImportDeclaration: { 11971 (node: ImportDeclaration, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration; 11972 (node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration; 11973 }; 11974 /** @deprecated Use `factory.createNamespaceImport` or the factory supplied by your transformation context instead. */ 11975 const createNamespaceImport: (name: Identifier) => NamespaceImport; 11976 /** @deprecated Use `factory.updateNamespaceImport` or the factory supplied by your transformation context instead. */ 11977 const updateNamespaceImport: (node: NamespaceImport, name: Identifier) => NamespaceImport; 11978 /** @deprecated Use `factory.createNamedImports` or the factory supplied by your transformation context instead. */ 11979 const createNamedImports: (elements: readonly ImportSpecifier[]) => NamedImports; 11980 /** @deprecated Use `factory.updateNamedImports` or the factory supplied by your transformation context instead. */ 11981 const updateNamedImports: (node: NamedImports, elements: readonly ImportSpecifier[]) => NamedImports; 11982 /** @deprecated Use `factory.createImportSpecifier` or the factory supplied by your transformation context instead. */ 11983 const createImportSpecifier: (isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier) => ImportSpecifier; 11984 /** @deprecated Use `factory.updateImportSpecifier` or the factory supplied by your transformation context instead. */ 11985 const updateImportSpecifier: (node: ImportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier) => ImportSpecifier; 11986 /** @deprecated Use `factory.createExportAssignment` or the factory supplied by your transformation context instead. */ 11987 const createExportAssignment: { 11988 (modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment; 11989 (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment; 11990 }; 11991 /** @deprecated Use `factory.updateExportAssignment` or the factory supplied by your transformation context instead. */ 11992 const updateExportAssignment: { 11993 (node: ExportAssignment, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment; 11994 (node: ExportAssignment, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment; 11995 }; 11996 /** @deprecated Use `factory.createNamedExports` or the factory supplied by your transformation context instead. */ 11997 const createNamedExports: (elements: readonly ExportSpecifier[]) => NamedExports; 11998 /** @deprecated Use `factory.updateNamedExports` or the factory supplied by your transformation context instead. */ 11999 const updateNamedExports: (node: NamedExports, elements: readonly ExportSpecifier[]) => NamedExports; 12000 /** @deprecated Use `factory.createExportSpecifier` or the factory supplied by your transformation context instead. */ 12001 const createExportSpecifier: (isTypeOnly: boolean, propertyName: string | Identifier | undefined, name: string | Identifier) => ExportSpecifier; 12002 /** @deprecated Use `factory.updateExportSpecifier` or the factory supplied by your transformation context instead. */ 12003 const updateExportSpecifier: (node: ExportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier) => ExportSpecifier; 12004 /** @deprecated Use `factory.createExternalModuleReference` or the factory supplied by your transformation context instead. */ 12005 const createExternalModuleReference: (expression: Expression) => ExternalModuleReference; 12006 /** @deprecated Use `factory.updateExternalModuleReference` or the factory supplied by your transformation context instead. */ 12007 const updateExternalModuleReference: (node: ExternalModuleReference, expression: Expression) => ExternalModuleReference; 12008 /** @deprecated Use `factory.createJSDocTypeExpression` or the factory supplied by your transformation context instead. */ 12009 const createJSDocTypeExpression: (type: TypeNode) => JSDocTypeExpression; 12010 /** @deprecated Use `factory.createJSDocTypeTag` or the factory supplied by your transformation context instead. */ 12011 const createJSDocTypeTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocTypeTag; 12012 /** @deprecated Use `factory.createJSDocReturnTag` or the factory supplied by your transformation context instead. */ 12013 const createJSDocReturnTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocReturnTag; 12014 /** @deprecated Use `factory.createJSDocThisTag` or the factory supplied by your transformation context instead. */ 12015 const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocThisTag; 12016 /** @deprecated Use `factory.createJSDocComment` or the factory supplied by your transformation context instead. */ 12017 const createJSDocComment: (comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined) => JSDoc; 12018 /** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */ 12019 const createJSDocParameterTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocParameterTag; 12020 /** @deprecated Use `factory.createJSDocClassTag` or the factory supplied by your transformation context instead. */ 12021 const createJSDocClassTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocClassTag; 12022 /** @deprecated Use `factory.createJSDocAugmentsTag` or the factory supplied by your transformation context instead. */ 12023 const createJSDocAugmentsTag: (tagName: Identifier | undefined, className: ExpressionWithTypeArguments & { 12024 readonly expression: Identifier | PropertyAccessEntityNameExpression; 12025 }, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocAugmentsTag; 12026 /** @deprecated Use `factory.createJSDocEnumTag` or the factory supplied by your transformation context instead. */ 12027 const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocEnumTag; 12028 /** @deprecated Use `factory.createJSDocTemplateTag` or the factory supplied by your transformation context instead. */ 12029 const createJSDocTemplateTag: (tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray<JSDocComment> | undefined) => JSDocTemplateTag; 12030 /** @deprecated Use `factory.createJSDocTypedefTag` or the factory supplied by your transformation context instead. */ 12031 const createJSDocTypedefTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeLiteral | JSDocTypeExpression | undefined, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocTypedefTag; 12032 /** @deprecated Use `factory.createJSDocCallbackTag` or the factory supplied by your transformation context instead. */ 12033 const createJSDocCallbackTag: (tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocCallbackTag; 12034 /** @deprecated Use `factory.createJSDocSignature` or the factory supplied by your transformation context instead. */ 12035 const createJSDocSignature: (typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag | undefined) => JSDocSignature; 12036 /** @deprecated Use `factory.createJSDocPropertyTag` or the factory supplied by your transformation context instead. */ 12037 const createJSDocPropertyTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocPropertyTag; 12038 /** @deprecated Use `factory.createJSDocTypeLiteral` or the factory supplied by your transformation context instead. */ 12039 const createJSDocTypeLiteral: (jsDocPropertyTags?: readonly JSDocPropertyLikeTag[] | undefined, isArrayType?: boolean | undefined) => JSDocTypeLiteral; 12040 /** @deprecated Use `factory.createJSDocImplementsTag` or the factory supplied by your transformation context instead. */ 12041 const createJSDocImplementsTag: (tagName: Identifier | undefined, className: ExpressionWithTypeArguments & { 12042 readonly expression: Identifier | PropertyAccessEntityNameExpression; 12043 }, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocImplementsTag; 12044 /** @deprecated Use `factory.createJSDocAuthorTag` or the factory supplied by your transformation context instead. */ 12045 const createJSDocAuthorTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocAuthorTag; 12046 /** @deprecated Use `factory.createJSDocPublicTag` or the factory supplied by your transformation context instead. */ 12047 const createJSDocPublicTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocPublicTag; 12048 /** @deprecated Use `factory.createJSDocPrivateTag` or the factory supplied by your transformation context instead. */ 12049 const createJSDocPrivateTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocPrivateTag; 12050 /** @deprecated Use `factory.createJSDocProtectedTag` or the factory supplied by your transformation context instead. */ 12051 const createJSDocProtectedTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocProtectedTag; 12052 /** @deprecated Use `factory.createJSDocReadonlyTag` or the factory supplied by your transformation context instead. */ 12053 const createJSDocReadonlyTag: (tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocReadonlyTag; 12054 /** @deprecated Use `factory.createJSDocUnknownTag` or the factory supplied by your transformation context instead. */ 12055 const createJSDocTag: (tagName: Identifier, comment?: string | NodeArray<JSDocComment> | undefined) => JSDocUnknownTag; 12056 /** @deprecated Use `factory.createJsxElement` or the factory supplied by your transformation context instead. */ 12057 const createJsxElement: (openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement) => JsxElement; 12058 /** @deprecated Use `factory.updateJsxElement` or the factory supplied by your transformation context instead. */ 12059 const updateJsxElement: (node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement) => JsxElement; 12060 /** @deprecated Use `factory.createJsxSelfClosingElement` or the factory supplied by your transformation context instead. */ 12061 const createJsxSelfClosingElement: (tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxSelfClosingElement; 12062 /** @deprecated Use `factory.updateJsxSelfClosingElement` or the factory supplied by your transformation context instead. */ 12063 const updateJsxSelfClosingElement: (node: JsxSelfClosingElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxSelfClosingElement; 12064 /** @deprecated Use `factory.createJsxOpeningElement` or the factory supplied by your transformation context instead. */ 12065 const createJsxOpeningElement: (tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxOpeningElement; 12066 /** @deprecated Use `factory.updateJsxOpeningElement` or the factory supplied by your transformation context instead. */ 12067 const updateJsxOpeningElement: (node: JsxOpeningElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxOpeningElement; 12068 /** @deprecated Use `factory.createJsxClosingElement` or the factory supplied by your transformation context instead. */ 12069 const createJsxClosingElement: (tagName: JsxTagNameExpression) => JsxClosingElement; 12070 /** @deprecated Use `factory.updateJsxClosingElement` or the factory supplied by your transformation context instead. */ 12071 const updateJsxClosingElement: (node: JsxClosingElement, tagName: JsxTagNameExpression) => JsxClosingElement; 12072 /** @deprecated Use `factory.createJsxFragment` or the factory supplied by your transformation context instead. */ 12073 const createJsxFragment: (openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) => JsxFragment; 12074 /** @deprecated Use `factory.createJsxText` or the factory supplied by your transformation context instead. */ 12075 const createJsxText: (text: string, containsOnlyTriviaWhiteSpaces?: boolean | undefined) => JsxText; 12076 /** @deprecated Use `factory.updateJsxText` or the factory supplied by your transformation context instead. */ 12077 const updateJsxText: (node: JsxText, text: string, containsOnlyTriviaWhiteSpaces?: boolean | undefined) => JsxText; 12078 /** @deprecated Use `factory.createJsxOpeningFragment` or the factory supplied by your transformation context instead. */ 12079 const createJsxOpeningFragment: () => JsxOpeningFragment; 12080 /** @deprecated Use `factory.createJsxJsxClosingFragment` or the factory supplied by your transformation context instead. */ 12081 const createJsxJsxClosingFragment: () => JsxClosingFragment; 12082 /** @deprecated Use `factory.updateJsxFragment` or the factory supplied by your transformation context instead. */ 12083 const updateJsxFragment: (node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) => JsxFragment; 12084 /** @deprecated Use `factory.createJsxAttribute` or the factory supplied by your transformation context instead. */ 12085 const createJsxAttribute: (name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute; 12086 /** @deprecated Use `factory.updateJsxAttribute` or the factory supplied by your transformation context instead. */ 12087 const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute; 12088 /** @deprecated Use `factory.createJsxAttributes` or the factory supplied by your transformation context instead. */ 12089 const createJsxAttributes: (properties: readonly JsxAttributeLike[]) => JsxAttributes; 12090 /** @deprecated Use `factory.updateJsxAttributes` or the factory supplied by your transformation context instead. */ 12091 const updateJsxAttributes: (node: JsxAttributes, properties: readonly JsxAttributeLike[]) => JsxAttributes; 12092 /** @deprecated Use `factory.createJsxSpreadAttribute` or the factory supplied by your transformation context instead. */ 12093 const createJsxSpreadAttribute: (expression: Expression) => JsxSpreadAttribute; 12094 /** @deprecated Use `factory.updateJsxSpreadAttribute` or the factory supplied by your transformation context instead. */ 12095 const updateJsxSpreadAttribute: (node: JsxSpreadAttribute, expression: Expression) => JsxSpreadAttribute; 12096 /** @deprecated Use `factory.createJsxExpression` or the factory supplied by your transformation context instead. */ 12097 const createJsxExpression: (dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined) => JsxExpression; 12098 /** @deprecated Use `factory.updateJsxExpression` or the factory supplied by your transformation context instead. */ 12099 const updateJsxExpression: (node: JsxExpression, expression: Expression | undefined) => JsxExpression; 12100 /** @deprecated Use `factory.createCaseClause` or the factory supplied by your transformation context instead. */ 12101 const createCaseClause: (expression: Expression, statements: readonly Statement[]) => CaseClause; 12102 /** @deprecated Use `factory.updateCaseClause` or the factory supplied by your transformation context instead. */ 12103 const updateCaseClause: (node: CaseClause, expression: Expression, statements: readonly Statement[]) => CaseClause; 12104 /** @deprecated Use `factory.createDefaultClause` or the factory supplied by your transformation context instead. */ 12105 const createDefaultClause: (statements: readonly Statement[]) => DefaultClause; 12106 /** @deprecated Use `factory.updateDefaultClause` or the factory supplied by your transformation context instead. */ 12107 const updateDefaultClause: (node: DefaultClause, statements: readonly Statement[]) => DefaultClause; 12108 /** @deprecated Use `factory.createHeritageClause` or the factory supplied by your transformation context instead. */ 12109 const createHeritageClause: (token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword, types: readonly ExpressionWithTypeArguments[]) => HeritageClause; 12110 /** @deprecated Use `factory.updateHeritageClause` or the factory supplied by your transformation context instead. */ 12111 const updateHeritageClause: (node: HeritageClause, types: readonly ExpressionWithTypeArguments[]) => HeritageClause; 12112 /** @deprecated Use `factory.createCatchClause` or the factory supplied by your transformation context instead. */ 12113 const createCatchClause: (variableDeclaration: string | VariableDeclaration | BindingName | undefined, block: Block) => CatchClause; 12114 /** @deprecated Use `factory.updateCatchClause` or the factory supplied by your transformation context instead. */ 12115 const updateCatchClause: (node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block) => CatchClause; 12116 /** @deprecated Use `factory.createPropertyAssignment` or the factory supplied by your transformation context instead. */ 12117 const createPropertyAssignment: (name: string | PropertyName, initializer: Expression) => PropertyAssignment; 12118 /** @deprecated Use `factory.updatePropertyAssignment` or the factory supplied by your transformation context instead. */ 12119 const updatePropertyAssignment: (node: PropertyAssignment, name: PropertyName, initializer: Expression) => PropertyAssignment; 12120 /** @deprecated Use `factory.createShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */ 12121 const createShorthandPropertyAssignment: (name: string | Identifier, objectAssignmentInitializer?: Expression | undefined) => ShorthandPropertyAssignment; 12122 /** @deprecated Use `factory.updateShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */ 12123 const updateShorthandPropertyAssignment: (node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression | undefined) => ShorthandPropertyAssignment; 12124 /** @deprecated Use `factory.createSpreadAssignment` or the factory supplied by your transformation context instead. */ 12125 const createSpreadAssignment: (expression: Expression) => SpreadAssignment; 12126 /** @deprecated Use `factory.updateSpreadAssignment` or the factory supplied by your transformation context instead. */ 12127 const updateSpreadAssignment: (node: SpreadAssignment, expression: Expression) => SpreadAssignment; 12128 /** @deprecated Use `factory.createEnumMember` or the factory supplied by your transformation context instead. */ 12129 const createEnumMember: (name: string | PropertyName, initializer?: Expression | undefined) => EnumMember; 12130 /** @deprecated Use `factory.updateEnumMember` or the factory supplied by your transformation context instead. */ 12131 const updateEnumMember: (node: EnumMember, name: PropertyName, initializer: Expression | undefined) => EnumMember; 12132 /** @deprecated Use `factory.updateSourceFile` or the factory supplied by your transformation context instead. */ 12133 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; 12134 /** @deprecated Use `factory.createNotEmittedStatement` or the factory supplied by your transformation context instead. */ 12135 const createNotEmittedStatement: (original: Node) => NotEmittedStatement; 12136 /** @deprecated Use `factory.createPartiallyEmittedExpression` or the factory supplied by your transformation context instead. */ 12137 const createPartiallyEmittedExpression: (expression: Expression, original?: Node | undefined) => PartiallyEmittedExpression; 12138 /** @deprecated Use `factory.updatePartiallyEmittedExpression` or the factory supplied by your transformation context instead. */ 12139 const updatePartiallyEmittedExpression: (node: PartiallyEmittedExpression, expression: Expression) => PartiallyEmittedExpression; 12140 /** @deprecated Use `factory.createCommaListExpression` or the factory supplied by your transformation context instead. */ 12141 const createCommaList: (elements: readonly Expression[]) => CommaListExpression; 12142 /** @deprecated Use `factory.updateCommaListExpression` or the factory supplied by your transformation context instead. */ 12143 const updateCommaList: (node: CommaListExpression, elements: readonly Expression[]) => CommaListExpression; 12144 /** @deprecated Use `factory.createBundle` or the factory supplied by your transformation context instead. */ 12145 const createBundle: (sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[] | undefined) => Bundle; 12146 /** @deprecated Use `factory.updateBundle` or the factory supplied by your transformation context instead. */ 12147 const updateBundle: (node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[] | undefined) => Bundle; 12148 /** @deprecated Use `factory.createImmediatelyInvokedFunctionExpression` or the factory supplied by your transformation context instead. */ 12149 const createImmediatelyInvokedFunctionExpression: { 12150 (statements: readonly Statement[]): CallExpression; 12151 (statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; 12152 }; 12153 /** @deprecated Use `factory.createImmediatelyInvokedArrowFunction` or the factory supplied by your transformation context instead. */ 12154 const createImmediatelyInvokedArrowFunction: { 12155 (statements: readonly Statement[]): CallExpression; 12156 (statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; 12157 }; 12158 /** @deprecated Use `factory.createVoidZero` or the factory supplied by your transformation context instead. */ 12159 const createVoidZero: () => VoidExpression; 12160 /** @deprecated Use `factory.createExportDefault` or the factory supplied by your transformation context instead. */ 12161 const createExportDefault: (expression: Expression) => ExportAssignment; 12162 /** @deprecated Use `factory.createExternalModuleExport` or the factory supplied by your transformation context instead. */ 12163 const createExternalModuleExport: (exportName: Identifier) => ExportDeclaration; 12164 /** @deprecated Use `factory.createNamespaceExport` or the factory supplied by your transformation context instead. */ 12165 const createNamespaceExport: (name: Identifier) => NamespaceExport; 12166 /** @deprecated Use `factory.updateNamespaceExport` or the factory supplied by your transformation context instead. */ 12167 const updateNamespaceExport: (node: NamespaceExport, name: Identifier) => NamespaceExport; 12168 /** @deprecated Use `factory.createToken` or the factory supplied by your transformation context instead. */ 12169 const createToken: <TKind extends SyntaxKind>(kind: TKind) => Token<TKind>; 12170 /** @deprecated Use `factory.createIdentifier` or the factory supplied by your transformation context instead. */ 12171 const createIdentifier: (text: string) => Identifier; 12172 /** @deprecated Use `factory.createTempVariable` or the factory supplied by your transformation context instead. */ 12173 const createTempVariable: (recordTempVariable: ((node: Identifier) => void) | undefined) => Identifier; 12174 /** @deprecated Use `factory.getGeneratedNameForNode` or the factory supplied by your transformation context instead. */ 12175 const getGeneratedNameForNode: (node: Node | undefined) => Identifier; 12176 /** @deprecated Use `factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic)` or the factory supplied by your transformation context instead. */ 12177 const createOptimisticUniqueName: (text: string) => Identifier; 12178 /** @deprecated Use `factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel)` or the factory supplied by your transformation context instead. */ 12179 const createFileLevelUniqueName: (text: string) => Identifier; 12180 /** @deprecated Use `factory.createIndexSignature` or the factory supplied by your transformation context instead. */ 12181 const createIndexSignature: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => IndexSignatureDeclaration; 12182 /** @deprecated Use `factory.createTypePredicateNode` or the factory supplied by your transformation context instead. */ 12183 const createTypePredicateNode: (parameterName: Identifier | ThisTypeNode | string, type: TypeNode) => TypePredicateNode; 12184 /** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */ 12185 const updateTypePredicateNode: (node: TypePredicateNode, parameterName: Identifier | ThisTypeNode, type: TypeNode) => TypePredicateNode; 12186 /** @deprecated Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead. */ 12187 const createLiteral: { 12188 (value: string | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): StringLiteral; 12189 (value: number | PseudoBigInt): NumericLiteral; 12190 (value: boolean): BooleanLiteral; 12191 (value: string | number | PseudoBigInt | boolean): PrimaryExpression; 12192 }; 12193 /** @deprecated Use `factory.createMethodSignature` or the factory supplied by your transformation context instead. */ 12194 const createMethodSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined) => MethodSignature; 12195 /** @deprecated Use `factory.updateMethodSignature` or the factory supplied by your transformation context instead. */ 12196 const updateMethodSignature: (node: MethodSignature, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined, name: PropertyName, questionToken: QuestionToken | undefined) => MethodSignature; 12197 /** @deprecated Use `factory.createTypeOperatorNode` or the factory supplied by your transformation context instead. */ 12198 const createTypeOperatorNode: { 12199 (type: TypeNode): TypeOperatorNode; 12200 (operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode; 12201 }; 12202 /** @deprecated Use `factory.createTaggedTemplate` or the factory supplied by your transformation context instead. */ 12203 const createTaggedTemplate: { 12204 (tag: Expression, template: TemplateLiteral): TaggedTemplateExpression; 12205 (tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; 12206 }; 12207 /** @deprecated Use `factory.updateTaggedTemplate` or the factory supplied by your transformation context instead. */ 12208 const updateTaggedTemplate: { 12209 (node: TaggedTemplateExpression, tag: Expression, template: TemplateLiteral): TaggedTemplateExpression; 12210 (node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; 12211 }; 12212 /** @deprecated Use `factory.updateBinary` or the factory supplied by your transformation context instead. */ 12213 const updateBinary: (node: BinaryExpression, left: Expression, right: Expression, operator?: BinaryOperator | BinaryOperatorToken) => BinaryExpression; 12214 /** @deprecated Use `factory.createConditional` or the factory supplied by your transformation context instead. */ 12215 const createConditional: { 12216 (condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression; 12217 (condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression; 12218 }; 12219 /** @deprecated Use `factory.createYield` or the factory supplied by your transformation context instead. */ 12220 const createYield: { 12221 (expression?: Expression | undefined): YieldExpression; 12222 (asteriskToken: AsteriskToken | undefined, expression: Expression): YieldExpression; 12223 }; 12224 /** @deprecated Use `factory.createClassExpression` or the factory supplied by your transformation context instead. */ 12225 const createClassExpression: (modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassExpression; 12226 /** @deprecated Use `factory.updateClassExpression` or the factory supplied by your transformation context instead. */ 12227 const updateClassExpression: (node: ClassExpression, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassExpression; 12228 /** @deprecated Use `factory.createPropertySignature` or the factory supplied by your transformation context instead. */ 12229 const createPropertySignature: (modifiers: readonly Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer?: Expression | undefined) => PropertySignature; 12230 /** @deprecated Use `factory.updatePropertySignature` or the factory supplied by your transformation context instead. */ 12231 const updatePropertySignature: (node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => PropertySignature; 12232 /** @deprecated Use `factory.createExpressionWithTypeArguments` or the factory supplied by your transformation context instead. */ 12233 const createExpressionWithTypeArguments: (typeArguments: readonly TypeNode[] | undefined, expression: Expression) => ExpressionWithTypeArguments; 12234 /** @deprecated Use `factory.updateExpressionWithTypeArguments` or the factory supplied by your transformation context instead. */ 12235 const updateExpressionWithTypeArguments: (node: ExpressionWithTypeArguments, typeArguments: readonly TypeNode[] | undefined, expression: Expression) => ExpressionWithTypeArguments; 12236 /** @deprecated Use `factory.createArrowFunction` or the factory supplied by your transformation context instead. */ 12237 const createArrowFunction: { 12238 (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction; 12239 (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction; 12240 }; 12241 /** @deprecated Use `factory.updateArrowFunction` or the factory supplied by your transformation context instead. */ 12242 const updateArrowFunction: { 12243 (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction; 12244 (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction; 12245 }; 12246 /** @deprecated Use `factory.createVariableDeclaration` or the factory supplied by your transformation context instead. */ 12247 const createVariableDeclaration: { 12248 (name: string | BindingName, type?: TypeNode | undefined, initializer?: Expression | undefined): VariableDeclaration; 12249 (name: string | BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; 12250 }; 12251 /** @deprecated Use `factory.updateVariableDeclaration` or the factory supplied by your transformation context instead. */ 12252 const updateVariableDeclaration: { 12253 (node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; 12254 (node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; 12255 }; 12256 /** @deprecated Use `factory.createImportClause` or the factory supplied by your transformation context instead. */ 12257 const createImportClause: (name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly?: any) => ImportClause; 12258 /** @deprecated Use `factory.updateImportClause` or the factory supplied by your transformation context instead. */ 12259 const updateImportClause: (node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly: boolean) => ImportClause; 12260 /** @deprecated Use `factory.createExportDeclaration` or the factory supplied by your transformation context instead. */ 12261 const createExportDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression | undefined, isTypeOnly?: any) => ExportDeclaration; 12262 /** @deprecated Use `factory.updateExportDeclaration` or the factory supplied by your transformation context instead. */ 12263 const updateExportDeclaration: (node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, isTypeOnly: boolean) => ExportDeclaration; 12264 /** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */ 12265 const createJSDocParamTag: (name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocParameterTag; 12266 /** @deprecated Use `factory.createComma` or the factory supplied by your transformation context instead. */ 12267 const createComma: (left: Expression, right: Expression) => Expression; 12268 /** @deprecated Use `factory.createLessThan` or the factory supplied by your transformation context instead. */ 12269 const createLessThan: (left: Expression, right: Expression) => Expression; 12270 /** @deprecated Use `factory.createAssignment` or the factory supplied by your transformation context instead. */ 12271 const createAssignment: (left: Expression, right: Expression) => BinaryExpression; 12272 /** @deprecated Use `factory.createStrictEquality` or the factory supplied by your transformation context instead. */ 12273 const createStrictEquality: (left: Expression, right: Expression) => BinaryExpression; 12274 /** @deprecated Use `factory.createStrictInequality` or the factory supplied by your transformation context instead. */ 12275 const createStrictInequality: (left: Expression, right: Expression) => BinaryExpression; 12276 /** @deprecated Use `factory.createAdd` or the factory supplied by your transformation context instead. */ 12277 const createAdd: (left: Expression, right: Expression) => BinaryExpression; 12278 /** @deprecated Use `factory.createSubtract` or the factory supplied by your transformation context instead. */ 12279 const createSubtract: (left: Expression, right: Expression) => BinaryExpression; 12280 /** @deprecated Use `factory.createLogicalAnd` or the factory supplied by your transformation context instead. */ 12281 const createLogicalAnd: (left: Expression, right: Expression) => BinaryExpression; 12282 /** @deprecated Use `factory.createLogicalOr` or the factory supplied by your transformation context instead. */ 12283 const createLogicalOr: (left: Expression, right: Expression) => BinaryExpression; 12284 /** @deprecated Use `factory.createPostfixIncrement` or the factory supplied by your transformation context instead. */ 12285 const createPostfixIncrement: (operand: Expression) => PostfixUnaryExpression; 12286 /** @deprecated Use `factory.createLogicalNot` or the factory supplied by your transformation context instead. */ 12287 const createLogicalNot: (operand: Expression) => PrefixUnaryExpression; 12288 /** @deprecated Use an appropriate `factory` method instead. */ 12289 const createNode: (kind: SyntaxKind, pos?: any, end?: any) => Node; 12290 /** 12291 * Creates a shallow, memberwise clone of a node ~for mutation~ with its `pos`, `end`, and `parent` set. 12292 * 12293 * NOTE: It is unsafe to change any properties of a `Node` that relate to its AST children, as those changes won't be 12294 * captured with respect to transformations. 12295 * 12296 * @deprecated Use an appropriate `factory.update...` method instead, use `setCommentRange` or `setSourceMapRange`, and avoid setting `parent`. 12297 */ 12298 const getMutableClone: <T extends Node>(node: T) => T; 12299} 12300declare namespace ts { 12301 /** @deprecated Use `isTypeAssertionExpression` instead. */ 12302 const isTypeAssertion: (node: Node) => node is TypeAssertion; 12303} 12304declare namespace ts { 12305 /** 12306 * @deprecated Use `ts.ReadonlyESMap<K, V>` instead. 12307 */ 12308 interface ReadonlyMap<T> extends ReadonlyESMap<string, T> { 12309 } 12310 /** 12311 * @deprecated Use `ts.ESMap<K, V>` instead. 12312 */ 12313 interface Map<T> extends ESMap<string, T> { 12314 } 12315} 12316declare namespace ts { 12317 /** 12318 * @deprecated Use `isMemberName` instead. 12319 */ 12320 const isIdentifierOrPrivateIdentifier: (node: Node) => node is MemberName; 12321} 12322declare namespace ts { 12323 interface NodeFactory { 12324 /** @deprecated Use the overload that accepts 'modifiers' */ 12325 createConstructorTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode; 12326 /** @deprecated Use the overload that accepts 'modifiers' */ 12327 updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode; 12328 } 12329} 12330declare namespace ts { 12331 interface NodeFactory { 12332 createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; 12333 /** @deprecated Use the overload that accepts 'assertions' */ 12334 createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; 12335 /** @deprecated Use the overload that accepts 'assertions' */ 12336 updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode; 12337 } 12338} 12339declare namespace ts { 12340 interface NodeFactory { 12341 /** @deprecated Use the overload that accepts 'modifiers' */ 12342 createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; 12343 /** @deprecated Use the overload that accepts 'modifiers' */ 12344 updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; 12345 } 12346} 12347declare namespace ts { 12348 interface Node { 12349 /** 12350 * @deprecated `decorators` has been removed from `Node` and merged with `modifiers` on the `Node` subtypes that support them. 12351 * Use `ts.canHaveDecorators()` to test whether a `Node` can have decorators. 12352 * Use `ts.getDecorators()` to get the decorators of a `Node`. 12353 * 12354 * For example: 12355 * ```ts 12356 * const decorators = ts.canHaveDecorators(node) ? ts.getDecorators(node) : undefined; 12357 * ``` 12358 */ 12359 readonly decorators?: undefined; 12360 /** 12361 * @deprecated `modifiers` has been removed from `Node` and moved to the `Node` subtypes that support them. 12362 * Use `ts.canHaveModifiers()` to test whether a `Node` can have modifiers. 12363 * Use `ts.getModifiers()` to get the modifiers of a `Node`. 12364 * 12365 * For example: 12366 * ```ts 12367 * const modifiers = ts.canHaveModifiers(node) ? ts.getModifiers(node) : undefined; 12368 * ``` 12369 */ 12370 readonly modifiers?: NodeArray<ModifierLike> | undefined; 12371 } 12372 interface PropertySignature { 12373 /** @deprecated A property signature cannot have an initializer */ 12374 readonly initializer?: Expression | undefined; 12375 } 12376 interface PropertyAssignment { 12377 /** @deprecated A property assignment cannot have a question token */ 12378 readonly questionToken?: QuestionToken | undefined; 12379 /** @deprecated A property assignment cannot have an exclamation token */ 12380 readonly exclamationToken?: ExclamationToken | undefined; 12381 } 12382 interface ShorthandPropertyAssignment { 12383 /** @deprecated A shorthand property assignment cannot have modifiers */ 12384 readonly modifiers?: NodeArray<Modifier> | undefined; 12385 /** @deprecated A shorthand property assignment cannot have a question token */ 12386 readonly questionToken?: QuestionToken | undefined; 12387 /** @deprecated A shorthand property assignment cannot have an exclamation token */ 12388 readonly exclamationToken?: ExclamationToken | undefined; 12389 } 12390 interface FunctionTypeNode { 12391 /** @deprecated A function type cannot have modifiers */ 12392 readonly modifiers?: NodeArray<Modifier> | undefined; 12393 } 12394 interface NodeFactory { 12395 /** 12396 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 12397 */ 12398 createParameterDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration; 12399 /** 12400 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 12401 */ 12402 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; 12403 /** 12404 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 12405 */ 12406 createPropertyDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; 12407 /** 12408 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 12409 */ 12410 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; 12411 /** 12412 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 12413 */ 12414 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; 12415 /** 12416 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 12417 */ 12418 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; 12419 /** 12420 * @deprecated This node does not support Decorators. Callers should use an overload that does not accept a `decorators` parameter. 12421 */ 12422 createConstructorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 12423 /** 12424 * @deprecated This node does not support Decorators. Callers should use an overload that does not accept a `decorators` parameter. 12425 */ 12426 updateConstructorDeclaration(node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; 12427 /** 12428 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 12429 */ 12430 createGetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 12431 /** 12432 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 12433 */ 12434 updateGetAccessorDeclaration(node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; 12435 /** 12436 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 12437 */ 12438 createSetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 12439 /** 12440 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 12441 */ 12442 updateSetAccessorDeclaration(node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; 12443 /** 12444 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12445 */ 12446 createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; 12447 /** 12448 * @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. 12449 */ 12450 updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; 12451 /** 12452 * @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. 12453 */ 12454 createClassStaticBlockDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration; 12455 /** 12456 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12457 */ 12458 updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration; 12459 /** 12460 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 12461 */ 12462 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; 12463 /** 12464 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 12465 */ 12466 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; 12467 /** 12468 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12469 */ 12470 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; 12471 /** 12472 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12473 */ 12474 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; 12475 /** 12476 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 12477 */ 12478 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; 12479 /** 12480 * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. 12481 */ 12482 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; 12483 /** 12484 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12485 */ 12486 createInterfaceDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; 12487 /** 12488 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12489 */ 12490 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; 12491 /** 12492 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12493 */ 12494 createTypeAliasDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 12495 /** 12496 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12497 */ 12498 updateTypeAliasDeclaration(node: TypeAliasDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; 12499 /** 12500 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12501 */ 12502 createEnumDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration; 12503 /** 12504 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12505 */ 12506 updateEnumDeclaration(node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; 12507 /** 12508 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12509 */ 12510 createModuleDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration; 12511 /** 12512 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12513 */ 12514 updateModuleDeclaration(node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration; 12515 /** 12516 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12517 */ 12518 createImportEqualsDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 12519 /** 12520 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12521 */ 12522 updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; 12523 /** 12524 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12525 */ 12526 createImportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause): ImportDeclaration; 12527 /** 12528 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12529 */ 12530 updateImportDeclaration(node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration; 12531 /** 12532 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12533 */ 12534 createExportAssignment(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment; 12535 /** 12536 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12537 */ 12538 updateExportAssignment(node: ExportAssignment, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment; 12539 /** 12540 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12541 */ 12542 createExportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, assertClause?: AssertClause): ExportDeclaration; 12543 /** 12544 * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. 12545 */ 12546 updateExportDeclaration(node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration; 12547 } 12548} 12549declare namespace ts { 12550 namespace ArkTSLinter_1_0 { 12551 namespace Common { 12552 interface AutofixInfo { 12553 problemID: string; 12554 start: number; 12555 end: number; 12556 } 12557 interface CommandLineOptions { 12558 strictMode?: boolean; 12559 ideMode?: boolean; 12560 logTscErrors?: boolean; 12561 warningsAsErrors: boolean; 12562 parsedConfigFile?: ParsedCommandLine; 12563 inputFiles: string[]; 12564 autofixInfo?: AutofixInfo[]; 12565 } 12566 interface LintOptions { 12567 cmdOptions: CommandLineOptions; 12568 tsProgram?: Program; 12569 [key: string]: any; 12570 } 12571 } 12572 } 12573} 12574declare namespace ts { 12575 namespace ArkTSLinter_1_0 { 12576 const cookBookMsg: string[]; 12577 const cookBookTag: string[]; 12578 } 12579} 12580declare namespace ts { 12581 namespace ArkTSLinter_1_0 { 12582 namespace DiagnosticCheckerNamespace { 12583 interface DiagnosticChecker { 12584 checkDiagnosticMessage(msgText: string | ts.DiagnosticMessageChain): boolean; 12585 } 12586 } 12587 } 12588} 12589declare namespace ts { 12590 namespace ArkTSLinter_1_0 { 12591 import DiagnosticChecker = DiagnosticCheckerNamespace.DiagnosticChecker; 12592 namespace LibraryTypeCallDiagnosticCheckerNamespace { 12593 const TYPE_0_IS_NOT_ASSIGNABLE_TO_TYPE_1_ERROR_CODE = 2322; 12594 const TYPE_UNKNOWN_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 12595 const TYPE_NULL_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 12596 const TYPE_UNDEFINED_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 12597 const ARGUMENT_OF_TYPE_0_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_ERROR_CODE = 2345; 12598 const ARGUMENT_OF_TYPE_NULL_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_RE: RegExp; 12599 const ARGUMENT_OF_TYPE_UNDEFINED_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_RE: RegExp; 12600 const NO_OVERLOAD_MATCHES_THIS_CALL_ERROR_CODE = 2769; 12601 class LibraryTypeCallDiagnosticChecker implements DiagnosticChecker { 12602 inLibCall: boolean; 12603 diagnosticMessages: Array<ts.DiagnosticMessageChain> | undefined; 12604 filteredDiagnosticMessages: DiagnosticMessageChain[]; 12605 constructor(filteredDiagnosticMessages: DiagnosticMessageChain[]); 12606 configure(inLibCall: boolean, diagnosticMessages: Array<ts.DiagnosticMessageChain>): void; 12607 checkMessageText(msg: string): boolean; 12608 checkMessageChain(chain: ts.DiagnosticMessageChain): boolean; 12609 checkFilteredDiagnosticMessages(msgText: ts.DiagnosticMessageChain | string): boolean; 12610 checkDiagnosticMessage(msgText: string | ts.DiagnosticMessageChain): boolean; 12611 } 12612 } 12613 } 12614} 12615declare namespace ts { 12616 namespace ArkTSLinter_1_0 { 12617 namespace Utils { 12618 import AutofixInfo = Common.AutofixInfo; 12619 const PROPERTY_HAS_NO_INITIALIZER_ERROR_CODE = 2564; 12620 const NON_INITIALIZABLE_PROPERTY_DECORATORS: string[]; 12621 const NON_INITIALIZABLE_PROPERTY_ClASS_DECORATORS: string[]; 12622 const LIMITED_STANDARD_UTILITY_TYPES: string[]; 12623 const ALLOWED_STD_SYMBOL_API: string[]; 12624 enum ProblemSeverity { 12625 WARNING = 1, 12626 ERROR = 2 12627 } 12628 const ARKTS_IGNORE_DIRS: string[]; 12629 const ARKTS_IGNORE_FILES: string[]; 12630 function setTypeChecker(tsTypeChecker: TypeChecker): void; 12631 function clearTypeChecker(): void; 12632 function setTestMode(tsTestMode: boolean): void; 12633 function getStartPos(nodeOrComment: Node | CommentRange): number; 12634 function getEndPos(nodeOrComment: Node | CommentRange): number; 12635 function isAssignmentOperator(tsBinOp: BinaryOperatorToken): boolean; 12636 function isTypedArray(tsType: TypeNode | undefined): boolean; 12637 function isType(tsType: TypeNode | undefined, checkType: string): boolean; 12638 function entityNameToString(name: EntityName): string; 12639 function isNumberType(tsType: Type): boolean; 12640 function isBooleanType(tsType: Type): boolean; 12641 function isStringLikeType(tsType: Type): boolean; 12642 function isStringType(type: Type): boolean; 12643 function isPrimitiveEnumType(type: Type, primitiveType: TypeFlags): boolean; 12644 function isPrimitiveEnumMemberType(type: Type, primitiveType: TypeFlags): boolean; 12645 function unwrapParenthesizedType(tsType: TypeNode): TypeNode; 12646 function findParentIf(asExpr: AsExpression): IfStatement | null; 12647 function isDestructuringAssignmentLHS(tsExpr: ArrayLiteralExpression | ObjectLiteralExpression): boolean; 12648 function isEnumType(tsType: Type): boolean; 12649 function isEnumMemberType(tsType: Type): boolean; 12650 function isObjectLiteralType(tsType: Type): boolean; 12651 function isNumberLikeType(tsType: Type): boolean; 12652 function hasModifier(tsModifiers: readonly Modifier[] | undefined, tsModifierKind: number): boolean; 12653 function unwrapParenthesized(tsExpr: Expression): Expression; 12654 function followIfAliased(sym: Symbol): Symbol; 12655 function trueSymbolAtLocation(node: Node): Symbol | undefined; 12656 function clearTrueSymbolAtLocationCache(): void; 12657 function isTypeDeclSyntaxKind(kind: SyntaxKind): boolean; 12658 function symbolHasDuplicateName(symbol: Symbol, tsDeclKind: SyntaxKind): boolean; 12659 function isReferenceType(tsType: Type): boolean; 12660 function isPrimitiveType(type: Type): boolean; 12661 function isTypeSymbol(symbol: Symbol | undefined): boolean; 12662 function isGenericArrayType(tsType: Type): tsType is TypeReference; 12663 function isDerivedFrom(tsType: Type, checkType: CheckType): tsType is TypeReference; 12664 function isTypeReference(tsType: Type): tsType is TypeReference; 12665 function isNullType(tsTypeNode: TypeNode): boolean; 12666 function isThisOrSuperExpr(tsExpr: Expression): boolean; 12667 function isPrototypeSymbol(symbol: Symbol | undefined): boolean; 12668 function isFunctionSymbol(symbol: Symbol | undefined): boolean; 12669 function isInterfaceType(tsType: Type | undefined): boolean; 12670 function isAnyType(tsType: Type): tsType is TypeReference; 12671 function isUnknownType(tsType: Type): boolean; 12672 function isUnsupportedType(tsType: Type): boolean; 12673 function isUnsupportedUnionType(tsType: Type): boolean; 12674 function isFunctionOrMethod(tsSymbol: Symbol | undefined): boolean; 12675 function isMethodAssignment(tsSymbol: Symbol | undefined): boolean; 12676 function getDeclaration(tsSymbol: ts.Symbol | undefined): ts.Declaration | undefined; 12677 function isValidEnumMemberInit(tsExpr: Expression): boolean; 12678 function isCompileTimeExpression(tsExpr: Expression): boolean; 12679 function isConst(tsNode: Node): boolean; 12680 function isNumberConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression | NumericLiteral): boolean; 12681 function isIntegerConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression | NumericLiteral): boolean; 12682 function isStringConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression): boolean; 12683 function relatedByInheritanceOrIdentical(typeA: Type, typeB: Type): boolean; 12684 function needToDeduceStructuralIdentity(typeFrom: Type, typeTo: Type, allowPromotion?: boolean): boolean; 12685 function hasPredecessor(node: Node, predicate: (node: Node) => boolean): boolean; 12686 function processParentTypes(parentTypes: NodeArray<ExpressionWithTypeArguments>, typeB: Type, processInterfaces: boolean): boolean; 12687 function processParentTypesCheck(parentTypes: NodeArray<ExpressionWithTypeArguments>, checkType: CheckType): boolean; 12688 function isObjectType(tsType: Type): boolean; 12689 function logTscDiagnostic(diagnostics: readonly Diagnostic[], log: (message: any, ...args: any[]) => void): void; 12690 function encodeProblemInfo(problem: ProblemInfo): string; 12691 function decodeAutofixInfo(info: string): AutofixInfo; 12692 function isCallToFunctionWithOmittedReturnType(tsExpr: Expression): boolean; 12693 function validateObjectLiteralType(type: Type | undefined): boolean; 12694 function isStructDeclarationKind(kind: SyntaxKind): boolean; 12695 function isStructDeclaration(node: Node): boolean; 12696 function isStructObjectInitializer(objectLiteral: ObjectLiteralExpression): boolean; 12697 function hasMethods(type: Type): boolean; 12698 function isExpressionAssignableToType(lhsType: ts.Type | undefined, rhsExpr: ts.Expression): boolean; 12699 function isLiteralType(type: Type): boolean; 12700 function validateFields(type: Type, objectLiteral: ObjectLiteralExpression): boolean; 12701 function isSupportedType(typeNode: TypeNode): boolean; 12702 function isStruct(symbol: Symbol): boolean; 12703 enum CheckType { 12704 Array = 0, 12705 String = "String", 12706 Set = "Set", 12707 Map = "Map", 12708 Error = "Error" 12709 } 12710 const ES_OBJECT = "ESObject"; 12711 const LIMITED_STD_GLOBAL_FUNC: string[]; 12712 const LIMITED_STD_OBJECT_API: string[]; 12713 const LIMITED_STD_REFLECT_API: string[]; 12714 const LIMITED_STD_PROXYHANDLER_API: string[]; 12715 const ARKUI_DECORATORS: string[]; 12716 const FUNCTION_HAS_NO_RETURN_ERROR_CODE = 2366; 12717 const NON_RETURN_FUNCTION_DECORATORS: string[]; 12718 const STANDARD_LIBRARIES: string[]; 12719 const TYPED_ARRAYS: string[]; 12720 function getParentSymbolName(symbol: Symbol): string | undefined; 12721 function isGlobalSymbol(symbol: Symbol): boolean; 12722 function isSymbolAPI(symbol: Symbol): boolean; 12723 function isStdSymbol(symbol: ts.Symbol): boolean; 12724 function isSymbolIterator(symbol: ts.Symbol): boolean; 12725 function isDefaultImport(importSpec: ImportSpecifier): boolean; 12726 function hasAccessModifier(decl: Declaration): boolean; 12727 function getModifier(modifiers: readonly Modifier[] | undefined, modifierKind: SyntaxKind): Modifier | undefined; 12728 function getAccessModifier(modifiers: readonly Modifier[] | undefined): Modifier | undefined; 12729 function isStdRecordType(type: Type): boolean; 12730 function isStdPartialType(type: Type): boolean; 12731 function isStdRequiredType(type: Type): boolean; 12732 function isStdReadonlyType(type: Type): boolean; 12733 function isLibraryType(type: Type): boolean; 12734 function hasLibraryType(node: Node): boolean; 12735 function isLibrarySymbol(sym: Symbol | undefined): boolean; 12736 function pathContainsDirectory(targetPath: string, dir: string): boolean; 12737 function getScriptKind(srcFile: SourceFile): ScriptKind; 12738 function isStdLibraryType(type: Type): boolean; 12739 function isStdLibrarySymbol(sym: Symbol | undefined): boolean; 12740 function isIntrinsicObjectType(type: Type): boolean; 12741 function isDynamicType(type: Type | undefined): boolean | undefined; 12742 function isDynamicLiteralInitializer(expr: Expression): boolean; 12743 function isEsObjectType(typeNode: TypeNode): boolean; 12744 function isInsideBlock(node: ts.Node): boolean; 12745 function isEsObjectPossiblyAllowed(typeRef: ts.TypeReferenceNode): boolean; 12746 function isValueAssignableToESObject(node: ts.Node): boolean; 12747 function getVariableDeclarationTypeNode(node: Node): TypeNode | undefined; 12748 function getSymbolDeclarationTypeNode(sym: ts.Symbol): ts.TypeNode | undefined; 12749 function hasEsObjectType(node: Node): boolean; 12750 function symbolHasEsObjectType(sym: ts.Symbol): boolean; 12751 function isEsObjectSymbol(sym: Symbol): boolean; 12752 function isAnonymousType(type: Type): boolean; 12753 function getSymbolOfCallExpression(callExpr: CallExpression): Symbol | undefined; 12754 function typeIsRecursive(topType: Type, type?: Type | undefined): boolean; 12755 } 12756 } 12757} 12758declare namespace ts { 12759 namespace ArkTSLinter_1_0 { 12760 namespace Problems { 12761 enum FaultID { 12762 AnyType = 0, 12763 SymbolType = 1, 12764 ObjectLiteralNoContextType = 2, 12765 ArrayLiteralNoContextType = 3, 12766 ComputedPropertyName = 4, 12767 LiteralAsPropertyName = 5, 12768 TypeQuery = 6, 12769 RegexLiteral = 7, 12770 IsOperator = 8, 12771 DestructuringParameter = 9, 12772 YieldExpression = 10, 12773 InterfaceMerging = 11, 12774 EnumMerging = 12, 12775 InterfaceExtendsClass = 13, 12776 IndexMember = 14, 12777 WithStatement = 15, 12778 ThrowStatement = 16, 12779 IndexedAccessType = 17, 12780 UnknownType = 18, 12781 ForInStatement = 19, 12782 InOperator = 20, 12783 ImportFromPath = 21, 12784 FunctionExpression = 22, 12785 IntersectionType = 23, 12786 ObjectTypeLiteral = 24, 12787 CommaOperator = 25, 12788 LimitedReturnTypeInference = 26, 12789 LambdaWithTypeParameters = 27, 12790 ClassExpression = 28, 12791 DestructuringAssignment = 29, 12792 DestructuringDeclaration = 30, 12793 VarDeclaration = 31, 12794 CatchWithUnsupportedType = 32, 12795 DeleteOperator = 33, 12796 DeclWithDuplicateName = 34, 12797 UnaryArithmNotNumber = 35, 12798 ConstructorType = 36, 12799 ConstructorIface = 37, 12800 ConstructorFuncs = 38, 12801 CallSignature = 39, 12802 TypeAssertion = 40, 12803 PrivateIdentifier = 41, 12804 LocalFunction = 42, 12805 ConditionalType = 43, 12806 MappedType = 44, 12807 NamespaceAsObject = 45, 12808 ClassAsObject = 46, 12809 NonDeclarationInNamespace = 47, 12810 GeneratorFunction = 48, 12811 FunctionContainsThis = 49, 12812 PropertyAccessByIndex = 50, 12813 JsxElement = 51, 12814 EnumMemberNonConstInit = 52, 12815 ImplementsClass = 53, 12816 NoUndefinedPropAccess = 54, 12817 MultipleStaticBlocks = 55, 12818 ThisType = 56, 12819 IntefaceExtendDifProps = 57, 12820 StructuralIdentity = 58, 12821 DefaultImport = 59, 12822 ExportAssignment = 60, 12823 ImportAssignment = 61, 12824 GenericCallNoTypeArgs = 62, 12825 ParameterProperties = 63, 12826 InstanceofUnsupported = 64, 12827 ShorthandAmbientModuleDecl = 65, 12828 WildcardsInModuleName = 66, 12829 UMDModuleDefinition = 67, 12830 NewTarget = 68, 12831 DefiniteAssignment = 69, 12832 Prototype = 70, 12833 GlobalThis = 71, 12834 UtilityType = 72, 12835 PropertyDeclOnFunction = 73, 12836 FunctionApplyBindCall = 74, 12837 ConstAssertion = 75, 12838 ImportAssertion = 76, 12839 SpreadOperator = 77, 12840 LimitedStdLibApi = 78, 12841 ErrorSuppression = 79, 12842 StrictDiagnostic = 80, 12843 UnsupportedDecorators = 81, 12844 ImportAfterStatement = 82, 12845 EsObjectType = 83, 12846 LAST_ID = 84 12847 } 12848 class FaultAttributs { 12849 migratable?: boolean; 12850 warning?: boolean; 12851 cookBookRef: string; 12852 } 12853 const faultsAttrs: FaultAttributs[]; 12854 } 12855 } 12856} 12857declare namespace ts { 12858 namespace ArkTSLinter_1_0 { 12859 namespace Autofixer { 12860 import AutofixInfo = Common.AutofixInfo; 12861 import FaultID = Problems.FaultID; 12862 const AUTOFIX_ALL: AutofixInfo; 12863 const autofixInfo: AutofixInfo[]; 12864 function shouldAutofix(node: Node, faultID: FaultID): boolean; 12865 interface Autofix { 12866 replacementText: string; 12867 start: number; 12868 end: number; 12869 } 12870 function fixLiteralAsPropertyName(node: Node): Autofix[] | undefined; 12871 function fixPropertyAccessByIndex(node: Node): Autofix[] | undefined; 12872 function fixFunctionExpression(funcExpr: FunctionExpression, params?: NodeArray<ParameterDeclaration>, retType?: TypeNode | undefined): Autofix; 12873 function fixReturnType(funcLikeDecl: FunctionLikeDeclaration, typeNode: TypeNode): Autofix; 12874 function fixCtorParameterProperties(ctorDecl: ConstructorDeclaration, paramTypes: TypeNode[]): Autofix[] | undefined; 12875 } 12876 } 12877} 12878declare namespace ts { 12879 namespace ArkTSLinter_1_0 { 12880 import FaultID = Problems.FaultID; 12881 class LinterConfig { 12882 static nodeDesc: string[]; 12883 static tsSyntaxKindNames: string[]; 12884 static initStatic(): void; 12885 static terminalTokens: Set<SyntaxKind>; 12886 static incrementOnlyTokens: ESMap<SyntaxKind, FaultID>; 12887 } 12888 } 12889} 12890declare namespace ts { 12891 namespace ArkTSLinter_1_0 { 12892 import Autofix = Autofixer.Autofix; 12893 import LibraryTypeCallDiagnosticChecker = LibraryTypeCallDiagnosticCheckerNamespace.LibraryTypeCallDiagnosticChecker; 12894 interface ProblemInfo { 12895 line: number; 12896 column: number; 12897 start: number; 12898 end: number; 12899 type: string; 12900 severity: number; 12901 problem: string; 12902 suggest: string; 12903 rule: string; 12904 ruleTag: number; 12905 autofixable: boolean; 12906 autofix?: Autofix[]; 12907 } 12908 class TypeScriptLinter { 12909 private sourceFile; 12910 private tscStrictDiagnostics?; 12911 static ideMode: boolean; 12912 static strictMode: boolean; 12913 static logTscErrors: boolean; 12914 static warningsAsErrors: boolean; 12915 static lintEtsOnly: boolean; 12916 static totalVisitedNodes: number; 12917 static nodeCounters: number[]; 12918 static lineCounters: number[]; 12919 static totalErrorLines: number; 12920 static errorLineNumbersString: string; 12921 static totalWarningLines: number; 12922 static warningLineNumbersString: string; 12923 static reportDiagnostics: boolean; 12924 static problemsInfos: ProblemInfo[]; 12925 static filteredDiagnosticMessages: DiagnosticMessageChain[]; 12926 static initGlobals(): void; 12927 static initStatic(): void; 12928 static tsTypeChecker: TypeChecker; 12929 currentErrorLine: number; 12930 currentWarningLine: number; 12931 staticBlocks: Set<string>; 12932 libraryTypeCallDiagnosticChecker: LibraryTypeCallDiagnosticChecker; 12933 skipArkTSStaticBlocksCheck: boolean; 12934 constructor(sourceFile: SourceFile, tsProgram: Program, tscStrictDiagnostics?: Map<Diagnostic[]> | undefined); 12935 static clearTsTypeChecker(): void; 12936 readonly handlersMap: ESMap<SyntaxKind, (node: Node) => void>; 12937 incrementCounters(node: Node | CommentRange, faultId: number, autofixable?: boolean, autofix?: Autofix[]): void; 12938 visitTSNode(node: Node): void; 12939 private countInterfaceExtendsDifferentPropertyTypes; 12940 private countDeclarationsWithDuplicateName; 12941 private countClassMembersWithDuplicateName; 12942 private functionContainsThis; 12943 private isPrototypePropertyAccess; 12944 private interfaceInheritanceLint; 12945 private lintForInterfaceExtendsDifferentPorpertyTypes; 12946 private handleObjectLiteralExpression; 12947 private handleArrayLiteralExpression; 12948 private handleParameter; 12949 private handleEnumDeclaration; 12950 private handleInterfaceDeclaration; 12951 private handleThrowStatement; 12952 private handleForStatement; 12953 private handleForInStatement; 12954 private handleForOfStatement; 12955 private handleImportDeclaration; 12956 private handlePropertyAccessExpression; 12957 private handlePropertyAssignmentOrDeclaration; 12958 private filterOutDecoratorsDiagnostics; 12959 private checkInRange; 12960 private filterStrictDiagnostics; 12961 private handleFunctionExpression; 12962 private handleArrowFunction; 12963 private handleClassExpression; 12964 private handleFunctionDeclaration; 12965 private handleMissingReturnType; 12966 private hasLimitedTypeInferenceFromReturnExpr; 12967 private handlePrefixUnaryExpression; 12968 private handleBinaryExpression; 12969 private handleVariableDeclarationList; 12970 private handleVariableDeclaration; 12971 private handleEsObjectDelaration; 12972 private handleEsObjectAssignment; 12973 private handleCatchClause; 12974 private handleClassDeclaration; 12975 private handleModuleDeclaration; 12976 private handleTypeAliasDeclaration; 12977 private handleImportClause; 12978 private handleImportSpecifier; 12979 private handleNamespaceImport; 12980 private handleTypeAssertionExpression; 12981 private handleMethodDeclaration; 12982 private handleIdentifier; 12983 private isAllowedClassValueContext; 12984 private handleRestrictedValues; 12985 private identiferUseInValueContext; 12986 private isEnumPropAccess; 12987 private handleElementAccessExpression; 12988 private handleEnumMember; 12989 private handleExportAssignment; 12990 private handleCallExpression; 12991 private handleImportCall; 12992 private handleRequireCall; 12993 private handleGenericCallWithNoTypeArgs; 12994 private static listApplyBindCallApis; 12995 private handleFunctionApplyBindPropCall; 12996 private handleStructIdentAndUndefinedInArgs; 12997 private static LimitedApis; 12998 private handleStdlibAPICall; 12999 private findNonFilteringRangesFunctionCalls; 13000 private handleLibraryTypeCall; 13001 private handleNewExpression; 13002 private handleAsExpression; 13003 private handleTypeReference; 13004 private handleMetaProperty; 13005 private handleStructDeclaration; 13006 private handleSpreadOp; 13007 private handleConstructSignature; 13008 private handleComments; 13009 private handleExpressionWithTypeArguments; 13010 private handleComputedPropertyName; 13011 private checkErrorSuppressingAnnotation; 13012 private handleDecorators; 13013 private handleGetAccessor; 13014 private handleSetAccessor; 13015 private handleDeclarationInferredType; 13016 private handleDefiniteAssignmentAssertion; 13017 private validatedTypesSet; 13018 private checkAnyOrUnknownChildNode; 13019 private handleInferredObjectreference; 13020 private validateDeclInferredType; 13021 private handleClassStaticBlockDeclaration; 13022 lint(): void; 13023 } 13024 } 13025} 13026declare namespace ts { 13027 namespace ArkTSLinter_1_0 { 13028 class TSCCompiledProgram { 13029 private diagnosticsExtractor; 13030 constructor(program: BuilderProgram); 13031 getProgram(): Program; 13032 getBuilderProgram(): BuilderProgram; 13033 getStrictDiagnostics(fileName: string): Diagnostic[]; 13034 doAllGetDiagnostics(): void; 13035 } 13036 } 13037} 13038declare namespace ts { 13039 namespace ArkTSLinter_1_0 { 13040 function translateDiag(srcFile: SourceFile, problemInfo: ProblemInfo): Diagnostic; 13041 function runArkTSLinter(tsBuilderProgram: BuilderProgram, srcFile?: SourceFile, buildInfoWriteFile?: WriteFileCallback, arkTSVersion?: string): Diagnostic[]; 13042 } 13043} 13044declare namespace ts { 13045 namespace ArkTSLinter_1_1 { 13046 namespace Common { 13047 interface AutofixInfo { 13048 problemID: string; 13049 start: number; 13050 end: number; 13051 } 13052 interface CommandLineOptions { 13053 strictMode?: boolean; 13054 ideMode?: boolean; 13055 logTscErrors?: boolean; 13056 warningsAsErrors: boolean; 13057 parsedConfigFile?: ParsedCommandLine; 13058 inputFiles: string[]; 13059 autofixInfo?: AutofixInfo[]; 13060 } 13061 interface LintOptions { 13062 cmdOptions: CommandLineOptions; 13063 tsProgram?: Program; 13064 [key: string]: any; 13065 } 13066 enum ProblemSeverity { 13067 WARNING = 1, 13068 ERROR = 2 13069 } 13070 } 13071 } 13072} 13073declare namespace ts { 13074 namespace ArkTSLinter_1_1 { 13075 const cookBookMsg: string[]; 13076 const cookBookTag: string[]; 13077 } 13078} 13079declare namespace ts { 13080 namespace ArkTSLinter_1_1 { 13081 namespace DiagnosticCheckerNamespace { 13082 interface DiagnosticChecker { 13083 checkDiagnosticMessage(msgText: string | ts.DiagnosticMessageChain): boolean; 13084 } 13085 } 13086 } 13087} 13088declare namespace ts { 13089 namespace ArkTSLinter_1_1 { 13090 import DiagnosticChecker = DiagnosticCheckerNamespace.DiagnosticChecker; 13091 namespace LibraryTypeCallDiagnosticCheckerNamespace { 13092 const TYPE_0_IS_NOT_ASSIGNABLE_TO_TYPE_1_ERROR_CODE = 2322; 13093 const TYPE_UNKNOWN_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 13094 const TYPE_NULL_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 13095 const TYPE_UNDEFINED_IS_NOT_ASSIGNABLE_TO_TYPE_1_RE: RegExp; 13096 const ARGUMENT_OF_TYPE_0_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_ERROR_CODE = 2345; 13097 const ARGUMENT_OF_TYPE_NULL_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_RE: RegExp; 13098 const ARGUMENT_OF_TYPE_UNDEFINED_IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE_1_RE: RegExp; 13099 const NO_OVERLOAD_MATCHES_THIS_CALL_ERROR_CODE = 2769; 13100 const TYPE = "Type"; 13101 const IS_NOT_ASSIGNABLE_TO_TYPE = "is not assignable to type"; 13102 const ARGUMENT_OF_TYPE = "Argument of type"; 13103 const IS_NOT_ASSIGNABLE_TO_PARAMETER_OF_TYPE = "is not assignable to parameter of type"; 13104 enum ErrorType { 13105 NO_ERROR = 0, 13106 UNKNOW = 1, 13107 NULL = 2, 13108 UNDEFINED = 3 13109 } 13110 class LibraryTypeCallDiagnosticChecker implements DiagnosticChecker { 13111 inLibCall: boolean; 13112 diagnosticMessages: Array<ts.DiagnosticMessageChain> | undefined; 13113 filteredDiagnosticMessages: DiagnosticMessageChain[]; 13114 constructor(filteredDiagnosticMessages: DiagnosticMessageChain[]); 13115 configure(inLibCall: boolean, diagnosticMessages: Array<ts.DiagnosticMessageChain>): void; 13116 checkMessageText(msg: string): boolean; 13117 static checkMessageChain(chain: ts.DiagnosticMessageChain, inLibCall: boolean): ErrorType; 13118 checkFilteredDiagnosticMessages(msgText: ts.DiagnosticMessageChain | string): boolean; 13119 checkDiagnosticMessage(msgText: string | ts.DiagnosticMessageChain): boolean; 13120 static rebuildTscDiagnostics(tscStrictDiagnostics: Map<Diagnostic[]>): void; 13121 static collectDiagnosticMessage(diagnosticMessageChain: DiagnosticMessageChain, textSet: Set<string>): void; 13122 } 13123 } 13124 } 13125} 13126declare namespace ts { 13127 namespace ArkTSLinter_1_1 { 13128 namespace Problems { 13129 import ProblemSeverity = Common.ProblemSeverity; 13130 enum FaultID { 13131 AnyType = 0, 13132 SymbolType = 1, 13133 ObjectLiteralNoContextType = 2, 13134 ArrayLiteralNoContextType = 3, 13135 ComputedPropertyName = 4, 13136 LiteralAsPropertyName = 5, 13137 TypeQuery = 6, 13138 IsOperator = 7, 13139 DestructuringParameter = 8, 13140 YieldExpression = 9, 13141 InterfaceMerging = 10, 13142 EnumMerging = 11, 13143 InterfaceExtendsClass = 12, 13144 IndexMember = 13, 13145 WithStatement = 14, 13146 ThrowStatement = 15, 13147 IndexedAccessType = 16, 13148 UnknownType = 17, 13149 ForInStatement = 18, 13150 InOperator = 19, 13151 FunctionExpression = 20, 13152 IntersectionType = 21, 13153 ObjectTypeLiteral = 22, 13154 CommaOperator = 23, 13155 LimitedReturnTypeInference = 24, 13156 ClassExpression = 25, 13157 DestructuringAssignment = 26, 13158 DestructuringDeclaration = 27, 13159 VarDeclaration = 28, 13160 CatchWithUnsupportedType = 29, 13161 DeleteOperator = 30, 13162 DeclWithDuplicateName = 31, 13163 UnaryArithmNotNumber = 32, 13164 ConstructorType = 33, 13165 ConstructorIface = 34, 13166 ConstructorFuncs = 35, 13167 CallSignature = 36, 13168 TypeAssertion = 37, 13169 PrivateIdentifier = 38, 13170 LocalFunction = 39, 13171 ConditionalType = 40, 13172 MappedType = 41, 13173 NamespaceAsObject = 42, 13174 ClassAsObject = 43, 13175 NonDeclarationInNamespace = 44, 13176 GeneratorFunction = 45, 13177 FunctionContainsThis = 46, 13178 PropertyAccessByIndex = 47, 13179 JsxElement = 48, 13180 EnumMemberNonConstInit = 49, 13181 ImplementsClass = 50, 13182 MethodReassignment = 51, 13183 MultipleStaticBlocks = 52, 13184 ThisType = 53, 13185 IntefaceExtendDifProps = 54, 13186 StructuralIdentity = 55, 13187 ExportAssignment = 56, 13188 ImportAssignment = 57, 13189 GenericCallNoTypeArgs = 58, 13190 ParameterProperties = 59, 13191 InstanceofUnsupported = 60, 13192 ShorthandAmbientModuleDecl = 61, 13193 WildcardsInModuleName = 62, 13194 UMDModuleDefinition = 63, 13195 NewTarget = 64, 13196 DefiniteAssignment = 65, 13197 Prototype = 66, 13198 GlobalThis = 67, 13199 UtilityType = 68, 13200 PropertyDeclOnFunction = 69, 13201 FunctionApplyCall = 70, 13202 FunctionBind = 71, 13203 ConstAssertion = 72, 13204 ImportAssertion = 73, 13205 SpreadOperator = 74, 13206 LimitedStdLibApi = 75, 13207 ErrorSuppression = 76, 13208 StrictDiagnostic = 77, 13209 ImportAfterStatement = 78, 13210 EsObjectType = 79, 13211 SendableClassInheritance = 80, 13212 SendablePropType = 81, 13213 SendableDefiniteAssignment = 82, 13214 SendableGenericTypes = 83, 13215 SendableCapturedVars = 84, 13216 SendableClassDecorator = 85, 13217 SendableObjectInitialization = 86, 13218 SendableComputedPropName = 87, 13219 SendableAsExpr = 88, 13220 SharedNoSideEffectImport = 89, 13221 SharedModuleExports = 90, 13222 SharedModuleNoWildcardExport = 91, 13223 NoTsImportEts = 92, 13224 SendableTypeInheritance = 93, 13225 SendableTypeExported = 94, 13226 NoTsReExportEts = 95, 13227 NoNamespaceImportEtsToTs = 96, 13228 NoSideEffectImportEtsToTs = 97, 13229 SendableExplicitFieldType = 98, 13230 SendableFunctionImportedVariables = 99, 13231 SendableFunctionDecorator = 100, 13232 SendableTypeAliasDecorator = 101, 13233 SendableTypeAliasDeclaration = 102, 13234 SendableFunctionAssignment = 103, 13235 SendableFunctionOverloadDecorator = 104, 13236 SendableFunctionProperty = 105, 13237 SendableFunctionAsExpr = 106, 13238 SendableDecoratorLimited = 107, 13239 SendableClosureExport = 108, 13240 SharedModuleExportsWarning = 109, 13241 SendableBetaCompatible = 110, 13242 SendablePropTypeWarning = 111, 13243 LAST_ID = 112 13244 } 13245 class FaultAttributes { 13246 cookBookRef: number; 13247 migratable: boolean; 13248 severity: ProblemSeverity; 13249 constructor(cookBookRef: number, migratable?: boolean, severity?: ProblemSeverity); 13250 } 13251 const faultsAttrs: FaultAttributes[]; 13252 } 13253 } 13254} 13255declare namespace ts { 13256 namespace ArkTSLinter_1_1 { 13257 import AutofixInfo = Common.AutofixInfo; 13258 namespace Utils { 13259 const PROPERTY_HAS_NO_INITIALIZER_ERROR_CODE = 2564; 13260 const NON_INITIALIZABLE_PROPERTY_DECORATORS: string[]; 13261 const NON_INITIALIZABLE_PROPERTY_CLASS_DECORATORS: string[]; 13262 const LIMITED_STANDARD_UTILITY_TYPES: string[]; 13263 const ALLOWED_STD_SYMBOL_API: string[]; 13264 const ARKTS_IGNORE_DIRS: string[]; 13265 const ARKTS_IGNORE_FILES: string[]; 13266 const SENDABLE_DECORATOR = "Sendable"; 13267 const SENDABLE_INTERFACE = "ISendable"; 13268 const SENDABLE_DECORATOR_NODES: SyntaxKind[]; 13269 const SENDABLE_CLOSURE_DECLS: SyntaxKind[]; 13270 const ARKTS_COLLECTIONS_D_ETS = "@arkts.collections.d.ets"; 13271 const COLLECTIONS_NAMESPACE = "collections"; 13272 const ARKTS_LANG_D_ETS = "@arkts.lang.d.ets"; 13273 const LANG_NAMESPACE = "lang"; 13274 const ISENDABLE_TYPE = "ISendable"; 13275 const USE_SHARED = "use shared"; 13276 const D_TS = ".d.ts"; 13277 function setTypeChecker(tsTypeChecker: TypeChecker): void; 13278 function clearTypeChecker(): void; 13279 function setTestMode(tsTestMode: boolean): void; 13280 function getStartPos(nodeOrComment: Node | CommentRange): number; 13281 function getEndPos(nodeOrComment: Node | CommentRange): number; 13282 function getHighlightRange(nodeOrComment: Node | CommentRange, faultId: number): [number, number]; 13283 function getVarDeclarationHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 13284 function getCatchWithUnsupportedTypeHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 13285 function getForInStatementHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 13286 function getWithStatementHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 13287 function getDeleteOperatorHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 13288 function getTypeQueryHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 13289 function getInstanceofUnsupportedHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 13290 function getConstAssertionHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 13291 function getLimitedReturnTypeInferenceHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 13292 function getLocalFunctionHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 13293 function getFunctionApplyCallHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 13294 function getDeclWithDuplicateNameHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 13295 function getObjectLiteralNoContextTypeHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 13296 function getClassExpressionHighlightRange(nodeOrComment: Node | CommentRange): [number, number] | undefined; 13297 function getMultipleStaticBlocksHighlightRange(nodeOrComment: ts.Node | ts.CommentRange): [number, number] | undefined; 13298 function getSendableDefiniteAssignmentHighlightRange(nodeOrComment: ts.Node | ts.CommentRange): [number, number] | undefined; 13299 function getKeywordHighlightRange(nodeOrComment: Node | CommentRange, keyword: string): [number, number]; 13300 function isAssignmentOperator(tsBinOp: BinaryOperatorToken): boolean; 13301 function isType(tsType: TypeNode | undefined, checkType: string): boolean; 13302 function entityNameToString(name: EntityName): string; 13303 function isNumberLikeType(tsType: Type): boolean; 13304 function isBooleanLikeType(tsType: Type): boolean; 13305 function isStringLikeType(tsType: Type): boolean; 13306 function isStringType(tsType: ts.Type): boolean; 13307 function isPrimitiveEnumMemberType(type: Type, primitiveType: TypeFlags): boolean; 13308 function unwrapParenthesizedType(tsType: TypeNode): TypeNode; 13309 function findParentIf(asExpr: AsExpression): IfStatement | null; 13310 function isDestructuringAssignmentLHS(tsExpr: ArrayLiteralExpression | ObjectLiteralExpression): boolean; 13311 function isEnumType(tsType: ts.Type): boolean; 13312 function isEnum(tsSymbol: ts.Symbol): boolean; 13313 function isEnumMemberType(tsType: Type): boolean; 13314 function isObjectLiteralType(tsType: Type): boolean; 13315 function hasModifier(tsModifiers: readonly Modifier[] | undefined, tsModifierKind: number): boolean; 13316 function unwrapParenthesized(tsExpr: Expression): Expression; 13317 function followIfAliased(sym: Symbol): Symbol; 13318 function trueSymbolAtLocation(node: Node): Symbol | undefined; 13319 function clearTrueSymbolAtLocationCache(): void; 13320 function isTypeDeclSyntaxKind(kind: SyntaxKind): boolean; 13321 function symbolHasDuplicateName(symbol: Symbol, tsDeclKind: SyntaxKind): boolean; 13322 function isReferenceType(tsType: Type): boolean; 13323 function isPrimitiveType(type: Type): boolean; 13324 function isPrimitiveLiteralType(type: ts.Type): boolean; 13325 function isPurePrimitiveLiteralType(type: ts.Type): boolean; 13326 function isTypeSymbol(symbol: Symbol | undefined): boolean; 13327 function isGenericArrayType(tsType: Type): tsType is TypeReference; 13328 function isReadonlyArrayType(tsType: Type): boolean; 13329 function isTypedArray(tsType: ts.Type): boolean; 13330 function isArray(tsType: ts.Type): boolean; 13331 function isTuple(tsType: ts.Type): boolean; 13332 function isOrDerivedFrom(tsType: ts.Type, checkType: CheckType, checkedBaseTypes?: Set<ts.Type>): boolean; 13333 function isTypeReference(tsType: Type): tsType is TypeReference; 13334 function isNullType(tsTypeNode: TypeNode): boolean; 13335 function isThisOrSuperExpr(tsExpr: Expression): boolean; 13336 function isPrototypeSymbol(symbol: Symbol | undefined): boolean; 13337 function isFunctionSymbol(symbol: Symbol | undefined): boolean; 13338 function isInterfaceType(tsType: Type | undefined): boolean; 13339 function isAnyType(tsType: Type): tsType is TypeReference; 13340 function isUnknownType(tsType: Type): boolean; 13341 function isUnsupportedType(tsType: Type): boolean; 13342 function isUnsupportedUnionType(tsType: Type): boolean; 13343 function isFunctionOrMethod(tsSymbol: Symbol | undefined): boolean; 13344 function isMethodAssignment(tsSymbol: Symbol | undefined): boolean; 13345 function getDeclaration(tsSymbol: ts.Symbol | undefined): ts.Declaration | undefined; 13346 function isValidEnumMemberInit(tsExpr: Expression): boolean; 13347 function isCompileTimeExpression(tsExpr: Expression): boolean; 13348 function isConst(tsNode: Node): boolean; 13349 function isNumberConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression | NumericLiteral): boolean; 13350 function isIntegerConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression | NumericLiteral): boolean; 13351 function isStringConstantValue(tsExpr: EnumMember | PropertyAccessExpression | ElementAccessExpression): boolean; 13352 function relatedByInheritanceOrIdentical(typeA: Type, typeB: Type): boolean; 13353 function reduceReference(t: ts.Type): ts.Type; 13354 function needToDeduceStructuralIdentity(lhsType: Type, rhsType: Type, rhsExpr: Expression, isStrict?: boolean): boolean; 13355 function needStrictMatchType(lhsType: ts.Type, rhsType: ts.Type): boolean; 13356 function hasPredecessor(node: Node, predicate: (node: Node) => boolean): boolean; 13357 function processParentTypes(parentTypes: NodeArray<ExpressionWithTypeArguments>, typeB: Type, processInterfaces: boolean): boolean; 13358 function isObject(tsType: Type): boolean; 13359 function logTscDiagnostic(diagnostics: readonly Diagnostic[], log: (message: any, ...args: any[]) => void): void; 13360 function encodeProblemInfo(problem: ProblemInfo): string; 13361 function decodeAutofixInfo(info: string): AutofixInfo; 13362 function isCallToFunctionWithOmittedReturnType(tsExpr: Expression): boolean; 13363 function validateObjectLiteralType(type: Type | undefined): boolean; 13364 function isStructDeclarationKind(kind: SyntaxKind): boolean; 13365 function isStructDeclaration(node: Node): boolean; 13366 function isStructObjectInitializer(objectLiteral: ObjectLiteralExpression): boolean; 13367 function hasMethods(type: Type): boolean; 13368 function checkTypeSet(typeSet: ts.Type, predicate: CheckType): boolean; 13369 function getNonNullableType(t: ts.Type): ts.Type; 13370 function isObjectLiteralAssignable(lhsType: ts.Type | undefined, rhsExpr: ts.ObjectLiteralExpression): boolean; 13371 function isLiteralType(type: Type): boolean; 13372 function validateFields(objectType: Type, objectLiteral: ObjectLiteralExpression): boolean; 13373 function isSupportedType(typeNode: TypeNode): boolean; 13374 function isStruct(symbol: Symbol): boolean; 13375 type CheckType = ((t: Type) => boolean); 13376 const ES_OBJECT = "ESObject"; 13377 const LIMITED_STD_GLOBAL_FUNC: string[]; 13378 const LIMITED_STD_OBJECT_API: string[]; 13379 const LIMITED_STD_REFLECT_API: string[]; 13380 const LIMITED_STD_PROXYHANDLER_API: string[]; 13381 const FUNCTION_HAS_NO_RETURN_ERROR_CODE = 2366; 13382 const NON_RETURN_FUNCTION_DECORATORS: string[]; 13383 const STANDARD_LIBRARIES: string[]; 13384 const TYPED_ARRAYS: string[]; 13385 function getParentSymbolName(symbol: Symbol): string | undefined; 13386 function isGlobalSymbol(symbol: Symbol): boolean; 13387 function isSymbolAPI(symbol: Symbol): boolean; 13388 function isStdSymbol(symbol: ts.Symbol): boolean; 13389 function isSymbolIterator(symbol: ts.Symbol): boolean; 13390 function isSymbolIteratorExpression(expr: ts.Expression): boolean; 13391 function isDefaultImport(importSpec: ImportSpecifier): boolean; 13392 function hasAccessModifier(decl: Declaration): boolean; 13393 function getModifier(modifiers: readonly Modifier[] | undefined, modifierKind: SyntaxKind): Modifier | undefined; 13394 function getAccessModifier(modifiers: readonly Modifier[] | undefined): Modifier | undefined; 13395 function isStdRecordType(type: Type): boolean; 13396 function isStdMapType(type: Type): boolean; 13397 function isStdErrorType(type: ts.Type): boolean; 13398 function isStdPartialType(type: Type): boolean; 13399 function isStdRequiredType(type: Type): boolean; 13400 function isStdReadonlyType(type: Type): boolean; 13401 function isLibraryType(type: Type): boolean; 13402 function hasLibraryType(node: Node): boolean; 13403 function isLibrarySymbol(sym: Symbol | undefined): boolean; 13404 function srcFilePathContainsDirectory(srcFile: SourceFile, dir: string): boolean; 13405 function pathContainsDirectory(targetPath: string, dir: string): boolean; 13406 function getScriptKind(srcFile: SourceFile): ScriptKind; 13407 function isStdLibraryType(type: Type): boolean; 13408 function isStdLibrarySymbol(sym: Symbol | undefined): boolean; 13409 function isIntrinsicObjectType(type: Type): boolean; 13410 function isDynamicType(type: Type | undefined): boolean | undefined; 13411 function isObjectType(type: ts.Type): type is ts.ObjectType; 13412 function isAnonymous(type: ts.Type): boolean; 13413 function isDynamicLiteralInitializer(expr: Expression): boolean; 13414 function isEsObjectType(typeNode: ts.TypeNode | undefined): boolean; 13415 function isInsideBlock(node: ts.Node): boolean; 13416 function isEsObjectPossiblyAllowed(typeRef: ts.TypeReferenceNode): boolean; 13417 function isValueAssignableToESObject(node: ts.Node): boolean; 13418 function getVariableDeclarationTypeNode(node: Node): TypeNode | undefined; 13419 function getSymbolDeclarationTypeNode(sym: ts.Symbol): ts.TypeNode | undefined; 13420 function hasEsObjectType(node: Node): boolean; 13421 function symbolHasEsObjectType(sym: ts.Symbol): boolean; 13422 function isEsObjectSymbol(sym: Symbol): boolean; 13423 function isAnonymousType(type: Type): boolean; 13424 function getSymbolOfCallExpression(callExpr: CallExpression): Symbol | undefined; 13425 function typeIsRecursive(topType: Type, type?: Type | undefined): boolean; 13426 function getTypeOrTypeConstraintAtLocation(expr: ts.Expression): ts.Type; 13427 function isStdBigIntType(type: ts.Type): boolean; 13428 function isStdNumberType(type: ts.Type): boolean; 13429 function isStdBooleanType(type: ts.Type): boolean; 13430 function isEnumStringLiteral(expr: ts.Expression): boolean; 13431 function isValidComputedPropertyName(computedProperty: ComputedPropertyName, isRecordObjectInitializer?: boolean): boolean; 13432 function isAllowedIndexSignature(node: ts.IndexSignatureDeclaration): boolean; 13433 function isArkTSCollectionsArrayLikeType(type: ts.Type): boolean; 13434 function isArkTSCollectionsClassOrInterfaceDeclaration(decl: ts.Node): boolean; 13435 function getDecoratorName(decorator: ts.Decorator): string; 13436 function unwrapParenthesizedTypeNode(typeNode: ts.TypeNode): ts.TypeNode; 13437 function isSendableTypeNode(typeNode: ts.TypeNode, isShared?: boolean): boolean; 13438 function isSendableType(type: ts.Type): boolean; 13439 function isShareableType(tsType: ts.Type): boolean; 13440 function isSendableClassOrInterface(type: ts.Type): boolean; 13441 function typeContainsSendableClassOrInterface(type: ts.Type): boolean; 13442 function typeContainsNonSendableClassOrInterface(type: ts.Type): boolean; 13443 function isConstEnum(sym: ts.Symbol | undefined): boolean; 13444 function isSendableUnionType(type: ts.UnionType): boolean; 13445 function hasSendableDecorator(decl: ts.ClassDeclaration | ts.FunctionDeclaration | ts.TypeAliasDeclaration): boolean; 13446 function getNonSendableDecorators(decl: ts.ClassDeclaration | ts.FunctionDeclaration | ts.TypeAliasDeclaration): ts.Decorator[] | undefined; 13447 function getSendableDecorator(decl: ts.ClassDeclaration | ts.FunctionDeclaration | ts.TypeAliasDeclaration): ts.Decorator | undefined; 13448 function getDecoratorsIfInSendableClass(declaration: ts.HasDecorators): readonly ts.Decorator[] | undefined; 13449 function isISendableInterface(type: ts.Type): boolean; 13450 function isSharedModule(sourceFile: ts.SourceFile): boolean; 13451 function getDeclarationNode(node: ts.Node): ts.Declaration | undefined; 13452 function isShareableEntity(node: ts.Node): boolean; 13453 function isSendableClassOrInterfaceEntity(node: ts.Node): boolean; 13454 function isInImportWhiteList(resolvedModule: ResolvedModuleFull): boolean; 13455 function hasSendableDecoratorFunctionOverload(decl: ts.FunctionDeclaration): boolean; 13456 function isSendableFunction(type: ts.Type): boolean; 13457 function isSendableTypeAlias(type: ts.Type): boolean; 13458 function hasSendableTypeAlias(type: ts.Type): boolean; 13459 function isNonSendableFunctionTypeAlias(type: ts.Type): boolean; 13460 function isWrongSendableFunctionAssignment(lhsType: ts.Type, rhsType: ts.Type): boolean; 13461 function searchFileExportDecl(sourceFile: ts.SourceFile, targetDecls?: ts.SyntaxKind[]): Set<ts.Node>; 13462 function clearUtilsGlobalvariables(): void; 13463 } 13464 } 13465} 13466declare namespace ts { 13467 namespace ArkTSLinter_1_1 { 13468 namespace Autofixer { 13469 import AutofixInfo = Common.AutofixInfo; 13470 import FaultID = Problems.FaultID; 13471 const AUTOFIX_ALL: AutofixInfo; 13472 const autofixInfo: AutofixInfo[]; 13473 function shouldAutofix(node: Node, faultID: FaultID): boolean; 13474 interface Autofix { 13475 replacementText: string; 13476 start: number; 13477 end: number; 13478 } 13479 function fixLiteralAsPropertyName(node: Node): Autofix[] | undefined; 13480 function fixPropertyAccessByIndex(node: Node): Autofix[] | undefined; 13481 function fixFunctionExpression(funcExpr: FunctionExpression, params?: NodeArray<ParameterDeclaration>, retType?: TypeNode | undefined): Autofix; 13482 function fixReturnType(funcLikeDecl: FunctionLikeDeclaration, typeNode: TypeNode): Autofix; 13483 function fixCtorParameterProperties(ctorDecl: ConstructorDeclaration, paramTypes: TypeNode[]): Autofix[] | undefined; 13484 } 13485 } 13486} 13487declare namespace ts { 13488 namespace ArkTSLinter_1_1 { 13489 import FaultID = Problems.FaultID; 13490 class LinterConfig { 13491 static nodeDesc: string[]; 13492 static tsSyntaxKindNames: string[]; 13493 static initStatic(): void; 13494 static terminalTokens: Set<SyntaxKind>; 13495 static incrementOnlyTokens: ESMap<SyntaxKind, FaultID>; 13496 } 13497 } 13498} 13499declare namespace ts { 13500 namespace ArkTSLinter_1_1 { 13501 import Autofix = Autofixer.Autofix; 13502 import LibraryTypeCallDiagnosticChecker = LibraryTypeCallDiagnosticCheckerNamespace.LibraryTypeCallDiagnosticChecker; 13503 interface ProblemInfo { 13504 line: number; 13505 column: number; 13506 start: number; 13507 end: number; 13508 type: string; 13509 severity: number; 13510 problem: string; 13511 suggest: string; 13512 rule: string; 13513 ruleTag: number; 13514 autofixable: boolean; 13515 autofix?: Autofix[]; 13516 } 13517 class TypeScriptLinter { 13518 private sourceFile; 13519 private tscStrictDiagnostics?; 13520 static ideMode: boolean; 13521 static strictMode: boolean; 13522 static logTscErrors: boolean; 13523 static warningsAsErrors: boolean; 13524 static lintEtsOnly: boolean; 13525 static totalVisitedNodes: number; 13526 static nodeCounters: number[]; 13527 static lineCounters: number[]; 13528 static totalErrorLines: number; 13529 static errorLineNumbersString: string; 13530 static totalWarningLines: number; 13531 static warningLineNumbersString: string; 13532 static reportDiagnostics: boolean; 13533 static problemsInfos: ProblemInfo[]; 13534 static filteredDiagnosticMessages: DiagnosticMessageChain[]; 13535 static sharedModulesCache: ESMap<string, boolean>; 13536 static strictDiagnosticCache: Set<Diagnostic>; 13537 static unknowDiagnosticCache: Set<Diagnostic>; 13538 static initGlobals(): void; 13539 static initStatic(): void; 13540 static tsTypeChecker: TypeChecker; 13541 currentErrorLine: number; 13542 currentWarningLine: number; 13543 staticBlocks: Set<string>; 13544 libraryTypeCallDiagnosticChecker: LibraryTypeCallDiagnosticChecker; 13545 skipArkTSStaticBlocksCheck: boolean; 13546 private fileExportSendableDeclCaches?; 13547 private compatibleSdkVersionStage; 13548 private compatibleSdkVersion; 13549 constructor(sourceFile: SourceFile, tsProgram: Program, tscStrictDiagnostics?: Map<Diagnostic[]> | undefined); 13550 static clearTsTypeChecker(): void; 13551 readonly handlersMap: ESMap<SyntaxKind, (node: Node) => void>; 13552 incrementCounters(node: Node | CommentRange, faultId: number, autofixable?: boolean, autofix?: Autofix[]): void; 13553 private forEachNodeInSubtree; 13554 private visitSourceFile; 13555 private countInterfaceExtendsDifferentPropertyTypes; 13556 private countDeclarationsWithDuplicateName; 13557 private countClassMembersWithDuplicateName; 13558 private static scopeContainsThis; 13559 private isPrototypePropertyAccess; 13560 private interfaceInheritanceLint; 13561 private lintForInterfaceExtendsDifferentPorpertyTypes; 13562 private handleObjectLiteralExpression; 13563 private handleArrayLiteralExpression; 13564 private handleParameter; 13565 private handleEnumDeclaration; 13566 private handleInterfaceDeclaration; 13567 private handleThrowStatement; 13568 private handleForStatement; 13569 private handleForInStatement; 13570 private handleForOfStatement; 13571 private handleImportDeclaration; 13572 private handleSharedModuleNoSideEffectImport; 13573 private static inSharedModule; 13574 private handlePropertyAccessExpression; 13575 private handlePropertyDeclaration; 13576 private handleSendableClassProperty; 13577 private checkTypeAliasInSendableScope; 13578 private isNoneSendableTypeAlias; 13579 private handlePropertyAssignment; 13580 private handlePropertySignature; 13581 private handleSendableInterfaceProperty; 13582 private filterOutDecoratorsDiagnostics; 13583 private checkInRange; 13584 private filterStrictDiagnostics; 13585 private static isClassLikeOrIface; 13586 private handleFunctionExpression; 13587 private handleArrowFunction; 13588 private handleFunctionDeclaration; 13589 private handleMissingReturnType; 13590 private hasLimitedTypeInferenceFromReturnExpr; 13591 private isValidTypeForUnaryArithmeticOperator; 13592 private handlePrefixUnaryExpression; 13593 private handleBinaryExpression; 13594 private handleVariableDeclarationList; 13595 private handleVariableDeclaration; 13596 private handleEsObjectDelaration; 13597 private handleEsObjectAssignment; 13598 private handleCatchClause; 13599 private handleClassDeclaration; 13600 private scanCapturedVarsInSendableScope; 13601 private checkLocalDecl; 13602 private checkLocalDeclWithSendableClosure; 13603 private checkIsTopClosure; 13604 private checkNamespaceImportVar; 13605 isFileExportSendableDecl(decl: ts.Declaration): boolean; 13606 private checkClassDeclarationHeritageClause; 13607 private isValidSendableClassExtends; 13608 private checkSendableTypeParameter; 13609 private processClassStaticBlocks; 13610 private handleModuleDeclaration; 13611 private handleTypeAliasDeclaration; 13612 private handleImportClause; 13613 private handleImportSpecifier; 13614 private handleNamespaceImport; 13615 private handleTypeAssertionExpression; 13616 private handleMethodDeclaration; 13617 private handleMethodSignature; 13618 private handleIdentifier; 13619 private isAllowedClassValueContext; 13620 private handleRestrictedValues; 13621 private identiferUseInValueContext; 13622 private isEnumPropAccess; 13623 private isElementAcessAllowed; 13624 private handleElementAccessExpression; 13625 private handleEnumMember; 13626 private handleExportAssignment; 13627 private handleCallExpression; 13628 private handleEtsComponentExpression; 13629 private handleImportCall; 13630 private handleRequireCall; 13631 private handleGenericCallWithNoTypeArgs; 13632 private static readonly listFunctionApplyCallApis; 13633 private static readonly listFunctionBindApis; 13634 private handleFunctionApplyBindPropCall; 13635 private handleStructIdentAndUndefinedInArgs; 13636 private static LimitedApis; 13637 private handleStdlibAPICall; 13638 private findNonFilteringRangesFunctionCalls; 13639 private handleLibraryTypeCall; 13640 private handleNewExpression; 13641 private handleSendableGenericTypes; 13642 private handleAsExpression; 13643 private handleTypeReference; 13644 private checkSendableTypeArguments; 13645 private handleMetaProperty; 13646 private handleSpreadOp; 13647 private handleConstructSignature; 13648 private handleExpressionWithTypeArguments; 13649 private handleComputedPropertyName; 13650 private isSendableCompPropName; 13651 private handleGetAccessor; 13652 private handleSetAccessor; 13653 private handleDeclarationInferredType; 13654 private handleDefiniteAssignmentAssertion; 13655 private validatedTypesSet; 13656 private checkAnyOrUnknownChildNode; 13657 private handleInferredObjectreference; 13658 private validateDeclInferredType; 13659 private processNoCheckEntry; 13660 private reportThisKeywordsInScope; 13661 private handleCommentDirectives; 13662 private handleClassStaticBlockDeclaration; 13663 private handleIndexSignature; 13664 lint(): void; 13665 private handleExportKeyword; 13666 private handleExportDeclaration; 13667 private handleReturnStatement; 13668 /** 13669 * 'arkts-no-structural-typing' check was missing in some scenarios, 13670 * in order not to cause incompatibility, 13671 * only need to strictly match the type of filling the check again 13672 */ 13673 private checkAssignmentMatching; 13674 private handleDecorator; 13675 private isSendableDecoratorValid; 13676 } 13677 } 13678} 13679declare namespace ts { 13680 namespace ArkTSLinter_1_1 { 13681 import Autofix = Autofixer.Autofix; 13682 interface KitSymbol { 13683 source: string; 13684 bindings: string; 13685 } 13686 type KitSymbols = Record<string, KitSymbol>; 13687 interface KitInfo { 13688 symbols?: KitSymbols; 13689 } 13690 class InteropTypescriptLinter { 13691 private sourceFile; 13692 private isInSdk; 13693 static strictMode: boolean; 13694 static totalVisitedNodes: number; 13695 static nodeCounters: number[]; 13696 static lineCounters: number[]; 13697 static totalErrorLines: number; 13698 static errorLineNumbersString: string; 13699 static totalWarningLines: number; 13700 static warningLineNumbersString: string; 13701 static reportDiagnostics: boolean; 13702 static problemsInfos: ProblemInfo[]; 13703 static initGlobals(): void; 13704 static initStatic(): void; 13705 static tsTypeChecker: TypeChecker; 13706 static etsLoaderPath?: string; 13707 static kitInfos: Map<KitInfo>; 13708 private KIT; 13709 private D_TS; 13710 private D_ETS; 13711 private ETS; 13712 private SDK_PATH; 13713 currentErrorLine: number; 13714 currentWarningLine: number; 13715 constructor(sourceFile: SourceFile, tsProgram: Program, isInSdk: boolean); 13716 static clearTsTypeChecker(): void; 13717 readonly handlersMap: ESMap<SyntaxKind, (node: Node) => void>; 13718 incrementCounters(node: Node | CommentRange, faultId: number, autofixable?: boolean, autofix?: Autofix[]): void; 13719 private forEachNodeInSubtree; 13720 private visitSourceFile; 13721 private handleImportDeclaration; 13722 private checkSendableClassorISendable; 13723 private checkKitImportClause; 13724 private checkImportClause; 13725 private allowInSdkImportSendable; 13726 private handleClassDeclaration; 13727 private checkClassOrInterfaceDeclarationHeritageClause; 13728 private handleInterfaceDeclaration; 13729 private handleNewExpression; 13730 private handleSendableGenericTypes; 13731 private handleObjectLiteralExpression; 13732 private handleArrayLiteralExpression; 13733 private handleAsExpression; 13734 private handleExportDeclaration; 13735 private handleExportAssignment; 13736 private initKitInfos; 13737 private getKitModuleFileNames; 13738 lint(): void; 13739 } 13740 } 13741} 13742declare namespace ts { 13743 namespace ArkTSLinter_1_1 { 13744 class TSCCompiledProgram { 13745 private diagnosticsExtractor; 13746 constructor(program: BuilderProgram); 13747 getProgram(): Program; 13748 getBuilderProgram(): BuilderProgram; 13749 getStrictDiagnostics(sourceFile: SourceFile): Diagnostic[]; 13750 doAllGetDiagnostics(): void; 13751 } 13752 } 13753} 13754declare namespace ts { 13755 namespace ArkTSLinter_1_1 { 13756 function translateDiag(srcFile: SourceFile, problemInfo: ProblemInfo): Diagnostic; 13757 function runArkTSLinter(tsBuilderProgram: BuilderProgram, srcFile?: SourceFile, buildInfoWriteFile?: WriteFileCallback, arkTSVersion?: string): Diagnostic[]; 13758 } 13759} 13760declare namespace ts { 13761 enum TimePhase { 13762 START = "start", 13763 GET_PROGRAM = "getProgram(not ArkTSLinter)", 13764 UPDATE_ERROR_FILE = "updateErrorFile", 13765 INIT = "init", 13766 STRICT_PROGRAM_GET_SEMANTIC_DIAGNOSTICS = "strictProgramGetSemanticDiagnostics", 13767 NON_STRICT_PROGRAM_GET_SEMANTIC_DIAGNOSTICS = "nonStrictProgramGetSemanticDiagnostics", 13768 NON_STRICT_PROGRAM_GET_SYNTACTIC_DIAGNOSTICS = "nonStrictProgramGetSyntacticDiagnostics", 13769 GET_TSC_DIAGNOSTICS = "getTscDiagnostics", 13770 EMIT_BUILD_INFO = "emitBuildInfo", 13771 LINT = "lint" 13772 } 13773 class ArkTSLinterTimePrinter { 13774 private static instance?; 13775 private arkTSTimePrintSwitch; 13776 private timeMap; 13777 private constructor(); 13778 static getInstance(): ArkTSLinterTimePrinter; 13779 static destroyInstance(): void; 13780 setArkTSTimePrintSwitch(arkTSTimePrintSwitch: boolean): void; 13781 appendTime(key: string): void; 13782 private formatMapAsTable; 13783 printTimes(): void; 13784 } 13785} 13786 13787export = ts; 13788export as namespace ts;