UNPKG

443 kBTypeScriptView Raw
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.0";
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: never;
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 EqualsToken = 62,
170 PlusEqualsToken = 63,
171 MinusEqualsToken = 64,
172 AsteriskEqualsToken = 65,
173 AsteriskAsteriskEqualsToken = 66,
174 SlashEqualsToken = 67,
175 PercentEqualsToken = 68,
176 LessThanLessThanEqualsToken = 69,
177 GreaterThanGreaterThanEqualsToken = 70,
178 GreaterThanGreaterThanGreaterThanEqualsToken = 71,
179 AmpersandEqualsToken = 72,
180 BarEqualsToken = 73,
181 BarBarEqualsToken = 74,
182 AmpersandAmpersandEqualsToken = 75,
183 QuestionQuestionEqualsToken = 76,
184 CaretEqualsToken = 77,
185 Identifier = 78,
186 PrivateIdentifier = 79,
187 BreakKeyword = 80,
188 CaseKeyword = 81,
189 CatchKeyword = 82,
190 ClassKeyword = 83,
191 ConstKeyword = 84,
192 ContinueKeyword = 85,
193 DebuggerKeyword = 86,
194 DefaultKeyword = 87,
195 DeleteKeyword = 88,
196 DoKeyword = 89,
197 ElseKeyword = 90,
198 EnumKeyword = 91,
199 ExportKeyword = 92,
200 ExtendsKeyword = 93,
201 FalseKeyword = 94,
202 FinallyKeyword = 95,
203 ForKeyword = 96,
204 FunctionKeyword = 97,
205 IfKeyword = 98,
206 ImportKeyword = 99,
207 InKeyword = 100,
208 InstanceOfKeyword = 101,
209 NewKeyword = 102,
210 NullKeyword = 103,
211 ReturnKeyword = 104,
212 SuperKeyword = 105,
213 SwitchKeyword = 106,
214 ThisKeyword = 107,
215 ThrowKeyword = 108,
216 TrueKeyword = 109,
217 TryKeyword = 110,
218 TypeOfKeyword = 111,
219 VarKeyword = 112,
220 VoidKeyword = 113,
221 WhileKeyword = 114,
222 WithKeyword = 115,
223 ImplementsKeyword = 116,
224 InterfaceKeyword = 117,
225 LetKeyword = 118,
226 PackageKeyword = 119,
227 PrivateKeyword = 120,
228 ProtectedKeyword = 121,
229 PublicKeyword = 122,
230 StaticKeyword = 123,
231 YieldKeyword = 124,
232 AbstractKeyword = 125,
233 AsKeyword = 126,
234 AssertsKeyword = 127,
235 AnyKeyword = 128,
236 AsyncKeyword = 129,
237 AwaitKeyword = 130,
238 BooleanKeyword = 131,
239 ConstructorKeyword = 132,
240 DeclareKeyword = 133,
241 GetKeyword = 134,
242 InferKeyword = 135,
243 IsKeyword = 136,
244 KeyOfKeyword = 137,
245 ModuleKeyword = 138,
246 NamespaceKeyword = 139,
247 NeverKeyword = 140,
248 ReadonlyKeyword = 141,
249 RequireKeyword = 142,
250 NumberKeyword = 143,
251 ObjectKeyword = 144,
252 SetKeyword = 145,
253 StringKeyword = 146,
254 SymbolKeyword = 147,
255 TypeKeyword = 148,
256 UndefinedKeyword = 149,
257 UniqueKeyword = 150,
258 UnknownKeyword = 151,
259 FromKeyword = 152,
260 GlobalKeyword = 153,
261 BigIntKeyword = 154,
262 OfKeyword = 155,
263 QualifiedName = 156,
264 ComputedPropertyName = 157,
265 TypeParameter = 158,
266 Parameter = 159,
267 Decorator = 160,
268 PropertySignature = 161,
269 PropertyDeclaration = 162,
270 MethodSignature = 163,
271 MethodDeclaration = 164,
272 Constructor = 165,
273 GetAccessor = 166,
274 SetAccessor = 167,
275 CallSignature = 168,
276 ConstructSignature = 169,
277 IndexSignature = 170,
278 TypePredicate = 171,
279 TypeReference = 172,
280 FunctionType = 173,
281 ConstructorType = 174,
282 TypeQuery = 175,
283 TypeLiteral = 176,
284 ArrayType = 177,
285 TupleType = 178,
286 OptionalType = 179,
287 RestType = 180,
288 UnionType = 181,
289 IntersectionType = 182,
290 ConditionalType = 183,
291 InferType = 184,
292 ParenthesizedType = 185,
293 ThisType = 186,
294 TypeOperator = 187,
295 IndexedAccessType = 188,
296 MappedType = 189,
297 LiteralType = 190,
298 NamedTupleMember = 191,
299 ImportType = 192,
300 ObjectBindingPattern = 193,
301 ArrayBindingPattern = 194,
302 BindingElement = 195,
303 ArrayLiteralExpression = 196,
304 ObjectLiteralExpression = 197,
305 PropertyAccessExpression = 198,
306 ElementAccessExpression = 199,
307 CallExpression = 200,
308 NewExpression = 201,
309 TaggedTemplateExpression = 202,
310 TypeAssertionExpression = 203,
311 ParenthesizedExpression = 204,
312 FunctionExpression = 205,
313 ArrowFunction = 206,
314 DeleteExpression = 207,
315 TypeOfExpression = 208,
316 VoidExpression = 209,
317 AwaitExpression = 210,
318 PrefixUnaryExpression = 211,
319 PostfixUnaryExpression = 212,
320 BinaryExpression = 213,
321 ConditionalExpression = 214,
322 TemplateExpression = 215,
323 YieldExpression = 216,
324 SpreadElement = 217,
325 ClassExpression = 218,
326 OmittedExpression = 219,
327 ExpressionWithTypeArguments = 220,
328 AsExpression = 221,
329 NonNullExpression = 222,
330 MetaProperty = 223,
331 SyntheticExpression = 224,
332 TemplateSpan = 225,
333 SemicolonClassElement = 226,
334 Block = 227,
335 EmptyStatement = 228,
336 VariableStatement = 229,
337 ExpressionStatement = 230,
338 IfStatement = 231,
339 DoStatement = 232,
340 WhileStatement = 233,
341 ForStatement = 234,
342 ForInStatement = 235,
343 ForOfStatement = 236,
344 ContinueStatement = 237,
345 BreakStatement = 238,
346 ReturnStatement = 239,
347 WithStatement = 240,
348 SwitchStatement = 241,
349 LabeledStatement = 242,
350 ThrowStatement = 243,
351 TryStatement = 244,
352 DebuggerStatement = 245,
353 VariableDeclaration = 246,
354 VariableDeclarationList = 247,
355 FunctionDeclaration = 248,
356 ClassDeclaration = 249,
357 InterfaceDeclaration = 250,
358 TypeAliasDeclaration = 251,
359 EnumDeclaration = 252,
360 ModuleDeclaration = 253,
361 ModuleBlock = 254,
362 CaseBlock = 255,
363 NamespaceExportDeclaration = 256,
364 ImportEqualsDeclaration = 257,
365 ImportDeclaration = 258,
366 ImportClause = 259,
367 NamespaceImport = 260,
368 NamedImports = 261,
369 ImportSpecifier = 262,
370 ExportAssignment = 263,
371 ExportDeclaration = 264,
372 NamedExports = 265,
373 NamespaceExport = 266,
374 ExportSpecifier = 267,
375 MissingDeclaration = 268,
376 ExternalModuleReference = 269,
377 JsxElement = 270,
378 JsxSelfClosingElement = 271,
379 JsxOpeningElement = 272,
380 JsxClosingElement = 273,
381 JsxFragment = 274,
382 JsxOpeningFragment = 275,
383 JsxClosingFragment = 276,
384 JsxAttribute = 277,
385 JsxAttributes = 278,
386 JsxSpreadAttribute = 279,
387 JsxExpression = 280,
388 CaseClause = 281,
389 DefaultClause = 282,
390 HeritageClause = 283,
391 CatchClause = 284,
392 PropertyAssignment = 285,
393 ShorthandPropertyAssignment = 286,
394 SpreadAssignment = 287,
395 EnumMember = 288,
396 UnparsedPrologue = 289,
397 UnparsedPrepend = 290,
398 UnparsedText = 291,
399 UnparsedInternalText = 292,
400 UnparsedSyntheticReference = 293,
401 SourceFile = 294,
402 Bundle = 295,
403 UnparsedSource = 296,
404 InputFiles = 297,
405 JSDocTypeExpression = 298,
406 JSDocAllType = 299,
407 JSDocUnknownType = 300,
408 JSDocNullableType = 301,
409 JSDocNonNullableType = 302,
410 JSDocOptionalType = 303,
411 JSDocFunctionType = 304,
412 JSDocVariadicType = 305,
413 JSDocNamepathType = 306,
414 JSDocComment = 307,
415 JSDocTypeLiteral = 308,
416 JSDocSignature = 309,
417 JSDocTag = 310,
418 JSDocAugmentsTag = 311,
419 JSDocImplementsTag = 312,
420 JSDocAuthorTag = 313,
421 JSDocDeprecatedTag = 314,
422 JSDocClassTag = 315,
423 JSDocPublicTag = 316,
424 JSDocPrivateTag = 317,
425 JSDocProtectedTag = 318,
426 JSDocReadonlyTag = 319,
427 JSDocCallbackTag = 320,
428 JSDocEnumTag = 321,
429 JSDocParameterTag = 322,
430 JSDocReturnTag = 323,
431 JSDocThisTag = 324,
432 JSDocTypeTag = 325,
433 JSDocTemplateTag = 326,
434 JSDocTypedefTag = 327,
435 JSDocPropertyTag = 328,
436 SyntaxList = 329,
437 NotEmittedStatement = 330,
438 PartiallyEmittedExpression = 331,
439 CommaListExpression = 332,
440 MergeDeclarationMarker = 333,
441 EndOfDeclarationMarker = 334,
442 SyntheticReferenceExpression = 335,
443 Count = 336,
444 FirstAssignment = 62,
445 LastAssignment = 77,
446 FirstCompoundAssignment = 63,
447 LastCompoundAssignment = 77,
448 FirstReservedWord = 80,
449 LastReservedWord = 115,
450 FirstKeyword = 80,
451 LastKeyword = 155,
452 FirstFutureReservedWord = 116,
453 LastFutureReservedWord = 124,
454 FirstTypeNode = 171,
455 LastTypeNode = 192,
456 FirstPunctuation = 18,
457 LastPunctuation = 77,
458 FirstToken = 0,
459 LastToken = 155,
460 FirstTriviaToken = 2,
461 LastTriviaToken = 7,
462 FirstLiteralToken = 8,
463 LastLiteralToken = 14,
464 FirstTemplateToken = 14,
465 LastTemplateToken = 17,
466 FirstBinaryOperator = 29,
467 LastBinaryOperator = 77,
468 FirstStatement = 229,
469 LastStatement = 245,
470 FirstNode = 156,
471 FirstJSDocNode = 298,
472 LastJSDocNode = 328,
473 FirstJSDocTagNode = 310,
474 LastJSDocTagNode = 328,
475 }
476 export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
477 export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
478 export type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail;
479 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.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;
480 export type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | 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.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.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword;
481 export type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.StaticKeyword;
482 export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword;
483 export type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind;
484 export type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken;
485 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.Unknown | KeywordSyntaxKind;
486 export enum NodeFlags {
487 None = 0,
488 Let = 1,
489 Const = 2,
490 NestedNamespace = 4,
491 Synthesized = 8,
492 Namespace = 16,
493 OptionalChain = 32,
494 ExportContext = 64,
495 ContainsThis = 128,
496 HasImplicitReturn = 256,
497 HasExplicitReturn = 512,
498 GlobalAugmentation = 1024,
499 HasAsyncFunctions = 2048,
500 DisallowInContext = 4096,
501 YieldContext = 8192,
502 DecoratorContext = 16384,
503 AwaitContext = 32768,
504 ThisNodeHasError = 65536,
505 JavaScriptFile = 131072,
506 ThisNodeOrAnySubNodesHasError = 262144,
507 HasAggregatedChildData = 524288,
508 JSDoc = 4194304,
509 JsonFile = 33554432,
510 BlockScoped = 3,
511 ReachabilityCheckFlags = 768,
512 ReachabilityAndEmitFlags = 2816,
513 ContextFlags = 25358336,
514 TypeExcludesFlags = 40960,
515 }
516 export enum ModifierFlags {
517 None = 0,
518 Export = 1,
519 Ambient = 2,
520 Public = 4,
521 Private = 8,
522 Protected = 16,
523 Static = 32,
524 Readonly = 64,
525 Abstract = 128,
526 Async = 256,
527 Default = 512,
528 Const = 2048,
529 HasComputedJSDocModifiers = 4096,
530 Deprecated = 8192,
531 HasComputedFlags = 536870912,
532 AccessibilityModifier = 28,
533 ParameterPropertyModifier = 92,
534 NonPublicAccessibilityModifier = 24,
535 TypeScriptModifier = 2270,
536 ExportDefault = 513,
537 All = 11263
538 }
539 export enum JsxFlags {
540 None = 0,
541 /** An element from a named property of the JSX.IntrinsicElements interface */
542 IntrinsicNamedElement = 1,
543 /** An element inferred from the string index signature of the JSX.IntrinsicElements interface */
544 IntrinsicIndexedElement = 2,
545 IntrinsicElement = 3
546 }
547 export interface Node extends ReadonlyTextRange {
548 readonly kind: SyntaxKind;
549 readonly flags: NodeFlags;
550 readonly decorators?: NodeArray<Decorator>;
551 readonly modifiers?: ModifiersArray;
552 readonly parent: Node;
553 }
554 export interface JSDocContainer {
555 }
556 export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | LabeledStatement | ExpressionStatement | VariableStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | EndOfFileToken;
557 export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
558 export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
559 export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
560 export type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertySignature | PropertyDeclaration | PropertyAssignment | EnumMember;
561 export interface NodeArray<T extends Node> extends ReadonlyArray<T>, ReadonlyTextRange {
562 hasTrailingComma?: boolean;
563 }
564 export interface Token<TKind extends SyntaxKind> extends Node {
565 readonly kind: TKind;
566 }
567 export type EndOfFileToken = Token<SyntaxKind.EndOfFileToken> & JSDocContainer;
568 export interface PunctuationToken<TKind extends PunctuationSyntaxKind> extends Token<TKind> {
569 }
570 export type DotToken = PunctuationToken<SyntaxKind.DotToken>;
571 export type DotDotDotToken = PunctuationToken<SyntaxKind.DotDotDotToken>;
572 export type QuestionToken = PunctuationToken<SyntaxKind.QuestionToken>;
573 export type ExclamationToken = PunctuationToken<SyntaxKind.ExclamationToken>;
574 export type ColonToken = PunctuationToken<SyntaxKind.ColonToken>;
575 export type EqualsToken = PunctuationToken<SyntaxKind.EqualsToken>;
576 export type AsteriskToken = PunctuationToken<SyntaxKind.AsteriskToken>;
577 export type EqualsGreaterThanToken = PunctuationToken<SyntaxKind.EqualsGreaterThanToken>;
578 export type PlusToken = PunctuationToken<SyntaxKind.PlusToken>;
579 export type MinusToken = PunctuationToken<SyntaxKind.MinusToken>;
580 export type QuestionDotToken = PunctuationToken<SyntaxKind.QuestionDotToken>;
581 export interface KeywordToken<TKind extends KeywordSyntaxKind> extends Token<TKind> {
582 }
583 export type AssertsKeyword = KeywordToken<SyntaxKind.AssertsKeyword>;
584 export type AwaitKeyword = KeywordToken<SyntaxKind.AwaitKeyword>;
585 /** @deprecated Use `AwaitKeyword` instead. */
586 export type AwaitKeywordToken = AwaitKeyword;
587 /** @deprecated Use `AssertsKeyword` instead. */
588 export type AssertsToken = AssertsKeyword;
589 export interface ModifierToken<TKind extends ModifierSyntaxKind> extends KeywordToken<TKind> {
590 }
591 export type AbstractKeyword = ModifierToken<SyntaxKind.AbstractKeyword>;
592 export type AsyncKeyword = ModifierToken<SyntaxKind.AsyncKeyword>;
593 export type ConstKeyword = ModifierToken<SyntaxKind.ConstKeyword>;
594 export type DeclareKeyword = ModifierToken<SyntaxKind.DeclareKeyword>;
595 export type DefaultKeyword = ModifierToken<SyntaxKind.DefaultKeyword>;
596 export type ExportKeyword = ModifierToken<SyntaxKind.ExportKeyword>;
597 export type PrivateKeyword = ModifierToken<SyntaxKind.PrivateKeyword>;
598 export type ProtectedKeyword = ModifierToken<SyntaxKind.ProtectedKeyword>;
599 export type PublicKeyword = ModifierToken<SyntaxKind.PublicKeyword>;
600 export type ReadonlyKeyword = ModifierToken<SyntaxKind.ReadonlyKeyword>;
601 export type StaticKeyword = ModifierToken<SyntaxKind.StaticKeyword>;
602 /** @deprecated Use `ReadonlyKeyword` instead. */
603 export type ReadonlyToken = ReadonlyKeyword;
604 export type Modifier = AbstractKeyword | AsyncKeyword | ConstKeyword | DeclareKeyword | DefaultKeyword | ExportKeyword | PrivateKeyword | ProtectedKeyword | PublicKeyword | ReadonlyKeyword | StaticKeyword;
605 export type AccessibilityModifier = PublicKeyword | PrivateKeyword | ProtectedKeyword;
606 export type ParameterPropertyModifier = AccessibilityModifier | ReadonlyKeyword;
607 export type ClassMemberModifier = AccessibilityModifier | ReadonlyKeyword | StaticKeyword;
608 export type ModifiersArray = NodeArray<Modifier>;
609 export enum GeneratedIdentifierFlags {
610 None = 0,
611 ReservedInNestedScopes = 8,
612 Optimistic = 16,
613 FileLevel = 32
614 }
615 export interface Identifier extends PrimaryExpression, Declaration {
616 readonly kind: SyntaxKind.Identifier;
617 /**
618 * Prefer to use `id.unescapedText`. (Note: This is available only in services, not internally to the TypeScript compiler.)
619 * Text of identifier, but if the identifier begins with two underscores, this will begin with three.
620 */
621 readonly escapedText: __String;
622 readonly originalKeywordKind?: SyntaxKind;
623 isInJSDocNamespace?: boolean;
624 }
625 export interface TransientIdentifier extends Identifier {
626 resolvedSymbol: Symbol;
627 }
628 export interface QualifiedName extends Node {
629 readonly kind: SyntaxKind.QualifiedName;
630 readonly left: EntityName;
631 readonly right: Identifier;
632 }
633 export type EntityName = Identifier | QualifiedName;
634 export type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier;
635 export type DeclarationName = Identifier | PrivateIdentifier | StringLiteralLike | NumericLiteral | ComputedPropertyName | ElementAccessExpression | BindingPattern | EntityNameExpression;
636 export interface Declaration extends Node {
637 _declarationBrand: any;
638 }
639 export interface NamedDeclaration extends Declaration {
640 readonly name?: DeclarationName;
641 }
642 export interface DeclarationStatement extends NamedDeclaration, Statement {
643 readonly name?: Identifier | StringLiteral | NumericLiteral;
644 }
645 export interface ComputedPropertyName extends Node {
646 readonly kind: SyntaxKind.ComputedPropertyName;
647 readonly parent: Declaration;
648 readonly expression: Expression;
649 }
650 export interface PrivateIdentifier extends Node {
651 readonly kind: SyntaxKind.PrivateIdentifier;
652 readonly escapedText: __String;
653 }
654 export interface Decorator extends Node {
655 readonly kind: SyntaxKind.Decorator;
656 readonly parent: NamedDeclaration;
657 readonly expression: LeftHandSideExpression;
658 }
659 export interface TypeParameterDeclaration extends NamedDeclaration {
660 readonly kind: SyntaxKind.TypeParameter;
661 readonly parent: DeclarationWithTypeParameterChildren | InferTypeNode;
662 readonly name: Identifier;
663 /** Note: Consider calling `getEffectiveConstraintOfTypeParameter` */
664 readonly constraint?: TypeNode;
665 readonly default?: TypeNode;
666 expression?: Expression;
667 }
668 export interface SignatureDeclarationBase extends NamedDeclaration, JSDocContainer {
669 readonly kind: SignatureDeclaration["kind"];
670 readonly name?: PropertyName;
671 readonly typeParameters?: NodeArray<TypeParameterDeclaration>;
672 readonly parameters: NodeArray<ParameterDeclaration>;
673 readonly type?: TypeNode;
674 }
675 export type SignatureDeclaration = CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction;
676 export interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
677 readonly kind: SyntaxKind.CallSignature;
678 }
679 export interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
680 readonly kind: SyntaxKind.ConstructSignature;
681 }
682 export type BindingName = Identifier | BindingPattern;
683 export interface VariableDeclaration extends NamedDeclaration {
684 readonly kind: SyntaxKind.VariableDeclaration;
685 readonly parent: VariableDeclarationList | CatchClause;
686 readonly name: BindingName;
687 readonly exclamationToken?: ExclamationToken;
688 readonly type?: TypeNode;
689 readonly initializer?: Expression;
690 }
691 export interface VariableDeclarationList extends Node {
692 readonly kind: SyntaxKind.VariableDeclarationList;
693 readonly parent: VariableStatement | ForStatement | ForOfStatement | ForInStatement;
694 readonly declarations: NodeArray<VariableDeclaration>;
695 }
696 export interface ParameterDeclaration extends NamedDeclaration, JSDocContainer {
697 readonly kind: SyntaxKind.Parameter;
698 readonly parent: SignatureDeclaration;
699 readonly dotDotDotToken?: DotDotDotToken;
700 readonly name: BindingName;
701 readonly questionToken?: QuestionToken;
702 readonly type?: TypeNode;
703 readonly initializer?: Expression;
704 }
705 export interface BindingElement extends NamedDeclaration {
706 readonly kind: SyntaxKind.BindingElement;
707 readonly parent: BindingPattern;
708 readonly propertyName?: PropertyName;
709 readonly dotDotDotToken?: DotDotDotToken;
710 readonly name: BindingName;
711 readonly initializer?: Expression;
712 }
713 export interface PropertySignature extends TypeElement, JSDocContainer {
714 readonly kind: SyntaxKind.PropertySignature;
715 readonly name: PropertyName;
716 readonly questionToken?: QuestionToken;
717 readonly type?: TypeNode;
718 initializer?: Expression;
719 }
720 export interface PropertyDeclaration extends ClassElement, JSDocContainer {
721 readonly kind: SyntaxKind.PropertyDeclaration;
722 readonly parent: ClassLikeDeclaration;
723 readonly name: PropertyName;
724 readonly questionToken?: QuestionToken;
725 readonly exclamationToken?: ExclamationToken;
726 readonly type?: TypeNode;
727 readonly initializer?: Expression;
728 }
729 export interface ObjectLiteralElement extends NamedDeclaration {
730 _objectLiteralBrand: any;
731 readonly name?: PropertyName;
732 }
733 /** Unlike ObjectLiteralElement, excludes JSXAttribute and JSXSpreadAttribute. */
734 export type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration;
735 export interface PropertyAssignment extends ObjectLiteralElement, JSDocContainer {
736 readonly kind: SyntaxKind.PropertyAssignment;
737 readonly parent: ObjectLiteralExpression;
738 readonly name: PropertyName;
739 readonly questionToken?: QuestionToken;
740 readonly exclamationToken?: ExclamationToken;
741 readonly initializer: Expression;
742 }
743 export interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer {
744 readonly kind: SyntaxKind.ShorthandPropertyAssignment;
745 readonly parent: ObjectLiteralExpression;
746 readonly name: Identifier;
747 readonly questionToken?: QuestionToken;
748 readonly exclamationToken?: ExclamationToken;
749 readonly equalsToken?: EqualsToken;
750 readonly objectAssignmentInitializer?: Expression;
751 }
752 export interface SpreadAssignment extends ObjectLiteralElement, JSDocContainer {
753 readonly kind: SyntaxKind.SpreadAssignment;
754 readonly parent: ObjectLiteralExpression;
755 readonly expression: Expression;
756 }
757 export type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag;
758 export interface PropertyLikeDeclaration extends NamedDeclaration {
759 readonly name: PropertyName;
760 }
761 export interface ObjectBindingPattern extends Node {
762 readonly kind: SyntaxKind.ObjectBindingPattern;
763 readonly parent: VariableDeclaration | ParameterDeclaration | BindingElement;
764 readonly elements: NodeArray<BindingElement>;
765 }
766 export interface ArrayBindingPattern extends Node {
767 readonly kind: SyntaxKind.ArrayBindingPattern;
768 readonly parent: VariableDeclaration | ParameterDeclaration | BindingElement;
769 readonly elements: NodeArray<ArrayBindingElement>;
770 }
771 export type BindingPattern = ObjectBindingPattern | ArrayBindingPattern;
772 export type ArrayBindingElement = BindingElement | OmittedExpression;
773 /**
774 * Several node kinds share function-like features such as a signature,
775 * a name, and a body. These nodes should extend FunctionLikeDeclarationBase.
776 * Examples:
777 * - FunctionDeclaration
778 * - MethodDeclaration
779 * - AccessorDeclaration
780 */
781 export interface FunctionLikeDeclarationBase extends SignatureDeclarationBase {
782 _functionLikeDeclarationBrand: any;
783 readonly asteriskToken?: AsteriskToken;
784 readonly questionToken?: QuestionToken;
785 readonly exclamationToken?: ExclamationToken;
786 readonly body?: Block | Expression;
787 }
788 export type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction;
789 /** @deprecated Use SignatureDeclaration */
790 export type FunctionLike = SignatureDeclaration;
791 export interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement {
792 readonly kind: SyntaxKind.FunctionDeclaration;
793 readonly name?: Identifier;
794 readonly body?: FunctionBody;
795 }
796 export interface MethodSignature extends SignatureDeclarationBase, TypeElement {
797 readonly kind: SyntaxKind.MethodSignature;
798 readonly parent: ObjectTypeDeclaration;
799 readonly name: PropertyName;
800 }
801 export interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
802 readonly kind: SyntaxKind.MethodDeclaration;
803 readonly parent: ClassLikeDeclaration | ObjectLiteralExpression;
804 readonly name: PropertyName;
805 readonly body?: FunctionBody;
806 }
807 export interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer {
808 readonly kind: SyntaxKind.Constructor;
809 readonly parent: ClassLikeDeclaration;
810 readonly body?: FunctionBody;
811 }
812 /** For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. */
813 export interface SemicolonClassElement extends ClassElement {
814 readonly kind: SyntaxKind.SemicolonClassElement;
815 readonly parent: ClassLikeDeclaration;
816 }
817 export interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
818 readonly kind: SyntaxKind.GetAccessor;
819 readonly parent: ClassLikeDeclaration | ObjectLiteralExpression;
820 readonly name: PropertyName;
821 readonly body?: FunctionBody;
822 }
823 export interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
824 readonly kind: SyntaxKind.SetAccessor;
825 readonly parent: ClassLikeDeclaration | ObjectLiteralExpression;
826 readonly name: PropertyName;
827 readonly body?: FunctionBody;
828 }
829 export type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration;
830 export interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement {
831 readonly kind: SyntaxKind.IndexSignature;
832 readonly parent: ObjectTypeDeclaration;
833 readonly type: TypeNode;
834 }
835 export interface TypeNode extends Node {
836 _typeNodeBrand: any;
837 }
838 export interface KeywordTypeNode<TKind extends KeywordTypeSyntaxKind = KeywordTypeSyntaxKind> extends KeywordToken<TKind>, TypeNode {
839 readonly kind: TKind;
840 }
841 export interface ImportTypeNode extends NodeWithTypeArguments {
842 readonly kind: SyntaxKind.ImportType;
843 readonly isTypeOf: boolean;
844 readonly argument: TypeNode;
845 readonly qualifier?: EntityName;
846 }
847 export interface ThisTypeNode extends TypeNode {
848 readonly kind: SyntaxKind.ThisType;
849 }
850 export type FunctionOrConstructorTypeNode = FunctionTypeNode | ConstructorTypeNode;
851 export interface FunctionOrConstructorTypeNodeBase extends TypeNode, SignatureDeclarationBase {
852 readonly kind: SyntaxKind.FunctionType | SyntaxKind.ConstructorType;
853 readonly type: TypeNode;
854 }
855 export interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase {
856 readonly kind: SyntaxKind.FunctionType;
857 }
858 export interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase {
859 readonly kind: SyntaxKind.ConstructorType;
860 }
861 export interface NodeWithTypeArguments extends TypeNode {
862 readonly typeArguments?: NodeArray<TypeNode>;
863 }
864 export type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments;
865 export interface TypeReferenceNode extends NodeWithTypeArguments {
866 readonly kind: SyntaxKind.TypeReference;
867 readonly typeName: EntityName;
868 }
869 export interface TypePredicateNode extends TypeNode {
870 readonly kind: SyntaxKind.TypePredicate;
871 readonly parent: SignatureDeclaration | JSDocTypeExpression;
872 readonly assertsModifier?: AssertsToken;
873 readonly parameterName: Identifier | ThisTypeNode;
874 readonly type?: TypeNode;
875 }
876 export interface TypeQueryNode extends TypeNode {
877 readonly kind: SyntaxKind.TypeQuery;
878 readonly exprName: EntityName;
879 }
880 export interface TypeLiteralNode extends TypeNode, Declaration {
881 readonly kind: SyntaxKind.TypeLiteral;
882 readonly members: NodeArray<TypeElement>;
883 }
884 export interface ArrayTypeNode extends TypeNode {
885 readonly kind: SyntaxKind.ArrayType;
886 readonly elementType: TypeNode;
887 }
888 export interface TupleTypeNode extends TypeNode {
889 readonly kind: SyntaxKind.TupleType;
890 readonly elements: NodeArray<TypeNode | NamedTupleMember>;
891 }
892 export interface NamedTupleMember extends TypeNode, JSDocContainer, Declaration {
893 readonly kind: SyntaxKind.NamedTupleMember;
894 readonly dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>;
895 readonly name: Identifier;
896 readonly questionToken?: Token<SyntaxKind.QuestionToken>;
897 readonly type: TypeNode;
898 }
899 export interface OptionalTypeNode extends TypeNode {
900 readonly kind: SyntaxKind.OptionalType;
901 readonly type: TypeNode;
902 }
903 export interface RestTypeNode extends TypeNode {
904 readonly kind: SyntaxKind.RestType;
905 readonly type: TypeNode;
906 }
907 export type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode;
908 export interface UnionTypeNode extends TypeNode {
909 readonly kind: SyntaxKind.UnionType;
910 readonly types: NodeArray<TypeNode>;
911 }
912 export interface IntersectionTypeNode extends TypeNode {
913 readonly kind: SyntaxKind.IntersectionType;
914 readonly types: NodeArray<TypeNode>;
915 }
916 export interface ConditionalTypeNode extends TypeNode {
917 readonly kind: SyntaxKind.ConditionalType;
918 readonly checkType: TypeNode;
919 readonly extendsType: TypeNode;
920 readonly trueType: TypeNode;
921 readonly falseType: TypeNode;
922 }
923 export interface InferTypeNode extends TypeNode {
924 readonly kind: SyntaxKind.InferType;
925 readonly typeParameter: TypeParameterDeclaration;
926 }
927 export interface ParenthesizedTypeNode extends TypeNode {
928 readonly kind: SyntaxKind.ParenthesizedType;
929 readonly type: TypeNode;
930 }
931 export interface TypeOperatorNode extends TypeNode {
932 readonly kind: SyntaxKind.TypeOperator;
933 readonly operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword;
934 readonly type: TypeNode;
935 }
936 export interface IndexedAccessTypeNode extends TypeNode {
937 readonly kind: SyntaxKind.IndexedAccessType;
938 readonly objectType: TypeNode;
939 readonly indexType: TypeNode;
940 }
941 export interface MappedTypeNode extends TypeNode, Declaration {
942 readonly kind: SyntaxKind.MappedType;
943 readonly readonlyToken?: ReadonlyToken | PlusToken | MinusToken;
944 readonly typeParameter: TypeParameterDeclaration;
945 readonly questionToken?: QuestionToken | PlusToken | MinusToken;
946 readonly type?: TypeNode;
947 }
948 export interface LiteralTypeNode extends TypeNode {
949 readonly kind: SyntaxKind.LiteralType;
950 readonly literal: NullLiteral | BooleanLiteral | LiteralExpression | PrefixUnaryExpression;
951 }
952 export interface StringLiteral extends LiteralExpression, Declaration {
953 readonly kind: SyntaxKind.StringLiteral;
954 }
955 export type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral;
956 export type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral;
957 export interface Expression extends Node {
958 _expressionBrand: any;
959 }
960 export interface OmittedExpression extends Expression {
961 readonly kind: SyntaxKind.OmittedExpression;
962 }
963 export interface PartiallyEmittedExpression extends LeftHandSideExpression {
964 readonly kind: SyntaxKind.PartiallyEmittedExpression;
965 readonly expression: Expression;
966 }
967 export interface UnaryExpression extends Expression {
968 _unaryExpressionBrand: any;
969 }
970 /** Deprecated, please use UpdateExpression */
971 export type IncrementExpression = UpdateExpression;
972 export interface UpdateExpression extends UnaryExpression {
973 _updateExpressionBrand: any;
974 }
975 export type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken;
976 export interface PrefixUnaryExpression extends UpdateExpression {
977 readonly kind: SyntaxKind.PrefixUnaryExpression;
978 readonly operator: PrefixUnaryOperator;
979 readonly operand: UnaryExpression;
980 }
981 export type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken;
982 export interface PostfixUnaryExpression extends UpdateExpression {
983 readonly kind: SyntaxKind.PostfixUnaryExpression;
984 readonly operand: LeftHandSideExpression;
985 readonly operator: PostfixUnaryOperator;
986 }
987 export interface LeftHandSideExpression extends UpdateExpression {
988 _leftHandSideExpressionBrand: any;
989 }
990 export interface MemberExpression extends LeftHandSideExpression {
991 _memberExpressionBrand: any;
992 }
993 export interface PrimaryExpression extends MemberExpression {
994 _primaryExpressionBrand: any;
995 }
996 export interface NullLiteral extends PrimaryExpression {
997 readonly kind: SyntaxKind.NullKeyword;
998 }
999 export interface TrueLiteral extends PrimaryExpression {
1000 readonly kind: SyntaxKind.TrueKeyword;
1001 }
1002 export interface FalseLiteral extends PrimaryExpression {
1003 readonly kind: SyntaxKind.FalseKeyword;
1004 }
1005 export type BooleanLiteral = TrueLiteral | FalseLiteral;
1006 export interface ThisExpression extends PrimaryExpression {
1007 readonly kind: SyntaxKind.ThisKeyword;
1008 }
1009 export interface SuperExpression extends PrimaryExpression {
1010 readonly kind: SyntaxKind.SuperKeyword;
1011 }
1012 export interface ImportExpression extends PrimaryExpression {
1013 readonly kind: SyntaxKind.ImportKeyword;
1014 }
1015 export interface DeleteExpression extends UnaryExpression {
1016 readonly kind: SyntaxKind.DeleteExpression;
1017 readonly expression: UnaryExpression;
1018 }
1019 export interface TypeOfExpression extends UnaryExpression {
1020 readonly kind: SyntaxKind.TypeOfExpression;
1021 readonly expression: UnaryExpression;
1022 }
1023 export interface VoidExpression extends UnaryExpression {
1024 readonly kind: SyntaxKind.VoidExpression;
1025 readonly expression: UnaryExpression;
1026 }
1027 export interface AwaitExpression extends UnaryExpression {
1028 readonly kind: SyntaxKind.AwaitExpression;
1029 readonly expression: UnaryExpression;
1030 }
1031 export interface YieldExpression extends Expression {
1032 readonly kind: SyntaxKind.YieldExpression;
1033 readonly asteriskToken?: AsteriskToken;
1034 readonly expression?: Expression;
1035 }
1036 export interface SyntheticExpression extends Expression {
1037 readonly kind: SyntaxKind.SyntheticExpression;
1038 readonly isSpread: boolean;
1039 readonly type: Type;
1040 readonly tupleNameSource?: ParameterDeclaration | NamedTupleMember;
1041 }
1042 export type ExponentiationOperator = SyntaxKind.AsteriskAsteriskToken;
1043 export type MultiplicativeOperator = SyntaxKind.AsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken;
1044 export type MultiplicativeOperatorOrHigher = ExponentiationOperator | MultiplicativeOperator;
1045 export type AdditiveOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken;
1046 export type AdditiveOperatorOrHigher = MultiplicativeOperatorOrHigher | AdditiveOperator;
1047 export type ShiftOperator = SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken;
1048 export type ShiftOperatorOrHigher = AdditiveOperatorOrHigher | ShiftOperator;
1049 export type RelationalOperator = SyntaxKind.LessThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.InstanceOfKeyword | SyntaxKind.InKeyword;
1050 export type RelationalOperatorOrHigher = ShiftOperatorOrHigher | RelationalOperator;
1051 export type EqualityOperator = SyntaxKind.EqualsEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.ExclamationEqualsToken;
1052 export type EqualityOperatorOrHigher = RelationalOperatorOrHigher | EqualityOperator;
1053 export type BitwiseOperator = SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken;
1054 export type BitwiseOperatorOrHigher = EqualityOperatorOrHigher | BitwiseOperator;
1055 export type LogicalOperator = SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken;
1056 export type LogicalOperatorOrHigher = BitwiseOperatorOrHigher | LogicalOperator;
1057 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;
1058 export type AssignmentOperator = SyntaxKind.EqualsToken | CompoundAssignmentOperator;
1059 export type AssignmentOperatorOrHigher = SyntaxKind.QuestionQuestionToken | LogicalOperatorOrHigher | AssignmentOperator;
1060 export type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken;
1061 export type LogicalOrCoalescingAssignmentOperator = SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionEqualsToken;
1062 export type BinaryOperatorToken = Token<BinaryOperator>;
1063 export interface BinaryExpression extends Expression, Declaration {
1064 readonly kind: SyntaxKind.BinaryExpression;
1065 readonly left: Expression;
1066 readonly operatorToken: BinaryOperatorToken;
1067 readonly right: Expression;
1068 }
1069 export type AssignmentOperatorToken = Token<AssignmentOperator>;
1070 export interface AssignmentExpression<TOperator extends AssignmentOperatorToken> extends BinaryExpression {
1071 readonly left: LeftHandSideExpression;
1072 readonly operatorToken: TOperator;
1073 }
1074 export interface ObjectDestructuringAssignment extends AssignmentExpression<EqualsToken> {
1075 readonly left: ObjectLiteralExpression;
1076 }
1077 export interface ArrayDestructuringAssignment extends AssignmentExpression<EqualsToken> {
1078 readonly left: ArrayLiteralExpression;
1079 }
1080 export type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment;
1081 export type BindingOrAssignmentElement = VariableDeclaration | ParameterDeclaration | ObjectBindingOrAssignmentElement | ArrayBindingOrAssignmentElement;
1082 export type ObjectBindingOrAssignmentElement = BindingElement | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment;
1083 export type ArrayBindingOrAssignmentElement = BindingElement | OmittedExpression | SpreadElement | ArrayLiteralExpression | ObjectLiteralExpression | AssignmentExpression<EqualsToken> | Identifier | PropertyAccessExpression | ElementAccessExpression;
1084 export type BindingOrAssignmentElementRestIndicator = DotDotDotToken | SpreadElement | SpreadAssignment;
1085 export type BindingOrAssignmentElementTarget = BindingOrAssignmentPattern | Identifier | PropertyAccessExpression | ElementAccessExpression | OmittedExpression;
1086 export type ObjectBindingOrAssignmentPattern = ObjectBindingPattern | ObjectLiteralExpression;
1087 export type ArrayBindingOrAssignmentPattern = ArrayBindingPattern | ArrayLiteralExpression;
1088 export type AssignmentPattern = ObjectLiteralExpression | ArrayLiteralExpression;
1089 export type BindingOrAssignmentPattern = ObjectBindingOrAssignmentPattern | ArrayBindingOrAssignmentPattern;
1090 export interface ConditionalExpression extends Expression {
1091 readonly kind: SyntaxKind.ConditionalExpression;
1092 readonly condition: Expression;
1093 readonly questionToken: QuestionToken;
1094 readonly whenTrue: Expression;
1095 readonly colonToken: ColonToken;
1096 readonly whenFalse: Expression;
1097 }
1098 export type FunctionBody = Block;
1099 export type ConciseBody = FunctionBody | Expression;
1100 export interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer {
1101 readonly kind: SyntaxKind.FunctionExpression;
1102 readonly name?: Identifier;
1103 readonly body: FunctionBody;
1104 }
1105 export interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer {
1106 readonly kind: SyntaxKind.ArrowFunction;
1107 readonly equalsGreaterThanToken: EqualsGreaterThanToken;
1108 readonly body: ConciseBody;
1109 readonly name: never;
1110 }
1111 export interface LiteralLikeNode extends Node {
1112 text: string;
1113 isUnterminated?: boolean;
1114 hasExtendedUnicodeEscape?: boolean;
1115 }
1116 export interface TemplateLiteralLikeNode extends LiteralLikeNode {
1117 rawText?: string;
1118 }
1119 export interface LiteralExpression extends LiteralLikeNode, PrimaryExpression {
1120 _literalExpressionBrand: any;
1121 }
1122 export interface RegularExpressionLiteral extends LiteralExpression {
1123 readonly kind: SyntaxKind.RegularExpressionLiteral;
1124 }
1125 export interface NoSubstitutionTemplateLiteral extends LiteralExpression, TemplateLiteralLikeNode, Declaration {
1126 readonly kind: SyntaxKind.NoSubstitutionTemplateLiteral;
1127 }
1128 export enum TokenFlags {
1129 None = 0,
1130 Scientific = 16,
1131 Octal = 32,
1132 HexSpecifier = 64,
1133 BinarySpecifier = 128,
1134 OctalSpecifier = 256,
1135 }
1136 export interface NumericLiteral extends LiteralExpression, Declaration {
1137 readonly kind: SyntaxKind.NumericLiteral;
1138 }
1139 export interface BigIntLiteral extends LiteralExpression {
1140 readonly kind: SyntaxKind.BigIntLiteral;
1141 }
1142 export type LiteralToken = NumericLiteral | BigIntLiteral | StringLiteral | JsxText | RegularExpressionLiteral | NoSubstitutionTemplateLiteral;
1143 export interface TemplateHead extends TemplateLiteralLikeNode {
1144 readonly kind: SyntaxKind.TemplateHead;
1145 readonly parent: TemplateExpression;
1146 }
1147 export interface TemplateMiddle extends TemplateLiteralLikeNode {
1148 readonly kind: SyntaxKind.TemplateMiddle;
1149 readonly parent: TemplateSpan;
1150 }
1151 export interface TemplateTail extends TemplateLiteralLikeNode {
1152 readonly kind: SyntaxKind.TemplateTail;
1153 readonly parent: TemplateSpan;
1154 }
1155 export type PseudoLiteralToken = TemplateHead | TemplateMiddle | TemplateTail;
1156 export type TemplateLiteralToken = NoSubstitutionTemplateLiteral | PseudoLiteralToken;
1157 export interface TemplateExpression extends PrimaryExpression {
1158 readonly kind: SyntaxKind.TemplateExpression;
1159 readonly head: TemplateHead;
1160 readonly templateSpans: NodeArray<TemplateSpan>;
1161 }
1162 export type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral;
1163 export interface TemplateSpan extends Node {
1164 readonly kind: SyntaxKind.TemplateSpan;
1165 readonly parent: TemplateExpression;
1166 readonly expression: Expression;
1167 readonly literal: TemplateMiddle | TemplateTail;
1168 }
1169 export interface ParenthesizedExpression extends PrimaryExpression, JSDocContainer {
1170 readonly kind: SyntaxKind.ParenthesizedExpression;
1171 readonly expression: Expression;
1172 }
1173 export interface ArrayLiteralExpression extends PrimaryExpression {
1174 readonly kind: SyntaxKind.ArrayLiteralExpression;
1175 readonly elements: NodeArray<Expression>;
1176 }
1177 export interface SpreadElement extends Expression {
1178 readonly kind: SyntaxKind.SpreadElement;
1179 readonly parent: ArrayLiteralExpression | CallExpression | NewExpression;
1180 readonly expression: Expression;
1181 }
1182 /**
1183 * This interface is a base interface for ObjectLiteralExpression and JSXAttributes to extend from. JSXAttributes is similar to
1184 * ObjectLiteralExpression in that it contains array of properties; however, JSXAttributes' properties can only be
1185 * JSXAttribute or JSXSpreadAttribute. ObjectLiteralExpression, on the other hand, can only have properties of type
1186 * ObjectLiteralElement (e.g. PropertyAssignment, ShorthandPropertyAssignment etc.)
1187 */
1188 export interface ObjectLiteralExpressionBase<T extends ObjectLiteralElement> extends PrimaryExpression, Declaration {
1189 readonly properties: NodeArray<T>;
1190 }
1191 export interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike> {
1192 readonly kind: SyntaxKind.ObjectLiteralExpression;
1193 }
1194 export type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression;
1195 export type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;
1196 export type AccessExpression = PropertyAccessExpression | ElementAccessExpression;
1197 export interface PropertyAccessExpression extends MemberExpression, NamedDeclaration {
1198 readonly kind: SyntaxKind.PropertyAccessExpression;
1199 readonly expression: LeftHandSideExpression;
1200 readonly questionDotToken?: QuestionDotToken;
1201 readonly name: Identifier | PrivateIdentifier;
1202 }
1203 export interface PropertyAccessChain extends PropertyAccessExpression {
1204 _optionalChainBrand: any;
1205 readonly name: Identifier | PrivateIdentifier;
1206 }
1207 export interface SuperPropertyAccessExpression extends PropertyAccessExpression {
1208 readonly expression: SuperExpression;
1209 }
1210 /** Brand for a PropertyAccessExpression which, like a QualifiedName, consists of a sequence of identifiers separated by dots. */
1211 export interface PropertyAccessEntityNameExpression extends PropertyAccessExpression {
1212 _propertyAccessExpressionLikeQualifiedNameBrand?: any;
1213 readonly expression: EntityNameExpression;
1214 readonly name: Identifier;
1215 }
1216 export interface ElementAccessExpression extends MemberExpression {
1217 readonly kind: SyntaxKind.ElementAccessExpression;
1218 readonly expression: LeftHandSideExpression;
1219 readonly questionDotToken?: QuestionDotToken;
1220 readonly argumentExpression: Expression;
1221 }
1222 export interface ElementAccessChain extends ElementAccessExpression {
1223 _optionalChainBrand: any;
1224 }
1225 export interface SuperElementAccessExpression extends ElementAccessExpression {
1226 readonly expression: SuperExpression;
1227 }
1228 export type SuperProperty = SuperPropertyAccessExpression | SuperElementAccessExpression;
1229 export interface CallExpression extends LeftHandSideExpression, Declaration {
1230 readonly kind: SyntaxKind.CallExpression;
1231 readonly expression: LeftHandSideExpression;
1232 readonly questionDotToken?: QuestionDotToken;
1233 readonly typeArguments?: NodeArray<TypeNode>;
1234 readonly arguments: NodeArray<Expression>;
1235 }
1236 export interface CallChain extends CallExpression {
1237 _optionalChainBrand: any;
1238 }
1239 export type OptionalChain = PropertyAccessChain | ElementAccessChain | CallChain | NonNullChain;
1240 export interface SuperCall extends CallExpression {
1241 readonly expression: SuperExpression;
1242 }
1243 export interface ImportCall extends CallExpression {
1244 readonly expression: ImportExpression;
1245 }
1246 export interface ExpressionWithTypeArguments extends NodeWithTypeArguments {
1247 readonly kind: SyntaxKind.ExpressionWithTypeArguments;
1248 readonly parent: HeritageClause | JSDocAugmentsTag | JSDocImplementsTag;
1249 readonly expression: LeftHandSideExpression;
1250 }
1251 export interface NewExpression extends PrimaryExpression, Declaration {
1252 readonly kind: SyntaxKind.NewExpression;
1253 readonly expression: LeftHandSideExpression;
1254 readonly typeArguments?: NodeArray<TypeNode>;
1255 readonly arguments?: NodeArray<Expression>;
1256 }
1257 export interface TaggedTemplateExpression extends MemberExpression {
1258 readonly kind: SyntaxKind.TaggedTemplateExpression;
1259 readonly tag: LeftHandSideExpression;
1260 readonly typeArguments?: NodeArray<TypeNode>;
1261 readonly template: TemplateLiteral;
1262 }
1263 export type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement;
1264 export interface AsExpression extends Expression {
1265 readonly kind: SyntaxKind.AsExpression;
1266 readonly expression: Expression;
1267 readonly type: TypeNode;
1268 }
1269 export interface TypeAssertion extends UnaryExpression {
1270 readonly kind: SyntaxKind.TypeAssertionExpression;
1271 readonly type: TypeNode;
1272 readonly expression: UnaryExpression;
1273 }
1274 export type AssertionExpression = TypeAssertion | AsExpression;
1275 export interface NonNullExpression extends LeftHandSideExpression {
1276 readonly kind: SyntaxKind.NonNullExpression;
1277 readonly expression: Expression;
1278 }
1279 export interface NonNullChain extends NonNullExpression {
1280 _optionalChainBrand: any;
1281 }
1282 export interface MetaProperty extends PrimaryExpression {
1283 readonly kind: SyntaxKind.MetaProperty;
1284 readonly keywordToken: SyntaxKind.NewKeyword | SyntaxKind.ImportKeyword;
1285 readonly name: Identifier;
1286 }
1287 export interface JsxElement extends PrimaryExpression {
1288 readonly kind: SyntaxKind.JsxElement;
1289 readonly openingElement: JsxOpeningElement;
1290 readonly children: NodeArray<JsxChild>;
1291 readonly closingElement: JsxClosingElement;
1292 }
1293 export type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement;
1294 export type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute;
1295 export type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess;
1296 export interface JsxTagNamePropertyAccess extends PropertyAccessExpression {
1297 readonly expression: JsxTagNameExpression;
1298 }
1299 export interface JsxAttributes extends ObjectLiteralExpressionBase<JsxAttributeLike> {
1300 readonly kind: SyntaxKind.JsxAttributes;
1301 readonly parent: JsxOpeningLikeElement;
1302 }
1303 export interface JsxOpeningElement extends Expression {
1304 readonly kind: SyntaxKind.JsxOpeningElement;
1305 readonly parent: JsxElement;
1306 readonly tagName: JsxTagNameExpression;
1307 readonly typeArguments?: NodeArray<TypeNode>;
1308 readonly attributes: JsxAttributes;
1309 }
1310 export interface JsxSelfClosingElement extends PrimaryExpression {
1311 readonly kind: SyntaxKind.JsxSelfClosingElement;
1312 readonly tagName: JsxTagNameExpression;
1313 readonly typeArguments?: NodeArray<TypeNode>;
1314 readonly attributes: JsxAttributes;
1315 }
1316 export interface JsxFragment extends PrimaryExpression {
1317 readonly kind: SyntaxKind.JsxFragment;
1318 readonly openingFragment: JsxOpeningFragment;
1319 readonly children: NodeArray<JsxChild>;
1320 readonly closingFragment: JsxClosingFragment;
1321 }
1322 export interface JsxOpeningFragment extends Expression {
1323 readonly kind: SyntaxKind.JsxOpeningFragment;
1324 readonly parent: JsxFragment;
1325 }
1326 export interface JsxClosingFragment extends Expression {
1327 readonly kind: SyntaxKind.JsxClosingFragment;
1328 readonly parent: JsxFragment;
1329 }
1330 export interface JsxAttribute extends ObjectLiteralElement {
1331 readonly kind: SyntaxKind.JsxAttribute;
1332 readonly parent: JsxAttributes;
1333 readonly name: Identifier;
1334 readonly initializer?: StringLiteral | JsxExpression;
1335 }
1336 export interface JsxSpreadAttribute extends ObjectLiteralElement {
1337 readonly kind: SyntaxKind.JsxSpreadAttribute;
1338 readonly parent: JsxAttributes;
1339 readonly expression: Expression;
1340 }
1341 export interface JsxClosingElement extends Node {
1342 readonly kind: SyntaxKind.JsxClosingElement;
1343 readonly parent: JsxElement;
1344 readonly tagName: JsxTagNameExpression;
1345 }
1346 export interface JsxExpression extends Expression {
1347 readonly kind: SyntaxKind.JsxExpression;
1348 readonly parent: JsxElement | JsxAttributeLike;
1349 readonly dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>;
1350 readonly expression?: Expression;
1351 }
1352 export interface JsxText extends LiteralLikeNode {
1353 readonly kind: SyntaxKind.JsxText;
1354 readonly parent: JsxElement;
1355 readonly containsOnlyTriviaWhiteSpaces: boolean;
1356 }
1357 export type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
1358 export interface Statement extends Node {
1359 _statementBrand: any;
1360 }
1361 export interface NotEmittedStatement extends Statement {
1362 readonly kind: SyntaxKind.NotEmittedStatement;
1363 }
1364 /**
1365 * A list of comma-separated expressions. This node is only created by transformations.
1366 */
1367 export interface CommaListExpression extends Expression {
1368 readonly kind: SyntaxKind.CommaListExpression;
1369 readonly elements: NodeArray<Expression>;
1370 }
1371 export interface EmptyStatement extends Statement {
1372 readonly kind: SyntaxKind.EmptyStatement;
1373 }
1374 export interface DebuggerStatement extends Statement {
1375 readonly kind: SyntaxKind.DebuggerStatement;
1376 }
1377 export interface MissingDeclaration extends DeclarationStatement {
1378 readonly kind: SyntaxKind.MissingDeclaration;
1379 readonly name?: Identifier;
1380 }
1381 export type BlockLike = SourceFile | Block | ModuleBlock | CaseOrDefaultClause;
1382 export interface Block extends Statement {
1383 readonly kind: SyntaxKind.Block;
1384 readonly statements: NodeArray<Statement>;
1385 }
1386 export interface VariableStatement extends Statement, JSDocContainer {
1387 readonly kind: SyntaxKind.VariableStatement;
1388 readonly declarationList: VariableDeclarationList;
1389 }
1390 export interface ExpressionStatement extends Statement, JSDocContainer {
1391 readonly kind: SyntaxKind.ExpressionStatement;
1392 readonly expression: Expression;
1393 }
1394 export interface IfStatement extends Statement {
1395 readonly kind: SyntaxKind.IfStatement;
1396 readonly expression: Expression;
1397 readonly thenStatement: Statement;
1398 readonly elseStatement?: Statement;
1399 }
1400 export interface IterationStatement extends Statement {
1401 readonly statement: Statement;
1402 }
1403 export interface DoStatement extends IterationStatement {
1404 readonly kind: SyntaxKind.DoStatement;
1405 readonly expression: Expression;
1406 }
1407 export interface WhileStatement extends IterationStatement {
1408 readonly kind: SyntaxKind.WhileStatement;
1409 readonly expression: Expression;
1410 }
1411 export type ForInitializer = VariableDeclarationList | Expression;
1412 export interface ForStatement extends IterationStatement {
1413 readonly kind: SyntaxKind.ForStatement;
1414 readonly initializer?: ForInitializer;
1415 readonly condition?: Expression;
1416 readonly incrementor?: Expression;
1417 }
1418 export type ForInOrOfStatement = ForInStatement | ForOfStatement;
1419 export interface ForInStatement extends IterationStatement {
1420 readonly kind: SyntaxKind.ForInStatement;
1421 readonly initializer: ForInitializer;
1422 readonly expression: Expression;
1423 }
1424 export interface ForOfStatement extends IterationStatement {
1425 readonly kind: SyntaxKind.ForOfStatement;
1426 readonly awaitModifier?: AwaitKeywordToken;
1427 readonly initializer: ForInitializer;
1428 readonly expression: Expression;
1429 }
1430 export interface BreakStatement extends Statement {
1431 readonly kind: SyntaxKind.BreakStatement;
1432 readonly label?: Identifier;
1433 }
1434 export interface ContinueStatement extends Statement {
1435 readonly kind: SyntaxKind.ContinueStatement;
1436 readonly label?: Identifier;
1437 }
1438 export type BreakOrContinueStatement = BreakStatement | ContinueStatement;
1439 export interface ReturnStatement extends Statement {
1440 readonly kind: SyntaxKind.ReturnStatement;
1441 readonly expression?: Expression;
1442 }
1443 export interface WithStatement extends Statement {
1444 readonly kind: SyntaxKind.WithStatement;
1445 readonly expression: Expression;
1446 readonly statement: Statement;
1447 }
1448 export interface SwitchStatement extends Statement {
1449 readonly kind: SyntaxKind.SwitchStatement;
1450 readonly expression: Expression;
1451 readonly caseBlock: CaseBlock;
1452 possiblyExhaustive?: boolean;
1453 }
1454 export interface CaseBlock extends Node {
1455 readonly kind: SyntaxKind.CaseBlock;
1456 readonly parent: SwitchStatement;
1457 readonly clauses: NodeArray<CaseOrDefaultClause>;
1458 }
1459 export interface CaseClause extends Node {
1460 readonly kind: SyntaxKind.CaseClause;
1461 readonly parent: CaseBlock;
1462 readonly expression: Expression;
1463 readonly statements: NodeArray<Statement>;
1464 }
1465 export interface DefaultClause extends Node {
1466 readonly kind: SyntaxKind.DefaultClause;
1467 readonly parent: CaseBlock;
1468 readonly statements: NodeArray<Statement>;
1469 }
1470 export type CaseOrDefaultClause = CaseClause | DefaultClause;
1471 export interface LabeledStatement extends Statement, JSDocContainer {
1472 readonly kind: SyntaxKind.LabeledStatement;
1473 readonly label: Identifier;
1474 readonly statement: Statement;
1475 }
1476 export interface ThrowStatement extends Statement {
1477 readonly kind: SyntaxKind.ThrowStatement;
1478 readonly expression: Expression;
1479 }
1480 export interface TryStatement extends Statement {
1481 readonly kind: SyntaxKind.TryStatement;
1482 readonly tryBlock: Block;
1483 readonly catchClause?: CatchClause;
1484 readonly finallyBlock?: Block;
1485 }
1486 export interface CatchClause extends Node {
1487 readonly kind: SyntaxKind.CatchClause;
1488 readonly parent: TryStatement;
1489 readonly variableDeclaration?: VariableDeclaration;
1490 readonly block: Block;
1491 }
1492 export type ObjectTypeDeclaration = ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode;
1493 export type DeclarationWithTypeParameters = DeclarationWithTypeParameterChildren | JSDocTypedefTag | JSDocCallbackTag | JSDocSignature;
1494 export type DeclarationWithTypeParameterChildren = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag;
1495 export interface ClassLikeDeclarationBase extends NamedDeclaration, JSDocContainer {
1496 readonly kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression;
1497 readonly name?: Identifier;
1498 readonly typeParameters?: NodeArray<TypeParameterDeclaration>;
1499 readonly heritageClauses?: NodeArray<HeritageClause>;
1500 readonly members: NodeArray<ClassElement>;
1501 }
1502 export interface ClassDeclaration extends ClassLikeDeclarationBase, DeclarationStatement {
1503 readonly kind: SyntaxKind.ClassDeclaration;
1504 /** May be undefined in `export default class { ... }`. */
1505 readonly name?: Identifier;
1506 }
1507 export interface ClassExpression extends ClassLikeDeclarationBase, PrimaryExpression {
1508 readonly kind: SyntaxKind.ClassExpression;
1509 }
1510 export type ClassLikeDeclaration = ClassDeclaration | ClassExpression;
1511 export interface ClassElement extends NamedDeclaration {
1512 _classElementBrand: any;
1513 readonly name?: PropertyName;
1514 }
1515 export interface TypeElement extends NamedDeclaration {
1516 _typeElementBrand: any;
1517 readonly name?: PropertyName;
1518 readonly questionToken?: QuestionToken;
1519 }
1520 export interface InterfaceDeclaration extends DeclarationStatement, JSDocContainer {
1521 readonly kind: SyntaxKind.InterfaceDeclaration;
1522 readonly name: Identifier;
1523 readonly typeParameters?: NodeArray<TypeParameterDeclaration>;
1524 readonly heritageClauses?: NodeArray<HeritageClause>;
1525 readonly members: NodeArray<TypeElement>;
1526 }
1527 export interface HeritageClause extends Node {
1528 readonly kind: SyntaxKind.HeritageClause;
1529 readonly parent: InterfaceDeclaration | ClassLikeDeclaration;
1530 readonly token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword;
1531 readonly types: NodeArray<ExpressionWithTypeArguments>;
1532 }
1533 export interface TypeAliasDeclaration extends DeclarationStatement, JSDocContainer {
1534 readonly kind: SyntaxKind.TypeAliasDeclaration;
1535 readonly name: Identifier;
1536 readonly typeParameters?: NodeArray<TypeParameterDeclaration>;
1537 readonly type: TypeNode;
1538 }
1539 export interface EnumMember extends NamedDeclaration, JSDocContainer {
1540 readonly kind: SyntaxKind.EnumMember;
1541 readonly parent: EnumDeclaration;
1542 readonly name: PropertyName;
1543 readonly initializer?: Expression;
1544 }
1545 export interface EnumDeclaration extends DeclarationStatement, JSDocContainer {
1546 readonly kind: SyntaxKind.EnumDeclaration;
1547 readonly name: Identifier;
1548 readonly members: NodeArray<EnumMember>;
1549 }
1550 export type ModuleName = Identifier | StringLiteral;
1551 export type ModuleBody = NamespaceBody | JSDocNamespaceBody;
1552 export interface ModuleDeclaration extends DeclarationStatement, JSDocContainer {
1553 readonly kind: SyntaxKind.ModuleDeclaration;
1554 readonly parent: ModuleBody | SourceFile;
1555 readonly name: ModuleName;
1556 readonly body?: ModuleBody | JSDocNamespaceDeclaration;
1557 }
1558 export type NamespaceBody = ModuleBlock | NamespaceDeclaration;
1559 export interface NamespaceDeclaration extends ModuleDeclaration {
1560 readonly name: Identifier;
1561 readonly body: NamespaceBody;
1562 }
1563 export type JSDocNamespaceBody = Identifier | JSDocNamespaceDeclaration;
1564 export interface JSDocNamespaceDeclaration extends ModuleDeclaration {
1565 readonly name: Identifier;
1566 readonly body?: JSDocNamespaceBody;
1567 }
1568 export interface ModuleBlock extends Node, Statement {
1569 readonly kind: SyntaxKind.ModuleBlock;
1570 readonly parent: ModuleDeclaration;
1571 readonly statements: NodeArray<Statement>;
1572 }
1573 export type ModuleReference = EntityName | ExternalModuleReference;
1574 /**
1575 * One of:
1576 * - import x = require("mod");
1577 * - import x = M.x;
1578 */
1579 export interface ImportEqualsDeclaration extends DeclarationStatement, JSDocContainer {
1580 readonly kind: SyntaxKind.ImportEqualsDeclaration;
1581 readonly parent: SourceFile | ModuleBlock;
1582 readonly name: Identifier;
1583 readonly moduleReference: ModuleReference;
1584 }
1585 export interface ExternalModuleReference extends Node {
1586 readonly kind: SyntaxKind.ExternalModuleReference;
1587 readonly parent: ImportEqualsDeclaration;
1588 readonly expression: Expression;
1589 }
1590 export interface ImportDeclaration extends Statement, JSDocContainer {
1591 readonly kind: SyntaxKind.ImportDeclaration;
1592 readonly parent: SourceFile | ModuleBlock;
1593 readonly importClause?: ImportClause;
1594 /** If this is not a StringLiteral it will be a grammar error. */
1595 readonly moduleSpecifier: Expression;
1596 }
1597 export type NamedImportBindings = NamespaceImport | NamedImports;
1598 export type NamedExportBindings = NamespaceExport | NamedExports;
1599 export interface ImportClause extends NamedDeclaration {
1600 readonly kind: SyntaxKind.ImportClause;
1601 readonly parent: ImportDeclaration;
1602 readonly isTypeOnly: boolean;
1603 readonly name?: Identifier;
1604 readonly namedBindings?: NamedImportBindings;
1605 }
1606 export interface NamespaceImport extends NamedDeclaration {
1607 readonly kind: SyntaxKind.NamespaceImport;
1608 readonly parent: ImportClause;
1609 readonly name: Identifier;
1610 }
1611 export interface NamespaceExport extends NamedDeclaration {
1612 readonly kind: SyntaxKind.NamespaceExport;
1613 readonly parent: ExportDeclaration;
1614 readonly name: Identifier;
1615 }
1616 export interface NamespaceExportDeclaration extends DeclarationStatement, JSDocContainer {
1617 readonly kind: SyntaxKind.NamespaceExportDeclaration;
1618 readonly name: Identifier;
1619 }
1620 export interface ExportDeclaration extends DeclarationStatement, JSDocContainer {
1621 readonly kind: SyntaxKind.ExportDeclaration;
1622 readonly parent: SourceFile | ModuleBlock;
1623 readonly isTypeOnly: boolean;
1624 /** Will not be assigned in the case of `export * from "foo";` */
1625 readonly exportClause?: NamedExportBindings;
1626 /** If this is not a StringLiteral it will be a grammar error. */
1627 readonly moduleSpecifier?: Expression;
1628 }
1629 export interface NamedImports extends Node {
1630 readonly kind: SyntaxKind.NamedImports;
1631 readonly parent: ImportClause;
1632 readonly elements: NodeArray<ImportSpecifier>;
1633 }
1634 export interface NamedExports extends Node {
1635 readonly kind: SyntaxKind.NamedExports;
1636 readonly parent: ExportDeclaration;
1637 readonly elements: NodeArray<ExportSpecifier>;
1638 }
1639 export type NamedImportsOrExports = NamedImports | NamedExports;
1640 export interface ImportSpecifier extends NamedDeclaration {
1641 readonly kind: SyntaxKind.ImportSpecifier;
1642 readonly parent: NamedImports;
1643 readonly propertyName?: Identifier;
1644 readonly name: Identifier;
1645 }
1646 export interface ExportSpecifier extends NamedDeclaration {
1647 readonly kind: SyntaxKind.ExportSpecifier;
1648 readonly parent: NamedExports;
1649 readonly propertyName?: Identifier;
1650 readonly name: Identifier;
1651 }
1652 export type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier;
1653 export type TypeOnlyCompatibleAliasDeclaration = ImportClause | NamespaceImport | ImportOrExportSpecifier;
1654 /**
1655 * This is either an `export =` or an `export default` declaration.
1656 * Unless `isExportEquals` is set, this node was parsed as an `export default`.
1657 */
1658 export interface ExportAssignment extends DeclarationStatement, JSDocContainer {
1659 readonly kind: SyntaxKind.ExportAssignment;
1660 readonly parent: SourceFile;
1661 readonly isExportEquals?: boolean;
1662 readonly expression: Expression;
1663 }
1664 export interface FileReference extends TextRange {
1665 fileName: string;
1666 }
1667 export interface CheckJsDirective extends TextRange {
1668 enabled: boolean;
1669 }
1670 export type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia;
1671 export interface CommentRange extends TextRange {
1672 hasTrailingNewLine?: boolean;
1673 kind: CommentKind;
1674 }
1675 export interface SynthesizedComment extends CommentRange {
1676 text: string;
1677 pos: -1;
1678 end: -1;
1679 hasLeadingNewline?: boolean;
1680 }
1681 export interface JSDocTypeExpression extends TypeNode {
1682 readonly kind: SyntaxKind.JSDocTypeExpression;
1683 readonly type: TypeNode;
1684 }
1685 export interface JSDocType extends TypeNode {
1686 _jsDocTypeBrand: any;
1687 }
1688 export interface JSDocAllType extends JSDocType {
1689 readonly kind: SyntaxKind.JSDocAllType;
1690 }
1691 export interface JSDocUnknownType extends JSDocType {
1692 readonly kind: SyntaxKind.JSDocUnknownType;
1693 }
1694 export interface JSDocNonNullableType extends JSDocType {
1695 readonly kind: SyntaxKind.JSDocNonNullableType;
1696 readonly type: TypeNode;
1697 }
1698 export interface JSDocNullableType extends JSDocType {
1699 readonly kind: SyntaxKind.JSDocNullableType;
1700 readonly type: TypeNode;
1701 }
1702 export interface JSDocOptionalType extends JSDocType {
1703 readonly kind: SyntaxKind.JSDocOptionalType;
1704 readonly type: TypeNode;
1705 }
1706 export interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase {
1707 readonly kind: SyntaxKind.JSDocFunctionType;
1708 }
1709 export interface JSDocVariadicType extends JSDocType {
1710 readonly kind: SyntaxKind.JSDocVariadicType;
1711 readonly type: TypeNode;
1712 }
1713 export interface JSDocNamepathType extends JSDocType {
1714 readonly kind: SyntaxKind.JSDocNamepathType;
1715 readonly type: TypeNode;
1716 }
1717 export type JSDocTypeReferencingNode = JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType;
1718 export interface JSDoc extends Node {
1719 readonly kind: SyntaxKind.JSDocComment;
1720 readonly parent: HasJSDoc;
1721 readonly tags?: NodeArray<JSDocTag>;
1722 readonly comment?: string;
1723 }
1724 export interface JSDocTag extends Node {
1725 readonly parent: JSDoc | JSDocTypeLiteral;
1726 readonly tagName: Identifier;
1727 readonly comment?: string;
1728 }
1729 export interface JSDocUnknownTag extends JSDocTag {
1730 readonly kind: SyntaxKind.JSDocTag;
1731 }
1732 /**
1733 * Note that `@extends` is a synonym of `@augments`.
1734 * Both tags are represented by this interface.
1735 */
1736 export interface JSDocAugmentsTag extends JSDocTag {
1737 readonly kind: SyntaxKind.JSDocAugmentsTag;
1738 readonly class: ExpressionWithTypeArguments & {
1739 readonly expression: Identifier | PropertyAccessEntityNameExpression;
1740 };
1741 }
1742 export interface JSDocImplementsTag extends JSDocTag {
1743 readonly kind: SyntaxKind.JSDocImplementsTag;
1744 readonly class: ExpressionWithTypeArguments & {
1745 readonly expression: Identifier | PropertyAccessEntityNameExpression;
1746 };
1747 }
1748 export interface JSDocAuthorTag extends JSDocTag {
1749 readonly kind: SyntaxKind.JSDocAuthorTag;
1750 }
1751 export interface JSDocDeprecatedTag extends JSDocTag {
1752 kind: SyntaxKind.JSDocDeprecatedTag;
1753 }
1754 export interface JSDocClassTag extends JSDocTag {
1755 readonly kind: SyntaxKind.JSDocClassTag;
1756 }
1757 export interface JSDocPublicTag extends JSDocTag {
1758 readonly kind: SyntaxKind.JSDocPublicTag;
1759 }
1760 export interface JSDocPrivateTag extends JSDocTag {
1761 readonly kind: SyntaxKind.JSDocPrivateTag;
1762 }
1763 export interface JSDocProtectedTag extends JSDocTag {
1764 readonly kind: SyntaxKind.JSDocProtectedTag;
1765 }
1766 export interface JSDocReadonlyTag extends JSDocTag {
1767 readonly kind: SyntaxKind.JSDocReadonlyTag;
1768 }
1769 export interface JSDocEnumTag extends JSDocTag, Declaration {
1770 readonly kind: SyntaxKind.JSDocEnumTag;
1771 readonly parent: JSDoc;
1772 readonly typeExpression: JSDocTypeExpression;
1773 }
1774 export interface JSDocThisTag extends JSDocTag {
1775 readonly kind: SyntaxKind.JSDocThisTag;
1776 readonly typeExpression: JSDocTypeExpression;
1777 }
1778 export interface JSDocTemplateTag extends JSDocTag {
1779 readonly kind: SyntaxKind.JSDocTemplateTag;
1780 readonly constraint: JSDocTypeExpression | undefined;
1781 readonly typeParameters: NodeArray<TypeParameterDeclaration>;
1782 }
1783 export interface JSDocReturnTag extends JSDocTag {
1784 readonly kind: SyntaxKind.JSDocReturnTag;
1785 readonly typeExpression?: JSDocTypeExpression;
1786 }
1787 export interface JSDocTypeTag extends JSDocTag {
1788 readonly kind: SyntaxKind.JSDocTypeTag;
1789 readonly typeExpression: JSDocTypeExpression;
1790 }
1791 export interface JSDocTypedefTag extends JSDocTag, NamedDeclaration {
1792 readonly kind: SyntaxKind.JSDocTypedefTag;
1793 readonly parent: JSDoc;
1794 readonly fullName?: JSDocNamespaceDeclaration | Identifier;
1795 readonly name?: Identifier;
1796 readonly typeExpression?: JSDocTypeExpression | JSDocTypeLiteral;
1797 }
1798 export interface JSDocCallbackTag extends JSDocTag, NamedDeclaration {
1799 readonly kind: SyntaxKind.JSDocCallbackTag;
1800 readonly parent: JSDoc;
1801 readonly fullName?: JSDocNamespaceDeclaration | Identifier;
1802 readonly name?: Identifier;
1803 readonly typeExpression: JSDocSignature;
1804 }
1805 export interface JSDocSignature extends JSDocType, Declaration {
1806 readonly kind: SyntaxKind.JSDocSignature;
1807 readonly typeParameters?: readonly JSDocTemplateTag[];
1808 readonly parameters: readonly JSDocParameterTag[];
1809 readonly type: JSDocReturnTag | undefined;
1810 }
1811 export interface JSDocPropertyLikeTag extends JSDocTag, Declaration {
1812 readonly parent: JSDoc;
1813 readonly name: EntityName;
1814 readonly typeExpression?: JSDocTypeExpression;
1815 /** Whether the property name came before the type -- non-standard for JSDoc, but Typescript-like */
1816 readonly isNameFirst: boolean;
1817 readonly isBracketed: boolean;
1818 }
1819 export interface JSDocPropertyTag extends JSDocPropertyLikeTag {
1820 readonly kind: SyntaxKind.JSDocPropertyTag;
1821 }
1822 export interface JSDocParameterTag extends JSDocPropertyLikeTag {
1823 readonly kind: SyntaxKind.JSDocParameterTag;
1824 }
1825 export interface JSDocTypeLiteral extends JSDocType {
1826 readonly kind: SyntaxKind.JSDocTypeLiteral;
1827 readonly jsDocPropertyTags?: readonly JSDocPropertyLikeTag[];
1828 /** If true, then this type literal represents an *array* of its type. */
1829 readonly isArrayType: boolean;
1830 }
1831 export enum FlowFlags {
1832 Unreachable = 1,
1833 Start = 2,
1834 BranchLabel = 4,
1835 LoopLabel = 8,
1836 Assignment = 16,
1837 TrueCondition = 32,
1838 FalseCondition = 64,
1839 SwitchClause = 128,
1840 ArrayMutation = 256,
1841 Call = 512,
1842 ReduceLabel = 1024,
1843 Referenced = 2048,
1844 Shared = 4096,
1845 Label = 12,
1846 Condition = 96
1847 }
1848 export type FlowNode = FlowStart | FlowLabel | FlowAssignment | FlowCall | FlowCondition | FlowSwitchClause | FlowArrayMutation | FlowCall | FlowReduceLabel;
1849 export interface FlowNodeBase {
1850 flags: FlowFlags;
1851 id?: number;
1852 }
1853 export interface FlowStart extends FlowNodeBase {
1854 node?: FunctionExpression | ArrowFunction | MethodDeclaration;
1855 }
1856 export interface FlowLabel extends FlowNodeBase {
1857 antecedents: FlowNode[] | undefined;
1858 }
1859 export interface FlowAssignment extends FlowNodeBase {
1860 node: Expression | VariableDeclaration | BindingElement;
1861 antecedent: FlowNode;
1862 }
1863 export interface FlowCall extends FlowNodeBase {
1864 node: CallExpression;
1865 antecedent: FlowNode;
1866 }
1867 export interface FlowCondition extends FlowNodeBase {
1868 node: Expression;
1869 antecedent: FlowNode;
1870 }
1871 export interface FlowSwitchClause extends FlowNodeBase {
1872 switchStatement: SwitchStatement;
1873 clauseStart: number;
1874 clauseEnd: number;
1875 antecedent: FlowNode;
1876 }
1877 export interface FlowArrayMutation extends FlowNodeBase {
1878 node: CallExpression | BinaryExpression;
1879 antecedent: FlowNode;
1880 }
1881 export interface FlowReduceLabel extends FlowNodeBase {
1882 target: FlowLabel;
1883 antecedents: FlowNode[];
1884 antecedent: FlowNode;
1885 }
1886 export type FlowType = Type | IncompleteType;
1887 export interface IncompleteType {
1888 flags: TypeFlags;
1889 type: Type;
1890 }
1891 export interface AmdDependency {
1892 path: string;
1893 name?: string;
1894 }
1895 export interface SourceFile extends Declaration {
1896 readonly kind: SyntaxKind.SourceFile;
1897 readonly statements: NodeArray<Statement>;
1898 readonly endOfFileToken: Token<SyntaxKind.EndOfFileToken>;
1899 fileName: string;
1900 text: string;
1901 amdDependencies: readonly AmdDependency[];
1902 moduleName?: string;
1903 referencedFiles: readonly FileReference[];
1904 typeReferenceDirectives: readonly FileReference[];
1905 libReferenceDirectives: readonly FileReference[];
1906 languageVariant: LanguageVariant;
1907 isDeclarationFile: boolean;
1908 /**
1909 * lib.d.ts should have a reference comment like
1910 *
1911 * /// <reference no-default-lib="true"/>
1912 *
1913 * If any other file has this comment, it signals not to include lib.d.ts
1914 * because this containing file is intended to act as a default library.
1915 */
1916 hasNoDefaultLib: boolean;
1917 languageVersion: ScriptTarget;
1918 }
1919 export interface Bundle extends Node {
1920 readonly kind: SyntaxKind.Bundle;
1921 readonly prepends: readonly (InputFiles | UnparsedSource)[];
1922 readonly sourceFiles: readonly SourceFile[];
1923 }
1924 export interface InputFiles extends Node {
1925 readonly kind: SyntaxKind.InputFiles;
1926 javascriptPath?: string;
1927 javascriptText: string;
1928 javascriptMapPath?: string;
1929 javascriptMapText?: string;
1930 declarationPath?: string;
1931 declarationText: string;
1932 declarationMapPath?: string;
1933 declarationMapText?: string;
1934 }
1935 export interface UnparsedSource extends Node {
1936 readonly kind: SyntaxKind.UnparsedSource;
1937 fileName: string;
1938 text: string;
1939 readonly prologues: readonly UnparsedPrologue[];
1940 helpers: readonly UnscopedEmitHelper[] | undefined;
1941 referencedFiles: readonly FileReference[];
1942 typeReferenceDirectives: readonly string[] | undefined;
1943 libReferenceDirectives: readonly FileReference[];
1944 hasNoDefaultLib?: boolean;
1945 sourceMapPath?: string;
1946 sourceMapText?: string;
1947 readonly syntheticReferences?: readonly UnparsedSyntheticReference[];
1948 readonly texts: readonly UnparsedSourceText[];
1949 }
1950 export type UnparsedSourceText = UnparsedPrepend | UnparsedTextLike;
1951 export type UnparsedNode = UnparsedPrologue | UnparsedSourceText | UnparsedSyntheticReference;
1952 export interface UnparsedSection extends Node {
1953 readonly kind: SyntaxKind;
1954 readonly parent: UnparsedSource;
1955 readonly data?: string;
1956 }
1957 export interface UnparsedPrologue extends UnparsedSection {
1958 readonly kind: SyntaxKind.UnparsedPrologue;
1959 readonly parent: UnparsedSource;
1960 readonly data: string;
1961 }
1962 export interface UnparsedPrepend extends UnparsedSection {
1963 readonly kind: SyntaxKind.UnparsedPrepend;
1964 readonly parent: UnparsedSource;
1965 readonly data: string;
1966 readonly texts: readonly UnparsedTextLike[];
1967 }
1968 export interface UnparsedTextLike extends UnparsedSection {
1969 readonly kind: SyntaxKind.UnparsedText | SyntaxKind.UnparsedInternalText;
1970 readonly parent: UnparsedSource;
1971 }
1972 export interface UnparsedSyntheticReference extends UnparsedSection {
1973 readonly kind: SyntaxKind.UnparsedSyntheticReference;
1974 readonly parent: UnparsedSource;
1975 }
1976 export interface JsonSourceFile extends SourceFile {
1977 readonly statements: NodeArray<JsonObjectExpressionStatement>;
1978 }
1979 export interface TsConfigSourceFile extends JsonSourceFile {
1980 extendedSourceFiles?: string[];
1981 }
1982 export interface JsonMinusNumericLiteral extends PrefixUnaryExpression {
1983 readonly kind: SyntaxKind.PrefixUnaryExpression;
1984 readonly operator: SyntaxKind.MinusToken;
1985 readonly operand: NumericLiteral;
1986 }
1987 export type JsonObjectExpression = ObjectLiteralExpression | ArrayLiteralExpression | JsonMinusNumericLiteral | NumericLiteral | StringLiteral | BooleanLiteral | NullLiteral;
1988 export interface JsonObjectExpressionStatement extends ExpressionStatement {
1989 readonly expression: JsonObjectExpression;
1990 }
1991 export interface ScriptReferenceHost {
1992 getCompilerOptions(): CompilerOptions;
1993 getSourceFile(fileName: string): SourceFile | undefined;
1994 getSourceFileByPath(path: Path): SourceFile | undefined;
1995 getCurrentDirectory(): string;
1996 }
1997 export interface ParseConfigHost {
1998 useCaseSensitiveFileNames: boolean;
1999 readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[];
2000 /**
2001 * Gets a value indicating whether the specified path exists and is a file.
2002 * @param path The path to test.
2003 */
2004 fileExists(path: string): boolean;
2005 readFile(path: string): string | undefined;
2006 trace?(s: string): void;
2007 }
2008 /**
2009 * Branded string for keeping track of when we've turned an ambiguous path
2010 * specified like "./blah" to an absolute path to an actual
2011 * tsconfig file, e.g. "/root/blah/tsconfig.json"
2012 */
2013 export type ResolvedConfigFileName = string & {
2014 _isResolvedConfigFileName: never;
2015 };
2016 export type WriteFileCallback = (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[]) => void;
2017 export class OperationCanceledException {
2018 }
2019 export interface CancellationToken {
2020 isCancellationRequested(): boolean;
2021 /** @throws OperationCanceledException if isCancellationRequested is true */
2022 throwIfCancellationRequested(): void;
2023 }
2024 export interface Program extends ScriptReferenceHost {
2025 getCurrentDirectory(): string;
2026 /**
2027 * Get a list of root file names that were passed to a 'createProgram'
2028 */
2029 getRootFileNames(): readonly string[];
2030 /**
2031 * Get a list of files in the program
2032 */
2033 getSourceFiles(): readonly SourceFile[];
2034 /**
2035 * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then
2036 * the JavaScript and declaration files will be produced for all the files in this program.
2037 * If targetSourceFile is specified, then only the JavaScript and declaration for that
2038 * specific file will be generated.
2039 *
2040 * If writeFile is not specified then the writeFile callback from the compiler host will be
2041 * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter
2042 * will be invoked when writing the JavaScript and declaration files.
2043 */
2044 emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult;
2045 getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
2046 getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
2047 getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
2048 /** The first time this is called, it will return global diagnostics (no location). */
2049 getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
2050 getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
2051 getConfigFileParsingDiagnostics(): readonly Diagnostic[];
2052 /**
2053 * Gets a type checker that can be used to semantically analyze source files in the program.
2054 */
2055 getTypeChecker(): TypeChecker;
2056 getNodeCount(): number;
2057 getIdentifierCount(): number;
2058 getSymbolCount(): number;
2059 getTypeCount(): number;
2060 getInstantiationCount(): number;
2061 getRelationCacheSizes(): {
2062 assignable: number;
2063 identity: number;
2064 subtype: number;
2065 strictSubtype: number;
2066 };
2067 isSourceFileFromExternalLibrary(file: SourceFile): boolean;
2068 isSourceFileDefaultLibrary(file: SourceFile): boolean;
2069 getProjectReferences(): readonly ProjectReference[] | undefined;
2070 getResolvedProjectReferences(): readonly (ResolvedProjectReference | undefined)[] | undefined;
2071 }
2072 export interface ResolvedProjectReference {
2073 commandLine: ParsedCommandLine;
2074 sourceFile: SourceFile;
2075 references?: readonly (ResolvedProjectReference | undefined)[];
2076 }
2077 export type CustomTransformerFactory = (context: TransformationContext) => CustomTransformer;
2078 export interface CustomTransformer {
2079 transformSourceFile(node: SourceFile): SourceFile;
2080 transformBundle(node: Bundle): Bundle;
2081 }
2082 export interface CustomTransformers {
2083 /** Custom transformers to evaluate before built-in .js transformations. */
2084 before?: (TransformerFactory<SourceFile> | CustomTransformerFactory)[];
2085 /** Custom transformers to evaluate after built-in .js transformations. */
2086 after?: (TransformerFactory<SourceFile> | CustomTransformerFactory)[];
2087 /** Custom transformers to evaluate after built-in .d.ts transformations. */
2088 afterDeclarations?: (TransformerFactory<Bundle | SourceFile> | CustomTransformerFactory)[];
2089 }
2090 export interface SourceMapSpan {
2091 /** Line number in the .js file. */
2092 emittedLine: number;
2093 /** Column number in the .js file. */
2094 emittedColumn: number;
2095 /** Line number in the .ts file. */
2096 sourceLine: number;
2097 /** Column number in the .ts file. */
2098 sourceColumn: number;
2099 /** Optional name (index into names array) associated with this span. */
2100 nameIndex?: number;
2101 /** .ts file (index into sources array) associated with this span */
2102 sourceIndex: number;
2103 }
2104 /** Return code used by getEmitOutput function to indicate status of the function */
2105 export enum ExitStatus {
2106 Success = 0,
2107 DiagnosticsPresent_OutputsSkipped = 1,
2108 DiagnosticsPresent_OutputsGenerated = 2,
2109 InvalidProject_OutputsSkipped = 3,
2110 ProjectReferenceCycle_OutputsSkipped = 4,
2111 /** @deprecated Use ProjectReferenceCycle_OutputsSkipped instead. */
2112 ProjectReferenceCycle_OutputsSkupped = 4
2113 }
2114 export interface EmitResult {
2115 emitSkipped: boolean;
2116 /** Contains declaration emit diagnostics */
2117 diagnostics: readonly Diagnostic[];
2118 emittedFiles?: string[];
2119 }
2120 export interface TypeChecker {
2121 getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type;
2122 getDeclaredTypeOfSymbol(symbol: Symbol): Type;
2123 getPropertiesOfType(type: Type): Symbol[];
2124 getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
2125 getPrivateIdentifierPropertyOfType(leftType: Type, name: string, location: Node): Symbol | undefined;
2126 getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined;
2127 getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[];
2128 getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined;
2129 getBaseTypes(type: InterfaceType): BaseType[];
2130 getBaseTypeOfLiteralType(type: Type): Type;
2131 getWidenedType(type: Type): Type;
2132 getReturnTypeOfSignature(signature: Signature): Type;
2133 getNullableType(type: Type, flags: TypeFlags): Type;
2134 getNonNullableType(type: Type): Type;
2135 getTypeArguments(type: TypeReference): readonly Type[];
2136 /** Note that the resulting nodes cannot be checked. */
2137 typeToTypeNode(type: Type, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeNode | undefined;
2138 /** Note that the resulting nodes cannot be checked. */
2139 signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): SignatureDeclaration & {
2140 typeArguments?: NodeArray<TypeNode>;
2141 } | undefined;
2142 /** Note that the resulting nodes cannot be checked. */
2143 indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, kind: IndexKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): IndexSignatureDeclaration | undefined;
2144 /** Note that the resulting nodes cannot be checked. */
2145 symbolToEntityName(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): EntityName | undefined;
2146 /** Note that the resulting nodes cannot be checked. */
2147 symbolToExpression(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): Expression | undefined;
2148 /** Note that the resulting nodes cannot be checked. */
2149 symbolToTypeParameterDeclarations(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): NodeArray<TypeParameterDeclaration> | undefined;
2150 /** Note that the resulting nodes cannot be checked. */
2151 symbolToParameterDeclaration(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): ParameterDeclaration | undefined;
2152 /** Note that the resulting nodes cannot be checked. */
2153 typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeParameterDeclaration | undefined;
2154 getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
2155 getSymbolAtLocation(node: Node): Symbol | undefined;
2156 getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[];
2157 /**
2158 * The function returns the value (local variable) symbol of an identifier in the short-hand property assignment.
2159 * This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value.
2160 */
2161 getShorthandAssignmentValueSymbol(location: Node): Symbol | undefined;
2162 getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol | undefined;
2163 /**
2164 * If a symbol is a local symbol with an associated exported symbol, returns the exported symbol.
2165 * Otherwise returns its input.
2166 * For example, at `export type T = number;`:
2167 * - `getSymbolAtLocation` at the location `T` will return the exported symbol for `T`.
2168 * - But the result of `getSymbolsInScope` will contain the *local* symbol for `T`, not the exported symbol.
2169 * - Calling `getExportSymbolOfSymbol` on that local symbol will return the exported symbol.
2170 */
2171 getExportSymbolOfSymbol(symbol: Symbol): Symbol;
2172 getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol | undefined;
2173 getTypeOfAssignmentPattern(pattern: AssignmentPattern): Type;
2174 getTypeAtLocation(node: Node): Type;
2175 getTypeFromTypeNode(node: TypeNode): Type;
2176 signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string;
2177 typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
2178 symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): string;
2179 typePredicateToString(predicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
2180 getFullyQualifiedName(symbol: Symbol): string;
2181 getAugmentedPropertiesOfType(type: Type): Symbol[];
2182 getRootSymbols(symbol: Symbol): readonly Symbol[];
2183 getContextualType(node: Expression): Type | undefined;
2184 /**
2185 * returns unknownSignature in the case of an error.
2186 * returns undefined if the node is not valid.
2187 * @param argumentCount Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`.
2188 */
2189 getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined;
2190 getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined;
2191 isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined;
2192 isUndefinedSymbol(symbol: Symbol): boolean;
2193 isArgumentsSymbol(symbol: Symbol): boolean;
2194 isUnknownSymbol(symbol: Symbol): boolean;
2195 getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined;
2196 isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName | ImportTypeNode, propertyName: string): boolean;
2197 /** Follow all aliases to get the original symbol. */
2198 getAliasedSymbol(symbol: Symbol): Symbol;
2199 getExportsOfModule(moduleSymbol: Symbol): Symbol[];
2200 getJsxIntrinsicTagNamesAt(location: Node): Symbol[];
2201 isOptionalParameter(node: ParameterDeclaration): boolean;
2202 getAmbientModules(): Symbol[];
2203 tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
2204 getApparentType(type: Type): Type;
2205 getBaseConstraintOfType(type: Type): Type | undefined;
2206 getDefaultFromTypeParameter(type: Type): Type | undefined;
2207 /**
2208 * Depending on the operation performed, it may be appropriate to throw away the checker
2209 * if the cancellation token is triggered. Typically, if it is used for error checking
2210 * and the operation is cancelled, then it should be discarded, otherwise it is safe to keep.
2211 */
2212 runWithCancellationToken<T>(token: CancellationToken, cb: (checker: TypeChecker) => T): T;
2213 }
2214 export enum NodeBuilderFlags {
2215 None = 0,
2216 NoTruncation = 1,
2217 WriteArrayAsGenericType = 2,
2218 GenerateNamesForShadowedTypeParams = 4,
2219 UseStructuralFallback = 8,
2220 ForbidIndexedAccessSymbolReferences = 16,
2221 WriteTypeArgumentsOfSignature = 32,
2222 UseFullyQualifiedType = 64,
2223 UseOnlyExternalAliasing = 128,
2224 SuppressAnyReturnType = 256,
2225 WriteTypeParametersInQualifiedName = 512,
2226 MultilineObjectLiterals = 1024,
2227 WriteClassExpressionAsTypeLiteral = 2048,
2228 UseTypeOfFunction = 4096,
2229 OmitParameterModifiers = 8192,
2230 UseAliasDefinedOutsideCurrentScope = 16384,
2231 UseSingleQuotesForStringLiteralType = 268435456,
2232 NoTypeReduction = 536870912,
2233 NoUndefinedOptionalParameterType = 1073741824,
2234 AllowThisInObjectLiteral = 32768,
2235 AllowQualifedNameInPlaceOfIdentifier = 65536,
2236 AllowAnonymousIdentifier = 131072,
2237 AllowEmptyUnionOrIntersection = 262144,
2238 AllowEmptyTuple = 524288,
2239 AllowUniqueESSymbolType = 1048576,
2240 AllowEmptyIndexInfoType = 2097152,
2241 AllowNodeModulesRelativePaths = 67108864,
2242 IgnoreErrors = 70221824,
2243 InObjectTypeLiteral = 4194304,
2244 InTypeAlias = 8388608,
2245 InInitialEntityName = 16777216,
2246 InReverseMappedType = 33554432
2247 }
2248 export enum TypeFormatFlags {
2249 None = 0,
2250 NoTruncation = 1,
2251 WriteArrayAsGenericType = 2,
2252 UseStructuralFallback = 8,
2253 WriteTypeArgumentsOfSignature = 32,
2254 UseFullyQualifiedType = 64,
2255 SuppressAnyReturnType = 256,
2256 MultilineObjectLiterals = 1024,
2257 WriteClassExpressionAsTypeLiteral = 2048,
2258 UseTypeOfFunction = 4096,
2259 OmitParameterModifiers = 8192,
2260 UseAliasDefinedOutsideCurrentScope = 16384,
2261 UseSingleQuotesForStringLiteralType = 268435456,
2262 NoTypeReduction = 536870912,
2263 AllowUniqueESSymbolType = 1048576,
2264 AddUndefined = 131072,
2265 WriteArrowStyleSignature = 262144,
2266 InArrayType = 524288,
2267 InElementType = 2097152,
2268 InFirstTypeArgument = 4194304,
2269 InTypeAlias = 8388608,
2270 /** @deprecated */ WriteOwnNameForAnyLike = 0,
2271 NodeBuilderFlagsMask = 814775659
2272 }
2273 export enum SymbolFormatFlags {
2274 None = 0,
2275 WriteTypeParametersOrArguments = 1,
2276 UseOnlyExternalAliasing = 2,
2277 AllowAnyNodeKind = 4,
2278 UseAliasDefinedOutsideCurrentScope = 8,
2279 }
2280 export enum TypePredicateKind {
2281 This = 0,
2282 Identifier = 1,
2283 AssertsThis = 2,
2284 AssertsIdentifier = 3
2285 }
2286 export interface TypePredicateBase {
2287 kind: TypePredicateKind;
2288 type: Type | undefined;
2289 }
2290 export interface ThisTypePredicate extends TypePredicateBase {
2291 kind: TypePredicateKind.This;
2292 parameterName: undefined;
2293 parameterIndex: undefined;
2294 type: Type;
2295 }
2296 export interface IdentifierTypePredicate extends TypePredicateBase {
2297 kind: TypePredicateKind.Identifier;
2298 parameterName: string;
2299 parameterIndex: number;
2300 type: Type;
2301 }
2302 export interface AssertsThisTypePredicate extends TypePredicateBase {
2303 kind: TypePredicateKind.AssertsThis;
2304 parameterName: undefined;
2305 parameterIndex: undefined;
2306 type: Type | undefined;
2307 }
2308 export interface AssertsIdentifierTypePredicate extends TypePredicateBase {
2309 kind: TypePredicateKind.AssertsIdentifier;
2310 parameterName: string;
2311 parameterIndex: number;
2312 type: Type | undefined;
2313 }
2314 export type TypePredicate = ThisTypePredicate | IdentifierTypePredicate | AssertsThisTypePredicate | AssertsIdentifierTypePredicate;
2315 export enum SymbolFlags {
2316 None = 0,
2317 FunctionScopedVariable = 1,
2318 BlockScopedVariable = 2,
2319 Property = 4,
2320 EnumMember = 8,
2321 Function = 16,
2322 Class = 32,
2323 Interface = 64,
2324 ConstEnum = 128,
2325 RegularEnum = 256,
2326 ValueModule = 512,
2327 NamespaceModule = 1024,
2328 TypeLiteral = 2048,
2329 ObjectLiteral = 4096,
2330 Method = 8192,
2331 Constructor = 16384,
2332 GetAccessor = 32768,
2333 SetAccessor = 65536,
2334 Signature = 131072,
2335 TypeParameter = 262144,
2336 TypeAlias = 524288,
2337 ExportValue = 1048576,
2338 Alias = 2097152,
2339 Prototype = 4194304,
2340 ExportStar = 8388608,
2341 Optional = 16777216,
2342 Transient = 33554432,
2343 Assignment = 67108864,
2344 ModuleExports = 134217728,
2345 Enum = 384,
2346 Variable = 3,
2347 Value = 111551,
2348 Type = 788968,
2349 Namespace = 1920,
2350 Module = 1536,
2351 Accessor = 98304,
2352 FunctionScopedVariableExcludes = 111550,
2353 BlockScopedVariableExcludes = 111551,
2354 ParameterExcludes = 111551,
2355 PropertyExcludes = 0,
2356 EnumMemberExcludes = 900095,
2357 FunctionExcludes = 110991,
2358 ClassExcludes = 899503,
2359 InterfaceExcludes = 788872,
2360 RegularEnumExcludes = 899327,
2361 ConstEnumExcludes = 899967,
2362 ValueModuleExcludes = 110735,
2363 NamespaceModuleExcludes = 0,
2364 MethodExcludes = 103359,
2365 GetAccessorExcludes = 46015,
2366 SetAccessorExcludes = 78783,
2367 TypeParameterExcludes = 526824,
2368 TypeAliasExcludes = 788968,
2369 AliasExcludes = 2097152,
2370 ModuleMember = 2623475,
2371 ExportHasLocal = 944,
2372 BlockScoped = 418,
2373 PropertyOrAccessor = 98308,
2374 ClassMember = 106500,
2375 }
2376 export interface Symbol {
2377 flags: SymbolFlags;
2378 escapedName: __String;
2379 declarations: Declaration[];
2380 valueDeclaration: Declaration;
2381 members?: SymbolTable;
2382 exports?: SymbolTable;
2383 globalExports?: SymbolTable;
2384 }
2385 export enum InternalSymbolName {
2386 Call = "__call",
2387 Constructor = "__constructor",
2388 New = "__new",
2389 Index = "__index",
2390 ExportStar = "__export",
2391 Global = "__global",
2392 Missing = "__missing",
2393 Type = "__type",
2394 Object = "__object",
2395 JSXAttributes = "__jsxAttributes",
2396 Class = "__class",
2397 Function = "__function",
2398 Computed = "__computed",
2399 Resolving = "__resolving__",
2400 ExportEquals = "export=",
2401 Default = "default",
2402 This = "this"
2403 }
2404 /**
2405 * This represents a string whose leading underscore have been escaped by adding extra leading underscores.
2406 * The shape of this brand is rather unique compared to others we've used.
2407 * Instead of just an intersection of a string and an object, it is that union-ed
2408 * with an intersection of void and an object. This makes it wholly incompatible
2409 * with a normal string (which is good, it cannot be misused on assignment or on usage),
2410 * while still being comparable with a normal string via === (also good) and castable from a string.
2411 */
2412 export type __String = (string & {
2413 __escapedIdentifier: void;
2414 }) | (void & {
2415 __escapedIdentifier: void;
2416 }) | InternalSymbolName;
2417 /** ReadonlyMap where keys are `__String`s. */
2418 export interface ReadonlyUnderscoreEscapedMap<T> extends ReadonlyESMap<__String, T> {
2419 }
2420 /** Map where keys are `__String`s. */
2421 export interface UnderscoreEscapedMap<T> extends ESMap<__String, T>, ReadonlyUnderscoreEscapedMap<T> {
2422 }
2423 /** SymbolTable based on ES6 Map interface. */
2424 export type SymbolTable = UnderscoreEscapedMap<Symbol>;
2425 export enum TypeFlags {
2426 Any = 1,
2427 Unknown = 2,
2428 String = 4,
2429 Number = 8,
2430 Boolean = 16,
2431 Enum = 32,
2432 BigInt = 64,
2433 StringLiteral = 128,
2434 NumberLiteral = 256,
2435 BooleanLiteral = 512,
2436 EnumLiteral = 1024,
2437 BigIntLiteral = 2048,
2438 ESSymbol = 4096,
2439 UniqueESSymbol = 8192,
2440 Void = 16384,
2441 Undefined = 32768,
2442 Null = 65536,
2443 Never = 131072,
2444 TypeParameter = 262144,
2445 Object = 524288,
2446 Union = 1048576,
2447 Intersection = 2097152,
2448 Index = 4194304,
2449 IndexedAccess = 8388608,
2450 Conditional = 16777216,
2451 Substitution = 33554432,
2452 NonPrimitive = 67108864,
2453 Literal = 2944,
2454 Unit = 109440,
2455 StringOrNumberLiteral = 384,
2456 PossiblyFalsy = 117724,
2457 StringLike = 132,
2458 NumberLike = 296,
2459 BigIntLike = 2112,
2460 BooleanLike = 528,
2461 EnumLike = 1056,
2462 ESSymbolLike = 12288,
2463 VoidLike = 49152,
2464 UnionOrIntersection = 3145728,
2465 StructuredType = 3670016,
2466 TypeVariable = 8650752,
2467 InstantiableNonPrimitive = 58982400,
2468 InstantiablePrimitive = 4194304,
2469 Instantiable = 63176704,
2470 StructuredOrInstantiable = 66846720,
2471 Narrowable = 133970943,
2472 }
2473 export type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
2474 export interface Type {
2475 flags: TypeFlags;
2476 symbol: Symbol;
2477 pattern?: DestructuringPattern;
2478 aliasSymbol?: Symbol;
2479 aliasTypeArguments?: readonly Type[];
2480 }
2481 export interface LiteralType extends Type {
2482 value: string | number | PseudoBigInt;
2483 freshType: LiteralType;
2484 regularType: LiteralType;
2485 }
2486 export interface UniqueESSymbolType extends Type {
2487 symbol: Symbol;
2488 escapedName: __String;
2489 }
2490 export interface StringLiteralType extends LiteralType {
2491 value: string;
2492 }
2493 export interface NumberLiteralType extends LiteralType {
2494 value: number;
2495 }
2496 export interface BigIntLiteralType extends LiteralType {
2497 value: PseudoBigInt;
2498 }
2499 export interface EnumType extends Type {
2500 }
2501 export enum ObjectFlags {
2502 Class = 1,
2503 Interface = 2,
2504 Reference = 4,
2505 Tuple = 8,
2506 Anonymous = 16,
2507 Mapped = 32,
2508 Instantiated = 64,
2509 ObjectLiteral = 128,
2510 EvolvingArray = 256,
2511 ObjectLiteralPatternWithComputedProperties = 512,
2512 ContainsSpread = 1024,
2513 ReverseMapped = 2048,
2514 JsxAttributes = 4096,
2515 MarkerType = 8192,
2516 JSLiteral = 16384,
2517 FreshLiteral = 32768,
2518 ArrayLiteral = 65536,
2519 ObjectRestType = 131072,
2520 ClassOrInterface = 3,
2521 }
2522 export interface ObjectType extends Type {
2523 objectFlags: ObjectFlags;
2524 }
2525 /** Class and interface types (ObjectFlags.Class and ObjectFlags.Interface). */
2526 export interface InterfaceType extends ObjectType {
2527 typeParameters: TypeParameter[] | undefined;
2528 outerTypeParameters: TypeParameter[] | undefined;
2529 localTypeParameters: TypeParameter[] | undefined;
2530 thisType: TypeParameter | undefined;
2531 }
2532 export type BaseType = ObjectType | IntersectionType | TypeVariable;
2533 export interface InterfaceTypeWithDeclaredMembers extends InterfaceType {
2534 declaredProperties: Symbol[];
2535 declaredCallSignatures: Signature[];
2536 declaredConstructSignatures: Signature[];
2537 declaredStringIndexInfo?: IndexInfo;
2538 declaredNumberIndexInfo?: IndexInfo;
2539 }
2540 /**
2541 * Type references (ObjectFlags.Reference). When a class or interface has type parameters or
2542 * a "this" type, references to the class or interface are made using type references. The
2543 * typeArguments property specifies the types to substitute for the type parameters of the
2544 * class or interface and optionally includes an extra element that specifies the type to
2545 * substitute for "this" in the resulting instantiation. When no extra argument is present,
2546 * the type reference itself is substituted for "this". The typeArguments property is undefined
2547 * if the class or interface has no type parameters and the reference isn't specifying an
2548 * explicit "this" argument.
2549 */
2550 export interface TypeReference extends ObjectType {
2551 target: GenericType;
2552 node?: TypeReferenceNode | ArrayTypeNode | TupleTypeNode;
2553 }
2554 export interface DeferredTypeReference extends TypeReference {
2555 }
2556 export interface GenericType extends InterfaceType, TypeReference {
2557 }
2558 export enum ElementFlags {
2559 Required = 1,
2560 Optional = 2,
2561 Rest = 4,
2562 Variadic = 8,
2563 Variable = 12
2564 }
2565 export interface TupleType extends GenericType {
2566 elementFlags: readonly ElementFlags[];
2567 minLength: number;
2568 fixedLength: number;
2569 hasRestElement: boolean;
2570 combinedFlags: ElementFlags;
2571 readonly: boolean;
2572 labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration)[];
2573 }
2574 export interface TupleTypeReference extends TypeReference {
2575 target: TupleType;
2576 }
2577 export interface UnionOrIntersectionType extends Type {
2578 types: Type[];
2579 }
2580 export interface UnionType extends UnionOrIntersectionType {
2581 }
2582 export interface IntersectionType extends UnionOrIntersectionType {
2583 }
2584 export type StructuredType = ObjectType | UnionType | IntersectionType;
2585 export interface EvolvingArrayType extends ObjectType {
2586 elementType: Type;
2587 finalArrayType?: Type;
2588 }
2589 export interface InstantiableType extends Type {
2590 }
2591 export interface TypeParameter extends InstantiableType {
2592 }
2593 export interface IndexedAccessType extends InstantiableType {
2594 objectType: Type;
2595 indexType: Type;
2596 constraint?: Type;
2597 simplifiedForReading?: Type;
2598 simplifiedForWriting?: Type;
2599 }
2600 export type TypeVariable = TypeParameter | IndexedAccessType;
2601 export interface IndexType extends InstantiableType {
2602 type: InstantiableType | UnionOrIntersectionType;
2603 }
2604 export interface ConditionalRoot {
2605 node: ConditionalTypeNode;
2606 checkType: Type;
2607 extendsType: Type;
2608 trueType: Type;
2609 falseType: Type;
2610 isDistributive: boolean;
2611 inferTypeParameters?: TypeParameter[];
2612 outerTypeParameters?: TypeParameter[];
2613 instantiations?: Map<Type>;
2614 aliasSymbol?: Symbol;
2615 aliasTypeArguments?: Type[];
2616 }
2617 export interface ConditionalType extends InstantiableType {
2618 root: ConditionalRoot;
2619 checkType: Type;
2620 extendsType: Type;
2621 resolvedTrueType: Type;
2622 resolvedFalseType: Type;
2623 }
2624 export interface SubstitutionType extends InstantiableType {
2625 baseType: Type;
2626 substitute: Type;
2627 }
2628 export enum SignatureKind {
2629 Call = 0,
2630 Construct = 1
2631 }
2632 export interface Signature {
2633 declaration?: SignatureDeclaration | JSDocSignature;
2634 typeParameters?: readonly TypeParameter[];
2635 parameters: readonly Symbol[];
2636 }
2637 export enum IndexKind {
2638 String = 0,
2639 Number = 1
2640 }
2641 export interface IndexInfo {
2642 type: Type;
2643 isReadonly: boolean;
2644 declaration?: IndexSignatureDeclaration;
2645 }
2646 export enum InferencePriority {
2647 NakedTypeVariable = 1,
2648 SpeculativeTuple = 2,
2649 HomomorphicMappedType = 4,
2650 PartialHomomorphicMappedType = 8,
2651 MappedTypeConstraint = 16,
2652 ContravariantConditional = 32,
2653 ReturnType = 64,
2654 LiteralKeyof = 128,
2655 NoConstraints = 256,
2656 AlwaysStrict = 512,
2657 MaxValue = 1024,
2658 PriorityImpliesCombination = 208,
2659 Circularity = -1
2660 }
2661 /** @deprecated Use FileExtensionInfo instead. */
2662 export type JsFileExtensionInfo = FileExtensionInfo;
2663 export interface FileExtensionInfo {
2664 extension: string;
2665 isMixedContent: boolean;
2666 scriptKind?: ScriptKind;
2667 }
2668 export interface DiagnosticMessage {
2669 key: string;
2670 category: DiagnosticCategory;
2671 code: number;
2672 message: string;
2673 reportsUnnecessary?: {};
2674 reportsDeprecated?: {};
2675 }
2676 /**
2677 * A linked list of formatted diagnostic messages to be used as part of a multiline message.
2678 * It is built from the bottom up, leaving the head to be the "main" diagnostic.
2679 * While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage,
2680 * the difference is that messages are all preformatted in DMC.
2681 */
2682 export interface DiagnosticMessageChain {
2683 messageText: string;
2684 category: DiagnosticCategory;
2685 code: number;
2686 next?: DiagnosticMessageChain[];
2687 }
2688 export interface Diagnostic extends DiagnosticRelatedInformation {
2689 /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
2690 reportsUnnecessary?: {};
2691 reportsDeprecated?: {};
2692 source?: string;
2693 relatedInformation?: DiagnosticRelatedInformation[];
2694 }
2695 export interface DiagnosticRelatedInformation {
2696 category: DiagnosticCategory;
2697 code: number;
2698 file: SourceFile | undefined;
2699 start: number | undefined;
2700 length: number | undefined;
2701 messageText: string | DiagnosticMessageChain;
2702 }
2703 export interface DiagnosticWithLocation extends Diagnostic {
2704 file: SourceFile;
2705 start: number;
2706 length: number;
2707 }
2708 export enum DiagnosticCategory {
2709 Warning = 0,
2710 Error = 1,
2711 Suggestion = 2,
2712 Message = 3
2713 }
2714 export enum ModuleResolutionKind {
2715 Classic = 1,
2716 NodeJs = 2
2717 }
2718 export interface PluginImport {
2719 name: string;
2720 }
2721 export interface ProjectReference {
2722 /** A normalized path on disk */
2723 path: string;
2724 /** The path as the user originally wrote it */
2725 originalPath?: string;
2726 /** True if the output of this reference should be prepended to the output of this project. Only valid for --outFile compilations */
2727 prepend?: boolean;
2728 /** True if it is intended that this reference form a circularity */
2729 circular?: boolean;
2730 }
2731 export enum WatchFileKind {
2732 FixedPollingInterval = 0,
2733 PriorityPollingInterval = 1,
2734 DynamicPriorityPolling = 2,
2735 UseFsEvents = 3,
2736 UseFsEventsOnParentDirectory = 4
2737 }
2738 export enum WatchDirectoryKind {
2739 UseFsEvents = 0,
2740 FixedPollingInterval = 1,
2741 DynamicPriorityPolling = 2
2742 }
2743 export enum PollingWatchKind {
2744 FixedInterval = 0,
2745 PriorityInterval = 1,
2746 DynamicPriority = 2
2747 }
2748 export type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined;
2749 export interface CompilerOptions {
2750 allowJs?: boolean;
2751 allowSyntheticDefaultImports?: boolean;
2752 allowUmdGlobalAccess?: boolean;
2753 allowUnreachableCode?: boolean;
2754 allowUnusedLabels?: boolean;
2755 alwaysStrict?: boolean;
2756 baseUrl?: string;
2757 charset?: string;
2758 checkJs?: boolean;
2759 declaration?: boolean;
2760 declarationMap?: boolean;
2761 emitDeclarationOnly?: boolean;
2762 declarationDir?: string;
2763 disableSizeLimit?: boolean;
2764 disableSourceOfProjectReferenceRedirect?: boolean;
2765 disableSolutionSearching?: boolean;
2766 disableReferencedProjectLoad?: boolean;
2767 downlevelIteration?: boolean;
2768 emitBOM?: boolean;
2769 emitDecoratorMetadata?: boolean;
2770 experimentalDecorators?: boolean;
2771 forceConsistentCasingInFileNames?: boolean;
2772 importHelpers?: boolean;
2773 importsNotUsedAsValues?: ImportsNotUsedAsValues;
2774 inlineSourceMap?: boolean;
2775 inlineSources?: boolean;
2776 isolatedModules?: boolean;
2777 jsx?: JsxEmit;
2778 keyofStringsOnly?: boolean;
2779 lib?: string[];
2780 locale?: string;
2781 mapRoot?: string;
2782 maxNodeModuleJsDepth?: number;
2783 module?: ModuleKind;
2784 moduleResolution?: ModuleResolutionKind;
2785 newLine?: NewLineKind;
2786 noEmit?: boolean;
2787 noEmitHelpers?: boolean;
2788 noEmitOnError?: boolean;
2789 noErrorTruncation?: boolean;
2790 noFallthroughCasesInSwitch?: boolean;
2791 noImplicitAny?: boolean;
2792 noImplicitReturns?: boolean;
2793 noImplicitThis?: boolean;
2794 noStrictGenericChecks?: boolean;
2795 noUnusedLocals?: boolean;
2796 noUnusedParameters?: boolean;
2797 noImplicitUseStrict?: boolean;
2798 assumeChangesOnlyAffectDirectDependencies?: boolean;
2799 noLib?: boolean;
2800 noResolve?: boolean;
2801 out?: string;
2802 outDir?: string;
2803 outFile?: string;
2804 paths?: MapLike<string[]>;
2805 preserveConstEnums?: boolean;
2806 preserveSymlinks?: boolean;
2807 project?: string;
2808 reactNamespace?: string;
2809 jsxFactory?: string;
2810 jsxFragmentFactory?: string;
2811 composite?: boolean;
2812 incremental?: boolean;
2813 tsBuildInfoFile?: string;
2814 removeComments?: boolean;
2815 rootDir?: string;
2816 rootDirs?: string[];
2817 skipLibCheck?: boolean;
2818 skipDefaultLibCheck?: boolean;
2819 sourceMap?: boolean;
2820 sourceRoot?: string;
2821 strict?: boolean;
2822 strictFunctionTypes?: boolean;
2823 strictBindCallApply?: boolean;
2824 strictNullChecks?: boolean;
2825 strictPropertyInitialization?: boolean;
2826 stripInternal?: boolean;
2827 suppressExcessPropertyErrors?: boolean;
2828 suppressImplicitAnyIndexErrors?: boolean;
2829 target?: ScriptTarget;
2830 traceResolution?: boolean;
2831 resolveJsonModule?: boolean;
2832 types?: string[];
2833 /** Paths used to compute primary types search locations */
2834 typeRoots?: string[];
2835 esModuleInterop?: boolean;
2836 useDefineForClassFields?: boolean;
2837 [option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined;
2838 }
2839 export interface WatchOptions {
2840 watchFile?: WatchFileKind;
2841 watchDirectory?: WatchDirectoryKind;
2842 fallbackPolling?: PollingWatchKind;
2843 synchronousWatchDirectory?: boolean;
2844 [option: string]: CompilerOptionsValue | undefined;
2845 }
2846 export interface TypeAcquisition {
2847 /**
2848 * @deprecated typingOptions.enableAutoDiscovery
2849 * Use typeAcquisition.enable instead.
2850 */
2851 enableAutoDiscovery?: boolean;
2852 enable?: boolean;
2853 include?: string[];
2854 exclude?: string[];
2855 [option: string]: string[] | boolean | undefined;
2856 }
2857 export enum ModuleKind {
2858 None = 0,
2859 CommonJS = 1,
2860 AMD = 2,
2861 UMD = 3,
2862 System = 4,
2863 ES2015 = 5,
2864 ES2020 = 6,
2865 ESNext = 99
2866 }
2867 export enum JsxEmit {
2868 None = 0,
2869 Preserve = 1,
2870 React = 2,
2871 ReactNative = 3
2872 }
2873 export enum ImportsNotUsedAsValues {
2874 Remove = 0,
2875 Preserve = 1,
2876 Error = 2
2877 }
2878 export enum NewLineKind {
2879 CarriageReturnLineFeed = 0,
2880 LineFeed = 1
2881 }
2882 export interface LineAndCharacter {
2883 /** 0-based. */
2884 line: number;
2885 character: number;
2886 }
2887 export enum ScriptKind {
2888 Unknown = 0,
2889 JS = 1,
2890 JSX = 2,
2891 TS = 3,
2892 TSX = 4,
2893 External = 5,
2894 JSON = 6,
2895 /**
2896 * Used on extensions that doesn't define the ScriptKind but the content defines it.
2897 * Deferred extensions are going to be included in all project contexts.
2898 */
2899 Deferred = 7
2900 }
2901 export enum ScriptTarget {
2902 ES3 = 0,
2903 ES5 = 1,
2904 ES2015 = 2,
2905 ES2016 = 3,
2906 ES2017 = 4,
2907 ES2018 = 5,
2908 ES2019 = 6,
2909 ES2020 = 7,
2910 ESNext = 99,
2911 JSON = 100,
2912 Latest = 99
2913 }
2914 export enum LanguageVariant {
2915 Standard = 0,
2916 JSX = 1
2917 }
2918 /** Either a parsed command line or a parsed tsconfig.json */
2919 export interface ParsedCommandLine {
2920 options: CompilerOptions;
2921 typeAcquisition?: TypeAcquisition;
2922 fileNames: string[];
2923 projectReferences?: readonly ProjectReference[];
2924 watchOptions?: WatchOptions;
2925 raw?: any;
2926 errors: Diagnostic[];
2927 wildcardDirectories?: MapLike<WatchDirectoryFlags>;
2928 compileOnSave?: boolean;
2929 }
2930 export enum WatchDirectoryFlags {
2931 None = 0,
2932 Recursive = 1
2933 }
2934 export interface ExpandResult {
2935 fileNames: string[];
2936 wildcardDirectories: MapLike<WatchDirectoryFlags>;
2937 }
2938 export interface CreateProgramOptions {
2939 rootNames: readonly string[];
2940 options: CompilerOptions;
2941 projectReferences?: readonly ProjectReference[];
2942 host?: CompilerHost;
2943 oldProgram?: Program;
2944 configFileParsingDiagnostics?: readonly Diagnostic[];
2945 }
2946 export interface ModuleResolutionHost {
2947 fileExists(fileName: string): boolean;
2948 readFile(fileName: string): string | undefined;
2949 trace?(s: string): void;
2950 directoryExists?(directoryName: string): boolean;
2951 /**
2952 * Resolve a symbolic link.
2953 * @see https://nodejs.org/api/fs.html#fs_fs_realpathsync_path_options
2954 */
2955 realpath?(path: string): string;
2956 getCurrentDirectory?(): string;
2957 getDirectories?(path: string): string[];
2958 }
2959 /**
2960 * Represents the result of module resolution.
2961 * Module resolution will pick up tsx/jsx/js files even if '--jsx' and '--allowJs' are turned off.
2962 * The Program will then filter results based on these flags.
2963 *
2964 * Prefer to return a `ResolvedModuleFull` so that the file type does not have to be inferred.
2965 */
2966 export interface ResolvedModule {
2967 /** Path of the file the module was resolved to. */
2968 resolvedFileName: string;
2969 /** True if `resolvedFileName` comes from `node_modules`. */
2970 isExternalLibraryImport?: boolean;
2971 }
2972 /**
2973 * ResolvedModule with an explicitly provided `extension` property.
2974 * Prefer this over `ResolvedModule`.
2975 * If changing this, remember to change `moduleResolutionIsEqualTo`.
2976 */
2977 export interface ResolvedModuleFull extends ResolvedModule {
2978 /**
2979 * Extension of resolvedFileName. This must match what's at the end of resolvedFileName.
2980 * This is optional for backwards-compatibility, but will be added if not provided.
2981 */
2982 extension: Extension;
2983 packageId?: PackageId;
2984 }
2985 /**
2986 * Unique identifier with a package name and version.
2987 * If changing this, remember to change `packageIdIsEqual`.
2988 */
2989 export interface PackageId {
2990 /**
2991 * Name of the package.
2992 * Should not include `@types`.
2993 * If accessing a non-index file, this should include its name e.g. "foo/bar".
2994 */
2995 name: string;
2996 /**
2997 * Name of a submodule within this package.
2998 * May be "".
2999 */
3000 subModuleName: string;
3001 /** Version of the package, e.g. "1.2.3" */
3002 version: string;
3003 }
3004 export enum Extension {
3005 Ts = ".ts",
3006 Tsx = ".tsx",
3007 Dts = ".d.ts",
3008 Js = ".js",
3009 Jsx = ".jsx",
3010 Json = ".json",
3011 TsBuildInfo = ".tsbuildinfo"
3012 }
3013 export interface ResolvedModuleWithFailedLookupLocations {
3014 readonly resolvedModule: ResolvedModuleFull | undefined;
3015 }
3016 export interface ResolvedTypeReferenceDirective {
3017 primary: boolean;
3018 resolvedFileName: string | undefined;
3019 packageId?: PackageId;
3020 /** True if `resolvedFileName` comes from `node_modules`. */
3021 isExternalLibraryImport?: boolean;
3022 }
3023 export interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations {
3024 readonly resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective | undefined;
3025 readonly failedLookupLocations: string[];
3026 }
3027 export interface CompilerHost extends ModuleResolutionHost {
3028 getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
3029 getSourceFileByPath?(fileName: string, path: Path, languageVersion: ScriptTarget, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
3030 getCancellationToken?(): CancellationToken;
3031 getDefaultLibFileName(options: CompilerOptions): string;
3032 getDefaultLibLocation?(): string;
3033 writeFile: WriteFileCallback;
3034 getCurrentDirectory(): string;
3035 getCanonicalFileName(fileName: string): string;
3036 useCaseSensitiveFileNames(): boolean;
3037 getNewLine(): string;
3038 readDirectory?(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): string[];
3039 resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedModule | undefined)[];
3040 /**
3041 * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files
3042 */
3043 resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[];
3044 getEnvironmentVariable?(name: string): string | undefined;
3045 createHash?(data: string): string;
3046 getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
3047 }
3048 export interface SourceMapRange extends TextRange {
3049 source?: SourceMapSource;
3050 }
3051 export interface SourceMapSource {
3052 fileName: string;
3053 text: string;
3054 skipTrivia?: (pos: number) => number;
3055 }
3056 export enum EmitFlags {
3057 None = 0,
3058 SingleLine = 1,
3059 AdviseOnEmitNode = 2,
3060 NoSubstitution = 4,
3061 CapturesThis = 8,
3062 NoLeadingSourceMap = 16,
3063 NoTrailingSourceMap = 32,
3064 NoSourceMap = 48,
3065 NoNestedSourceMaps = 64,
3066 NoTokenLeadingSourceMaps = 128,
3067 NoTokenTrailingSourceMaps = 256,
3068 NoTokenSourceMaps = 384,
3069 NoLeadingComments = 512,
3070 NoTrailingComments = 1024,
3071 NoComments = 1536,
3072 NoNestedComments = 2048,
3073 HelperName = 4096,
3074 ExportName = 8192,
3075 LocalName = 16384,
3076 InternalName = 32768,
3077 Indented = 65536,
3078 NoIndentation = 131072,
3079 AsyncFunctionBody = 262144,
3080 ReuseTempVariableScope = 524288,
3081 CustomPrologue = 1048576,
3082 NoHoisting = 2097152,
3083 HasEndOfDeclarationMarker = 4194304,
3084 Iterator = 8388608,
3085 NoAsciiEscaping = 16777216,
3086 }
3087 export interface EmitHelper {
3088 readonly name: string;
3089 readonly scoped: boolean;
3090 readonly text: string | ((node: EmitHelperUniqueNameCallback) => string);
3091 readonly priority?: number;
3092 readonly dependencies?: EmitHelper[];
3093 }
3094 export interface UnscopedEmitHelper extends EmitHelper {
3095 readonly scoped: false;
3096 readonly text: string;
3097 }
3098 export type EmitHelperUniqueNameCallback = (name: string) => string;
3099 export enum EmitHint {
3100 SourceFile = 0,
3101 Expression = 1,
3102 IdentifierName = 2,
3103 MappedTypeParameter = 3,
3104 Unspecified = 4,
3105 EmbeddedStatement = 5,
3106 JsxAttributeValue = 6
3107 }
3108 export enum OuterExpressionKinds {
3109 Parentheses = 1,
3110 TypeAssertions = 2,
3111 NonNullAssertions = 4,
3112 PartiallyEmittedExpressions = 8,
3113 Assertions = 6,
3114 All = 15
3115 }
3116 export type TypeOfTag = "undefined" | "number" | "bigint" | "boolean" | "string" | "symbol" | "object" | "function";
3117 export interface NodeFactory {
3118 createNodeArray<T extends Node>(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray<T>;
3119 createNumericLiteral(value: string | number, numericLiteralFlags?: TokenFlags): NumericLiteral;
3120 createBigIntLiteral(value: string | PseudoBigInt): BigIntLiteral;
3121 createStringLiteral(text: string, isSingleQuote?: boolean): StringLiteral;
3122 createStringLiteralFromNode(sourceNode: PropertyNameLiteral, isSingleQuote?: boolean): StringLiteral;
3123 createRegularExpressionLiteral(text: string): RegularExpressionLiteral;
3124 createIdentifier(text: string): Identifier;
3125 /** Create a unique temporary variable. */
3126 createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined): Identifier;
3127 /** Create a unique temporary variable for use in a loop. */
3128 createLoopVariable(): Identifier;
3129 /** Create a unique name based on the supplied text. */
3130 createUniqueName(text: string, flags?: GeneratedIdentifierFlags): Identifier;
3131 /** Create a unique name generated for a node. */
3132 getGeneratedNameForNode(node: Node | undefined): Identifier;
3133 createPrivateIdentifier(text: string): PrivateIdentifier;
3134 createToken(token: SyntaxKind.SuperKeyword): SuperExpression;
3135 createToken(token: SyntaxKind.ThisKeyword): ThisExpression;
3136 createToken(token: SyntaxKind.NullKeyword): NullLiteral;
3137 createToken(token: SyntaxKind.TrueKeyword): TrueLiteral;
3138 createToken(token: SyntaxKind.FalseKeyword): FalseLiteral;
3139 createToken<TKind extends PunctuationSyntaxKind>(token: TKind): PunctuationToken<TKind>;
3140 createToken<TKind extends KeywordTypeSyntaxKind>(token: TKind): KeywordTypeNode<TKind>;
3141 createToken<TKind extends ModifierSyntaxKind>(token: TKind): ModifierToken<TKind>;
3142 createToken<TKind extends KeywordSyntaxKind>(token: TKind): KeywordToken<TKind>;
3143 createToken<TKind extends SyntaxKind.Unknown | SyntaxKind.EndOfFileToken>(token: TKind): Token<TKind>;
3144 createSuper(): SuperExpression;
3145 createThis(): ThisExpression;
3146 createNull(): NullLiteral;
3147 createTrue(): TrueLiteral;
3148 createFalse(): FalseLiteral;
3149 createModifier<T extends ModifierSyntaxKind>(kind: T): ModifierToken<T>;
3150 createModifiersFromModifierFlags(flags: ModifierFlags): Modifier[];
3151 createQualifiedName(left: EntityName, right: string | Identifier): QualifiedName;
3152 updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName;
3153 createComputedPropertyName(expression: Expression): ComputedPropertyName;
3154 updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName;
3155 createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration;
3156 updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
3157 createParameterDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration;
3158 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;
3159 createDecorator(expression: Expression): Decorator;
3160 updateDecorator(node: Decorator, expression: Expression): Decorator;
3161 createPropertySignature(modifiers: readonly Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined): PropertySignature;
3162 updatePropertySignature(node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined): PropertySignature;
3163 createPropertyDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
3164 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;
3165 createMethodSignature(modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): MethodSignature;
3166 updateMethodSignature(node: MethodSignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): MethodSignature;
3167 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;
3168 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;
3169 createConstructorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
3170 updateConstructorDeclaration(node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
3171 createGetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
3172 updateGetAccessorDeclaration(node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
3173 createSetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
3174 updateSetAccessorDeclaration(node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
3175 createCallSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): CallSignatureDeclaration;
3176 updateCallSignature(node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): CallSignatureDeclaration;
3177 createConstructSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): ConstructSignatureDeclaration;
3178 updateConstructSignature(node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructSignatureDeclaration;
3179 createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
3180 updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
3181 createKeywordTypeNode<TKind extends KeywordTypeSyntaxKind>(kind: TKind): KeywordTypeNode<TKind>;
3182 createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode;
3183 updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode;
3184 createTypeReferenceNode(typeName: string | EntityName, typeArguments?: readonly TypeNode[]): TypeReferenceNode;
3185 updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined): TypeReferenceNode;
3186 createFunctionTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): FunctionTypeNode;
3187 updateFunctionTypeNode(node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): FunctionTypeNode;
3188 createConstructorTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode;
3189 updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode): ConstructorTypeNode;
3190 createTypeQueryNode(exprName: EntityName): TypeQueryNode;
3191 updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName): TypeQueryNode;
3192 createTypeLiteralNode(members: readonly TypeElement[] | undefined): TypeLiteralNode;
3193 updateTypeLiteralNode(node: TypeLiteralNode, members: NodeArray<TypeElement>): TypeLiteralNode;
3194 createArrayTypeNode(elementType: TypeNode): ArrayTypeNode;
3195 updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode;
3196 createTupleTypeNode(elements: readonly (TypeNode | NamedTupleMember)[]): TupleTypeNode;
3197 updateTupleTypeNode(node: TupleTypeNode, elements: readonly (TypeNode | NamedTupleMember)[]): TupleTypeNode;
3198 createNamedTupleMember(dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember;
3199 updateNamedTupleMember(node: NamedTupleMember, dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember;
3200 createOptionalTypeNode(type: TypeNode): OptionalTypeNode;
3201 updateOptionalTypeNode(node: OptionalTypeNode, type: TypeNode): OptionalTypeNode;
3202 createRestTypeNode(type: TypeNode): RestTypeNode;
3203 updateRestTypeNode(node: RestTypeNode, type: TypeNode): RestTypeNode;
3204 createUnionTypeNode(types: readonly TypeNode[]): UnionTypeNode;
3205 updateUnionTypeNode(node: UnionTypeNode, types: NodeArray<TypeNode>): UnionTypeNode;
3206 createIntersectionTypeNode(types: readonly TypeNode[]): IntersectionTypeNode;
3207 updateIntersectionTypeNode(node: IntersectionTypeNode, types: NodeArray<TypeNode>): IntersectionTypeNode;
3208 createConditionalTypeNode(checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode;
3209 updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode;
3210 createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode;
3211 updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode;
3212 createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode;
3213 updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode;
3214 createParenthesizedType(type: TypeNode): ParenthesizedTypeNode;
3215 updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode;
3216 createThisTypeNode(): ThisTypeNode;
3217 createTypeOperatorNode(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode;
3218 updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode;
3219 createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
3220 updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
3221 createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode;
3222 updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode;
3223 createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode;
3224 updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]): LiteralTypeNode;
3225 createObjectBindingPattern(elements: readonly BindingElement[]): ObjectBindingPattern;
3226 updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]): ObjectBindingPattern;
3227 createArrayBindingPattern(elements: readonly ArrayBindingElement[]): ArrayBindingPattern;
3228 updateArrayBindingPattern(node: ArrayBindingPattern, elements: readonly ArrayBindingElement[]): ArrayBindingPattern;
3229 createBindingElement(dotDotDotToken: DotDotDotToken | undefined, propertyName: string | PropertyName | undefined, name: string | BindingName, initializer?: Expression): BindingElement;
3230 updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, initializer: Expression | undefined): BindingElement;
3231 createArrayLiteralExpression(elements?: readonly Expression[], multiLine?: boolean): ArrayLiteralExpression;
3232 updateArrayLiteralExpression(node: ArrayLiteralExpression, elements: readonly Expression[]): ArrayLiteralExpression;
3233 createObjectLiteralExpression(properties?: readonly ObjectLiteralElementLike[], multiLine?: boolean): ObjectLiteralExpression;
3234 updateObjectLiteralExpression(node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]): ObjectLiteralExpression;
3235 createPropertyAccessExpression(expression: Expression, name: string | Identifier | PrivateIdentifier): PropertyAccessExpression;
3236 updatePropertyAccessExpression(node: PropertyAccessExpression, expression: Expression, name: Identifier | PrivateIdentifier): PropertyAccessExpression;
3237 createPropertyAccessChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, name: string | Identifier | PrivateIdentifier): PropertyAccessChain;
3238 updatePropertyAccessChain(node: PropertyAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: Identifier | PrivateIdentifier): PropertyAccessChain;
3239 createElementAccessExpression(expression: Expression, index: number | Expression): ElementAccessExpression;
3240 updateElementAccessExpression(node: ElementAccessExpression, expression: Expression, argumentExpression: Expression): ElementAccessExpression;
3241 createElementAccessChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, index: number | Expression): ElementAccessChain;
3242 updateElementAccessChain(node: ElementAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression): ElementAccessChain;
3243 createCallExpression(expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): CallExpression;
3244 updateCallExpression(node: CallExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]): CallExpression;
3245 createCallChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): CallChain;
3246 updateCallChain(node: CallChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]): CallChain;
3247 createNewExpression(expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): NewExpression;
3248 updateNewExpression(node: NewExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): NewExpression;
3249 createTaggedTemplateExpression(tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression;
3250 updateTaggedTemplateExpression(node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression;
3251 createTypeAssertion(type: TypeNode, expression: Expression): TypeAssertion;
3252 updateTypeAssertion(node: TypeAssertion, type: TypeNode, expression: Expression): TypeAssertion;
3253 createParenthesizedExpression(expression: Expression): ParenthesizedExpression;
3254 updateParenthesizedExpression(node: ParenthesizedExpression, expression: Expression): ParenthesizedExpression;
3255 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;
3256 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;
3257 createArrowFunction(modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction;
3258 updateArrowFunction(node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction;
3259 createDeleteExpression(expression: Expression): DeleteExpression;
3260 updateDeleteExpression(node: DeleteExpression, expression: Expression): DeleteExpression;
3261 createTypeOfExpression(expression: Expression): TypeOfExpression;
3262 updateTypeOfExpression(node: TypeOfExpression, expression: Expression): TypeOfExpression;
3263 createVoidExpression(expression: Expression): VoidExpression;
3264 updateVoidExpression(node: VoidExpression, expression: Expression): VoidExpression;
3265 createAwaitExpression(expression: Expression): AwaitExpression;
3266 updateAwaitExpression(node: AwaitExpression, expression: Expression): AwaitExpression;
3267 createPrefixUnaryExpression(operator: PrefixUnaryOperator, operand: Expression): PrefixUnaryExpression;
3268 updatePrefixUnaryExpression(node: PrefixUnaryExpression, operand: Expression): PrefixUnaryExpression;
3269 createPostfixUnaryExpression(operand: Expression, operator: PostfixUnaryOperator): PostfixUnaryExpression;
3270 updatePostfixUnaryExpression(node: PostfixUnaryExpression, operand: Expression): PostfixUnaryExpression;
3271 createBinaryExpression(left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression;
3272 updateBinaryExpression(node: BinaryExpression, left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression;
3273 createConditionalExpression(condition: Expression, questionToken: QuestionToken | undefined, whenTrue: Expression, colonToken: ColonToken | undefined, whenFalse: Expression): ConditionalExpression;
3274 updateConditionalExpression(node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression;
3275 createTemplateExpression(head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression;
3276 updateTemplateExpression(node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression;
3277 createTemplateHead(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateHead;
3278 createTemplateHead(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateHead;
3279 createTemplateMiddle(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateMiddle;
3280 createTemplateMiddle(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateMiddle;
3281 createTemplateTail(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateTail;
3282 createTemplateTail(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateTail;
3283 createNoSubstitutionTemplateLiteral(text: string, rawText?: string): NoSubstitutionTemplateLiteral;
3284 createNoSubstitutionTemplateLiteral(text: string | undefined, rawText: string): NoSubstitutionTemplateLiteral;
3285 createYieldExpression(asteriskToken: AsteriskToken, expression: Expression): YieldExpression;
3286 createYieldExpression(asteriskToken: undefined, expression: Expression | undefined): YieldExpression;
3287 updateYieldExpression(node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression | undefined): YieldExpression;
3288 createSpreadElement(expression: Expression): SpreadElement;
3289 updateSpreadElement(node: SpreadElement, expression: Expression): SpreadElement;
3290 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;
3291 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;
3292 createOmittedExpression(): OmittedExpression;
3293 createExpressionWithTypeArguments(expression: Expression, typeArguments: readonly TypeNode[] | undefined): ExpressionWithTypeArguments;
3294 updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, expression: Expression, typeArguments: readonly TypeNode[] | undefined): ExpressionWithTypeArguments;
3295 createAsExpression(expression: Expression, type: TypeNode): AsExpression;
3296 updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression;
3297 createNonNullExpression(expression: Expression): NonNullExpression;
3298 updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression;
3299 createNonNullChain(expression: Expression): NonNullChain;
3300 updateNonNullChain(node: NonNullChain, expression: Expression): NonNullChain;
3301 createMetaProperty(keywordToken: MetaProperty["keywordToken"], name: Identifier): MetaProperty;
3302 updateMetaProperty(node: MetaProperty, name: Identifier): MetaProperty;
3303 createTemplateSpan(expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
3304 updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
3305 createSemicolonClassElement(): SemicolonClassElement;
3306 createBlock(statements: readonly Statement[], multiLine?: boolean): Block;
3307 updateBlock(node: Block, statements: readonly Statement[]): Block;
3308 createVariableStatement(modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList | readonly VariableDeclaration[]): VariableStatement;
3309 updateVariableStatement(node: VariableStatement, modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList): VariableStatement;
3310 createEmptyStatement(): EmptyStatement;
3311 createExpressionStatement(expression: Expression): ExpressionStatement;
3312 updateExpressionStatement(node: ExpressionStatement, expression: Expression): ExpressionStatement;
3313 createIfStatement(expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement;
3314 updateIfStatement(node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined): IfStatement;
3315 createDoStatement(statement: Statement, expression: Expression): DoStatement;
3316 updateDoStatement(node: DoStatement, statement: Statement, expression: Expression): DoStatement;
3317 createWhileStatement(expression: Expression, statement: Statement): WhileStatement;
3318 updateWhileStatement(node: WhileStatement, expression: Expression, statement: Statement): WhileStatement;
3319 createForStatement(initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
3320 updateForStatement(node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
3321 createForInStatement(initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement;
3322 updateForInStatement(node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement;
3323 createForOfStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
3324 updateForOfStatement(node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
3325 createContinueStatement(label?: string | Identifier): ContinueStatement;
3326 updateContinueStatement(node: ContinueStatement, label: Identifier | undefined): ContinueStatement;
3327 createBreakStatement(label?: string | Identifier): BreakStatement;
3328 updateBreakStatement(node: BreakStatement, label: Identifier | undefined): BreakStatement;
3329 createReturnStatement(expression?: Expression): ReturnStatement;
3330 updateReturnStatement(node: ReturnStatement, expression: Expression | undefined): ReturnStatement;
3331 createWithStatement(expression: Expression, statement: Statement): WithStatement;
3332 updateWithStatement(node: WithStatement, expression: Expression, statement: Statement): WithStatement;
3333 createSwitchStatement(expression: Expression, caseBlock: CaseBlock): SwitchStatement;
3334 updateSwitchStatement(node: SwitchStatement, expression: Expression, caseBlock: CaseBlock): SwitchStatement;
3335 createLabeledStatement(label: string | Identifier, statement: Statement): LabeledStatement;
3336 updateLabeledStatement(node: LabeledStatement, label: Identifier, statement: Statement): LabeledStatement;
3337 createThrowStatement(expression: Expression): ThrowStatement;
3338 updateThrowStatement(node: ThrowStatement, expression: Expression): ThrowStatement;
3339 createTryStatement(tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement;
3340 updateTryStatement(node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement;
3341 createDebuggerStatement(): DebuggerStatement;
3342 createVariableDeclaration(name: string | BindingName, exclamationToken?: ExclamationToken, type?: TypeNode, initializer?: Expression): VariableDeclaration;
3343 updateVariableDeclaration(node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
3344 createVariableDeclarationList(declarations: readonly VariableDeclaration[], flags?: NodeFlags): VariableDeclarationList;
3345 updateVariableDeclarationList(node: VariableDeclarationList, declarations: readonly VariableDeclaration[]): VariableDeclarationList;
3346 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;
3347 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;
3348 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;
3349 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;
3350 createInterfaceDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration;
3351 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;
3352 createTypeAliasDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
3353 updateTypeAliasDeclaration(node: TypeAliasDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
3354 createEnumDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration;
3355 updateEnumDeclaration(node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration;
3356 createModuleDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration;
3357 updateModuleDeclaration(node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration;
3358 createModuleBlock(statements: readonly Statement[]): ModuleBlock;
3359 updateModuleBlock(node: ModuleBlock, statements: readonly Statement[]): ModuleBlock;
3360 createCaseBlock(clauses: readonly CaseOrDefaultClause[]): CaseBlock;
3361 updateCaseBlock(node: CaseBlock, clauses: readonly CaseOrDefaultClause[]): CaseBlock;
3362 createNamespaceExportDeclaration(name: string | Identifier): NamespaceExportDeclaration;
3363 updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, name: Identifier): NamespaceExportDeclaration;
3364 createImportEqualsDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
3365 updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
3366 createImportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression): ImportDeclaration;
3367 updateImportDeclaration(node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression): ImportDeclaration;
3368 createImportClause(isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
3369 updateImportClause(node: ImportClause, isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
3370 createNamespaceImport(name: Identifier): NamespaceImport;
3371 updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
3372 createNamespaceExport(name: Identifier): NamespaceExport;
3373 updateNamespaceExport(node: NamespaceExport, name: Identifier): NamespaceExport;
3374 createNamedImports(elements: readonly ImportSpecifier[]): NamedImports;
3375 updateNamedImports(node: NamedImports, elements: readonly ImportSpecifier[]): NamedImports;
3376 createImportSpecifier(propertyName: Identifier | undefined, name: Identifier): ImportSpecifier;
3377 updateImportSpecifier(node: ImportSpecifier, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier;
3378 createExportAssignment(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment;
3379 updateExportAssignment(node: ExportAssignment, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment;
3380 createExportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression): ExportDeclaration;
3381 updateExportDeclaration(node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined): ExportDeclaration;
3382 createNamedExports(elements: readonly ExportSpecifier[]): NamedExports;
3383 updateNamedExports(node: NamedExports, elements: readonly ExportSpecifier[]): NamedExports;
3384 createExportSpecifier(propertyName: string | Identifier | undefined, name: string | Identifier): ExportSpecifier;
3385 updateExportSpecifier(node: ExportSpecifier, propertyName: Identifier | undefined, name: Identifier): ExportSpecifier;
3386 createExternalModuleReference(expression: Expression): ExternalModuleReference;
3387 updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference;
3388 createJSDocAllType(): JSDocAllType;
3389 createJSDocUnknownType(): JSDocUnknownType;
3390 createJSDocNonNullableType(type: TypeNode): JSDocNonNullableType;
3391 updateJSDocNonNullableType(node: JSDocNonNullableType, type: TypeNode): JSDocNonNullableType;
3392 createJSDocNullableType(type: TypeNode): JSDocNullableType;
3393 updateJSDocNullableType(node: JSDocNullableType, type: TypeNode): JSDocNullableType;
3394 createJSDocOptionalType(type: TypeNode): JSDocOptionalType;
3395 updateJSDocOptionalType(node: JSDocOptionalType, type: TypeNode): JSDocOptionalType;
3396 createJSDocFunctionType(parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): JSDocFunctionType;
3397 updateJSDocFunctionType(node: JSDocFunctionType, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): JSDocFunctionType;
3398 createJSDocVariadicType(type: TypeNode): JSDocVariadicType;
3399 updateJSDocVariadicType(node: JSDocVariadicType, type: TypeNode): JSDocVariadicType;
3400 createJSDocNamepathType(type: TypeNode): JSDocNamepathType;
3401 updateJSDocNamepathType(node: JSDocNamepathType, type: TypeNode): JSDocNamepathType;
3402 createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression;
3403 updateJSDocTypeExpression(node: JSDocTypeExpression, type: TypeNode): JSDocTypeExpression;
3404 createJSDocTypeLiteral(jsDocPropertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral;
3405 updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsDocPropertyTags: readonly JSDocPropertyLikeTag[] | undefined, isArrayType: boolean | undefined): JSDocTypeLiteral;
3406 createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature;
3407 updateJSDocSignature(node: JSDocSignature, typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type: JSDocReturnTag | undefined): JSDocSignature;
3408 createJSDocTemplateTag(tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string): JSDocTemplateTag;
3409 updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment: string | undefined): JSDocTemplateTag;
3410 createJSDocTypedefTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | JSDocTypeLiteral, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string): JSDocTypedefTag;
3411 updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | JSDocTypeLiteral | undefined, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | undefined): JSDocTypedefTag;
3412 createJSDocParameterTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string): JSDocParameterTag;
3413 updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | undefined): JSDocParameterTag;
3414 createJSDocPropertyTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string): JSDocPropertyTag;
3415 updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | undefined): JSDocPropertyTag;
3416 createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocTypeTag;
3417 updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocTypeTag;
3418 createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocReturnTag;
3419 updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocReturnTag;
3420 createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocThisTag;
3421 updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocThisTag;
3422 createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocEnumTag;
3423 updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocEnumTag;
3424 createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string): JSDocCallbackTag;
3425 updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | undefined): JSDocCallbackTag;
3426 createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string): JSDocAugmentsTag;
3427 updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment: string | undefined): JSDocAugmentsTag;
3428 createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string): JSDocImplementsTag;
3429 updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment: string | undefined): JSDocImplementsTag;
3430 createJSDocAuthorTag(tagName: Identifier | undefined, comment?: string): JSDocAuthorTag;
3431 updateJSDocAuthorTag(node: JSDocAuthorTag, tagName: Identifier | undefined, comment: string | undefined): JSDocAuthorTag;
3432 createJSDocClassTag(tagName: Identifier | undefined, comment?: string): JSDocClassTag;
3433 updateJSDocClassTag(node: JSDocClassTag, tagName: Identifier | undefined, comment: string | undefined): JSDocClassTag;
3434 createJSDocPublicTag(tagName: Identifier | undefined, comment?: string): JSDocPublicTag;
3435 updateJSDocPublicTag(node: JSDocPublicTag, tagName: Identifier | undefined, comment: string | undefined): JSDocPublicTag;
3436 createJSDocPrivateTag(tagName: Identifier | undefined, comment?: string): JSDocPrivateTag;
3437 updateJSDocPrivateTag(node: JSDocPrivateTag, tagName: Identifier | undefined, comment: string | undefined): JSDocPrivateTag;
3438 createJSDocProtectedTag(tagName: Identifier | undefined, comment?: string): JSDocProtectedTag;
3439 updateJSDocProtectedTag(node: JSDocProtectedTag, tagName: Identifier | undefined, comment: string | undefined): JSDocProtectedTag;
3440 createJSDocReadonlyTag(tagName: Identifier | undefined, comment?: string): JSDocReadonlyTag;
3441 updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier | undefined, comment: string | undefined): JSDocReadonlyTag;
3442 createJSDocUnknownTag(tagName: Identifier, comment?: string): JSDocUnknownTag;
3443 updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | undefined): JSDocUnknownTag;
3444 createJSDocDeprecatedTag(tagName: Identifier, comment?: string): JSDocDeprecatedTag;
3445 updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: string): JSDocDeprecatedTag;
3446 createJSDocComment(comment?: string | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc;
3447 updateJSDocComment(node: JSDoc, comment: string | undefined, tags: readonly JSDocTag[] | undefined): JSDoc;
3448 createJsxElement(openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement;
3449 updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement;
3450 createJsxSelfClosingElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement;
3451 updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement;
3452 createJsxOpeningElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement;
3453 updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement;
3454 createJsxClosingElement(tagName: JsxTagNameExpression): JsxClosingElement;
3455 updateJsxClosingElement(node: JsxClosingElement, tagName: JsxTagNameExpression): JsxClosingElement;
3456 createJsxFragment(openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
3457 createJsxText(text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText;
3458 updateJsxText(node: JsxText, text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText;
3459 createJsxOpeningFragment(): JsxOpeningFragment;
3460 createJsxJsxClosingFragment(): JsxClosingFragment;
3461 updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
3462 createJsxAttribute(name: Identifier, initializer: StringLiteral | JsxExpression | undefined): JsxAttribute;
3463 updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression | undefined): JsxAttribute;
3464 createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes;
3465 updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes;
3466 createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
3467 updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute;
3468 createJsxExpression(dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined): JsxExpression;
3469 updateJsxExpression(node: JsxExpression, expression: Expression | undefined): JsxExpression;
3470 createCaseClause(expression: Expression, statements: readonly Statement[]): CaseClause;
3471 updateCaseClause(node: CaseClause, expression: Expression, statements: readonly Statement[]): CaseClause;
3472 createDefaultClause(statements: readonly Statement[]): DefaultClause;
3473 updateDefaultClause(node: DefaultClause, statements: readonly Statement[]): DefaultClause;
3474 createHeritageClause(token: HeritageClause["token"], types: readonly ExpressionWithTypeArguments[]): HeritageClause;
3475 updateHeritageClause(node: HeritageClause, types: readonly ExpressionWithTypeArguments[]): HeritageClause;
3476 createCatchClause(variableDeclaration: string | VariableDeclaration | undefined, block: Block): CatchClause;
3477 updateCatchClause(node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block): CatchClause;
3478 createPropertyAssignment(name: string | PropertyName, initializer: Expression): PropertyAssignment;
3479 updatePropertyAssignment(node: PropertyAssignment, name: PropertyName, initializer: Expression): PropertyAssignment;
3480 createShorthandPropertyAssignment(name: string | Identifier, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment;
3481 updateShorthandPropertyAssignment(node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression | undefined): ShorthandPropertyAssignment;
3482 createSpreadAssignment(expression: Expression): SpreadAssignment;
3483 updateSpreadAssignment(node: SpreadAssignment, expression: Expression): SpreadAssignment;
3484 createEnumMember(name: string | PropertyName, initializer?: Expression): EnumMember;
3485 updateEnumMember(node: EnumMember, name: PropertyName, initializer: Expression | undefined): EnumMember;
3486 createSourceFile(statements: readonly Statement[], endOfFileToken: EndOfFileToken, flags: NodeFlags): SourceFile;
3487 updateSourceFile(node: SourceFile, statements: readonly Statement[], isDeclarationFile?: boolean, referencedFiles?: readonly FileReference[], typeReferences?: readonly FileReference[], hasNoDefaultLib?: boolean, libReferences?: readonly FileReference[]): SourceFile;
3488 createNotEmittedStatement(original: Node): NotEmittedStatement;
3489 createPartiallyEmittedExpression(expression: Expression, original?: Node): PartiallyEmittedExpression;
3490 updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression;
3491 createCommaListExpression(elements: readonly Expression[]): CommaListExpression;
3492 updateCommaListExpression(node: CommaListExpression, elements: readonly Expression[]): CommaListExpression;
3493 createBundle(sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
3494 updateBundle(node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
3495 createComma(left: Expression, right: Expression): BinaryExpression;
3496 createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment;
3497 createAssignment(left: Expression, right: Expression): AssignmentExpression<EqualsToken>;
3498 createLogicalOr(left: Expression, right: Expression): BinaryExpression;
3499 createLogicalAnd(left: Expression, right: Expression): BinaryExpression;
3500 createBitwiseOr(left: Expression, right: Expression): BinaryExpression;
3501 createBitwiseXor(left: Expression, right: Expression): BinaryExpression;
3502 createBitwiseAnd(left: Expression, right: Expression): BinaryExpression;
3503 createStrictEquality(left: Expression, right: Expression): BinaryExpression;
3504 createStrictInequality(left: Expression, right: Expression): BinaryExpression;
3505 createEquality(left: Expression, right: Expression): BinaryExpression;
3506 createInequality(left: Expression, right: Expression): BinaryExpression;
3507 createLessThan(left: Expression, right: Expression): BinaryExpression;
3508 createLessThanEquals(left: Expression, right: Expression): BinaryExpression;
3509 createGreaterThan(left: Expression, right: Expression): BinaryExpression;
3510 createGreaterThanEquals(left: Expression, right: Expression): BinaryExpression;
3511 createLeftShift(left: Expression, right: Expression): BinaryExpression;
3512 createRightShift(left: Expression, right: Expression): BinaryExpression;
3513 createUnsignedRightShift(left: Expression, right: Expression): BinaryExpression;
3514 createAdd(left: Expression, right: Expression): BinaryExpression;
3515 createSubtract(left: Expression, right: Expression): BinaryExpression;
3516 createMultiply(left: Expression, right: Expression): BinaryExpression;
3517 createDivide(left: Expression, right: Expression): BinaryExpression;
3518 createModulo(left: Expression, right: Expression): BinaryExpression;
3519 createExponent(left: Expression, right: Expression): BinaryExpression;
3520 createPrefixPlus(operand: Expression): PrefixUnaryExpression;
3521 createPrefixMinus(operand: Expression): PrefixUnaryExpression;
3522 createPrefixIncrement(operand: Expression): PrefixUnaryExpression;
3523 createPrefixDecrement(operand: Expression): PrefixUnaryExpression;
3524 createBitwiseNot(operand: Expression): PrefixUnaryExpression;
3525 createLogicalNot(operand: Expression): PrefixUnaryExpression;
3526 createPostfixIncrement(operand: Expression): PostfixUnaryExpression;
3527 createPostfixDecrement(operand: Expression): PostfixUnaryExpression;
3528 createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): CallExpression;
3529 createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
3530 createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): CallExpression;
3531 createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
3532 createVoidZero(): VoidExpression;
3533 createExportDefault(expression: Expression): ExportAssignment;
3534 createExternalModuleExport(exportName: Identifier): ExportDeclaration;
3535 restoreOuterExpressions(outerExpression: Expression | undefined, innerExpression: Expression, kinds?: OuterExpressionKinds): Expression;
3536 }
3537 export interface CoreTransformationContext {
3538 readonly factory: NodeFactory;
3539 /** Gets the compiler options supplied to the transformer. */
3540 getCompilerOptions(): CompilerOptions;
3541 /** Starts a new lexical environment. */
3542 startLexicalEnvironment(): void;
3543 /** Suspends the current lexical environment, usually after visiting a parameter list. */
3544 suspendLexicalEnvironment(): void;
3545 /** Resumes a suspended lexical environment, usually before visiting a function body. */
3546 resumeLexicalEnvironment(): void;
3547 /** Ends a lexical environment, returning any declarations. */
3548 endLexicalEnvironment(): Statement[] | undefined;
3549 /** Hoists a function declaration to the containing scope. */
3550 hoistFunctionDeclaration(node: FunctionDeclaration): void;
3551 /** Hoists a variable declaration to the containing scope. */
3552 hoistVariableDeclaration(node: Identifier): void;
3553 }
3554 export interface TransformationContext extends CoreTransformationContext {
3555 /** Records a request for a non-scoped emit helper in the current context. */
3556 requestEmitHelper(helper: EmitHelper): void;
3557 /** Gets and resets the requested non-scoped emit helpers. */
3558 readEmitHelpers(): EmitHelper[] | undefined;
3559 /** Enables expression substitutions in the pretty printer for the provided SyntaxKind. */
3560 enableSubstitution(kind: SyntaxKind): void;
3561 /** Determines whether expression substitutions are enabled for the provided node. */
3562 isSubstitutionEnabled(node: Node): boolean;
3563 /**
3564 * Hook used by transformers to substitute expressions just before they
3565 * are emitted by the pretty printer.
3566 *
3567 * NOTE: Transformation hooks should only be modified during `Transformer` initialization,
3568 * before returning the `NodeTransformer` callback.
3569 */
3570 onSubstituteNode: (hint: EmitHint, node: Node) => Node;
3571 /**
3572 * Enables before/after emit notifications in the pretty printer for the provided
3573 * SyntaxKind.
3574 */
3575 enableEmitNotification(kind: SyntaxKind): void;
3576 /**
3577 * Determines whether before/after emit notifications should be raised in the pretty
3578 * printer when it emits a node.
3579 */
3580 isEmitNotificationEnabled(node: Node): boolean;
3581 /**
3582 * Hook used to allow transformers to capture state before or after
3583 * the printer emits a node.
3584 *
3585 * NOTE: Transformation hooks should only be modified during `Transformer` initialization,
3586 * before returning the `NodeTransformer` callback.
3587 */
3588 onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void;
3589 }
3590 export interface TransformationResult<T extends Node> {
3591 /** Gets the transformed source files. */
3592 transformed: T[];
3593 /** Gets diagnostics for the transformation. */
3594 diagnostics?: DiagnosticWithLocation[];
3595 /**
3596 * Gets a substitute for a node, if one is available; otherwise, returns the original node.
3597 *
3598 * @param hint A hint as to the intended usage of the node.
3599 * @param node The node to substitute.
3600 */
3601 substituteNode(hint: EmitHint, node: Node): Node;
3602 /**
3603 * Emits a node with possible notification.
3604 *
3605 * @param hint A hint as to the intended usage of the node.
3606 * @param node The node to emit.
3607 * @param emitCallback A callback used to emit the node.
3608 */
3609 emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void;
3610 /**
3611 * Indicates if a given node needs an emit notification
3612 *
3613 * @param node The node to emit.
3614 */
3615 isEmitNotificationEnabled?(node: Node): boolean;
3616 /**
3617 * Clean up EmitNode entries on any parse-tree nodes.
3618 */
3619 dispose(): void;
3620 }
3621 /**
3622 * A function that is used to initialize and return a `Transformer` callback, which in turn
3623 * will be used to transform one or more nodes.
3624 */
3625 export type TransformerFactory<T extends Node> = (context: TransformationContext) => Transformer<T>;
3626 /**
3627 * A function that transforms a node.
3628 */
3629 export type Transformer<T extends Node> = (node: T) => T;
3630 /**
3631 * A function that accepts and possibly transforms a node.
3632 */
3633 export type Visitor = (node: Node) => VisitResult<Node>;
3634 export interface NodeVisitor {
3635 <T extends Node>(nodes: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T;
3636 <T extends Node>(nodes: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T | undefined;
3637 }
3638 export interface NodesVisitor {
3639 <T extends Node>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>;
3640 <T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined;
3641 }
3642 export type VisitResult<T extends Node> = T | T[] | undefined;
3643 export interface Printer {
3644 /**
3645 * Print a node and its subtree as-is, without any emit transformations.
3646 * @param hint A value indicating the purpose of a node. This is primarily used to
3647 * distinguish between an `Identifier` used in an expression position, versus an
3648 * `Identifier` used as an `IdentifierName` as part of a declaration. For most nodes you
3649 * should just pass `Unspecified`.
3650 * @param node The node to print. The node and its subtree are printed as-is, without any
3651 * emit transformations.
3652 * @param sourceFile A source file that provides context for the node. The source text of
3653 * the file is used to emit the original source content for literals and identifiers, while
3654 * the identifiers of the source file are used when generating unique names to avoid
3655 * collisions.
3656 */
3657 printNode(hint: EmitHint, node: Node, sourceFile: SourceFile): string;
3658 /**
3659 * Prints a list of nodes using the given format flags
3660 */
3661 printList<T extends Node>(format: ListFormat, list: NodeArray<T>, sourceFile: SourceFile): string;
3662 /**
3663 * Prints a source file as-is, without any emit transformations.
3664 */
3665 printFile(sourceFile: SourceFile): string;
3666 /**
3667 * Prints a bundle of source files as-is, without any emit transformations.
3668 */
3669 printBundle(bundle: Bundle): string;
3670 }
3671 export interface PrintHandlers {
3672 /**
3673 * A hook used by the Printer when generating unique names to avoid collisions with
3674 * globally defined names that exist outside of the current source file.
3675 */
3676 hasGlobalName?(name: string): boolean;
3677 /**
3678 * A hook used by the Printer to provide notifications prior to emitting a node. A
3679 * compatible implementation **must** invoke `emitCallback` with the provided `hint` and
3680 * `node` values.
3681 * @param hint A hint indicating the intended purpose of the node.
3682 * @param node The node to emit.
3683 * @param emitCallback A callback that, when invoked, will emit the node.
3684 * @example
3685 * ```ts
3686 * var printer = createPrinter(printerOptions, {
3687 * onEmitNode(hint, node, emitCallback) {
3688 * // set up or track state prior to emitting the node...
3689 * emitCallback(hint, node);
3690 * // restore state after emitting the node...
3691 * }
3692 * });
3693 * ```
3694 */
3695 onEmitNode?(hint: EmitHint, node: Node | undefined, emitCallback: (hint: EmitHint, node: Node | undefined) => void): void;
3696 /**
3697 * A hook used to check if an emit notification is required for a node.
3698 * @param node The node to emit.
3699 */
3700 isEmitNotificationEnabled?(node: Node | undefined): boolean;
3701 /**
3702 * A hook used by the Printer to perform just-in-time substitution of a node. This is
3703 * primarily used by node transformations that need to substitute one node for another,
3704 * such as replacing `myExportedVar` with `exports.myExportedVar`.
3705 * @param hint A hint indicating the intended purpose of the node.
3706 * @param node The node to emit.
3707 * @example
3708 * ```ts
3709 * var printer = createPrinter(printerOptions, {
3710 * substituteNode(hint, node) {
3711 * // perform substitution if necessary...
3712 * return node;
3713 * }
3714 * });
3715 * ```
3716 */
3717 substituteNode?(hint: EmitHint, node: Node): Node;
3718 }
3719 export interface PrinterOptions {
3720 removeComments?: boolean;
3721 newLine?: NewLineKind;
3722 omitTrailingSemicolon?: boolean;
3723 noEmitHelpers?: boolean;
3724 }
3725 export interface GetEffectiveTypeRootsHost {
3726 directoryExists?(directoryName: string): boolean;
3727 getCurrentDirectory?(): string;
3728 }
3729 export interface TextSpan {
3730 start: number;
3731 length: number;
3732 }
3733 export interface TextChangeRange {
3734 span: TextSpan;
3735 newLength: number;
3736 }
3737 export interface SyntaxList extends Node {
3738 kind: SyntaxKind.SyntaxList;
3739 _children: Node[];
3740 }
3741 export enum ListFormat {
3742 None = 0,
3743 SingleLine = 0,
3744 MultiLine = 1,
3745 PreserveLines = 2,
3746 LinesMask = 3,
3747 NotDelimited = 0,
3748 BarDelimited = 4,
3749 AmpersandDelimited = 8,
3750 CommaDelimited = 16,
3751 AsteriskDelimited = 32,
3752 DelimitersMask = 60,
3753 AllowTrailingComma = 64,
3754 Indented = 128,
3755 SpaceBetweenBraces = 256,
3756 SpaceBetweenSiblings = 512,
3757 Braces = 1024,
3758 Parenthesis = 2048,
3759 AngleBrackets = 4096,
3760 SquareBrackets = 8192,
3761 BracketsMask = 15360,
3762 OptionalIfUndefined = 16384,
3763 OptionalIfEmpty = 32768,
3764 Optional = 49152,
3765 PreferNewLine = 65536,
3766 NoTrailingNewLine = 131072,
3767 NoInterveningComments = 262144,
3768 NoSpaceIfEmpty = 524288,
3769 SingleElement = 1048576,
3770 SpaceAfterList = 2097152,
3771 Modifiers = 262656,
3772 HeritageClauses = 512,
3773 SingleLineTypeLiteralMembers = 768,
3774 MultiLineTypeLiteralMembers = 32897,
3775 SingleLineTupleTypeElements = 528,
3776 MultiLineTupleTypeElements = 657,
3777 UnionTypeConstituents = 516,
3778 IntersectionTypeConstituents = 520,
3779 ObjectBindingPatternElements = 525136,
3780 ArrayBindingPatternElements = 524880,
3781 ObjectLiteralExpressionProperties = 526226,
3782 ArrayLiteralExpressionElements = 8914,
3783 CommaListElements = 528,
3784 CallExpressionArguments = 2576,
3785 NewExpressionArguments = 18960,
3786 TemplateExpressionSpans = 262144,
3787 SingleLineBlockStatements = 768,
3788 MultiLineBlockStatements = 129,
3789 VariableDeclarationList = 528,
3790 SingleLineFunctionBodyStatements = 768,
3791 MultiLineFunctionBodyStatements = 1,
3792 ClassHeritageClauses = 0,
3793 ClassMembers = 129,
3794 InterfaceMembers = 129,
3795 EnumMembers = 145,
3796 CaseBlockClauses = 129,
3797 NamedImportsOrExportsElements = 525136,
3798 JsxElementOrFragmentChildren = 262144,
3799 JsxElementAttributes = 262656,
3800 CaseOrDefaultClauseStatements = 163969,
3801 HeritageClauseTypes = 528,
3802 SourceFileStatements = 131073,
3803 Decorators = 2146305,
3804 TypeArguments = 53776,
3805 TypeParameters = 53776,
3806 Parameters = 2576,
3807 IndexSignatureParameters = 8848,
3808 JSDocComment = 33
3809 }
3810 export interface UserPreferences {
3811 readonly disableSuggestions?: boolean;
3812 readonly quotePreference?: "auto" | "double" | "single";
3813 readonly includeCompletionsForModuleExports?: boolean;
3814 readonly includeAutomaticOptionalChainCompletions?: boolean;
3815 readonly includeCompletionsWithInsertText?: boolean;
3816 readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative";
3817 /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
3818 readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js";
3819 readonly allowTextChangesInNewFiles?: boolean;
3820 readonly providePrefixAndSuffixTextForRename?: boolean;
3821 readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
3822 readonly provideRefactorNotApplicableReason?: boolean;
3823 }
3824 /** Represents a bigint literal value without requiring bigint support */
3825 export interface PseudoBigInt {
3826 negative: boolean;
3827 base10Value: string;
3828 }
3829 export {};
3830}
3831declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
3832declare function clearTimeout(handle: any): void;
3833declare namespace ts {
3834 export enum FileWatcherEventKind {
3835 Created = 0,
3836 Changed = 1,
3837 Deleted = 2
3838 }
3839 export type FileWatcherCallback = (fileName: string, eventKind: FileWatcherEventKind) => void;
3840 export type DirectoryWatcherCallback = (fileName: string) => void;
3841 export interface System {
3842 args: string[];
3843 newLine: string;
3844 useCaseSensitiveFileNames: boolean;
3845 write(s: string): void;
3846 writeOutputIsTTY?(): boolean;
3847 readFile(path: string, encoding?: string): string | undefined;
3848 getFileSize?(path: string): number;
3849 writeFile(path: string, data: string, writeByteOrderMark?: boolean): void;
3850 /**
3851 * @pollingInterval - this parameter is used in polling-based watchers and ignored in watchers that
3852 * use native OS file watching
3853 */
3854 watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher;
3855 watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher;
3856 resolvePath(path: string): string;
3857 fileExists(path: string): boolean;
3858 directoryExists(path: string): boolean;
3859 createDirectory(path: string): void;
3860 getExecutingFilePath(): string;
3861 getCurrentDirectory(): string;
3862 getDirectories(path: string): string[];
3863 readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
3864 getModifiedTime?(path: string): Date | undefined;
3865 setModifiedTime?(path: string, time: Date): void;
3866 deleteFile?(path: string): void;
3867 /**
3868 * A good implementation is node.js' `crypto.createHash`. (https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm)
3869 */
3870 createHash?(data: string): string;
3871 /** This must be cryptographically secure. Only implement this method using `crypto.createHash("sha256")`. */
3872 createSHA256Hash?(data: string): string;
3873 getMemoryUsage?(): number;
3874 exit(exitCode?: number): void;
3875 realpath?(path: string): string;
3876 setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
3877 clearTimeout?(timeoutId: any): void;
3878 clearScreen?(): void;
3879 base64decode?(input: string): string;
3880 base64encode?(input: string): string;
3881 }
3882 export interface FileWatcher {
3883 close(): void;
3884 }
3885 export function getNodeMajorVersion(): number | undefined;
3886 export let sys: System;
3887 export {};
3888}
3889declare namespace ts {
3890 type ErrorCallback = (message: DiagnosticMessage, length: number) => void;
3891 interface Scanner {
3892 getStartPos(): number;
3893 getToken(): SyntaxKind;
3894 getTextPos(): number;
3895 getTokenPos(): number;
3896 getTokenText(): string;
3897 getTokenValue(): string;
3898 hasUnicodeEscape(): boolean;
3899 hasExtendedUnicodeEscape(): boolean;
3900 hasPrecedingLineBreak(): boolean;
3901 isIdentifier(): boolean;
3902 isReservedWord(): boolean;
3903 isUnterminated(): boolean;
3904 reScanGreaterToken(): SyntaxKind;
3905 reScanSlashToken(): SyntaxKind;
3906 reScanAsteriskEqualsToken(): SyntaxKind;
3907 reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind;
3908 reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind;
3909 scanJsxIdentifier(): SyntaxKind;
3910 scanJsxAttributeValue(): SyntaxKind;
3911 reScanJsxAttributeValue(): SyntaxKind;
3912 reScanJsxToken(): JsxTokenSyntaxKind;
3913 reScanLessThanToken(): SyntaxKind;
3914 reScanQuestionToken(): SyntaxKind;
3915 scanJsxToken(): JsxTokenSyntaxKind;
3916 scanJsDocToken(): JSDocSyntaxKind;
3917 scan(): SyntaxKind;
3918 getText(): string;
3919 setText(text: string | undefined, start?: number, length?: number): void;
3920 setOnError(onError: ErrorCallback | undefined): void;
3921 setScriptTarget(scriptTarget: ScriptTarget): void;
3922 setLanguageVariant(variant: LanguageVariant): void;
3923 setTextPos(textPos: number): void;
3924 lookAhead<T>(callback: () => T): T;
3925 scanRange<T>(start: number, length: number, callback: () => T): T;
3926 tryScan<T>(callback: () => T): T;
3927 }
3928 function tokenToString(t: SyntaxKind): string | undefined;
3929 function getPositionOfLineAndCharacter(sourceFile: SourceFileLike, line: number, character: number): number;
3930 function getLineAndCharacterOfPosition(sourceFile: SourceFileLike, position: number): LineAndCharacter;
3931 function isWhiteSpaceLike(ch: number): boolean;
3932 /** Does not include line breaks. For that, see isWhiteSpaceLike. */
3933 function isWhiteSpaceSingleLine(ch: number): boolean;
3934 function isLineBreak(ch: number): boolean;
3935 function couldStartTrivia(text: string, pos: number): boolean;
3936 function forEachLeadingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined;
3937 function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined;
3938 function forEachTrailingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined;
3939 function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined;
3940 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;
3941 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;
3942 function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
3943 function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
3944 /** Optionally, get the shebang */
3945 function getShebang(text: string): string | undefined;
3946 function isIdentifierStart(ch: number, languageVersion: ScriptTarget | undefined): boolean;
3947 function isIdentifierPart(ch: number, languageVersion: ScriptTarget | undefined, identifierVariant?: LanguageVariant): boolean;
3948 function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, textInitial?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner;
3949}
3950declare namespace ts {
3951 function isExternalModuleNameRelative(moduleName: string): boolean;
3952 function sortAndDeduplicateDiagnostics<T extends Diagnostic>(diagnostics: readonly T[]): SortedReadonlyArray<T>;
3953 function getDefaultLibFileName(options: CompilerOptions): string;
3954 function textSpanEnd(span: TextSpan): number;
3955 function textSpanIsEmpty(span: TextSpan): boolean;
3956 function textSpanContainsPosition(span: TextSpan, position: number): boolean;
3957 function textSpanContainsTextSpan(span: TextSpan, other: TextSpan): boolean;
3958 function textSpanOverlapsWith(span: TextSpan, other: TextSpan): boolean;
3959 function textSpanOverlap(span1: TextSpan, span2: TextSpan): TextSpan | undefined;
3960 function textSpanIntersectsWithTextSpan(span: TextSpan, other: TextSpan): boolean;
3961 function textSpanIntersectsWith(span: TextSpan, start: number, length: number): boolean;
3962 function decodedTextSpanIntersectsWith(start1: number, length1: number, start2: number, length2: number): boolean;
3963 function textSpanIntersectsWithPosition(span: TextSpan, position: number): boolean;
3964 function textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan | undefined;
3965 function createTextSpan(start: number, length: number): TextSpan;
3966 function createTextSpanFromBounds(start: number, end: number): TextSpan;
3967 function textChangeRangeNewSpan(range: TextChangeRange): TextSpan;
3968 function textChangeRangeIsUnchanged(range: TextChangeRange): boolean;
3969 function createTextChangeRange(span: TextSpan, newLength: number): TextChangeRange;
3970 let unchangedTextChangeRange: TextChangeRange;
3971 /**
3972 * Called to merge all the changes that occurred across several versions of a script snapshot
3973 * into a single change. i.e. if a user keeps making successive edits to a script we will
3974 * have a text change from V1 to V2, V2 to V3, ..., Vn.
3975 *
3976 * This function will then merge those changes into a single change range valid between V1 and
3977 * Vn.
3978 */
3979 function collapseTextChangeRangesAcrossMultipleVersions(changes: readonly TextChangeRange[]): TextChangeRange;
3980 function getTypeParameterOwner(d: Declaration): Declaration | undefined;
3981 type ParameterPropertyDeclaration = ParameterDeclaration & {
3982 parent: ConstructorDeclaration;
3983 name: Identifier;
3984 };
3985 function isParameterPropertyDeclaration(node: Node, parent: Node): node is ParameterPropertyDeclaration;
3986 function isEmptyBindingPattern(node: BindingName): node is BindingPattern;
3987 function isEmptyBindingElement(node: BindingElement): boolean;
3988 function walkUpBindingElementsAndPatterns(binding: BindingElement): VariableDeclaration | ParameterDeclaration;
3989 function getCombinedModifierFlags(node: Declaration): ModifierFlags;
3990 function getCombinedNodeFlags(node: Node): NodeFlags;
3991 /**
3992 * Checks to see if the locale is in the appropriate format,
3993 * and if it is, attempts to set the appropriate language.
3994 */
3995 function validateLocaleAndSetLanguage(locale: string, sys: {
3996 getExecutingFilePath(): string;
3997 resolvePath(path: string): string;
3998 fileExists(fileName: string): boolean;
3999 readFile(fileName: string): string | undefined;
4000 }, errors?: Push<Diagnostic>): void;
4001 function getOriginalNode(node: Node): Node;
4002 function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T;
4003 function getOriginalNode(node: Node | undefined): Node | undefined;
4004 function getOriginalNode<T extends Node>(node: Node | undefined, nodeTest: (node: Node | undefined) => node is T): T | undefined;
4005 /**
4006 * Gets a value indicating whether a node originated in the parse tree.
4007 *
4008 * @param node The node to test.
4009 */
4010 function isParseTreeNode(node: Node): boolean;
4011 /**
4012 * Gets the original parse tree node for a node.
4013 *
4014 * @param node The original node.
4015 * @returns The original parse tree node if found; otherwise, undefined.
4016 */
4017 function getParseTreeNode(node: Node | undefined): Node | undefined;
4018 /**
4019 * Gets the original parse tree node for a node.
4020 *
4021 * @param node The original node.
4022 * @param nodeTest A callback used to ensure the correct type of parse tree node is returned.
4023 * @returns The original parse tree node if found; otherwise, undefined.
4024 */
4025 function getParseTreeNode<T extends Node>(node: T | undefined, nodeTest?: (node: Node) => node is T): T | undefined;
4026 /** Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' */
4027 function escapeLeadingUnderscores(identifier: string): __String;
4028 /**
4029 * Remove extra underscore from escaped identifier text content.
4030 *
4031 * @param identifier The escaped identifier text.
4032 * @returns The unescaped identifier text.
4033 */
4034 function unescapeLeadingUnderscores(identifier: __String): string;
4035 function idText(identifierOrPrivateName: Identifier | PrivateIdentifier): string;
4036 function symbolName(symbol: Symbol): string;
4037 function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined;
4038 function getNameOfDeclaration(declaration: Declaration | Expression): DeclarationName | undefined;
4039 /**
4040 * Gets the JSDoc parameter tags for the node if present.
4041 *
4042 * @remarks Returns any JSDoc param tag whose name matches the provided
4043 * parameter, whether a param tag on a containing function
4044 * expression, or a param tag on a variable declaration whose
4045 * initializer is the containing function. The tags closest to the
4046 * node are returned first, so in the previous example, the param
4047 * tag on the containing function expression would be first.
4048 *
4049 * For binding patterns, parameter tags are matched by position.
4050 */
4051 function getJSDocParameterTags(param: ParameterDeclaration): readonly JSDocParameterTag[];
4052 /**
4053 * Gets the JSDoc type parameter tags for the node if present.
4054 *
4055 * @remarks Returns any JSDoc template tag whose names match the provided
4056 * parameter, whether a template tag on a containing function
4057 * expression, or a template tag on a variable declaration whose
4058 * initializer is the containing function. The tags closest to the
4059 * node are returned first, so in the previous example, the template
4060 * tag on the containing function expression would be first.
4061 */
4062 function getJSDocTypeParameterTags(param: TypeParameterDeclaration): readonly JSDocTemplateTag[];
4063 /**
4064 * Return true if the node has JSDoc parameter tags.
4065 *
4066 * @remarks Includes parameter tags that are not directly on the node,
4067 * for example on a variable declaration whose initializer is a function expression.
4068 */
4069 function hasJSDocParameterTags(node: FunctionLikeDeclaration | SignatureDeclaration): boolean;
4070 /** Gets the JSDoc augments tag for the node if present */
4071 function getJSDocAugmentsTag(node: Node): JSDocAugmentsTag | undefined;
4072 /** Gets the JSDoc implements tags for the node if present */
4073 function getJSDocImplementsTags(node: Node): readonly JSDocImplementsTag[];
4074 /** Gets the JSDoc class tag for the node if present */
4075 function getJSDocClassTag(node: Node): JSDocClassTag | undefined;
4076 /** Gets the JSDoc public tag for the node if present */
4077 function getJSDocPublicTag(node: Node): JSDocPublicTag | undefined;
4078 /** Gets the JSDoc private tag for the node if present */
4079 function getJSDocPrivateTag(node: Node): JSDocPrivateTag | undefined;
4080 /** Gets the JSDoc protected tag for the node if present */
4081 function getJSDocProtectedTag(node: Node): JSDocProtectedTag | undefined;
4082 /** Gets the JSDoc protected tag for the node if present */
4083 function getJSDocReadonlyTag(node: Node): JSDocReadonlyTag | undefined;
4084 /** Gets the JSDoc deprecated tag for the node if present */
4085 function getJSDocDeprecatedTag(node: Node): JSDocDeprecatedTag | undefined;
4086 /** Gets the JSDoc enum tag for the node if present */
4087 function getJSDocEnumTag(node: Node): JSDocEnumTag | undefined;
4088 /** Gets the JSDoc this tag for the node if present */
4089 function getJSDocThisTag(node: Node): JSDocThisTag | undefined;
4090 /** Gets the JSDoc return tag for the node if present */
4091 function getJSDocReturnTag(node: Node): JSDocReturnTag | undefined;
4092 /** Gets the JSDoc template tag for the node if present */
4093 function getJSDocTemplateTag(node: Node): JSDocTemplateTag | undefined;
4094 /** Gets the JSDoc type tag for the node if present and valid */
4095 function getJSDocTypeTag(node: Node): JSDocTypeTag | undefined;
4096 /**
4097 * Gets the type node for the node if provided via JSDoc.
4098 *
4099 * @remarks The search includes any JSDoc param tag that relates
4100 * to the provided parameter, for example a type tag on the
4101 * parameter itself, or a param tag on a containing function
4102 * expression, or a param tag on a variable declaration whose
4103 * initializer is the containing function. The tags closest to the
4104 * node are examined first, so in the previous example, the type
4105 * tag directly on the node would be returned.
4106 */
4107 function getJSDocType(node: Node): TypeNode | undefined;
4108 /**
4109 * Gets the return type node for the node if provided via JSDoc return tag or type tag.
4110 *
4111 * @remarks `getJSDocReturnTag` just gets the whole JSDoc tag. This function
4112 * gets the type from inside the braces, after the fat arrow, etc.
4113 */
4114 function getJSDocReturnType(node: Node): TypeNode | undefined;
4115 /** Get all JSDoc tags related to a node, including those on parent nodes. */
4116 function getJSDocTags(node: Node): readonly JSDocTag[];
4117 /** Gets all JSDoc tags that match a specified predicate */
4118 function getAllJSDocTags<T extends JSDocTag>(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[];
4119 /** Gets all JSDoc tags of a specified kind */
4120 function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[];
4121 /**
4122 * Gets the effective type parameters. If the node was parsed in a
4123 * JavaScript file, gets the type parameters from the `@template` tag from JSDoc.
4124 */
4125 function getEffectiveTypeParameterDeclarations(node: DeclarationWithTypeParameters): readonly TypeParameterDeclaration[];
4126 function getEffectiveConstraintOfTypeParameter(node: TypeParameterDeclaration): TypeNode | undefined;
4127 function isIdentifierOrPrivateIdentifier(node: Node): node is Identifier | PrivateIdentifier;
4128 function isPropertyAccessChain(node: Node): node is PropertyAccessChain;
4129 function isElementAccessChain(node: Node): node is ElementAccessChain;
4130 function isCallChain(node: Node): node is CallChain;
4131 function isOptionalChain(node: Node): node is PropertyAccessChain | ElementAccessChain | CallChain | NonNullChain;
4132 function isNullishCoalesce(node: Node): boolean;
4133 function isConstTypeReference(node: Node): boolean;
4134 function skipPartiallyEmittedExpressions(node: Expression): Expression;
4135 function skipPartiallyEmittedExpressions(node: Node): Node;
4136 function isNonNullChain(node: Node): node is NonNullChain;
4137 function isBreakOrContinueStatement(node: Node): node is BreakOrContinueStatement;
4138 function isNamedExportBindings(node: Node): node is NamedExportBindings;
4139 function isUnparsedTextLike(node: Node): node is UnparsedTextLike;
4140 function isUnparsedNode(node: Node): node is UnparsedNode;
4141 function isJSDocPropertyLikeTag(node: Node): node is JSDocPropertyLikeTag;
4142 /**
4143 * True if node is of some token syntax kind.
4144 * For example, this is true for an IfKeyword but not for an IfStatement.
4145 * Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail.
4146 */
4147 function isToken(n: Node): boolean;
4148 function isLiteralExpression(node: Node): node is LiteralExpression;
4149 function isTemplateLiteralToken(node: Node): node is TemplateLiteralToken;
4150 function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail;
4151 function isImportOrExportSpecifier(node: Node): node is ImportSpecifier | ExportSpecifier;
4152 function isTypeOnlyImportOrExportDeclaration(node: Node): node is TypeOnlyCompatibleAliasDeclaration;
4153 function isStringTextContainingNode(node: Node): node is StringLiteral | TemplateLiteralToken;
4154 function isModifier(node: Node): node is Modifier;
4155 function isEntityName(node: Node): node is EntityName;
4156 function isPropertyName(node: Node): node is PropertyName;
4157 function isBindingName(node: Node): node is BindingName;
4158 function isFunctionLike(node: Node): node is SignatureDeclaration;
4159 function isClassElement(node: Node): node is ClassElement;
4160 function isClassLike(node: Node): node is ClassLikeDeclaration;
4161 function isAccessor(node: Node): node is AccessorDeclaration;
4162 function isTypeElement(node: Node): node is TypeElement;
4163 function isClassOrTypeElement(node: Node): node is ClassElement | TypeElement;
4164 function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike;
4165 /**
4166 * Node test that determines whether a node is a valid type node.
4167 * This differs from the `isPartOfTypeNode` function which determines whether a node is *part*
4168 * of a TypeNode.
4169 */
4170 function isTypeNode(node: Node): node is TypeNode;
4171 function isFunctionOrConstructorTypeNode(node: Node): node is FunctionTypeNode | ConstructorTypeNode;
4172 function isPropertyAccessOrQualifiedName(node: Node): node is PropertyAccessExpression | QualifiedName;
4173 function isCallLikeExpression(node: Node): node is CallLikeExpression;
4174 function isCallOrNewExpression(node: Node): node is CallExpression | NewExpression;
4175 function isTemplateLiteral(node: Node): node is TemplateLiteral;
4176 function isAssertionExpression(node: Node): node is AssertionExpression;
4177 function isIterationStatement(node: Node, lookInLabeledStatements: false): node is IterationStatement;
4178 function isIterationStatement(node: Node, lookInLabeledStatements: boolean): node is IterationStatement | LabeledStatement;
4179 function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement;
4180 function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause;
4181 /** True if node is of a kind that may contain comment text. */
4182 function isJSDocCommentContainingNode(node: Node): boolean;
4183 function isSetAccessor(node: Node): node is SetAccessorDeclaration;
4184 function isGetAccessor(node: Node): node is GetAccessorDeclaration;
4185 /** True if has initializer node attached to it. */
4186 function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer;
4187 function isObjectLiteralElement(node: Node): node is ObjectLiteralElement;
4188 function isStringLiteralLike(node: Node): node is StringLiteralLike;
4189}
4190declare namespace ts {
4191 const factory: NodeFactory;
4192 function createUnparsedSourceFile(text: string): UnparsedSource;
4193 function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource;
4194 function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource;
4195 function createInputFiles(javascriptText: string, declarationText: string): InputFiles;
4196 function createInputFiles(readFileText: (path: string) => string | undefined, javascriptPath: string, javascriptMapPath: string | undefined, declarationPath: string, declarationMapPath: string | undefined, buildInfoPath: string | undefined): InputFiles;
4197 function createInputFiles(javascriptText: string, declarationText: string, javascriptMapPath: string | undefined, javascriptMapText: string | undefined, declarationMapPath: string | undefined, declarationMapText: string | undefined): InputFiles;
4198 /**
4199 * Create an external source map source file reference
4200 */
4201 function createSourceMapSource(fileName: string, text: string, skipTrivia?: (pos: number) => number): SourceMapSource;
4202 function setOriginalNode<T extends Node>(node: T, original: Node | undefined): T;
4203}
4204declare namespace ts {
4205 /**
4206 * Clears any `EmitNode` entries from parse-tree nodes.
4207 * @param sourceFile A source file.
4208 */
4209 function disposeEmitNodes(sourceFile: SourceFile | undefined): void;
4210 /**
4211 * Sets flags that control emit behavior of a node.
4212 */
4213 function setEmitFlags<T extends Node>(node: T, emitFlags: EmitFlags): T;
4214 /**
4215 * Gets a custom text range to use when emitting source maps.
4216 */
4217 function getSourceMapRange(node: Node): SourceMapRange;
4218 /**
4219 * Sets a custom text range to use when emitting source maps.
4220 */
4221 function setSourceMapRange<T extends Node>(node: T, range: SourceMapRange | undefined): T;
4222 /**
4223 * Gets the TextRange to use for source maps for a token of a node.
4224 */
4225 function getTokenSourceMapRange(node: Node, token: SyntaxKind): SourceMapRange | undefined;
4226 /**
4227 * Sets the TextRange to use for source maps for a token of a node.
4228 */
4229 function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: SourceMapRange | undefined): T;
4230 /**
4231 * Gets a custom text range to use when emitting comments.
4232 */
4233 function getCommentRange(node: Node): TextRange;
4234 /**
4235 * Sets a custom text range to use when emitting comments.
4236 */
4237 function setCommentRange<T extends Node>(node: T, range: TextRange): T;
4238 function getSyntheticLeadingComments(node: Node): SynthesizedComment[] | undefined;
4239 function setSyntheticLeadingComments<T extends Node>(node: T, comments: SynthesizedComment[] | undefined): T;
4240 function addSyntheticLeadingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T;
4241 function getSyntheticTrailingComments(node: Node): SynthesizedComment[] | undefined;
4242 function setSyntheticTrailingComments<T extends Node>(node: T, comments: SynthesizedComment[] | undefined): T;
4243 function addSyntheticTrailingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T;
4244 function moveSyntheticComments<T extends Node>(node: T, original: Node): T;
4245 /**
4246 * Gets the constant value to emit for an expression representing an enum.
4247 */
4248 function getConstantValue(node: AccessExpression): string | number | undefined;
4249 /**
4250 * Sets the constant value to emit for an expression.
4251 */
4252 function setConstantValue(node: AccessExpression, value: string | number): AccessExpression;
4253 /**
4254 * Adds an EmitHelper to a node.
4255 */
4256 function addEmitHelper<T extends Node>(node: T, helper: EmitHelper): T;
4257 /**
4258 * Add EmitHelpers to a node.
4259 */
4260 function addEmitHelpers<T extends Node>(node: T, helpers: EmitHelper[] | undefined): T;
4261 /**
4262 * Removes an EmitHelper from a node.
4263 */
4264 function removeEmitHelper(node: Node, helper: EmitHelper): boolean;
4265 /**
4266 * Gets the EmitHelpers of a node.
4267 */
4268 function getEmitHelpers(node: Node): EmitHelper[] | undefined;
4269 /**
4270 * Moves matching emit helpers from a source node to a target node.
4271 */
4272 function moveEmitHelpers(source: Node, target: Node, predicate: (helper: EmitHelper) => boolean): void;
4273}
4274declare namespace ts {
4275 function isNumericLiteral(node: Node): node is NumericLiteral;
4276 function isBigIntLiteral(node: Node): node is BigIntLiteral;
4277 function isStringLiteral(node: Node): node is StringLiteral;
4278 function isJsxText(node: Node): node is JsxText;
4279 function isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral;
4280 function isNoSubstitutionTemplateLiteral(node: Node): node is NoSubstitutionTemplateLiteral;
4281 function isTemplateHead(node: Node): node is TemplateHead;
4282 function isTemplateMiddle(node: Node): node is TemplateMiddle;
4283 function isTemplateTail(node: Node): node is TemplateTail;
4284 function isIdentifier(node: Node): node is Identifier;
4285 function isQualifiedName(node: Node): node is QualifiedName;
4286 function isComputedPropertyName(node: Node): node is ComputedPropertyName;
4287 function isPrivateIdentifier(node: Node): node is PrivateIdentifier;
4288 function isTypeParameterDeclaration(node: Node): node is TypeParameterDeclaration;
4289 function isParameter(node: Node): node is ParameterDeclaration;
4290 function isDecorator(node: Node): node is Decorator;
4291 function isPropertySignature(node: Node): node is PropertySignature;
4292 function isPropertyDeclaration(node: Node): node is PropertyDeclaration;
4293 function isMethodSignature(node: Node): node is MethodSignature;
4294 function isMethodDeclaration(node: Node): node is MethodDeclaration;
4295 function isConstructorDeclaration(node: Node): node is ConstructorDeclaration;
4296 function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration;
4297 function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration;
4298 function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration;
4299 function isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration;
4300 function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration;
4301 function isTypePredicateNode(node: Node): node is TypePredicateNode;
4302 function isTypeReferenceNode(node: Node): node is TypeReferenceNode;
4303 function isFunctionTypeNode(node: Node): node is FunctionTypeNode;
4304 function isConstructorTypeNode(node: Node): node is ConstructorTypeNode;
4305 function isTypeQueryNode(node: Node): node is TypeQueryNode;
4306 function isTypeLiteralNode(node: Node): node is TypeLiteralNode;
4307 function isArrayTypeNode(node: Node): node is ArrayTypeNode;
4308 function isTupleTypeNode(node: Node): node is TupleTypeNode;
4309 function isNamedTupleMember(node: Node): node is NamedTupleMember;
4310 function isOptionalTypeNode(node: Node): node is OptionalTypeNode;
4311 function isRestTypeNode(node: Node): node is RestTypeNode;
4312 function isUnionTypeNode(node: Node): node is UnionTypeNode;
4313 function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode;
4314 function isConditionalTypeNode(node: Node): node is ConditionalTypeNode;
4315 function isInferTypeNode(node: Node): node is InferTypeNode;
4316 function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode;
4317 function isThisTypeNode(node: Node): node is ThisTypeNode;
4318 function isTypeOperatorNode(node: Node): node is TypeOperatorNode;
4319 function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode;
4320 function isMappedTypeNode(node: Node): node is MappedTypeNode;
4321 function isLiteralTypeNode(node: Node): node is LiteralTypeNode;
4322 function isImportTypeNode(node: Node): node is ImportTypeNode;
4323 function isObjectBindingPattern(node: Node): node is ObjectBindingPattern;
4324 function isArrayBindingPattern(node: Node): node is ArrayBindingPattern;
4325 function isBindingElement(node: Node): node is BindingElement;
4326 function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression;
4327 function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression;
4328 function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression;
4329 function isElementAccessExpression(node: Node): node is ElementAccessExpression;
4330 function isCallExpression(node: Node): node is CallExpression;
4331 function isNewExpression(node: Node): node is NewExpression;
4332 function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression;
4333 function isTypeAssertionExpression(node: Node): node is TypeAssertion;
4334 function isParenthesizedExpression(node: Node): node is ParenthesizedExpression;
4335 function isFunctionExpression(node: Node): node is FunctionExpression;
4336 function isArrowFunction(node: Node): node is ArrowFunction;
4337 function isDeleteExpression(node: Node): node is DeleteExpression;
4338 function isTypeOfExpression(node: Node): node is TypeOfExpression;
4339 function isVoidExpression(node: Node): node is VoidExpression;
4340 function isAwaitExpression(node: Node): node is AwaitExpression;
4341 function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression;
4342 function isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression;
4343 function isBinaryExpression(node: Node): node is BinaryExpression;
4344 function isConditionalExpression(node: Node): node is ConditionalExpression;
4345 function isTemplateExpression(node: Node): node is TemplateExpression;
4346 function isYieldExpression(node: Node): node is YieldExpression;
4347 function isSpreadElement(node: Node): node is SpreadElement;
4348 function isClassExpression(node: Node): node is ClassExpression;
4349 function isOmittedExpression(node: Node): node is OmittedExpression;
4350 function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments;
4351 function isAsExpression(node: Node): node is AsExpression;
4352 function isNonNullExpression(node: Node): node is NonNullExpression;
4353 function isMetaProperty(node: Node): node is MetaProperty;
4354 function isSyntheticExpression(node: Node): node is SyntheticExpression;
4355 function isPartiallyEmittedExpression(node: Node): node is PartiallyEmittedExpression;
4356 function isCommaListExpression(node: Node): node is CommaListExpression;
4357 function isTemplateSpan(node: Node): node is TemplateSpan;
4358 function isSemicolonClassElement(node: Node): node is SemicolonClassElement;
4359 function isBlock(node: Node): node is Block;
4360 function isVariableStatement(node: Node): node is VariableStatement;
4361 function isEmptyStatement(node: Node): node is EmptyStatement;
4362 function isExpressionStatement(node: Node): node is ExpressionStatement;
4363 function isIfStatement(node: Node): node is IfStatement;
4364 function isDoStatement(node: Node): node is DoStatement;
4365 function isWhileStatement(node: Node): node is WhileStatement;
4366 function isForStatement(node: Node): node is ForStatement;
4367 function isForInStatement(node: Node): node is ForInStatement;
4368 function isForOfStatement(node: Node): node is ForOfStatement;
4369 function isContinueStatement(node: Node): node is ContinueStatement;
4370 function isBreakStatement(node: Node): node is BreakStatement;
4371 function isReturnStatement(node: Node): node is ReturnStatement;
4372 function isWithStatement(node: Node): node is WithStatement;
4373 function isSwitchStatement(node: Node): node is SwitchStatement;
4374 function isLabeledStatement(node: Node): node is LabeledStatement;
4375 function isThrowStatement(node: Node): node is ThrowStatement;
4376 function isTryStatement(node: Node): node is TryStatement;
4377 function isDebuggerStatement(node: Node): node is DebuggerStatement;
4378 function isVariableDeclaration(node: Node): node is VariableDeclaration;
4379 function isVariableDeclarationList(node: Node): node is VariableDeclarationList;
4380 function isFunctionDeclaration(node: Node): node is FunctionDeclaration;
4381 function isClassDeclaration(node: Node): node is ClassDeclaration;
4382 function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration;
4383 function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration;
4384 function isEnumDeclaration(node: Node): node is EnumDeclaration;
4385 function isModuleDeclaration(node: Node): node is ModuleDeclaration;
4386 function isModuleBlock(node: Node): node is ModuleBlock;
4387 function isCaseBlock(node: Node): node is CaseBlock;
4388 function isNamespaceExportDeclaration(node: Node): node is NamespaceExportDeclaration;
4389 function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration;
4390 function isImportDeclaration(node: Node): node is ImportDeclaration;
4391 function isImportClause(node: Node): node is ImportClause;
4392 function isNamespaceImport(node: Node): node is NamespaceImport;
4393 function isNamespaceExport(node: Node): node is NamespaceExport;
4394 function isNamedImports(node: Node): node is NamedImports;
4395 function isImportSpecifier(node: Node): node is ImportSpecifier;
4396 function isExportAssignment(node: Node): node is ExportAssignment;
4397 function isExportDeclaration(node: Node): node is ExportDeclaration;
4398 function isNamedExports(node: Node): node is NamedExports;
4399 function isExportSpecifier(node: Node): node is ExportSpecifier;
4400 function isMissingDeclaration(node: Node): node is MissingDeclaration;
4401 function isNotEmittedStatement(node: Node): node is NotEmittedStatement;
4402 function isExternalModuleReference(node: Node): node is ExternalModuleReference;
4403 function isJsxElement(node: Node): node is JsxElement;
4404 function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement;
4405 function isJsxOpeningElement(node: Node): node is JsxOpeningElement;
4406 function isJsxClosingElement(node: Node): node is JsxClosingElement;
4407 function isJsxFragment(node: Node): node is JsxFragment;
4408 function isJsxOpeningFragment(node: Node): node is JsxOpeningFragment;
4409 function isJsxClosingFragment(node: Node): node is JsxClosingFragment;
4410 function isJsxAttribute(node: Node): node is JsxAttribute;
4411 function isJsxAttributes(node: Node): node is JsxAttributes;
4412 function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute;
4413 function isJsxExpression(node: Node): node is JsxExpression;
4414 function isCaseClause(node: Node): node is CaseClause;
4415 function isDefaultClause(node: Node): node is DefaultClause;
4416 function isHeritageClause(node: Node): node is HeritageClause;
4417 function isCatchClause(node: Node): node is CatchClause;
4418 function isPropertyAssignment(node: Node): node is PropertyAssignment;
4419 function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment;
4420 function isSpreadAssignment(node: Node): node is SpreadAssignment;
4421 function isEnumMember(node: Node): node is EnumMember;
4422 function isUnparsedPrepend(node: Node): node is UnparsedPrepend;
4423 function isSourceFile(node: Node): node is SourceFile;
4424 function isBundle(node: Node): node is Bundle;
4425 function isUnparsedSource(node: Node): node is UnparsedSource;
4426 function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression;
4427 function isJSDocAllType(node: Node): node is JSDocAllType;
4428 function isJSDocUnknownType(node: Node): node is JSDocUnknownType;
4429 function isJSDocNullableType(node: Node): node is JSDocNullableType;
4430 function isJSDocNonNullableType(node: Node): node is JSDocNonNullableType;
4431 function isJSDocOptionalType(node: Node): node is JSDocOptionalType;
4432 function isJSDocFunctionType(node: Node): node is JSDocFunctionType;
4433 function isJSDocVariadicType(node: Node): node is JSDocVariadicType;
4434 function isJSDocNamepathType(node: Node): node is JSDocNamepathType;
4435 function isJSDoc(node: Node): node is JSDoc;
4436 function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral;
4437 function isJSDocSignature(node: Node): node is JSDocSignature;
4438 function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag;
4439 function isJSDocAuthorTag(node: Node): node is JSDocAuthorTag;
4440 function isJSDocClassTag(node: Node): node is JSDocClassTag;
4441 function isJSDocCallbackTag(node: Node): node is JSDocCallbackTag;
4442 function isJSDocPublicTag(node: Node): node is JSDocPublicTag;
4443 function isJSDocPrivateTag(node: Node): node is JSDocPrivateTag;
4444 function isJSDocProtectedTag(node: Node): node is JSDocProtectedTag;
4445 function isJSDocReadonlyTag(node: Node): node is JSDocReadonlyTag;
4446 function isJSDocDeprecatedTag(node: Node): node is JSDocDeprecatedTag;
4447 function isJSDocEnumTag(node: Node): node is JSDocEnumTag;
4448 function isJSDocParameterTag(node: Node): node is JSDocParameterTag;
4449 function isJSDocReturnTag(node: Node): node is JSDocReturnTag;
4450 function isJSDocThisTag(node: Node): node is JSDocThisTag;
4451 function isJSDocTypeTag(node: Node): node is JSDocTypeTag;
4452 function isJSDocTemplateTag(node: Node): node is JSDocTemplateTag;
4453 function isJSDocTypedefTag(node: Node): node is JSDocTypedefTag;
4454 function isJSDocUnknownTag(node: Node): node is JSDocUnknownTag;
4455 function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
4456 function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag;
4457}
4458declare namespace ts {
4459 function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T;
4460}
4461declare namespace ts {
4462 /**
4463 * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes
4464 * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise,
4465 * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns
4466 * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned.
4467 *
4468 * @param node a given node to visit its children
4469 * @param cbNode a callback to be invoked for all child nodes
4470 * @param cbNodes a callback to be invoked for embedded array
4471 *
4472 * @remarks `forEachChild` must visit the children of a node in the order
4473 * that they appear in the source code. The language service depends on this property to locate nodes by position.
4474 */
4475 export function forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
4476 export function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile;
4477 export function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName | undefined;
4478 /**
4479 * Parse json text into SyntaxTree and return node and parse errors if any
4480 * @param fileName
4481 * @param sourceText
4482 */
4483 export function parseJsonText(fileName: string, sourceText: string): JsonSourceFile;
4484 export function isExternalModule(file: SourceFile): boolean;
4485 export function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
4486 export {};
4487}
4488declare namespace ts {
4489 export function parseCommandLine(commandLine: readonly string[], readFile?: (path: string) => string | undefined): ParsedCommandLine;
4490 export type DiagnosticReporter = (diagnostic: Diagnostic) => void;
4491 /**
4492 * Reports config file diagnostics
4493 */
4494 export interface ConfigFileDiagnosticsReporter {
4495 /**
4496 * Reports unrecoverable error when parsing config file
4497 */
4498 onUnRecoverableConfigFileDiagnostic: DiagnosticReporter;
4499 }
4500 /**
4501 * Interface extending ParseConfigHost to support ParseConfigFile that reads config file and reports errors
4502 */
4503 export interface ParseConfigFileHost extends ParseConfigHost, ConfigFileDiagnosticsReporter {
4504 getCurrentDirectory(): string;
4505 }
4506 /**
4507 * Reads the config file, reports errors if any and exits if the config file cannot be found
4508 */
4509 export function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions, host: ParseConfigFileHost, extendedConfigCache?: Map<ExtendedConfigCacheEntry>, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): ParsedCommandLine | undefined;
4510 /**
4511 * Read tsconfig.json file
4512 * @param fileName The path to the config file
4513 */
4514 export function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): {
4515 config?: any;
4516 error?: Diagnostic;
4517 };
4518 /**
4519 * Parse the text of the tsconfig.json file
4520 * @param fileName The path to the config file
4521 * @param jsonText The text of the config file
4522 */
4523 export function parseConfigFileTextToJson(fileName: string, jsonText: string): {
4524 config?: any;
4525 error?: Diagnostic;
4526 };
4527 /**
4528 * Read tsconfig.json file
4529 * @param fileName The path to the config file
4530 */
4531 export function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile;
4532 /**
4533 * Convert the json syntax tree into the json value
4534 */
4535 export function convertToObject(sourceFile: JsonSourceFile, errors: Push<Diagnostic>): any;
4536 /**
4537 * Parse the contents of a config file (tsconfig.json).
4538 * @param json The contents of the config file to parse
4539 * @param host Instance of ParseConfigHost used to enumerate files in folder.
4540 * @param basePath A root directory to resolve relative path entries in the config
4541 * file to. e.g. outDir
4542 */
4543 export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map<ExtendedConfigCacheEntry>, existingWatchOptions?: WatchOptions): ParsedCommandLine;
4544 /**
4545 * Parse the contents of a config file (tsconfig.json).
4546 * @param jsonNode The contents of the config file to parse
4547 * @param host Instance of ParseConfigHost used to enumerate files in folder.
4548 * @param basePath A root directory to resolve relative path entries in the config
4549 * file to. e.g. outDir
4550 */
4551 export function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map<ExtendedConfigCacheEntry>, existingWatchOptions?: WatchOptions): ParsedCommandLine;
4552 export interface ParsedTsconfig {
4553 raw: any;
4554 options?: CompilerOptions;
4555 watchOptions?: WatchOptions;
4556 typeAcquisition?: TypeAcquisition;
4557 /**
4558 * Note that the case of the config path has not yet been normalized, as no files have been imported into the project yet
4559 */
4560 extendedConfigPath?: string;
4561 }
4562 export interface ExtendedConfigCacheEntry {
4563 extendedResult: TsConfigSourceFile;
4564 extendedConfig: ParsedTsconfig | undefined;
4565 }
4566 export function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
4567 options: CompilerOptions;
4568 errors: Diagnostic[];
4569 };
4570 export function convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
4571 options: TypeAcquisition;
4572 errors: Diagnostic[];
4573 };
4574 export {};
4575}
4576declare namespace ts {
4577 function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined;
4578 /**
4579 * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown.
4580 * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups
4581 * is assumed to be the same as root directory of the project.
4582 */
4583 function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
4584 /**
4585 * Given a set of options, returns the set of type directive names
4586 * that should be included for this program automatically.
4587 * This list could either come from the config file,
4588 * or from enumerating the types root + initial secondary types lookup location.
4589 * More type directives might appear in the program later as a result of loading actual source files;
4590 * this list is only the set of defaults that are implicitly included.
4591 */
4592 function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
4593 /**
4594 * Cached module resolutions per containing directory.
4595 * This assumes that any module id will have the same resolution for sibling files located in the same folder.
4596 */
4597 interface ModuleResolutionCache extends NonRelativeModuleNameResolutionCache {
4598 getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): Map<ResolvedModuleWithFailedLookupLocations>;
4599 }
4600 /**
4601 * Stored map from non-relative module name to a table: directory -> result of module lookup in this directory
4602 * We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive.
4603 */
4604 interface NonRelativeModuleNameResolutionCache {
4605 getOrCreateCacheForModuleName(nonRelativeModuleName: string, redirectedReference?: ResolvedProjectReference): PerModuleNameCache;
4606 }
4607 interface PerModuleNameCache {
4608 get(directory: string): ResolvedModuleWithFailedLookupLocations | undefined;
4609 set(directory: string, result: ResolvedModuleWithFailedLookupLocations): void;
4610 }
4611 function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache;
4612 function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache): ResolvedModuleWithFailedLookupLocations | undefined;
4613 function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
4614 function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
4615 function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
4616}
4617declare namespace ts {
4618 /**
4619 * Visits a Node using the supplied visitor, possibly returning a new Node in its place.
4620 *
4621 * @param node The Node to visit.
4622 * @param visitor The callback used to visit the Node.
4623 * @param test A callback to execute to verify the Node is valid.
4624 * @param lift An optional callback to execute to lift a NodeArray into a valid Node.
4625 */
4626 function visitNode<T extends Node>(node: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T;
4627 /**
4628 * Visits a Node using the supplied visitor, possibly returning a new Node in its place.
4629 *
4630 * @param node The Node to visit.
4631 * @param visitor The callback used to visit the Node.
4632 * @param test A callback to execute to verify the Node is valid.
4633 * @param lift An optional callback to execute to lift a NodeArray into a valid Node.
4634 */
4635 function visitNode<T extends Node>(node: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T | undefined;
4636 /**
4637 * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
4638 *
4639 * @param nodes The NodeArray to visit.
4640 * @param visitor The callback used to visit a Node.
4641 * @param test A node test to execute for each node.
4642 * @param start An optional value indicating the starting offset at which to start visiting.
4643 * @param count An optional value indicating the maximum number of nodes to visit.
4644 */
4645 function visitNodes<T extends Node>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>;
4646 /**
4647 * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
4648 *
4649 * @param nodes The NodeArray to visit.
4650 * @param visitor The callback used to visit a Node.
4651 * @param test A node test to execute for each node.
4652 * @param start An optional value indicating the starting offset at which to start visiting.
4653 * @param count An optional value indicating the maximum number of nodes to visit.
4654 */
4655 function visitNodes<T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined;
4656 /**
4657 * Starts a new lexical environment and visits a statement list, ending the lexical environment
4658 * and merging hoisted declarations upon completion.
4659 */
4660 function visitLexicalEnvironment(statements: NodeArray<Statement>, visitor: Visitor, context: TransformationContext, start?: number, ensureUseStrict?: boolean, nodesVisitor?: NodesVisitor): NodeArray<Statement>;
4661 /**
4662 * Starts a new lexical environment and visits a parameter list, suspending the lexical
4663 * environment upon completion.
4664 */
4665 function visitParameterList(nodes: NodeArray<ParameterDeclaration>, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray<ParameterDeclaration>;
4666 function visitParameterList(nodes: NodeArray<ParameterDeclaration> | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray<ParameterDeclaration> | undefined;
4667 /**
4668 * Resumes a suspended lexical environment and visits a function body, ending the lexical
4669 * environment and merging hoisted declarations upon completion.
4670 */
4671 function visitFunctionBody(node: FunctionBody, visitor: Visitor, context: TransformationContext): FunctionBody;
4672 /**
4673 * Resumes a suspended lexical environment and visits a function body, ending the lexical
4674 * environment and merging hoisted declarations upon completion.
4675 */
4676 function visitFunctionBody(node: FunctionBody | undefined, visitor: Visitor, context: TransformationContext): FunctionBody | undefined;
4677 /**
4678 * Resumes a suspended lexical environment and visits a concise body, ending the lexical
4679 * environment and merging hoisted declarations upon completion.
4680 */
4681 function visitFunctionBody(node: ConciseBody, visitor: Visitor, context: TransformationContext): ConciseBody;
4682 /**
4683 * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place.
4684 *
4685 * @param node The Node whose children will be visited.
4686 * @param visitor The callback used to visit each child.
4687 * @param context A lexical environment context for the visitor.
4688 */
4689 function visitEachChild<T extends Node>(node: T, visitor: Visitor, context: TransformationContext): T;
4690 /**
4691 * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place.
4692 *
4693 * @param node The Node whose children will be visited.
4694 * @param visitor The callback used to visit each child.
4695 * @param context A lexical environment context for the visitor.
4696 */
4697 function visitEachChild<T extends Node>(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined;
4698}
4699declare namespace ts {
4700 function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): string | undefined;
4701 function getOutputFileNames(commandLine: ParsedCommandLine, inputFileName: string, ignoreCase: boolean): readonly string[];
4702 function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer;
4703}
4704declare namespace ts {
4705 export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string | undefined;
4706 export function resolveTripleslashReference(moduleName: string, containingFile: string): string;
4707 export function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
4708 export function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
4709 export interface FormatDiagnosticsHost {
4710 getCurrentDirectory(): string;
4711 getCanonicalFileName(fileName: string): string;
4712 getNewLine(): string;
4713 }
4714 export function formatDiagnostics(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string;
4715 export function formatDiagnostic(diagnostic: Diagnostic, host: FormatDiagnosticsHost): string;
4716 export function formatDiagnosticsWithColorAndContext(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string;
4717 export function flattenDiagnosticMessageText(diag: string | DiagnosticMessageChain | undefined, newLine: string, indent?: number): string;
4718 export function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): readonly Diagnostic[];
4719 /**
4720 * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
4721 * that represent a compilation unit.
4722 *
4723 * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and
4724 * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.
4725 *
4726 * @param createProgramOptions - The options for creating a program.
4727 * @returns A 'Program' object.
4728 */
4729 export function createProgram(createProgramOptions: CreateProgramOptions): Program;
4730 /**
4731 * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
4732 * that represent a compilation unit.
4733 *
4734 * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and
4735 * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.
4736 *
4737 * @param rootNames - A set of root files.
4738 * @param options - The compiler options which should be used.
4739 * @param host - The host interacts with the underlying file system.
4740 * @param oldProgram - Reuses an old program structure.
4741 * @param configFileParsingDiagnostics - error during config file parsing
4742 * @returns A 'Program' object.
4743 */
4744 export function createProgram(rootNames: readonly string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: readonly Diagnostic[]): Program;
4745 /** @deprecated */ export interface ResolveProjectReferencePathHost {
4746 fileExists(fileName: string): boolean;
4747 }
4748 /**
4749 * Returns the target config filename of a project reference.
4750 * Note: The file might not exist.
4751 */
4752 export function resolveProjectReferencePath(ref: ProjectReference): ResolvedConfigFileName;
4753 /** @deprecated */ export function resolveProjectReferencePath(host: ResolveProjectReferencePathHost, ref: ProjectReference): ResolvedConfigFileName;
4754 export {};
4755}
4756declare namespace ts {
4757 interface EmitOutput {
4758 outputFiles: OutputFile[];
4759 emitSkipped: boolean;
4760 }
4761 interface OutputFile {
4762 name: string;
4763 writeByteOrderMark: boolean;
4764 text: string;
4765 }
4766}
4767declare namespace ts {
4768 type AffectedFileResult<T> = {
4769 result: T;
4770 affected: SourceFile | Program;
4771 } | undefined;
4772 interface BuilderProgramHost {
4773 /**
4774 * return true if file names are treated with case sensitivity
4775 */
4776 useCaseSensitiveFileNames(): boolean;
4777 /**
4778 * If provided this would be used this hash instead of actual file shape text for detecting changes
4779 */
4780 createHash?: (data: string) => string;
4781 /**
4782 * When emit or emitNextAffectedFile are called without writeFile,
4783 * this callback if present would be used to write files
4784 */
4785 writeFile?: WriteFileCallback;
4786 }
4787 /**
4788 * Builder to manage the program state changes
4789 */
4790 interface BuilderProgram {
4791 /**
4792 * Returns current program
4793 */
4794 getProgram(): Program;
4795 /**
4796 * Get compiler options of the program
4797 */
4798 getCompilerOptions(): CompilerOptions;
4799 /**
4800 * Get the source file in the program with file name
4801 */
4802 getSourceFile(fileName: string): SourceFile | undefined;
4803 /**
4804 * Get a list of files in the program
4805 */
4806 getSourceFiles(): readonly SourceFile[];
4807 /**
4808 * Get the diagnostics for compiler options
4809 */
4810 getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
4811 /**
4812 * Get the diagnostics that dont belong to any file
4813 */
4814 getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
4815 /**
4816 * Get the diagnostics from config file parsing
4817 */
4818 getConfigFileParsingDiagnostics(): readonly Diagnostic[];
4819 /**
4820 * Get the syntax diagnostics, for all source files if source file is not supplied
4821 */
4822 getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
4823 /**
4824 * Get the declaration diagnostics, for all source files if source file is not supplied
4825 */
4826 getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
4827 /**
4828 * Get all the dependencies of the file
4829 */
4830 getAllDependencies(sourceFile: SourceFile): readonly string[];
4831 /**
4832 * Gets the semantic diagnostics from the program corresponding to this state of file (if provided) or whole program
4833 * The semantic diagnostics are cached and managed here
4834 * Note that it is assumed that when asked about semantic diagnostics through this API,
4835 * the file has been taken out of affected files so it is safe to use cache or get from program and cache the diagnostics
4836 * In case of SemanticDiagnosticsBuilderProgram if the source file is not provided,
4837 * it will iterate through all the affected files, to ensure that cache stays valid and yet provide a way to get all semantic diagnostics
4838 */
4839 getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
4840 /**
4841 * Emits the JavaScript and declaration files.
4842 * When targetSource file is specified, emits the files corresponding to that source file,
4843 * otherwise for the whole program.
4844 * In case of EmitAndSemanticDiagnosticsBuilderProgram, when targetSourceFile is specified,
4845 * it is assumed that that file is handled from affected file list. If targetSourceFile is not specified,
4846 * it will only emit all the affected files instead of whole program
4847 *
4848 * The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host
4849 * in that order would be used to write the files
4850 */
4851 emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult;
4852 /**
4853 * Get the current directory of the program
4854 */
4855 getCurrentDirectory(): string;
4856 }
4857 /**
4858 * The builder that caches the semantic diagnostics for the program and handles the changed files and affected files
4859 */
4860 interface SemanticDiagnosticsBuilderProgram extends BuilderProgram {
4861 /**
4862 * Gets the semantic diagnostics from the program for the next affected file and caches it
4863 * Returns undefined if the iteration is complete
4864 */
4865 getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>;
4866 }
4867 /**
4868 * The builder that can handle the changes in program and iterate through changed file to emit the files
4869 * The semantic diagnostics are cached per file and managed by clearing for the changed/affected files
4870 */
4871 interface EmitAndSemanticDiagnosticsBuilderProgram extends SemanticDiagnosticsBuilderProgram {
4872 /**
4873 * Emits the next affected file's emit result (EmitResult and sourceFiles emitted) or returns undefined if iteration is complete
4874 * The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host
4875 * in that order would be used to write the files
4876 */
4877 emitNextAffectedFile(writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): AffectedFileResult<EmitResult>;
4878 }
4879 /**
4880 * Create the builder to manage semantic diagnostics and cache them
4881 */
4882 function createSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram?: SemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): SemanticDiagnosticsBuilderProgram;
4883 function createSemanticDiagnosticsBuilderProgram(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: SemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): SemanticDiagnosticsBuilderProgram;
4884 /**
4885 * Create the builder that can handle the changes in program and iterate through changed files
4886 * to emit the those files and manage semantic diagnostics cache as well
4887 */
4888 function createEmitAndSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): EmitAndSemanticDiagnosticsBuilderProgram;
4889 function createEmitAndSemanticDiagnosticsBuilderProgram(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): EmitAndSemanticDiagnosticsBuilderProgram;
4890 /**
4891 * Creates a builder thats just abstraction over program and can be used with watch
4892 */
4893 function createAbstractBuilder(newProgram: Program, host: BuilderProgramHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): BuilderProgram;
4894 function createAbstractBuilder(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): BuilderProgram;
4895}
4896declare namespace ts {
4897 interface ReadBuildProgramHost {
4898 useCaseSensitiveFileNames(): boolean;
4899 getCurrentDirectory(): string;
4900 readFile(fileName: string): string | undefined;
4901 }
4902 function readBuilderProgram(compilerOptions: CompilerOptions, host: ReadBuildProgramHost): EmitAndSemanticDiagnosticsBuilderProgram | undefined;
4903 function createIncrementalCompilerHost(options: CompilerOptions, system?: System): CompilerHost;
4904 interface IncrementalProgramOptions<T extends BuilderProgram> {
4905 rootNames: readonly string[];
4906 options: CompilerOptions;
4907 configFileParsingDiagnostics?: readonly Diagnostic[];
4908 projectReferences?: readonly ProjectReference[];
4909 host?: CompilerHost;
4910 createProgram?: CreateProgram<T>;
4911 }
4912 function createIncrementalProgram<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>({ rootNames, options, configFileParsingDiagnostics, projectReferences, host, createProgram }: IncrementalProgramOptions<T>): T;
4913 type WatchStatusReporter = (diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number) => void;
4914 /** Create the program with rootNames and options, if they are undefined, oldProgram and new configFile diagnostics create new program */
4915 type CreateProgram<T extends BuilderProgram> = (rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: T, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[] | undefined) => T;
4916 /** Host that has watch functionality used in --watch mode */
4917 interface WatchHost {
4918 /** If provided, called with Diagnostic message that informs about change in watch status */
4919 onWatchStatusChange?(diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number): void;
4920 /** Used to watch changes in source files, missing files needed to update the program or config file */
4921 watchFile(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: CompilerOptions): FileWatcher;
4922 /** Used to watch resolved module's failed lookup locations, config file specs, type roots where auto type reference directives are added */
4923 watchDirectory(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: CompilerOptions): FileWatcher;
4924 /** If provided, will be used to set delayed compilation, so that multiple changes in short span are compiled together */
4925 setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
4926 /** If provided, will be used to reset existing delayed compilation */
4927 clearTimeout?(timeoutId: any): void;
4928 }
4929 interface ProgramHost<T extends BuilderProgram> {
4930 /**
4931 * Used to create the program when need for program creation or recreation detected
4932 */
4933 createProgram: CreateProgram<T>;
4934 useCaseSensitiveFileNames(): boolean;
4935 getNewLine(): string;
4936 getCurrentDirectory(): string;
4937 getDefaultLibFileName(options: CompilerOptions): string;
4938 getDefaultLibLocation?(): string;
4939 createHash?(data: string): string;
4940 /**
4941 * Use to check file presence for source files and
4942 * if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well
4943 */
4944 fileExists(path: string): boolean;
4945 /**
4946 * Use to read file text for source files and
4947 * if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well
4948 */
4949 readFile(path: string, encoding?: string): string | undefined;
4950 /** If provided, used for module resolution as well as to handle directory structure */
4951 directoryExists?(path: string): boolean;
4952 /** If provided, used in resolutions as well as handling directory structure */
4953 getDirectories?(path: string): string[];
4954 /** If provided, used to cache and handle directory structure modifications */
4955 readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
4956 /** Symbol links resolution */
4957 realpath?(path: string): string;
4958 /** If provided would be used to write log about compilation */
4959 trace?(s: string): void;
4960 /** If provided is used to get the environment variable */
4961 getEnvironmentVariable?(name: string): string | undefined;
4962 /** If provided, used to resolve the module names, otherwise typescript's default module resolution */
4963 resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedModule | undefined)[];
4964 /** If provided, used to resolve type reference directives, otherwise typescript's default resolution */
4965 resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[];
4966 }
4967 interface WatchCompilerHost<T extends BuilderProgram> extends ProgramHost<T>, WatchHost {
4968 /** Instead of using output d.ts file from project reference, use its source file */
4969 useSourceOfProjectReferenceRedirect?(): boolean;
4970 /** If provided, callback to invoke after every new program creation */
4971 afterProgramCreate?(program: T): void;
4972 }
4973 /**
4974 * Host to create watch with root files and options
4975 */
4976 interface WatchCompilerHostOfFilesAndCompilerOptions<T extends BuilderProgram> extends WatchCompilerHost<T> {
4977 /** root files to use to generate program */
4978 rootFiles: string[];
4979 /** Compiler options */
4980 options: CompilerOptions;
4981 watchOptions?: WatchOptions;
4982 /** Project References */
4983 projectReferences?: readonly ProjectReference[];
4984 }
4985 /**
4986 * Host to create watch with config file
4987 */
4988 interface WatchCompilerHostOfConfigFile<T extends BuilderProgram> extends WatchCompilerHost<T>, ConfigFileDiagnosticsReporter {
4989 /** Name of the config file to compile */
4990 configFileName: string;
4991 /** Options to extend */
4992 optionsToExtend?: CompilerOptions;
4993 watchOptionsToExtend?: WatchOptions;
4994 extraFileExtensions?: readonly FileExtensionInfo[];
4995 /**
4996 * Used to generate source file names from the config file and its include, exclude, files rules
4997 * and also to cache the directory stucture
4998 */
4999 readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
5000 }
5001 interface Watch<T> {
5002 /** Synchronize with host and get updated program */
5003 getProgram(): T;
5004 /** Closes the watch */
5005 close(): void;
5006 }
5007 /**
5008 * Creates the watch what generates program using the config file
5009 */
5010 interface WatchOfConfigFile<T> extends Watch<T> {
5011 }
5012 /**
5013 * Creates the watch that generates program using the root files and compiler options
5014 */
5015 interface WatchOfFilesAndCompilerOptions<T> extends Watch<T> {
5016 /** Updates the root files in the program, only if this is not config file compilation */
5017 updateRootFileNames(fileNames: string[]): void;
5018 }
5019 /**
5020 * Create the watch compiler host for either configFile or fileNames and its options
5021 */
5022 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>;
5023 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>;
5024 /**
5025 * Creates the watch from the host for root files and compiler options
5026 */
5027 function createWatchProgram<T extends BuilderProgram>(host: WatchCompilerHostOfFilesAndCompilerOptions<T>): WatchOfFilesAndCompilerOptions<T>;
5028 /**
5029 * Creates the watch from the host for config file
5030 */
5031 function createWatchProgram<T extends BuilderProgram>(host: WatchCompilerHostOfConfigFile<T>): WatchOfConfigFile<T>;
5032}
5033declare namespace ts {
5034 interface BuildOptions {
5035 dry?: boolean;
5036 force?: boolean;
5037 verbose?: boolean;
5038 incremental?: boolean;
5039 assumeChangesOnlyAffectDirectDependencies?: boolean;
5040 traceResolution?: boolean;
5041 [option: string]: CompilerOptionsValue | undefined;
5042 }
5043 type ReportEmitErrorSummary = (errorCount: number) => void;
5044 interface SolutionBuilderHostBase<T extends BuilderProgram> extends ProgramHost<T> {
5045 createDirectory?(path: string): void;
5046 /**
5047 * Should provide create directory and writeFile if done of invalidatedProjects is not invoked with
5048 * writeFileCallback
5049 */
5050 writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void;
5051 getModifiedTime(fileName: string): Date | undefined;
5052 setModifiedTime(fileName: string, date: Date): void;
5053 deleteFile(fileName: string): void;
5054 getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
5055 reportDiagnostic: DiagnosticReporter;
5056 reportSolutionBuilderStatus: DiagnosticReporter;
5057 afterProgramEmitAndDiagnostics?(program: T): void;
5058 }
5059 interface SolutionBuilderHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T> {
5060 reportErrorSummary?: ReportEmitErrorSummary;
5061 }
5062 interface SolutionBuilderWithWatchHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T>, WatchHost {
5063 }
5064 interface SolutionBuilder<T extends BuilderProgram> {
5065 build(project?: string, cancellationToken?: CancellationToken): ExitStatus;
5066 clean(project?: string): ExitStatus;
5067 buildReferences(project: string, cancellationToken?: CancellationToken): ExitStatus;
5068 cleanReferences(project?: string): ExitStatus;
5069 getNextInvalidatedProject(cancellationToken?: CancellationToken): InvalidatedProject<T> | undefined;
5070 }
5071 /**
5072 * Create a function that reports watch status by writing to the system and handles the formating of the diagnostic
5073 */
5074 function createBuilderStatusReporter(system: System, pretty?: boolean): DiagnosticReporter;
5075 function createSolutionBuilderHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportErrorSummary?: ReportEmitErrorSummary): SolutionBuilderHost<T>;
5076 function createSolutionBuilderWithWatchHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter): SolutionBuilderWithWatchHost<T>;
5077 function createSolutionBuilder<T extends BuilderProgram>(host: SolutionBuilderHost<T>, rootNames: readonly string[], defaultOptions: BuildOptions): SolutionBuilder<T>;
5078 function createSolutionBuilderWithWatch<T extends BuilderProgram>(host: SolutionBuilderWithWatchHost<T>, rootNames: readonly string[], defaultOptions: BuildOptions, baseWatchOptions?: WatchOptions): SolutionBuilder<T>;
5079 enum InvalidatedProjectKind {
5080 Build = 0,
5081 UpdateBundle = 1,
5082 UpdateOutputFileStamps = 2
5083 }
5084 interface InvalidatedProjectBase {
5085 readonly kind: InvalidatedProjectKind;
5086 readonly project: ResolvedConfigFileName;
5087 /**
5088 * To dispose this project and ensure that all the necessary actions are taken and state is updated accordingly
5089 */
5090 done(cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): ExitStatus;
5091 getCompilerOptions(): CompilerOptions;
5092 getCurrentDirectory(): string;
5093 }
5094 interface UpdateOutputFileStampsProject extends InvalidatedProjectBase {
5095 readonly kind: InvalidatedProjectKind.UpdateOutputFileStamps;
5096 updateOutputFileStatmps(): void;
5097 }
5098 interface BuildInvalidedProject<T extends BuilderProgram> extends InvalidatedProjectBase {
5099 readonly kind: InvalidatedProjectKind.Build;
5100 getBuilderProgram(): T | undefined;
5101 getProgram(): Program | undefined;
5102 getSourceFile(fileName: string): SourceFile | undefined;
5103 getSourceFiles(): readonly SourceFile[];
5104 getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
5105 getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
5106 getConfigFileParsingDiagnostics(): readonly Diagnostic[];
5107 getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
5108 getAllDependencies(sourceFile: SourceFile): readonly string[];
5109 getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
5110 getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>;
5111 emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult | undefined;
5112 }
5113 interface UpdateBundleProject<T extends BuilderProgram> extends InvalidatedProjectBase {
5114 readonly kind: InvalidatedProjectKind.UpdateBundle;
5115 emit(writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): EmitResult | BuildInvalidedProject<T> | undefined;
5116 }
5117 type InvalidatedProject<T extends BuilderProgram> = UpdateOutputFileStampsProject | BuildInvalidedProject<T> | UpdateBundleProject<T>;
5118}
5119declare namespace ts.server {
5120 type ActionSet = "action::set";
5121 type ActionInvalidate = "action::invalidate";
5122 type ActionPackageInstalled = "action::packageInstalled";
5123 type EventTypesRegistry = "event::typesRegistry";
5124 type EventBeginInstallTypes = "event::beginInstallTypes";
5125 type EventEndInstallTypes = "event::endInstallTypes";
5126 type EventInitializationFailed = "event::initializationFailed";
5127}
5128declare namespace ts.server {
5129 interface TypingInstallerResponse {
5130 readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed;
5131 }
5132 interface TypingInstallerRequestWithProjectName {
5133 readonly projectName: string;
5134 }
5135 interface DiscoverTypings extends TypingInstallerRequestWithProjectName {
5136 readonly fileNames: string[];
5137 readonly projectRootPath: Path;
5138 readonly compilerOptions: CompilerOptions;
5139 readonly watchOptions?: WatchOptions;
5140 readonly typeAcquisition: TypeAcquisition;
5141 readonly unresolvedImports: SortedReadonlyArray<string>;
5142 readonly cachePath?: string;
5143 readonly kind: "discover";
5144 }
5145 interface CloseProject extends TypingInstallerRequestWithProjectName {
5146 readonly kind: "closeProject";
5147 }
5148 interface TypesRegistryRequest {
5149 readonly kind: "typesRegistry";
5150 }
5151 interface InstallPackageRequest extends TypingInstallerRequestWithProjectName {
5152 readonly kind: "installPackage";
5153 readonly fileName: Path;
5154 readonly packageName: string;
5155 readonly projectRootPath: Path;
5156 }
5157 interface PackageInstalledResponse extends ProjectResponse {
5158 readonly kind: ActionPackageInstalled;
5159 readonly success: boolean;
5160 readonly message: string;
5161 }
5162 interface InitializationFailedResponse extends TypingInstallerResponse {
5163 readonly kind: EventInitializationFailed;
5164 readonly message: string;
5165 readonly stack?: string;
5166 }
5167 interface ProjectResponse extends TypingInstallerResponse {
5168 readonly projectName: string;
5169 }
5170 interface InvalidateCachedTypings extends ProjectResponse {
5171 readonly kind: ActionInvalidate;
5172 }
5173 interface InstallTypes extends ProjectResponse {
5174 readonly kind: EventBeginInstallTypes | EventEndInstallTypes;
5175 readonly eventId: number;
5176 readonly typingsInstallerVersion: string;
5177 readonly packagesToInstall: readonly string[];
5178 }
5179 interface BeginInstallTypes extends InstallTypes {
5180 readonly kind: EventBeginInstallTypes;
5181 }
5182 interface EndInstallTypes extends InstallTypes {
5183 readonly kind: EventEndInstallTypes;
5184 readonly installSuccess: boolean;
5185 }
5186 interface SetTypings extends ProjectResponse {
5187 readonly typeAcquisition: TypeAcquisition;
5188 readonly compilerOptions: CompilerOptions;
5189 readonly typings: string[];
5190 readonly unresolvedImports: SortedReadonlyArray<string>;
5191 readonly kind: ActionSet;
5192 }
5193}
5194declare namespace ts {
5195 interface Node {
5196 getSourceFile(): SourceFile;
5197 getChildCount(sourceFile?: SourceFile): number;
5198 getChildAt(index: number, sourceFile?: SourceFile): Node;
5199 getChildren(sourceFile?: SourceFile): Node[];
5200 getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number;
5201 getFullStart(): number;
5202 getEnd(): number;
5203 getWidth(sourceFile?: SourceFileLike): number;
5204 getFullWidth(): number;
5205 getLeadingTriviaWidth(sourceFile?: SourceFile): number;
5206 getFullText(sourceFile?: SourceFile): string;
5207 getText(sourceFile?: SourceFile): string;
5208 getFirstToken(sourceFile?: SourceFile): Node | undefined;
5209 getLastToken(sourceFile?: SourceFile): Node | undefined;
5210 forEachChild<T>(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
5211 }
5212 interface Identifier {
5213 readonly text: string;
5214 }
5215 interface PrivateIdentifier {
5216 readonly text: string;
5217 }
5218 interface Symbol {
5219 readonly name: string;
5220 getFlags(): SymbolFlags;
5221 getEscapedName(): __String;
5222 getName(): string;
5223 getDeclarations(): Declaration[] | undefined;
5224 getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];
5225 getJsDocTags(): JSDocTagInfo[];
5226 }
5227 interface Type {
5228 getFlags(): TypeFlags;
5229 getSymbol(): Symbol | undefined;
5230 getProperties(): Symbol[];
5231 getProperty(propertyName: string): Symbol | undefined;
5232 getApparentProperties(): Symbol[];
5233 getCallSignatures(): readonly Signature[];
5234 getConstructSignatures(): readonly Signature[];
5235 getStringIndexType(): Type | undefined;
5236 getNumberIndexType(): Type | undefined;
5237 getBaseTypes(): BaseType[] | undefined;
5238 getNonNullableType(): Type;
5239 getConstraint(): Type | undefined;
5240 getDefault(): Type | undefined;
5241 isUnion(): this is UnionType;
5242 isIntersection(): this is IntersectionType;
5243 isUnionOrIntersection(): this is UnionOrIntersectionType;
5244 isLiteral(): this is LiteralType;
5245 isStringLiteral(): this is StringLiteralType;
5246 isNumberLiteral(): this is NumberLiteralType;
5247 isTypeParameter(): this is TypeParameter;
5248 isClassOrInterface(): this is InterfaceType;
5249 isClass(): this is InterfaceType;
5250 }
5251 interface TypeReference {
5252 typeArguments?: readonly Type[];
5253 }
5254 interface Signature {
5255 getDeclaration(): SignatureDeclaration;
5256 getTypeParameters(): TypeParameter[] | undefined;
5257 getParameters(): Symbol[];
5258 getReturnType(): Type;
5259 getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];
5260 getJsDocTags(): JSDocTagInfo[];
5261 }
5262 interface SourceFile {
5263 getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
5264 getLineEndOfPosition(pos: number): number;
5265 getLineStarts(): readonly number[];
5266 getPositionOfLineAndCharacter(line: number, character: number): number;
5267 update(newText: string, textChangeRange: TextChangeRange): SourceFile;
5268 }
5269 interface SourceFileLike {
5270 getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
5271 }
5272 interface SourceMapSource {
5273 getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
5274 }
5275 /**
5276 * Represents an immutable snapshot of a script at a specified time.Once acquired, the
5277 * snapshot is observably immutable. i.e. the same calls with the same parameters will return
5278 * the same values.
5279 */
5280 interface IScriptSnapshot {
5281 /** Gets a portion of the script snapshot specified by [start, end). */
5282 getText(start: number, end: number): string;
5283 /** Gets the length of this script snapshot. */
5284 getLength(): number;
5285 /**
5286 * Gets the TextChangeRange that describe how the text changed between this text and
5287 * an older version. This information is used by the incremental parser to determine
5288 * what sections of the script need to be re-parsed. 'undefined' can be returned if the
5289 * change range cannot be determined. However, in that case, incremental parsing will
5290 * not happen and the entire document will be re - parsed.
5291 */
5292 getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange | undefined;
5293 /** Releases all resources held by this script snapshot */
5294 dispose?(): void;
5295 }
5296 namespace ScriptSnapshot {
5297 function fromString(text: string): IScriptSnapshot;
5298 }
5299 interface PreProcessedFileInfo {
5300 referencedFiles: FileReference[];
5301 typeReferenceDirectives: FileReference[];
5302 libReferenceDirectives: FileReference[];
5303 importedFiles: FileReference[];
5304 ambientExternalModules?: string[];
5305 isLibFile: boolean;
5306 }
5307 interface HostCancellationToken {
5308 isCancellationRequested(): boolean;
5309 }
5310 interface InstallPackageOptions {
5311 fileName: Path;
5312 packageName: string;
5313 }
5314 interface PerformanceEvent {
5315 kind: "UpdateGraph" | "CreatePackageJsonAutoImportProvider";
5316 durationMs: number;
5317 }
5318 enum LanguageServiceMode {
5319 Semantic = 0,
5320 PartialSemantic = 1,
5321 Syntactic = 2
5322 }
5323 interface LanguageServiceHost extends GetEffectiveTypeRootsHost {
5324 getCompilationSettings(): CompilerOptions;
5325 getNewLine?(): string;
5326 getProjectVersion?(): string;
5327 getScriptFileNames(): string[];
5328 getScriptKind?(fileName: string): ScriptKind;
5329 getScriptVersion(fileName: string): string;
5330 getScriptSnapshot(fileName: string): IScriptSnapshot | undefined;
5331 getProjectReferences?(): readonly ProjectReference[] | undefined;
5332 getLocalizedDiagnosticMessages?(): any;
5333 getCancellationToken?(): HostCancellationToken;
5334 getCurrentDirectory(): string;
5335 getDefaultLibFileName(options: CompilerOptions): string;
5336 log?(s: string): void;
5337 trace?(s: string): void;
5338 error?(s: string): void;
5339 useCaseSensitiveFileNames?(): boolean;
5340 readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
5341 readFile?(path: string, encoding?: string): string | undefined;
5342 realpath?(path: string): string;
5343 fileExists?(path: string): boolean;
5344 getTypeRootsVersion?(): number;
5345 resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedModule | undefined)[];
5346 getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string): ResolvedModuleWithFailedLookupLocations | undefined;
5347 resolveTypeReferenceDirectives?(typeDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[];
5348 getDirectories?(directoryName: string): string[];
5349 /**
5350 * Gets a set of custom transformers to use during emit.
5351 */
5352 getCustomTransformers?(): CustomTransformers | undefined;
5353 isKnownTypesPackageName?(name: string): boolean;
5354 installPackage?(options: InstallPackageOptions): Promise<ApplyCodeActionCommandResult>;
5355 writeFile?(fileName: string, content: string): void;
5356 }
5357 type WithMetadata<T> = T & {
5358 metadata?: unknown;
5359 };
5360 interface LanguageService {
5361 /** This is used as a part of restarting the language service. */
5362 cleanupSemanticCache(): void;
5363 /**
5364 * Gets errors indicating invalid syntax in a file.
5365 *
5366 * In English, "this cdeo have, erorrs" is syntactically invalid because it has typos,
5367 * grammatical errors, and misplaced punctuation. Likewise, examples of syntax
5368 * errors in TypeScript are missing parentheses in an `if` statement, mismatched
5369 * curly braces, and using a reserved keyword as a variable name.
5370 *
5371 * These diagnostics are inexpensive to compute and don't require knowledge of
5372 * other files. Note that a non-empty result increases the likelihood of false positives
5373 * from `getSemanticDiagnostics`.
5374 *
5375 * While these represent the majority of syntax-related diagnostics, there are some
5376 * that require the type system, which will be present in `getSemanticDiagnostics`.
5377 *
5378 * @param fileName A path to the file you want syntactic diagnostics for
5379 */
5380 getSyntacticDiagnostics(fileName: string): DiagnosticWithLocation[];
5381 /**
5382 * Gets warnings or errors indicating type system issues in a given file.
5383 * Requesting semantic diagnostics may start up the type system and
5384 * run deferred work, so the first call may take longer than subsequent calls.
5385 *
5386 * Unlike the other get*Diagnostics functions, these diagnostics can potentially not
5387 * include a reference to a source file. Specifically, the first time this is called,
5388 * it will return global diagnostics with no associated location.
5389 *
5390 * To contrast the differences between semantic and syntactic diagnostics, consider the
5391 * sentence: "The sun is green." is syntactically correct; those are real English words with
5392 * correct sentence structure. However, it is semantically invalid, because it is not true.
5393 *
5394 * @param fileName A path to the file you want semantic diagnostics for
5395 */
5396 getSemanticDiagnostics(fileName: string): Diagnostic[];
5397 /**
5398 * Gets suggestion diagnostics for a specific file. These diagnostics tend to
5399 * proactively suggest refactors, as opposed to diagnostics that indicate
5400 * potentially incorrect runtime behavior.
5401 *
5402 * @param fileName A path to the file you want semantic diagnostics for
5403 */
5404 getSuggestionDiagnostics(fileName: string): DiagnosticWithLocation[];
5405 /**
5406 * Gets global diagnostics related to the program configuration and compiler options.
5407 */
5408 getCompilerOptionsDiagnostics(): Diagnostic[];
5409 /** @deprecated Use getEncodedSyntacticClassifications instead. */
5410 getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
5411 /** @deprecated Use getEncodedSemanticClassifications instead. */
5412 getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
5413 getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications;
5414 getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications;
5415 /**
5416 * Gets completion entries at a particular position in a file.
5417 *
5418 * @param fileName The path to the file
5419 * @param position A zero-based index of the character where you want the entries
5420 * @param options An object describing how the request was triggered and what kinds
5421 * of code actions can be returned with the completions.
5422 */
5423 getCompletionsAtPosition(fileName: string, position: number, options: GetCompletionsAtPositionOptions | undefined): WithMetadata<CompletionInfo> | undefined;
5424 /**
5425 * Gets the extended details for a completion entry retrieved from `getCompletionsAtPosition`.
5426 *
5427 * @param fileName The path to the file
5428 * @param position A zero based index of the character where you want the entries
5429 * @param entryName The name from an existing completion which came from `getCompletionsAtPosition`
5430 * @param formatOptions How should code samples in the completions be formatted, can be undefined for backwards compatibility
5431 * @param source Source code for the current file, can be undefined for backwards compatibility
5432 * @param preferences User settings, can be undefined for backwards compatibility
5433 */
5434 getCompletionEntryDetails(fileName: string, position: number, entryName: string, formatOptions: FormatCodeOptions | FormatCodeSettings | undefined, source: string | undefined, preferences: UserPreferences | undefined): CompletionEntryDetails | undefined;
5435 getCompletionEntrySymbol(fileName: string, position: number, name: string, source: string | undefined): Symbol | undefined;
5436 /**
5437 * Gets semantic information about the identifier at a particular position in a
5438 * file. Quick info is what you typically see when you hover in an editor.
5439 *
5440 * @param fileName The path to the file
5441 * @param position A zero-based index of the character where you want the quick info
5442 */
5443 getQuickInfoAtPosition(fileName: string, position: number): QuickInfo | undefined;
5444 getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan | undefined;
5445 getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan | undefined;
5446 getSignatureHelpItems(fileName: string, position: number, options: SignatureHelpItemsOptions | undefined): SignatureHelpItems | undefined;
5447 getRenameInfo(fileName: string, position: number, options?: RenameInfoOptions): RenameInfo;
5448 findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename?: boolean): readonly RenameLocation[] | undefined;
5449 getSmartSelectionRange(fileName: string, position: number): SelectionRange;
5450 getDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined;
5451 getDefinitionAndBoundSpan(fileName: string, position: number): DefinitionInfoAndBoundSpan | undefined;
5452 getTypeDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined;
5453 getImplementationAtPosition(fileName: string, position: number): readonly ImplementationLocation[] | undefined;
5454 getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[] | undefined;
5455 findReferences(fileName: string, position: number): ReferencedSymbol[] | undefined;
5456 getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[] | undefined;
5457 /** @deprecated */
5458 getOccurrencesAtPosition(fileName: string, position: number): readonly ReferenceEntry[] | undefined;
5459 getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[];
5460 getNavigationBarItems(fileName: string): NavigationBarItem[];
5461 getNavigationTree(fileName: string): NavigationTree;
5462 prepareCallHierarchy(fileName: string, position: number): CallHierarchyItem | CallHierarchyItem[] | undefined;
5463 provideCallHierarchyIncomingCalls(fileName: string, position: number): CallHierarchyIncomingCall[];
5464 provideCallHierarchyOutgoingCalls(fileName: string, position: number): CallHierarchyOutgoingCall[];
5465 getOutliningSpans(fileName: string): OutliningSpan[];
5466 getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[];
5467 getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[];
5468 getIndentationAtPosition(fileName: string, position: number, options: EditorOptions | EditorSettings): number;
5469 getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
5470 getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
5471 getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
5472 getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion | undefined;
5473 isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean;
5474 /**
5475 * 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.
5476 * Editors should call this after `>` is typed.
5477 */
5478 getJsxClosingTagAtPosition(fileName: string, position: number): JsxClosingTagInfo | undefined;
5479 getSpanOfEnclosingComment(fileName: string, position: number, onlyMultiLine: boolean): TextSpan | undefined;
5480 toLineColumnOffset?(fileName: string, position: number): LineAndCharacter;
5481 getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences): readonly CodeFixAction[];
5482 getCombinedCodeFix(scope: CombinedCodeFixScope, fixId: {}, formatOptions: FormatCodeSettings, preferences: UserPreferences): CombinedCodeActions;
5483 applyCodeActionCommand(action: CodeActionCommand, formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult>;
5484 applyCodeActionCommand(action: CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult[]>;
5485 applyCodeActionCommand(action: CodeActionCommand | CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>;
5486 /** @deprecated `fileName` will be ignored */
5487 applyCodeActionCommand(fileName: string, action: CodeActionCommand): Promise<ApplyCodeActionCommandResult>;
5488 /** @deprecated `fileName` will be ignored */
5489 applyCodeActionCommand(fileName: string, action: CodeActionCommand[]): Promise<ApplyCodeActionCommandResult[]>;
5490 /** @deprecated `fileName` will be ignored */
5491 applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>;
5492 getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason): ApplicableRefactorInfo[];
5493 getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined;
5494 organizeImports(scope: OrganizeImportsScope, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
5495 getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
5496 getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean, forceDtsEmit?: boolean): EmitOutput;
5497 getProgram(): Program | undefined;
5498 toggleLineComment(fileName: string, textRange: TextRange): TextChange[];
5499 toggleMultilineComment(fileName: string, textRange: TextRange): TextChange[];
5500 commentSelection(fileName: string, textRange: TextRange): TextChange[];
5501 uncommentSelection(fileName: string, textRange: TextRange): TextChange[];
5502 dispose(): void;
5503 }
5504 interface JsxClosingTagInfo {
5505 readonly newText: string;
5506 }
5507 interface CombinedCodeFixScope {
5508 type: "file";
5509 fileName: string;
5510 }
5511 type OrganizeImportsScope = CombinedCodeFixScope;
5512 type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#";
5513 interface GetCompletionsAtPositionOptions extends UserPreferences {
5514 /**
5515 * If the editor is asking for completions because a certain character was typed
5516 * (as opposed to when the user explicitly requested them) this should be set.
5517 */
5518 triggerCharacter?: CompletionsTriggerCharacter;
5519 /** @deprecated Use includeCompletionsForModuleExports */
5520 includeExternalModuleExports?: boolean;
5521 /** @deprecated Use includeCompletionsWithInsertText */
5522 includeInsertTextCompletions?: boolean;
5523 }
5524 type SignatureHelpTriggerCharacter = "," | "(" | "<";
5525 type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")";
5526 interface SignatureHelpItemsOptions {
5527 triggerReason?: SignatureHelpTriggerReason;
5528 }
5529 type SignatureHelpTriggerReason = SignatureHelpInvokedReason | SignatureHelpCharacterTypedReason | SignatureHelpRetriggeredReason;
5530 /**
5531 * Signals that the user manually requested signature help.
5532 * The language service will unconditionally attempt to provide a result.
5533 */
5534 interface SignatureHelpInvokedReason {
5535 kind: "invoked";
5536 triggerCharacter?: undefined;
5537 }
5538 /**
5539 * Signals that the signature help request came from a user typing a character.
5540 * Depending on the character and the syntactic context, the request may or may not be served a result.
5541 */
5542 interface SignatureHelpCharacterTypedReason {
5543 kind: "characterTyped";
5544 /**
5545 * Character that was responsible for triggering signature help.
5546 */
5547 triggerCharacter: SignatureHelpTriggerCharacter;
5548 }
5549 /**
5550 * Signals that this signature help request came from typing a character or moving the cursor.
5551 * This should only occur if a signature help session was already active and the editor needs to see if it should adjust.
5552 * The language service will unconditionally attempt to provide a result.
5553 * `triggerCharacter` can be `undefined` for a retrigger caused by a cursor move.
5554 */
5555 interface SignatureHelpRetriggeredReason {
5556 kind: "retrigger";
5557 /**
5558 * Character that was responsible for triggering signature help.
5559 */
5560 triggerCharacter?: SignatureHelpRetriggerCharacter;
5561 }
5562 interface ApplyCodeActionCommandResult {
5563 successMessage: string;
5564 }
5565 interface Classifications {
5566 spans: number[];
5567 endOfLineState: EndOfLineState;
5568 }
5569 interface ClassifiedSpan {
5570 textSpan: TextSpan;
5571 classificationType: ClassificationTypeNames;
5572 }
5573 /**
5574 * Navigation bar interface designed for visual studio's dual-column layout.
5575 * This does not form a proper tree.
5576 * The navbar is returned as a list of top-level items, each of which has a list of child items.
5577 * Child items always have an empty array for their `childItems`.
5578 */
5579 interface NavigationBarItem {
5580 text: string;
5581 kind: ScriptElementKind;
5582 kindModifiers: string;
5583 spans: TextSpan[];
5584 childItems: NavigationBarItem[];
5585 indent: number;
5586 bolded: boolean;
5587 grayed: boolean;
5588 }
5589 /**
5590 * Node in a tree of nested declarations in a file.
5591 * The top node is always a script or module node.
5592 */
5593 interface NavigationTree {
5594 /** Name of the declaration, or a short description, e.g. "<class>". */
5595 text: string;
5596 kind: ScriptElementKind;
5597 /** ScriptElementKindModifier separated by commas, e.g. "public,abstract" */
5598 kindModifiers: string;
5599 /**
5600 * Spans of the nodes that generated this declaration.
5601 * There will be more than one if this is the result of merging.
5602 */
5603 spans: TextSpan[];
5604 nameSpan: TextSpan | undefined;
5605 /** Present if non-empty */
5606 childItems?: NavigationTree[];
5607 }
5608 interface CallHierarchyItem {
5609 name: string;
5610 kind: ScriptElementKind;
5611 kindModifiers?: string;
5612 file: string;
5613 span: TextSpan;
5614 selectionSpan: TextSpan;
5615 containerName?: string;
5616 }
5617 interface CallHierarchyIncomingCall {
5618 from: CallHierarchyItem;
5619 fromSpans: TextSpan[];
5620 }
5621 interface CallHierarchyOutgoingCall {
5622 to: CallHierarchyItem;
5623 fromSpans: TextSpan[];
5624 }
5625 interface TodoCommentDescriptor {
5626 text: string;
5627 priority: number;
5628 }
5629 interface TodoComment {
5630 descriptor: TodoCommentDescriptor;
5631 message: string;
5632 position: number;
5633 }
5634 interface TextChange {
5635 span: TextSpan;
5636 newText: string;
5637 }
5638 interface FileTextChanges {
5639 fileName: string;
5640 textChanges: readonly TextChange[];
5641 isNewFile?: boolean;
5642 }
5643 interface CodeAction {
5644 /** Description of the code action to display in the UI of the editor */
5645 description: string;
5646 /** Text changes to apply to each file as part of the code action */
5647 changes: FileTextChanges[];
5648 /**
5649 * If the user accepts the code fix, the editor should send the action back in a `applyAction` request.
5650 * This allows the language service to have side effects (e.g. installing dependencies) upon a code fix.
5651 */
5652 commands?: CodeActionCommand[];
5653 }
5654 interface CodeFixAction extends CodeAction {
5655 /** Short name to identify the fix, for use by telemetry. */
5656 fixName: string;
5657 /**
5658 * If present, one may call 'getCombinedCodeFix' with this fixId.
5659 * This may be omitted to indicate that the code fix can't be applied in a group.
5660 */
5661 fixId?: {};
5662 fixAllDescription?: string;
5663 }
5664 interface CombinedCodeActions {
5665 changes: readonly FileTextChanges[];
5666 commands?: readonly CodeActionCommand[];
5667 }
5668 type CodeActionCommand = InstallPackageAction;
5669 interface InstallPackageAction {
5670 }
5671 /**
5672 * A set of one or more available refactoring actions, grouped under a parent refactoring.
5673 */
5674 interface ApplicableRefactorInfo {
5675 /**
5676 * The programmatic name of the refactoring
5677 */
5678 name: string;
5679 /**
5680 * A description of this refactoring category to show to the user.
5681 * If the refactoring gets inlined (see below), this text will not be visible.
5682 */
5683 description: string;
5684 /**
5685 * Inlineable refactorings can have their actions hoisted out to the top level
5686 * of a context menu. Non-inlineanable refactorings should always be shown inside
5687 * their parent grouping.
5688 *
5689 * If not specified, this value is assumed to be 'true'
5690 */
5691 inlineable?: boolean;
5692 actions: RefactorActionInfo[];
5693 }
5694 /**
5695 * Represents a single refactoring action - for example, the "Extract Method..." refactor might
5696 * offer several actions, each corresponding to a surround class or closure to extract into.
5697 */
5698 interface RefactorActionInfo {
5699 /**
5700 * The programmatic name of the refactoring action
5701 */
5702 name: string;
5703 /**
5704 * A description of this refactoring action to show to the user.
5705 * If the parent refactoring is inlined away, this will be the only text shown,
5706 * so this description should make sense by itself if the parent is inlineable=true
5707 */
5708 description: string;
5709 /**
5710 * A message to show to the user if the refactoring cannot be applied in
5711 * the current context.
5712 */
5713 notApplicableReason?: string;
5714 }
5715 /**
5716 * A set of edits to make in response to a refactor action, plus an optional
5717 * location where renaming should be invoked from
5718 */
5719 interface RefactorEditInfo {
5720 edits: FileTextChanges[];
5721 renameFilename?: string;
5722 renameLocation?: number;
5723 commands?: CodeActionCommand[];
5724 }
5725 type RefactorTriggerReason = "implicit" | "invoked";
5726 interface TextInsertion {
5727 newText: string;
5728 /** The position in newText the caret should point to after the insertion. */
5729 caretOffset: number;
5730 }
5731 interface DocumentSpan {
5732 textSpan: TextSpan;
5733 fileName: string;
5734 /**
5735 * If the span represents a location that was remapped (e.g. via a .d.ts.map file),
5736 * then the original filename and span will be specified here
5737 */
5738 originalTextSpan?: TextSpan;
5739 originalFileName?: string;
5740 /**
5741 * If DocumentSpan.textSpan is the span for name of the declaration,
5742 * then this is the span for relevant declaration
5743 */
5744 contextSpan?: TextSpan;
5745 originalContextSpan?: TextSpan;
5746 }
5747 interface RenameLocation extends DocumentSpan {
5748 readonly prefixText?: string;
5749 readonly suffixText?: string;
5750 }
5751 interface ReferenceEntry extends DocumentSpan {
5752 isWriteAccess: boolean;
5753 isDefinition: boolean;
5754 isInString?: true;
5755 }
5756 interface ImplementationLocation extends DocumentSpan {
5757 kind: ScriptElementKind;
5758 displayParts: SymbolDisplayPart[];
5759 }
5760 enum HighlightSpanKind {
5761 none = "none",
5762 definition = "definition",
5763 reference = "reference",
5764 writtenReference = "writtenReference"
5765 }
5766 interface HighlightSpan {
5767 fileName?: string;
5768 isInString?: true;
5769 textSpan: TextSpan;
5770 contextSpan?: TextSpan;
5771 kind: HighlightSpanKind;
5772 }
5773 interface NavigateToItem {
5774 name: string;
5775 kind: ScriptElementKind;
5776 kindModifiers: string;
5777 matchKind: "exact" | "prefix" | "substring" | "camelCase";
5778 isCaseSensitive: boolean;
5779 fileName: string;
5780 textSpan: TextSpan;
5781 containerName: string;
5782 containerKind: ScriptElementKind;
5783 }
5784 enum IndentStyle {
5785 None = 0,
5786 Block = 1,
5787 Smart = 2
5788 }
5789 enum SemicolonPreference {
5790 Ignore = "ignore",
5791 Insert = "insert",
5792 Remove = "remove"
5793 }
5794 interface EditorOptions {
5795 BaseIndentSize?: number;
5796 IndentSize: number;
5797 TabSize: number;
5798 NewLineCharacter: string;
5799 ConvertTabsToSpaces: boolean;
5800 IndentStyle: IndentStyle;
5801 }
5802 interface EditorSettings {
5803 baseIndentSize?: number;
5804 indentSize?: number;
5805 tabSize?: number;
5806 newLineCharacter?: string;
5807 convertTabsToSpaces?: boolean;
5808 indentStyle?: IndentStyle;
5809 trimTrailingWhitespace?: boolean;
5810 }
5811 interface FormatCodeOptions extends EditorOptions {
5812 InsertSpaceAfterCommaDelimiter: boolean;
5813 InsertSpaceAfterSemicolonInForStatements: boolean;
5814 InsertSpaceBeforeAndAfterBinaryOperators: boolean;
5815 InsertSpaceAfterConstructor?: boolean;
5816 InsertSpaceAfterKeywordsInControlFlowStatements: boolean;
5817 InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean;
5818 InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
5819 InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean;
5820 InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
5821 InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean;
5822 InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
5823 InsertSpaceAfterTypeAssertion?: boolean;
5824 InsertSpaceBeforeFunctionParenthesis?: boolean;
5825 PlaceOpenBraceOnNewLineForFunctions: boolean;
5826 PlaceOpenBraceOnNewLineForControlBlocks: boolean;
5827 insertSpaceBeforeTypeAnnotation?: boolean;
5828 }
5829 interface FormatCodeSettings extends EditorSettings {
5830 readonly insertSpaceAfterCommaDelimiter?: boolean;
5831 readonly insertSpaceAfterSemicolonInForStatements?: boolean;
5832 readonly insertSpaceBeforeAndAfterBinaryOperators?: boolean;
5833 readonly insertSpaceAfterConstructor?: boolean;
5834 readonly insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
5835 readonly insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
5836 readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
5837 readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
5838 readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
5839 readonly insertSpaceAfterOpeningAndBeforeClosingEmptyBraces?: boolean;
5840 readonly insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
5841 readonly insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
5842 readonly insertSpaceAfterTypeAssertion?: boolean;
5843 readonly insertSpaceBeforeFunctionParenthesis?: boolean;
5844 readonly placeOpenBraceOnNewLineForFunctions?: boolean;
5845 readonly placeOpenBraceOnNewLineForControlBlocks?: boolean;
5846 readonly insertSpaceBeforeTypeAnnotation?: boolean;
5847 readonly indentMultiLineObjectLiteralBeginningOnBlankLine?: boolean;
5848 readonly semicolons?: SemicolonPreference;
5849 }
5850 function getDefaultFormatCodeSettings(newLineCharacter?: string): FormatCodeSettings;
5851 interface DefinitionInfo extends DocumentSpan {
5852 kind: ScriptElementKind;
5853 name: string;
5854 containerKind: ScriptElementKind;
5855 containerName: string;
5856 }
5857 interface DefinitionInfoAndBoundSpan {
5858 definitions?: readonly DefinitionInfo[];
5859 textSpan: TextSpan;
5860 }
5861 interface ReferencedSymbolDefinitionInfo extends DefinitionInfo {
5862 displayParts: SymbolDisplayPart[];
5863 }
5864 interface ReferencedSymbol {
5865 definition: ReferencedSymbolDefinitionInfo;
5866 references: ReferenceEntry[];
5867 }
5868 enum SymbolDisplayPartKind {
5869 aliasName = 0,
5870 className = 1,
5871 enumName = 2,
5872 fieldName = 3,
5873 interfaceName = 4,
5874 keyword = 5,
5875 lineBreak = 6,
5876 numericLiteral = 7,
5877 stringLiteral = 8,
5878 localName = 9,
5879 methodName = 10,
5880 moduleName = 11,
5881 operator = 12,
5882 parameterName = 13,
5883 propertyName = 14,
5884 punctuation = 15,
5885 space = 16,
5886 text = 17,
5887 typeParameterName = 18,
5888 enumMemberName = 19,
5889 functionName = 20,
5890 regularExpressionLiteral = 21
5891 }
5892 interface SymbolDisplayPart {
5893 text: string;
5894 kind: string;
5895 }
5896 interface JSDocTagInfo {
5897 name: string;
5898 text?: string;
5899 }
5900 interface QuickInfo {
5901 kind: ScriptElementKind;
5902 kindModifiers: string;
5903 textSpan: TextSpan;
5904 displayParts?: SymbolDisplayPart[];
5905 documentation?: SymbolDisplayPart[];
5906 tags?: JSDocTagInfo[];
5907 }
5908 type RenameInfo = RenameInfoSuccess | RenameInfoFailure;
5909 interface RenameInfoSuccess {
5910 canRename: true;
5911 /**
5912 * File or directory to rename.
5913 * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`.
5914 */
5915 fileToRename?: string;
5916 displayName: string;
5917 fullDisplayName: string;
5918 kind: ScriptElementKind;
5919 kindModifiers: string;
5920 triggerSpan: TextSpan;
5921 }
5922 interface RenameInfoFailure {
5923 canRename: false;
5924 localizedErrorMessage: string;
5925 }
5926 interface RenameInfoOptions {
5927 readonly allowRenameOfImportPath?: boolean;
5928 }
5929 interface SignatureHelpParameter {
5930 name: string;
5931 documentation: SymbolDisplayPart[];
5932 displayParts: SymbolDisplayPart[];
5933 isOptional: boolean;
5934 }
5935 interface SelectionRange {
5936 textSpan: TextSpan;
5937 parent?: SelectionRange;
5938 }
5939 /**
5940 * Represents a single signature to show in signature help.
5941 * The id is used for subsequent calls into the language service to ask questions about the
5942 * signature help item in the context of any documents that have been updated. i.e. after
5943 * an edit has happened, while signature help is still active, the host can ask important
5944 * questions like 'what parameter is the user currently contained within?'.
5945 */
5946 interface SignatureHelpItem {
5947 isVariadic: boolean;
5948 prefixDisplayParts: SymbolDisplayPart[];
5949 suffixDisplayParts: SymbolDisplayPart[];
5950 separatorDisplayParts: SymbolDisplayPart[];
5951 parameters: SignatureHelpParameter[];
5952 documentation: SymbolDisplayPart[];
5953 tags: JSDocTagInfo[];
5954 }
5955 /**
5956 * Represents a set of signature help items, and the preferred item that should be selected.
5957 */
5958 interface SignatureHelpItems {
5959 items: SignatureHelpItem[];
5960 applicableSpan: TextSpan;
5961 selectedItemIndex: number;
5962 argumentIndex: number;
5963 argumentCount: number;
5964 }
5965 interface CompletionInfo {
5966 /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */
5967 isGlobalCompletion: boolean;
5968 isMemberCompletion: boolean;
5969 /**
5970 * true when the current location also allows for a new identifier
5971 */
5972 isNewIdentifierLocation: boolean;
5973 entries: CompletionEntry[];
5974 }
5975 interface CompletionEntry {
5976 name: string;
5977 kind: ScriptElementKind;
5978 kindModifiers?: string;
5979 sortText: string;
5980 insertText?: string;
5981 /**
5982 * An optional span that indicates the text to be replaced by this completion item.
5983 * If present, this span should be used instead of the default one.
5984 * It will be set if the required span differs from the one generated by the default replacement behavior.
5985 */
5986 replacementSpan?: TextSpan;
5987 hasAction?: true;
5988 source?: string;
5989 isRecommended?: true;
5990 isFromUncheckedFile?: true;
5991 isPackageJsonImport?: true;
5992 }
5993 interface CompletionEntryDetails {
5994 name: string;
5995 kind: ScriptElementKind;
5996 kindModifiers: string;
5997 displayParts: SymbolDisplayPart[];
5998 documentation?: SymbolDisplayPart[];
5999 tags?: JSDocTagInfo[];
6000 codeActions?: CodeAction[];
6001 source?: SymbolDisplayPart[];
6002 }
6003 interface OutliningSpan {
6004 /** The span of the document to actually collapse. */
6005 textSpan: TextSpan;
6006 /** The span of the document to display when the user hovers over the collapsed span. */
6007 hintSpan: TextSpan;
6008 /** The text to display in the editor for the collapsed region. */
6009 bannerText: string;
6010 /**
6011 * Whether or not this region should be automatically collapsed when
6012 * the 'Collapse to Definitions' command is invoked.
6013 */
6014 autoCollapse: boolean;
6015 /**
6016 * Classification of the contents of the span
6017 */
6018 kind: OutliningSpanKind;
6019 }
6020 enum OutliningSpanKind {
6021 /** Single or multi-line comments */
6022 Comment = "comment",
6023 /** Sections marked by '// #region' and '// #endregion' comments */
6024 Region = "region",
6025 /** Declarations and expressions */
6026 Code = "code",
6027 /** Contiguous blocks of import declarations */
6028 Imports = "imports"
6029 }
6030 enum OutputFileType {
6031 JavaScript = 0,
6032 SourceMap = 1,
6033 Declaration = 2
6034 }
6035 enum EndOfLineState {
6036 None = 0,
6037 InMultiLineCommentTrivia = 1,
6038 InSingleQuoteStringLiteral = 2,
6039 InDoubleQuoteStringLiteral = 3,
6040 InTemplateHeadOrNoSubstitutionTemplate = 4,
6041 InTemplateMiddleOrTail = 5,
6042 InTemplateSubstitutionPosition = 6
6043 }
6044 enum TokenClass {
6045 Punctuation = 0,
6046 Keyword = 1,
6047 Operator = 2,
6048 Comment = 3,
6049 Whitespace = 4,
6050 Identifier = 5,
6051 NumberLiteral = 6,
6052 BigIntLiteral = 7,
6053 StringLiteral = 8,
6054 RegExpLiteral = 9
6055 }
6056 interface ClassificationResult {
6057 finalLexState: EndOfLineState;
6058 entries: ClassificationInfo[];
6059 }
6060 interface ClassificationInfo {
6061 length: number;
6062 classification: TokenClass;
6063 }
6064 interface Classifier {
6065 /**
6066 * Gives lexical classifications of tokens on a line without any syntactic context.
6067 * For instance, a token consisting of the text 'string' can be either an identifier
6068 * named 'string' or the keyword 'string', however, because this classifier is not aware,
6069 * it relies on certain heuristics to give acceptable results. For classifications where
6070 * speed trumps accuracy, this function is preferable; however, for true accuracy, the
6071 * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the
6072 * lexical, syntactic, and semantic classifiers may issue the best user experience.
6073 *
6074 * @param text The text of a line to classify.
6075 * @param lexState The state of the lexical classifier at the end of the previous line.
6076 * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier.
6077 * If there is no syntactic classifier (syntacticClassifierAbsent=true),
6078 * certain heuristics may be used in its place; however, if there is a
6079 * syntactic classifier (syntacticClassifierAbsent=false), certain
6080 * classifications which may be incorrectly categorized will be given
6081 * back as Identifiers in order to allow the syntactic classifier to
6082 * subsume the classification.
6083 * @deprecated Use getLexicalClassifications instead.
6084 */
6085 getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult;
6086 getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications;
6087 }
6088 enum ScriptElementKind {
6089 unknown = "",
6090 warning = "warning",
6091 /** predefined type (void) or keyword (class) */
6092 keyword = "keyword",
6093 /** top level script node */
6094 scriptElement = "script",
6095 /** module foo {} */
6096 moduleElement = "module",
6097 /** class X {} */
6098 classElement = "class",
6099 /** var x = class X {} */
6100 localClassElement = "local class",
6101 /** interface Y {} */
6102 interfaceElement = "interface",
6103 /** type T = ... */
6104 typeElement = "type",
6105 /** enum E */
6106 enumElement = "enum",
6107 enumMemberElement = "enum member",
6108 /**
6109 * Inside module and script only
6110 * const v = ..
6111 */
6112 variableElement = "var",
6113 /** Inside function */
6114 localVariableElement = "local var",
6115 /**
6116 * Inside module and script only
6117 * function f() { }
6118 */
6119 functionElement = "function",
6120 /** Inside function */
6121 localFunctionElement = "local function",
6122 /** class X { [public|private]* foo() {} } */
6123 memberFunctionElement = "method",
6124 /** class X { [public|private]* [get|set] foo:number; } */
6125 memberGetAccessorElement = "getter",
6126 memberSetAccessorElement = "setter",
6127 /**
6128 * class X { [public|private]* foo:number; }
6129 * interface Y { foo:number; }
6130 */
6131 memberVariableElement = "property",
6132 /** class X { constructor() { } } */
6133 constructorImplementationElement = "constructor",
6134 /** interface Y { ():number; } */
6135 callSignatureElement = "call",
6136 /** interface Y { []:number; } */
6137 indexSignatureElement = "index",
6138 /** interface Y { new():Y; } */
6139 constructSignatureElement = "construct",
6140 /** function foo(*Y*: string) */
6141 parameterElement = "parameter",
6142 typeParameterElement = "type parameter",
6143 primitiveType = "primitive type",
6144 label = "label",
6145 alias = "alias",
6146 constElement = "const",
6147 letElement = "let",
6148 directory = "directory",
6149 externalModuleName = "external module name",
6150 /**
6151 * <JsxTagName attribute1 attribute2={0} />
6152 */
6153 jsxAttribute = "JSX attribute",
6154 /** String literal */
6155 string = "string"
6156 }
6157 enum ScriptElementKindModifier {
6158 none = "",
6159 publicMemberModifier = "public",
6160 privateMemberModifier = "private",
6161 protectedMemberModifier = "protected",
6162 exportedModifier = "export",
6163 ambientModifier = "declare",
6164 staticModifier = "static",
6165 abstractModifier = "abstract",
6166 optionalModifier = "optional",
6167 deprecatedModifier = "deprecated",
6168 dtsModifier = ".d.ts",
6169 tsModifier = ".ts",
6170 tsxModifier = ".tsx",
6171 jsModifier = ".js",
6172 jsxModifier = ".jsx",
6173 jsonModifier = ".json"
6174 }
6175 enum ClassificationTypeNames {
6176 comment = "comment",
6177 identifier = "identifier",
6178 keyword = "keyword",
6179 numericLiteral = "number",
6180 bigintLiteral = "bigint",
6181 operator = "operator",
6182 stringLiteral = "string",
6183 whiteSpace = "whitespace",
6184 text = "text",
6185 punctuation = "punctuation",
6186 className = "class name",
6187 enumName = "enum name",
6188 interfaceName = "interface name",
6189 moduleName = "module name",
6190 typeParameterName = "type parameter name",
6191 typeAliasName = "type alias name",
6192 parameterName = "parameter name",
6193 docCommentTagName = "doc comment tag name",
6194 jsxOpenTagName = "jsx open tag name",
6195 jsxCloseTagName = "jsx close tag name",
6196 jsxSelfClosingTagName = "jsx self closing tag name",
6197 jsxAttribute = "jsx attribute",
6198 jsxText = "jsx text",
6199 jsxAttributeStringLiteralValue = "jsx attribute string literal value"
6200 }
6201 enum ClassificationType {
6202 comment = 1,
6203 identifier = 2,
6204 keyword = 3,
6205 numericLiteral = 4,
6206 operator = 5,
6207 stringLiteral = 6,
6208 regularExpressionLiteral = 7,
6209 whiteSpace = 8,
6210 text = 9,
6211 punctuation = 10,
6212 className = 11,
6213 enumName = 12,
6214 interfaceName = 13,
6215 moduleName = 14,
6216 typeParameterName = 15,
6217 typeAliasName = 16,
6218 parameterName = 17,
6219 docCommentTagName = 18,
6220 jsxOpenTagName = 19,
6221 jsxCloseTagName = 20,
6222 jsxSelfClosingTagName = 21,
6223 jsxAttribute = 22,
6224 jsxText = 23,
6225 jsxAttributeStringLiteralValue = 24,
6226 bigintLiteral = 25
6227 }
6228}
6229declare namespace ts {
6230 /** The classifier is used for syntactic highlighting in editors via the TSServer */
6231 function createClassifier(): Classifier;
6232}
6233declare namespace ts {
6234 interface DocumentHighlights {
6235 fileName: string;
6236 highlightSpans: HighlightSpan[];
6237 }
6238}
6239declare namespace ts {
6240 /**
6241 * The document registry represents a store of SourceFile objects that can be shared between
6242 * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST)
6243 * of files in the context.
6244 * SourceFile objects account for most of the memory usage by the language service. Sharing
6245 * the same DocumentRegistry instance between different instances of LanguageService allow
6246 * for more efficient memory utilization since all projects will share at least the library
6247 * file (lib.d.ts).
6248 *
6249 * A more advanced use of the document registry is to serialize sourceFile objects to disk
6250 * and re-hydrate them when needed.
6251 *
6252 * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it
6253 * to all subsequent createLanguageService calls.
6254 */
6255 interface DocumentRegistry {
6256 /**
6257 * Request a stored SourceFile with a given fileName and compilationSettings.
6258 * The first call to acquire will call createLanguageServiceSourceFile to generate
6259 * the SourceFile if was not found in the registry.
6260 *
6261 * @param fileName The name of the file requested
6262 * @param compilationSettings Some compilation settings like target affects the
6263 * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
6264 * multiple copies of the same file for different compilation settings.
6265 * @param scriptSnapshot Text of the file. Only used if the file was not found
6266 * in the registry and a new one was created.
6267 * @param version Current version of the file. Only used if the file was not found
6268 * in the registry and a new one was created.
6269 */
6270 acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
6271 acquireDocumentWithKey(fileName: string, path: Path, compilationSettings: CompilerOptions, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
6272 /**
6273 * Request an updated version of an already existing SourceFile with a given fileName
6274 * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile
6275 * to get an updated SourceFile.
6276 *
6277 * @param fileName The name of the file requested
6278 * @param compilationSettings Some compilation settings like target affects the
6279 * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
6280 * multiple copies of the same file for different compilation settings.
6281 * @param scriptSnapshot Text of the file.
6282 * @param version Current version of the file.
6283 */
6284 updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
6285 updateDocumentWithKey(fileName: string, path: Path, compilationSettings: CompilerOptions, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
6286 getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey;
6287 /**
6288 * Informs the DocumentRegistry that a file is not needed any longer.
6289 *
6290 * Note: It is not allowed to call release on a SourceFile that was not acquired from
6291 * this registry originally.
6292 *
6293 * @param fileName The name of the file to be released
6294 * @param compilationSettings The compilation settings used to acquire the file
6295 */
6296 releaseDocument(fileName: string, compilationSettings: CompilerOptions): void;
6297 releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey): void;
6298 reportStats(): string;
6299 }
6300 type DocumentRegistryBucketKey = string & {
6301 __bucketKey: any;
6302 };
6303 function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry;
6304}
6305declare namespace ts {
6306 function preProcessFile(sourceText: string, readImportFiles?: boolean, detectJavaScriptImports?: boolean): PreProcessedFileInfo;
6307}
6308declare namespace ts {
6309 interface TranspileOptions {
6310 compilerOptions?: CompilerOptions;
6311 fileName?: string;
6312 reportDiagnostics?: boolean;
6313 moduleName?: string;
6314 renamedDependencies?: MapLike<string>;
6315 transformers?: CustomTransformers;
6316 }
6317 interface TranspileOutput {
6318 outputText: string;
6319 diagnostics?: Diagnostic[];
6320 sourceMapText?: string;
6321 }
6322 function transpileModule(input: string, transpileOptions: TranspileOptions): TranspileOutput;
6323 function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string;
6324}
6325declare namespace ts {
6326 /** The version of the language service API */
6327 const servicesVersion = "0.8";
6328 function toEditorSettings(options: EditorOptions | EditorSettings): EditorSettings;
6329 function displayPartsToString(displayParts: SymbolDisplayPart[] | undefined): string;
6330 function getDefaultCompilerOptions(): CompilerOptions;
6331 function getSupportedCodeFixes(): string[];
6332 function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile;
6333 function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange | undefined, aggressiveChecks?: boolean): SourceFile;
6334 function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnlyOrLanguageServiceMode?: boolean | LanguageServiceMode): LanguageService;
6335 /**
6336 * Get the path of the default library files (lib.d.ts) as distributed with the typescript
6337 * node package.
6338 * The functionality is not supported if the ts module is consumed outside of a node module.
6339 */
6340 function getDefaultLibFilePath(options: CompilerOptions): string;
6341}
6342declare namespace ts {
6343 /**
6344 * Transform one or more nodes using the supplied transformers.
6345 * @param source A single `Node` or an array of `Node` objects.
6346 * @param transformers An array of `TransformerFactory` callbacks used to process the transformation.
6347 * @param compilerOptions Optional compiler options.
6348 */
6349 function transform<T extends Node>(source: T | T[], transformers: TransformerFactory<T>[], compilerOptions?: CompilerOptions): TransformationResult<T>;
6350}
6351declare namespace ts {
6352 /** @deprecated Use `factory.createNodeArray` or the factory supplied by your transformation context instead. */
6353 const createNodeArray: <T extends Node>(elements?: readonly T[] | undefined, hasTrailingComma?: boolean | undefined) => NodeArray<T>;
6354 /** @deprecated Use `factory.createNumericLiteral` or the factory supplied by your transformation context instead. */
6355 const createNumericLiteral: (value: string | number, numericLiteralFlags?: TokenFlags | undefined) => NumericLiteral;
6356 /** @deprecated Use `factory.createBigIntLiteral` or the factory supplied by your transformation context instead. */
6357 const createBigIntLiteral: (value: string | PseudoBigInt) => BigIntLiteral;
6358 /** @deprecated Use `factory.createStringLiteral` or the factory supplied by your transformation context instead. */
6359 const createStringLiteral: {
6360 (text: string, isSingleQuote?: boolean | undefined): StringLiteral;
6361 (text: string, isSingleQuote?: boolean | undefined, hasExtendedUnicodeEscape?: boolean | undefined): StringLiteral;
6362 };
6363 /** @deprecated Use `factory.createStringLiteralFromNode` or the factory supplied by your transformation context instead. */
6364 const createStringLiteralFromNode: (sourceNode: Identifier | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral, isSingleQuote?: boolean | undefined) => StringLiteral;
6365 /** @deprecated Use `factory.createRegularExpressionLiteral` or the factory supplied by your transformation context instead. */
6366 const createRegularExpressionLiteral: (text: string) => RegularExpressionLiteral;
6367 /** @deprecated Use `factory.createLoopVariable` or the factory supplied by your transformation context instead. */
6368 const createLoopVariable: () => Identifier;
6369 /** @deprecated Use `factory.createUniqueName` or the factory supplied by your transformation context instead. */
6370 const createUniqueName: (text: string, flags?: GeneratedIdentifierFlags | undefined) => Identifier;
6371 /** @deprecated Use `factory.createPrivateIdentifier` or the factory supplied by your transformation context instead. */
6372 const createPrivateIdentifier: (text: string) => PrivateIdentifier;
6373 /** @deprecated Use `factory.createSuper` or the factory supplied by your transformation context instead. */
6374 const createSuper: () => SuperExpression;
6375 /** @deprecated Use `factory.createThis` or the factory supplied by your transformation context instead. */
6376 const createThis: () => ThisExpression;
6377 /** @deprecated Use `factory.createNull` or the factory supplied by your transformation context instead. */
6378 const createNull: () => NullLiteral;
6379 /** @deprecated Use `factory.createTrue` or the factory supplied by your transformation context instead. */
6380 const createTrue: () => TrueLiteral;
6381 /** @deprecated Use `factory.createFalse` or the factory supplied by your transformation context instead. */
6382 const createFalse: () => FalseLiteral;
6383 /** @deprecated Use `factory.createModifier` or the factory supplied by your transformation context instead. */
6384 const createModifier: <T extends ModifierSyntaxKind>(kind: T) => ModifierToken<T>;
6385 /** @deprecated Use `factory.createModifiersFromModifierFlags` or the factory supplied by your transformation context instead. */
6386 const createModifiersFromModifierFlags: (flags: ModifierFlags) => Modifier[];
6387 /** @deprecated Use `factory.createQualifiedName` or the factory supplied by your transformation context instead. */
6388 const createQualifiedName: (left: EntityName, right: string | Identifier) => QualifiedName;
6389 /** @deprecated Use `factory.updateQualifiedName` or the factory supplied by your transformation context instead. */
6390 const updateQualifiedName: (node: QualifiedName, left: EntityName, right: Identifier) => QualifiedName;
6391 /** @deprecated Use `factory.createComputedPropertyName` or the factory supplied by your transformation context instead. */
6392 const createComputedPropertyName: (expression: Expression) => ComputedPropertyName;
6393 /** @deprecated Use `factory.updateComputedPropertyName` or the factory supplied by your transformation context instead. */
6394 const updateComputedPropertyName: (node: ComputedPropertyName, expression: Expression) => ComputedPropertyName;
6395 /** @deprecated Use `factory.createTypeParameterDeclaration` or the factory supplied by your transformation context instead. */
6396 const createTypeParameterDeclaration: (name: string | Identifier, constraint?: TypeNode | undefined, defaultType?: TypeNode | undefined) => TypeParameterDeclaration;
6397 /** @deprecated Use `factory.updateTypeParameterDeclaration` or the factory supplied by your transformation context instead. */
6398 const updateTypeParameterDeclaration: (node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined) => TypeParameterDeclaration;
6399 /** @deprecated Use `factory.createParameterDeclaration` or the factory supplied by your transformation context instead. */
6400 const createParameter: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | Identifier | ObjectBindingPattern | ArrayBindingPattern, questionToken?: QuestionToken | undefined, type?: TypeNode | undefined, initializer?: Expression | undefined) => ParameterDeclaration;
6401 /** @deprecated Use `factory.updateParameterDeclaration` or the factory supplied by your transformation context instead. */
6402 const updateParameter: (node: ParameterDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | Identifier | ObjectBindingPattern | ArrayBindingPattern, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => ParameterDeclaration;
6403 /** @deprecated Use `factory.createDecorator` or the factory supplied by your transformation context instead. */
6404 const createDecorator: (expression: Expression) => Decorator;
6405 /** @deprecated Use `factory.updateDecorator` or the factory supplied by your transformation context instead. */
6406 const updateDecorator: (node: Decorator, expression: Expression) => Decorator;
6407 /** @deprecated Use `factory.createPropertyDeclaration` or the factory supplied by your transformation context instead. */
6408 const createProperty: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => PropertyDeclaration;
6409 /** @deprecated Use `factory.updatePropertyDeclaration` or the factory supplied by your transformation context instead. */
6410 const updateProperty: (node: PropertyDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => PropertyDeclaration;
6411 /** @deprecated Use `factory.createMethodDeclaration` or the factory supplied by your transformation context instead. */
6412 const createMethod: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => MethodDeclaration;
6413 /** @deprecated Use `factory.updateMethodDeclaration` or the factory supplied by your transformation context instead. */
6414 const updateMethod: (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;
6415 /** @deprecated Use `factory.createConstructorDeclaration` or the factory supplied by your transformation context instead. */
6416 const createConstructor: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined) => ConstructorDeclaration;
6417 /** @deprecated Use `factory.updateConstructorDeclaration` or the factory supplied by your transformation context instead. */
6418 const updateConstructor: (node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined) => ConstructorDeclaration;
6419 /** @deprecated Use `factory.createGetAccessorDeclaration` or the factory supplied by your transformation context instead. */
6420 const createGetAccessor: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => GetAccessorDeclaration;
6421 /** @deprecated Use `factory.updateGetAccessorDeclaration` or the factory supplied by your transformation context instead. */
6422 const updateGetAccessor: (node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) => GetAccessorDeclaration;
6423 /** @deprecated Use `factory.createSetAccessorDeclaration` or the factory supplied by your transformation context instead. */
6424 const createSetAccessor: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, parameters: readonly ParameterDeclaration[], body: Block | undefined) => SetAccessorDeclaration;
6425 /** @deprecated Use `factory.updateSetAccessorDeclaration` or the factory supplied by your transformation context instead. */
6426 const updateSetAccessor: (node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined) => SetAccessorDeclaration;
6427 /** @deprecated Use `factory.createCallSignature` or the factory supplied by your transformation context instead. */
6428 const createCallSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined) => CallSignatureDeclaration;
6429 /** @deprecated Use `factory.updateCallSignature` or the factory supplied by your transformation context instead. */
6430 const updateCallSignature: (node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined) => CallSignatureDeclaration;
6431 /** @deprecated Use `factory.createConstructSignature` or the factory supplied by your transformation context instead. */
6432 const createConstructSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined) => ConstructSignatureDeclaration;
6433 /** @deprecated Use `factory.updateConstructSignature` or the factory supplied by your transformation context instead. */
6434 const updateConstructSignature: (node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined) => ConstructSignatureDeclaration;
6435 /** @deprecated Use `factory.updateIndexSignature` or the factory supplied by your transformation context instead. */
6436 const updateIndexSignature: (node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => IndexSignatureDeclaration;
6437 /** @deprecated Use `factory.createKeywordTypeNode` or the factory supplied by your transformation context instead. */
6438 const createKeywordTypeNode: <TKind extends KeywordTypeSyntaxKind>(kind: TKind) => KeywordTypeNode<TKind>;
6439 /** @deprecated Use `factory.createTypePredicateNode` or the factory supplied by your transformation context instead. */
6440 const createTypePredicateNodeWithModifier: (assertsModifier: AssertsKeyword | undefined, parameterName: string | Identifier | ThisTypeNode, type: TypeNode | undefined) => TypePredicateNode;
6441 /** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */
6442 const updateTypePredicateNodeWithModifier: (node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined) => TypePredicateNode;
6443 /** @deprecated Use `factory.createTypeReferenceNode` or the factory supplied by your transformation context instead. */
6444 const createTypeReferenceNode: (typeName: string | Identifier | QualifiedName, typeArguments?: readonly TypeNode[] | undefined) => TypeReferenceNode;
6445 /** @deprecated Use `factory.updateTypeReferenceNode` or the factory supplied by your transformation context instead. */
6446 const updateTypeReferenceNode: (node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined) => TypeReferenceNode;
6447 /** @deprecated Use `factory.createFunctionTypeNode` or the factory supplied by your transformation context instead. */
6448 const createFunctionTypeNode: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => FunctionTypeNode;
6449 /** @deprecated Use `factory.updateFunctionTypeNode` or the factory supplied by your transformation context instead. */
6450 const updateFunctionTypeNode: (node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode) => FunctionTypeNode;
6451 /** @deprecated Use `factory.createConstructorTypeNode` or the factory supplied by your transformation context instead. */
6452 const createConstructorTypeNode: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => ConstructorTypeNode;
6453 /** @deprecated Use `factory.updateConstructorTypeNode` or the factory supplied by your transformation context instead. */
6454 const updateConstructorTypeNode: (node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode) => ConstructorTypeNode;
6455 /** @deprecated Use `factory.createTypeQueryNode` or the factory supplied by your transformation context instead. */
6456 const createTypeQueryNode: (exprName: EntityName) => TypeQueryNode;
6457 /** @deprecated Use `factory.updateTypeQueryNode` or the factory supplied by your transformation context instead. */
6458 const updateTypeQueryNode: (node: TypeQueryNode, exprName: EntityName) => TypeQueryNode;
6459 /** @deprecated Use `factory.createTypeLiteralNode` or the factory supplied by your transformation context instead. */
6460 const createTypeLiteralNode: (members: readonly TypeElement[] | undefined) => TypeLiteralNode;
6461 /** @deprecated Use `factory.updateTypeLiteralNode` or the factory supplied by your transformation context instead. */
6462 const updateTypeLiteralNode: (node: TypeLiteralNode, members: NodeArray<TypeElement>) => TypeLiteralNode;
6463 /** @deprecated Use `factory.createArrayTypeNode` or the factory supplied by your transformation context instead. */
6464 const createArrayTypeNode: (elementType: TypeNode) => ArrayTypeNode;
6465 /** @deprecated Use `factory.updateArrayTypeNode` or the factory supplied by your transformation context instead. */
6466 const updateArrayTypeNode: (node: ArrayTypeNode, elementType: TypeNode) => ArrayTypeNode;
6467 /** @deprecated Use `factory.createTupleTypeNode` or the factory supplied by your transformation context instead. */
6468 const createTupleTypeNode: (elements: readonly (TypeNode | NamedTupleMember)[]) => TupleTypeNode;
6469 /** @deprecated Use `factory.updateTupleTypeNode` or the factory supplied by your transformation context instead. */
6470 const updateTupleTypeNode: (node: TupleTypeNode, elements: readonly (TypeNode | NamedTupleMember)[]) => TupleTypeNode;
6471 /** @deprecated Use `factory.createOptionalTypeNode` or the factory supplied by your transformation context instead. */
6472 const createOptionalTypeNode: (type: TypeNode) => OptionalTypeNode;
6473 /** @deprecated Use `factory.updateOptionalTypeNode` or the factory supplied by your transformation context instead. */
6474 const updateOptionalTypeNode: (node: OptionalTypeNode, type: TypeNode) => OptionalTypeNode;
6475 /** @deprecated Use `factory.createRestTypeNode` or the factory supplied by your transformation context instead. */
6476 const createRestTypeNode: (type: TypeNode) => RestTypeNode;
6477 /** @deprecated Use `factory.updateRestTypeNode` or the factory supplied by your transformation context instead. */
6478 const updateRestTypeNode: (node: RestTypeNode, type: TypeNode) => RestTypeNode;
6479 /** @deprecated Use `factory.createUnionTypeNode` or the factory supplied by your transformation context instead. */
6480 const createUnionTypeNode: (types: readonly TypeNode[]) => UnionTypeNode;
6481 /** @deprecated Use `factory.updateUnionTypeNode` or the factory supplied by your transformation context instead. */
6482 const updateUnionTypeNode: (node: UnionTypeNode, types: NodeArray<TypeNode>) => UnionTypeNode;
6483 /** @deprecated Use `factory.createIntersectionTypeNode` or the factory supplied by your transformation context instead. */
6484 const createIntersectionTypeNode: (types: readonly TypeNode[]) => IntersectionTypeNode;
6485 /** @deprecated Use `factory.updateIntersectionTypeNode` or the factory supplied by your transformation context instead. */
6486 const updateIntersectionTypeNode: (node: IntersectionTypeNode, types: NodeArray<TypeNode>) => IntersectionTypeNode;
6487 /** @deprecated Use `factory.createConditionalTypeNode` or the factory supplied by your transformation context instead. */
6488 const createConditionalTypeNode: (checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode) => ConditionalTypeNode;
6489 /** @deprecated Use `factory.updateConditionalTypeNode` or the factory supplied by your transformation context instead. */
6490 const updateConditionalTypeNode: (node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode) => ConditionalTypeNode;
6491 /** @deprecated Use `factory.createInferTypeNode` or the factory supplied by your transformation context instead. */
6492 const createInferTypeNode: (typeParameter: TypeParameterDeclaration) => InferTypeNode;
6493 /** @deprecated Use `factory.updateInferTypeNode` or the factory supplied by your transformation context instead. */
6494 const updateInferTypeNode: (node: InferTypeNode, typeParameter: TypeParameterDeclaration) => InferTypeNode;
6495 /** @deprecated Use `factory.createImportTypeNode` or the factory supplied by your transformation context instead. */
6496 const createImportTypeNode: (argument: TypeNode, qualifier?: Identifier | QualifiedName | undefined, typeArguments?: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined) => ImportTypeNode;
6497 /** @deprecated Use `factory.updateImportTypeNode` or the factory supplied by your transformation context instead. */
6498 const updateImportTypeNode: (node: ImportTypeNode, argument: TypeNode, qualifier: Identifier | QualifiedName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean | undefined) => ImportTypeNode;
6499 /** @deprecated Use `factory.createParenthesizedType` or the factory supplied by your transformation context instead. */
6500 const createParenthesizedType: (type: TypeNode) => ParenthesizedTypeNode;
6501 /** @deprecated Use `factory.updateParenthesizedType` or the factory supplied by your transformation context instead. */
6502 const updateParenthesizedType: (node: ParenthesizedTypeNode, type: TypeNode) => ParenthesizedTypeNode;
6503 /** @deprecated Use `factory.createThisTypeNode` or the factory supplied by your transformation context instead. */
6504 const createThisTypeNode: () => ThisTypeNode;
6505 /** @deprecated Use `factory.updateTypeOperatorNode` or the factory supplied by your transformation context instead. */
6506 const updateTypeOperatorNode: (node: TypeOperatorNode, type: TypeNode) => TypeOperatorNode;
6507 /** @deprecated Use `factory.createIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */
6508 const createIndexedAccessTypeNode: (objectType: TypeNode, indexType: TypeNode) => IndexedAccessTypeNode;
6509 /** @deprecated Use `factory.updateIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */
6510 const updateIndexedAccessTypeNode: (node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode) => IndexedAccessTypeNode;
6511 /** @deprecated Use `factory.createMappedTypeNode` or the factory supplied by your transformation context instead. */
6512 const createMappedTypeNode: (readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode;
6513 /** @deprecated Use `factory.updateMappedTypeNode` or the factory supplied by your transformation context instead. */
6514 const updateMappedTypeNode: (node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode;
6515 /** @deprecated Use `factory.createLiteralTypeNode` or the factory supplied by your transformation context instead. */
6516 const createLiteralTypeNode: (literal: LiteralExpression | TrueLiteral | FalseLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode;
6517 /** @deprecated Use `factory.updateLiteralTypeNode` or the factory supplied by your transformation context instead. */
6518 const updateLiteralTypeNode: (node: LiteralTypeNode, literal: LiteralExpression | TrueLiteral | FalseLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode;
6519 /** @deprecated Use `factory.createObjectBindingPattern` or the factory supplied by your transformation context instead. */
6520 const createObjectBindingPattern: (elements: readonly BindingElement[]) => ObjectBindingPattern;
6521 /** @deprecated Use `factory.updateObjectBindingPattern` or the factory supplied by your transformation context instead. */
6522 const updateObjectBindingPattern: (node: ObjectBindingPattern, elements: readonly BindingElement[]) => ObjectBindingPattern;
6523 /** @deprecated Use `factory.createArrayBindingPattern` or the factory supplied by your transformation context instead. */
6524 const createArrayBindingPattern: (elements: readonly ArrayBindingElement[]) => ArrayBindingPattern;
6525 /** @deprecated Use `factory.updateArrayBindingPattern` or the factory supplied by your transformation context instead. */
6526 const updateArrayBindingPattern: (node: ArrayBindingPattern, elements: readonly ArrayBindingElement[]) => ArrayBindingPattern;
6527 /** @deprecated Use `factory.createBindingElement` or the factory supplied by your transformation context instead. */
6528 const createBindingElement: (dotDotDotToken: DotDotDotToken | undefined, propertyName: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier | undefined, name: string | Identifier | ObjectBindingPattern | ArrayBindingPattern, initializer?: Expression | undefined) => BindingElement;
6529 /** @deprecated Use `factory.updateBindingElement` or the factory supplied by your transformation context instead. */
6530 const updateBindingElement: (node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier | undefined, name: BindingName, initializer: Expression | undefined) => BindingElement;
6531 /** @deprecated Use `factory.createArrayLiteral` or the factory supplied by your transformation context instead. */
6532 const createArrayLiteral: (elements?: readonly Expression[] | undefined, multiLine?: boolean | undefined) => ArrayLiteralExpression;
6533 /** @deprecated Use `factory.updateArrayLiteral` or the factory supplied by your transformation context instead. */
6534 const updateArrayLiteral: (node: ArrayLiteralExpression, elements: readonly Expression[]) => ArrayLiteralExpression;
6535 /** @deprecated Use `factory.createObjectLiteral` or the factory supplied by your transformation context instead. */
6536 const createObjectLiteral: (properties?: readonly ObjectLiteralElementLike[] | undefined, multiLine?: boolean | undefined) => ObjectLiteralExpression;
6537 /** @deprecated Use `factory.updateObjectLiteral` or the factory supplied by your transformation context instead. */
6538 const updateObjectLiteral: (node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]) => ObjectLiteralExpression;
6539 /** @deprecated Use `factory.createPropertyAccess` or the factory supplied by your transformation context instead. */
6540 const createPropertyAccess: (expression: Expression, name: string | Identifier | PrivateIdentifier) => PropertyAccessExpression;
6541 /** @deprecated Use `factory.updatePropertyAccess` or the factory supplied by your transformation context instead. */
6542 const updatePropertyAccess: (node: PropertyAccessExpression, expression: Expression, name: Identifier | PrivateIdentifier) => PropertyAccessExpression;
6543 /** @deprecated Use `factory.createPropertyAccessChain` or the factory supplied by your transformation context instead. */
6544 const createPropertyAccessChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, name: string | Identifier | PrivateIdentifier) => PropertyAccessChain;
6545 /** @deprecated Use `factory.updatePropertyAccessChain` or the factory supplied by your transformation context instead. */
6546 const updatePropertyAccessChain: (node: PropertyAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: Identifier | PrivateIdentifier) => PropertyAccessChain;
6547 /** @deprecated Use `factory.createElementAccess` or the factory supplied by your transformation context instead. */
6548 const createElementAccess: (expression: Expression, index: number | Expression) => ElementAccessExpression;
6549 /** @deprecated Use `factory.updateElementAccess` or the factory supplied by your transformation context instead. */
6550 const updateElementAccess: (node: ElementAccessExpression, expression: Expression, argumentExpression: Expression) => ElementAccessExpression;
6551 /** @deprecated Use `factory.createElementAccessChain` or the factory supplied by your transformation context instead. */
6552 const createElementAccessChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, index: number | Expression) => ElementAccessChain;
6553 /** @deprecated Use `factory.updateElementAccessChain` or the factory supplied by your transformation context instead. */
6554 const updateElementAccessChain: (node: ElementAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression) => ElementAccessChain;
6555 /** @deprecated Use `factory.createCall` or the factory supplied by your transformation context instead. */
6556 const createCall: (expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => CallExpression;
6557 /** @deprecated Use `factory.updateCall` or the factory supplied by your transformation context instead. */
6558 const updateCall: (node: CallExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]) => CallExpression;
6559 /** @deprecated Use `factory.createCallChain` or the factory supplied by your transformation context instead. */
6560 const createCallChain: (expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => CallChain;
6561 /** @deprecated Use `factory.updateCallChain` or the factory supplied by your transformation context instead. */
6562 const updateCallChain: (node: CallChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]) => CallChain;
6563 /** @deprecated Use `factory.createNew` or the factory supplied by your transformation context instead. */
6564 const createNew: (expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => NewExpression;
6565 /** @deprecated Use `factory.updateNew` or the factory supplied by your transformation context instead. */
6566 const updateNew: (node: NewExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined) => NewExpression;
6567 /** @deprecated Use `factory.createTypeAssertion` or the factory supplied by your transformation context instead. */
6568 const createTypeAssertion: (type: TypeNode, expression: Expression) => TypeAssertion;
6569 /** @deprecated Use `factory.updateTypeAssertion` or the factory supplied by your transformation context instead. */
6570 const updateTypeAssertion: (node: TypeAssertion, type: TypeNode, expression: Expression) => TypeAssertion;
6571 /** @deprecated Use `factory.createParen` or the factory supplied by your transformation context instead. */
6572 const createParen: (expression: Expression) => ParenthesizedExpression;
6573 /** @deprecated Use `factory.updateParen` or the factory supplied by your transformation context instead. */
6574 const updateParen: (node: ParenthesizedExpression, expression: Expression) => ParenthesizedExpression;
6575 /** @deprecated Use `factory.createFunctionExpression` or the factory supplied by your transformation context instead. */
6576 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;
6577 /** @deprecated Use `factory.updateFunctionExpression` or the factory supplied by your transformation context instead. */
6578 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;
6579 /** @deprecated Use `factory.createDelete` or the factory supplied by your transformation context instead. */
6580 const createDelete: (expression: Expression) => DeleteExpression;
6581 /** @deprecated Use `factory.updateDelete` or the factory supplied by your transformation context instead. */
6582 const updateDelete: (node: DeleteExpression, expression: Expression) => DeleteExpression;
6583 /** @deprecated Use `factory.createTypeOf` or the factory supplied by your transformation context instead. */
6584 const createTypeOf: (expression: Expression) => TypeOfExpression;
6585 /** @deprecated Use `factory.updateTypeOf` or the factory supplied by your transformation context instead. */
6586 const updateTypeOf: (node: TypeOfExpression, expression: Expression) => TypeOfExpression;
6587 /** @deprecated Use `factory.createVoid` or the factory supplied by your transformation context instead. */
6588 const createVoid: (expression: Expression) => VoidExpression;
6589 /** @deprecated Use `factory.updateVoid` or the factory supplied by your transformation context instead. */
6590 const updateVoid: (node: VoidExpression, expression: Expression) => VoidExpression;
6591 /** @deprecated Use `factory.createAwait` or the factory supplied by your transformation context instead. */
6592 const createAwait: (expression: Expression) => AwaitExpression;
6593 /** @deprecated Use `factory.updateAwait` or the factory supplied by your transformation context instead. */
6594 const updateAwait: (node: AwaitExpression, expression: Expression) => AwaitExpression;
6595 /** @deprecated Use `factory.createPrefix` or the factory supplied by your transformation context instead. */
6596 const createPrefix: (operator: PrefixUnaryOperator, operand: Expression) => PrefixUnaryExpression;
6597 /** @deprecated Use `factory.updatePrefix` or the factory supplied by your transformation context instead. */
6598 const updatePrefix: (node: PrefixUnaryExpression, operand: Expression) => PrefixUnaryExpression;
6599 /** @deprecated Use `factory.createPostfix` or the factory supplied by your transformation context instead. */
6600 const createPostfix: (operand: Expression, operator: PostfixUnaryOperator) => PostfixUnaryExpression;
6601 /** @deprecated Use `factory.updatePostfix` or the factory supplied by your transformation context instead. */
6602 const updatePostfix: (node: PostfixUnaryExpression, operand: Expression) => PostfixUnaryExpression;
6603 /** @deprecated Use `factory.createBinary` or the factory supplied by your transformation context instead. */
6604 const createBinary: (left: Expression, operator: SyntaxKind.CommaToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionQuestionToken | 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.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | BinaryOperatorToken, right: Expression) => BinaryExpression;
6605 /** @deprecated Use `factory.updateConditional` or the factory supplied by your transformation context instead. */
6606 const updateConditional: (node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression) => ConditionalExpression;
6607 /** @deprecated Use `factory.createTemplateExpression` or the factory supplied by your transformation context instead. */
6608 const createTemplateExpression: (head: TemplateHead, templateSpans: readonly TemplateSpan[]) => TemplateExpression;
6609 /** @deprecated Use `factory.updateTemplateExpression` or the factory supplied by your transformation context instead. */
6610 const updateTemplateExpression: (node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]) => TemplateExpression;
6611 /** @deprecated Use `factory.createTemplateHead` or the factory supplied by your transformation context instead. */
6612 const createTemplateHead: {
6613 (text: string, rawText?: string | undefined, templateFlags?: TokenFlags | undefined): TemplateHead;
6614 (text: string | undefined, rawText: string, templateFlags?: TokenFlags | undefined): TemplateHead;
6615 };
6616 /** @deprecated Use `factory.createTemplateMiddle` or the factory supplied by your transformation context instead. */
6617 const createTemplateMiddle: {
6618 (text: string, rawText?: string | undefined, templateFlags?: TokenFlags | undefined): TemplateMiddle;
6619 (text: string | undefined, rawText: string, templateFlags?: TokenFlags | undefined): TemplateMiddle;
6620 };
6621 /** @deprecated Use `factory.createTemplateTail` or the factory supplied by your transformation context instead. */
6622 const createTemplateTail: {
6623 (text: string, rawText?: string | undefined, templateFlags?: TokenFlags | undefined): TemplateTail;
6624 (text: string | undefined, rawText: string, templateFlags?: TokenFlags | undefined): TemplateTail;
6625 };
6626 /** @deprecated Use `factory.createNoSubstitutionTemplateLiteral` or the factory supplied by your transformation context instead. */
6627 const createNoSubstitutionTemplateLiteral: {
6628 (text: string, rawText?: string | undefined): NoSubstitutionTemplateLiteral;
6629 (text: string | undefined, rawText: string): NoSubstitutionTemplateLiteral;
6630 };
6631 /** @deprecated Use `factory.updateYield` or the factory supplied by your transformation context instead. */
6632 const updateYield: (node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression | undefined) => YieldExpression;
6633 /** @deprecated Use `factory.createSpread` or the factory supplied by your transformation context instead. */
6634 const createSpread: (expression: Expression) => SpreadElement;
6635 /** @deprecated Use `factory.updateSpread` or the factory supplied by your transformation context instead. */
6636 const updateSpread: (node: SpreadElement, expression: Expression) => SpreadElement;
6637 /** @deprecated Use `factory.createOmittedExpression` or the factory supplied by your transformation context instead. */
6638 const createOmittedExpression: () => OmittedExpression;
6639 /** @deprecated Use `factory.createAsExpression` or the factory supplied by your transformation context instead. */
6640 const createAsExpression: (expression: Expression, type: TypeNode) => AsExpression;
6641 /** @deprecated Use `factory.updateAsExpression` or the factory supplied by your transformation context instead. */
6642 const updateAsExpression: (node: AsExpression, expression: Expression, type: TypeNode) => AsExpression;
6643 /** @deprecated Use `factory.createNonNullExpression` or the factory supplied by your transformation context instead. */
6644 const createNonNullExpression: (expression: Expression) => NonNullExpression;
6645 /** @deprecated Use `factory.updateNonNullExpression` or the factory supplied by your transformation context instead. */
6646 const updateNonNullExpression: (node: NonNullExpression, expression: Expression) => NonNullExpression;
6647 /** @deprecated Use `factory.createNonNullChain` or the factory supplied by your transformation context instead. */
6648 const createNonNullChain: (expression: Expression) => NonNullChain;
6649 /** @deprecated Use `factory.updateNonNullChain` or the factory supplied by your transformation context instead. */
6650 const updateNonNullChain: (node: NonNullChain, expression: Expression) => NonNullChain;
6651 /** @deprecated Use `factory.createMetaProperty` or the factory supplied by your transformation context instead. */
6652 const createMetaProperty: (keywordToken: SyntaxKind.ImportKeyword | SyntaxKind.NewKeyword, name: Identifier) => MetaProperty;
6653 /** @deprecated Use `factory.updateMetaProperty` or the factory supplied by your transformation context instead. */
6654 const updateMetaProperty: (node: MetaProperty, name: Identifier) => MetaProperty;
6655 /** @deprecated Use `factory.createTemplateSpan` or the factory supplied by your transformation context instead. */
6656 const createTemplateSpan: (expression: Expression, literal: TemplateMiddle | TemplateTail) => TemplateSpan;
6657 /** @deprecated Use `factory.updateTemplateSpan` or the factory supplied by your transformation context instead. */
6658 const updateTemplateSpan: (node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail) => TemplateSpan;
6659 /** @deprecated Use `factory.createSemicolonClassElement` or the factory supplied by your transformation context instead. */
6660 const createSemicolonClassElement: () => SemicolonClassElement;
6661 /** @deprecated Use `factory.createBlock` or the factory supplied by your transformation context instead. */
6662 const createBlock: (statements: readonly Statement[], multiLine?: boolean | undefined) => Block;
6663 /** @deprecated Use `factory.updateBlock` or the factory supplied by your transformation context instead. */
6664 const updateBlock: (node: Block, statements: readonly Statement[]) => Block;
6665 /** @deprecated Use `factory.createVariableStatement` or the factory supplied by your transformation context instead. */
6666 const createVariableStatement: (modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList | readonly VariableDeclaration[]) => VariableStatement;
6667 /** @deprecated Use `factory.updateVariableStatement` or the factory supplied by your transformation context instead. */
6668 const updateVariableStatement: (node: VariableStatement, modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList) => VariableStatement;
6669 /** @deprecated Use `factory.createEmptyStatement` or the factory supplied by your transformation context instead. */
6670 const createEmptyStatement: () => EmptyStatement;
6671 /** @deprecated Use `factory.createExpressionStatement` or the factory supplied by your transformation context instead. */
6672 const createExpressionStatement: (expression: Expression) => ExpressionStatement;
6673 /** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */
6674 const updateExpressionStatement: (node: ExpressionStatement, expression: Expression) => ExpressionStatement;
6675 /** @deprecated Use `factory.createExpressionStatement` or the factory supplied by your transformation context instead. */
6676 const createStatement: (expression: Expression) => ExpressionStatement;
6677 /** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */
6678 const updateStatement: (node: ExpressionStatement, expression: Expression) => ExpressionStatement;
6679 /** @deprecated Use `factory.createIf` or the factory supplied by your transformation context instead. */
6680 const createIf: (expression: Expression, thenStatement: Statement, elseStatement?: Statement | undefined) => IfStatement;
6681 /** @deprecated Use `factory.updateIf` or the factory supplied by your transformation context instead. */
6682 const updateIf: (node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined) => IfStatement;
6683 /** @deprecated Use `factory.createDo` or the factory supplied by your transformation context instead. */
6684 const createDo: (statement: Statement, expression: Expression) => DoStatement;
6685 /** @deprecated Use `factory.updateDo` or the factory supplied by your transformation context instead. */
6686 const updateDo: (node: DoStatement, statement: Statement, expression: Expression) => DoStatement;
6687 /** @deprecated Use `factory.createWhile` or the factory supplied by your transformation context instead. */
6688 const createWhile: (expression: Expression, statement: Statement) => WhileStatement;
6689 /** @deprecated Use `factory.updateWhile` or the factory supplied by your transformation context instead. */
6690 const updateWhile: (node: WhileStatement, expression: Expression, statement: Statement) => WhileStatement;
6691 /** @deprecated Use `factory.createFor` or the factory supplied by your transformation context instead. */
6692 const createFor: (initializer: Expression | VariableDeclarationList | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement) => ForStatement;
6693 /** @deprecated Use `factory.updateFor` or the factory supplied by your transformation context instead. */
6694 const updateFor: (node: ForStatement, initializer: Expression | VariableDeclarationList | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement) => ForStatement;
6695 /** @deprecated Use `factory.createForIn` or the factory supplied by your transformation context instead. */
6696 const createForIn: (initializer: ForInitializer, expression: Expression, statement: Statement) => ForInStatement;
6697 /** @deprecated Use `factory.updateForIn` or the factory supplied by your transformation context instead. */
6698 const updateForIn: (node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement) => ForInStatement;
6699 /** @deprecated Use `factory.createForOf` or the factory supplied by your transformation context instead. */
6700 const createForOf: (awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement) => ForOfStatement;
6701 /** @deprecated Use `factory.updateForOf` or the factory supplied by your transformation context instead. */
6702 const updateForOf: (node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement) => ForOfStatement;
6703 /** @deprecated Use `factory.createContinue` or the factory supplied by your transformation context instead. */
6704 const createContinue: (label?: string | Identifier | undefined) => ContinueStatement;
6705 /** @deprecated Use `factory.updateContinue` or the factory supplied by your transformation context instead. */
6706 const updateContinue: (node: ContinueStatement, label: Identifier | undefined) => ContinueStatement;
6707 /** @deprecated Use `factory.createBreak` or the factory supplied by your transformation context instead. */
6708 const createBreak: (label?: string | Identifier | undefined) => BreakStatement;
6709 /** @deprecated Use `factory.updateBreak` or the factory supplied by your transformation context instead. */
6710 const updateBreak: (node: BreakStatement, label: Identifier | undefined) => BreakStatement;
6711 /** @deprecated Use `factory.createReturn` or the factory supplied by your transformation context instead. */
6712 const createReturn: (expression?: Expression | undefined) => ReturnStatement;
6713 /** @deprecated Use `factory.updateReturn` or the factory supplied by your transformation context instead. */
6714 const updateReturn: (node: ReturnStatement, expression: Expression | undefined) => ReturnStatement;
6715 /** @deprecated Use `factory.createWith` or the factory supplied by your transformation context instead. */
6716 const createWith: (expression: Expression, statement: Statement) => WithStatement;
6717 /** @deprecated Use `factory.updateWith` or the factory supplied by your transformation context instead. */
6718 const updateWith: (node: WithStatement, expression: Expression, statement: Statement) => WithStatement;
6719 /** @deprecated Use `factory.createSwitch` or the factory supplied by your transformation context instead. */
6720 const createSwitch: (expression: Expression, caseBlock: CaseBlock) => SwitchStatement;
6721 /** @deprecated Use `factory.updateSwitch` or the factory supplied by your transformation context instead. */
6722 const updateSwitch: (node: SwitchStatement, expression: Expression, caseBlock: CaseBlock) => SwitchStatement;
6723 /** @deprecated Use `factory.createLabel` or the factory supplied by your transformation context instead. */
6724 const createLabel: (label: string | Identifier, statement: Statement) => LabeledStatement;
6725 /** @deprecated Use `factory.updateLabel` or the factory supplied by your transformation context instead. */
6726 const updateLabel: (node: LabeledStatement, label: Identifier, statement: Statement) => LabeledStatement;
6727 /** @deprecated Use `factory.createThrow` or the factory supplied by your transformation context instead. */
6728 const createThrow: (expression: Expression) => ThrowStatement;
6729 /** @deprecated Use `factory.updateThrow` or the factory supplied by your transformation context instead. */
6730 const updateThrow: (node: ThrowStatement, expression: Expression) => ThrowStatement;
6731 /** @deprecated Use `factory.createTry` or the factory supplied by your transformation context instead. */
6732 const createTry: (tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined) => TryStatement;
6733 /** @deprecated Use `factory.updateTry` or the factory supplied by your transformation context instead. */
6734 const updateTry: (node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined) => TryStatement;
6735 /** @deprecated Use `factory.createDebuggerStatement` or the factory supplied by your transformation context instead. */
6736 const createDebuggerStatement: () => DebuggerStatement;
6737 /** @deprecated Use `factory.createVariableDeclarationList` or the factory supplied by your transformation context instead. */
6738 const createVariableDeclarationList: (declarations: readonly VariableDeclaration[], flags?: NodeFlags | undefined) => VariableDeclarationList;
6739 /** @deprecated Use `factory.updateVariableDeclarationList` or the factory supplied by your transformation context instead. */
6740 const updateVariableDeclarationList: (node: VariableDeclarationList, declarations: readonly VariableDeclaration[]) => VariableDeclarationList;
6741 /** @deprecated Use `factory.createFunctionDeclaration` or the factory supplied by your transformation context instead. */
6742 const 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;
6743 /** @deprecated Use `factory.updateFunctionDeclaration` or the factory supplied by your transformation context instead. */
6744 const 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;
6745 /** @deprecated Use `factory.createClassDeclaration` or the factory supplied by your transformation context instead. */
6746 const 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;
6747 /** @deprecated Use `factory.updateClassDeclaration` or the factory supplied by your transformation context instead. */
6748 const 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;
6749 /** @deprecated Use `factory.createInterfaceDeclaration` or the factory supplied by your transformation context instead. */
6750 const createInterfaceDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]) => InterfaceDeclaration;
6751 /** @deprecated Use `factory.updateInterfaceDeclaration` or the factory supplied by your transformation context instead. */
6752 const 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;
6753 /** @deprecated Use `factory.createTypeAliasDeclaration` or the factory supplied by your transformation context instead. */
6754 const createTypeAliasDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode) => TypeAliasDeclaration;
6755 /** @deprecated Use `factory.updateTypeAliasDeclaration` or the factory supplied by your transformation context instead. */
6756 const updateTypeAliasDeclaration: (node: TypeAliasDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode) => TypeAliasDeclaration;
6757 /** @deprecated Use `factory.createEnumDeclaration` or the factory supplied by your transformation context instead. */
6758 const createEnumDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]) => EnumDeclaration;
6759 /** @deprecated Use `factory.updateEnumDeclaration` or the factory supplied by your transformation context instead. */
6760 const updateEnumDeclaration: (node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]) => EnumDeclaration;
6761 /** @deprecated Use `factory.createModuleDeclaration` or the factory supplied by your transformation context instead. */
6762 const createModuleDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: Identifier | ModuleBlock | NamespaceDeclaration | JSDocNamespaceDeclaration | undefined, flags?: NodeFlags | undefined) => ModuleDeclaration;
6763 /** @deprecated Use `factory.updateModuleDeclaration` or the factory supplied by your transformation context instead. */
6764 const updateModuleDeclaration: (node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: Identifier | ModuleBlock | NamespaceDeclaration | JSDocNamespaceDeclaration | undefined) => ModuleDeclaration;
6765 /** @deprecated Use `factory.createModuleBlock` or the factory supplied by your transformation context instead. */
6766 const createModuleBlock: (statements: readonly Statement[]) => ModuleBlock;
6767 /** @deprecated Use `factory.updateModuleBlock` or the factory supplied by your transformation context instead. */
6768 const updateModuleBlock: (node: ModuleBlock, statements: readonly Statement[]) => ModuleBlock;
6769 /** @deprecated Use `factory.createCaseBlock` or the factory supplied by your transformation context instead. */
6770 const createCaseBlock: (clauses: readonly CaseOrDefaultClause[]) => CaseBlock;
6771 /** @deprecated Use `factory.updateCaseBlock` or the factory supplied by your transformation context instead. */
6772 const updateCaseBlock: (node: CaseBlock, clauses: readonly CaseOrDefaultClause[]) => CaseBlock;
6773 /** @deprecated Use `factory.createNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */
6774 const createNamespaceExportDeclaration: (name: string | Identifier) => NamespaceExportDeclaration;
6775 /** @deprecated Use `factory.updateNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */
6776 const updateNamespaceExportDeclaration: (node: NamespaceExportDeclaration, name: Identifier) => NamespaceExportDeclaration;
6777 /** @deprecated Use `factory.createImportEqualsDeclaration` or the factory supplied by your transformation context instead. */
6778 const createImportEqualsDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, moduleReference: ModuleReference) => ImportEqualsDeclaration;
6779 /** @deprecated Use `factory.updateImportEqualsDeclaration` or the factory supplied by your transformation context instead. */
6780 const updateImportEqualsDeclaration: (node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, moduleReference: ModuleReference) => ImportEqualsDeclaration;
6781 /** @deprecated Use `factory.createImportDeclaration` or the factory supplied by your transformation context instead. */
6782 const createImportDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression) => ImportDeclaration;
6783 /** @deprecated Use `factory.updateImportDeclaration` or the factory supplied by your transformation context instead. */
6784 const updateImportDeclaration: (node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression) => ImportDeclaration;
6785 /** @deprecated Use `factory.createNamespaceImport` or the factory supplied by your transformation context instead. */
6786 const createNamespaceImport: (name: Identifier) => NamespaceImport;
6787 /** @deprecated Use `factory.updateNamespaceImport` or the factory supplied by your transformation context instead. */
6788 const updateNamespaceImport: (node: NamespaceImport, name: Identifier) => NamespaceImport;
6789 /** @deprecated Use `factory.createNamedImports` or the factory supplied by your transformation context instead. */
6790 const createNamedImports: (elements: readonly ImportSpecifier[]) => NamedImports;
6791 /** @deprecated Use `factory.updateNamedImports` or the factory supplied by your transformation context instead. */
6792 const updateNamedImports: (node: NamedImports, elements: readonly ImportSpecifier[]) => NamedImports;
6793 /** @deprecated Use `factory.createImportSpecifier` or the factory supplied by your transformation context instead. */
6794 const createImportSpecifier: (propertyName: Identifier | undefined, name: Identifier) => ImportSpecifier;
6795 /** @deprecated Use `factory.updateImportSpecifier` or the factory supplied by your transformation context instead. */
6796 const updateImportSpecifier: (node: ImportSpecifier, propertyName: Identifier | undefined, name: Identifier) => ImportSpecifier;
6797 /** @deprecated Use `factory.createExportAssignment` or the factory supplied by your transformation context instead. */
6798 const createExportAssignment: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression) => ExportAssignment;
6799 /** @deprecated Use `factory.updateExportAssignment` or the factory supplied by your transformation context instead. */
6800 const updateExportAssignment: (node: ExportAssignment, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, expression: Expression) => ExportAssignment;
6801 /** @deprecated Use `factory.createNamedExports` or the factory supplied by your transformation context instead. */
6802 const createNamedExports: (elements: readonly ExportSpecifier[]) => NamedExports;
6803 /** @deprecated Use `factory.updateNamedExports` or the factory supplied by your transformation context instead. */
6804 const updateNamedExports: (node: NamedExports, elements: readonly ExportSpecifier[]) => NamedExports;
6805 /** @deprecated Use `factory.createExportSpecifier` or the factory supplied by your transformation context instead. */
6806 const createExportSpecifier: (propertyName: string | Identifier | undefined, name: string | Identifier) => ExportSpecifier;
6807 /** @deprecated Use `factory.updateExportSpecifier` or the factory supplied by your transformation context instead. */
6808 const updateExportSpecifier: (node: ExportSpecifier, propertyName: Identifier | undefined, name: Identifier) => ExportSpecifier;
6809 /** @deprecated Use `factory.createExternalModuleReference` or the factory supplied by your transformation context instead. */
6810 const createExternalModuleReference: (expression: Expression) => ExternalModuleReference;
6811 /** @deprecated Use `factory.updateExternalModuleReference` or the factory supplied by your transformation context instead. */
6812 const updateExternalModuleReference: (node: ExternalModuleReference, expression: Expression) => ExternalModuleReference;
6813 /** @deprecated Use `factory.createJSDocTypeExpression` or the factory supplied by your transformation context instead. */
6814 const createJSDocTypeExpression: (type: TypeNode) => JSDocTypeExpression;
6815 /** @deprecated Use `factory.createJSDocTypeTag` or the factory supplied by your transformation context instead. */
6816 const createJSDocTypeTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | undefined) => JSDocTypeTag;
6817 /** @deprecated Use `factory.createJSDocReturnTag` or the factory supplied by your transformation context instead. */
6818 const createJSDocReturnTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocReturnTag;
6819 /** @deprecated Use `factory.createJSDocThisTag` or the factory supplied by your transformation context instead. */
6820 const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | undefined) => JSDocThisTag;
6821 /** @deprecated Use `factory.createJSDocComment` or the factory supplied by your transformation context instead. */
6822 const createJSDocComment: (comment?: string | undefined, tags?: readonly JSDocTag[] | undefined) => JSDoc;
6823 /** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */
6824 const createJSDocParameterTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | undefined) => JSDocParameterTag;
6825 /** @deprecated Use `factory.createJSDocClassTag` or the factory supplied by your transformation context instead. */
6826 const createJSDocClassTag: (tagName: Identifier | undefined, comment?: string | undefined) => JSDocClassTag;
6827 /** @deprecated Use `factory.createJSDocAugmentsTag` or the factory supplied by your transformation context instead. */
6828 const createJSDocAugmentsTag: (tagName: Identifier | undefined, className: ExpressionWithTypeArguments & {
6829 readonly expression: Identifier | PropertyAccessEntityNameExpression;
6830 }, comment?: string | undefined) => JSDocAugmentsTag;
6831 /** @deprecated Use `factory.createJSDocEnumTag` or the factory supplied by your transformation context instead. */
6832 const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | undefined) => JSDocEnumTag;
6833 /** @deprecated Use `factory.createJSDocTemplateTag` or the factory supplied by your transformation context instead. */
6834 const createJSDocTemplateTag: (tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | undefined) => JSDocTemplateTag;
6835 /** @deprecated Use `factory.createJSDocTypedefTag` or the factory supplied by your transformation context instead. */
6836 const createJSDocTypedefTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeLiteral | JSDocTypeExpression | undefined, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | undefined) => JSDocTypedefTag;
6837 /** @deprecated Use `factory.createJSDocCallbackTag` or the factory supplied by your transformation context instead. */
6838 const createJSDocCallbackTag: (tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration | undefined, comment?: string | undefined) => JSDocCallbackTag;
6839 /** @deprecated Use `factory.createJSDocSignature` or the factory supplied by your transformation context instead. */
6840 const createJSDocSignature: (typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag | undefined) => JSDocSignature;
6841 /** @deprecated Use `factory.createJSDocPropertyTag` or the factory supplied by your transformation context instead. */
6842 const createJSDocPropertyTag: (tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, isNameFirst?: boolean | undefined, comment?: string | undefined) => JSDocPropertyTag;
6843 /** @deprecated Use `factory.createJSDocTypeLiteral` or the factory supplied by your transformation context instead. */
6844 const createJSDocTypeLiteral: (jsDocPropertyTags?: readonly JSDocPropertyLikeTag[] | undefined, isArrayType?: boolean | undefined) => JSDocTypeLiteral;
6845 /** @deprecated Use `factory.createJSDocImplementsTag` or the factory supplied by your transformation context instead. */
6846 const createJSDocImplementsTag: (tagName: Identifier | undefined, className: ExpressionWithTypeArguments & {
6847 readonly expression: Identifier | PropertyAccessEntityNameExpression;
6848 }, comment?: string | undefined) => JSDocImplementsTag;
6849 /** @deprecated Use `factory.createJSDocAuthorTag` or the factory supplied by your transformation context instead. */
6850 const createJSDocAuthorTag: (tagName: Identifier | undefined, comment?: string | undefined) => JSDocAuthorTag;
6851 /** @deprecated Use `factory.createJSDocPublicTag` or the factory supplied by your transformation context instead. */
6852 const createJSDocPublicTag: (tagName: Identifier | undefined, comment?: string | undefined) => JSDocPublicTag;
6853 /** @deprecated Use `factory.createJSDocPrivateTag` or the factory supplied by your transformation context instead. */
6854 const createJSDocPrivateTag: (tagName: Identifier | undefined, comment?: string | undefined) => JSDocPrivateTag;
6855 /** @deprecated Use `factory.createJSDocProtectedTag` or the factory supplied by your transformation context instead. */
6856 const createJSDocProtectedTag: (tagName: Identifier | undefined, comment?: string | undefined) => JSDocProtectedTag;
6857 /** @deprecated Use `factory.createJSDocReadonlyTag` or the factory supplied by your transformation context instead. */
6858 const createJSDocReadonlyTag: (tagName: Identifier | undefined, comment?: string | undefined) => JSDocReadonlyTag;
6859 /** @deprecated Use `factory.createJSDocUnknownTag` or the factory supplied by your transformation context instead. */
6860 const createJSDocTag: (tagName: Identifier, comment?: string | undefined) => JSDocUnknownTag;
6861 /** @deprecated Use `factory.createJsxElement` or the factory supplied by your transformation context instead. */
6862 const createJsxElement: (openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement) => JsxElement;
6863 /** @deprecated Use `factory.updateJsxElement` or the factory supplied by your transformation context instead. */
6864 const updateJsxElement: (node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement) => JsxElement;
6865 /** @deprecated Use `factory.createJsxSelfClosingElement` or the factory supplied by your transformation context instead. */
6866 const createJsxSelfClosingElement: (tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxSelfClosingElement;
6867 /** @deprecated Use `factory.updateJsxSelfClosingElement` or the factory supplied by your transformation context instead. */
6868 const updateJsxSelfClosingElement: (node: JsxSelfClosingElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxSelfClosingElement;
6869 /** @deprecated Use `factory.createJsxOpeningElement` or the factory supplied by your transformation context instead. */
6870 const createJsxOpeningElement: (tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxOpeningElement;
6871 /** @deprecated Use `factory.updateJsxOpeningElement` or the factory supplied by your transformation context instead. */
6872 const updateJsxOpeningElement: (node: JsxOpeningElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes) => JsxOpeningElement;
6873 /** @deprecated Use `factory.createJsxClosingElement` or the factory supplied by your transformation context instead. */
6874 const createJsxClosingElement: (tagName: JsxTagNameExpression) => JsxClosingElement;
6875 /** @deprecated Use `factory.updateJsxClosingElement` or the factory supplied by your transformation context instead. */
6876 const updateJsxClosingElement: (node: JsxClosingElement, tagName: JsxTagNameExpression) => JsxClosingElement;
6877 /** @deprecated Use `factory.createJsxFragment` or the factory supplied by your transformation context instead. */
6878 const createJsxFragment: (openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) => JsxFragment;
6879 /** @deprecated Use `factory.createJsxText` or the factory supplied by your transformation context instead. */
6880 const createJsxText: (text: string, containsOnlyTriviaWhiteSpaces?: boolean | undefined) => JsxText;
6881 /** @deprecated Use `factory.updateJsxText` or the factory supplied by your transformation context instead. */
6882 const updateJsxText: (node: JsxText, text: string, containsOnlyTriviaWhiteSpaces?: boolean | undefined) => JsxText;
6883 /** @deprecated Use `factory.createJsxOpeningFragment` or the factory supplied by your transformation context instead. */
6884 const createJsxOpeningFragment: () => JsxOpeningFragment;
6885 /** @deprecated Use `factory.createJsxJsxClosingFragment` or the factory supplied by your transformation context instead. */
6886 const createJsxJsxClosingFragment: () => JsxClosingFragment;
6887 /** @deprecated Use `factory.updateJsxFragment` or the factory supplied by your transformation context instead. */
6888 const updateJsxFragment: (node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) => JsxFragment;
6889 /** @deprecated Use `factory.createJsxAttribute` or the factory supplied by your transformation context instead. */
6890 const createJsxAttribute: (name: Identifier, initializer: StringLiteral | JsxExpression | undefined) => JsxAttribute;
6891 /** @deprecated Use `factory.updateJsxAttribute` or the factory supplied by your transformation context instead. */
6892 const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression | undefined) => JsxAttribute;
6893 /** @deprecated Use `factory.createJsxAttributes` or the factory supplied by your transformation context instead. */
6894 const createJsxAttributes: (properties: readonly JsxAttributeLike[]) => JsxAttributes;
6895 /** @deprecated Use `factory.updateJsxAttributes` or the factory supplied by your transformation context instead. */
6896 const updateJsxAttributes: (node: JsxAttributes, properties: readonly JsxAttributeLike[]) => JsxAttributes;
6897 /** @deprecated Use `factory.createJsxSpreadAttribute` or the factory supplied by your transformation context instead. */
6898 const createJsxSpreadAttribute: (expression: Expression) => JsxSpreadAttribute;
6899 /** @deprecated Use `factory.updateJsxSpreadAttribute` or the factory supplied by your transformation context instead. */
6900 const updateJsxSpreadAttribute: (node: JsxSpreadAttribute, expression: Expression) => JsxSpreadAttribute;
6901 /** @deprecated Use `factory.createJsxExpression` or the factory supplied by your transformation context instead. */
6902 const createJsxExpression: (dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined) => JsxExpression;
6903 /** @deprecated Use `factory.updateJsxExpression` or the factory supplied by your transformation context instead. */
6904 const updateJsxExpression: (node: JsxExpression, expression: Expression | undefined) => JsxExpression;
6905 /** @deprecated Use `factory.createCaseClause` or the factory supplied by your transformation context instead. */
6906 const createCaseClause: (expression: Expression, statements: readonly Statement[]) => CaseClause;
6907 /** @deprecated Use `factory.updateCaseClause` or the factory supplied by your transformation context instead. */
6908 const updateCaseClause: (node: CaseClause, expression: Expression, statements: readonly Statement[]) => CaseClause;
6909 /** @deprecated Use `factory.createDefaultClause` or the factory supplied by your transformation context instead. */
6910 const createDefaultClause: (statements: readonly Statement[]) => DefaultClause;
6911 /** @deprecated Use `factory.updateDefaultClause` or the factory supplied by your transformation context instead. */
6912 const updateDefaultClause: (node: DefaultClause, statements: readonly Statement[]) => DefaultClause;
6913 /** @deprecated Use `factory.createHeritageClause` or the factory supplied by your transformation context instead. */
6914 const createHeritageClause: (token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword, types: readonly ExpressionWithTypeArguments[]) => HeritageClause;
6915 /** @deprecated Use `factory.updateHeritageClause` or the factory supplied by your transformation context instead. */
6916 const updateHeritageClause: (node: HeritageClause, types: readonly ExpressionWithTypeArguments[]) => HeritageClause;
6917 /** @deprecated Use `factory.createCatchClause` or the factory supplied by your transformation context instead. */
6918 const createCatchClause: (variableDeclaration: string | VariableDeclaration | undefined, block: Block) => CatchClause;
6919 /** @deprecated Use `factory.updateCatchClause` or the factory supplied by your transformation context instead. */
6920 const updateCatchClause: (node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block) => CatchClause;
6921 /** @deprecated Use `factory.createPropertyAssignment` or the factory supplied by your transformation context instead. */
6922 const createPropertyAssignment: (name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, initializer: Expression) => PropertyAssignment;
6923 /** @deprecated Use `factory.updatePropertyAssignment` or the factory supplied by your transformation context instead. */
6924 const updatePropertyAssignment: (node: PropertyAssignment, name: PropertyName, initializer: Expression) => PropertyAssignment;
6925 /** @deprecated Use `factory.createShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */
6926 const createShorthandPropertyAssignment: (name: string | Identifier, objectAssignmentInitializer?: Expression | undefined) => ShorthandPropertyAssignment;
6927 /** @deprecated Use `factory.updateShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */
6928 const updateShorthandPropertyAssignment: (node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression | undefined) => ShorthandPropertyAssignment;
6929 /** @deprecated Use `factory.createSpreadAssignment` or the factory supplied by your transformation context instead. */
6930 const createSpreadAssignment: (expression: Expression) => SpreadAssignment;
6931 /** @deprecated Use `factory.updateSpreadAssignment` or the factory supplied by your transformation context instead. */
6932 const updateSpreadAssignment: (node: SpreadAssignment, expression: Expression) => SpreadAssignment;
6933 /** @deprecated Use `factory.createEnumMember` or the factory supplied by your transformation context instead. */
6934 const createEnumMember: (name: string | Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier, initializer?: Expression | undefined) => EnumMember;
6935 /** @deprecated Use `factory.updateEnumMember` or the factory supplied by your transformation context instead. */
6936 const updateEnumMember: (node: EnumMember, name: PropertyName, initializer: Expression | undefined) => EnumMember;
6937 /** @deprecated Use `factory.updateSourceFile` or the factory supplied by your transformation context instead. */
6938 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;
6939 /** @deprecated Use `factory.createNotEmittedStatement` or the factory supplied by your transformation context instead. */
6940 const createNotEmittedStatement: (original: Node) => NotEmittedStatement;
6941 /** @deprecated Use `factory.createPartiallyEmittedExpression` or the factory supplied by your transformation context instead. */
6942 const createPartiallyEmittedExpression: (expression: Expression, original?: Node | undefined) => PartiallyEmittedExpression;
6943 /** @deprecated Use `factory.updatePartiallyEmittedExpression` or the factory supplied by your transformation context instead. */
6944 const updatePartiallyEmittedExpression: (node: PartiallyEmittedExpression, expression: Expression) => PartiallyEmittedExpression;
6945 /** @deprecated Use `factory.createCommaList` or the factory supplied by your transformation context instead. */
6946 const createCommaList: (elements: readonly Expression[]) => CommaListExpression;
6947 /** @deprecated Use `factory.updateCommaList` or the factory supplied by your transformation context instead. */
6948 const updateCommaList: (node: CommaListExpression, elements: readonly Expression[]) => CommaListExpression;
6949 /** @deprecated Use `factory.createBundle` or the factory supplied by your transformation context instead. */
6950 const createBundle: (sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[] | undefined) => Bundle;
6951 /** @deprecated Use `factory.updateBundle` or the factory supplied by your transformation context instead. */
6952 const updateBundle: (node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[] | undefined) => Bundle;
6953 /** @deprecated Use `factory.createImmediatelyInvokedFunctionExpression` or the factory supplied by your transformation context instead. */
6954 const createImmediatelyInvokedFunctionExpression: {
6955 (statements: readonly Statement[]): CallExpression;
6956 (statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
6957 };
6958 /** @deprecated Use `factory.createImmediatelyInvokedArrowFunction` or the factory supplied by your transformation context instead. */
6959 const createImmediatelyInvokedArrowFunction: {
6960 (statements: readonly Statement[]): CallExpression;
6961 (statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
6962 };
6963 /** @deprecated Use `factory.createVoidZero` or the factory supplied by your transformation context instead. */
6964 const createVoidZero: () => VoidExpression;
6965 /** @deprecated Use `factory.createExportDefault` or the factory supplied by your transformation context instead. */
6966 const createExportDefault: (expression: Expression) => ExportAssignment;
6967 /** @deprecated Use `factory.createExternalModuleExport` or the factory supplied by your transformation context instead. */
6968 const createExternalModuleExport: (exportName: Identifier) => ExportDeclaration;
6969 /** @deprecated Use `factory.createNamespaceExport` or the factory supplied by your transformation context instead. */
6970 const createNamespaceExport: (name: Identifier) => NamespaceExport;
6971 /** @deprecated Use `factory.updateNamespaceExport` or the factory supplied by your transformation context instead. */
6972 const updateNamespaceExport: (node: NamespaceExport, name: Identifier) => NamespaceExport;
6973 /** @deprecated Use `factory.createToken` or the factory supplied by your transformation context instead. */
6974 const createToken: <TKind extends SyntaxKind>(kind: TKind) => Token<TKind>;
6975 /** @deprecated Use `factory.createIdentifier` or the factory supplied by your transformation context instead. */
6976 const createIdentifier: (text: string) => Identifier;
6977 /** @deprecated Use `factory.createTempVariable` or the factory supplied by your transformation context instead. */
6978 const createTempVariable: (recordTempVariable: ((node: Identifier) => void) | undefined) => Identifier;
6979 /** @deprecated Use `factory.getGeneratedNameForNode` or the factory supplied by your transformation context instead. */
6980 const getGeneratedNameForNode: (node: Node | undefined) => Identifier;
6981 /** @deprecated Use `factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic)` or the factory supplied by your transformation context instead. */
6982 const createOptimisticUniqueName: (text: string) => Identifier;
6983 /** @deprecated Use `factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel)` or the factory supplied by your transformation context instead. */
6984 const createFileLevelUniqueName: (text: string) => Identifier;
6985 /** @deprecated Use `factory.createIndexSignature` or the factory supplied by your transformation context instead. */
6986 const createIndexSignature: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => IndexSignatureDeclaration;
6987 /** @deprecated Use `factory.createTypePredicateNode` or the factory supplied by your transformation context instead. */
6988 const createTypePredicateNode: (parameterName: Identifier | ThisTypeNode | string, type: TypeNode) => TypePredicateNode;
6989 /** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */
6990 const updateTypePredicateNode: (node: TypePredicateNode, parameterName: Identifier | ThisTypeNode, type: TypeNode) => TypePredicateNode;
6991 /** @deprecated Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead. */
6992 const createLiteral: {
6993 (value: string | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): StringLiteral;
6994 (value: number | PseudoBigInt): NumericLiteral;
6995 (value: boolean): BooleanLiteral;
6996 (value: string | number | PseudoBigInt | boolean): PrimaryExpression;
6997 };
6998 /** @deprecated Use `factory.createMethodSignature` or the factory supplied by your transformation context instead. */
6999 const createMethodSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined) => MethodSignature;
7000 /** @deprecated Use `factory.updateMethodSignature` or the factory supplied by your transformation context instead. */
7001 const updateMethodSignature: (node: MethodSignature, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined, name: PropertyName, questionToken: QuestionToken | undefined) => MethodSignature;
7002 /** @deprecated Use `factory.createTypeOperatorNode` or the factory supplied by your transformation context instead. */
7003 const createTypeOperatorNode: {
7004 (type: TypeNode): TypeOperatorNode;
7005 (operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode;
7006 };
7007 /** @deprecated Use `factory.createTaggedTemplate` or the factory supplied by your transformation context instead. */
7008 const createTaggedTemplate: {
7009 (tag: Expression, template: TemplateLiteral): TaggedTemplateExpression;
7010 (tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression;
7011 };
7012 /** @deprecated Use `factory.updateTaggedTemplate` or the factory supplied by your transformation context instead. */
7013 const updateTaggedTemplate: {
7014 (node: TaggedTemplateExpression, tag: Expression, template: TemplateLiteral): TaggedTemplateExpression;
7015 (node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression;
7016 };
7017 /** @deprecated Use `factory.updateBinary` or the factory supplied by your transformation context instead. */
7018 const updateBinary: (node: BinaryExpression, left: Expression, right: Expression, operator?: BinaryOperator | BinaryOperatorToken) => BinaryExpression;
7019 /** @deprecated Use `factory.createConditional` or the factory supplied by your transformation context instead. */
7020 const createConditional: {
7021 (condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression;
7022 (condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression;
7023 };
7024 /** @deprecated Use `factory.createYield` or the factory supplied by your transformation context instead. */
7025 const createYield: {
7026 (expression?: Expression | undefined): YieldExpression;
7027 (asteriskToken: AsteriskToken | undefined, expression: Expression): YieldExpression;
7028 };
7029 /** @deprecated Use `factory.createClassExpression` or the factory supplied by your transformation context instead. */
7030 const createClassExpression: (modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassExpression;
7031 /** @deprecated Use `factory.updateClassExpression` or the factory supplied by your transformation context instead. */
7032 const updateClassExpression: (node: ClassExpression, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassExpression;
7033 /** @deprecated Use `factory.createPropertySignature` or the factory supplied by your transformation context instead. */
7034 const createPropertySignature: (modifiers: readonly Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer?: Expression | undefined) => PropertySignature;
7035 /** @deprecated Use `factory.updatePropertySignature` or the factory supplied by your transformation context instead. */
7036 const updatePropertySignature: (node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => PropertySignature;
7037 /** @deprecated Use `factory.createExpressionWithTypeArguments` or the factory supplied by your transformation context instead. */
7038 const createExpressionWithTypeArguments: (typeArguments: readonly TypeNode[] | undefined, expression: Expression) => ExpressionWithTypeArguments;
7039 /** @deprecated Use `factory.updateExpressionWithTypeArguments` or the factory supplied by your transformation context instead. */
7040 const updateExpressionWithTypeArguments: (node: ExpressionWithTypeArguments, typeArguments: readonly TypeNode[] | undefined, expression: Expression) => ExpressionWithTypeArguments;
7041 /** @deprecated Use `factory.createArrowFunction` or the factory supplied by your transformation context instead. */
7042 const createArrowFunction: {
7043 (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction;
7044 (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction;
7045 };
7046 /** @deprecated Use `factory.updateArrowFunction` or the factory supplied by your transformation context instead. */
7047 const updateArrowFunction: {
7048 (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction;
7049 (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction;
7050 };
7051 /** @deprecated Use `factory.createVariableDeclaration` or the factory supplied by your transformation context instead. */
7052 const createVariableDeclaration: {
7053 (name: string | BindingName, type?: TypeNode | undefined, initializer?: Expression | undefined): VariableDeclaration;
7054 (name: string | BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
7055 };
7056 /** @deprecated Use `factory.updateVariableDeclaration` or the factory supplied by your transformation context instead. */
7057 const updateVariableDeclaration: {
7058 (node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
7059 (node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
7060 };
7061 /** @deprecated Use `factory.createImportClause` or the factory supplied by your transformation context instead. */
7062 const createImportClause: (name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly?: any) => ImportClause;
7063 /** @deprecated Use `factory.updateImportClause` or the factory supplied by your transformation context instead. */
7064 const updateImportClause: (node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly: boolean) => ImportClause;
7065 /** @deprecated Use `factory.createExportDeclaration` or the factory supplied by your transformation context instead. */
7066 const createExportDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression | undefined, isTypeOnly?: any) => ExportDeclaration;
7067 /** @deprecated Use `factory.updateExportDeclaration` or the factory supplied by your transformation context instead. */
7068 const updateExportDeclaration: (node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, isTypeOnly: boolean) => ExportDeclaration;
7069 /** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */
7070 const createJSDocParamTag: (name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocParameterTag;
7071 /** @deprecated Use `factory.createComma` or the factory supplied by your transformation context instead. */
7072 const createComma: (left: Expression, right: Expression) => Expression;
7073 /** @deprecated Use `factory.createLessThan` or the factory supplied by your transformation context instead. */
7074 const createLessThan: (left: Expression, right: Expression) => Expression;
7075 /** @deprecated Use `factory.createAssignment` or the factory supplied by your transformation context instead. */
7076 const createAssignment: (left: Expression, right: Expression) => BinaryExpression;
7077 /** @deprecated Use `factory.createStrictEquality` or the factory supplied by your transformation context instead. */
7078 const createStrictEquality: (left: Expression, right: Expression) => BinaryExpression;
7079 /** @deprecated Use `factory.createStrictInequality` or the factory supplied by your transformation context instead. */
7080 const createStrictInequality: (left: Expression, right: Expression) => BinaryExpression;
7081 /** @deprecated Use `factory.createAdd` or the factory supplied by your transformation context instead. */
7082 const createAdd: (left: Expression, right: Expression) => BinaryExpression;
7083 /** @deprecated Use `factory.createSubtract` or the factory supplied by your transformation context instead. */
7084 const createSubtract: (left: Expression, right: Expression) => BinaryExpression;
7085 /** @deprecated Use `factory.createLogicalAnd` or the factory supplied by your transformation context instead. */
7086 const createLogicalAnd: (left: Expression, right: Expression) => BinaryExpression;
7087 /** @deprecated Use `factory.createLogicalOr` or the factory supplied by your transformation context instead. */
7088 const createLogicalOr: (left: Expression, right: Expression) => BinaryExpression;
7089 /** @deprecated Use `factory.createPostfixIncrement` or the factory supplied by your transformation context instead. */
7090 const createPostfixIncrement: (operand: Expression) => PostfixUnaryExpression;
7091 /** @deprecated Use `factory.createLogicalNot` or the factory supplied by your transformation context instead. */
7092 const createLogicalNot: (operand: Expression) => PrefixUnaryExpression;
7093 /** @deprecated Use an appropriate `factory` method instead. */
7094 const createNode: (kind: SyntaxKind, pos?: any, end?: any) => Node;
7095 /**
7096 * Creates a shallow, memberwise clone of a node ~for mutation~ with its `pos`, `end`, and `parent` set.
7097 *
7098 * NOTE: It is unsafe to change any properties of a `Node` that relate to its AST children, as those changes won't be
7099 * captured with respect to transformations.
7100 *
7101 * @deprecated Use `factory.cloneNode` instead and use `setCommentRange` or `setSourceMapRange` and avoid setting `parent`.
7102 */
7103 const getMutableClone: <T extends Node>(node: T) => T;
7104 /** @deprecated Use `isTypeAssertionExpression` instead. */
7105 const isTypeAssertion: (node: Node) => node is TypeAssertion;
7106 /**
7107 * @deprecated Use `ts.ReadonlyESMap<K, V>` instead.
7108 */
7109 interface ReadonlyMap<T> extends ReadonlyESMap<string, T> {
7110 }
7111 /**
7112 * @deprecated Use `ts.ESMap<K, V>` instead.
7113 */
7114 interface Map<T> extends ESMap<string, T> {
7115 }
7116}