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